[tiemu] 01/03: Imported Upstream version 3.03-nogdb+dfsg

Andreas B. Mundt andi at alioth.debian.org
Thu Aug 15 19:44:50 UTC 2013


This is an automated email from the git hooks/post-receive script.

andi pushed a commit to branch master
in repository tiemu.

commit 4071eeec04facaabdc4c0576fe11659887bb50ed
Author: Andreas B. Mundt <andi at debian.org>
Date:   Thu Aug 15 14:19:41 2013 +0200

    Imported Upstream version 3.03-nogdb+dfsg
---
 ABOUT-NLS                                   | 1101 +
 AUTHORS                                     |   73 +
 BUGS                                        |   65 +
 COPYING                                     |  339 +
 ChangeLog                                   | 1261 +
 INSTALL                                     |  182 +
 LICENSES                                    |   35 +
 Makefile.am                                 |   49 +
 Makefile.in                                 |  830 +
 NEWS                                        |    1 +
 README                                      |   17 +
 README.linux                                |   71 +
 README.win32                                |  100 +
 RELEASE                                     |   69 +
 TODO                                        |   62 +
 acinclude.m4                                | 4762 ++++
 aclocal.m4                                  |10087 ++++++++
 build/InnoSetup/Output/update.bat           |    5 +
 build/InnoSetup/tiemu.iss                   |  475 +
 build/Makefile.am                           |   15 +
 build/Makefile.in                           |  462 +
 build/ipaq/ReadMe.txt                       |   67 +
 build/ipaq/cross-config.sh                  |    4 +
 build/mingw/ReadMe.txt                      |  283 +
 build/mingw/cross-mingw32-gtkaio.sh         |   13 +
 build/mingw/tiemu.ico                       |  Bin 0 -> 13382 bytes
 build/mingw/tiemu.rc                        |   46 +
 build/msvc/ReadMe.txt                       |   95 +
 build/msvc/TiEmu.ico                        |  Bin 0 -> 13382 bytes
 build/msvc/TiEmu3.dsp                       |   63 +
 build/msvc/TiEmu3.dsw                       |  143 +
 build/msvc/TiEmu3_Console.dsp               |  753 +
 build/msvc/TiEmu3_Console.dsw               |   29 +
 build/msvc/TiEmu3_Windows.dsp               |  645 +
 build/msvc/TiEmu3_Windows.dsw               |   29 +
 build/msvc/dirent.h                         |   68 +
 build/msvc/inttypes.h                       |  305 +
 build/msvc/net.bat                          |    6 +
 build/msvc/small.ico                        |  Bin 0 -> 318 bytes
 build/msvc/stdint.h                         |   69 +
 build/msvc/unistd.h                         |   34 +
 build/nsis/Readme.txt                       |  104 +
 build/nsis/tiemu-cross.nsi                  | 2370 ++
 build/nsis/tiemu.nsi                        | 2371 ++
 build/nsis/vercmp.nsi                       |  112 +
 compile                                     |   99 +
 config.guess                                | 1516 ++
 config.h.in                                 |  495 +
 config.rpath                                |  614 +
 config.sub                                  | 1622 ++
 configure                                   |36645 +++++++++++++++++++++++++++
 configure.ac                                |  339 +
 depcomp                                     |  464 +
 desktop/kde/README                          |   12 +
 desktop/kde/install.sh                      |    5 +
 desktop/kde/tiemu.desktop                   |   15 +
 desktop/kde/x-tiemu-rom.desktop             |    8 +
 desktop/kde/x-tiemu-sav.desktop             |    8 +
 docs/Debugging_TiEmu.txt                    |   43 +
 docs/TiEmu_sdk.txt                          |   64 +
 docs/TiEmu_skin_format.txt                  |  218 +
 docs/VTi_skin_format.txt                    |   96 +
 docs/img_format.txt                         |  225 +
 docs/iodefs_format.txt                      |   33 +
 docs/mails/Kevin Kofler/mail1.txt           |   68 +
 docs/mails/Kevin Kofler/mail2.txt           |   50 +
 docs/mails/Kevin Kofler/mail3.txt           |   21 +
 docs/mails/Kevin Kofler/mail4.txt           |   18 +
 docs/mails/Kevin Kofler/mail5.txt           |   30 +
 docs/mails/Kevin Kofler/mail6.txt           |   24 +
 docs/mails/Kevin Kofler/mail7.txt           |   46 +
 docs/mails/Kevin Kofler/probegho.89z        |  Bin 0 -> 669 bytes
 docs/mails/Kevin Kofler/probegho.c          |   18 +
 docs/mails/Lionel Debroux/line1111.txt      |  108 +
 docs/mails/Lionel Debroux/mem_mapping.txt   |   32 +
 docs/mails/Olivier Armand/7000xx_Ports.txt  |   56 +
 docs/mails/Olivier Armand/mail1.txt         |   65 +
 docs/mails/Olivier Armand/mail2.txt         |  104 +
 docs/mails/Olivier Armand/mail3.txt         |   45 +
 docs/mails/Olivier Armand/mail4.txt         |   29 +
 docs/mails/Olivier Armand/mail5.txt         |   53 +
 docs/mails/Olivier Armand/mail6.txt         |   62 +
 docs/mails/Olivier Armand/mail7.txt         |  162 +
 docs/mails/Olivier Armand/mail8.txt         |  113 +
 docs/mails/Olivier Armand/titanium-info.txt | 1029 +
 docs/ti_hw/fargo/Convert.txt                |  170 +
 docs/ti_hw/fargo/Fargo.txt                  |  981 +
 docs/ti_hw/fargo/Handles.txt                |   74 +
 docs/ti_hw/fargo/LowLevel.txt               |  245 +
 docs/ti_hw/fargo/RAM-1_x.txt                |  235 +
 docs/ti_hw/fargo/ROM-2_1.txt                | 1088 +
 docs/ti_hw/fargo/Traps.txt                  |  191 +
 docs/ti_hw/fargo/Types.txt                  |   71 +
 docs/ti_hw/flash/EEPROM Programming.htm     |  293 +
 docs/ti_hw/misc/J89hw.txt                   |  664 +
 docs/ti_hw/misc/system.txt                  |  885 +
 docs/ti_hw/tie/IO-PORTS.TXT                 |  292 +
 docs/vat/fld_list.c                         |   20 +
 docs/vat/fld_list.tpr                       |   55 +
 docs/vat/vat_doors.htm                      |  265 +
 docs/vat/vatinfo.txt                        |  200 +
 docs/vkeys/VK.htm                           | 1044 +
 docs/vkeys/virtualkeycodes.html             |  456 +
 glade/Makefile.am                           |    7 +
 glade/Makefile.in                           |  488 +
 glade/calc-2.glade                          |   44 +
 glade/calc-2.gladep                         |   18 +
 glade/calc-2.str                            |    8 +
 glade/copy.bat                              |    3 +
 glade/dbg_bits-2.glade                      |  522 +
 glade/dbg_bits-2.gladep                     |   18 +
 glade/dbg_bits-2.str                        |   27 +
 glade/dbg_bkpts-2.glade                     |  235 +
 glade/dbg_bkpts-2.gladep                    |   18 +
 glade/dbg_bkpts-2.str                       |   18 +
 glade/dbg_cause-2.glade                     |  702 +
 glade/dbg_cause-2.gladep                    |   18 +
 glade/dbg_cause-2.str                       |   28 +
 glade/dbg_code-2.glade                      | 1112 +
 glade/dbg_code-2.gladep                     |   18 +
 glade/dbg_code-2.str                        |   64 +
 glade/dbg_data-2.glade                      |  430 +
 glade/dbg_data-2.gladep                     |   18 +
 glade/dbg_data-2.str                        |   22 +
 glade/dbg_dock-2.glade                      |  296 +
 glade/dbg_dock-2.gladep                     |   18 +
 glade/dbg_dock-2.str                        |   13 +
 glade/dbg_entry-2.glade                     |   98 +
 glade/dbg_entry-2.gladep                    |   18 +
 glade/dbg_entry-2.str                       |    2 +
 glade/dbg_heap-2.glade                      |   64 +
 glade/dbg_heap-2.gladep                     |   18 +
 glade/dbg_heap-2.str                        |    9 +
 glade/dbg_ioports-2.glade                   |   74 +
 glade/dbg_ioports-2.gladep                  |   18 +
 glade/dbg_ioports-2.str                     |   11 +
 glade/dbg_mem-2.glade                       |  676 +
 glade/dbg_mem-2.gladep                      |   18 +
 glade/dbg_mem-2.str                         |   28 +
 glade/dbg_pclog-2.glade                     |   40 +
 glade/dbg_pclog-2.gladep                    |   18 +
 glade/dbg_pclog-2.str                       |    8 +
 glade/dbg_regs-2.glade                      | 2411 ++
 glade/dbg_regs-2.gladep                     |   18 +
 glade/dbg_regs-2.str                        |   77 +
 glade/dbg_stack-2.glade                     |  221 +
 glade/dbg_stack-2.gladep                    |   18 +
 glade/dbg_stack-2.str                       |   12 +
 glade/dbg_vectors-2.glade                   |  102 +
 glade/dbg_vectors-2.gladep                  |   18 +
 glade/dbg_vectors-2.str                     |    7 +
 glade/dboxes-2.glade                        |  125 +
 glade/dboxes-2.gladep                       |   18 +
 glade/dboxes-2.str                          |    9 +
 glade/device-2.glade                        |  325 +
 glade/device-2.gladep                       |   18 +
 glade/device-2.str                          |   37 +
 glade/infos-2.glade                         |  591 +
 glade/infos-2.gladep                        |   18 +
 glade/infos-2.str                           |   25 +
 glade/log_link-2.glade                      |  534 +
 glade/log_link-2.gladep                     |   18 +
 glade/log_link-2.str                        |   15 +
 glade/manpage-2.glade                       |   87 +
 glade/manpage-2.gladep                      |   18 +
 glade/pbars-2.glade                         |  863 +
 glade/pbars-2.gladep                        |   18 +
 glade/pbars-2.str                           |   26 +
 glade/popup-2.glade                         |  727 +
 glade/popup-2.gladep                        |   18 +
 glade/popup-2.str                           |   95 +
 glade/quicksend-2.glade                     |  121 +
 glade/quicksend-2.gladep                    |   18 +
 glade/quicksend-2.str                       |    9 +
 glade/release-2.glade                       |  160 +
 glade/release-2.gladep                      |   18 +
 glade/romversion-2.glade                    |  155 +
 glade/romversion-2.gladep                   |   18 +
 glade/romversion-2.str                      |    7 +
 glade/scroptions-2.glade                    |  726 +
 glade/scroptions-2.gladep                   |   18 +
 glade/scroptions-2.str                      |   28 +
 glade/wizard-2.glade                        |  759 +
 glade/wizard-2.gladep                       |   18 +
 glade/wizard-2.str                          |   29 +
 help/FAQ.html                               |   33 +
 help/Makefile.am                            |   13 +
 help/Makefile.in                            |  494 +
 help/Manual_en.html                         |  159 +
 help/calc_infos.png                         |  Bin 0 -> 10083 bytes
 help/chapter01.html                         |  248 +
 help/chapter02.html                         |   81 +
 help/chapter03.html                         |   75 +
 help/chapter04.html                         |   63 +
 help/chapter05.html                         |  716 +
 help/chapter06.html                         |  205 +
 help/chapter07.html                         |  343 +
 help/chapter08.html                         |   81 +
 help/chapter09.html                         |  372 +
 help/chapter10.html                         |   69 +
 help/chapter11.html                         |  194 +
 help/chapter20.html                         |   95 +
 help/chapter21.html                         |   53 +
 help/chapter22.html                         |   65 +
 help/dbg_bkpts.png                          |  Bin 0 -> 11620 bytes
 help/dbg_heap.png                           |  Bin 0 -> 10297 bytes
 help/dbg_mem.png                            |  Bin 0 -> 16374 bytes
 help/dbg_registers.png                      |  Bin 0 -> 10686 bytes
 help/dbg_search.png                         |  Bin 0 -> 9979 bytes
 help/dbg_source.png                         |  Bin 0 -> 17385 bytes
 help/dbg_sr.png                             |  Bin 0 -> 8443 bytes
 help/dbg_stack.png                          |  Bin 0 -> 8641 bytes
 help/linkport.png                           |  Bin 0 -> 9686 bytes
 help/log_link.png                           |  Bin 0 -> 11366 bytes
 help/logo_lpg.png                           |  Bin 0 -> 1622 bytes
 help/logo_tiemu.png                         |  Bin 0 -> 29340 bytes
 help/no_skin.png                            |  Bin 0 -> 9071 bytes
 help/popup_menu.png                         |  Bin 0 -> 9467 bytes
 help/romversion.png                         |  Bin 0 -> 13923 bytes
 help/screenshot.png                         |  Bin 0 -> 15614 bytes
 help/skinedit.jpg                           |  Bin 0 -> 29333 bytes
 help/tiemu.jpg                              |  Bin 0 -> 42429 bytes
 help/wizard.png                             |  Bin 0 -> 12617 bytes
 install-sh                                  |  276 +
 install.bat                                 |   21 +
 ltmain.sh                                   | 6425 +++++
 man/Makefile.am                             |   15 +
 man/Makefile.in                             |  547 +
 man/Manpage.txt                             |  229 +
 man/cleaner.c                               |  127 +
 man/tiemu.1                                 |  206 +
 misc/Makefile.am                            |    7 +
 misc/Makefile.in                            |  488 +
 misc/copy.bat                               |    3 +
 misc/iodefs_ti89_hw1.txt                    |   46 +
 misc/iodefs_ti89_hw2.txt                    |   57 +
 misc/iodefs_ti89t_hw3.txt                   |   60 +
 misc/iodefs_ti89t_hw4.txt                   |   60 +
 misc/iodefs_ti92_hw1.txt                    |   39 +
 misc/iodefs_ti92p_hw1.txt                   |   46 +
 misc/iodefs_ti92p_hw2.txt                   |   57 +
 misc/iodefs_v200_hw2.txt                    |   40 +
 misc/memmap_ti89_hw1.txt                    |   12 +
 misc/memmap_ti89_hw2.txt                    |   11 +
 misc/memmap_ti89t_hw3.txt                   |   15 +
 misc/memmap_ti89t_hw4.txt                   |   15 +
 misc/memmap_ti92_hw1.txt                    |   10 +
 misc/memmap_ti92p_hw1.txt                   |    9 +
 misc/memmap_ti92p_hw2.txt                   |   11 +
 misc/memmap_v200_hw2.txt                    |   11 +
 misc/romcalls.lst                           | 1415 ++
 misc/romcalls.txt                           | 1558 ++
 missing                                     |  336 +
 mkinstalldirs                               |  111 +
 pedrom/Makefile.am                          |    7 +
 pedrom/Makefile.in                          |  488 +
 pedrom/pedrom-src.tar.bz2                   |  Bin 0 -> 291520 bytes
 pedrom/pedrom.txt                           |   33 +
 pedrom/pedrom89.tib                         |  Bin 0 -> 97523 bytes
 pedrom/pedrom89ti.tib                       |  Bin 0 -> 97611 bytes
 pedrom/pedrom9x.tib                         |  Bin 0 -> 97383 bytes
 pedrom/pedromv2.tib                         |  Bin 0 -> 97383 bytes
 pixmaps/Makefile.am                         |    8 +
 pixmaps/Makefile.in                         |  489 +
 pixmaps/bkpt.xpm                            |   13 +
 pixmaps/copy.bat                            |    3 +
 pixmaps/icon.xpm                            |   83 +
 pixmaps/logo.xpm                            | 7992 ++++++
 pixmaps/romdump.ico                         |  Bin 0 -> 318 bytes
 pixmaps/romdump.xpm                         |  191 +
 pixmaps/run_1.xpm                           |   17 +
 pixmaps/run_2.xpm                           |   17 +
 pixmaps/void.xpm                            |   12 +
 po/ChangeLog                                |   11 +
 po/LINGUAS                                  |    3 +
 po/Makefile.in.in                           |  403 +
 po/Makevars                                 |   41 +
 po/POTFILES.in                              |  127 +
 po/Rules-quot                               |   47 +
 po/TRANSLATORS                              |    9 +
 po/boldquot.sed                             |   10 +
 po/copy.bat                                 |   15 +
 po/en at boldquot.header                       |   25 +
 po/en at quot.header                           |   22 +
 po/fr.gmo                                   |  Bin 0 -> 40530 bytes
 po/fr.po                                    | 2727 ++
 po/insert-header.sin                        |   23 +
 po/quot.sed                                 |    6 +
 po/remove-potcdate.sin                      |   19 +
 po/stamp-po                                 |    1 +
 po/tiemu.pot                                | 2572 ++
 sdk/dcop/build.sh                           |    2 +
 sdk/dcop/dcoptest.cpp                       |   75 +
 sdk/dcop/readme.txt                         |   18 +
 sdk/dcop/tiemu.h                            |   14 +
 sdk/dcop/tiemu_stub.cpp                     |  316 +
 sdk/dcop/tiemu_stub.h                       |   41 +
 sdk/oleaut/build.sh                         |    2 +
 sdk/oleaut/oletest.c                        |   94 +
 sdk/oleaut/oletest.dsp                      |  113 +
 sdk/oleaut/oletest.dsw                      |   29 +
 sdk/oleaut/readme.txt                       |   22 +
 sdk/oleaut/test_vba.doc                     |  Bin 0 -> 53760 bytes
 sdk/oleaut/tiemuole.c                       |   19 +
 sdk/oleaut/tiemuole.h                       |  320 +
 skins/Makefile.am                           |    8 +
 skins/Makefile.in                           |  489 +
 skins/README                                |   13 +
 skins/copy.bat                              |    5 +
 skins/ipaq_89.skn                           |  Bin 0 -> 97079 bytes
 skins/ipaq_92.skn                           |  Bin 0 -> 138877 bytes
 skins/ipaq_v200plt.skn                      |  Bin 0 -> 128092 bytes
 skins/ti89.map                              |  111 +
 skins/ti89.skn                              |  Bin 0 -> 129960 bytes
 skins/ti89_fr.map                           |   93 +
 skins/ti89t.skn                             |  Bin 0 -> 50473 bytes
 skins/ti92.map                              |  116 +
 skins/ti92.skn                              |  Bin 0 -> 193932 bytes
 skins/ti92_fr.map                           |   99 +
 skins/v200plt.skn                           |  Bin 0 -> 56783 bytes
 src/Makefile.in                             |  390 +
 src/core/dbg/bkpts.c                        |  760 +
 src/core/dbg/bkpts.h                        |  160 +
 src/core/dbg/debug.c                        |  254 +
 src/core/dbg/debug.h                        |   45 +
 src/core/dbg/disasm.c                       |  470 +
 src/core/dbg/fpudasm.c                      |  245 +
 src/core/dbg/gdbcall.c                      |   86 +
 src/core/dbg/gdbcall.h                      |   30 +
 src/core/engine.c                           |  142 +
 src/core/engine.h                           |   49 +
 src/core/error.c                            |  111 +
 src/core/hwpm.c                             |  167 +
 src/core/hwpm.h                             |   66 +
 src/core/images.c                           | 1216 +
 src/core/images.h                           |  118 +
 src/core/interface.c                        |  337 +
 src/core/mem_size.h                         |   77 +
 src/core/state.c                            |  447 +
 src/core/state.h                            |   54 +
 src/core/ti68k_def.h                        |  231 +
 src/core/ti68k_err.h                        |   50 +
 src/core/ti68k_int.h                        |   94 +
 src/core/ti_hw/bits.h                       |   42 +
 src/core/ti_hw/dbus.c                       |  689 +
 src/core/ti_hw/dbus.h                       |   53 +
 src/core/ti_hw/flash.c                      |  344 +
 src/core/ti_hw/flash.h                      |   76 +
 src/core/ti_hw/gscales.c                    |  469 +
 src/core/ti_hw/gscales.h                    |   34 +
 src/core/ti_hw/hw.c                         |  302 +
 src/core/ti_hw/hw.h                         |   55 +
 src/core/ti_hw/hwprot.c                     |  421 +
 src/core/ti_hw/hwprot.h                     |   48 +
 src/core/ti_hw/kbd.c                        |  270 +
 src/core/ti_hw/kbd.h                        |   43 +
 src/core/ti_hw/keydefs.h                    |   63 +
 src/core/ti_hw/m68k.c                       |  380 +
 src/core/ti_hw/m68k.h                       |   46 +
 src/core/ti_hw/macros.h                     |   42 +
 src/core/ti_hw/mem.c                        |  515 +
 src/core/ti_hw/mem.h                        |   88 +
 src/core/ti_hw/mem89.c                      |  280 +
 src/core/ti_hw/mem89.h                      |   46 +
 src/core/ti_hw/mem89tm.c                    |  338 +
 src/core/ti_hw/mem89tm.h                    |   46 +
 src/core/ti_hw/mem92.c                      |  222 +
 src/core/ti_hw/mem92.h                      |   46 +
 src/core/ti_hw/mem92p.c                     |  282 +
 src/core/ti_hw/mem92p.h                     |   46 +
 src/core/ti_hw/memv2.c                      |  280 +
 src/core/ti_hw/memv2.h                      |   46 +
 src/core/ti_hw/ports.c                      |  673 +
 src/core/ti_hw/ports.h                      |   86 +
 src/core/ti_hw/rtc_hw3.c                    |  185 +
 src/core/ti_hw/rtc_hw3.h                    |   48 +
 src/core/ti_hw/tichars.c                    |  385 +
 src/core/ti_hw/tichars.h                    |   28 +
 src/core/ti_hw/tilibs.h                     |   39 +
 src/core/ti_sw/er_codes.c                   |  186 +
 src/core/ti_sw/handles.c                    |  189 +
 src/core/ti_sw/handles.h                    |   46 +
 src/core/ti_sw/iodefs.c                     |  358 +
 src/core/ti_sw/iodefs.h                     |   68 +
 src/core/ti_sw/mem_map.c                    |  170 +
 src/core/ti_sw/mem_map.h                    |   55 +
 src/core/ti_sw/registers.c                  |  350 +
 src/core/ti_sw/registers.h                  |   60 +
 src/core/ti_sw/romcalls.c                   |  375 +
 src/core/ti_sw/romcalls.h                   |   77 +
 src/core/ti_sw/timem.c                      |   79 +
 src/core/ti_sw/timem.h                      |   53 +
 src/core/ti_sw/vat.c                        |  461 +
 src/core/ti_sw/vat.h                        |   50 +
 src/core/type2str.c                         |  307 +
 src/core/type2str.h                         |   46 +
 src/core/uae/COPYING                        |  340 +
 src/core/uae/Makefile                       |   87 +
 src/core/uae/README                         |  937 +
 src/core/uae/build68k.c                     |  248 +
 src/core/uae/build68k.dsp                   |  100 +
 src/core/uae/clean.bat                      |   10 +
 src/core/uae/cpu_prefetch.h                 |   16 +
 src/core/uae/fpp.c                          |   47 +
 src/core/uae/gencpu.c                       | 2779 ++
 src/core/uae/gencpu.dsp                     |  115 +
 src/core/uae/libuae.dsp                     |  160 +
 src/core/uae/libuae.h                       |   41 +
 src/core/uae/machdep/m68k.h                 |   42 +
 src/core/uae/machdep/maccess.h              |   57 +
 src/core/uae/memory.h                       |   30 +
 src/core/uae/missing.c                      |   26 +
 src/core/uae/newcpu.c                       | 1986 ++
 src/core/uae/newcpu.h                       |  323 +
 src/core/uae/options.h                      |  290 +
 src/core/uae/readcpu.c                      |  860 +
 src/core/uae/readcpu.h                      |  108 +
 src/core/uae/sysconfig.h                    |  138 +
 src/core/uae/sysdeps.h                      |  198 +
 src/core/uae/table68k                       |  260 +
 src/core/uae/uae.dsp                        |   63 +
 src/core/uae/uae.dsw                        |   74 +
 src/core/uae/uconfig.h                      |   78 +
 src/core/uae/xmalloc.c                      |   32 +
 src/gui/about.c                             |  126 +
 src/gui/about.h                             |   30 +
 src/gui/calc/calc.c                         |  814 +
 src/gui/calc/calc.h                         |   88 +
 src/gui/calc/dnd.c                          |  185 +
 src/gui/calc/keyboard.c                     |  290 +
 src/gui/calc/keymap.c                       |  211 +
 src/gui/calc/keymap.h                       |   57 +
 src/gui/calc/keynames.c                     |  285 +
 src/gui/calc/keypress.c                     |  124 +
 src/gui/calc/keypress.h                     |   33 +
 src/gui/calc/pckeys.h                       |  496 +
 src/gui/calc/popup.c                        |  870 +
 src/gui/calc/popup.h                        |  189 +
 src/gui/calc/screen.c                       |  390 +
 src/gui/calc/skinkeys.c                     |   79 +
 src/gui/calc/skinops.c                      |  469 +
 src/gui/calc/skinops.h                      |  137 +
 src/gui/dboxes.c                            |  244 +
 src/gui/dboxes.h                            |   43 +
 src/gui/debugger/dbg_all.c                  |  263 +
 src/gui/debugger/dbg_all.h                  |   56 +
 src/gui/debugger/dbg_bits.c                 |  117 +
 src/gui/debugger/dbg_bits.h                 |   26 +
 src/gui/debugger/dbg_bkpts.c                |  941 +
 src/gui/debugger/dbg_bkpts.h                |   40 +
 src/gui/debugger/dbg_cause.c                |  343 +
 src/gui/debugger/dbg_cause.h                |   31 +
 src/gui/debugger/dbg_code.c                 | 1263 +
 src/gui/debugger/dbg_code.h                 |   36 +
 src/gui/debugger/dbg_data.c                 |  225 +
 src/gui/debugger/dbg_data.h                 |   30 +
 src/gui/debugger/dbg_dock.c                 |  172 +
 src/gui/debugger/dbg_dock.h                 |   46 +
 src/gui/debugger/dbg_entry.c                |  233 +
 src/gui/debugger/dbg_entry.h                |   30 +
 src/gui/debugger/dbg_heap.c                 |  279 +
 src/gui/debugger/dbg_heap.h                 |   31 +
 src/gui/debugger/dbg_iop.c                  |  474 +
 src/gui/debugger/dbg_iop.h                  |   31 +
 src/gui/debugger/dbg_mem.c                  | 1373 +
 src/gui/debugger/dbg_mem.h                  |   37 +
 src/gui/debugger/dbg_pclog.c                |  225 +
 src/gui/debugger/dbg_pclog.h                |   31 +
 src/gui/debugger/dbg_regs.c                 |  556 +
 src/gui/debugger/dbg_regs.h                 |   33 +
 src/gui/debugger/dbg_romcall.c              |  264 +
 src/gui/debugger/dbg_romcall.h              |   30 +
 src/gui/debugger/dbg_stack.c                |  429 +
 src/gui/debugger/dbg_stack.h                |   31 +
 src/gui/debugger/dbg_vectors.c              |  175 +
 src/gui/debugger/dbg_vectors.h              |   31 +
 src/gui/debugger/dbg_wnds.c                 |  721 +
 src/gui/debugger/dbg_wnds.h                 |  106 +
 src/gui/device.c                            |  239 +
 src/gui/device.h                            |    3 +
 src/gui/filesel.c                           |  742 +
 src/gui/filesel.h                           |   30 +
 src/gui/fs_misc.c                           |  521 +
 src/gui/fs_misc.h                           |   47 +
 src/gui/infos.c                             |  120 +
 src/gui/infos.h                             |   30 +
 src/gui/logger/log_link.c                   |  274 +
 src/gui/logger/log_link.h                   |   29 +
 src/gui/main.c                              |  464 +
 src/gui/manpage.c                           |  101 +
 src/gui/manpage.h                           |   30 +
 src/gui/pbars.c                             |  235 +
 src/gui/pbars.h                             |   51 +
 src/gui/quicksend.c                         |  128 +
 src/gui/quicksend.h                         |   32 +
 src/gui/refresh.c                           |  186 +
 src/gui/refresh.h                           |   34 +
 src/gui/release.c                           |  103 +
 src/gui/release.h                           |   29 +
 src/gui/romversion.c                        |  323 +
 src/gui/romversion.h                        |   30 +
 src/gui/scroptions.c                        |  327 +
 src/gui/scroptions.h                        |   30 +
 src/gui/splash.c                            |  113 +
 src/gui/splash.h                            |   31 +
 src/gui/support.c                           |  145 +
 src/gui/support.h                           |   75 +
 src/gui/tsource.c                           |  240 +
 src/gui/tsource.h                           |   49 +
 src/gui/wizard.c                            |  336 +
 src/gui/wizard.h                            |   32 +
 src/ipc/com/Makefile                        |   32 +
 src/ipc/com/dlldata.c                       |   30 +
 src/ipc/com/oleaut.cpp                      |  289 +
 src/ipc/com/oleaut.h                        |  320 +
 src/ipc/com/oleaut.idl                      |   70 +
 src/ipc/com/oleaut.tlb                      |  Bin 0 -> 2560 bytes
 src/ipc/com/oleaut_c.h                      |   32 +
 src/ipc/com/oleaut_i.c                      |   19 +
 src/ipc/com/oleaut_i.c.diff                 |    7 +
 src/ipc/com/oleaut_p.c                      | 1749 ++
 src/ipc/com/registry.cpp                    |  203 +
 src/ipc/com/registry.h                      |   32 +
 src/ipc/com/rpcrt4nt4.def                   |    6 +
 src/ipc/com/tiemups.def                     |   11 +
 src/ipc/com/tiemups.mk                      |   17 +
 src/ipc/dbus/dbus_ipc.c                     |  241 +
 src/ipc/dbus/dbus_ipc.h                     |   32 +
 src/ipc/dbus/dbus_ipc.xml                   |   71 +
 src/ipc/dcop/dcop.cpp                       |  170 +
 src/ipc/dcop/dcop.h                         |   51 +
 src/kde/kde-private.h                       |   29 +
 src/kde/kde.cpp                             |  204 +
 src/kde/kde.h                               |   34 +
 src/misc/cmdline.c                          |  283 +
 src/misc/cmdline.h                          |   35 +
 src/misc/extern.h                           |   50 +
 src/misc/files.c                            |  222 +
 src/misc/files.h                            |   36 +
 src/misc/gettimeofday.h                     |   30 +
 src/misc/gettimeofday_win32_impl.h          |   50 +
 src/misc/intl.h                             |   80 +
 src/misc/logging.c                          |   77 +
 src/misc/logging.h                          |   42 +
 src/misc/paths.c                            |  201 +
 src/misc/paths.h                            |   88 +
 src/misc/rcfile.c                           |  980 +
 src/misc/rcfile.h                           |   40 +
 src/misc/screenshot.c                       |  375 +
 src/misc/screenshot.h                       |   56 +
 src/misc/struct.h                           |  128 +
 src/misc/tie_error.c                        |   82 +
 src/misc/tie_error.h                        |   33 +
 src/misc/version.h                          |   50 +
 src/sound/audio.c                           |   94 +
 src/sound/audio.h                           |   57 +
 src/sound/stream.c                          |   62 +
 src/sound/stream.h                          |   33 +
 tiemu.lsm.in                                |   21 +
 tiemu.spec.in                               |   93 +
 560 files changed, 177391 insertions(+)

diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..ec20977
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1101 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the included GNU
+`gettext' library will be used.  This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might not be desirable.  You should use
+the more recent version of the GNU `gettext' library.  I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request at li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation at iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of October
+2006.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar az be bg bs ca cs cy da de el en en_GB eo
+                        +----------------------------------------------------+
+     GNUnet             |                                  []                |
+     a2ps               |             []                [] [] []     []      |
+     aegis              |                                  ()                |
+     ant-phone          |                                  ()                |
+     anubis             |                                  []                |
+     ap-utils           |                                                    |
+     aspell             |                      [] []    [] []        []      |
+     bash               |                      []          []             [] |
+     batchelor          |                                  []                |
+     bfd                |                                                    |
+     bibshelf           |                                  []                |
+     binutils           |                               []                   |
+     bison              |                               [] []                |
+     bison-runtime      |                                                    |
+     bluez-pin          | []                      []       [] []          [] |
+     cflow              |                               []                   |
+     clisp              |                                  []    []          |
+     console-tools      |                         []       []                |
+     coreutils          |                []    []          []                |
+     cpio               |                                                    |
+     cpplib             |                      []       [] []                |
+     cryptonit          |                                  []                |
+     darkstat           |                []             () []                |
+     dialog             |                      [] [] [] [] [] []             |
+     diffutils          |                      [] []    [] [] []          [] |
+     doodle             |                                  []                |
+     e2fsprogs          |                         []       []                |
+     enscript           |                      []       [] []        []      |
+     error              |                      []       [] []        []      |
+     fetchmail          |                      []       [] () []             |
+     fileutils          |                               [] []                |
+     findutils          |                []    []       []                   |
+     flex               |                      []       [] []                |
+     fslint             |                                  []                |
+     gas                |                                                    |
+     gawk               |                      []       [] []                |
+     gbiff              |                                  []                |
+     gcal               |                      []                            |
+     gcc                |                                  []                |
+     gettext-examples   | []                   []          [] []          [] |
+     gettext-runtime    |             []       []       [] []             [] |
+     gettext-tools      |                      []          []                |
+     gimp-print         |                         []    [] []        []      |
+     gip                |                []                                  |
+     gliv               |                                  []                |
+     glunarclock        |                []                                  |
+     gmult              | []                               []                |
+     gnubiff            |                                  ()                |
+     gnucash            |                                  () ()     []      |
+     gnucash-glossary   |                               [] ()                |
+     gnuedu             |                                                    |
+     gnulib             | []          [] []    []       [] []                |
+     gnunet-gtk         |                                                    |
+     gnutls             |                                                    |
+     gpe-aerial         |                         []       []                |
+     gpe-beam           |                         []       []                |
+     gpe-calendar       |                                                    |
+     gpe-clock          |                         []       []                |
+     gpe-conf           |                         []       []                |
+     gpe-contacts       |                                                    |
+     gpe-edit           |                         []                         |
+     gpe-filemanager    |                                                    |
+     gpe-go             |                         []                         |
+     gpe-login          |                         []       []                |
+     gpe-ownerinfo      |                         []       []                |
+     gpe-package        |                                                    |
+     gpe-sketchbook     |                         []       []                |
+     gpe-su             |                         []       []                |
+     gpe-taskmanager    |                         []       []                |
+     gpe-timesheet      |                         []                         |
+     gpe-today          |                         []       []                |
+     gpe-todo           |                                                    |
+     gphoto2            |                         []    [] []        []      |
+     gprof              |                               [] []                |
+     gpsdrive           |                                  ()    ()          |
+     gramadoir          | []                               []                |
+     grep               | []          [] []    []          [] []             |
+     gretl              |                                                    |
+     gsasl              |                                                    |
+     gss                |                                                    |
+     gst-plugins        | []                   [] []    []                   |
+     gst-plugins-base   |                []    []       []                   |
+     gst-plugins-good   | []       []    []    [] []    []           []      |
+     gstreamer          | []             []    [] []    [] []        []      |
+     gtick              |                                  ()                |
+     gtkam              |                         []    [] []                |
+     gtkorphan          |                []                []                |
+     gtkspell           |             []                   [] []          [] |
+     gutenprint         |                               []                   |
+     hello              |                []    []       [] []             [] |
+     id-utils           |                               [] []                |
+     impost             |                                                    |
+     indent             |                      []          []             [] |
+     iso_3166           |                                  []             [] |
+     iso_3166_2         |                                                    |
+     iso_4217           |                                  []                |
+     iso_639            |                                  []             [] |
+     jpilot             |                         []                         |
+     jtag               |                                                    |
+     jwhois             |                                                    |
+     kbd                |                         []    [] [] []             |
+     keytouch           |                                                    |
+     keytouch-editor    |                                                    |
+     keytouch-keyboa... |                                                    |
+     latrine            |                                  ()                |
+     ld                 |                               []                   |
+     leafpad            |                []    [] []       [] []             |
+     libc               |                      [] []    [] [] []             |
+     libexif            |                                  []                |
+     libextractor       |                                  []                |
+     libgpewidget       |                         []    [] []                |
+     libgpg-error       |                                  []                |
+     libgphoto2         |                               [] []                |
+     libgphoto2_port    |                               [] []                |
+     libgsasl           |                                                    |
+     libiconv           |                                  []             [] |
+     libidn             |                               []                [] |
+     lifelines          |                               [] ()                |
+     lilypond           |                                  []                |
+     lingoteach         |                                                    |
+     lynx               |                      [] []    [] []                |
+     m4                 |                         []    [] [] []             |
+     mailutils          |                      []                            |
+     make               |                               [] []                |
+     man-db             |                      [] ()    [] []                |
+     minicom            |                         []    [] []                |
+     mysecretdiary      |                               [] []                |
+     nano               |                []    []          []                |
+     nano_1_0           |                      [] ()    [] []                |
+     opcodes            |                                  []                |
+     parted             |                                                    |
+     pilot-qof          |                                            []      |
+     psmisc             |                []                                  |
+     pwdutils           |                                                    |
+     python             |                                                    |
+     qof                |                                                    |
+     radius             |                      []                            |
+     recode             |             []       []       [] [] []          [] |
+     rpm                |                         []    []                   |
+     screem             |                                                    |
+     scrollkeeper       |          [] []       [] [] [] [] []        []      |
+     sed                |                      []          []             [] |
+     sh-utils           |                               [] []                |
+     shared-mime-info   |                []       []                 []   [] |
+     sharutils          |                []    [] []    [] [] []             |
+     shishi             |                                                    |
+     silky              |                                                    |
+     skencil            |                               [] ()                |
+     sketch             |                               [] ()                |
+     solfege            |                                                    |
+     soundtracker       |                               [] []                |
+     sp                 |                                  []                |
+     stardict           |                         []                         |
+     system-tools-ba... |       []       [] [] [] []    [] [] []     []      |
+     tar                |                []                                  |
+     texinfo            |                               [] []             [] |
+     textutils          |                      []       [] []                |
+     tin                |                                  ()        ()      |
+     tp-robot           |                                  []                |
+     tuxpaint           | []             []             [] []        []      |
+     unicode-han-tra... |                                                    |
+     unicode-transla... |                                                    |
+     util-linux         |                      [] []    [] []                |
+     vorbis-tools       |             []          []    []           []      |
+     wastesedge         |                                  ()                |
+     wdiff              |                      []       [] []        []      |
+     wget               |                      []          []                |
+     xchat              |             [] []    []          [] []     []      |
+     xkeyboard-config   |                                                    |
+     xpad               |                []             []                   |
+                        +----------------------------------------------------+
+                          af am ar az be bg bs ca cs cy da de el en en_GB eo
+                          10  0  1  2  9 22  1 42 41  2 60 95 16  1  17   16
+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                        +--------------------------------------------------+
+     GNUnet             |                                                  |
+     a2ps               |    []       [] []                             () |
+     aegis              |                                                  |
+     ant-phone          |                []                                |
+     anubis             |                []                                |
+     ap-utils           |             [] []                                |
+     aspell             |                []  []                         [] |
+     bash               | []             []                    []          |
+     batchelor          |                []  []                            |
+     bfd                | []                                               |
+     bibshelf           | []                 []                         [] |
+     binutils           | []          [] []                                |
+     bison              | [] []          []  []                   []    [] |
+     bison-runtime      |    []          []  []                   []    [] |
+     bluez-pin          |             [] []  []                [] []       |
+     cflow              |                    []                            |
+     clisp              | []             []                                |
+     console-tools      |                                                  |
+     coreutils          | [] []       [] []  []                []          |
+     cpio               | []             []  []                            |
+     cpplib             | []             []                                |
+     cryptonit          |                []                                |
+     darkstat           | []             ()  []                [] []       |
+     dialog             | [] [] []    [] []  []                []       [] |
+     diffutils          | []          [] []  [] []    []       [] []    [] |
+     doodle             |                    []                         [] |
+     e2fsprogs          | []             []                             [] |
+     enscript           |                []  []             []             |
+     error              | []          [] []  []                []          |
+     fetchmail          | []                                               |
+     fileutils          | [] []          []  []                []       [] |
+     findutils          |    []          []  []                []          |
+     flex               | []             []  []                            |
+     fslint             |                []                                |
+     gas                | []             []                                |
+     gawk               | []             []  []       []                   |
+     gbiff              |                []                                |
+     gcal               | []             []                                |
+     gcc                | []                                               |
+     gettext-examples   | []             []  []                [] []    [] |
+     gettext-runtime    | []          [] []  []                   []    [] |
+     gettext-tools      | []             []                             [] |
+     gimp-print         | []             []                                |
+     gip                | []    []       []                                |
+     gliv               |                ()                                |
+     glunarclock        |             []     []                []          |
+     gmult              |       []       []                             [] |
+     gnubiff            |                ()                             () |
+     gnucash            | ()             ()                    ()          |
+     gnucash-glossary   | []                                            [] |
+     gnuedu             | []                                               |
+     gnulib             | [] [] []    [] []  [] []             []          |
+     gnunet-gtk         |                                                  |
+     gnutls             |                                                  |
+     gpe-aerial         | []             []                                |
+     gpe-beam           | []             []                                |
+     gpe-calendar       |                                                  |
+     gpe-clock          | []          [] []                    []          |
+     gpe-conf           |                []                                |
+     gpe-contacts       | []             []                                |
+     gpe-edit           | []             []                    [] []       |
+     gpe-filemanager    | []                                               |
+     gpe-go             | []             []                    []          |
+     gpe-login          | []             []                    []          |
+     gpe-ownerinfo      | []          [] []                    [] []       |
+     gpe-package        | []                                               |
+     gpe-sketchbook     | []             []                                |
+     gpe-su             | []          [] []                    []          |
+     gpe-taskmanager    | []          [] []                                |
+     gpe-timesheet      | []             []  []                   []       |
+     gpe-today          | []          [] []  []                            |
+     gpe-todo           | []                                               |
+     gphoto2            | []          [] []                    []       [] |
+     gprof              | []             []  []                   []       |
+     gpsdrive           | ()             ()                    []       () |
+     gramadoir          |                []  []                            |
+     grep               | [] [] []    [] []  [] []    []    [] [] []    [] |
+     gretl              | []             []                             [] |
+     gsasl              |                    []                   []       |
+     gss                |                []                                |
+     gst-plugins        |                []                    []       [] |
+     gst-plugins-base   |                                      []       [] |
+     gst-plugins-good   |       []                             []       [] |
+     gstreamer          |             []                       []       [] |
+     gtick              |                    []                            |
+     gtkam              | []             []                    []       [] |
+     gtkorphan          |                []                             [] |
+     gtkspell           | []    []    [] []  []                         [] |
+     gutenprint         |                                      []          |
+     hello              | [] [] [] [] [] []  [] []    []    [] [] []    [] |
+     id-utils           |                []  []                [] []    [] |
+     impost             |                []  []                            |
+     indent             | [] [] []    [] []  [] []             [] []    [] |
+     iso_3166           |             [] []                    []          |
+     iso_3166_2         |                []                                |
+     iso_4217           |    []       []        []             []          |
+     iso_639            |          [] [] []  []                []          |
+     jpilot             | []             []                                |
+     jtag               |                []                                |
+     jwhois             | []             []                    [] []    [] |
+     kbd                | []             []                                |
+     keytouch           |                    []                            |
+     keytouch-editor    |                    []                            |
+     keytouch-keyboa... |                    []                            |
+     latrine            |                []  []                         [] |
+     ld                 | []             []                                |
+     leafpad            | []             []  []       []       []       [] |
+     libc               | []          [] []     []             []          |
+     libexif            | []                                               |
+     libextractor       |                    []                            |
+     libgpewidget       | []             []  []                [] []       |
+     libgpg-error       |                                                  |
+     libgphoto2         | []             []                             [] |
+     libgphoto2_port    |                []                             [] |
+     libgsasl           |                []  []                            |
+     libiconv           |    []              []                            |
+     libidn             |                []                             [] |
+     lifelines          |                ()                                |
+     lilypond           |                []                                |
+     lingoteach         |                []                       []    [] |
+     lynx               |    []                                []       [] |
+     m4                 |                []  [] []                []       |
+     mailutils          | []             []                                |
+     make               | []          [] []  [] []    []    []    []       |
+     man-db             | ()                                               |
+     minicom            | []          [] []                    []          |
+     mysecretdiary      | []             []                       []       |
+     nano               | []    []       []  []                []       [] |
+     nano_1_0           | []             []     []                []    [] |
+     opcodes            | []          [] []  []                            |
+     parted             | []             []                       []    [] |
+     pilot-qof          |                                                  |
+     psmisc             |       []                             []       [] |
+     pwdutils           |                                                  |
+     python             |                                                  |
+     qof                |                                         []       |
+     radius             | []             []                                |
+     recode             | []             []  [] []    []       [] []    [] |
+     rpm                |                []                       []       |
+     screem             |                                                  |
+     scrollkeeper       | []          []                       []          |
+     sed                | [] []          []  []                []          |
+     sh-utils           | [] []       [] []  []                []       [] |
+     shared-mime-info   | []    []    [] []                    []       [] |
+     sharutils          | [] []       [] []  [] []             []       [] |
+     shishi             |                                                  |
+     silky              |                []                                |
+     skencil            | []             []                                |
+     sketch             | []             []                                |
+     solfege            |                                               [] |
+     soundtracker       | []             []                             [] |
+     sp                 |                []                                |
+     stardict           |                                      []          |
+     system-tools-ba... | []    []    [] []                 [] [] []    [] |
+     tar                | [] []       [] []  []                []       [] |
+     texinfo            |                []           []                   |
+     textutils          | []             []  [] []             []          |
+     tin                |    []          ()                                |
+     tp-robot           |             [] []  []                []          |
+     tuxpaint           |                    []                []          |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                []  []                            |
+     util-linux         | [] []       [] []                    [] []    [] |
+     vorbis-tools       | []             []                                |
+     wastesedge         |                ()                                |
+     wdiff              | [] []          []  [] []             [] []    [] |
+     wget               |    []       [] []  []             [] [] []    [] |
+     xchat              | []    []    [] []        []    []    []       [] |
+     xkeyboard-config   |             [] []                    []       [] |
+     xpad               | []                 []                []          |
+                        +--------------------------------------------------+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                          88 22 14  2 40 115 61 14  1  8  1  6 59 31  0 52
+
+                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+                        +-------------------------------------------------+
+     GNUnet             |                                                 |
+     a2ps               |    ()                      []          []    () |
+     aegis              |                                        ()       |
+     ant-phone          |                                        []       |
+     anubis             |                            []    []    []       |
+     ap-utils           |                            []                   |
+     aspell             |                         []             []       |
+     bash               |                                        []       |
+     batchelor          |                            []          []       |
+     bfd                |                                                 |
+     bibshelf           |                            []                   |
+     binutils           |                                                 |
+     bison              |                            []    []    []       |
+     bison-runtime      |                            []    []    []       |
+     bluez-pin          |       []                   []          []       |
+     cflow              |                                                 |
+     clisp              |                                        []       |
+     console-tools      |                                                 |
+     coreutils          |                                        []       |
+     cpio               |                                                 |
+     cpplib             |                                        []       |
+     cryptonit          |                                        []       |
+     darkstat           |                            []          []       |
+     dialog             |                            []          []       |
+     diffutils          | []                         []          []       |
+     doodle             |                                                 |
+     e2fsprogs          |                                        []       |
+     enscript           |                                        []       |
+     error              |                                        []       |
+     fetchmail          | []                                     []       |
+     fileutils          | []          []                                  |
+     findutils          |                                        []       |
+     flex               |    []                                  []       |
+     fslint             |                            []          []       |
+     gas                |                                                 |
+     gawk               | []                                     []       |
+     gbiff              |                                        []       |
+     gcal               |                                                 |
+     gcc                |                                                 |
+     gettext-examples   | []                                     []       |
+     gettext-runtime    | [] []                                  []       |
+     gettext-tools      | [] []                                           |
+     gimp-print         | []                                     []       |
+     gip                |                            []          []       |
+     gliv               |                                        []       |
+     glunarclock        |                            []          []       |
+     gmult              | []                         []                   |
+     gnubiff            |                                                 |
+     gnucash            | ()                               ()             |
+     gnucash-glossary   |                                        []       |
+     gnuedu             |                                                 |
+     gnulib             | [] []                      []          []       |
+     gnunet-gtk         |                                                 |
+     gnutls             |                                                 |
+     gpe-aerial         |                                        []       |
+     gpe-beam           |                                        []       |
+     gpe-calendar       | []                                              |
+     gpe-clock          | [] []                                  []       |
+     gpe-conf           |    []                                  []       |
+     gpe-contacts       |    []                                           |
+     gpe-edit           | [] []                                  []       |
+     gpe-filemanager    | [] []                                           |
+     gpe-go             | [] []                                  []       |
+     gpe-login          | [] []                                  []       |
+     gpe-ownerinfo      | []                                     []       |
+     gpe-package        | [] []                                           |
+     gpe-sketchbook     |    []                                  []       |
+     gpe-su             | [] []                                  []       |
+     gpe-taskmanager    | [] [] []                               []       |
+     gpe-timesheet      |                                        []       |
+     gpe-today          | []                                     []       |
+     gpe-todo           | []                                              |
+     gphoto2            | []                                     []       |
+     gprof              |                                                 |
+     gpsdrive           | ()                                     ()    () |
+     gramadoir          |                                        ()       |
+     grep               | []       []                      []    []       |
+     gretl              |                                                 |
+     gsasl              |                                        []       |
+     gss                |                                                 |
+     gst-plugins        |                                        []       |
+     gst-plugins-base   |                                                 |
+     gst-plugins-good   |                                        []       |
+     gstreamer          |                                        []       |
+     gtick              |                                                 |
+     gtkam              | []                                              |
+     gtkorphan          |                                        []       |
+     gtkspell           |                         []             []       |
+     gutenprint         |                                                 |
+     hello              | [] []                      []    []    [] []    |
+     id-utils           |                                        []       |
+     impost             |                                                 |
+     indent             | []                                     []       |
+     iso_3166           |                                        []       |
+     iso_3166_2         |                                        []       |
+     iso_4217           | []                      []             []       |
+     iso_639            | []                                     []       |
+     jpilot             | ()                                     ()    () |
+     jtag               |                                                 |
+     jwhois             |                                        []       |
+     kbd                |                                        []       |
+     keytouch           |                                        []       |
+     keytouch-editor    |                                                 |
+     keytouch-keyboa... |                                                 |
+     latrine            |                                        []       |
+     ld                 |                                                 |
+     leafpad            | []             []                               |
+     libc               | [] []                            []    []    [] |
+     libexif            |                                                 |
+     libextractor       |                                                 |
+     libgpewidget       |                                        []       |
+     libgpg-error       |                                                 |
+     libgphoto2         | []                                              |
+     libgphoto2_port    | []                                              |
+     libgsasl           |                                        []       |
+     libiconv           |                                                 |
+     libidn             | []                                     []       |
+     lifelines          |                                        []       |
+     lilypond           |                                                 |
+     lingoteach         |                                        []       |
+     lynx               | []                                     []       |
+     m4                 | []                                     []       |
+     mailutils          |                                                 |
+     make               | [] []                                  []       |
+     man-db             | ()                                              |
+     minicom            | []                                              |
+     mysecretdiary      |                                        []       |
+     nano               |                            []    []    []       |
+     nano_1_0           |                            []    []       []    |
+     opcodes            |                                        []       |
+     parted             | []                                     []       |
+     pilot-qof          |                                                 |
+     psmisc             | []                               []    []       |
+     pwdutils           |                                                 |
+     python             |                                                 |
+     qof                |                                                 |
+     radius             |                                                 |
+     recode             |                                        []       |
+     rpm                | [] []                                           |
+     screem             | []                                              |
+     scrollkeeper       |                                  [] [] [] []    |
+     sed                | []                                     []       |
+     sh-utils           | []                               []             |
+     shared-mime-info   |    []          []                []    [] []    |
+     sharutils          | []                                     []       |
+     shishi             |                                                 |
+     silky              |                                        []       |
+     skencil            |                                                 |
+     sketch             |                                                 |
+     solfege            |                                                 |
+     soundtracker       |                                                 |
+     sp                 | ()                                              |
+     stardict           |                      []                []       |
+     system-tools-ba... | [] []          []                      []       |
+     tar                | []       []                            []       |
+     texinfo            | []                               []    []       |
+     textutils          | [] []                            []             |
+     tin                |                                                 |
+     tp-robot           |                                        []       |
+     tuxpaint           |                                           []    |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux         | []                                     []       |
+     vorbis-tools       |                                        []       |
+     wastesedge         |                                        []       |
+     wdiff              |                            []    []             |
+     wget               | []                                     []       |
+     xchat              | [] []                []                []       |
+     xkeyboard-config   |                                        []       |
+     xpad               |    []                      []          []       |
+                        +-------------------------------------------------+
+                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+                          52 24  2  2  1  3  0  2  3 21  0 15  1 97  5  1
+
+                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                        +------------------------------------------------------+
+     GNUnet             |                                                      |
+     a2ps               |           ()     []      [] []       []    [] []     |
+     aegis              |                          () ()                       |
+     ant-phone          |                          []                   []     |
+     anubis             |           []             [] []                       |
+     ap-utils           |           ()                                         |
+     aspell             |                          [] []                       |
+     bash               |                  []      [] []                       |
+     batchelor          |                          []                   []     |
+     bfd                |                                                      |
+     bibshelf           |                                               []     |
+     binutils           |                             []                []     |
+     bison              |           []     []      [] []                []     |
+     bison-runtime      |           []             []          []       []     |
+     bluez-pin          |           []     []   [] [] []    [] []    [] []     |
+     cflow              |           []                                         |
+     clisp              |                             []                       |
+     console-tools      |                             []                       |
+     coreutils          |           []                []       []       []     |
+     cpio               |           []                []                []     |
+     cpplib             |                                               []     |
+     cryptonit          |                  []                           []     |
+     darkstat           |           []     []      []       []       [] []     |
+     dialog             |           [] []  []   [] [] [] []          [] []     |
+     diffutils          |           []     []      [] []             [] []     |
+     doodle             |                                         []    []     |
+     e2fsprogs          |           []                                  []     |
+     enscript           |                  []      [] []       []       []     |
+     error              |                  []      []       []          []     |
+     fetchmail          |           []                []          []           |
+     fileutils          |           []             [] []       []       []     |
+     findutils          |           [] []          []       [] []       []     |
+     flex               |           []     []      [] []                []     |
+     fslint             |                  []      []                [] []     |
+     gas                |                                                      |
+     gawk               |           []     []      []                   []     |
+     gbiff              |                          []                          |
+     gcal               |                                               []     |
+     gcc                |                                               []     |
+     gettext-examples   |           [] []          [] []    [] []    [] []     |
+     gettext-runtime    |           [] []          [] []    [] []    [] []     |
+     gettext-tools      |           []             [] []    [] []    [] []     |
+     gimp-print         |                                   []          []     |
+     gip                |                       []          []       [] []     |
+     gliv               |                  []      []       []          []     |
+     glunarclock        |                  []      [] []    []       [] []     |
+     gmult              |                       [] []                [] []     |
+     gnubiff            |                          ()                          |
+     gnucash            |           ()                                  []     |
+     gnucash-glossary   |              []                   []          []     |
+     gnuedu             |                                                      |
+     gnulib             |           []             [] []       []       []     |
+     gnunet-gtk         |                                               []     |
+     gnutls             |           []                                  []     |
+     gpe-aerial         |              []  []      [] []       []    [] []     |
+     gpe-beam           |              []  []      [] []       []    [] []     |
+     gpe-calendar       |                             []                       |
+     gpe-clock          |              []  []      [] []    [] []    [] []     |
+     gpe-conf           |              []  []      [] []    [] []       []     |
+     gpe-contacts       |                          [] []       []    [] []     |
+     gpe-edit           |              []  []      [] []    [] []    [] []     |
+     gpe-filemanager    |                                      []       []     |
+     gpe-go             |                  []      [] []       []    [] []     |
+     gpe-login          |              []  []      [] []    [] []    [] []     |
+     gpe-ownerinfo      |              []  []      [] []    [] []    [] []     |
+     gpe-package        |                                      []       []     |
+     gpe-sketchbook     |              []  []      [] []    [] []    [] []     |
+     gpe-su             |              []  []      [] []    [] []    [] []     |
+     gpe-taskmanager    |              []  []      [] []    [] []    [] []     |
+     gpe-timesheet      |              []  []      [] []    [] []    [] []     |
+     gpe-today          |              []  []      [] []    [] []    [] []     |
+     gpe-todo           |                             []       []    [] []     |
+     gphoto2            |           []             []       []       [] []     |
+     gprof              |                  []      []                   []     |
+     gpsdrive           |        []                []                   []     |
+     gramadoir          |                                   []          []     |
+     grep               |           [] []  []      [] []       []    [] []     |
+     gretl              |           []                                         |
+     gsasl              |           []                               [] []     |
+     gss                |           []             []                   []     |
+     gst-plugins        |     []                                  [] [] []     |
+     gst-plugins-base   |                                               []     |
+     gst-plugins-good   |     []                                  [] [] []     |
+     gstreamer          |                                         [] [] []     |
+     gtick              |                             []                       |
+     gtkam              |           []     []         []                []     |
+     gtkorphan          |                                               []     |
+     gtkspell           |                  []   [] [] []    [] []    [] []     |
+     gutenprint         |                                               []     |
+     hello              |           []     []      [] []    [] []    [] []     |
+     id-utils           |                  []      [] []                []     |
+     impost             |                                               []     |
+     indent             |                  []      [] []    []       [] []     |
+     iso_3166           |              []                []    [] [] [] []     |
+     iso_3166_2         |                                                      |
+     iso_4217           |                                []    []    [] []     |
+     iso_639            |                                []    []    [] []     |
+     jpilot             |                                                      |
+     jtag               |                                   []                 |
+     jwhois             |           []     []      []                   []     |
+     kbd                |           []             []                   []     |
+     keytouch           |                                               []     |
+     keytouch-editor    |                                               []     |
+     keytouch-keyboa... |                                               []     |
+     latrine            |                          []                   []     |
+     ld                 |                                               []     |
+     leafpad            |           [] []             []    []          []  [] |
+     libc               |           []     []         []    []          []     |
+     libexif            |           []                                         |
+     libextractor       |                          []                   []     |
+     libgpewidget       |              []  []      []       [] []    [] []     |
+     libgpg-error       |           []             []                          |
+     libgphoto2         |           []                                         |
+     libgphoto2_port    |           []                []                []     |
+     libgsasl           |           []             []                [] []     |
+     libiconv           |                                      []    []        |
+     libidn             |           []                               [] ()     |
+     lifelines          |           []                                  []     |
+     lilypond           |                                                      |
+     lingoteach         |                  []                                  |
+     lynx               |                  []         []                []     |
+     m4                 |           []     []      [] []                []     |
+     mailutils          |           []             [] []                []     |
+     make               |           []     []         []                []     |
+     man-db             |                          []                   []     |
+     minicom            |           []     []      [] []                []     |
+     mysecretdiary      |                  []      [] []                []     |
+     nano               |                  []      []                   []     |
+     nano_1_0           |           []             [] []                []     |
+     opcodes            |                          []                   []     |
+     parted             |           []                                         |
+     pilot-qof          |                                               []     |
+     psmisc             |           []                                  []     |
+     pwdutils           |           []                                  []     |
+     python             |                                                      |
+     qof                |                  []                           []     |
+     radius             |           []                []                       |
+     recode             |           [] []  []      [] []       []       []     |
+     rpm                |           [] []             []                []     |
+     screem             |                                                      |
+     scrollkeeper       |           []             [] []    []    [] [] []     |
+     sed                |           [] []  []      [] []    [] []    [] []     |
+     sh-utils           |                             []       []    []        |
+     shared-mime-info   |              []  []                     [] [] []     |
+     sharutils          |           []                []             [] []     |
+     shishi             |           []                                         |
+     silky              |                                   []                 |
+     skencil            |              []  []                           []     |
+     sketch             |              []  []                           []     |
+     solfege            |                                               []     |
+     soundtracker       |                                   []          []     |
+     sp                 |                                                      |
+     stardict           |                             []    []          []     |
+     system-tools-ba... |        [] [] []  []      []             [] [] []  [] |
+     tar                |           []             [] []       []       []     |
+     texinfo            |           []             [] []                []     |
+     textutils          |                             []       []       []     |
+     tin                |                             ()                       |
+     tp-robot           |                             []                       |
+     tuxpaint           |              []                      [] [] [] []     |
+     unicode-han-tra... |                                                      |
+     unicode-transla... |                                                      |
+     util-linux         |                  []         []       []       []     |
+     vorbis-tools       |                          [] []                       |
+     wastesedge         |                                                      |
+     wdiff              |           []     []      [] []    []          []     |
+     wget               |              []             []    []          []     |
+     xchat              |        []                   []    [] [] [] [] []     |
+     xkeyboard-config   |                                      []       []     |
+     xpad               |                                   [] []       []     |
+                        +------------------------------------------------------+
+                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                           0   2  3 58 30  54    5 73 72  4 40 46 11 50 128  2
+
+                          tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+                        +---------------------------------------------------+
+     GNUnet             |                    []                             |  2
+     a2ps               |          [] []     []                             | 19
+     aegis              |                                                   |  0
+     ant-phone          |          []        []                             |  6
+     anubis             |          [] []     []                             | 11
+     ap-utils           |             ()     []                             |  4
+     aspell             |             []     []  []                         | 15
+     bash               |                    []                             | 11
+     batchelor          |          []        []                             |  9
+     bfd                |                                                   |  1
+     bibshelf           |                    []                             |  7
+     binutils           |          []        []                     []      |  9
+     bison              |          []        []                     []      | 19
+     bison-runtime      |                    []         []          []      | 15
+     bluez-pin          |          [] []     []  []     []          []      | 28
+     cflow              |             []     []                             |  5
+     clisp              |                                                   |  6
+     console-tools      |          []        []                             |  5
+     coreutils          |          []        []                             | 16
+     cpio               |          [] []     []                             |  9
+     cpplib             |          []        []         []          []      | 11
+     cryptonit          |                                                   |  5
+     darkstat           |                    []         ()          ()      | 15
+     dialog             |          [] []     []         []          []      | 30
+     diffutils          |          []        []         []          []      | 28
+     doodle             |                    []                             |  6
+     e2fsprogs          |          []        []                             | 10
+     enscript           |          [] []     []                             | 16
+     error              |          []        []         []          []      | 18
+     fetchmail          |          []        []                             | 12
+     fileutils          |          []                   []          []      | 18
+     findutils          |          []        []                     []      | 17
+     flex               |          []        []                             | 15
+     fslint             |                    []                             |  9
+     gas                |          []                                       |  3
+     gawk               |          []        []                             | 15
+     gbiff              |                    []                             |  5
+     gcal               |          []                                       |  5
+     gcc                |          []                   []          []      |  6
+     gettext-examples   |          [] []     []         []    []    []      | 27
+     gettext-runtime    |          [] []     []         []    []    []      | 28
+     gettext-tools      |          [] []     []         []          []      | 19
+     gimp-print         |             []     []                             | 12
+     gip                |                    []                     []      | 12
+     gliv               |          []        []                             |  8
+     glunarclock        |                    []  []                 []      | 15
+     gmult              |          []        []         []          []      | 15
+     gnubiff            |                    []                             |  1
+     gnucash            |          ()                                       |  2
+     gnucash-glossary   |                    []                     []      |  9
+     gnuedu             |                    []                             |  2
+     gnulib             |          [] []     []         []          []      | 28
+     gnunet-gtk         |                                                   |  1
+     gnutls             |                                                   |  2
+     gpe-aerial         |                    []         []                  | 14
+     gpe-beam           |                    []         []                  | 14
+     gpe-calendar       |                    []                             |  3
+     gpe-clock          |          []        []  []     []                  | 21
+     gpe-conf           |                    []         []                  | 14
+     gpe-contacts       |                    []         []                  | 10
+     gpe-edit           |          []        []  []                 []      | 20
+     gpe-filemanager    |                    []                             |  6
+     gpe-go             |          []        []                             | 15
+     gpe-login          |          []        []  []     []          []      | 21
+     gpe-ownerinfo      |          []        []         []          []      | 21
+     gpe-package        |                    []                             |  6
+     gpe-sketchbook     |          []        []                             | 16
+     gpe-su             |          []        []         []                  | 20
+     gpe-taskmanager    |          []        []         []                  | 20
+     gpe-timesheet      |          []        []         []          []      | 18
+     gpe-today          |          []        []  []     []          []      | 21
+     gpe-todo           |                    []                             |  7
+     gphoto2            |             []     []         []          []      | 20
+     gprof              |          []        []                             | 11
+     gpsdrive           |                                                   |  4
+     gramadoir          |                    []                             |  7
+     grep               |          [] []     []                     []      | 34
+     gretl              |                                                   |  4
+     gsasl              |                    []         []                  |  8
+     gss                |                    []                             |  5
+     gst-plugins        |             []     []                     []      | 15
+     gst-plugins-base   |             []     []         []                  |  9
+     gst-plugins-good   |             []     []         []    []    []      | 20
+     gstreamer          |          [] []     []                             | 17
+     gtick              |                    []                             |  3
+     gtkam              |                    []                             | 13
+     gtkorphan          |                    []                             |  7
+     gtkspell           |             []     []  []     []    []    []      | 26
+     gutenprint         |                                                   |  3
+     hello              |          [] []     []         []          []      | 37
+     id-utils           |          []        []                             | 14
+     impost             |                    []                             |  4
+     indent             |          []        []         []          []      | 25
+     iso_3166           |       [] []        []               []            | 16
+     iso_3166_2         |                                                   |  2
+     iso_4217           |          []        []                             | 14
+     iso_639            |                    []                             | 14
+     jpilot             |          [] []     []         []                  |  7
+     jtag               |                    []                             |  3
+     jwhois             |          []        []                     []      | 13
+     kbd                |          []        []                             | 12
+     keytouch           |                    []                             |  4
+     keytouch-editor    |                                                   |  2
+     keytouch-keyboa... |                    []                             |  3
+     latrine            |          []        []                             |  8
+     ld                 |          []        []         []          []      |  8
+     leafpad            |          []        []         []          []      | 23
+     libc               |          []                   []          []      | 23
+     libexif            |                    []                             |  4
+     libextractor       |                    []                             |  5
+     libgpewidget       |                    []  []     []                  | 19
+     libgpg-error       |                    []                             |  4
+     libgphoto2         |             []                                    |  8
+     libgphoto2_port    |             []     []                     []      | 11
+     libgsasl           |                    []                             |  8
+     libiconv           |                    []                             |  7
+     libidn             |                    []         []                  | 10
+     lifelines          |                                                   |  4
+     lilypond           |                                                   |  2
+     lingoteach         |                    []                             |  6
+     lynx               |          [] []     []                             | 15
+     m4                 |                    []         []          []      | 18
+     mailutils          |             []                                    |  8
+     make               |          []        []         []                  | 20
+     man-db             |                    []                             |  6
+     minicom            |                    []                             | 14
+     mysecretdiary      |          []        []                             | 12
+     nano               |                    []                     []      | 17
+     nano_1_0           |          [] []     []                             | 18
+     opcodes            |          []        []                             | 10
+     parted             |          [] []                            []      | 10
+     pilot-qof          |                    []                             |  3
+     psmisc             |                    []                             | 10
+     pwdutils           |                    []                             |  3
+     python             |                                                   |  0
+     qof                |                    []                             |  4
+     radius             |             []                                    |  6
+     recode             |          []        []         []                  | 25
+     rpm                |          [] []     []                     []      | 14
+     screem             |                    []                             |  2
+     scrollkeeper       |          [] []     []                     []      | 26
+     sed                |          []        []                     []      | 22
+     sh-utils           |          []                                       | 15
+     shared-mime-info   |             []     []         []          []      | 24
+     sharutils          |          []        []                     []      | 23
+     shishi             |                                                   |  1
+     silky              |                    []                             |  4
+     skencil            |                    []                             |  7
+     sketch             |                                                   |  6
+     solfege            |                                                   |  2
+     soundtracker       |          []        []                             |  9
+     sp                 |          []                                       |  3
+     stardict           |             []     []         []          []      | 11
+     system-tools-ba... |    []    [] []     []     []  []          []      | 37
+     tar                |          [] []     []                     []      | 20
+     texinfo            |          []        []         []                  | 15
+     textutils          |          []                   []          []      | 17
+     tin                |                                                   |  1
+     tp-robot           |                    []         []          []      | 10
+     tuxpaint           |                    []  []                 []      | 16
+     unicode-han-tra... |                                                   |  0
+     unicode-transla... |                                                   |  2
+     util-linux         |          [] []     []                             | 20
+     vorbis-tools       |             []     []                             | 11
+     wastesedge         |                                                   |  1
+     wdiff              |          []        []                             | 22
+     wget               |          []        []                     []      | 19
+     xchat              |             []     []         []          []      | 29
+     xkeyboard-config   |          [] []     []                     []      | 11
+     xpad               |                    []         []          []      | 14
+                        +---------------------------------------------------+
+       77 teams           tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+      170 domains          0  1  1 77 39  0  136 10  1  48     5    54    0  2028
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If October 2006 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`translation at iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..d31dfd6
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,73 @@
+The TiEmu project is managed by the TiEmu team.
+The TiEmu team includes the following people:
+
+!!! For problems, questions, ... use the TiEmu mailing list:
+<gtktiemu-users at lists.sf.net>. Don't mail authors directly !!!
+
+Romain Lievin (roms): main developer, Win32 port
+================================================
+
+web: http://lpg.ticalc.org
+mail: roms at lievin.net
+
+
+Julien Blache (jb): GTK2 upgrade of TiEmu-I
+===========================================
+
+web: http://jblache.org
+mail: jb at jblache.org
+
+
+Kevin Kofler (kkofler): gdb integration, fixed and patches
+==========================================================
+
+web: http://tigcc.ticalc.org
+mail: Kevin at tigcc.ticalc.org
+
+
+Christian Walther (cw): Mac OS-X port
+=====================================
+
+web: ??
+mail: cwalther at gmx.ch
+
+
+Jaime Fernando Meza Meza (jf): icon & skin design
+=================================================
+
+web: ?
+mail: jaimezacalcs at yahoo.com
+
+
+Packagers:
+==========
+
+- Julien Blache <jb at jblache.org>: Linux/Debian
+- Romain Lievin <roms at lievin.net>: Win32
+- Kevin Kofler <Kevin at tigcc.ticalc.org>: Linux/Fedora ?
+
+
+All the others who have contributed to
+======================================
+
+Some contributions have been brought about this software by people:
+- code: Kevin Kofler
+- help: Olivier Armand and Lionel Debroux
+- pedrom: Patrick Pelissier
+- logo: hibou (real name ?)
+
+
+*------------ Previous releases ----------------*
+
+Roms aka Romain Lievin
+web: http://www.lievin.net
+mail: roms at lievin.net
+
+Tom aka Thomas Corvazier
+web: http://lpg.ticalc.org/prj_tiemu
+mail: corvazier at yahoo.com
+
+The libti68k library is based on the Jonas Minnberg's emulator 
+named (X)Tiger. He has recently released its emulator under GPL licence.
+
+See the LICENSES file for more informations.
\ No newline at end of file
diff --git a/BUGS b/BUGS
new file mode 100644
index 0000000..cb8b862
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,65 @@
+List of known bugs to fix:
+
+
+SF.net's bug list
+=================
+
+2489443 	Screen Elements Ignored by TiEmu
+1891657 	TiEmu can't find glib-2.0-0.dll from Glib 2.14.3
+1649068  	Keyboard layout under Linux
+1569553  	pc-TiEmu link
+1555602 	Missed key presses w/ TabletPC Stylus
+1305067 	"busy" flickers
+1249087 	Key mapping failed
+
+
+Kevin
+=====
+
+*  Il y a un bogue avec le d�bogueur et les touches: prends un AMS 2.0x ou 3.0x, mets 
+un breakpoint sur le trap #11, lance un programme ASM (m�me Exec "4e750000" suffit), 
+quitte le d�bogueur, appuie sur n'importe quelle touche, il r�agit comme si c'�tait ENTER. 
+Seulement apr�s avoir d�sactiv� le BP sur le trap 11 et appuy� sur ENTER une autre fois, 
+TiEmu reprend son comportement normal.
+Ce probl�me est apparemment caus�e par le fait qu'une touche (ENTER) est appuy�e au moment 
+o� on entre dans le d�bogueur. (Le BP sur le trap 11 s'active au moment o� ENTER est encore 
+appuy�.)
+
+* transferts lents
+
+
+Lionel
+======
+
+* Un bug bizarre, dont les instructions de
+reproduction semblent �tre:
+        * utiliser un AMS "r�cent" (2.07+), sur une 92+ ou
+V200 (peut-�tre 89 aussi ?).
+        * aller dans la fen�tre de debug, partie s�lection
+des ROM_CALLs, s�lectionner l'un d'entre eux
+(_bcd_math par exemple).
+        * passer � un AMS 2.05 (test�: ROM dump de 89 avec
+certificate).
+        * aller dans la fen�tre de debug: TIEmu est parti
+dans le d�cor, je ne sais pas s'il ex�cute ou pas
+
+
+roms
+====
+
+* MOVEA.W dis-assembled as MOVEA.L (HeapDeref)
+
+* pressing Ctrl+Alt+Supp makes emu unresponsive. Press Ctrl again.
+
+* CPU consumption may be high
+
+folco
+=====
+
+* debugger crash when double-clicking stack value (http://yaronet.com/posts.php?s=115405)
+
+
+-------------
++ done
+- in progress
+* to do...
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..514d6c7
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          59 Temple Place - Suite 330, Boston, MA 02111 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
+

+	Appendix: How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..35dfbb2
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,1261 @@
+SubVersion: $Id: ChangeLog 2842 2009-05-29 14:04:35Z roms $
+
+- 12/02/2008, version 3.03:
+	- [kevin] $2765: fixed crash when debugging TIGCC program with GDB with low-level debugger in dock mode
+	- [kevin] $2766: fixed dock window enabling/disabling not to keep the engine running across the restart
+	- [roms]  $2768: fixed InnoSetup installer for use with GTK>=2.10.x
+	- [roms]  $2771: don't allow deleting of last RAM tab to avoid resizing of code/dock window
+	- [kevin] $2773: fixed build with GCC 4.3
+	- [roms]  $2781: don't shutdown screen when reading battery status (lionel)
+	- [roms]  $2782: don't resize code windows whenever cycle counter change
+	- [roms]  $2783: fixed disassembling of some FLINE instructions like 0xf800 (lionel)
+	- [roms]  $2784: fixed disassembling of BTST instruction (replaced by BRA)
+	- [kevin] $2793: fixed keynames.c build on OS X
+	- [kevin] $2794: link with g++ if --with-kde (fixes --with-kde build on OS X)
+	- [kevin] $2797: fixed use of wrong free function (g_free where gtk_tree_path_free is required) causing crash with GTK+ 2.14
+	- [kevin] $2798: fixed builtin Tk not working when built against the latest X.Org X11 (Tk bug 2010422)
+	- [roms]  $2815: merged Lionel's patch about link logging: adding CR/LF every 16 chars; take into account buffer overflow
+	- [roms]  $2816: really clears link logging buffer when clicking the 'Clear' button
+	- [roms]  $2820: removed obsolete virtual link cable
+	- [roms]  $2821: merged Lionel's patch: allow mix-up of images created by TiEmu 32-bits and TiEmu 64-bits 
+		due to a bug in IMG_INFO structure
+	- [roms]  $2824: fixed Lionel's logging problem (missing values on linkport output due to a bad use of External Activity flag
+		in linkport support)
+	- [roms]  $2826: added i18n support to some strings
+	- [roms]  $2827: fixed "libticables2 access violation" which appears when changing the link cable under some circumstances; due to
+		random access on uninitialized dbus function pointers
+	- [roms]  $2829: allow automatic changing of link cable setting when requesting a direct file transfer
+	- [roms]  $2832: don't allow launching of debugger if preloading has not finished yet
+	- [kevin] $2833: fix the "Default" button when importing a Titanium 89u (default to HW3 until we sort out HW4's actual speed, not HW2)
+	- [roms]  $2836: upgraded deprecated GTK+ code
+	- [roms]  $2838: if link cable reconfiguring fails, fallback to null cable & port
+	- [roms]  $2839: merged Lionel's patch: fix buffer overflow in the disasm routine
+
+- 16/09/2007, version 3.02:
+	- [roms]  $2646: screenshots can be copied into the clipboard
+	- [roms]  $2649: use fixed fonts for release and manpage dboxes
+	- [roms]  $2652: removed old GTK file selector because being deprecated with GTK+ 2.12
+	- [roms]  $2653: added accelerator key: F6 in code window
+	- [roms]  $2654: added accelerator key: +/- in memory window
+	- [kevin] $2656: fixed dirname+filename concatenation for KDE file selector
+	- [kevin] $2657: fixed build with GTK+ 2.12
+	- [roms]  $2658: dual-click in register window select the whole register value now;
+		re-enabled popup menu (go to address).
+	- [roms]  $2659: mapped both CTRL keys to Diamond & both SHIFT keys to 2nd
+	- [roms]  $2660: added a popup menu with "View _memory" on any debugger window
+	- [roms]  $2661: unified displaying of hexadecimal values (removed '$' and ''0x' heading chars) in boxes
+	- [roms]  $2662: suppress leading zeros like VTi does
+	- [roms]  $2663: some instructions (trap, rts, reset...) was suffixed with .L which is not needed
+	- [roms]  $2664: fixed wrong disassembly offset of MOVEM.L instruction
+	- [roms]  $2665: fixed disassembly of MOVEP instruction
+	- [roms]  $2666: fixed disassembly of MOVEQ instruction
+	- [roms]  $2667: fixed disassembly of ori/andi/eori, addi/subi/cmpi, lea/rts instructions
+	- [roms]  $2668: fixed disassembly of BT<tab>.W and changed BT into BRA
+	- [roms]  $2669: added accelerator keys (F1..F8) in memory window
+	- [roms]  $2670: map numerical ENTER key to TIKEY_ENTER on ti89, too
+	- [roms]  $2672: moved UAE disassembler into disasm.c file
+	- [roms]  $2673: unified displaying of hexadecimal values in the disassembler('$', '[' and '==' heading chars);
+		displayed offset as signed values
+	- [roms]  $2674: display "($42,a3),a3" instead of "(a3,$42),a3)" in disassembler
+	- [roms]  $2675: reject computed value [%lX] at end of line rather than in the middle of the instruction
+	- [roms]  $2676: in the bkpts window, the fifth toolbar button (go to address) is not restricted to code
+		breakpoint any longer; it works on any breakpoint type.
+	- [roms]  $2678: replaced currently selected instruction in code windows by an icon (arrow)
+	- [roms]  $2679: reverted back rev. $2672 (disasm => UAE) and rev. $2668 (BRA => BT)
+	- [roms]  $2680: allow to change the font used in every debugger windows
+	- [roms]  $2681: fixed disassembly of ori/andi/eori, addi/subi/cmpi, moveq/addq/subq instructions in the UAE engine itself
+	- [roms]  $2682: optimized m68k-disasm front-end
+	- [roms]  $2683: fixed "movem.l #$unreadable_mask"
+	- [kevin] $2685: fixed makeinfo version check in GDB
+	- [kevin] $2686: fixed longjmp out of gtk_main in the engine in the GDB-enabled version which triggered an assert with GLib 2.14
+	- [kevin] $2689: fixed relocation of debugging information for kernel-based programs
+	- [roms]  $2704-2710: added debugging dock and option to choose between multi-window and dock
+	- [roms]  $2712: fixed one-shot breakpoints which was not displayed any longer
+	- [roms]  $2713: fixed old bug: the bkpt context displayed in the status bar is not erased when the debugger exits
+	- [roms]  $2718: fixed bug: one-shot breakpoint was never raised
+	- [roms]  $2719: fixed bug: gtk warning when opening popup menu while being in debugger
+	- [kevin] $2721: don't show Insight's GDB console by default
+	- [roms]  $2722: decreased vertical space between cells to make window more compact
+	- [roms]  $2724: fixed keeping of previous folder with the multiple file selector (e.g. Send File)
+	- [roms]  $2728: removed ugly hack(s) in the code window (no V scrollbar any longer but shrinking allowed now)
+	- [roms]  $2729: fixed calculator window aspect ratio when used with no skin
+	- [roms]  $2730: fixed reloading of aspect ratio from tiemu.ini file
+	- [roms]  $2731: removed annoying tooltip in the calculator window
+	- [kevin] $2733: fixed pclog_ptr handling not to overflow (fixes buffer underflow crashing TiEmu during long sessions)
+	- [roms]  $2734: memory window uses courier font when no font is selected (restored previous behaviour)
+	- [roms]  $2735: commit font change to all of the debugger windows
+	- [roms]  $2737: added accelerator keys to toggle sr flags in the regs window
+	- [roms]  $2738: register window uses courier font when no font is selected (restored previous behaviour)
+	- [roms]  $2744: (try and) fix bug about management of AI3 on HW2 under TiEmu
+	- [kevin] $2750: made the "Clear RAM?" dialog box for "Reset calc" more intuitive
+	- [kevin] $2753: added support for the alternate (KDE/M$) button order
+		=> released on 10/01/2008
+	
+- 07/09/2007, version 3.01b:
+  - re-released due to missing USB drivers (libusb0.dll)
+  				=> released on 07/09/2007
+
+- 03/09/2007, version 3.01a:
+	- re-released due to missing file in Windows Installer (dhahelper.sys)
+	- includes latest ticables2 library with USB polling support
+	- [kevin] $2642: fixed bit toggling in register window
+	        => released on 04/09/2007
+	
+- 20/06/2007, version 3.01:
+	$2556: Merged changes from tiemu-3-sound branch:
+	- [hypersonic] $2509-2513: implemented low-level SDL code for sound emulation
+	- [kevin] $2515: added configure checks for SDL and --disable-sound configure option
+	- [kevin] $2520: added "Emulate sound" checkbox to the popup menu
+	- [kevin] $2527: cleaned up time handling (using gettimeofday everywhere, Win32 implementation taken from kdewin32,
+	                 not incorrectly attempting to measure wall clock time with clock() anymore)
+	- [kevin] $2531: filter out yet another junk parameter (LIBS=...) passed to subdir configure from yet another autoconf
+	                 version upgrade (2.61) (fixes MinGW build with regenerated configure)
+	- [kevin] $2537: implemented sound emulation in the CPU emulation loop
+	- [kevin] $2538: only define _GNU_SOURCE in src/core/uae/sysdeps.h if not already defined
+	Note: trunk forked into tiemu-3-sound branch at rev. $2507
+	- [roms]  $2571: changed some function names (sound emulation) to follow TiEmu function naming scheme
+	- [roms]  $2572: changed one function in dbus.c to follow ticonv API changes. Major number requirements updated consequently.
+	- [roms]  $2591: speed-up displaying of code window by populating ROM calls early
+	- [kevin] $2596: fixed coordinate saving for Win32 multi-monitor case
+	- [kevin] $2598: fixed KDE path detection for multilib systems with both 32-bit and 64-bit libraries installed
+	- [roms]  $2600: clear _all_ bkpts in ti68k_bkpt_clear_all
+	- [roms]  $2601: added support for breakpoints on bit changes
+	- [roms]  $2602: data/bit change breakpoint is raised after instruction execution so fixed disassembly window 
+		to show one line before current PC.
+	- [roms]  $2603: fixed wrong disassembly offset of MOVEM.W instruction
+	- [roms]  $2604: optimized some refreshing parts of debugging windows; added refresh of heap window
+	- [roms]  $2611: optimized displaying of code window by refreshing ROM calls just once
+	- [kevin] $2620: made zlib non-optional now that libtifiles2 requires it anyway
+	- [roms]  $2624: allow double-clicking of a ROM instead of selecting + pressing OK button
+	- [kevin] $2629: fixed GDB build with the upcoming glibc 2.7 (patch from Fedora GDB by Jan Kratochvil)
+	- [roms]  $2630: added ability to send file from command line
+		=> released on 29/08/2007
+
+- 16/03/2007, version 3.00
+	- [kevin] $2389: don't use \n in the breakpoint window status bar
+	- [kevin] $2390: fixed default hardware version for Voyage 200
+	- [roms]  $2409: added KDE desktop files & associations
+	- [roms]  $2415: allow to load saved states by DnD
+	- [roms]  $2417: allow to directly load ROM/TIB/SAV files from command line; maintained compatibility with older switches
+	- [roms]  $2420: fixed bug introduced in $2417
+	- [roms]  $2421: fixed double-free when DnD files to send
+	- [kevin] $2422: fixed errors (wrong case) in ROM_CALL list and added 2 new entries from TIGCC
+	- [kevin] $2424: don't disassemble instructions invalid for the 68000
+	- [kevin] $2425: fixed handling of 4-byte F-Line jumps
+	- [roms]  $2431: added memory map menu to the memory window
+	- [roms]  $2434: added key press recording/playing
+	- [roms]  $2440: fixed bug in the Infos box: display skin version according to SkinInfos structure
+	- [kevin] $2451: fixed aliasing violations in Win32 file dialog code
+	- [kevin] $2456: detect *-apple-darwin* as OS X, not just powerpc-apple-darwin*
+	- [kevin] $2457: fixed --disable-gdb builds failing due to missing intl/Makefile
+	- [kevin] $2459: fixed Win32 file dialogs not setting fname to NULL when returning NULL
+	- [kevin] $2462: filter -s from CFLAGS/CXXFLAGS/LDFLAGS on Darwin
+	- [kevin] $2485: OLE Automation: set ret to NULL if IUnknown::QueryInterface fails
+		=> released on 14/05/2007
+
+- 09/02/2007, version 2.81e
+	- [kevin] $2348: delete the temporary file instead of erroring if the user cancels the receive file dialog
+	- [kevin] $2349: fixed progress bar refresh referencing freed memory (#1529247)
+	- [roms]  $2350: send a group file as group, not as backup (bug #1529247)
+	- [kevin] $2356: imported Insight 6.6 and merged TiEmu changes
+	- [kevin] $2360: regenerated oleaut_i.c with WIDL again, this time fixing the include directives so it actually
+	                 compiles
+	- [roms]  $2363: added and enabled i18n support
+	- [roms]  $2368: replaced unused/deprecated printl system by GLib logging functions (part 1/2)
+	- [roms]  $2372: replaced any occurence of printl by a tiemu_warning() call (part 2/2)
+		=> released on 13/03/2007
+
+- 11/12/2006, version 2.81d
+	- [roms]  $2321: store *.sav files in the images folder rather than polluting the application top folder
+	- [roms]  $2322: updated to use API changes of tifiles2 v1.0.3 
+	- [kevin] $2335: fixed the Tcl/Tk code in Insight so it can be debugged with the TclPro debugger
+	- [kevin] $2337: add xdg-open in front of the list of browsers
+
+- 07/08/2006, version 2.81c
+	- [kevin] $2202: fixed g_free of invalid pointers in state.c (#1471709)
+	- [kevin] $2203: fixed ticalcs_cable_detach of NULL calc_handle when exiting TiEmu early (reported by hypersonic)
+	- [kevin] $2211: imported Insight 6.5 and intl directory from Binutils 2.17 and merged TiEmu changes
+	                 quote file name for add_symbol_file properly for the new add_symbol_file command parser in GDB 6.5
+	- [roms]  $2216: replaced some hand-made GTK+ user boxes by standard GTK+ ones (look better)
+	- [kevin] $2219: regenerated oleaut_i.c with WIDL now that this is supported
+	- [kevin] $2223: force serial make in src/Makefile.in because the weirdness of the gdb subdir make breaks parallel make
+	- [roms]  $2224: reverted back OLE changes in oleaut_i.c: break MSVC compilation
+	- [roms]  $2225: fixed signed/unsigned warnings with MSVC
+	- [kevin] $2231: fixed get_folder_list_handle failing
+	- [kevin] $2232: fixed canceling KDE file dialog causing an "invalid file" error
+	- [roms]  $2233: new feature: 'Link Log' dialog box (part 1/3)
+	- [roms]  $2234: factorized code: PC logging has been moved from Ti68kBreakpoints structure 
+		to Ti68kLogging one. Please note this doesn't affect the SAV_REVISION flag (part 2/3).
+	- [roms]  $2235: fill dialog box with log and save to file(part 3/3)
+	- [roms]  $2236: improved link logger (print data blocks rather than single bytes)
+	- [kevin] $2243: created a D-Bus interface
+	- [kevin] $2245: register a service name for the D-Bus interface
+	- [kevin] $2246: don't check for unneeded aRts and KDE documentation generation executables (request from Gentoo #112985)
+	- [kevin] $2250: don't call CoInitialize and CoUninitialize in oleaut.cpp, GTK+ already does this (to use input methods)
+	- [kevin] $2251: reverted changes to support 8 MB FlashROM, as HW4 actually only has 4 MB
+	- [roms]  $2254: display handle id as hex and dec (O. Armand feature request)
+	- [tyler] $2256: fixed title in the Image Creation Wizard (was titled TiEmu II, actually TiEmu 3)
+	- [kevin] $2257: reenabled OLE interface (tested by Tyler) (NOTE: does NOT work in WINE)
+	- [kevin] $2262: don't crash when attempting to load 8 MB images from old TiEmu
+	- [kevin] $2264: use kde-config to locate KDE instead of hardcoded directories which were missing /usr/lib64
+	- [kevin] $2265: fix --enable-shared-itcl so the shared libitcl and libitk are built with -fPIC
+	- [kevin] $2269: remove special-casing of __MACOSX__ from some include paths which shouldn't be needed
+	- [kevin] $2270: fixed memory leaks in config file handling
+	- [kevin] $2271: fixed about dialog not closing when Close is clicked with GTK+ 2.10
+	- [kevin] $2274: don't proceed to ROM image wizard step 3 if importing the image failed
+	- [roms]  $2276: GDK_WINDOW_TYPE_HINT_ was set to NORMAL instead of DIALOG. Very annoying because this makes the window appears in the top of all others.
+	- [roms]  $2278: fixed window resizing which was disabled (but note that Windows resizing is an ugly hack because
+			gtk_window_set_hints does not work properly under Windows).
+	- [roms]  $2280: set 'Debug file with TiEmu' unsensitive when build in no-gdb mode
+	- [roms]  $2282: added 'quick send' feature in -gdb version. This allows to by-pass the file selection box.
+	- [roms]  $2298: fixed memory leak in scroptions (folder name was not freed)
+	- [roms]  $2299: make 'quick send' options persistent
+	- [roms]  $2300: make 'quick send' feature available in both versions. Popup menu reworked.
+	- [roms]  $2303: output a message about OLE (un)registration
+	- [roms]  $2308: added DnD support for changing skin, sending files and importing images
+		=> Released on 08/12/2006
+
+- 07/07/2006, version 2.81b
+	- [kevin] $2128: HW4 has 8 MB of FlashROM
+	- [kevin] $2130: complete HW4 images to 8 MB
+	- [kevin] $2136: fixed NULL dereference in filesel.c
+	- [roms]  $2140: added TiGroup file support (in sending only)
+	- [roms]  $2142: fixed wrong timeout value (2 variables, 1 (mis-)used)
+	- [roms]  $2143: clean-up and overhaul in the progress bars
+	- [roms]  $2144: updated to rely on ticalcs2 progress bars data-base
+	- [roms]  $2146: fixed updating of third pbar counter. Fixed use of ticalcs2 pbar database.
+	- [kevin] $2147: don't crash DCOP client program when running reset_calc through DCOP with the debugger running
+	- [kevin] $2153: fixed warnings in TiEmu patches to GDB
+	- [kevin] $2154: fixed warnings, fixed UAE to detect 64-bit integer types under glibc, fixed is_varname
+	- [kevin] $2155: fixed warnings in the assembly-level debugger
+	- [kevin] $2156: fixed more warnings and a few file descriptor leaks
+	- [kevin] $2159: fixed "TIGCC" and "ticalc.org" bookmarks to use the respective official spelling
+	- [kevin] $2162: only run Qt event hook (processing GTK+ events) when currently displaying a modal dialog
+	                 (fixes DCOP hang after reset_calc with debugger running, due to the infinite loop protection)
+	- [kevin] $2162: disable "Debug file with TiEmu" when the debugger is running
+	- [kevin] $2162: added Seamonkey to the browser list, suggest Firefox instead of the obsolete Mozilla Suite
+	- [kevin] $2163: clear command line in execute_command
+	- [kevin] $2164: changed DCOP/OLE ready_for_transfers to really check if the emulated calculator is ready
+	- [kevin] $2166: fixed FlashROM identifiers so the HW4 8 MB FlashROM gets detected properly by AMS 3.10
+	- [kevin] $2168: fixed recfile crash when receiving something which is not a valid variable
+	- [kevin] $2168: fixed ti68k_linkport_ready to reset the link so TiEmu doesn't try to receive a "file" sometimes
+	- [roms]  $2177: fixed invalid keyval mask in keyboard press event routine
+					 removed Gdk_Caps_Lock capture (already capture by TI keyboard)
+					 added accelator key: Pause => Screenshot Now!
+	- [roms]  $2178: allow to select target folder for screenshots
+	- [roms]  $2179: fixed bug #1435183 (Error window when closing TI emu)
+	- [roms]  $2190: added BMP screenshot support and fixed frame spacing
+	- [roms]  $2191: reworked screenshot option dbox and prepared next step
+	- [roms]  $2194: added ability to take several screenshots (burst mode)
+		=> Released on ???
+
+- 10/05/2006, version 2.81:
+	- [roms] $2059: renamed 'code/source' window into 'disassembly'
+	- [roms] $2052: build a tiemu2-like release when NO_GDB is enabled	
+	- [roms] $2053: enable and use UAE disassembler when NO_GDB is enabled
+	- [roms] $2060: modified UAE disassembler to follow Motorola syntax
+		Used to provide a replacement of the tiemu2 disassembler (license issues).
+	- [kevin] $2081: removed excess spaces in disassemblers
+	- [kevin] $2090: added --disable-gdb configure option
+	- [roms]  $2096: fixed bug #1490859 (enable OK button when selecting an image)
+	- [roms]  $2097: fixed bug #1471709 (crash on old state image)
+	- [kevin] $2102: increased buffer size for the RELEASE viewer
+	- [kevin] $2115: fixed splash.c saying "TiLP" instead of "TiEmu", updated version in configure.ac
+	- [kevin] $2116: allocate metadata properly in send_file_and_debug_info
+	- [kevin] $2118: fixed Insight preferences dialogs
+	- [roms]  $2119: fixed linking with NO_GDB (missing xmalloc)
+	- [roms]  $2121: fixed return value in engine_func for NO_GDB mode (stop engine)
+	- [kevin] $2123: reset source ID when stopping the engine from engine_func (NO_GDB)
+		=> Released on 28/05/2006.
+
+- 25/08/2005, version 2.80:
+	- [roms] $1689: fixed Titanium skin loading and fixed bug in skin loader
+	- [roms] $1692: re-enabled transient mode for windows
+	- [roms] $1694: set transient mode as option
+	- [kevin] $1695: merge changes from tigcc-debugging-branch:
+		* integrate the GDB source debugger (command-line interface)
+		* fix include paths for systems without BFD and readline installed
+		* reenable the debugger if it has previously been disabled (by GDB)
+		* integrate Insight, a graphical frontend for GDB
+		* enable and fix Insight for MinGW (Win32) and Darwin (OS X)
+		* force static linking for TCL-related stuff on OS X
+		* don't chdir to $HOME (fixes Insight's path detection when running TiEmu using
+		  a relative path)
+		* allow .dbg files with spaces in the pathname and/or filename
+		* fix libintl detection (fixes --enable-nls builds on OS X at least)
+		* don't allow resetting while the debugger is busy
+		* new Windows installer based on NSIS: GTK+ is downloaded and installed
+		  automatically (after user confirmation) if needed
+		* new Fedora (Core 4) RPMs
+		* add XPM version (48x48) of Jaime Fernando Meza Meza's icon and use it for the
+		  Fedora .desktop file.
+		* support for BSS section debugging (_nostub only at the moment, TIGCC 0.96 Beta
+		  5 required)
+		* avoid link port access when browsing memory in the Insight memory window as well
+		  (see $1588 below)
+		* disable fvisibility support if --enable-shared or --enable-shared-* because it
+		  is currently broken
+	- [kevin] $1705: import PedroM (ld-tigcc build) 0.81 RC8
+	- [kevin] $1707: fix handling of handles (don't interpret NULL as end of heap table, don't
+	                 dereference H_NULL in loops)
+	- [kevin] $1708: disable window grouping (transient mode) by default
+	- [kevin] $1710: fix size of archived handles under PedroM
+	- [kevin] $1711: bump version number (2.00->2.80) and GTK+ requirement in configure.ac
+	                 (2.4.0->2.6.0, GTK+ 2.4 won't work since the addition of the new about window)
+	- [kevin] $1712: install prebuilt Manpage.txt if groff is not available
+	- [kevin] $1713: fix RELEASE window (MinGW path, say "TiEmu" instead of "TiLP", not
+	                 automatically shown so don't say it is)
+	- [kevin] $1717: fix RELEASE file to display properly (use ASCII, not Latin1 which is not
+	                 valid UTF-8)
+	- [kevin] $1718: don't remove last 2 bytes of RELEASE and COPYING (only Manpage.txt needs that)
+	- [kevin] $1719: fix patch to install prebuilt Manpage.txt without groff so it also works with
+	                 groff available (can't put conditional around install-data-local)
+	- [roms] $1727: fix bug in direct link access
+	- [roms] $1739: update HTML manual
+	- [kevin] $1741: update version number in popup-2.glade
+	- [kevin] $1742: fix FlashROM writes: can't set bits from 0 to 1
+	- [roms]  $1744: fixed FlashReadLong & FlashWriteLong (long access is just 2 word accesses)
+	- [roms]  $1748: don't allow operations on state while the debugger is opened (bug item #1250175).
+	- [roms]  $1757: fixed v200 skin (blank LCD)
+	- [kevin] $1763: fix HeapTable detection on PedroM 0.81 RC9 (use ROM_CALL instead of hack for
+	                 PedroM >=0.81)
+	- [kevin] $1764: import PedroM (ld-tigcc build) 0.81 RC9
+	- [roms]  $1768: merge changes from tiemu-3-libti2 branch:
+		* switched to the TiLP-II framework
+		* updated the communication/device dialog box
+		* added a new pseudo-cable (internal linkport)
+		* modified tiemu.ini parser consequently
+		* changed getw/putw into get_w/put_w due to name conflict with stdio.h.		
+		* SilverLink cable is now working for both Linux & Windows.
+	- [kevin] $1771: update NSIS installer, tarball script and Fedora RPM specs, require GTK+ 2.6.10
+	                 in the NSIS installer
+	- [roms]  $1781: loading of ??u upgrades was broken: fixed.
+	- [kevin] $1785: import PedroM (ld-tigcc build) 0.81 RC10
+	- [roms]  $1788: don't overwrite file received from TiEmu.
+		Raises a overwrite/rename/skip box for now (imported TiLP-II file management unit).
+	- [kevin] $1792: allow closing the debugger by closing the Insight window ("X" button)
+	- [roms]  $1793: fixed bug: timeout can be up to 600 on win32 but the glade file allows up to 60.
+					 fixed timeout issues with the device dbox: internal linkport timeout is now displayed/changed fine.
+	- [roms]  $1796: fixed bad memory allocation in the GTK+ 2.6 multiple
+	        file selector (bug #1294628). 
+	- [roms] $1801: fixed bug #1304338 (doesn't save skinless mode in .ini file)
+	- [roms] $1803: fixed #1305054 (doesn't refresh vector bkpt state)
+	- [kevin] $1811: optimized grayscale movem detection and added support for dirty-coded HW2/3 grayscale interrupts
+	                 abusing the stack pointer to hold data (currently only the latest Grib is known to do that)
+	- [kevin] $1812: import PedroM (ld-tigcc build) 0.81 release
+	- [kevin] $1813: fix install-without-tcl-tk omitting the "misc" directory
+	- [kevin] $1819: import Insight 6.4 and merge TiEmu changes
+	- [kevin] $1826: improve configure argument filtering to make Fedora->MinGW cross builds work
+	- [kevin] $1827: override C_INCLUDE_PATH and LIBRARY_PATH for UAE host object compilation
+	- [kevin] $1828: set CFLAGS_FOR_BUILD to CFLAGS without the arch-specific defines
+	- [kevin] $1832: allow setting $RC to something other than windres
+	- [kevin] $1833: override C_INCLUDE_PATH and LIBRARY_PATH for cleaner.c compilation
+	- [kevin] $1835: add .exe extension properly for MinGW (especially cross-MinGW) builds
+	- [kevin] $1843: add install-without-tcl-tk-itcl make target
+	- [roms] $1852: updated manpage
+	- [kevin] $1855: fixed unclosed tag and ISO 8859-1 (non-ASCII, non-UTF-8) character in manpage
+	                 changed manpage to Unix line endings so it displays properly in Konqueror
+	- [kevin] $1857: by default, KDE-enabled builds now use the KDE file selector only when running KDE
+	- [kevin] $1858: enable KDE support by default (except on MinGW)
+	- [kevin] $1870: fix libtifiles2 0.0.5 charset problem on Win32
+	- [kevin] $1871: fix GDB crash when single-stepping
+	- [kevin] $1872: adjust to libtifiles2 reversion to file names in locale charset
+	                 actually honor locale for file names throughout
+	- [kevin] $1875: plug Qt event loop into GTK+ main loop so we will actually be able to receive/process DCOP messages
+	- [kevin] $1876: created a DCOP interface (currently empty)
+	- [kevin] $1879: implemented image queries and file sending in the DCOP interface
+	- [kevin] $1880: handle engine state properly when sending files through DCOP
+	- [kevin] $1881: added ready_for_transfers() boolean query to the DCOP interface
+	- [kevin] $1882: added reset_calc(bool clearmem) command to the DCOP interface
+	                 DCOP operations now return true if TiEmu was ready and false if it wasn't (and rejected the operation)
+	- [kevin] $1883: implemented execute_command in the DCOP interface
+	- [kevin] $1886: added turn_calculator_on command to the DCOP interface
+	- [kevin] $1889: adjust to libtifiles2 re-reversion to file names in glib filename charset
+	- [kevin] $1890: implemented widechar versions of Win32 file dialogs
+	- [kevin] $1891: partial implementation of OLE automation interface (no instances created yet)
+	- [kevin] $1907: initialize and uninitialize OLE automation interface
+	- [kevin] $1913: added 1 ms timeout to Qt processEvents to ensure 4% max CPU consumption
+	- [kevin] $1914: slowed down typing (execute_command) a bit so the CHAR menu works properly
+	- [kevin] $1915: fixed keycode of SIGMA on TI-89
+	- [roms] $1931: fixed segfault in the Win32 file selector when varname contains non-ASCII chars.
+	- [roms] $1932: enabled tifiles2 library as UTF-8 for varnames. This allow good handling of non-ASCII chars.
+	- [roms] $1933: added conversion of varnames with greek chars into useable filenames for disks with locale encoding.
+	- [kevin] $1935: added OLE self registration support (/RegServer, /UnregServer)
+	- [kevin] $1936: also filter CXX in the configure argument filtering (fixes MinGW build again)
+	- [kevin] $1938: cleaned up OLE self registration support, fixing Win32 link failure
+	- [kevin] $1943: register the TLB file during OLE self registration
+	                 don't abuse assert for error checking in registry.cpp
+	- [kevin] $1945: add regsvr makefile target for native MinGW compilations (using MSYS)
+	- [kevin] $1953: experimental support for building tiemups.dll with MinGW
+	- [roms]  $1955: the '/RegServer' and '/UnregServer' must be case-unsensitive. Fixed compilation under MSVC.
+	- [roms]  $1957: added VB script for testing OLE/Automation.
+	- [kevin] $1959: use RegisterActiveObject, not CoRegisterClassObject, for our singleton
+	                 don't delete the singleton if the refcount reaches 0, let the cleanup on exit do it
+	- [kevin] $1961: pass --disable-werror to the GDB configury
+	- [roms]  $1962: added MSVC project to oleautsdk and modified oletest to compile with a C90 compiler.
+	- [kevin] $1964: moved initialization of buffer[2048] back down
+	                 restored 2 spaces/level indentation in oletest.c
+	- [roms]  $1968: request #1430263: "better error handling"
+	- [roms]  $1972: bug #1388306 fixed: "can't send FLASH app"
+	- [roms]  $1978: skin is now scaled directly from JPEG image => no resolution lost
+	- [kevin] $1980: added enter_debugger command to the DCOP interface
+	- [kevin] $1981: added enter_debugger command to the OLE interface
+	- [roms]  $1987: fixing bug #1434625: display a better error message when attempting to load a state image targeted for another hand-held model (backported changes from TiEmu2 rev. 1986).
+	- [roms]  $1989: fixed bug #1434625: allow direct loading of a state image and associated image.
+	- [roms]  $1993: fixed bug in the single Win32 file selector (default folder was not properly set)
+	- [roms]  $1994: switched to ticonv library
+	- [roms]  $1999: fixed #1436138: V200 screen bigger than the skin
+	- [kevin] $2003: fixed set_window->on_drawingarea1_configure_event->set_window feedback loop (see bugs #1227433, #1249087)
+	- [roms]  $2004: replaced gtk_idle_add (deprecated) by g_idle_add
+	- [roms]  $2007: accept TI92 files on Titanium and others
+	- [kevin] $2009: imported UAE 0.8.25
+	- [roms]  $2012: bug #1434600 => goes to HOME when calc is not ready
+	- [kevin] $2021: fixed stray quotes breaking Insight build with latest bash (by Pavel Roskin, from http://sources.redhat.com/ml/insight/2006-q1/msg00043.html)
+	- [roms]  $2031: can load VTi skins
+	- [kevin] $2033: commented out OLE installation in tiemu*.nsi and OLE initialization/cleanup in oleaut.cpp - OLE support will be reenabled when it will actually work
+	- [roms]  $2037: fixed to follow ticalcs2 API changes
+	- [kevin] $2038: HW4 runs at 16 MHz
+	- [roms]  $2040: added HW4 support (user can choose imported FLASH upgrade as HW3 or HW4 for Titanium (like TI89/92+))
+	- [roms]  $2048: fixed edition of values in the memory dbox
+	
+	Note: trunk forked into tiemu-debugging-branch at rev. $983 and has been merged back 
+		into the trunk at rev. $1695.	
+	For changes made in the tiemu-debugging-branch, see the RELEASE file starting at '20050806'.
+	
+	Note2: trunk forked into tiemu-3-libti2 branch at rev. $1720 and has been merged back
+		into the trunk at rev. $1768.
+
+- 19/08/2005, version 2.00:
+	- [kevin] $1662/1663: import V200 updates as HW2, not HW1 (and default TI-89/92+ updates to HW2)
+	- [roms] $1666: use Titanium and V200 skins when available (else fallbacks)
+	- [roms] $1667: fixed large column in the I/O port view
+	- [roms] $1668: new function in the mem window (read address and dis-assemble at)
+	- [roms] $1672: fixed 'Set PC to selection' command by adding a call to fill_prefetch_slow()
+	- [roms] $1673: update ASCII column (dbg wnd) after cell editing
+	- [roms] $1676: ask for 'Clear RAM' when reseting calc (O. Armand request)
+	- [kevin] $1680/1681: fix buffer underflow in iodefs.c
+
+- 03/08/2005, version 2.00-rc8:
+	- [roms]  $1615: TiEmu retains the state of dbg windows (open/closed) now.
+	- [kevin] $1623/1624: fixed: only first 32 bytes of ram_exec were restored from savestate
+	- [kevin] $1625/1626: buffering grayscale planes to avoid blinking in double-buffered games
+	- [roms]  $1627: put all gscales extern into gscales.h
+	- [roms]  $1629: added new I/O ports window which let view/modify HW registers
+	- [roms]  $1648: fixed buffer overflow in RTC HW3 and disabled full screen mode (too slow)
+
+- 16/07/2005, version 2.00-rc7:
+	- [roms] $1583: fixed PPhD's bug (no reload of ROM calls when upgrading)
+	- [roms] $1585: fixed comm box (removed calc & autodetect because un-needed)
+	- [roms] $1586: fixed file patterns in file selector (case sensitivity)
+	- [roms] $1588: avoid linkport accesses when browsing memory from dbg window
+	- [roms] $1590: fixed severe bug in linkport (the status register was reset whenever read
+		like specified by TI but the int handler proves it's false).
+		TiEmu does not run an infinite loop when transfer is interrupted.
+	- [roms] $1593: previous bug fixed again for _all_ calcs
+	- [roms] $1597: set link timeout to 60s for non-NT platforms, 1.5s for others
+	- [roms] $1598: added a new function in the ticables library API (ticable_link_reset)
+		for use by TiEmu. It allows to reset/flush the pipes of virtual linking when the
+		DBus is reset (usually due to transmission error). Link is now resumable.
+	- [roms] $1601: reimplemented HW3 RTC from latest/new O. Armand's information.
+	- [roms] $1608: automatically bind TiEmu #2 on the second instance of TiEmu
+	//- [roms] $1609: fixed wraparound of clock() in RTC hw2 support (~74 minutes).
+
+- 25/06/2005, version 2.00-rc6:
+	- [roms] $1552: replaced my hand-made about box by the generic one provided with GTK 2.6
+	- [roms] $1560: TiEMu can be exited from the cross (WM)
+	- [roms] $1564: fixed 'backing pixmap problem' (bug #1227433): the scale factor
+		was not retrieved fine from .ini file when the ratio contains ',' instead of '.'
+	- [kevin] $1572/1573: handle program entry breakpoints on _main for kernel/Fargo programs
+	- [kevin] $1574/1575: implemented HW3 RTC
+	- [roms]  $1577: can choose HW1/HW2 when importing a tib file
+	- [kevin] $1580/1581: fixed about box license display on MinGW
+
+- 23/06/2005, version 2.00-rc5:
+	- [roms] $1525: merged Kevin's change in rev $1524 (recfile).
+	//- [roms] $1526: cancel button
+	- [roms] $1543: fixed 'Receive file' check item.
+	- [roms] $1544: fixed bug #1227179 (screenshot).
+
+- 10/06/2005, version 2.00-rc4:
+	- [roms] $1488: replaced current icon by Jaime's one
+	- [roms] $1489: removed logo from about box
+	- [jb]   $1493: src/gui/calc.c: screenshot of the whole calc in BW
+		is not supported, error out in this case. It'd be nice to pop an
+		error message to the user.
+	- [jb]   $1493: src/misc/screenshot.c: enable BW screenshot in EPS
+		and PDF; they're treated like color screenshots.
+	- [roms] $1497: added hibou's logo
+	- [roms] $1507: cleanup and little fixes in interrupt support of m68k
+	- [roms] $1509: fixed behaviour of all keys and definitely fixed ON key
+
+- 01/06/2005, version 2.00-rc3:
+	- [roms] $1462: fixed bug #1212619.
+	- [roms] $1467: fixed ON key
+	- [roms] $1470-76: 
+		don't restart the whole GUI when switching view mode.
+		The main wnd can be resized by dragging it and its content is automatically scaled.
+	- [roms] $1478: popup menu and tiemu.ini updated to support custom scaling factor.
+	- [roms] $1480: changed logo for Kevin's one.
+	- [roms] $1483: fixed full-screen mode
+	- [kevin] $1485/1486: replaced TiLP logo in the HTML manual with my temporary TiEmu logo
+	- [roms] $1487: fixed resized window with key positions (mouse) (bug #1217627)
+	
+- 31/05/2005, version 2.00-rc2:
+	- [kevin] $1357/1362: added support for disassembling ER_throw
+	- [kevin] $1364/1365: link tiemu.rc in for MinGW
+	- [roms]  $1382: fixed HOME & CATALOG keys on Titanium (mouse only)
+	- [jb]    $1399: added EPS/PDF screenshot output
+	- [roms]  $1408: fixed check of Titanium skins (bug #1209813)
+	- [roms]  $1415: fixed debugger display under SawFish (patch #1209183)
+	- [kevin] $1417/1418: fixed 0x600017 and implemented detection of Patrick
+                          Davidson's grayscale routine (bug #1207299)
+	- [kevin] $1420/1421: when minimizing the main window, don't hide the others
+                          (patch #1209183)
+	- [kevin] $1424/1425: fixed checkboxes in the program entry breakpoint
+	                      dialog (a subtle 2-byte buffer overflow!)
+	- [kevin] $1427/1428: RTC port triggers every 8192 seconds (correct), not every 4 (dbg code)
+	- [kevin] $1430/1431: fixed resetting with the debugger open (closes the debugger
+	                      rather than starting the engine with the debugger still expecting
+	                      it to be stopped)
+	- [kevin] $1432/1433: reenabled memory window refresh
+	- [roms]  $1434: fixed multiple check items in the popup menu (button group)
+	- [roms]  $1436: HW protection is enabled by default for now
+	- [roms]  $1440: tiemu.ini file loader/saver: slightly re-arranged sections and cleaned-up.
+	- [roms]  $1443: view mode is now saved in the config file.
+	- [roms]  $1444: view mode is restored at startup.
+	- [roms]  $1446: screenshot of TI89 is now clipped
+	- [roms]  $1447: B&W screenshot support added
+	- [roms]  $1448: fixed screenshot of full skin with LCD
+	- [roms]  $1449: timeout of direct file loading can be changed now
+
+- 16/05/2005, version 2.00-rc1 (3.9.1, 0.6.4, 4.5.9):
+	- [kevin] $1337/1338: fix --with-kde for Debian and derivatives
+	- [kevin] $1340/1341: add -Wl,--export-dynamic for all Linux targets to fix Ubuntu problem
+	- [kevin] $1351/1352: implement undocumented flags for ABCD, SBCD, NBCD and CHK
+	                      (source: 68knotes.txt by Bart Trzynadlowski)
+	- [roms] $1358: first release candidate
+
+- 06/05/2005, version 1.80v:
+	- [roms]  $1248: changed rom_base from 0x20 to 0x200000 whenever applicable
+	- [roms]  $1249-1253: memory layout management rewritten
+	- [roms]  $1254: splitted I/O ports on HW3
+	- [roms]  $1255: finished to use new memory layout; the memory window shows 
+					 the exact memory mapping
+	- [roms]  $1263: hw_get_real_address is a function pointer which depends on the 
+					 calculator type for now (part of memory management rewrite attempt)
+	- [roms]  $1278: completely removed old memory banking system (mem_tab & mem_msk)
+	- [roms]  $1293: fixed engine loop (every 30ms)
+	- [roms]  $1294: can change LCD rate from popup menu
+
+
+- 27/04/2005, version 1.80u:
+	- [roms]  $1191: popup menu can be raised by clicking on the LCD (iPAQ)
+	- [roms]  $1192: fixed logging domain support (printl)
+	- [roms]  $1195: some bug fixes by Christian Walther.
+	- [roms]  $1213: fixed contrast on Titanium
+	- [roms]  $1214: fixed range breakpoints (completely broken) and code bkpt
+	- [roms]  $1229: can exit emulator from cross (WM decorations)
+	- [jb]	  $1230: fixed va_list in printl
+	- [kevin] $1231: allow setting a range breakpoint on a single byte
+	- [kevin] $1232: fixed range breakpoint (overlap)
+	- [roms]  $1233: fixed SSP/USP registers in registers.c
+	- [roms]  $1234: 'exit & save state' moved in popup menu
+	- [roms]  $1235: added accelator key to select & set PC on next line
+	- [kevin] $1237/1238: don't clobber bkpts.id if we are already breaking
+	- [kevin] $1239/1240: no FlashROM ghost space at 0x400000 on the TI-89
+	- [kevin] $1239/1240: fixed hardwareRevision in the HW parameter block
+	- [kevin] $1241/1242: fixed reads from wrong offsets in the stack window
+
+- 20/04/2005, version 1.80t:
+	- [roms]  $1152: fixed RAM space on Titanium
+	- [kevin] $1156: added detection for WinXP with classic theme.
+	- [roms]  $1161: fixed window position again (better fix-up)
+	- [roms]  $1162: save main window position
+	- [roms]  $1163: implementing receive file feature
+	- [roms]  $1166: merged Christian Walther's patch for Mac OS-X port.
+	- [kevin] $1167: increased link timeout from 10 to 60s.
+	- [roms]  $1172: added receive of file
+	- [roms]  $1173: improved to support group files
+	- [roms]  $1176: show a dialog box when a file is received
+	- [roms]  $1177: file receiving can be disabled for games which uses linkport for sound
+	- [roms]  $1182: TI89 Titanium entry was missing in the communication box
+	- [roms]  $1183: glade callbacks were not found due to a missing --export-dynamic (iPAQ)
+	- [roms]  $1185: clean-up and improvements in the skin loader (no tmp file any longer)
+					 improvements in the skin loading (avoid multiple loading and load only when necessary)
+	- [roms]  $1188: removed flicker at startup, code slightly reworked
+
+- 11/04/2005, version 1.80s:
+	- [roms]  $1102: fixed old file selector
+	- [kevin] $1112: fix incorrect shift of rom_base in handles.c.
+	- [kevin] $1112: fix several HW protection bugs which prevented booting TI-89 Titanium AMS 3.01.
+	- [kevin] $1112: fix and enable HW2/HW3 FlashROM execution protection.
+	- [kevin] $1114: properly step over jsr _bcd_math calls.
+	- [roms]  $1116: don't use libtool and fixed UAE makefile for cross-compilign support.
+	- [roms]  $1137: fixed clock on HW2
+	- [roms]  $1143: fixed preloading of debugger 
+	- [roms]  $1145: can sort ROM calls by addr, name or id
+	- [roms]  $1146: fix-up window size/position with border size
+	- [roms]  $1147: fixed possible bad selection location in mem, stack and code windows
+		Fixed source code window: scrolling was somewhat weird/broken.
+
+- 28/03/2005, version 1.80r:
+	- [kevin] $1029: merged UAE 0.8.15 from tigcc-dbg branch
+	- [roms]  $1030: fixed MSVC compilation and support for new UAE
+		Note: there is a post-build lock with gencpu. To fix...
+	- [roms]  $1032: added instruction cycle count support
+	- [kevin] $1037: restrict to actual speed based on cycle count, not instruction count.
+	- [roms]  $1038: fixed Win32 multiple file selector
+	- [roms]  $1048: fixed calibration loop (updated on each engine restart)
+	- [roms]  $1059: added pgm_entry bkpt support in dbg_cause.c (merged from Kevin's branch)
+		need to remove 1 pgm entry bkpt limitation
+	- [kevin] $1079: don't start the engine when toggling "Restrict to actual speed" if it was stopped (crash fix).
+	- [roms]  $1081: TiEmu hang when using F10 instead of popup menu. Fixed.
+	- [roms]  $1082: use ShellExecute instead of g_spawn_async in go_to_bookmark (thx Kevin !).
+	- [roms]  $1084: use a list of browsers to get the good one under Linux
+	- [kevin] $1092: trigger interrupts per cycle, not per instruction. Fix interrupt rates. 
+		Measure LCD exposure times in cycles rather than instructions to match the timers.
+
+- 19/03/2005, version 1.80q:
+	- [roms] $985: updated copyright notice.
+	- [roms] $990: set main window title (for TIGCC-IDE).
+	- [roms] $993: switched to GTK+ 2.6.4 for Windows.
+	- [roms] $994: removed GTK deprecated code (-DGTK_DISABLE_DEPRECATED),
+	         except for comm.c
+	- [roms] $996: set default filename in file selectors
+	- [roms] $997: more dissassembled lines of code in the debugger 
+	         (resizeable).
+	- [roms] $998: close the debugger when you press F5.
+	- [roms] $1001: added scaling support for skin & lcd 
+	         (beware: CPU intensive).
+	- [roms] $1002: can send several TI files at once and added 
+	         new file selectors.
+	- [roms] $1008: implemented full-screen view.
+	- [roms] $1009: improved CPU responsiveness of large view mode.
+	- [roms] $1015: TiEmu don't use threads any longer.
+
+- 12/03/2005, version 1.80p:
+	- [kevin] $933: increased link timeout from 1.5 to 10s.
+	- [kevin] $934: fixed grayscale support.
+	- [kevin] $935: fixed grayscale support with double buffering.
+	- [kevin] $937: allow building with -mwindows -D_WINDOWS on MinGW.
+	- [roms]  $940: removed mutex at startup because we should be able to run 
+		2 instances of TiEmu for virtual linking.
+	- [roms]  $941: fixed ghost of RAM in $100000 on TI89,92,92+,V200.
+	- [roms]  $943: fixed ghost of RAM in $000000 on Tinanium
+	- [roms]  $949: fixed timer incrementing/reloading (PPhd: loop freeze)
+	- [roms]  $950: can send all of 89?, 92?, 9x? and v2? to all the models
+	- [roms]  $951: clean-up in ti68k_scan_images (no more cache, useless now)
+	- [roms]  $952: can remove (=file delete) image from list
+	- [roms]  $954: fixed size for archived handles on PedRom
+	- [roms]  $958: fixed file pattern for Win32 file selector; fixed default 
+					path and pattern for the new GTK file selector.
+	- [roms]  $960: improved management of ALPHA key on TI89 (letter/number).
+	- [roms]  $962: factorized TI89/V200 & TI92+ code (memory).
+	- [kevin] $966: added KDE file selector support.
+	- [roms]  $976: full hw1/2/3 protection support (89).
+	- [roms]  $980: overhaul of some parts in memory management and factorized 
+					hw protection code for all calcs.
+	- [roms]  $981: hw protection implemented for all calc models.
+
+- 25/02/2005, version 1.80o: roms
+	- fixed bug in ti68k_get_hw_param_block (wrong search/replace)
+	- fixed TAB char (0x09) pb in the dbg_mem window (Lionel)
+	- handles are now displayed fine with PedRom
+	- program entry breakpoint feature now useable with AMS >= 2.00
+	- improved dbg windows behaviour: save/restore size, position and 
+	state (hide/minimized);	fixed ini file, too
+	- updated manpage
+	- command line improved and up-to-date
+	- cleaned-up configure.ac script (CygWin & MinGW)
+	- fixed Step Over
+	- added Win32 file selector
+	- fixed dependancy problem with tiemu&uae rule in src/Makefile.in
+	- fixed bad use of sizeof in hw_io_init
+	- fixed MinGW path with Kevin
+	- fixed -mms-bitfields issue with UAE Makefile under MinGW (Kevin)
+	- fixed out-of-range access with io_bit_tst in ports.c (Kevin)
+	- fixed contrast on TI92+
+	
+- 18/02/2005, version 1.80n: roms
+	- fixed FLASH writes with HW3 patch
+	- fixed Step Over on the following FLINEs : 0xfff0, 0xfff2, 0xffee.
+	- fixed Hardware Parameter Block when converting FLASH upgrade
+	- the Windows(tm) MENU key raises the popup menu for now
+	- fixed disassemblling of 0xffee and 0xffef FLINEs
+	- changed engine_start/stop architecture to remove some menu locks/bugs
+	- fix: ROM call combo box: does not jump to call when names contains '/'
+	- fix: don't reload ROM calls when changing AMS without chaning calc type
+	- show vector name rather than number
+	- dis-assemble FLINE with __ld_entry_point
+	- dis-assemble FLINE with _bcd_math followed by FPU pseudo-opcode
+	- clean-up and improvements in the misc menu (help)
+	- fixed status bar display in the bkpts dbox
+	- some items of the popup menu are disabled when the engine is running
+	- save FLASH segment which have been written/erased
+	- added FPU dis-assembler
+	- fixed/improved some endianess issues
+	- pedrom tibs are now placed in the 'pedrom' folder. The wizard let you import them 
+		automatically.
+	- fix problem of path with scan_images under Linux
+	- fixed/improved mem allocation in images.c
+	- added program entry breakpoint feature (AMS < 2.00 only)
+
+- 07/02/2005, version 1.80m: roms
+	- dbus architecture improved (reset)
+	- fixed and tested linkport support with real cables: GrayLink, BlackLink, VTi and TiEmu.
+	- tested: TiLP/VTi (vti), VTi/TiEmu (vti), TiLP/TiEmu (tie).
+	- SilverLink makes TiEmu crash.
+	- 0x200000 and 0x400000 are ghost of 0x000000 (Titanium only)
+	- added 0x7100xx ports and fixed LCD address on HW2/HW3
+	- real grayscale emulation for HW2/HW3
+	- removed VTi signature (buggy SR)
+	- searching of data begins at the current tab address
+	- fixed heap listing with AMS300
+	- fixed Step Over on TRAP
+
+- 21/01/2005, version 1.80l: roms
+	- switched to GTK+ package 2.4-rc26 (2.4.14): compatible with GiMP and fixes toolbar tooltips
+	- fixed size of handles in handle wnd
+	- some improvements and fixes in the linkport support
+	- fixed AI2 (need to be raised whenever a key is pressed)
+	- main loop modified: main loop is restarted whenever a new ROM is loaded.
+	- fixed main window which appears when the whole window is ready
+	- fixed V200 and Titanium crash under Linux (buffer overflow). V200 transfers don't crash
+		any more under Windows (probably same bug).
+	- added kbd_dbg variable in tiemu.ini file to display keystrokes in console (useful for creating keymaps).
+	- prevent Alt+ESC and Ctrl+ESC to disturb TiEmu (thanks to Kevin)
+
+- 20/01/2005, version 1.80k: roms
+	- link port is now reset when error occurs: great improvement
+	- added support of EA bit ($60000D:2): Titanium work
+	- clean-up of linkport support (no more hack)
+	- fixed linkport progress bars
+	- boosted linkport speed (direct file)
+
+- 12/01/2005, version 1.80j: roms
+	- rewrite of the m68k loop:
+		* UAE fixed to handle multiple pending interrupts and some other fixes
+		* idle mode and STOP improved but problems with ON key
+	- fixed grayscale routines: they are now rock-stable !
+	- fixed grayscales with HW2
+	- implemented 'increment rate' of $600017 port
+	- fixed RTC timer ($700014) and port $70001F (RTC enable and 1,2,3,5 irq inhibit).
+	- fixed AI3: it was never raised because counter was never incremented
+
+- 03/01/2005, version 1.80i: roms
+	- implemented new method for grayscale computing & management (idea from Kevin)
+	- clean-up of popup menu (#colors menu removed)
+	- grayscales pb with HW2...
+
+- 13/12/2004, version 1.80h: roms
+	- simplified skin/keymap management (TI92+ => TI92, TI89t => TI89)
+	- simplified ROM image/upgrade access
+	- display ROM calls in RAM in the mem panel
+	- fixed contrast with TI89
+	- fixed grayscale computing but grayscales are still flickering
+	- switched to gtk-win32-devel-2.4-rc24.exe package: fix tooltips with toolbars
+
+- 15/11/2004, version 1.80g: roms
+	- idle() fixed (port $600005)
+	- erase FLASH whenever an OS upgrade is loaded.
+	- fixed scrolling of instructions in code window
+	- data bkpt at $0 are now caught
+	- 'Run to cursor': work with far instructions
+	- fixed incrementing of $700014
+	- removed "C:\\tiemu.log" empty file under Linux
+	- added temporary breakpoint mode
+	- breakpoints are now editable
+	- fixed bugs with data breakpoints
+	- fixed bug with 'Run': didn't run if a bkpt is on the current line
+	- update stack frame when editing memory hex dump
+	- don't list invalid ROM calls any more
+	- added frame pointer window
+	- stack & frame pointer window are now scrollable
+	- remind folder when sending variable
+	- allow cross-compatibility when sending TI files
+	- switched to the new file selector (seems to be slow)
+	- added heap window to show handles
+	- fixed LCD address on all calculators
+	- improved ROM call management
+	- ROM call entry box has now auto-completion
+	- refresh code window when removing code bkpt from bkpt window
+	- don't save configuration any longer when upgrading calculator
+	- removed bkpt cause dbox for status bar in the bkpt dbox
+	- fixed TIB support for V200 & TI89Ti (libtifiles)
+	- merge read & write bkpts as r/w bkpts
+
+- 08/11/2004, version 1.80f: roms
+	- PedRom is now provided with TiEmu as default OS.
+	- bug: 'unexpected Xlib async reply' (Linux) found and fixed.
+	- improved LCD on/off and contrast
+	
+- 02/11/2004, version 1.80e: roms
+	Fixed various key binding bugs thanks to Kevin.
+
+- 24/10/2004, version 1.80d: roms
+	- fixed bug: directory creation in $HOME
+	- bug: 'unexpected Xlib async reply' (Linux) (not fixed yet)
+	- fixed missing feature in the FLASH device: TI89 Titanium boots for now
+	
+- 11/10/2004, version 1.80c: roms
+	- applied patch from Christian Walther <cwalther at gmx.ch>
+	- fixed some Linux bugs
+
+- 14/09/2004, version 1.80b: roms
+	- fixed HW3 support
+	- fixed bug in LCD snoop range register: TI89 Titanium (patched) and V200 (patched) work.
+	- fixed bug in FLASH emulation (algorithm)
+	- fixed ROM size handling with TI89 Titanium & V200
+	- removed copying of vector table from FLASH to RAM at startup
+	- added 'go to address' in the PC log window
+	- implemented 'enable/disabled' breakpoint
+	- added some missing HW ports
+	- fixed TI89 Titanium RAM accesses
+
+- 28/08/2004, version 1.80a: roms
+	- fixed vectors copy
+	- bkpts window: can jump to bkpt address
+	- code window: can jump to ROM call
+	- fixed warnings
+	- update stack frame when stepping
+	- improved step over: don't stop at the first RTS/RTE
+	- fixed disassembling of STOP instruction
+	- highlight ROM call
+	- fixed loading of ROM calls (load from FLASH)
+	- ROM calls are sorted by name instead of by id
+
+- 20/08/2004, version 1.79: roms
+	- LCD background is less dark
+	- force mem window refresh when scrolling up/down
+	- no ghost in 0x400000-0x5FFFFF on TI89
+	- stack frame display 1 word on 2
+	- fixed step over: works on DBcc
+	- PC highlight lost when scrolling: fixed
+	- restart engine when clicking outside of the popup menu
+	- important bug: FLINE instructions were not executed !
+	- popup menu slowed down in non-restricted speed mode (fixed)
+	- removed lock-ups at startup (start engine after splash screen)
+	- when calc is OFF, CPU is now used at 3% instead of 100% and debugger can be launched
+
+- 13/08/2004, version 1.78: roms
+	- changed keyboard mapping to pure VTi mapping
+	- added ability to load keymaps from file
+	- force code window refresh when maintaining F7 key pressed
+	- accept ExtendeD's V200 ROM (patched)
+
+- 10/08/2004, version 1.77: roms
+	- step over fixed again: stops on Bcc/DBcc, STOP, RTE, RTD, RTS, RTR, JMP.
+	- FLINE > 5 was mis-disassembled
+	- code window: don't reload source when setting a bkpt
+	- check for image at startup and can select it
+	- code window: show PC in the middle of the window and leave 3 isntructions at bottom
+
+- 07/08/2004, verison 1.76: roms
+	- splitted memory mapping (init/exit)
+	- SR/PC were not shown any longer with exception (fixed)
+	- added refresh button to mem window
+	- update regs when changing the Supervisor bit
+	- clicking OK in the ROM version without selection makes box crash
+	- bug fixes in the mem dbox searching
+	- use Lionel's romcalls listing (N:func_name)
+	- min/max window improved: hide windows like Glade and 1 app in the task bar
+
+- 27/07/2004, version 1.75: roms
+	Olivier's suggestions:
+	- synch Code/Window menu with state of other windows (show/hide)
+	- minimize/maximize all windows when touching calc or code window. Could be better...
+	- can't step after bkpt: fixed.
+	- mem_dbox: show headers, removed stack, refreshed on step, tab refreshed when scrolling,
+	- mem_dbox:	improved scrolling and browsing
+	- step over was buggy (no single step on insts other than jsr/bsr)
+	- code_dbox: improved scrolling and browsing
+	- avoid selection and green bar to be masked
+	- code_dbox: can add mem tab at address
+	- mem_dbox: can disasm at address and added popup menu
+	- mem_dbox: can update multiple bytes at once
+	- regs_dbox: can open a mem tab with register value
+	- new window: stack
+	- regs_dbox: added Status Register window (1 button per bit)
+	- mem_dbox: replaced '+A' header by absolute address
+	- mem_dbox: searching capability (find first & find next)
+
+- 14/07/2004, version 1.74: roms
+	Fixes from Lionel, Kevin and Olivier's suggestions:
+	- when scrolling down in the code window, the bar is now reset 
+	(hide first instruction).
+	- reject some SAV images due to IMG_INFO structure (memcmp)
+	- improved popup menu (slow down)
+	- popup menu available when debugger is opened
+	- rebuilt under Linux
+	- fixed bug with SDCB in the VTi's disassembler
+	- modified VTi's disasm to show F-Line ROM calls
+	- completely rewritten debugging layer and added Step Out mode
+
+- 12/07/2004, version 1.73: roms
+	SDL removed for GTK: screen and keyboard support rewritten from 
+	scratch !
+	Debugger raised on event from m68k thread: less CPU intensive but 
+	could be better.
+	HW1 protection is emulated excepted for archive memory limit.
+
+- 07/07/2004, version 1.72: roms
+	Error management connected and updated.
+	Fixed 'restrict to current speed'.
+	Synch item disabled for now.
+	Fixed bugs in state image loading as well as in LCD initialization 
+		(no LCD updates after state image loading).
+	Linkport reworked but seems to be buggy with HW2 ?!
+	Fixed IMG_INFO structure: size was incorrect.
+	Added new field to IMG_INFO: ROM base address.
+	Navigate with arrow keys in the mem dbox.
+	Save of breakpoints in the state image.
+	Fixed code breakpoint which was buggy.
+	Added symbolic debugger (replace address by name; take a look at 0x4f89fe on TI92+).
+
+- 30/06/2004, version 1.71: roms
+	Lionel Debroux's suggestions:
+	- debugger access is slow: improved by pre-loading windows.
+	- can't scroll into the code window: fixed (VTi uses a fixed size list without scrollers)
+	- window focus: fixed (list of the code window has default focus)
+	- shortcuts (F2, G, ...): fixed
+	- key mapping pb (EE, |): fixed
+	- pb with Alpha key: fixed
+	- no key auto-repeat: fixed
+	- long names with the ROM version box: fixed
+	- disasm listing is bad(): fixed 
+		* mv2sr (move xx,sr) at ?? (TI92 1.11)
+		* mvmel (movem) at 0x24b90c (TI92 1.11)
+		* trap# (trap #) at 0x20212e (TI92 1.11)
+	- SR flags (VTi emulation): fixed
+
+	Fixes:
+	- disable menu access when debugger is opened.
+	- I/O bits manipulation functions moved into bits.h and fixed (bit_set/clr buggy) but
+		direct file loading is now broken.
+	- fixed ON key (works and set on/off LCD screen).
+
+	Improvements:
+	- added VTi-style disassembly view
+
+- 05/05/2004, version 1.70: roms
+	Rework in progress.	
+
+=====> TiEmu II project re-starts here <=====
+
+- 02/07/2003, version 1.68: jb
+	Removed GTK+ 1.2 to GTK+ 2.0.
+
+- 02/01/2003, version 1.68:
+	Removed automake support in ./src. Switched to a pure autoconf support.
+	Some warning removed.
+	
+- 30/01/2003, version 1.67:
+	Automake reworked and improved. Bu, I still have these ugly links.
+	Compilable under MinGW for K. Kofler.	
+	
+- 01/11/2002, version 1.66:
+	Automake/Autoconf does not support sub-dirs any longer -> file are 
+	linked now (ugly !).
+	
+- 13/10/2002, version 1.65:
+	Changed to support libticalcs v4.x.x.
+	Compilation fixes.
+	
+- 02/08/2002, version 1.64:
+	Changed to support libticalcs v4.x.x. 
+	Compilation fixes.
+	
+- 02/06/2002, version 1.63b:
+	FLASH upgrade support works fine now.
+	
+- 01/06/2002, version 1.63a:
+	Beta release.
+	
+- 01/06/2002, version 1.62q:
+	GUI slightly modified (wizard, ROM version, ...) and FLASH upgrade
+	management: support unified.
+	
+- 31/05/2002, version 1.62p:
+	Merge with Win32 port attempt.
+	
+- 30/05/2002, version 1.62o:
+	Linkport improved and cleaned-up. Fully works.
+	A FLASH upgraded converted into a ROM image with TiLP works...
+	
+- 30/05/2002, version 1.62m:
+	HW memory support improved but it's still impossible to directly load
+	a FLASH upgrade as a ROM image.
+	
+- 29/05/2002, version 1.62l:
+	Attemp to thread TiEmu and to remove suspend/unsuspend removed: failed.
+	But, some clean-up has been done.
+	
+- 29/05/2002, version 1.62k:
+	Added the ability to change skin.
+	
+- 28/05/2002, version 1.62j:
+	Skin support updated for supporting TiEmu skins (imported skinops.c
+	from JB's SkinEdit)
+	FLASH upgrade support to improve (if we load directly an upgrade,
+	this will not work but it works after a ROM image).
+	GUI clean-up finished.
+	
+- 27/05/2002, version 1.62i:
+	find_pc function modified and FLASH upgrade support improved.
+	Link box upgraded.
+	Skin support to finish.
+	
+- 26/05/2002, version 1.62h:
+	find_pc function modified and FLASH upgrade support improved.
+	
+- 22/05/2002, version 1.62g:
+	ROM image overhaul.
+	
+- 21/05/2002, version 1.62f:
+	GUI clean-up.
+	
+- 18/05/2002, version 1.62e:
+	GUI clean-up.
+	
+- 16/05/2002, version 1.62d:
+	TI HW clean-up.
+	
+- 15/05/2002, version 1.62c (1.64):
+	TI HW clean-up.
+	
+- 14/05/2002, version 1.62b (1.63):
+	TI HW clean-up.
+	
+- 13/05/2002, version 1.62a (1.62):
+	TI HW clean-up.
+	
+- 12/05/2002, version 1.61:
+	GlobInf structure modified.
+	
+- 11/05/2002, version 1.60:
+	Clean-up finished.
+	
+- 10/05/2002, version 1.59:
+	Headers modified. Clean-up of files.
+	
+- 09/05/2002, version 1.58:
+	Project tree completely rebuilt: libti68k & tiemu are now a single
+	package with sub-folders.
+	
+---	
+Some explanations about the version number: the version number has this form:
+X.XX_X.XX where X is the major number and XX the minor one.
+An even number is a stable version whereas an odd number is an unstable/devel version.
+The first X.XX shows the version of the GtkTiEmu interface and the last X.XX shows the version of the libti68k used.	
+---	
+	
+- 07/05/2002, version 1.57_1.4.3:
+	Scaling support finished (for displays with high resolution).
+	
+- 20/04/2002, version 1.56b_1.4.3:
+	Screenshot code rewritten according to the new rendering system.
+	
+- 16/04/2002, version 1.56a_1.4.3:
+	skn_loader.c: overhaul &  clean-up.
+	sdl_specific.c: rendering completely rewritten with pure SDL functions.
+	Tested on a PC 233MHz: speed & mem use are slightly greater.
+
+- 20/02/2002, version 1.55_1.4.3:
+	Libti68k & TiEmu modified for supporting the liticables-v3.x.x
+	
+- 28/01/2002, version 1.54_1.4.2:
+	Applied the JB's patch for compiling GtkTiEmu on Linux/PPC (problem
+	of endian-ness with skins and some other stuffs).
+
+=====> TiEmu II project starts here <=====
+	
+- 21/11/2001, version 1.53_1.4.2:
+	Direct internal linkport with TiLP. Implemented but disabled.
+	LCD: better gray scales/contrast management (no orange color !)
+
+- 19/11/2001, version 1.52_1.4.1:
+	Compiled under Win32. Debugger has been re-enabled under Win32 since
+	it works fine now.
+
+- 18/11/2001, version 1.51_1.4.0:
+	Send file finished.
+	Debugger dbox slightly improved (unsuspend).
+
+- 15/11/2001, version 1.50_1.3.9:
+	Removed pthread support.
+	Send file function in progress.
+
+- 14/11/2001, version 1.49_1.3.8:
+	It it not necessary to restart emulator if we change the link cable 
+	type.
+	Progress bar & Msgbox added.
+
+- 12/11/2001, version 1.48_1.3.5:
+	Recompiled for supporting modified libti68k.
+
+- 11/11/2001, version 1.47_1.3.5:
+	Cleanup of the debugger dbox.
+	Hidden config files (~/.tiemu*) moved into the ~/.tiemu/ 
+	hidden directory.	
+
+- 10/11/2001, version 1.46_1.3.5:
+	Cleanup of dialog boxes: faster.
+	Added a check for SDL in configure
+
+- 10/11/2001, version 1.45_1.3.5:
+	Cleanup of headers.
+
+- 10/11/2001, version 1.44_1.3.5:
+	Changed any malloc+strcat/cpy to g_strconcat: safer & shorter.
+
+- 05/11/2001, version 1.43_1.3.5:
+	Upgrading to Automake/Autoconf v2.52
+	Upgrading to libticables-v2.x.x
+
+To do:
+	GUI improved (faster, better display of boxes).
+	RC file management updated & improved (sections).
+	Link box upgraded.
+
+- 21/06/2001, version 1.42_1.3.3:
+	Compiled under Win32.
+	Skin/no skin resizing works (SDL does not crashes any longer).
+
+- 20/06/2001, version 1.41_1.3.2:
+	Code source have been cleaned.
+	Some improvements and minor bug fixes.
+
+- 19/06/2001, version 1.40_1.3.0:
+	A ROM wizard has been added for an easy startup.
+
+- 18/06/2001, version 1.39_1.3.0:
+	ROM management improved and fsel dboxes removed from callbacks.c
+	Trying to implement skin/no skin but SDL crashes.
+	About dbox updated and fixed.
+	Implemented a ROM wizard at startup.
+	A bug (Linux) in the inst_paths.base_dir fixed
+
+- 14/06/2001, version 1.38_1.2.9:
+	a FLASH upgrade can be used at startup.
+
+- 13/06/2001, version 1.37_1.2.9:
+	jpeg works under Win32 (HAVE_LIBJPEG !).
+	menu item bug fixed (SkinXX)
+
+- 12/06/2001, version 1.36_1.2.9:
+	Internationalization.
+
+- 11/06/2001, version 1.35_1.2.8:
+	TI89 keyboard is now VTi compatible.
+
+- 10/06/2001, version 1.34_1.2.7:
+	The update_keys function (SDL) did not return iKeyWasPressed.
+	TI89 keymap fixed.
+
+- 09/06/2001, version 1.33_1.2.6:
+	GtkTiEmu exits correctly now. Thanks to JB, my Debian packager, for
+	the idea which allows me to circumvent the pb.
+
+- 05/06/2001, version 1.32_1.2.3: 
+	globInf struct format modified so that rom/ram/tibFile strings are unlimited in size.
+	It is now possible to load a TIB file from the 'Set ROM' dbox.
+	If GtkTiEmu does not find a ROM at startup, it display a fileselection dbox.
+
+- 02/06/2001, version 1.31_1.2.0: 
+	hardware emulation improved. 
+	Listing of available ROMs is now more efficient thanks to a cache file.
+
+- 01/06/2001, version 1.31_1.1.9: 
+	a FLASH upgrade can now be loaded.
+
+- 26/05/2001, version 1.30_1.1.8: 
+	'Send file to GtkTiEmu' item implemented. 
+	Some bugs have been fixed in the debugger but it still crashes under Win32.
+
+- 25/05/2001, version 1.29_?.?.?: 
+	bug fix in the ROM version dialog box (fstat path).
+
+- 23/05/2001, version 1.28_?.?.?: 
+	the bug which crashes the debugger (Win32 version) has been insulated but not fixed yet.
+
+- 22/05/2001, version 1.27_1.1.5: 
+	command shell added. 
+	Load file capability to do/improve.
+
+- 21/05/2O01, version 1.26_?.?.?: 
+	Win32 version have pbs under WindowsNT4. Fixed.
+
+- 20/05/2001, version 1.25_1.1.4: 
+	finish to port GtkTiEmu under Win32. 
+	Screenshot pb under Win32 fixed but the debugger still does not work !
+
+- 19/05/2001, version 1.24_1.1.4: 
+	screenshot options improved: the screenshot file can now be chosen and auto incremented.
+Scaling to do...
+
+- 19/05/2001, version 1.23_1.1.4: 
+	F9/F10 keys fixed in SDL version. 
+	TI89 screen works fine now as well as the skin redrawing (TI89 <->TI92 toggling). Nethertheless, LCD/Skin toggling does not work very well.
+	Contrast fixed. 
+	Screenshot tested in both version, all formats, all depths and all calcs: it'a all right !
+
+- 18/05/2001, version 1.22_1.1.4: 
+	BMP format added. 
+	I have tested all possible color depths (8/16/24 colors) for both the X11 and the SDL version.
+	Screenshots have been tested with various file format, various screenshot size and various color depth.
+
+- 17/05/2001, version 1.21_1.1.4: 
+	screenshot implemented in SDL version. 
+	SDL version works now in 8 bit mode.
+
+- 16/05/2001, version 1.20_1.14: 
+	SDL version works fine in 24/32 planes. 
+	Gray scale management finished.
+
+- 15/05/2001, version 1.19_1.1.4: 
+	SDL version being improved for grey scale support.
+
+- 15/05/2001, version 1.18_1.1.4: 
+	minor bug fixes in X11 screenshots and different color planes tested (8, 16 and 24 bits per pixels). 
+	X11 version completely cleaned.
+
+- 14/05/2001, version 1.17_1.1.4: 
+	check/radio buttons in the popup menu works fine now. 
+	Screenshots works in LCD & WND and in XPM/PCX/JPG.
+
+- 13/05/2001, version 1.16_1.1.4: 
+	SDL version updated.
+
+- 12/05/2001, version 1.15_1.1.4: 
+	screenshot implemented in B&W for X11. Does not work in color mode.
+
+- 10/05/2001, version 1.14_1.1.4: 
+	little bug fix with the popup menu (ESC). 
+	Buttons in items still have to be fixed.
+
+- 08/05/2001, version 1.13_1.1.4: 
+	ti68k library headers files have changed their location
+
+- 07/05/2001, version 1.12_1.1.3: 
+	contrast added.
+
+- 06/05/2001, version 1.11_1.1.2: 
+	dumping of RAM/ROM added.
+
+- 06/05/2001, version 1.10_1.1.1: 
+	'Set ROM version' function implemented.
+
+- 05/05/2001, version 1.09: 
+	Infos dbox improved.
+
+- 05/05/2001, version 1.08: 
+	reset calc works fine now. 
+
+- 04/05/2001, version 1.07: 
+	pb with loadState fixed. Accelator keys added to all dialog boxes.
+
+- 01/05/2001, version 1.06: 
+	loadState does not work with TI89 calc.
+
+- ??/05/2000: version 1.00: 
+	start of project
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..b42a17a
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  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.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/LICENSES b/LICENSES
new file mode 100644
index 0000000..87e6eab
--- /dev/null
+++ b/LICENSES
@@ -0,0 +1,35 @@
+*----------------- XTiger ----------------------*
+
+Original author of (X)tiger: Jonas Minnberg
+Homepage for Tiger: http://www.nada.kth.se/~md94-jmi/tiger/
+License: GPL
+
+*------------------- UAE -----------------------*
+
+Original author of UAE: Bernd Schmidt
+Homepage for UAE: http://freiburg.linux.de/~uae/
+License: GPL
+
+*----------------- PedRom ----------------------*
+
+Author: PpHd
+Homepage: http://www.timetoteam.fr.st
+License: GPL (version 2 or later)
+
+Fully-GPL version by Kevin Kofler: <www.tigen.org/kevin.kofler/ti89prog/pedrom-ld-tigcc.zip>
+
+--------------- GDB / Insight ------------------*
+
+Copyright holder: Free Software Foundation
+Homepage for GDB: http://sourceware.org/gdb/
+Homepage for Insight: http://sourceware.org/insight/
+License: GPL (version 2 or later)
+
+-------------- Tcl / Tk / itcl -----------------*
+
+Copyright holders: Regents of the University of
+  California, Sun Microsystems, Inc.,
+  Scriptics Corporation, ActiveState Corporation,
+  Cadence Design Systems, Inc. and other parties
+Homepage: http://tcl.tk
+License: Tcl/Tk License (GPL-compatible)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..1af2932
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,49 @@
+## Process this file with automake to produce Makefile.in
+
+# subdirectories to scan
+SUBDIRS = build glade help misc pedrom pixmaps po skins src
+
+if USE_GROFF
+SUBDIRS += man
+endif
+
+dist_pkgdata_DATA = COPYING RELEASE AUTHORS LICENSES
+
+EXTRA_DIST = BUGS README.* TODO docs desktop sdk po/copy.bat po/TRANSLATORS install.bat
+
+# install hook to install prebuilt Manpage.txt if groff is not available
+install-data-local:
+if !USE_GROFF
+	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir) 
+	$(INSTALL_DATA) $(srcdir)/man/Manpage.txt $(DESTDIR)$(pkgdatadir)/Manpage.txt
+endif
+
+# custom targets
+install-without-tcl-tk:
+if NO_GDB
+	$(MAKE) install DESTDIR="$(DESTDIR)"
+else
+if USE_GROFF
+	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins man" DESTDIR="$(DESTDIR)"
+else
+	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins" DESTDIR="$(DESTDIR)"
+endif
+	cd src && $(MAKE) install-without-tcl-tk DESTDIR="$(DESTDIR)"
+endif
+
+install-without-tcl-tk-itcl:
+if NO_GDB
+	$(MAKE) install DESTDIR="$(DESTDIR)"
+else
+if USE_GROFF
+	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins man" DESTDIR="$(DESTDIR)"
+else
+	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins" DESTDIR="$(DESTDIR)"
+endif
+	cd src && $(MAKE) install-without-tcl-tk-itcl DESTDIR="$(DESTDIR)"
+endif
+
+regsvr:
+	cd src && $(MAKE) regsvr DESTDIR="$(DESTDIR)"
+
+ACLOCAL_AMFLAGS = -I m4
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..8a49791
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,830 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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@
+ at USE_GROFF_TRUE@am__append_1 = man
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(dist_pkgdata_DATA) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/config.h.in $(srcdir)/tiemu.lsm.in \
+	$(srcdir)/tiemu.spec.in $(top_srcdir)/configure \
+	$(top_srcdir)/src/Makefile.in ABOUT-NLS AUTHORS COPYING \
+	ChangeLog INSTALL NEWS TODO compile config.guess config.rpath \
+	config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = src/Makefile tiemu.lsm tiemu.spec
+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__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgdatadir)"
+dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_pkgdata_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = build glade help misc pedrom pixmaps po skins src man
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+
+# subdirectories to scan
+SUBDIRS = build glade help misc pedrom pixmaps po skins src \
+	$(am__append_1)
+dist_pkgdata_DATA = COPYING RELEASE AUTHORS LICENSES
+EXTRA_DIST = BUGS README.* TODO docs desktop sdk po/copy.bat po/TRANSLATORS install.bat
+ACLOCAL_AMFLAGS = -I m4
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(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 '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+src/Makefile: $(top_builddir)/config.status $(top_srcdir)/src/Makefile.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+tiemu.lsm: $(top_builddir)/config.status $(srcdir)/tiemu.lsm.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+tiemu.spec: $(top_builddir)/config.status $(srcdir)/tiemu.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+	@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+	  $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
+	done
+
+uninstall-dist_pkgdataDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(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
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(pkgdatadir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local install-dist_pkgdataDATA
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+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 mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-dist_pkgdataDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+	dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
+	distclean distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-data-local \
+	install-dist_pkgdataDATA 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 mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-dist_pkgdataDATA
+
+
+# install hook to install prebuilt Manpage.txt if groff is not available
+install-data-local:
+ at USE_GROFF_FALSE@	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir) 
+ at USE_GROFF_FALSE@	$(INSTALL_DATA) $(srcdir)/man/Manpage.txt $(DESTDIR)$(pkgdatadir)/Manpage.txt
+
+# custom targets
+install-without-tcl-tk:
+ at NO_GDB_TRUE@	$(MAKE) install DESTDIR="$(DESTDIR)"
+ at NO_GDB_FALSE@@USE_GROFF_TRUE@	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins man" DESTDIR="$(DESTDIR)"
+ at NO_GDB_FALSE@@USE_GROFF_FALSE@	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins" DESTDIR="$(DESTDIR)"
+ at NO_GDB_FALSE@	cd src && $(MAKE) install-without-tcl-tk DESTDIR="$(DESTDIR)"
+
+install-without-tcl-tk-itcl:
+ at NO_GDB_TRUE@	$(MAKE) install DESTDIR="$(DESTDIR)"
+ at NO_GDB_FALSE@@USE_GROFF_TRUE@	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins man" DESTDIR="$(DESTDIR)"
+ at NO_GDB_FALSE@@USE_GROFF_FALSE@	$(MAKE) install SUBDIRS="build glade help misc pedrom pixmaps skins" DESTDIR="$(DESTDIR)"
+ at NO_GDB_FALSE@	cd src && $(MAKE) install-without-tcl-tk-itcl DESTDIR="$(DESTDIR)"
+
+regsvr:
+	cd src && $(MAKE) regsvr DESTDIR="$(DESTDIR)"
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..cdc3b2e
--- /dev/null
+++ b/NEWS
@@ -0,0 +1 @@
+See <http://lpg.ticalc.org/prj_tiemu>
\ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 0000000..70e715b
--- /dev/null
+++ b/README
@@ -0,0 +1,17 @@
+				*************
+				*  TiEmu 3  *
+				*************
+
+List of text files:
+
+- AUTHORS: list of authors
+- COPYING: license
+- LICENSES: list of program included
+- README.linux: specific linux instructions
+- README.win32: specific windows instructions
+- RELEASE: what's changed in this release
+- TODO: work to do or planned
+
+Texas Instruments and TI are trademarks of  Texas Instruments Incorporated.
+For more informations: <http://education.ti.com/educationportal/sites/US/nonProductSingle/global_trademarks.html>
+This document has been written independantly of Texas Instruments.
\ No newline at end of file
diff --git a/README.linux b/README.linux
new file mode 100644
index 0000000..46ad4ac
--- /dev/null
+++ b/README.linux
@@ -0,0 +1,71 @@
+				*****************
+				*     TiEmu     *
+				* Linux version *
+				*****************
+
+
+
+REQUIREMENTS
+------------
+
+ - A UNIX computer (Intel x86 or PPC) and C compiler (gcc)
+ - X11 (X Window System)
+ - GTK+ 2.6 from <http://www.gtk.org>
+ - ticables2, tifiles2 and ticalcs2 libraries from the 
+	TiLP 2 project <http://tilp.info>
+
+
+INSTALLATION
+------------
+
+At first, you must have the ticables and ticalcs libraries installed. See
+the documentation of these libraries for the installation procedure.
+
+Untar the tiemu-X.XX.tar.gz archive (tar -xvzf), change directory to
+tiemu directory.
+
+Go the tiemu directory and type './configure' in order to be sure
+that all it is OK. If you want to use KDE file dialogs, run 
+'./configure --with-kde' instead. 
+Next, type 'make' to make a binary for your machine.
+
+If you want does not want to use GDB as debugger or use the odl one (tiemu2),
+run './configure --disable-gdb'.
+
+If the compile suceeds without any errors, you can type 'make install' to
+install the binary in /usr/local/bin. This will also copy some necessary
+files to /usr/local/share/tiemu and will install the manpage and the
+help.
+
+If you already have some TiEmu images, you will have to manually copy them
+to the /usr/locale/share/tiemu/images directory.
+
+
+USAGE
+-----
+
+Type 'tiemu' for using it. TiEmu accepts some command line parameters.
+Do 'tiemu --help' or read the manpage by 'man tiemu'.
+
+
+AVAILABILITY
+------------
+
+  http://lpg.ticalc.org/prj_tiemu/index.html
+
+
+COPYRIGHT
+---------
+
+TiEmu is Copyright (C) 2000-2009 by the TiEmu team <tiemu-users at lists.sf.net>
+
+Copying is allowed under the terms of GNU General Public License (LGPL).  
+See the file COPYING for more details.
+
+
+---------------------------------------------------------------------------
+Please report any bugs, questions, ...  (please give us your platform, your 
+calculator type (with ROM version) and your link cable model).
+
+
+The TiEmu team <tiemu-users at lists.sf.net>
diff --git a/README.win32 b/README.win32
new file mode 100644
index 0000000..fa8bfd1
--- /dev/null
+++ b/README.win32
@@ -0,0 +1,100 @@
+				*****************
+				*     TiEmu	*
+				* Win32 version *
+				*****************
+
+
+
+REQUIREMENTS
+------------
+
+ - a PC with a 450MHz Pentium-class processor and 32MB of RAM
+ - a Windows computer: Windows 95/98/Me or Windows NT4/2000/XP/Vista (better)
+ - the GTK+ 2.6 libraries
+    Location: <http://prdownloads.sourceforge.net/gladewin32/gtk-win32-2.6.8-rc1.exe?download>
+	
+Note: if you are using 'The GiMP', you may encounter DLL's problems...
+		The GTK+ package (1) provided with the GiMP may not be fully compatible with one used by TiLP/TiEmu.
+		On the other hand, the package (2) requested by TiLP/TiEmu is compatible with the GiMP.
+		Thus, if you are using The GiMP, you are strongly encouraged to uninstall (1) and install (2).
+
+
+NOTES
+-----
+
+1�) This setup may download & install some extra libraries (GTK+ 2.6). 
+
+The GTK+ package includes the Wimp (Windows IMPersonator) theme engine which gives 
+Windows look & feel (includes XP theming). Is also included the GTK theme selector.
+You may need to use it on non-NT systems if you get a lot of warnings about a font. 
+Simply disable the WiMP theme for another one.
+
+2�) If anyone is getting one of these:
+- ** WARNING **: Couldn't load font "MS Sans Serif 8" falling back to "Sans 8"
+- ** ERROR **: file shape.c line 75: assertion failed: (glyphs->num_glyphs > 0)
+or any other warning or error message regarding fonts/glyphs, the fix is to
+open your C:\Program Files\Shared Files\Gtk\2.0\etc\gtk-2.0\gtkrc and to add this:
+	style "user-font"
+	{
+	font_name="Arial"
+	}
+	widget_class "*" style "user-font"
+This forces GTK+ to use a compatible font (Arial) and reportedly fixes both
+the aforementioned problems, and probably others too.
+
+3�) If you are getting any errors with DLLs, such as "The procedure entry point
+atk_relation_set_add_relation_by_type could not be located in the dynamic link
+library libatk-1.0-0.dll", make sure you have one and only ONE version of the
+GTK+ DLLs. If unsure, remove all GTK+ packages and install it again.
+
+4�) This setup will:
+- copy USB drivers into C:\Program Files\{Common Files}\LPG Shared\drivers\usb,
+- and register them into the Plug&Play database.
+
+Simply plug your link cable: Windows should detect a new device and automatically
+install it.
+
+Please note these drivers are not compatible with Ti-Connnect(tm).
+
+5�) This setup will install the DhaHelper driver for Windows NT4/2000/XP machines.
+This step may require an administrator account (at least for NT4).
+You may need to REBOOT your machine after installation (if you plan to 
+use a parallel or serial link cable).
+
+DhaHelper is copyrighted (c) 2004 Sascha Sommer and released under GPL license.
+Source code is available from <http://svn.mplayerhq.hu/mplayer/trunk/vidix/dhahelperwin/>.
+
+6�) The tiemu3-nogdb setup will install the GNU's 'wget' utility for download of GTK+
+(http://xoomer.virgilio.it/hherold/).
+
+7�) This setup will install/update the TiLP framework (libti* and drivers) which is
+installed as shared components since TiLP v1.07, TiEmu v3.01 or GFM v1.00. 
+Any software using the TiLP framework will take advantage of this update.
+
+USAGE
+-----
+
+The installer automatically creates program entries in the Windows Startup menu.
+
+
+AVAILABILITY
+------------
+
+  http://lpg.ticalc.org/prj_tiemu
+
+
+COPYRIGHT
+---------
+
+TiEmu is Copyright (C) 2000-2009 by the TiEmu team <gtktiemu-users at lists.sf.net>
+
+Copying is allowed under the terms of GNU General Public License (LGPL).  
+See the file COPYING for more details.
+
+
+---------------------------------------------------------------------------
+Please report any bugs, questions, ...  (please give me your platform, your
+calculator type (with ROM version) and your link cable model).
+
+
+The TiEmu team.
diff --git a/RELEASE b/RELEASE
new file mode 100644
index 0000000..2760544
--- /dev/null
+++ b/RELEASE
@@ -0,0 +1,69 @@
+				[ Release notes for TiEmu3 ]
+
+
+
+Previous version: 3.02		(21/12/2007)
+Current version:  3.03		(08/05/2009)
+
+SubVersion (CVS) revision: $Id: RELEASE 2042 2006-05-07 07:46:23Z roms $
+
+TiEmu is available for 3 platforms:
+Linux (GTK), Windows (GTK), Mac OS X (GTK)
+
+[ In order to use TI's BlackLink serial cables or home-made serial or parallel
+cables on any NT-based version of Windows (Windows NT 4, Windows 2000, Windows
+XP, Windows 2003 or any newer version of Windows), you'll need to install the
+DhaHelper driver. The installer for TiEmu 3 without GDB installs this driver
+automatically. The installer for TiEmu 3 with GDB currently doesn't. ]
+
+An easy way to install the above drivers is to install TiLP 2 for Windows.
+For the other link cables / operating systems, no driver is needed.
+
+
+New capabilities:
+-----------------
+
+	- none
+	
+
+Improvements:
+-------------
+
+	- removed obsolete "virtual" link cable
+	- allow automatic changing of link cable setting when requesting a direct file transfer
+	- adding CR/LF every 16 chars in the link logging window
+	- added i18n support to some strings
+
+		
+Bug fixes:
+----------
+
+	- fixed crash when debugging TIGCC program with GDB with low-level debugger in dock mode
+	- fixed dock window enabling/disabling not to keep the engine running across the restart
+	- fixed InnoSetup installer for use with GTK>=2.10.x
+	- don't allow deleting of last RAM tab to avoid resizing of code/dock window
+	- fixed build with GCC 4.3
+	- don't shutdown screen when reading battery status
+	don't resize code windows whenever cycle counter change
+	- fixed disassembling of some FLINE instructions like 0xf800 (lionel)
+	- fixed disassembling of BTST instruction (replaced by BRA)
+	- fixed keynames.c build on OS X
+	- link with g++ if --with-kde (fixes --with-kde build on OS X)
+	- fixed use of wrong free function (g_free where gtk_tree_path_free is required) causing crash with GTK+ 2.14
+	- fixed builtin Tk not working when built against the latest X.Org X11 (Tk bug 2010422)
+	- merged Lionel's patch about link logging: ; take into account buffer overflow
+	- really clears link logging buffer when clicking the 'Clear' button
+	- merged Lionel's patch: allow mix-up of images created by TiEmu 32-bits and TiEmu 64-bits 
+		due to a bug in IMG_INFO structure
+	- fixed Lionel's logging problem (missing values on linkport output
+	- fixed "libticables2 access violation" which appears when changing the link cable under some circumstances
+	- don't allow launching of debugger if preloading has not finished yet => crash
+	- fix the "Default" button when importing a Titanium 89u (default to HW3 until we sort out HW4's actual speed, not HW2)
+	- if link cable reconfiguring fails, fallback to null cable & port
+	- merged Lionel's patch: fix buffer overflow in the disasm routine
+	
+	
+Notes:
+------
+
+	- pressing Ctrl+Alt+Del makes TiEmu unresponsive. Press Ctrl again...
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..2c0e84b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,62 @@
+Planned features:
+-----------------
+
+* use the contrast field of skin
+* tracing/logging of mem access or others
+
+YaroNet forum:
+--------------
+
+* = to do
+x = done
+
+1) Topic <http://www.yaronet.com/posts.php?sl=59&s=92954&p=10>:
+---------------------------------------------------------------
+
+%%%%%%% post 001 (All):
+* Si on appuie sur F12 lors du chargement (preloading debugger), le menu des ROMs se pr�sente, mais on peut choisir ce qu'on veut, 
+�a ne change strictement rien, et le mod�le de calc par d�faut se charge. Le clignotement du curseur dans HOME est alors anormal (trop rapide), 
+mais r�gulier.
+
+%%%%%%% post 297 (Pollux):
+- d�buggeur 
+ ? F5 sur un breakpoint ne fait que relancer le debugger sans rien ex�cuter 
+ * F8 foire qd la fonction skipp�e contient un breakpoint (freeze jusqu'� ce qu'on fasse F11) 
+
+2) Topic <http://yaronet.com/posts.php?s=104752>:
+-------------------------------------------------
+
+%%%%%%% post 215 (Pollux):
+<<
+- ce serait bien que comme sous VTI les breakpoints ne soient pas perdus quand on restaure le Calculator State, typiquement si on a un 
+plantage on veut examiner la m�moire, ajouter quelques breakpoints et recharger l'�tat pr�c�dent : c'est impossible de faire �a si les 
+breakpoints sont restaur�s  :( 
+
+panneau Breakpoints :
+- Add breakpoint : appuyer sur entr�e =/> OK
+panneau Memory :
+- quand on fait Ctrl-A l'onglet courant se d�place d'un cran vers la gauche
+- il faut faire deux fois Ctrl-N pour passer au r�sultat suivant (la premi�re s�lectionne la ligne courante, et la deuxi�me passe 
+effectivement � l'occurrence suivante)
+- ce serait sympa d'avoir Add data breakpoint dans le clic droit (avec si possible Word comme taille par d�faut, comme �a dans 90% des cas 
+il suffit de faire OK pour cr�er le breakpoint)
+- petit d�tail : si le clic du milieu pouvait fermer l'onglet ce serait pratique (actuellement pour fermer 3 tabs d'un coup il faut les 
+activer puis les fermer chacun � leur tour)
+panneau Heap :
+- ce serait super, super, pratique de pouvoir cliquer sur la colonne Address pour trier par adresse croissante
+- ce serait pas mal aussi d'avoir un "View end of handle" pour voir o� finit le handle
+
+(j'esp�re que je t'emb�te pas trop roms %) ) 
+>>
+
+%%%%%%% post 216 (Folco):
+<<
+Il y aurait les raccourcis claviers � rendre "globaux" surla fen�tre, parce que actuellement, il faut quand m�me prendre la souris pour 
+s�lectionner la partie avec laquelle on veut interragir, on perd donc 90% de l'int�r�t des raccourcis
+>>
+
+
+3) 
+--
+
+roms: il semblerait que le debugger s'ouvre plus vite avec un GTK r�cent qu'avec le 2.6, du moins sous Vista. Semble �tre le contraire sous XP.
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..276a008
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,4762 @@
+##   -*- autoconf -*-
+
+dnl    This file is part of the KDE libraries/packages
+dnl    Copyright (C) 1997 Janos Farkas (chexum at shadow.banki.hu)
+dnl              (C) 1997,98,99 Stephan Kulow (coolo at kde.org)
+dnl    Patches for TiEmu Copyright (C) 2005-2007 Kevin Kofler
+
+dnl    This file is free software; you can redistribute it and/or
+dnl    modify it under the terms of the GNU Library General Public
+dnl    License as published by the Free Software Foundation; either
+dnl    version 2 of the License, or (at your option) any later version.
+
+dnl    This library is distributed in the hope that it will be useful,
+dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl    Library General Public License for more details.
+
+dnl    You should have received a copy of the GNU Library General Public License
+dnl    along with this library; see the file COPYING.LIB.  If not, write to
+dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+dnl    Boston, MA 02111-1307, USA.
+
+dnl IMPORTANT NOTE:
+dnl Please do not modify this file unless you expect your modifications to be
+dnl carried into every other module in the repository. If you decide that you
+dnl really want to modify it, contact coolo at kde.org mentioning that you have
+dnl and that the modified file should be committed to every module.
+dnl
+dnl Single-module modifications are best placed in configure.in for kdelibs
+dnl and kdebase or configure.in.in if present.
+
+dnl ------------------------------------------------------------------------
+dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
+dnl thanks to Raja R Harinath.
+dnl ------------------------------------------------------------------------
+dnl
+ifdef([_AC_PATH_X_XMKMF],[],
+   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
+ifdef([AC_OUTPUT_SUBDIRS],[],
+   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
+
+# KDE_PATH_X_DIRECT
+dnl Internal subroutine of AC_PATH_X.
+dnl Set ac_x_includes and/or ac_x_libraries.
+AC_DEFUN([KDE_PATH_X_DIRECT],
+[if test "$ac_x_includes" = NO; then
+  # Guess where to find include files, by looking for this one X11 .h file.
+  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+  # First, try using that file with no special directory specified.
+AC_TRY_CPP([#include <$x_direct_test_include>],
+[# We can compile using X headers with no special include directory.
+ac_x_includes=],
+[# Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+  for ac_dir in               \
+    /usr/X11/include          \
+    /usr/X11R6/include        \
+    /usr/X11R5/include        \
+    /usr/X11R4/include        \
+                              \
+    /usr/include/X11          \
+    /usr/include/X11R6        \
+    /usr/include/X11R5        \
+    /usr/include/X11R4        \
+                              \
+    /usr/local/X11/include    \
+    /usr/local/X11R6/include  \
+    /usr/local/X11R5/include  \
+    /usr/local/X11R4/include  \
+                              \
+    /usr/local/include/X11    \
+    /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 \
+    ; \
+  do
+    if test -r "$ac_dir/$x_direct_test_include"; then
+      ac_x_includes=$ac_dir
+      break
+    fi
+  done])
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+  # Check for the libraries.
+
+  test -z "$x_direct_test_library" && x_direct_test_library=Xt
+  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS="$LIBS"
+  LIBS="-l$x_direct_test_library $LIBS"
+AC_TRY_LINK(, [${x_direct_test_function}()],
+[LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=],
+[LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+    /usr/X11/lib          \
+    /usr/X11R6/lib        \
+    /usr/X11R5/lib        \
+    /usr/X11R4/lib        \
+                          \
+    /usr/lib/X11          \
+    /usr/lib/X11R6        \
+    /usr/lib/X11R5        \
+    /usr/lib/X11R4        \
+                          \
+    /usr/local/X11/lib    \
+    /usr/local/X11R6/lib  \
+    /usr/local/X11R5/lib  \
+    /usr/local/X11R4/lib  \
+                          \
+    /usr/local/lib/X11    \
+    /usr/local/lib/X11R6  \
+    /usr/local/lib/X11R5  \
+    /usr/local/lib/X11R4  \
+                          \
+    /usr/X386/lib         \
+    /usr/x386/lib         \
+    /usr/XFree86/lib/X11  \
+                          \
+    /usr/lib              \
+    /usr/local/lib        \
+    /usr/unsupported/lib  \
+    /usr/athena/lib       \
+    /usr/local/x11r5/lib  \
+    /usr/lpp/Xamples/lib  \
+    /lib/usr/lib/X11	  \
+                          \
+    /usr/openwin/lib      \
+    /usr/openwin/share/lib \
+    ; \
+do
+dnl Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done])
+fi # $ac_x_libraries = NO
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find a file (or one of more files in a list of dirs)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_FIND_FILE],
+[
+$3=NO
+for i in $2;
+do
+  for j in $1;
+  do
+    echo "configure: __oline__: $i/$j" >&AC_FD_CC
+    if test -r "$i/$j"; then
+      echo "taking that" >&AC_FD_CC
+      $3=$i
+      break 2
+    fi
+  done
+done
+])
+
+dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
+dnl	if-not-found, test-parameter)
+AC_DEFUN([KDE_FIND_PATH],
+[
+   AC_MSG_CHECKING([for $1])
+   if test -n "$$2"; then
+        kde_cv_path="$$2";
+   else
+        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
+
+        AC_CACHE_VAL(kde_cv_path_$kde_cache,
+        [
+        kde_cv_path="NONE"
+	dirs="$3"
+	kde_save_IFS=$IFS
+	IFS=':'
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+        done
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/$1"; then
+	    if test -n "$5"
+	    then
+              evalstr="$dir/$1 $5 2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/$1"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/$1"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+        ])
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
+   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+      AC_MSG_RESULT(not found)
+      $4
+   else
+      AC_MSG_RESULT($kde_cv_path)
+      $2=$kde_cv_path
+
+   fi
+])
+
+AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
+[
+    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+])
+])
+
+AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
+[
+    AC_MSG_WARN([No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+])
+])
+
+
+AC_DEFUN([KDE_CHECK_UIC_FLAG],
+[
+    AC_MSG_CHECKING([whether uic supports -$1 ])
+    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
+    [
+        cat >conftest.ui <<EOT
+        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+        ac_uic_testrun="$UIC -$1 $2 conftest.ui >/dev/null"
+        if AC_TRY_EVAL(ac_uic_testrun); then
+            eval "kde_cv_prog_uic_$kde_cache=yes"
+        else
+            eval "kde_cv_prog_uic_$kde_cache=no"
+        fi
+        rm -f conftest*
+    ])
+
+    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+        AC_MSG_RESULT([yes])
+        :
+        $3
+    else
+        AC_MSG_RESULT([no])
+        :
+        $4
+    fi
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find the meta object compiler and the ui compiler in the PATH,
+dnl in $QTDIR/bin, and some more usual places
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_MOC_UIC],
+[
+   qt_bindirs=""
+   for dir in $kde_qt_dirs; do
+      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
+   done
+   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
+   if test ! "$ac_qt_bindir" = "NO"; then
+      qt_bindirs="$ac_qt_bindir $qt_bindirs"
+   fi
+
+   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
+   if test -z "$UIC_NOT_NEEDED"; then
+     KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
+     if test -z "$UIC" ; then
+       KDE_UIC_ERROR_MESSAGE
+       exit 1
+     elif test $kde_qtver = 3; then
+       KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
+       KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
+
+       if test x$ac_uic_supports_libpath = xyes; then
+           UIC="$UIC -L \$(kde_widgetdir)"
+       fi
+       if test x$ac_uic_supports_nounload = xyes; then
+           UIC="$UIC -nounload"
+       fi
+     fi
+   else
+     UIC="echo uic not available: "
+   fi
+
+   AC_SUBST(MOC)
+   AC_SUBST(UIC)
+
+   UIC_TR="i18n"
+   if test $kde_qtver = 3; then
+     UIC_TR="tr2i18n"
+   fi
+
+   AC_SUBST(UIC_TR)
+])
+
+AC_DEFUN([KDE_1_CHECK_PATHS],
+[
+  KDE_1_CHECK_PATH_HEADERS
+
+  KDE_TEST_RPATH=
+
+  if test -n "$USE_RPATH"; then
+
+     if test -n "$kde_libraries"; then
+       KDE_TEST_RPATH="-R $kde_libraries"
+     fi
+
+     if test -n "$qt_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+     fi
+
+     if test -n "$x_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+     fi
+
+     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+  fi
+
+AC_MSG_CHECKING([for KDE libraries installed])
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_ERROR([your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log.])
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+  kde_result=done
+else
+  kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+KDE_SET_PATHS($kde_result)
+
+])
+
+AC_DEFUN([KDE_SET_PATHS],
+[
+  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+	kde_htmldir=\"$kde_htmldir\" \
+	kde_appsdir=\"$kde_appsdir\" \
+	kde_icondir=\"$kde_icondir\" \
+	kde_sounddir=\"$kde_sounddir\" \
+	kde_datadir=\"$kde_datadir\" \
+	kde_locale=\"$kde_locale\" \
+	kde_cgidir=\"$kde_cgidir\" \
+	kde_confdir=\"$kde_confdir\" \
+	kde_mimedir=\"$kde_mimedir\" \
+	kde_toolbardir=\"$kde_toolbardir\" \
+	kde_wallpaperdir=\"$kde_wallpaperdir\" \
+	kde_templatesdir=\"$kde_templatesdir\" \
+	kde_bindir=\"$kde_bindir\" \
+	kde_servicesdir=\"$kde_servicesdir\" \
+	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+	kde_moduledir=\"$kde_moduledir\" \
+   kde_styledir=\"$kde_styledir\" \
+	kde_widgetdir=\"$kde_widgetdir\" \
+	kde_result=$1"
+])
+
+AC_DEFUN([KDE_SET_DEFAULT_PATHS],
+[
+if test "$1" = "default"; then
+
+  if test -z "$kde_htmldir"; then
+    kde_htmldir='\${prefix}/share/doc/HTML'
+  fi
+  if test -z "$kde_appsdir"; then
+    kde_appsdir='\${prefix}/share/applnk'
+  fi
+  if test -z "$kde_icondir"; then
+    kde_icondir='\${prefix}/share/icons'
+  fi
+  if test -z "$kde_sounddir"; then
+    kde_sounddir='\${prefix}/share/sounds'
+  fi
+  if test -z "$kde_datadir"; then
+    kde_datadir='\${prefix}/share/apps'
+  fi
+  if test -z "$kde_locale"; then
+    kde_locale='\${prefix}/share/locale'
+  fi
+  if test -z "$kde_cgidir"; then
+    kde_cgidir='\${exec_prefix}/cgi-bin'
+  fi
+  if test -z "$kde_confdir"; then
+    kde_confdir='\${prefix}/share/config'
+  fi
+  if test -z "$kde_mimedir"; then
+    kde_mimedir='\${prefix}/share/mimelnk'
+  fi
+  if test -z "$kde_toolbardir"; then
+    kde_toolbardir='\${prefix}/share/toolbar'
+  fi
+  if test -z "$kde_wallpaperdir"; then
+    kde_wallpaperdir='\${prefix}/share/wallpapers'
+  fi
+  if test -z "$kde_templatesdir"; then
+    kde_templatesdir='\${prefix}/share/templates'
+  fi
+  if test -z "$kde_bindir"; then
+    kde_bindir='\${exec_prefix}/bin'
+  fi
+  if test -z "$kde_servicesdir"; then
+    kde_servicesdir='\${prefix}/share/services'
+  fi
+  if test -z "$kde_servicetypesdir"; then
+    kde_servicetypesdir='\${prefix}/share/servicetypes'
+  fi
+  if test -z "$kde_moduledir"; then
+    if test "$kde_qtver" = "2"; then
+      kde_moduledir='\${exec_prefix}/lib/kde2'
+    else
+      kde_moduledir='\${exec_prefix}/lib/kde3'
+    fi
+  fi
+  if test -z "$kde_styledir"; then
+    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
+  fi
+  if test -z "$kde_widgetdir"; then
+    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+  fi
+
+  KDE_SET_PATHS(defaults)
+
+else
+
+  if test $kde_qtver = 1; then
+     AC_MSG_RESULT([compiling])
+     KDE_1_CHECK_PATHS
+  else
+     AC_MSG_ERROR([path checking not yet supported for KDE 2])
+  fi
+
+fi
+])
+
+AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
+[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+   test -z "$kde_datadir" || test -z "$kde_locale"  ||
+   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
+   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+   test -z "$kde_styledir" || test -z "kde_widgetdir" 
+   test "x$kde_have_all_paths" != "xyes"; then
+     kde_have_all_paths=no
+  fi
+])
+
+AC_DEFUN([KDE_MISSING_PROG_ERROR],
+[
+    AC_MSG_ERROR([The important program $1 was not found!
+Please check whether you installed KDE correctly.
+])
+])
+
+AC_DEFUN([KDE_SUBST_PROGRAMS],
+[
+
+        kde_default_bindirs="`kde-config --prefix`/bin /usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+        if test -n "$KDEDIRS"; then
+           kde_save_IFS=$IFS
+           IFS=:
+           for dir in $KDEDIRS; do
+                kde_default_bindirs="$dir/bin $kde_default_bindirs "
+           done
+           IFS=$kde_save_IFS
+        fi
+        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
+        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
+
+        DCOP_DEPENDENCIES='$(DCOPIDL)'
+        AC_SUBST(DCOPIDL)
+        AC_SUBST(DCOPIDL2CPP)
+        AC_SUBST(DCOP_DEPENDENCIES)
+        AC_SUBST(KDECONFIG)
+
+        if test -x "$KDECONFIG"; then # it can be "compiled"
+          kde_libs_prefix=`$KDECONFIG --prefix`
+          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
+               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+                          This means it has been moved since you installed it.
+                          This won't work. Please recompile kdelibs for the new prefix.
+                          ])
+           fi
+           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
+        else
+           kde_libs_prefix='$(prefix)'
+           kde_libs_htmldir='$(kde_htmldir)'
+        fi
+        AC_SUBST(kde_libs_prefix)
+        AC_SUBST(kde_libs_htmldir)
+])dnl
+
+AC_DEFUN([AC_CREATE_KFSSTND],
+[
+AC_REQUIRE([AC_CHECK_RPATH])
+
+AC_MSG_CHECKING([for KDE paths])
+kde_result=""
+kde_cached_paths=yes
+AC_CACHE_VAL(kde_cv_all_paths,
+[
+  KDE_SET_DEFAULT_PATHS($1)
+  kde_cached_paths=no
+])
+eval "$kde_cv_all_paths"
+KDE_CHECK_PATHS_FOR_COMPLETENESS
+if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
+  # wrong values were cached, may be, we can set better ones
+  kde_result=
+  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
+  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
+  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+  kde_have_all_paths=
+  kde_styledir=
+  kde_widgetdir=
+  KDE_SET_DEFAULT_PATHS($1)
+  eval "$kde_cv_all_paths"
+  KDE_CHECK_PATHS_FOR_COMPLETENESS
+  kde_result="$kde_result (cache overridden)"
+fi
+if test "$kde_have_all_paths" = "no"; then
+  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+])
+else
+  rm -f conftest*
+  AC_MSG_RESULT($kde_result)
+fi
+
+bindir=$kde_bindir
+
+KDE_SUBST_PROGRAMS
+
+])
+
+AC_DEFUN([AC_SUBST_KFSSTND],
+[
+AC_SUBST(kde_htmldir)
+AC_SUBST(kde_appsdir)
+AC_SUBST(kde_icondir)
+AC_SUBST(kde_sounddir)
+AC_SUBST(kde_datadir)
+AC_SUBST(kde_locale)
+AC_SUBST(kde_confdir)
+AC_SUBST(kde_mimedir)
+AC_SUBST(kde_wallpaperdir)
+AC_SUBST(kde_bindir)
+dnl for KDE 2
+AC_SUBST(kde_templatesdir)
+AC_SUBST(kde_servicesdir)
+AC_SUBST(kde_servicetypesdir)
+AC_SUBST(kde_moduledir)
+AC_SUBST(kde_styledir)
+AC_SUBST(kde_widgetdir)
+if test "$kde_qtver" = 1; then
+  kde_minidir="$kde_icondir/mini"
+else
+# for KDE 1 - this breaks KDE2 apps using minidir, but
+# that's the plan ;-/
+  kde_minidir="/dev/null"
+fi
+dnl AC_SUBST(kde_minidir)
+dnl AC_SUBST(kde_cgidir)
+dnl AC_SUBST(kde_toolbardir)
+])
+
+AC_DEFUN([KDE_MISC_TESTS],
+[
+   AC_LANG_C
+   dnl Checks for libraries.
+   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
+   AC_SUBST(LIBUTIL)
+   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
+   AC_SUBST(LIBCOMPAT)
+   kde_have_crypt=
+   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
+      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
+        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support])
+	kde_have_crypt=no
+      ]))
+   AC_SUBST(LIBCRYPT)
+   if test $kde_have_crypt = yes; then
+      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
+   fi
+   AC_CHECK_SOCKLEN_T
+   AC_LANG_C
+   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
+        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
+   fi
+   AC_CHECK_FUNC(inet_ntoa)
+   if test $ac_cv_func_inet_ntoa = no; then
+     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
+   fi
+   AC_CHECK_FUNC(connect)
+   if test $ac_cv_func_connect = no; then
+      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
+        $X_EXTRA_LIBS)
+   fi
+
+   AC_CHECK_FUNC(remove)
+   if test $ac_cv_func_remove = no; then
+      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
+   fi
+
+   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+   AC_CHECK_FUNC(shmat, ,
+     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
+   
+   # Solaris 2.6 and others need -lresolv for res_init
+   AC_CHECK_FUNCS(res_init, , [
+     kde_libs_safe="$LIBS"
+     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
+     AC_TRY_LINK(
+[
+#include <resolv.h>
+],
+[ 
+res_init(); 
+],
+        LIBRESOLV="-lresolv"
+        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
+        AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
+     )
+     LIBS=$kde_libs_safe
+   ])
+
+   LIBSOCKET="$X_EXTRA_LIBS"
+   AC_SUBST(LIBSOCKET)
+   AC_SUBST(LIBRESOLV)
+   AC_SUBST(X_EXTRA_LIBS)
+   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
+   AC_SUBST(LIBUCB)
+
+   case $host in  dnl this *is* LynxOS specific
+   *-*-lynxos* )
+        AC_MSG_CHECKING([LynxOS header file wrappers])
+        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
+        AC_MSG_RESULT(disabled)
+        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
+         ;;
+    esac
+
+   KDE_CHECK_TYPES
+   KDE_CHECK_LIBDL
+])
+
+dnl ------------------------------------------------------------------------
+dnl Find the header files and libraries for X-Windows. Extended the
+dnl macro AC_PATH_X
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([K_PATH_X],
+[
+AC_REQUIRE([KDE_MISC_TESTS])dnl
+
+AC_ARG_ENABLE(
+  embedded,
+  [  --enable-embedded       link to Qt-embedded, don't use X],
+  kde_use_qt_emb=$enableval,
+  kde_use_qt_emb=no
+)
+
+AC_ARG_ENABLE(
+  qtopia,
+  [  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment],
+  kde_use_qt_emb_palm=$enableval,
+  kde_use_qt_emb_palm=no
+)
+
+if test "$kde_use_qt_emb" = "no"; then
+
+AC_MSG_CHECKING(for X)
+AC_LANG_SAVE
+AC_LANG_C
+AC_CACHE_VAL(kde_cv_have_x,
+[# One or both of the vars are not set, and there is no cached value.
+if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
+   kde_x_includes=NO
+else
+   kde_x_includes=$x_includes
+fi
+if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
+   kde_x_libraries=NO
+else
+   kde_x_libraries=$x_libraries
+fi
+
+# below we use the standard autoconf calls
+ac_x_libraries=$kde_x_libraries
+ac_x_includes=$kde_x_includes
+
+KDE_PATH_X_DIRECT
+dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
+dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
+dnl location. The correct location is /usr/lib32 or an undefined value
+dnl (the linker is smart enough to pick the correct default library).
+dnl Things work just fine if you use just AC_PATH_X_DIRECT.
+dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
+dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
+dnl x_includes should be left alone.
+case "$host" in
+mips-sgi-irix6*)
+  ;;
+*-*-solaris*)
+  ;;
+*)
+  _AC_PATH_X_XMKMF
+  if test -z "$ac_x_includes"; then
+    ac_x_includes="."
+  fi
+  if test -z "$ac_x_libraries"; then
+    ac_x_libraries="/usr/lib"
+  fi
+esac
+#from now on we use our own again
+
+# when the user already gave --x-includes, we ignore
+# what the standard autoconf macros told us.
+if test "$kde_x_includes" = NO; then
+  kde_x_includes=$ac_x_includes
+fi
+
+# for --x-libraries too
+if test "$kde_x_libraries" = NO; then
+  kde_x_libraries=$ac_x_libraries
+fi
+
+if test "$kde_x_includes" = NO; then
+  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
+fi
+
+if test "$kde_x_libraries" = NO; then
+  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
+fi
+
+# Record where we found X for the cache.
+kde_cv_have_x="have_x=yes \
+         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+])dnl
+
+eval "$kde_cv_have_x"
+
+if test "$have_x" != yes; then
+  AC_MSG_RESULT($have_x)
+  no_x=yes
+else
+  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
+fi
+
+if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
+  X_INCLUDES=""
+  x_includes="."; dnl better than nothing :-
+ else
+  x_includes=$kde_x_includes
+  X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
+  X_LDFLAGS=""
+  x_libraries="/usr/lib"; dnl better than nothing :-
+ else
+  x_libraries=$kde_x_libraries
+  X_LDFLAGS="-L$x_libraries"
+fi
+all_includes="$X_INCLUDES"
+all_libraries="$X_LDFLAGS"
+
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(x_libraries)
+AC_SUBST(x_includes)
+
+# Check for libraries that X11R6 Xt/Xaw programs need.
+ac_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+# 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.
+#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
+AC_CHECK_LIB(ICE, IceConnectionNumber,
+  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
+AC_SUBST(LIBSM)
+LDFLAGS="$ac_save_LDFLAGS"
+
+AC_SUBST(X_PRE_LIBS)
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+AC_SUBST(LIB_X11)
+
+AC_MSG_CHECKING(for libXext)
+AC_CACHE_VAL(kde_cv_have_libXext,
+[
+kde_ldflags_safe="$LDFLAGS"
+kde_libs_safe="$LIBS"
+
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+LIBS="-lXext -lX11 $LIBSOCKET"
+
+AC_TRY_LINK([
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+],
+[
+printf("hello Xext\n");
+],
+kde_cv_have_libXext=yes,
+kde_cv_have_libXext=no
+   )
+
+LDFLAGS=$kde_ldflags_safe
+LIBS=$kde_libs_safe
+ ])
+
+AC_MSG_RESULT($kde_cv_have_libXext)
+
+if test "$kde_cv_have_libXext" = "no"; then
+  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either.])
+fi
+
+AC_MSG_CHECKING(for Xinerama)
+
+ AC_ARG_WITH(xinerama,
+  [  --with-xinerama         enable support for Xinerama ],
+  [
+    no_xinerama=no
+  ], [
+    no_xinerama=yes
+  ]
+)
+
+kde_save_LDFLAGS="$LDFLAGS"
+kde_save_CFLAGS="$CFLAGS"
+kde_save_LIBS="$LIBS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+CFLAGS="$CFLAGS -I$x_includes"
+LIBS="-lXinerama -lXext"
+
+if test "x$no_xinerama" = "xno"; then
+
+  AC_CACHE_VAL(ac_cv_have_xinerama,
+  [
+	  AC_TRY_LINK([#include <X11/Xlib.h>
+  			#include <X11/extensions/Xinerama.h>],
+	  	  [XineramaIsActive(NULL);],
+		  [ac_cv_have_xinerama="yes"],
+		  [ac_cv_have_xinerama="no"])
+  ])
+else
+  ac_cv_have_xinerama=no;
+fi
+
+AC_MSG_RESULT($ac_cv_have_xinerama)
+
+LIBXINERAMA=""
+
+if test "$ac_cv_have_xinerama" = "yes"; then
+  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
+  LIBXINERAMA="-lXinerama"
+fi
+
+AC_SUBST(LIBXINERAMA)
+
+LDFLAGS="$kde_save_LDFLAGS"
+CFLAGS="$kde_save_CFLAGS"
+LIBS="$kde_save_LIBS"
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+else
+  dnl We're using QT Embedded
+  CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
+  CFLAGS="$CFLAGS -DQWS"
+  LDFLAGS="$LDFLAGS -DQWS"
+  QTE_NORTTI="-fno-rtti -DQWS"
+  X_PRE_LIBS=""
+  LIB_X11=""
+  LIB_XEXT=""
+  LIBSM=""
+  X_INCLUDES=""
+  X_LDFLAGS=""
+  x_includes=""
+  x_libraries=""
+  AC_SUBST(X_PRE_LIBS)
+  AC_SUBST(LIB_X11)
+  AC_SUBST(LIBSM)
+  AC_SUBST(X_INCLUDES)
+  AC_SUBST(X_LDFLAGS)
+  AC_SUBST(x_includes)
+  AC_SUBST(x_libraries)
+fi
+AC_SUBST(QTE_NORTTI)
+AC_SUBST(LIB_XEXT)
+
+
+AC_LANG_RESTORE
+
+])
+
+AC_DEFUN([KDE_PRINT_QT_PROGRAM],
+[
+AC_REQUIRE([KDE_USE_QT])
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#include <qiconview.h>
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+    QStringList *t = new QStringList();
+    Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+    QIconView iv(0);
+    iv.setWordWrapIconText(false);
+    QString s;
+    s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+    (void)QStyleFactory::create(QString::null);
+    QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+    return 0;
+}
+EOF
+])
+
+AC_DEFUN([KDE_USE_QT],
+[
+if test -z "$1"; then
+  kde_qtver=3
+  kde_qtsubver=1
+else
+  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+  # following is the check if subversion isnt found in passed argument
+  if test "$kde_qtsubver" = "$1"; then
+    kde_qtsubver=1
+  fi
+  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+  if test "$kde_qtver" = "1"; then
+    kde_qtsubver=42
+  fi
+fi
+
+if test -z "$2"; then
+  if test "$kde_qtver" = "2"; then
+    if test $kde_qtsubver -gt 0; then
+      kde_qt_minversion=">= Qt 2.2.2"
+    else
+      kde_qt_minversion=">= Qt 2.0.2"
+    fi
+  fi
+  if test "$kde_qtver" = "3"; then
+    kde_qt_minversion=">= Qt 3.0.2"
+  fi
+  if test "$kde_qtver" = "1"; then
+    kde_qt_minversion=">= 1.42 and < 2.0"
+  fi
+else
+   kde_qt_minversion=$2
+fi
+
+if test -z "$3"; then
+   if test $kde_qtver = 3; then
+     kde_qt_verstring="QT_VERSION >= 302"
+   fi
+   if test $kde_qtver = 2; then
+     if test $kde_qtsubver -gt 0; then
+       kde_qt_verstring="QT_VERSION >= 222"
+     else
+       kde_qt_verstring="QT_VERSION >= 200"
+     fi
+   fi
+   if test $kde_qtver = 1; then
+    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+   fi
+else
+   kde_qt_verstring=$3
+fi
+
+if test $kde_qtver = 3; then
+  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
+fi
+if test $kde_qtver = 2; then
+   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+fi
+if test $kde_qtver = 1; then
+   kde_qt_dirs="$QTDIR /usr/lib/qt"
+fi
+])
+
+AC_DEFUN([KDE_CHECK_QT_DIRECT],
+[
+AC_REQUIRE([KDE_USE_QT])
+AC_MSG_CHECKING([if Qt compiles without flags])
+AC_CACHE_VAL(kde_cv_qt_direct,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
+ac_LIBRARY_PATH="$LIBRARY_PATH"
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_includes"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
+else
+LIBS="$LIBQT $LIBSOCKET"
+fi
+LD_LIBRARY_PATH=
+export LD_LIBRARY_PATH
+LIBRARY_PATH=
+export LIBRARY_PATH
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+  kde_cv_qt_direct="yes"
+else
+  kde_cv_qt_direct="no"
+  echo "configure: failed program was:" >&AC_FD_CC
+  cat conftest.$ac_ext >&AC_FD_CC
+fi
+
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
+export LD_LIBRARY_PATH
+LIBRARY_PATH="$ac_LIBRARY_PATH"
+export LIBRARY_PATH
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_qt_direct" = "yes"; then
+  AC_MSG_RESULT(yes)
+  $1
+else
+  AC_MSG_RESULT(no)
+  $2
+fi
+])
+
+dnl ------------------------------------------------------------------------
+dnl Try to find the Qt headers and libraries.
+dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
+dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_1_3],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([KDE_USE_QT])
+
+dnl ------------------------------------------------------------------------
+dnl Add configure flag to enable linking to MT version of Qt library.
+dnl ------------------------------------------------------------------------
+
+AC_ARG_ENABLE(
+  mt,
+  [  --disable-mt            link to non-threaded Qt (deprecated)],
+  kde_use_qt_mt=$enableval,
+  [
+    if test $kde_qtver = 3; then
+      kde_use_qt_mt=yes
+    else
+      kde_use_qt_mt=no
+    fi
+  ]
+)
+
+USING_QT_MT=""
+
+dnl ------------------------------------------------------------------------
+dnl If we not get --disable-qt-mt then adjust some vars for the host.
+dnl ------------------------------------------------------------------------
+
+KDE_MT_LDFLAGS=
+KDE_MT_LIBS=
+if test "x$kde_use_qt_mt" = "xyes"; then
+  KDE_CHECK_THREADING
+  if test "x$kde_use_threading" = "xyes"; then
+    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
+    KDE_MT_LDFLAGS="$USE_THREADS"
+    KDE_MT_LIBS="$LIBPTHREAD"
+  else
+    kde_use_qt_mt=no
+  fi
+fi
+AC_SUBST(KDE_MT_LDFLAGS)
+AC_SUBST(KDE_MT_LIBS)
+
+kde_qt_was_given=yes
+
+dnl ------------------------------------------------------------------------
+dnl If we haven't been told how to link to Qt, we work it out for ourselves.
+dnl ------------------------------------------------------------------------
+if test -z "$LIBQT_GLOB"; then
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    LIBQT_GLOB="libqte.*"
+  else
+    LIBQT_GLOB="libqt.*"
+  fi
+fi
+
+if test -z "$LIBQT"; then
+dnl ------------------------------------------------------------
+dnl If we got --enable-embedded then adjust the Qt library name.
+dnl ------------------------------------------------------------
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    qtlib="qte"
+  else
+    qtlib="qt"
+  fi
+
+  kde_int_qt="-l$qtlib"
+else
+  kde_int_qt="$LIBQT"
+  kde_lib_qt_set=yes
+fi
+
+if test -z "$LIBQPE"; then
+dnl ------------------------------------------------------------
+dnl If we got --enable-palmtop then add -lqpe to the link line
+dnl ------------------------------------------------------------
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    if test "x$kde_use_qt_emb_palm" = "xyes"; then
+      LIB_QPE="-lqpe"
+    else
+      LIB_QPE=""
+    fi
+  else
+    LIB_QPE=""
+  fi
+fi
+
+dnl ------------------------------------------------------------------------
+dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+dnl ------------------------------------------------------------------------
+
+if test "x$kde_use_qt_mt" = "xyes"; then
+  if test -z "$LIBQT"; then
+    LIBQT="-l$qtlib-mt"
+    kde_int_qt="-l$qtlib-mt"
+  else
+    LIBQT="$qtlib-mt"
+    kde_int_qt="$qtlib-mt"
+  fi
+  LIBQT_GLOB="lib$qtlib-mt.*"
+  USING_QT_MT="using -mt"
+else
+  LIBQT="-l$qtlib"
+fi
+
+if test $kde_qtver != 1; then
+
+  AC_REQUIRE([AC_FIND_PNG])
+  AC_REQUIRE([AC_FIND_JPEG])
+  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+fi
+
+if test $kde_qtver = 3; then
+  AC_REQUIRE([KDE_CHECK_LIBDL])
+  LIBQT="$LIBQT $LIBDL"
+fi
+
+AC_MSG_CHECKING([for Qt])
+
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
+fi
+ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+qt_libraries=""
+qt_includes=""
+AC_ARG_WITH(qt-dir,
+    [  --with-qt-dir=DIR       where the root of Qt is installed ],
+    [  ac_qt_includes="$withval"/include
+       ac_qt_libraries="$withval"/lib
+       ac_qt_bindir="$withval"/bin
+    ])
+
+AC_ARG_WITH(qt-includes,
+    [  --with-qt-includes=DIR  where the Qt includes are. ],
+    [
+       ac_qt_includes="$withval"
+    ])
+
+kde_qt_libs_given=no
+
+AC_ARG_WITH(qt-libraries,
+    [  --with-qt-libraries=DIR where the Qt library is installed.],
+    [  ac_qt_libraries="$withval"
+       kde_qt_libs_given=yes
+    ])
+
+AC_CACHE_VAL(ac_cv_have_qt,
+[#try to guess Qt locations
+
+qt_incdirs=""
+for dir in $kde_qt_dirs; do
+   qt_incdirs="$qt_incdirs $dir/include $dir"
+done
+qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include/qt3 /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
+if test ! "$ac_qt_includes" = "NO"; then
+   qt_incdirs="$ac_qt_includes $qt_incdirs"
+fi
+
+if test "$kde_qtver" != "1"; then
+  kde_qt_header=qstyle.h
+else
+  kde_qt_header=qglobal.h
+fi
+
+AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
+ac_qt_includes="$qt_incdir"
+
+qt_libdirs=""
+for dir in $kde_qt_dirs; do
+   qt_libdirs="$qt_libdirs $dir/lib $dir"
+done
+qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
+if test ! "$ac_qt_libraries" = "NO"; then
+  qt_libdir=$ac_qt_libraries
+else
+  qt_libdirs="$ac_qt_libraries $qt_libdirs"
+  # if the Qt was given, the chance is too big that libqt.* doesn't exist
+  qt_libdir=NONE
+  for dir in $qt_libdirs; do
+    try="ls -1 $dir/${LIBQT_GLOB}"
+    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
+  done
+fi
+
+ac_qt_libraries="$qt_libdir"
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+  rm -f conftest*
+else
+  echo "configure: failed program was:" >&AC_FD_CC
+  cat conftest.$ac_ext >&AC_FD_CC
+  ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+AC_LANG_RESTORE
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+  ac_cv_have_qt="have_qt=no"
+  ac_qt_notfound=""
+  missing_qt_mt=""
+  if test "$ac_qt_includes" = NO; then
+    if test "$ac_qt_libraries" = NO; then
+      ac_qt_notfound="(headers and libraries)";
+    else
+      ac_qt_notfound="(headers)";
+    fi
+  else
+    if test "x$kde_use_qt_mt" = "xyes"; then
+       missing_qt_mt="
+Make sure that you have compiled Qt with thread support!"
+       ac_qt_notfound="(library $qtlib-mt)";
+    else
+       ac_qt_notfound="(library $qtlib)";
+    fi
+  fi
+
+  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt])
+else
+  have_qt="yes"
+fi
+])
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+  AC_MSG_RESULT([$have_qt]);
+else
+  ac_cv_have_qt="have_qt=yes \
+    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
+
+  qt_libraries="$ac_qt_libraries"
+  qt_includes="$ac_qt_includes"
+fi
+
+if test ! "$kde_qt_libs_given" = "yes"; then
+KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
+fi
+
+AC_SUBST(qt_libraries)
+AC_SUBST(qt_includes)
+
+if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+ QT_INCLUDES=""
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$all_libraries $QT_LDFLAGS"
+fi
+test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+
+AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_LDFLAGS)
+AC_PATH_QT_MOC_UIC
+
+KDE_CHECK_QT_JPEG
+
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+
+AC_SUBST(LIB_QT)
+AC_SUBST(LIB_QPE)
+
+AC_SUBST(kde_qtver)
+])
+
+AC_DEFUN([AC_PATH_QT],
+[
+AC_PATH_QT_1_3
+])
+
+AC_DEFUN([KDE_CHECK_FINAL],
+[
+  AC_ARG_ENABLE(final, [  --enable-final          build size optimized apps (experimental - needs lots of memory)],
+	kde_use_final=$enableval, kde_use_final=no)
+
+  KDE_COMPILER_REPO
+  if test "x$kde_use_final" = "xyes"; then
+      KDE_USE_FINAL_TRUE=""
+      KDE_USE_FINAL_FALSE="#"
+   else
+      KDE_USE_FINAL_TRUE="#"
+      KDE_USE_FINAL_FALSE=""
+  fi
+  AC_SUBST(KDE_USE_FINAL_TRUE)
+  AC_SUBST(KDE_USE_FINAL_FALSE)
+
+  AC_ARG_ENABLE(closure, [  --disable-closure       don't delay template instantiation],
+  	kde_use_closure=$enableval, kde_use_closure=yes)
+
+  if test "x$kde_use_closure" = "xyes"; then
+       KDE_USE_CLOSURE_TRUE=""
+       KDE_USE_CLOSURE_FALSE="#"
+#       CXXFLAGS="$CXXFLAGS $REPO"
+  else
+       KDE_USE_CLOSURE_TRUE="#"
+       KDE_USE_CLOSURE_FALSE=""
+  fi
+  AC_SUBST(KDE_USE_CLOSURE_TRUE)
+  AC_SUBST(KDE_USE_CLOSURE_FALSE)
+])
+
+dnl ------------------------------------------------------------------------
+dnl Now, the same with KDE
+dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
+dnl and $(kde_includes) will be the kdehdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_BASE_PATH_KDE],
+[
+AC_PREREQ([2.13])
+AC_REQUIRE([AC_PATH_QT])dnl
+AC_CHECK_RPATH
+AC_MSG_CHECKING([for KDE])
+
+if test "${prefix}" != NONE; then
+  kde_includes=${prefix}/include
+  ac_kde_includes=$prefix/include
+
+  if test "${exec_prefix}" != NONE; then
+    kde_libraries=${exec_prefix}/lib
+    ac_kde_libraries=$exec_prefix/lib
+  else
+    kde_libraries=${prefix}/lib
+    ac_kde_libraries=$prefix/lib
+  fi
+else
+  ac_kde_includes=
+  ac_kde_libraries=
+  kde_libraries=""
+  kde_includes=""
+fi
+
+AC_CACHE_VAL(ac_cv_have_kde,
+[#try to guess kde locations
+
+if test "$kde_qtver" = 1; then
+  kde_check_header="ksock.h"
+  kde_check_lib="libkdecore.la"
+else
+  kde_check_header="ksharedptr.h"
+  kde_check_lib="libkio.la"
+fi
+
+if test -z "$1"; then
+
+test -n "$KDEDIR" || KDEDIR=`kde-config --prefix`
+kde_incdirs="$KDEDIR/include/kde3 $KDEDIR/include/kde $KDEDIR/include"
+kde_incdirs="$kde_incdirs $ac_kde_includes"
+AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
+ac_kde_includes="$kde_incdir"
+
+if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
+  AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!])
+fi
+
+kde_libdirs="$KDEDIR/lib`kde-config --libsuffix`"
+kde_libdirs="$kde_libdirs $ac_kde_libraries"
+AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
+ac_kde_libraries="$kde_libdir"
+
+if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
+AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!])
+fi
+ac_kde_libraries="$kde_libdir"
+
+if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
+  ac_cv_have_kde="have_kde=no"
+else
+  ac_cv_have_kde="have_kde=yes \
+    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+fi
+
+else dnl test -z $1
+
+  ac_cv_have_kde="have_kde=no"
+
+fi
+])dnl
+
+eval "$ac_cv_have_kde"
+
+if test "$have_kde" != "yes"; then
+ if test "${prefix}" = NONE; then
+  ac_kde_prefix="$ac_default_prefix"
+ else
+  ac_kde_prefix="$prefix"
+ fi
+ if test "$exec_prefix" = NONE; then
+  ac_kde_exec_prefix="$ac_kde_prefix"
+  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
+ else
+  ac_kde_exec_prefix="$exec_prefix"
+  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
+ fi
+
+ kde_libraries="${ac_kde_exec_prefix}/lib"
+ kde_includes=${ac_kde_prefix}/include
+
+else
+  ac_cv_have_kde="have_kde=yes \
+    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
+
+  kde_libraries="$ac_kde_libraries"
+  kde_includes="$ac_kde_includes"
+fi
+AC_SUBST(kde_libraries)
+AC_SUBST(kde_includes)
+
+if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
+ KDE_INCLUDES=""
+else
+ KDE_INCLUDES="-I$kde_includes"
+ all_includes="$KDE_INCLUDES $all_includes"
+fi
+ 
+KDE_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
+ all_libraries="$all_libraries $KDE_LDFLAGS"
+fi
+
+AC_SUBST(KDE_LDFLAGS)
+AC_SUBST(KDE_INCLUDES)
+
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+all_libraries="$all_libraries $USER_LDFLAGS"
+all_includes="$all_includes $USER_INCLUDES"
+AC_SUBST(all_includes)
+AC_SUBST(all_libraries)
+
+AC_SUBST(AUTODIRS)
+])
+
+AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
+[
+AC_MSG_CHECKING(for extra includes)
+AC_ARG_WITH(extra-includes, [  --with-extra-includes=DIR
+                          adds non standard include paths],
+  kde_use_extra_includes="$withval",
+  kde_use_extra_includes=NONE
+)
+kde_extra_includes=
+if test -n "$kde_use_extra_includes" && \
+   test "$kde_use_extra_includes" != "NONE"; then
+
+   ac_save_ifs=$IFS
+   IFS=':'
+   for dir in $kde_use_extra_includes; do
+     kde_extra_includes="$kde_extra_includes $dir"
+     USER_INCLUDES="$USER_INCLUDES -I$dir"
+   done
+   IFS=$ac_save_ifs
+   kde_use_extra_includes="added"
+else
+   kde_use_extra_includes="no"
+fi
+AC_SUBST(USER_INCLUDES)
+
+AC_MSG_RESULT($kde_use_extra_includes)
+
+kde_extra_libs=
+AC_MSG_CHECKING(for extra libs)
+AC_ARG_WITH(extra-libs, [  --with-extra-libs=DIR   adds non standard library paths],
+  kde_use_extra_libs=$withval,
+  kde_use_extra_libs=NONE
+)
+if test -n "$kde_use_extra_libs" && \
+   test "$kde_use_extra_libs" != "NONE"; then
+
+   ac_save_ifs=$IFS
+   IFS=':'
+   for dir in $kde_use_extra_libs; do
+     kde_extra_libs="$kde_extra_libs $dir"
+     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
+     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
+   done
+   IFS=$ac_save_ifs
+   kde_use_extra_libs="added"
+else
+   kde_use_extra_libs="no"
+fi
+
+AC_SUBST(USER_LDFLAGS)
+
+AC_MSG_RESULT($kde_use_extra_libs)
+
+])
+
+AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
+[
+    AC_MSG_CHECKING([for KDE headers installed])
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+    printf("kde_wallpaperdir=\\"%s\\"\n",
+	KApplication::kde_wallpaperdir().data());
+    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+    printf("kde_styledir=\\"/tmp/dummy\\"\n");
+    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+    return 0;
+    }
+EOF
+
+ ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
+ if AC_TRY_EVAL(ac_compile); then
+   AC_MSG_RESULT(yes)
+ else
+   AC_MSG_ERROR([your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log.])
+  fi
+
+  AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_CHECK_KDEQTADDON],
+[
+AC_MSG_CHECKING(for kde-qt-addon)
+AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
+[
+ kde_ldflags_safe="$LDFLAGS"
+ kde_libs_safe="$LIBS"
+ kde_cxxflags_safe="$CXXFLAGS"
+
+ LIBS="-lkde-qt-addon $LIBQT $LIBS"
+ CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
+ LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
+
+ AC_TRY_LINK([
+   #include <qdom.h>
+ ],
+ [
+   QDomDocument doc;
+ ],
+  kde_cv_have_kdeqtaddon=yes,
+  kde_cv_have_kdeqtaddon=no
+ )
+
+ LDFLAGS=$kde_ldflags_safe
+ LIBS=$kde_libs_safe
+ CXXFLAGS=$kde_cxxflags_safe
+])
+
+AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
+
+if test "$kde_cv_have_kdeqtaddon" = "no"; then
+  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
+It is a separate package (and CVS module) named kde-qt-addon.])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_KIMGIO],
+[
+   AC_REQUIRE([AC_BASE_PATH_KDE])
+   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+   AC_REQUIRE([AC_FIND_TIFF])
+   AC_REQUIRE([AC_FIND_JPEG])
+   AC_REQUIRE([AC_FIND_PNG])
+   AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
+
+   if test "$1" = "existance"; then
+     AC_LANG_SAVE
+     AC_LANG_CPLUSPLUS
+     kde_save_LIBS="$LIBS"
+     LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
+     AC_CHECK_LIB(kimgio, kimgioRegister, [
+      LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
+     LIBS="$kde_save_LIBS"
+     AC_LANG_RESTORE
+   else
+     LIBKIMGIO_EXISTS=yes
+   fi
+
+   if test "$LIBKIMGIO_EXISTS" = "yes"; then
+     LIB_KIMGIO='-lkimgio'
+   else
+     LIB_KIMGIO=''
+   fi
+   AC_SUBST(LIB_KIMGIO)
+])
+
+AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
+[
+   AC_REQUIRE([KDE_MISC_TESTS])
+   AC_REQUIRE([KDE_CHECK_LIBDL])
+   AC_REQUIRE([K_PATH_X])
+
+if test $kde_qtver = 3; then
+   LIB_KDECORE='-lkdecore'
+   AC_SUBST(LIB_KDECORE)
+   LIB_KDEUI='-lkdeui'
+   AC_SUBST(LIB_KDEUI)
+   LIB_KIO='-lkio'
+   AC_SUBST(LIB_KIO)
+   LIB_SMB='-lsmb'
+   AC_SUBST(LIB_SMB)
+   LIB_KAB='-lkab'
+   AC_SUBST(LIB_KAB)
+   LIB_KHTML='-lkhtml'
+   AC_SUBST(LIB_KHTML)
+   LIB_KSPELL='-lkspell'
+   AC_SUBST(LIB_KSPELL)
+   LIB_KPARTS='-lkparts'
+   AC_SUBST(LIB_KPARTS)
+   LIB_KDEPRINT='-lkdeprint'
+   AC_SUBST(LIB_KDEPRINT)
+# these are for backward compatibility
+   LIB_KSYCOCA='-lkio'
+   AC_SUBST(LIB_KSYCOCA)
+   LIB_KFILE='-lkio'
+   AC_SUBST(LIB_KFILE)
+elif test $kde_qtver = 2; then
+   LIB_KDECORE='-lkdecore'
+   AC_SUBST(LIB_KDECORE)
+   LIB_KDEUI='-lkdeui'
+   AC_SUBST(LIB_KDEUI)
+   LIB_KIO='-lkio'
+   AC_SUBST(LIB_KIO)
+   LIB_KSYCOCA='-lksycoca'
+   AC_SUBST(LIB_KSYCOCA)
+   LIB_SMB='-lsmb'
+   AC_SUBST(LIB_SMB)
+   LIB_KFILE='-lkfile'
+   AC_SUBST(LIB_KFILE)
+   LIB_KAB='-lkab'
+   AC_SUBST(LIB_KAB)
+   LIB_KHTML='-lkhtml'
+   AC_SUBST(LIB_KHTML)
+   LIB_KSPELL='-lkspell'
+   AC_SUBST(LIB_KSPELL)
+   LIB_KPARTS='-lkparts'
+   AC_SUBST(LIB_KPARTS)
+   LIB_KDEPRINT='-lkdeprint'
+   AC_SUBST(LIB_KDEPRINT)
+else
+   LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
+   AC_SUBST(LIB_KDECORE)
+   LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
+   AC_SUBST(LIB_KDEUI)
+   LIB_KFM='-lkfm $(LIB_KDECORE)'
+   AC_SUBST(LIB_KFM)
+   LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
+   AC_SUBST(LIB_KFILE)
+   LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
+   AC_SUBST(LIB_KAB)
+fi
+])
+
+AC_DEFUN([AC_PATH_KDE],
+[
+  AC_BASE_PATH_KDE
+  AC_ARG_ENABLE(path-check, [  --disable-path-check    don't try to find out, where to install],
+  [
+  if test "$enableval" = "no";
+    then ac_use_path_checking="default"
+    else ac_use_path_checking=""
+  fi
+  ],
+  [
+  if test "$kde_qtver" = 1;
+    then ac_use_path_checking=""
+    else ac_use_path_checking="default"
+  fi
+  ]
+  )
+
+  AC_CREATE_KFSSTND($ac_use_path_checking)
+
+  AC_SUBST_KFSSTND
+  KDE_CREATE_LIBS_ALIASES
+])
+
+dnl obsolete
+AC_DEFUN([AC_CHECK_SETENV],
+[
+   AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl 
+   AC_CHECK_FUNCS([setenv unsetenv])
+])
+
+AC_DEFUN([AC_CHECK_GETDOMAINNAME],
+[
+AC_MSG_CHECKING(for getdomainname)
+AC_CACHE_VAL(ac_cv_func_getdomainname,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+save_CXXFLAGS="$CXXFLAGS"
+kde_safe_LIBS="$LIBS"
+LIBS="$LIBS $X_EXTRA_LIBS"
+if test "$GCC" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <unistd.h>
+],
+[
+char buffer[200];
+getdomainname(buffer, 200);
+],
+ac_cv_func_getdomainname=yes,
+ac_cv_func_getdomainname=no)
+CXXFLAGS="$save_CXXFLAGS"
+LIBS=$kde_safe_LIBS
+AC_LANG_RESTORE
+])
+AC_MSG_RESULT($ac_cv_func_getdomainname)
+
+AC_MSG_CHECKING([if getdomainname needs custom prototype])
+AC_CACHE_VAL(ac_cv_proto_getdomainname,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
+  ac_cv_proto_getdomainname=no
+else
+  kde_safe_libs=$LIBS
+  LIBS="$LIBS $X_EXTRA_LIBS"
+  AC_TRY_LINK([
+#include <stdlib.h>
+#include <unistd.h>
+
+extern "C" int getdomainname (char *, int);
+],
+[
+char buffer[200];
+getdomainname(buffer, 200);
+],
+  ac_cv_func_getdomainname=yes
+  ac_cv_proto_getdomainname=yes,
+  AC_MSG_RESULT([fatal error])
+  AC_MSG_ERROR([getdomainname unavailable]))
+fi
+LIBS=$kde_safe_libs
+AC_LANG_RESTORE
+])
+AC_MSG_RESULT($ac_cv_proto_getdomainname)
+
+if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
+  AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
+fi
+if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
+  AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
+  [Define if you have getdomainname prototype])
+fi
+
+])
+
+AC_DEFUN([AC_CHECK_GETHOSTNAME],
+[
+
+AC_MSG_CHECKING([for gethostname])
+AC_CACHE_VAL(ac_cv_func_gethostname,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+save_CXXFLAGS="$CXXFLAGS"
+if test "$GCC" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+AC_TRY_LINK([
+#include <stdlib.h>
+#include <unistd.h>
+],
+[
+char buffer[200];
+gethostname(buffer, 200);
+],
+ac_cv_func_gethostname=yes,
+ac_cv_func_gethostname=no)
+CXXFLAGS="$save_CXXFLAGS"
+AC_LANG_RESTORE
+])
+AC_MSG_RESULT($ac_cv_func_gethostname)
+
+AC_MSG_CHECKING([if gethostname needs custom prototype])
+AC_CACHE_VAL(ac_cv_proto_gethostname,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
+  ac_cv_proto_gethostname=no
+else
+  AC_TRY_LINK([
+#include <stdlib.h>
+#include <unistd.h>
+
+extern "C" int gethostname (char *, int);
+],
+[
+char buffer[200];
+gethostname(buffer, 200);
+],
+  ac_cv_func_gethostname=yes
+  ac_cv_proto_gethostname=yes,
+  AC_MSG_RESULT([fatal error])
+  AC_MSG_ERROR(gethostname unavailable))
+fi
+AC_LANG_RESTORE
+])
+AC_MSG_RESULT($ac_cv_proto_gethostname)
+
+if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
+  AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
+  [Define if you have gethostname prototype])
+fi
+if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
+  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
+fi
+])
+
+AC_DEFUN([AC_CHECK_USLEEP],
+[
+AC_MSG_CHECKING([for usleep])
+AC_CACHE_VAL(ac_cv_func_usleep,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_libs_safe="$LIBS"
+LIBS="$LIBS $LIBUCB"
+AC_TRY_LINK([
+#include <stdlib.h>
+#include <unistd.h>
+],
+[
+usleep(200);
+],
+ac_cv_func_usleep=yes,
+ac_cv_func_usleep=no)
+LIBS="$ac_libs_safe"
+AC_LANG_RESTORE
+])
+AC_MSG_RESULT($ac_cv_func_usleep)
+if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
+  AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
+fi
+])
+
+AC_DEFUN([AC_CHECK_RANDOM],
+[
+AC_MSG_CHECKING([for random])
+AC_CACHE_VAL(ac_cv_func_random,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_libs_safe="$LIBS"
+LIBS="$LIBS $LIBUCB"
+AC_TRY_LINK([
+#include <stdlib.h>
+],
+[
+random();
+],
+ac_cv_func_random=yes,
+ac_cv_func_random=no)
+LIBS="$ac_libs_safe"
+AC_LANG_RESTORE
+])
+AC_MSG_RESULT($ac_cv_func_random)
+if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
+  AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
+fi
+])
+
+AC_DEFUN([AC_FIND_GIF],
+   [AC_MSG_CHECKING([for giflib])
+AC_CACHE_VAL(ac_cv_lib_gif,
+[ac_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
+else
+LIBS="$all_libraries -lgif"
+fi
+AC_TRY_LINK(dnl
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+int GifLastError(void);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+],
+            [return GifLastError();],
+            eval "ac_cv_lib_gif=yes",
+            eval "ac_cv_lib_gif=no")
+LIBS="$ac_save_LIBS"
+])dnl
+if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
+else
+  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
+fi
+])
+
+AC_DEFUN([KDE_FIND_JPEG_HELPER],
+[
+AC_MSG_CHECKING([for libjpeg$2])
+AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
+[
+AC_LANG_C
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[/* Override any gcc2 internal prototype to avoid an error.  */
+struct jpeg_decompress_struct;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+typedef int size_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
+                                    int version, size_t structsize);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+],
+            [jpeg_CreateDecompress(0L, 0, 0);],
+            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
+            eval "ac_cv_lib_jpeg_$1=no")
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+])
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
+  LIBJPEG="$ac_cv_lib_jpeg_$1"
+  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
+else
+  AC_MSG_RESULT(no)
+  $3
+fi
+
+])
+
+AC_DEFUN([AC_FIND_JPEG],
+[
+dnl first look for libraries
+KDE_FIND_JPEG_HELPER(6b, 6b,
+   KDE_FIND_JPEG_HELPER(normal, [],
+    [
+       LIBJPEG=
+    ]
+   )
+)
+
+dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+dnl requires system dependent includes loaded before it)
+jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
+AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+dnl if headers _and_ libraries are missing, this is no error, and we
+dnl continue with a warning (the user will get no jpeg support in khtml)
+dnl if only one is missing, it means a configuration error, but we still
+dnl only warn
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
+  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
+else
+  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
+    AC_MSG_WARN([
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+])
+  else
+    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
+  fi
+  jpeg_incdir=
+  LIBJPEG=
+fi
+
+AC_SUBST(LIBJPEG)
+])
+
+AC_DEFUN([KDE_CHECK_QT_JPEG],
+[
+AC_MSG_CHECKING([if Qt needs $LIBJPEG])
+AC_CACHE_VAL(kde_cv_qt_jpeg,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
+LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[#include <qapplication.h>],
+            [
+            int argc;
+            char** argv;
+            QApplication app(argc, argv);],
+            eval "kde_cv_qt_jpeg=no",
+            eval "kde_cv_qt_jpeg=yes")
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+])
+
+if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
+  AC_MSG_RESULT(yes)
+  LIBJPEG_QT='$(LIBJPEG)'
+else
+  AC_MSG_RESULT(no)
+  LIBJPEG_QT=
+fi
+
+])
+
+AC_DEFUN([AC_FIND_ZLIB],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for libz])
+AC_CACHE_VAL(ac_cv_lib_z,
+[
+AC_LANG_C
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(dnl
+[
+#include<zlib.h>
+],
+            [return (zlibVersion() == ZLIB_VERSION); ],
+            eval "ac_cv_lib_z='-lz'",
+            eval "ac_cv_lib_z=no")
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if test ! "$ac_cv_lib_z" = no; then
+  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
+  LIBZ="$ac_cv_lib_z"
+  AC_SUBST(LIBZ)
+  AC_MSG_RESULT($ac_cv_lib_z)
+else
+  AC_MSG_ERROR(not found. Check your installation and look into config.log)
+  LIBZ=""
+  AC_SUBST(LIBZ)
+fi
+])
+
+AC_DEFUN([KDE_TRY_TIFFLIB],
+[
+AC_MSG_CHECKING([for libtiff $1])
+
+AC_CACHE_VAL(kde_cv_libtiff_$1,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
+else
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
+fi
+kde_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+[
+#include<tiffio.h>
+],
+    [return (TIFFOpen( "", "r") == 0); ],
+[
+    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
+], [
+    kde_cv_libtiff_$1=no
+])
+
+LIBS="$kde_save_LIBS"
+CXXFLAGS="$kde_save_CXXFLAGS"
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_libtiff_$1" = "no"; then
+    AC_MSG_RESULT(no)
+    LIBTIFF=""
+    $3
+else
+    LIBTIFF="$kde_cv_libtiff_$1"
+    AC_MSG_RESULT(yes)
+    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
+    $2
+fi
+
+])
+
+AC_DEFUN([AC_FIND_TIFF],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+KDE_TRY_TIFFLIB(tiff, [],
+   KDE_TRY_TIFFLIB(tiff34))
+
+AC_SUBST(LIBTIFF)
+])
+
+
+AC_DEFUN([AC_FIND_PNG],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_MSG_CHECKING([for libpng])
+AC_CACHE_VAL(ac_cv_lib_png,
+[
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
+else
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
+fi
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_LANG_C
+AC_TRY_LINK(dnl
+    [
+    #include<png.h>
+    ],
+    [
+    png_structp png_ptr = png_create_read_struct(  /* image ptr */
+		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+    return( png_ptr != 0 );
+    ],
+    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
+    eval "ac_cv_lib_png=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
+  LIBPNG="$ac_cv_lib_png"
+  AC_SUBST(LIBPNG)
+  AC_MSG_RESULT($ac_cv_lib_png)
+else
+  AC_MSG_RESULT(no)
+  LIBPNG=""
+  AC_SUBST(LIBPNG)
+fi
+])
+
+AC_DEFUN([AC_CHECK_BOOL],
+[
+  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
+])
+
+AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
+[
+AC_MSG_CHECKING(if you need GNU extensions)
+AC_CACHE_VAL(ac_cv_gnu_extensions,
+[
+cat > conftest.c << EOF
+#include <features.h>
+
+#ifdef __GNU_LIBRARY__
+yes
+#endif
+EOF
+
+if (eval "$ac_cpp conftest.c") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_gnu_extensions=yes
+else
+  ac_cv_gnu_extensions=no
+fi
+])
+
+AC_MSG_RESULT($ac_cv_gnu_extensions)
+if test "$ac_cv_gnu_extensions" = "yes"; then
+  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
+[
+AC_MSG_CHECKING(whether $CXX supports -$1)
+kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
+[
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -$1"
+  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
+  CXXFLAGS="$save_CXXFLAGS"
+  AC_LANG_RESTORE
+])
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ :
+ $2
+else
+ AC_MSG_RESULT(no)
+ :
+ $3
+fi
+])
+
+dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
+dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
+dnl it's all white-space separated
+AC_DEFUN([AC_REMOVE_FORBIDDEN],
+[ __val=$$1
+  __forbid=" $2 "
+  if test -n "$__val"; then
+    __new=""
+    ac_save_IFS=$IFS
+    IFS=" 	"
+    for i in $__val; do
+      case "$__forbid" in
+        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
+	*) # Careful to not add spaces, where there were none, because otherwise
+	   # libtool gets confused, if we change e.g. CXX
+	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+      esac
+    done
+    IFS=$ac_save_IFS
+    $1=$__new
+  fi
+])
+
+dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
+AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
+[dnl
+if test "x$kde_use_qt_emb" != "xyes"; then
+ AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
+else
+ AC_REMOVE_FORBIDDEN(CXX, [-rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
+fi
+])
+
+AC_DEFUN([AC_CHECK_COMPILERS],
+[
+  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
+  [
+    case $enableval in
+      yes)
+        kde_use_debug_code="yes"
+        kde_use_debug_define=no
+        ;;
+      full)
+        kde_use_debug_code="full"
+        kde_use_debug_define=no
+        ;;
+      *)
+        kde_use_debug_code="no"
+        kde_use_debug_define=yes
+        ;;
+    esac
+  ], 
+    [kde_use_debug_code="no"
+      kde_use_debug_define=no
+  ])
+
+  dnl Just for configure --help
+  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
+
+  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
+   [
+    if test $enableval = "no"; then
+         kde_use_strict_options="no"
+       else
+         kde_use_strict_options="yes"
+    fi
+   ], [kde_use_strict_options="no"])
+
+  AC_ARG_ENABLE(warnings,[  --enable-warnings       compiles with -Wall and similiar],
+   [
+    if test $enableval = "no"; then
+         kde_use_warnings="no"
+       else
+         kde_use_warnings="yes"
+    fi
+   ], [kde_use_warnings="no"])
+
+  dnl enable warnings for debug build
+  if test "$kde_use_debug_code" != "no"; then
+    kde_use_warnings=yes
+  fi
+
+  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
+    [kde_use_profiling=$enableval],
+    [kde_use_profiling="no"]
+  )
+
+  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
+  CFLAGS=" $CFLAGS"
+
+  AC_PROG_CC 
+
+  AC_PROG_CPP
+
+  if test "$GCC" = "yes"; then
+    if test "$kde_use_debug_code" != "no"; then
+      if test $kde_use_debug_code = "full"; then
+        CFLAGS="-g3 $CFLAGS"
+      else
+        CFLAGS="-g -O2 $CFLAGS"
+      fi
+    else
+      CFLAGS="-O2 $CFLAGS"
+    fi
+  fi
+
+  if test "$kde_use_debug_define" = "yes"; then
+    CFLAGS="-DNDEBUG $CFLAGS"
+  fi
+
+
+  case "$host" in
+  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
+  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+  esac
+
+  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+     LDFLAGS=""
+  fi
+
+  CXXFLAGS=" $CXXFLAGS"
+
+  AC_PROG_CXX
+
+  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
+    if test "$kde_use_debug_code" != "no"; then
+      if test "$CXX" = "KCC"; then
+        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
+      else
+        if test "$kde_use_debug_code" = "full"; then
+          CXXFLAGS="-g3 $CXXFLAGS"
+        else
+          CXXFLAGS="-g -O2 $CXXFLAGS"
+        fi
+      fi
+      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
+
+      dnl convenience compiler flags
+      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
+      AC_SUBST(WOVERLOADED_VIRTUAL)
+    else
+      if test "$CXX" = "KCC"; then
+        CXXFLAGS="+K3 $CXXFLAGS"
+      else
+        CXXFLAGS="-O2 $CXXFLAGS"
+      fi  
+    fi
+  fi
+
+  if test "$kde_use_debug_define" = "yes"; then
+    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
+  fi  
+
+  if test "$kde_use_profiling" = "yes"; then
+    KDE_CHECK_COMPILER_FLAG(pg,
+    [
+      CFLAGS="-pg $CFLAGS"
+      CXXFLAGS="-pg $CXXFLAGS"
+    ])
+  fi
+
+  if test "$kde_use_warnings" = "yes"; then
+      if test "$GCC" = "yes"; then
+        case $host in
+          *-*-linux-gnu)	
+            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
+            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
+          ;;
+        esac
+        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
+        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
+        KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
+        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
+        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
+     fi
+  fi
+
+  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
+    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+  fi
+    
+  if test "$GXX" = "yes"; then
+    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
+    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
+    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
+  fi
+  if test "$CXX" = "KCC"; then
+    dnl unfortunately we currently cannot disable exception support in KCC
+    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
+    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
+    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
+
+    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
+    [
+      kde_use_pch=$enableval
+    ],[kde_use_pch=no])
+ 
+    if test "$kde_use_pch" = "yes"; then
+      dnl TODO: support --pch-dir!
+      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
+      dnl the below works (but the dir must exist), but it's
+      dnl useless for a whole package.
+      dnl The are precompiled headers for each source file, so when compiling
+      dnl from scratch, it doesn't make a difference, and they take up
+      dnl around ~5Mb _per_ sourcefile.
+      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
+      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
+    fi
+    dnl this flag controls inlining. by default KCC inlines in optimisation mode
+    dnl all implementations that are defined inside the class {} declaration. 
+    dnl because of templates-compatibility with broken gcc compilers, this
+    dnl can cause excessive inlining. This flag limits it to a sane level
+    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
+    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
+    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
+    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
+    dnl Some source files are shared between multiple executables
+    dnl (or libraries) and some of those need template instantiations.
+    dnl In that case KCC needs to compile those sources with
+    dnl --one_instantiation_per_object.  To make it easy for us we compile
+    dnl _all_ objects with that flag (--one_per is a shorthand).
+    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
+  fi
+  AC_SUBST(USE_EXCEPTIONS)
+  dnl obsolete macro - provided to keep things going
+  USE_RTTI=
+  AC_SUBST(USE_RTTI)
+
+  case "$host" in
+      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
+      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
+      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+      *-*-solaris*) 
+        if test "$GXX" = yes; then
+          libstdcpp=`$CXX -print-file-name=libstdc++.so`
+          if test ! -f $libstdcpp; then
+             AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
+          fi
+        fi
+        ;;
+  esac
+
+  AC_VALIDIFY_CXXFLAGS
+
+  AC_PROG_CXXCPP
+
+  # the following is to allow programs, that are known to
+  # have problems when compiled with -O2
+  if test -n "$CXXFLAGS"; then
+      kde_safe_IFS=$IFS
+      IFS=" "
+      NOOPT_CXXFLAGS=""
+      for i in $CXXFLAGS; do
+        case $i in
+          -O*)
+                ;;
+          *)
+                NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
+                ;;
+        esac
+      done
+      IFS=$kde_safe_IFS
+  fi
+
+  if test -n "$CFLAGS"; then
+      kde_safe_IFS=$IFS
+      IFS=" "
+      NOOPT_CFLAGS=""
+      for i in $CFLAGS; do
+        case $i in
+          -O*)
+                ;;
+          *)
+                NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
+                ;;
+        esac
+      done
+      IFS=$kde_safe_IFS
+  fi
+
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
+  fi
+
+  AC_SUBST(NOOPT_CXXFLAGS)
+  AC_SUBST(NOOPT_CFLAGS)
+
+  KDE_CHECK_FINAL
+
+  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+
+  KDE_CXXFLAGS=
+  AC_SUBST(KDE_CXXFLAGS)
+])
+
+AC_DEFUN([KDE_ADD_DEPENDENCIES],
+[
+   [A]M_DEPENDENCIES(CC)
+   [A]M_DEPENDENCIES(CXX)
+])
+
+dnl just a wrapper to clean up configure.in
+AC_DEFUN([KDE_PROG_LIBTOOL],
+[
+AC_REQUIRE([AC_CHECK_COMPILERS])
+AC_REQUIRE([AC_ENABLE_SHARED])
+AC_REQUIRE([AC_ENABLE_STATIC])
+
+AC_REQUIRE([AC_LIBTOOL_DLOPEN])
+
+AC_LANG_SAVE
+AC_LANG_C
+AC_OBJEXT
+AC_EXEEXT
+AC_LANG_RESTORE
+
+AM_PROG_LIBTOOL
+AC_LIBTOOL_CXX
+
+LIBTOOL_SHELL="/bin/sh ./libtool"
+#  LIBTOOL="$LIBTOOL --silent"
+KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+AC_SUBST(KDE_PLUGIN)
+
+AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps using objprelink (experimental [only tested on linux/386])],
+       kde_use_objprelink=$enableval, kde_use_objprelink=no)
+  if test "x$kde_use_objprelink" = "xyes"; then 
+
+      KDE_FIND_PATH(objprelink, OBJPRELINK, [], [kde_use_objprelink=no])   
+     
+      if test "x$kde_use_objprelink" = "xyes"; then
+      AC_MSG_CHECKING([Patching libtool to run objprelink.])
+      mv libtool libtool.orig
+      cat > libtool <<\EOF
+#! /bin/sh
+for n ; do case $n in
+  *.o)  test -r $n && echo objprelink $n && objprelink $n ;;
+  *.lo) m=`basename $n .lo`".o" && test -r $m && echo objprelink $m && objprelink $m 
+        m=".libs/$m" && test -r $m && echo objprelink $m && objprelink $m ;;
+esac; done
+EOF
+      cat >> libtool libtool.orig
+      rm libtool.orig
+      chmod a+x libtool
+      AC_MSG_RESULT(done)
+	fi
+  fi
+])
+
+AC_DEFUN([KDE_CHECK_TYPES],
+[  AC_CHECK_SIZEOF(int, 4)dnl
+  AC_CHECK_SIZEOF(long, 4)dnl
+  AC_CHECK_SIZEOF(char *, 4)dnl
+  AC_CHECK_SIZEOF(char, 1)dnl
+])dnl
+
+AC_DEFUN([KDE_DO_IT_ALL],
+[
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+AM_INIT_AUTOMAKE($1, $2)
+AM_DISABLE_LIBRARIES
+AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+AC_CHECK_COMPILERS
+KDE_PROG_LIBTOOL
+AM_KDE_WITH_NLS
+AC_PATH_KDE
+])
+
+AC_DEFUN([AC_CHECK_RPATH],
+[
+AC_MSG_CHECKING(for rpath)
+AC_ARG_ENABLE(rpath,
+      [  --disable-rpath         do not use the rpath feature of ld],
+      USE_RPATH=$enableval, USE_RPATH=yes)
+
+if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
+
+  KDE_RPATH="-R \$(kde_libraries)"
+
+  if test -n "$qt_libraries"; then
+    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
+  fi
+  dnl $x_libraries is set to /usr/lib in case
+  if test -n "$X_LDFLAGS"; then
+    KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
+  fi
+  if test -n "$KDE_EXTRA_RPATH"; then
+    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
+  fi
+fi
+AC_SUBST(KDE_EXTRA_RPATH)
+AC_SUBST(KDE_RPATH)
+AC_MSG_RESULT($USE_RPATH)
+])
+
+dnl Check for the type of the third argument of getsockname
+AC_DEFUN([AC_CHECK_SOCKLEN_T], [
+  AC_MSG_CHECKING(for socklen_t)
+  AC_CACHE_VAL(ac_cv_socklen_t, [
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+      ],[
+socklen_t a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+      ],
+      ac_cv_socklen_t=socklen_t,
+      AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+        ],[
+int a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+        ],
+        ac_cv_socklen_t=int,
+        ac_cv_socklen_t=size_t
+      )
+    )
+    AC_LANG_RESTORE
+  ])
+
+  AC_MSG_RESULT($ac_cv_socklen_t)
+  if test "$ac_cv_socklen_t" != "socklen_t"; then
+    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
+        [Define the real type of socklen_t])
+  fi
+  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
+
+])
+
+dnl This is a merge of some macros out of the gettext aclocal.m4
+dnl since we don't need anything, I took the things we need
+dnl the copyright for them is:
+dnl >
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in 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 This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+dnl >
+dnl for this file it is relicensed under LGPL
+
+AC_DEFUN([AM_KDE_WITH_NLS],
+  [
+    dnl If we use NLS figure out what method
+
+    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
+        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
+    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
+        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
+        GMSGFMT=":"
+      fi
+      MSGFMT=$GMSGFMT
+      AC_SUBST(GMSGFMT)
+      AC_SUBST(MSGFMT)
+
+      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
+	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+
+      dnl Test whether we really found GNU xgettext.
+      if test "$XGETTEXT" != ":"; then
+	dnl If it is no 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 programs is not GNU xgettext; ignore it])
+	  XGETTEXT=":"
+	fi
+      fi
+     AC_SUBST(XGETTEXT)
+
+  ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper at cygnus.com>, 1996.
+
+# serial 1
+# Stephan Kulow: I appended a _KDE against name conflicts
+
+dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
+[# 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 -n "[$]$1"; then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper at cygnus.com>, 1995.
+
+# serial 1
+
+AC_DEFUN([AM_LC_MESSAGES],
+  [if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include <locale.h>], [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 locale.h file contains LC_MESSAGES])
+    fi
+  fi])
+
+dnl From Jim Meyering.
+dnl FIXME: migrate into libit.
+
+AC_DEFUN([AM_FUNC_OBSTACK],
+[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
+ [AC_TRY_LINK([#include "obstack.h"],
+	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
+	      am_cv_func_obstack=yes,
+	      am_cv_func_obstack=no)])
+ if test $am_cv_func_obstack = yes; then
+   AC_DEFINE(HAVE_OBSTACK)
+ else
+   LIBOBJS="$LIBOBJS obstack.o"
+ fi
+])
+
+dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
+dnl FIXME: Migrate into libit
+
+AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
+[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+ [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+              am_cv_lib_error_at_line=yes,
+	      am_cv_lib_error_at_line=no)])
+ if test $am_cv_lib_error_at_line = no; then
+   LIBOBJS="$LIBOBJS error.o"
+ fi
+ AC_SUBST(LIBOBJS)dnl
+])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper at cygnus.com>, 1995.
+
+# serial 1
+# Stephan Kulow: I put a KDE in it to avoid name conflicts
+
+AC_DEFUN([AM_KDE_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+   AC_REQUIRE([AC_PROG_RANLIB])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   AC_REQUIRE([AC_TYPE_OFF_T])dnl
+   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+   AC_REQUIRE([AC_FUNC_MMAP])dnl
+   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
+   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
+   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next])
+
+   AC_MSG_CHECKING(for stpcpy)
+   AC_CACHE_VAL(kde_cv_func_stpcpy,
+   [
+   kde_safe_cxxflags=$CXXFLAGS
+   CXXFLAGS="-Wmissing-prototypes -Werror"
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   AC_TRY_COMPILE([
+   #include <string.h>
+   ],
+   [
+   char buffer[200];
+   stpcpy(buffer, buffer);
+   ],
+   kde_cv_func_stpcpy=yes,
+   kde_cv_func_stpcpy=no)
+   AC_LANG_RESTORE
+   CXXFLAGS=$kde_safe_cxxflags
+   ])
+   AC_MSG_RESULT($kde_cv_func_stpcpy)
+   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
+     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
+   fi
+
+   AM_LC_MESSAGES
+
+   if test "x$CATOBJEXT" != "x"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for lang in ${LINGUAS=$ALL_LINGUAS}; do
+         case "$ALL_LINGUAS" in
+          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+         esac
+       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
+
+  ])
+
+AC_DEFUN([AC_HAVE_XPM],
+ [AC_REQUIRE_CPP()dnl
+  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
+ test -z "$XPM_INCLUDE" && XPM_INCLUDE=
+
+ AC_ARG_WITH(xpm, [  --without-xpm           disable color pixmap XPM tests],
+	xpm_test=$withval, xpm_test="yes")
+ if test "x$xpm_test" = xno; then
+   ac_cv_have_xpm=no
+ else
+   AC_MSG_CHECKING(for XPM)
+   AC_CACHE_VAL(ac_cv_have_xpm,
+   [
+    AC_LANG_C
+    ac_save_ldflags="$LDFLAGS"
+    ac_save_cflags="$CFLAGS"
+    if test "x$kde_use_qt_emb" != "xyes"; then
+      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
+    else
+      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
+    fi
+    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
+    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
+    AC_TRY_LINK([#include <X11/xpm.h>],[],
+	ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
+    LDFLAGS="$ac_save_ldflags"
+    CFLAGS="$ac_save_cflags"
+   ])dnl
+
+  if test "$ac_cv_have_xpm" = no; then
+    AC_MSG_RESULT(no)
+    XPM_LDFLAGS=""
+    XPMINC=""
+    $2
+  else
+    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
+    if test "$XPM_LDFLAGS" = ""; then
+       XPMLIB='-lXpm $(LIB_X11)'
+    else
+       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
+    fi
+    if test "$XPM_INCLUDE" = ""; then
+       XPMINC=""
+    else
+       XPMINC="-I$XPM_INCLUDE"
+    fi
+    AC_MSG_RESULT(yes)
+    $1
+  fi
+ fi
+ AC_SUBST(XPMINC)
+ AC_SUBST(XPMLIB)
+])
+
+AC_DEFUN([AC_HAVE_DPMS],
+ [AC_REQUIRE_CPP()dnl
+  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
+ test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
+ DPMS_LIB=
+
+ AC_ARG_WITH(dpms, [  --without-dpms          disable DPMS power saving],
+	dpms_test=$withval, dpms_test="yes")
+ if test "x$dpms_test" = xno; then
+   ac_cv_have_dpms=no
+ else
+   AC_MSG_CHECKING(for DPMS)
+   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
+   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
+   AC_CACHE_VAL(ac_cv_have_dpms,
+   [
+    if test "x$kde_use_qt_emb" = "xyes"; then
+      AC_MSG_RESULT(no)
+      ac_cv_have_dpms="no"
+    else
+      AC_LANG_C
+      ac_save_ldflags="$LDFLAGS"
+      ac_save_cflags="$CFLAGS"
+      ac_save_libs="$LIBS"
+      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+      CFLAGS="$CFLAGS $X_INCLUDES"
+      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+      AC_TRY_LINK([
+	  #include <X11/Xproto.h>
+	  #include <X11/X.h>
+	  #include <X11/Xlib.h>
+	  #include <X11/extensions/dpms.h>
+	  int foo_test_dpms()
+	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+	  ac_cv_have_dpms="yes", [
+              LDFLAGS="$ac_save_ldflags"
+              CFLAGS="$ac_save_cflags"
+              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+              LIBS="$LIBS -lXdpms"
+              CFLAGS="$CFLAGS $X_INCLUDES"
+              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+              AC_TRY_LINK([
+	          #include <X11/Xproto.h>
+        	  #include <X11/X.h>
+        	  #include <X11/Xlib.h>
+        	  #include <X11/extensions/dpms.h>
+        	  int foo_test_dpms()
+        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+        	  [
+                  ac_cv_have_dpms="-lXdpms"
+                  ],ac_cv_have_dpms="no")
+              ])
+      LDFLAGS="$ac_save_ldflags"
+      CFLAGS="$ac_save_cflags"
+      LIBS="$ac_save_libs"
+    fi
+   ])dnl
+
+  if test "$ac_cv_have_dpms" = no; then
+    AC_MSG_RESULT(no)
+    DPMS_LDFLAGS=""
+    DPMSINC=""
+    $2
+  else
+    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
+    if test "$ac_cv_have_dpms" = "-lXdpms"; then
+       DPMS_LIB="-lXdpms"
+    fi
+    if test "$DPMS_LDFLAGS" = ""; then
+       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
+    else
+       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
+    fi
+    if test "$DPMS_INCLUDE" = ""; then
+       DPMSINC=""
+    else
+       DPMSINC="-I$DPMS_INCLUDE"
+    fi
+    AC_MSG_RESULT(yes)
+    $1
+  fi
+ fi
+ AC_SUBST(DPMSINC)
+ AC_SUBST(DPMSLIB)
+])
+
+AC_DEFUN([AC_HAVE_GL],
+ [AC_REQUIRE_CPP()dnl
+  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$GL_LDFLAGS" && GL_LDFLAGS=
+ test -z "$GL_INCLUDE" && GL_INCLUDE=
+
+ AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
+	gl_test=$withval, gl_test="yes")
+ if test "x$kde_use_qt_emb" = "xyes"; then
+   # GL and Qt Embedded is a no-go for now.
+   ac_cv_have_gl=no
+ elif test "x$gl_test" = xno; then
+   ac_cv_have_gl=no
+ else
+   AC_MSG_CHECKING(for GL)
+   AC_CACHE_VAL(ac_cv_have_gl,
+   [
+    AC_LANG_C
+    ac_save_ldflags="$LDFLAGS"
+    ac_save_cflags="$CFLAGS"
+    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
+    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+    CFLAGS="$CFLAGS $X_INCLUDES"
+    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+    AC_TRY_LINK([#include <GL/gl.h>
+#include <GL/glu.h>
+], [],
+	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
+    if test "x$ac_cv_have_gl" = "xno"; then
+      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
+      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+      CFLAGS="$ac_save_cflags $X_INCLUDES"
+      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+      AC_TRY_LINK([#include <GL/gl.h>
+#include <GL/glu.h>
+], [],
+	  ac_cv_have_gl="yes", ac_cv_have_gl="no")
+    fi
+    LDFLAGS="$ac_save_ldflags"
+    CFLAGS="$ac_save_cflags"
+   ])dnl
+
+  if test "$ac_cv_have_gl" = "no"; then
+    AC_MSG_RESULT(no)
+    GL_LDFLAGS=""
+    GLINC=""
+    $2
+  else
+    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
+    if test "$GL_LDFLAGS" = ""; then
+       if test "$ac_cv_have_gl" = "mesa"; then
+          GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
+       else
+          GLLIB='-lGL -lGLU $(LIB_X11)'
+       fi
+    else
+       if test "$ac_cv_have_gl" = "mesa"; then
+          GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
+       else
+          GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
+       fi
+    fi
+    if test "$GL_INCLUDE" = ""; then
+       GLINC=""
+    else
+       GLINC="-I$GL_INCLUDE"
+    fi
+    AC_MSG_RESULT($ac_cv_have_gl)
+    $1
+  fi
+ fi
+ AC_SUBST(GLINC)
+ AC_SUBST(GLLIB)
+])
+
+
+ dnl shadow password and PAM magic - maintained by ossi at kde.org
+
+AC_DEFUN([KDE_PAM], [
+  AC_REQUIRE([KDE_CHECK_LIBDL])
+
+  AC_ARG_WITH(pam,
+    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
+    [ if test "x$withval" = "xyes"; then
+        use_pam=yes
+        pam_service=kde
+      elif test "x$withval" = "xno"; then
+        use_pam=no
+      else
+        use_pam=yes
+        pam_service=$withval
+      fi
+      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
+    ], [
+      AC_CACHE_VAL(ac_cv_path_pam,
+        [ use_pam=no
+          AC_CHECK_LIB(pam, pam_start,
+            [ AC_CHECK_HEADER(security/pam_appl.h,
+                [ use_pam=yes
+                  pam_service=kde ]) 
+            ], , $LIBDL)
+          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
+        ])
+    ])
+  eval "$ac_cv_path_pam"
+
+  AC_MSG_CHECKING(for PAM)
+  if test "x$use_pam" = xno; then
+    AC_MSG_RESULT(no)
+    PAMLIBS=""
+  else
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
+    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+
+    dnl test whether struct pam_message is const (Linux) or not (Sun)
+    AC_MSG_CHECKING(for const pam_message)
+    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
+      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
+                        [AC_MSG_RESULT([const: Linux-type PAM])],
+                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
+                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
+                        )],
+      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
+  fi
+
+  AC_SUBST(PAMLIBS)
+])
+
+dnl DEF_PAM_SERVICE(arg name, full name, define name)
+AC_DEFUN([DEF_PAM_SERVICE], [
+  AC_ARG_WITH($1-pam,
+    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
+    [ if test "x$use_pam" = xyes; then
+        $3_PAM_SERVICE="$withval"
+      else
+        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
+You may want to enforce it by using --with-pam.])
+      fi
+    ], 
+    [ if test "x$use_pam" = xyes; then
+        $3_PAM_SERVICE="$pam_service"
+      fi
+    ])
+    if test -n "$$3_PAM_SERVICE"; then
+      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
+      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
+    fi
+    AC_SUBST($3_PAM_SERVICE)
+])
+
+AC_DEFUN([KDE_SHADOWPASSWD], [
+  AC_REQUIRE([KDE_PAM])
+
+  AC_CHECK_LIB(shadow, getspent,
+    [ LIBSHADOW="-lshadow"
+      ac_use_shadow=yes
+    ],
+    [ dnl for UnixWare
+      AC_CHECK_LIB(gen, getspent, 
+        [ LIBGEN="-lgen"
+          ac_use_shadow=yes
+        ], 
+        [ AC_CHECK_FUNC(getspent, 
+            [ ac_use_shadow=yes ],
+            [ ac_use_shadow=no ])
+	])
+    ])
+  AC_SUBST(LIBSHADOW)
+  AC_SUBST(LIBGEN)
+  
+  AC_MSG_CHECKING([for shadow passwords])
+
+  AC_ARG_WITH(shadow,
+    [  --with-shadow		  If you want shadow password support ],
+    [ if test "x$withval" != "xno"; then
+        use_shadow=yes
+      else
+        use_shadow=no
+      fi
+    ], [
+      use_shadow="$ac_use_shadow"
+    ])
+
+  if test "x$use_shadow" = xyes; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
+  else
+    AC_MSG_RESULT(no)
+    LIBSHADOW=
+    LIBGEN=
+  fi
+
+  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
+  dnl this still applies, if we could use it indirectly through pam.
+  if test "x$use_shadow" = xyes || 
+     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
+      case $host in
+      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
+	SETUIDFLAGS="-m 4755 -o root";;
+      *)
+	SETUIDFLAGS="-m 4755";;
+      esac
+  fi
+  AC_SUBST(SETUIDFLAGS)
+
+])
+
+AC_DEFUN([KDE_PASSWDLIBS], [
+  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
+  AC_REQUIRE([KDE_PAM])
+  AC_REQUIRE([KDE_SHADOWPASSWD])
+
+  if test "x$use_pam" = "xyes"; then 
+    PASSWDLIBS="$PAMLIBS"
+  else
+    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
+  fi
+
+  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
+  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
+  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
+  dnl may need to read /etc/master.passwd).
+  case $host in
+  *-*-freebsd*)
+    SETUIDFLAGS="-m 4755 -o root"
+    ;;
+  *)
+    ;;
+  esac
+
+  AC_SUBST(PASSWDLIBS)
+])
+
+AC_DEFUN([KDE_CHECK_LIBDL],
+[
+AC_CHECK_LIB(dl, dlopen, [
+LIBDL="-ldl"
+ac_cv_have_dlfcn=yes
+])
+
+AC_CHECK_LIB(dld, shl_unload, [
+LIBDL="-ldld"
+ac_cv_have_shload=yes
+])
+
+AC_SUBST(LIBDL)
+])
+
+AC_DEFUN([KDE_CHECK_DLOPEN],
+[
+KDE_CHECK_LIBDL
+AC_CHECK_HEADERS(dlfcn.h dl.h)
+if test "$ac_cv_header_dlfcn_h" = "no"; then
+  ac_cv_have_dlfcn=no
+fi
+
+if test "$ac_cv_header_dl_h" = "no"; then
+  ac_cv_have_shload=no
+fi
+
+dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
+dnl (MM)
+AC_ARG_ENABLE(dlopen,
+[  --disable-dlopen        link statically [default=no]] ,
+enable_dlopen=$enableval,
+enable_dlopen=yes)
+
+# override the user's opinion, if we know it better ;)
+if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
+  enable_dlopen=no
+fi
+
+if test "$ac_cv_have_dlfcn" = "yes"; then
+  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
+fi
+
+if test "$ac_cv_have_shload" = "yes"; then
+  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
+fi
+
+if test "$enable_dlopen" = no ; then
+  test -n "$1" && eval $1
+else
+  test -n "$2" && eval $2
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
+[
+KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
+KDE_PROG_LIBTOOL
+AC_MSG_CHECKING([dynamic loading])
+eval "`egrep '^build_libtool_libs=' libtool`"
+if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
+  dynamic_loading=yes
+  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
+else
+  dynamic_loading=no
+fi
+AC_MSG_RESULT($dynamic_loading)
+if test "$dynamic_loading" = "yes"; then
+  $1
+else
+  $2
+fi
+])
+
+AC_DEFUN([KDE_ADD_INCLUDES],
+[
+if test -z "$1"; then
+  test_include="Pix.h"
+else
+  test_include="$1"
+fi
+
+AC_MSG_CHECKING([for libg++ ($test_include)])
+
+AC_CACHE_VAL(kde_cv_libgpp_includes,
+[
+kde_cv_libgpp_includes=no
+
+   for ac_dir in               \
+                               \
+     /usr/include/g++          \
+     /usr/include              \
+     /usr/unsupported/include  \
+     /opt/include              \
+     $extra_include            \
+     ; \
+   do
+     if test -r "$ac_dir/$test_include"; then
+       kde_cv_libgpp_includes=$ac_dir
+       break
+     fi
+   done
+])
+
+AC_MSG_RESULT($kde_cv_libgpp_includes)
+if test "$kde_cv_libgpp_includes" != "no"; then
+  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
+fi
+])
+])
+
+
+AC_DEFUN([KDE_CHECK_MICO],
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_MISC_TESTS])
+AC_MSG_CHECKING(for MICO)
+
+if test -z "$MICODIR"; then
+    kde_micodir=/usr/local
+ else
+    kde_micodir="$MICODIR"
+fi
+
+AC_ARG_WITH(micodir,
+  [  --with-micodir=micodir  where mico is installed ],
+  kde_micodir=$withval,
+  kde_micodir=$kde_micodir
+)
+
+AC_CACHE_VAL(kde_cv_mico_incdir,
+[
+  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
+AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
+
+])
+kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
+
+if test ! -r  $kde_micodir/include/CORBA.h; then
+  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
+fi
+
+AC_MSG_RESULT($kde_micodir)
+
+MICO_INCLUDES=-I$kde_micodir/include
+AC_SUBST(MICO_INCLUDES)
+MICO_LDFLAGS=-L$kde_micodir/lib
+AC_SUBST(MICO_LDFLAGS)
+micodir=$kde_micodir
+AC_SUBST(micodir)
+
+AC_MSG_CHECKING([for MICO version])
+AC_CACHE_VAL(kde_cv_mico_version,
+[
+AC_LANG_C
+cat >conftest.$ac_ext <<EOF
+#include <stdio.h>
+#include <mico/version.h>
+int main() {
+
+   printf("MICO_VERSION=%s\n",MICO_VERSION);
+   return (0);
+}
+EOF
+ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
+if AC_TRY_EVAL(ac_compile); then
+  if eval `./conftest 2>&5`; then
+    kde_cv_mico_version=$MICO_VERSION
+  else
+    AC_MSG_ERROR([your system is not able to execute a small application to
+    find MICO version! Check $kde_micodir/include/mico/version.h])
+  fi
+else
+  AC_MSG_ERROR([your system is not able to compile a small application to
+  find MICO version! Check $kde_micodir/include/mico/version.h])
+fi
+])
+
+dnl installed MICO version
+mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "x$1" = "x"; then
+ req_version="2.3.0"
+else
+ req_version=$1
+fi
+
+dnl required MICO version
+req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "$mico_v_maj" -lt "$req_v_maj" || \
+   ( test "$mico_v_maj" -eq "$req_v_maj" && \
+        test "$mico_v_mid" -lt "$req_v_mid" ) || \
+   ( test "$mico_v_mid" -eq "$req_v_mid" && \
+        test "$mico_v_min" -lt "$req_v_min" )
+
+then
+  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
+at least is required. You should upgrade MICO.])
+else
+  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
+fi
+
+LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
+AC_SUBST(LIBMICO)
+if test -z "$IDL"; then
+  IDL='$(kde_bindir)/cuteidl'
+fi
+AC_SUBST(IDL)
+IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
+AC_SUBST(IDL_DEPENDENCIES)
+
+idldir="\$(includedir)/idl"
+AC_SUBST(idldir)
+
+])
+
+AC_DEFUN([KDE_CHECK_MINI_STL],
+[
+AC_REQUIRE([KDE_CHECK_MICO])
+
+AC_MSG_CHECKING(if we use mico's mini-STL)
+AC_CACHE_VAL(kde_cv_have_mini_stl,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_cxxflags="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
+AC_TRY_COMPILE(
+[
+#include <mico/config.h>
+],
+[
+#ifdef HAVE_MINI_STL
+#error "nothing"
+#endif
+],
+kde_cv_have_mini_stl=no,
+kde_cv_have_mini_stl=yes)
+CXXFLAGS="$kde_save_cxxflags"
+AC_LANG_RESTORE
+])
+
+if test "x$kde_cv_have_mini_stl" = "xyes"; then
+   AC_MSG_RESULT(yes)
+   $1
+else
+   AC_MSG_RESULT(no)
+   $2
+fi
+])
+
+])
+
+
+AC_DEFUN([KDE_CHECK_LIBPTHREAD],
+[
+AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
+AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
+[
+    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
+	kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
+
+    if test "$kde_use_kernthreads" = "yes"; then
+      ac_save_CXXFLAGS="$CXXFLAGS"
+      ac_save_CFLAGS="$CFLAGS"
+      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
+      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
+      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
+      CXXFLAGS="$ac_save_CXXFLAGS"
+      CFLAGS="$ac_save_CFLAGS"
+      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
+        kde_use_kernthreads=no
+      else
+        dnl Add proper -I and -l statements
+        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
+        if test "x$LIBPTHREAD" = "x"; then
+          kde_use_kernthreads=no
+        else
+          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
+        fi
+      fi
+    else 
+      USE_THREADS=""
+      if test -z "$LIBPTHREAD"; then
+        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
+      fi
+    fi
+
+    case $host_os in
+ 	solaris*)
+		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
+                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+    		;;
+        freebsd*)
+                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                ;;
+        aix*)
+                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                LIBPTHREAD="$LIBPTHREAD -lc_r"
+                ;;
+        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+                if test "$CXX" = "KCC"; then
+                  CXXFLAGS="$CXXFLAGS --thread_safe"
+		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
+                fi
+                ;;
+	*)
+		;;
+    esac
+    AC_SUBST(USE_THREADS)
+    AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_THREADING],
+[
+  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
+  dnl default is yes if libpthread is found and no if no libpthread is available
+  if test -z "$LIBPTHREAD"; then
+    if test -z "$USE_THREADS"; then
+      kde_check_threading_default=no
+    else
+      kde_check_threading_default=yes
+    fi
+  else
+    kde_check_threading_default=yes
+  fi
+  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
+   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
+  if test "x$kde_use_threading" = "xyes"; then
+    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+  fi
+])
+
+AC_DEFUN([KDE_TRY_LINK_PYTHON],
+[
+if test "$kde_python_link_found" = no; then
+
+if test "$1" = normal; then
+  AC_MSG_CHECKING(if a Python application links)
+else
+  AC_MSG_CHECKING(if Python depends on $2)
+fi
+
+AC_CACHE_VAL(kde_cv_try_link_python_$1,
+[
+AC_LANG_SAVE
+AC_LANG_C
+kde_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS $PYTHONINC"
+kde_save_libs="$LIBS"
+LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
+kde_save_ldflags="$LDFLAGS"
+LDFLAGS="$LDFLAGS $PYTHONLIB"
+
+AC_TRY_LINK(
+[
+#include <Python.h>
+],[
+	PySys_SetArgv(1, 0);
+],
+	[kde_cv_try_link_python_$1=yes],
+	[kde_cv_try_link_python_$1=no]
+)
+CFLAGS="$kde_save_cflags"
+LIBS="$kde_save_libs"
+LDFLAGS="$kde_save_ldflags"
+])
+
+if test "$kde_cv_try_link_python_$1" = "yes"; then
+  AC_MSG_RESULT(yes)
+  kde_python_link_found=yes
+  if test ! "$1" = normal; then
+    LIBPYTHON="$LIBPYTHON $2"
+  fi
+  $3
+else
+  AC_MSG_RESULT(no)
+  $4
+fi
+AC_LANG_RESTORE
+
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_DIR],
+[
+AC_MSG_CHECKING([for Python directory])
+ 
+AC_CACHE_VAL(kde_cv_pythondir,
+[
+  if test -z "$PYTHONDIR"; then
+    kde_cv_pythondir=/usr/local
+  else
+    kde_cv_pythondir="$PYTHONDIR"
+  fi
+])
+ 
+AC_ARG_WITH(pythondir,
+[  --with-pythondir=pythondir   use python installed in pythondir ],
+[
+  ac_python_dir=$withval
+], ac_python_dir=$kde_cv_pythondir
+)
+ 
+AC_MSG_RESULT($ac_python_dir)
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
+
+if test -z "$1"; then
+  version="1.5"
+else
+  version="$1"
+fi
+
+AC_MSG_CHECKING([for Python$version])
+
+python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
+AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
+if test ! -r $python_incdir/Python.h; then
+  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
+  python_incdir=$python_incdir/python$version
+  if test ! -r $python_incdir/Python.h; then
+    python_incdir=no
+  fi
+fi
+
+PYTHONINC=-I$python_incdir
+
+python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
+AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
+if test ! -r $python_libdir/libpython$version.a; then
+  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
+  python_libdir=$python_libdir/python$version/config
+  if test ! -r $python_libdir/libpython$version.a; then
+    python_libdir=no
+  fi
+fi
+
+PYTHONLIB=-L$python_libdir
+kde_orig_LIBPYTHON=$LIBPYTHON
+if test -z "$LIBPYTHON"; then
+  LIBPYTHON=-lpython$version
+fi
+
+python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
+AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
+python_moddir=$python_moddir/python$version
+if test ! -r $python_moddir/copy.py; then
+  python_moddir=no
+fi
+
+PYTHONMODDIR=$python_moddir
+
+AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
+
+if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
+   LIBPYTHON=$kde_orig_LIBPYTHON
+   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
+   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
+   $2
+else 
+  dnl Note: this test is very weak
+  kde_python_link_found=no
+  KDE_TRY_LINK_PYTHON(normal)
+  KDE_TRY_LINK_PYTHON(m, -lm)
+  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
+  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
+  KDE_TRY_LINK_PYTHON(db2, -ldb2)
+  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
+  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
+  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+	[AC_MSG_WARN([it seems, Python depends on another library.
+    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
+    and contact the authors to let them know about this problem])
+	])
+
+  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
+  AC_SUBST(PYTHONINC)
+  AC_SUBST(PYTHONLIB)
+  AC_SUBST(LIBPYTHON)
+  AC_SUBST(PYTHONMODDIR)
+  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
+fi
+
+])
+
+
+AC_DEFUN([KDE_CHECK_PYTHON],
+[
+  KDE_CHECK_PYTHON_INTERN("2.2", 
+    [KDE_CHECK_PYTHON_INTERN("2.1", 
+      [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
+  ])])
+])
+
+AC_DEFUN([KDE_CHECK_STL_SGI],
+[
+    AC_MSG_CHECKING([if STL implementation is SGI like])
+    AC_CACHE_VAL(kde_cv_stl_type_sgi,
+    [
+      AC_TRY_COMPILE([
+#include <string>
+using namespace std;
+],[
+  string astring="Hallo Welt.";
+  astring.erase(0, 6); // now astring is "Welt"
+  return 0;
+], kde_cv_stl_type_sgi=yes,
+   kde_cv_stl_type_sgi=no)
+])
+
+   AC_MSG_RESULT($kde_cv_stl_type_sgi)
+
+   if test "$kde_cv_stl_type_sgi" = "yes"; then
+	AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
+   fi
+])
+
+AC_DEFUN([KDE_CHECK_STL_HP],
+[
+    AC_MSG_CHECKING([if STL implementation is HP like])
+    AC_CACHE_VAL(kde_cv_stl_type_hp,
+    [
+      AC_TRY_COMPILE([
+#include <string>
+using namespace std;
+],[
+  string astring="Hello World";
+  astring.remove(0, 6); // now astring is "World"
+  return 0;
+], kde_cv_stl_type_hp=yes,
+   kde_cv_stl_type_hp=no)
+])
+   AC_MSG_RESULT($kde_cv_stl_type_hp)
+
+   if test "$kde_cv_stl_type_hp" = "yes"; then
+	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
+   fi
+])
+
+AC_DEFUN([KDE_CHECK_STL],
+[
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
+    KDE_CHECK_STL_SGI
+
+    if test "$kde_cv_stl_type_sgi" = "no"; then
+       KDE_CHECK_STL_HP
+
+       if test "$kde_cv_stl_type_hp" = "no"; then
+         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
+       fi
+    fi
+
+    CXXFLAGS="$ac_save_CXXFLAGS"
+    AC_LANG_RESTORE
+])
+
+AC_DEFUN([AC_FIND_QIMGIO],
+   [AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for qimgio])
+AC_CACHE_VAL(ac_cv_lib_qimgio,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+ac_save_CXXFLAGS="$CXXFLAGS"
+LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+AC_TRY_RUN(dnl
+[
+#include <qimageio.h>
+#include <qstring.h>
+int main() {
+		QString t = "hallo";
+		t.fill('t');
+		qInitImageIO();
+}
+],
+            ac_cv_lib_qimgio=yes,
+            ac_cv_lib_qimgio=no,
+	    ac_cv_lib_qimgio=no)
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+])dnl
+if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
+  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
+  AC_MSG_RESULT(yes)
+  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
+  AC_SUBST(LIBQIMGIO)
+else
+  AC_MSG_RESULT(not found)
+fi
+])
+
+AC_DEFUN([KDE_CHECK_ANSI],
+[
+])
+
+AC_DEFUN([KDE_CHECK_INSURE],
+[
+  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
+  [
+  if test $enableval = "no"; dnl
+	then ac_use_insure="no"
+	else ac_use_insure="yes"
+   fi
+  ], [ac_use_insure="no"])
+
+  AC_MSG_CHECKING(if we will use Insure++ to debug)
+  AC_MSG_RESULT($ac_use_insure)
+  if test "$ac_use_insure" = "yes"; dnl
+       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
+   fi
+])
+
+AC_DEFUN([AM_DISABLE_LIBRARIES],
+[
+    AC_PROVIDE([AM_ENABLE_STATIC])
+    AC_PROVIDE([AM_ENABLE_SHARED])
+    enable_static=no
+    enable_shared=yes
+])
+
+
+AC_DEFUN([AC_CHECK_UTMP_FILE],
+[
+    AC_MSG_CHECKING([for utmp file])
+
+    AC_CACHE_VAL(kde_cv_utmp_file,
+    [
+    kde_cv_utmp_file=no
+
+    for ac_file in    \
+                      \
+	/var/run/utmp \
+	/var/adm/utmp \
+	/etc/utmp     \
+     ; \
+    do
+     if test -r "$ac_file"; then
+       kde_cv_utmp_file=$ac_file
+       break
+     fi
+    done
+    ])
+
+    if test "$kde_cv_utmp_file" != "no"; then
+	AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
+	$1
+	AC_MSG_RESULT($kde_cv_utmp_file)
+    else
+    	$2
+	AC_MSG_RESULT([non found])
+    fi
+])
+
+
+AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
+[
+
+DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
+
+if test ! -s $srcdir/subdirs; then
+  dnl Note: Makefile.common creates subdirs, so this is just a fallback
+  TOPSUBDIRS=""
+  files=`cd $srcdir && ls -1`
+  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
+  for i in $dirs; do
+    echo $i >> $srcdir/subdirs
+  done
+fi
+
+if test -s $srcdir/inst-apps; then
+  ac_topsubdirs="`cat $srcdir/inst-apps`"
+else
+  ac_topsubdirs="`cat $srcdir/subdirs`"
+fi
+
+for i in $ac_topsubdirs; do
+  AC_MSG_CHECKING([if $i should be compiled])
+  if test -d $srcdir/$i; then
+    install_it="yes"
+    for j in $DO_NOT_COMPILE; do
+      if test $i = $j; then
+        install_it="no"
+      fi
+    done
+  else
+    install_it="no"
+  fi
+  AC_MSG_RESULT($install_it)
+  if test $install_it = "yes"; then
+    TOPSUBDIRS="$TOPSUBDIRS $i"
+  fi
+done
+
+AC_SUBST(TOPSUBDIRS)
+])
+
+AC_DEFUN([KDE_CHECK_NAMESPACES],
+[
+AC_MSG_CHECKING(whether C++ compiler supports namespaces)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE([
+],
+[
+namespace Foo {
+  extern int i;
+  namespace Bar {
+    extern int i;
+  }
+}
+
+int Foo::i = 0;
+int Foo::Bar::i = 1;
+],[
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_NAMESPACES)
+], [
+AC_MSG_RESULT(no)
+])
+AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_CHECK_NEWLIBS],
+[
+
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure at kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_S_ISSOCK],
+[
+AC_MSG_CHECKING(for S_ISSOCK)
+AC_CACHE_VAL(ac_cv_have_s_issock,
+[
+AC_LANG_SAVE
+AC_LANG_C
+AC_TRY_LINK(
+[
+#include <sys/stat.h>
+],
+[
+struct stat buff;
+int b = S_ISSOCK( buff.st_mode );
+],
+ac_cv_have_s_issock=yes,
+ac_cv_have_s_issock=no)
+AC_LANG_RESTORE
+])
+AC_MSG_RESULT($ac_cv_have_s_issock)
+if test "$ac_cv_have_s_issock" = "yes"; then
+  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
+fi
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure at kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
+[
+AC_MSG_CHECKING(for MAXPATHLEN)
+AC_CACHE_VAL(ac_cv_maxpathlen,
+[
+AC_LANG_C
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <sys/param.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
+KDE_HELLO MAXPATHLEN
+
+EOF
+
+ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
+
+if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
+    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
+else
+    ac_cv_maxpathlen=1024
+fi
+
+rm conftest.*
+
+])
+AC_MSG_RESULT($ac_cv_maxpathlen)
+AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
+])
+
+dnl -------------------------------------------------------------------------
+dnl See if the compiler supports a template repository         bero at redhat.de
+dnl -------------------------------------------------------------------------
+AC_DEFUN([KDE_COMPILER_REPO],
+[
+  REPO=""
+  NOREPO=""
+
+  KDE_CHECK_COMPILER_FLAG(frepo,
+   [
+     REPO="-frepo"
+     NOREPO="-fno-repo"
+   ])
+
+  if test -z "$REPO"; then
+  KDE_CHECK_COMPILER_FLAG(instances=explicit,
+  [
+     REPO="-instances=explicit"
+     NOREPO="-instances=extern"
+  ])
+  fi
+
+  if test -n "$REPO"; then
+     AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
+		[C++ compiler supports template repository])
+     $1
+  fi
+
+  AC_SUBST(REPO)
+  AC_SUBST(NOREPO)
+])
+
+AC_DEFUN([KDE_CHECK_HEADER],
+[
+   AC_LANG_SAVE
+   kde_safe_cppflags=$CPPFLAGS
+   CPPFLAGS="$CPPFLAGS $all_includes"
+   AC_LANG_CPLUSPLUS
+   AC_CHECK_HEADER($1, $2, $3)
+   CPPFLAGS=$kde_safe_cppflags
+   AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_FAST_CONFIGURE],
+[
+  dnl makes configure fast (needs perl)
+  AC_ARG_ENABLE(fast-perl, [  --disable-fast-perl     disable fast Makefile generation (needs perl)],
+      with_fast_perl=$enableval, with_fast_perl=yes)
+])
+
+AC_DEFUN([KDE_CONF_FILES],
+[
+  val=
+  if test -f $srcdir/configure.files ; then
+    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
+  fi
+  CONF_FILES=
+  if test -n "$val" ; then
+    for i in $val ; do
+      CONF_FILES="$CONF_FILES $i"
+    done
+  fi
+  AC_SUBST(CONF_FILES)
+])dnl
+
+AC_DEFUN([KDE_SET_PREFIX],
+[
+  unset CDPATH
+  dnl make $KDEDIR the default for the installation
+  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+
+  if test "x$prefix" = "xNONE"; then
+    prefix=$ac_default_prefix
+    ac_configure_args="$ac_configure_args --prefix $prefix"
+  fi
+  KDE_FAST_CONFIGURE
+  KDE_CONF_FILES
+])
+
+pushdef([AC_PROG_INSTALL],
+[
+  dnl our own version, testing for a -p flag
+  popdef([AC_PROG_INSTALL])
+  dnl as AC_PROG_INSTALL works as it works we first have
+  dnl to save if the user didn't specify INSTALL, as the
+  dnl autoconf one overwrites INSTALL and we have no chance to find
+  dnl out afterwards
+  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
+  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
+  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
+  AC_PROG_INSTALL
+
+  if test -z "$kde_save_INSTALL_given" ; then
+    # OK, user hasn't given any INSTALL, autoconf found one for us
+    # now we test, if it supports the -p flag
+    AC_MSG_CHECKING(for -p flag to install)
+    rm -f confinst.$$.* > /dev/null 2>&1
+    echo "Testtest" > confinst.$$.orig
+    ac_res=no
+    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
+      if test -f confinst.$$.new ; then
+        # OK, -p seems to do no harm to install
+	INSTALL="${INSTALL} -p"
+	ac_res=yes
+      fi
+    fi
+    rm -f confinst.$$.*
+    AC_MSG_RESULT($ac_res)
+  fi
+  dnl the following tries to resolve some signs and wonders coming up
+  dnl with different autoconf/automake versions
+  dnl e.g.:
+  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
+  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
+  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
+  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
+  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
+  dnl   install- at DIR@PROGRAMS targets to explicitly use that flag
+  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
+  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
+  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
+  dnl  *sometimes KDE does not use the install- at DIR@PROGRAM targets from
+  dnl   automake (due to broken Makefile.am or whatever) to install programs,
+  dnl   and so does not see the -s flag in automake > 1.4
+  dnl to clean up that mess we:
+  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
+  dnl   which cleans KDE's program with automake > 1.4;
+  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
+  dnl   with automake<=1.4
+  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
+  dnl   properly uses install- at DIR@PROGRAMS, but I don't care
+  dnl
+  dnl And to all this comes, that I even can't write in comments variable
+  dnl  names used by automake, because it is so stupid to think I wanted to
+  dnl  _use_ them, therefor I have written A_M_... instead of AM_
+  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
+
+  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
+    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+  fi
+  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
+    INSTALL_SCRIPT='${INSTALL}'
+  fi
+])dnl
+
+AC_DEFUN([KDE_LANG_CPLUSPLUS],
+[AC_LANG_CPLUSPLUS
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
+pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
+])
+
+pushdef([AC_LANG_CPLUSPLUS],
+[popdef([AC_LANG_CPLUSPLUS])
+KDE_LANG_CPLUSPLUS
+])
+
+AC_DEFUN([KDE_CHECK_LONG_LONG],
+[
+AC_MSG_CHECKING(for long long)
+AC_CACHE_VAL(kde_cv_c_long_long,
+[
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_TRY_LINK([], [
+  long long foo = 0;
+  foo = foo+1;
+  ],
+  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
+  AC_LANG_RESTORE
+])
+AC_MSG_RESULT($kde_cv_c_long_long)
+if test "$kde_cv_c_long_long" = yes; then
+   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_LIB],
+[
+     kde_save_LDFLAGS="$LDFLAGS"
+     dnl AC_CHECK_LIB modifies LIBS, so save it here
+     kde_save_LIBS="$LIBS"
+     LDFLAGS="$LDFLAGS $all_libraries"
+     case $host_os in
+      aix*) LDFLAGS="-brtl $LDFLAGS"
+	test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
+	;;
+     esac
+     AC_CHECK_LIB($1, $2, $3, $4, $5)
+     LDFLAGS="$kde_save_LDFLAGS"
+     LIBS="$kde_save_LIBS"
+])
+
+
+
+
+AC_DEFUN([KDE_CHECK_INITGROUPS],
+[ 
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_FUNCS(initgroups)
+  if test "x$ac_cv_func_initgroups" = "xyes"; then
+    case $host_os in
+      aix*) AC_LANG_SAVE
+            AC_LANG_CPLUSPLUS
+            AC_MSG_CHECKING([for initgroups prototype])
+            AC_CACHE_VAL(kde_cv_check_initgroups_proto,
+            [ AC_TRY_COMPILE(
+              [ #include <grp.h>
+              ],
+              [ char buffer[10];
+                gid_t id;
+                int x = initgroups(buffer,id);
+              ],
+              kde_cv_check_initgroups_proto=yes,
+              kde_cv_check_initgroups_proto=no)
+            ])
+            AC_MSG_RESULT($kde_cv_check_initgroups_proto)
+            AC_LANG_RESTORE
+            ;;
+      *)
+            kde_cv_check_initgroups_proto=yes
+            ;;
+    esac
+  else
+    kde_cv_check_initgroups_proto=no
+  fi
+  if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
+    kde_check_initgroups_proto=1
+  else
+    kde_check_initgroups_proto=0
+  fi
+  AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
+           [initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
+])
+
+
+AC_DEFUN([KDE_CHECK_JAVA_DIR],
+[
+AC_MSG_CHECKING([for Java directory])
+
+AC_ARG_WITH(java,
+[  --with-java=javadir     use java installed in javadir, --without-java disables ],
+[  ac_java_dir=$withval
+], ac_java_dir=""
+)
+
+dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
+if test "x$ac_java_dir" = "xno"; then
+   kde_cv_java_bindir=no
+   kde_cv_java_includedir=no
+   kde_java_libjvmdir=no
+   kde_java_libhpidir=no
+else
+  if test "x$ac_java_dir" = "x"; then
+    dnl No option set -> look in $PATH
+    AC_CACHE_VAL(kde_cv_java_bindir,
+    [
+      dnl First look for javac in $PATH. If not found we'll look at the option.
+      KDE_FIND_PATH(javac, JAVAC, [], [])
+      if test -n "$JAVAC"; then
+          kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
+          dnl this substitution might not work - well, we test for jni.h below
+          kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
+      else
+          kde_cv_java_bindir=no
+      fi
+    ])
+  else
+    dnl config option set
+    kde_cv_java_bindir=$ac_java_dir/bin
+    kde_cv_java_includedir=$ac_java_dir/include
+  fi
+fi
+
+dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
+if test "x$kde_cv_java_bindir" != "xno"; then
+
+  dnl Look for libjvm.so
+  kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
+  dnl Look for libhpi.so and avoid green threads
+  kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
+
+  dnl Now check everything's fine under there
+
+  if test ! -x "$kde_cv_java_bindir/javac"; then
+    AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
+  fi
+  if test ! -x "$kde_cv_java_bindir/javah"; then
+    AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
+  fi
+  if test ! -x "$kde_cv_java_bindir/jar"; then
+    AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
+  fi
+  if test ! -r "$kde_cv_java_includedir/jni.h"; then
+    AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
+  fi
+  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
+    AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
+  fi
+  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
+    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
+  fi
+
+  jni_includes="-I$kde_cv_java_includedir"
+  dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
+  dnl and under linux here..
+  test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
+  test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
+
+  dnl Check for JNI version
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  ac_cxxflags_safe="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
+
+  AC_TRY_COMPILE([
+#include <jni.h>
+	    ],
+	    [
+#ifndef JNI_VERSION_1_2
+Syntax Error
+#endif
+	    ],[ kde_jni_works=yes ],
+            [ kde_jni_works=no ])
+
+  if test $kde_jni_works = no; then
+    AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
+	          You need to have Java Development Kit (JDK) version 1.2. 
+	
+	          Use --with-java to specify another location.
+	          Use --without-java to configure without java support.
+        	  Or download a newer JDK and try again. 
+	          See e.g. http://java.sun.com/products/jdk/1.2 ])
+  fi
+
+  CXXFLAGS="$ac_cxxflags_safe"    
+  AC_LANG_RESTORE
+
+  dnl All tests ok, inform and subst the variables
+  AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
+
+  JAVAC=$kde_cv_java_bindir/javac
+  AC_SUBST(JAVAC)
+  JAVAH=$kde_cv_java_bindir/javah
+  AC_SUBST(JAVAH)
+  JAR=$kde_cv_java_bindir/jar
+  AC_SUBST(JAR)
+  AC_SUBST(jni_includes)
+  JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
+  AC_SUBST(JVMLIBS)
+fi
+])
+
+dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
+dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
+dnl big packages, m4_foreach is dog-slow.  So use our own version of
+dnl it.  (matz at kde.org)
+dnl m4_define([mm_foreach],
+dnl [m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
+dnl m4_define([mm_car], [[$1]])
+dnl m4_define([mm_car2], [[$@]])
+dnl m4_define([_mm_foreach],
+dnl [m4_if(m4_quote($2), [], [],
+dnl       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
+dnl                                                     mm_car2(m4_shift($2)),
+dnl                                                     [$3])])])
+dnl m4_define([AC_FOREACH],
+dnl [mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
+
+AC_DEFUN([KDE_NEED_FLEX],
+[
+kde_libs_safe=$LIBS
+LIBS="$LIBS $USER_LDFLAGS"
+AM_PROG_LEX
+LIBS=$kde_libs_safe
+if test -z "$LEXLIB"; then
+    AC_MSG_ERROR([You need to have flex installed.])
+fi
+AC_SUBST(LEXLIB)
+])
+
+AC_DEFUN([AC_PATH_QTOPIA],
+[
+  dnl TODO: use AC_CACHE_VAL
+
+  if test -z "$1"; then
+    qtopia_minver_maj=1
+    qtopia_minver_min=5
+    qtopia_minver_pat=0
+  else
+    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
+    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
+    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
+  fi
+
+  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
+  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
+
+  AC_REQUIRE([AC_PATH_QT])
+
+  AC_MSG_CHECKING([for Qtopia])
+
+  LIB_QTOPIA="-lqpe"
+  AC_SUBST(LIB_QTOPIA)
+
+  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
+
+  ac_qtopia_incdir=NO
+
+  AC_ARG_WITH(qtopia-dir,
+              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
+              [  ac_qtopia_incdir="$withval"/include] ) 
+  
+  qtopia_incdirs=""
+  for dir in $kde_qtopia_dirs; do
+    qtopia_incdirs="$qtopia_incdirs $dir/include"
+  done
+
+  if test ! "$ac_qtopia_incdir" = "NO"; then
+    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
+  fi
+
+  qtopia_incdir=""
+  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
+  ac_qtopia_incdir="$qtopia_incdir"
+
+  if test -z "$qtopia_incdir"; then
+    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
+  fi
+
+  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
+  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
+  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
+
+  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
+  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
+  if test "$qtopia_ver" -lt "$qtopia_minver"; then
+    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
+is required.])
+  fi
+
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+
+  ac_cxxflags_safe="$CXXFLAGS"
+  ac_ldflags_safe="$LDFLAGS"
+  ac_libs_safe="$LIBS"
+
+  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
+  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
+
+  cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qpe/qpeapplication.h>
+#include <qpe/version.h>
+
+int main( int argc, char **argv )
+{
+    QPEApplication app( argc, argv );
+    return 0;
+}
+EOF
+
+  if AC_TRY_EVAL(ac_link) && test -s conftest; then
+    rm -f conftest*
+  else
+    rm -f conftest*
+    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
+the end of config.log])
+  fi
+
+  CXXFLAGS="$ac_cxxflags_safe"
+  LDFLAGS="$ac_ldflags_safe"
+  LIBS="$ac_libs_safe"
+
+  AC_LANG_RESTORE
+
+  QTOPIA_INCLUDES="-I$qtopia_incdir"
+  AC_SUBST(QTOPIA_INCLUDES)
+
+  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
+])
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..2c7080c
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,10087 @@
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 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.
+
+# 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(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+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'.])])
+
+# gettext.m4 serial 60 (gettext-0.17)
+dnl Copyright (C) 1995-2007 Free Software Foundation, 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 <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external],
+      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+      [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+         [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+            [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+            [eval "$gt_func_gnugettext_libc=yes"],
+            [eval "$gt_func_gnugettext_libc=no"])])
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            [$gt_func_gnugettext_libintl],
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+              [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+              [eval "$gt_func_gnugettext_libintl=yes"],
+              [eval "$gt_func_gnugettext_libintl=no"])
+            dnl Now see whether libintl exists and depends on libiconv.
+            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+                [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+               [LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                eval "$gt_func_gnugettext_libintl=yes"
+               ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE(HAVE_GETTEXT, 1,
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE(HAVE_DCGETTEXT, 1,
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATOBJEXT)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST(INTLOBJS)
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST(INTLLIBS)
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST(LIBINTL)
+  AC_SUBST(LTLIBINTL)
+  AC_SUBST(POSUB)
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+# iconv.m4 serial AM6 (gettext-0.17)
+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, 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 From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
+      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+      am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          return 1;
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    return 1;
+  return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+        [case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac])
+      LIBS="$am_save_LIBS"
+    ])
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1,
+      [Define if you have the iconv() function and it works.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST(LIBICONV)
+  AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
+
+# intlmacosx.m4 serial 1 (gettext-0.17)
+dnl Copyright (C) 2004-2007 Free Software Foundation, 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 Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+  dnl Check for API introduced in MacOS X 10.2.
+  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+    gt_cv_func_CFPreferencesCopyAppValue,
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+       [CFPreferencesCopyAppValue(NULL, NULL)],
+       [gt_cv_func_CFPreferencesCopyAppValue=yes],
+       [gt_cv_func_CFPreferencesCopyAppValue=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+  fi
+  dnl Check for API introduced in MacOS X 10.3.
+  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+       [gt_cv_func_CFLocaleCopyCurrent=yes],
+       [gt_cv_func_CFLocaleCopyCurrent=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+  AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, 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 Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break ;;
+      *)
+	test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+
+# lib-link.m4 serial 13 (gettext-0.17)
+dnl Copyright (C) 2001-2007 Free Software Foundation, 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 From Bruno Haible.
+
+AC_PREREQ(2.54)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl   acl_libext,
+dnl   acl_shlibext,
+dnl   acl_hardcode_libdir_flag_spec,
+dnl   acl_hardcode_libdir_separator,
+dnl   acl_hardcode_direct,
+dnl   acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE(rpath,
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  LIB[]NAME[]_PREFIX=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+            dnl The same code as in the loop below:
+            dnl First look for a shared library.
+            if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+            dnl Then look for a static library.
+            if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$acl_hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                LIB[]NAME[]_PREFIX="$basedir"
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$acl_hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
+
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, 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 From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64. The current
+  dnl practice is that on a system supporting 32-bit and 64-bit instruction
+  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+  dnl libraries go under $prefix/lib. We determine the compiler's default
+  dnl mode by looking at the compiler's library search path. If at least
+  dnl of its elements ends in /lib64 or points to a directory whose absolute
+  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+  dnl default, namely "lib".
+  acl_libdirstem=lib
+  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+  if test -n "$searchpath"; then
+    acl_save_IFS="${IFS= 	}"; IFS=":"
+    for searchdir in $searchpath; do
+      if test -d "$searchdir"; then
+        case "$searchdir" in
+          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+          *) searchdir=`cd "$searchdir" && pwd`
+             case "$searchdir" in
+               */lib64 ) acl_libdirstem=lib64 ;;
+             esac ;;
+        esac
+      fi
+    done
+    IFS="$acl_save_IFS"
+  fi
+])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+_LT_REQUIRED_DARWIN_CHECKS
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# --------------------------
+# Check for some things on darwin
+AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+   # By default we will add the -single_module flag. You can override
+   # by either setting the environment variable LT_MULTI_MODULE
+   # non-empty at configure time, or by adding -multi_module to the
+   # link flags.
+   echo "int foo(void){return 1;}" > conftest.c
+   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+     -dynamiclib ${wl}-single_module conftest.c
+   if test -f libconftest.dylib; then
+     lt_cv_apple_cc_single_mod=yes
+     rm -rf libconftest.dylib*
+   fi
+   rm conftest.c
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+   [lt_cv_ld_exported_symbols_list=yes],
+   [lt_cv_ld_exported_symbols_list=no])
+   LDFLAGS="$save_LDFLAGS"
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[0123]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*)
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+   10.[[012]]*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+   10.*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil="~$DSYMUTIL \$lib || :"
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_i386_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_x86_64_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $rm -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	      lt_cv_sys_max_cmd_len=$new_result &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on massive
+      # amounts of additional arguments before passing them to the linker.
+      # It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# ------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ---------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# ----------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         old_striplib="$STRIP -S"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+m4_if($1,[],[
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[[4-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
+[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
+[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 DLLs
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+# set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognize shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognize a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!).  If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately in
+# the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _LT_AC_PROG_CXXCPP
+# ------------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# -------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF
+
+# Report which library types will actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix[[4-9]]*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix[[4-9]]*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  :
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+      if test "$GXX" = yes ; then
+      output_verbose_link_cmd='echo'
+      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      fi
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[[12]]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+      case $host_cpu in
+      hppa*64*|ia64*) ;;
+      *)
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  interix[[3-9]]*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux* | k*bsd*-gnu)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC* | pgcpp*)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C++ 5.9
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+	  # Not sure whether something based on
+	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	  # would be better.
+	  output_verbose_link_cmd='echo'
+
+	  # Archives containing C++ object files must be created using
+	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	  # necessary to make sure instantiated templates are included
+	  # in the archive.
+	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	  ;;
+	esac
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd* | netbsdelf*-gnu)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    if test -f /usr/libexec/ld.so; then
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      fi
+      output_verbose_link_cmd='echo'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    # The compiler driver will combine and reorder linker options,
+	    # but understands `-z linker_flag'.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	  case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	  esac
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_AC_TAGVAR(predep_objects,$1)=
+  _LT_AC_TAGVAR(postdep_objects,$1)=
+  _LT_AC_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+    #
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="\
+      program t
+      end
+"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix[[4-9]]*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# -------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LT_AC_PROG_SED])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux* | k*bsd*-gnu)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler.
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd* | netbsdelf*-gnu)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[[4-9]]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+  ;;
+  linux* | k*bsd*-gnu)
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  _LT_CC_BASENAME([$compiler])
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix[[3-9]]*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 _LT_AC_SYS_LIBPATH_AIX
+	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+        _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+  as_executable_p='test -x'
+else
+  as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])
+
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, 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 <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 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 -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 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)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+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.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+    if test -n "$$1"; then
+        pkg_cv_[]$1="$$1"
+    else
+        PKG_CHECK_EXISTS([$3],
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+			 [pkg_failed=yes])
+    fi
+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
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	ifelse([$4], , [AC_MSG_ERROR(dnl
+[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
+])],
+		[AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+	ifelse([$4], , [AC_MSG_FAILURE(dnl
+[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 <http://pkg-config.freedesktop.org/>.])],
+		[$4])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# po.m4 serial 15 (gettext-0.17)
+dnl Copyright (C) 1995-2007 Free Software Foundation, 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 <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Release version of the gettext macros. This is used to ensure that
+  dnl the gettext macros and po/Makefile.in.in are in sync.
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
+
+  dnl Support for AM_XGETTEXT_OPTION.
+  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; 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
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[	 ]*VARIABLE[	 ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[	 ]*VARIABLE[	 ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; 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
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCL [...]
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+  XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
+
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, 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 <drepper at cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# 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.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    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
+])
+
+# Configure paths for SDL
+# Sam Lantinga 9/21/99
+# stolen from Manish Singh
+# stolen back from Frank Belew
+# stolen from Manish Singh
+# Shamelessly stolen from Owen Taylor
+
+dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
+dnl
+AC_DEFUN([AM_PATH_SDL],
+[dnl 
+dnl Get the cflags and libraries from the sdl-config script
+dnl
+AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
+            sdl_prefix="$withval", sdl_prefix="")
+AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
+            sdl_exec_prefix="$withval", sdl_exec_prefix="")
+AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
+		    , enable_sdltest=yes)
+
+  if test x$sdl_exec_prefix != x ; then
+    sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
+    if test x${SDL_CONFIG+set} != xset ; then
+      SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
+    fi
+  fi
+  if test x$sdl_prefix != x ; then
+    sdl_args="$sdl_args --prefix=$sdl_prefix"
+    if test x${SDL_CONFIG+set} != xset ; then
+      SDL_CONFIG=$sdl_prefix/bin/sdl-config
+    fi
+  fi
+
+  if test "x$prefix" != xNONE; then
+    PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+  fi
+  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
+  min_sdl_version=ifelse([$1], ,0.11.0,$1)
+  AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+  no_sdl=""
+  if test "$SDL_CONFIG" = "no" ; then
+    no_sdl=yes
+  else
+    SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
+    SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
+
+    sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x$enable_sdltest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_CXXFLAGS="$CXXFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $SDL_CFLAGS"
+      CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+      LIBS="$LIBS $SDL_LIBS"
+dnl
+dnl Now check if the installed SDL is sufficiently new. (Also sanity
+dnl checks the results of sdl-config to some extent
+dnl
+      rm -f conf.sdltest
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "SDL.h"
+
+char*
+my_strdup (char *str)
+{
+  char *new_str;
+  
+  if (str)
+    {
+      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+      strcpy (new_str, str);
+    }
+  else
+    new_str = NULL;
+  
+  return new_str;
+}
+
+int main (int argc, char *argv[])
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  /* This hangs on some systems (?)
+  system ("touch conf.sdltest");
+  */
+  { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = my_strdup("$min_sdl_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_sdl_version");
+     exit(1);
+   }
+
+   if (($sdl_major_version > major) ||
+      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
+      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
+    {
+      return 0;
+    }
+  else
+    {
+      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
+      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
+      printf("*** best to upgrade to the required version.\n");
+      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
+      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
+      printf("*** config.cache before re-running configure\n");
+      return 1;
+    }
+}
+
+],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       CXXFLAGS="$ac_save_CXXFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_sdl" = x ; then
+     AC_MSG_RESULT(yes)
+     ifelse([$2], , :, [$2])     
+  else
+     AC_MSG_RESULT(no)
+     if test "$SDL_CONFIG" = "no" ; then
+       echo "*** The sdl-config script installed by SDL could not be found"
+       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
+       echo "*** your path, or set the SDL_CONFIG environment variable to the"
+       echo "*** full path to sdl-config."
+     else
+       if test -f conf.sdltest ; then
+        :
+       else
+          echo "*** Could not run SDL test program, checking why..."
+          CFLAGS="$CFLAGS $SDL_CFLAGS"
+          CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+          LIBS="$LIBS $SDL_LIBS"
+          AC_TRY_LINK([
+#include <stdio.h>
+#include "SDL.h"
+
+int main(int argc, char *argv[])
+{ return 0; }
+#undef  main
+#define main K_and_R_C_main
+],      [ return 0; ],
+        [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding SDL or finding the wrong"
+          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
+          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
+          echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
+          CFLAGS="$ac_save_CFLAGS"
+          CXXFLAGS="$ac_save_CXXFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     SDL_CFLAGS=""
+     SDL_LIBS=""
+     ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(SDL_CFLAGS)
+  AC_SUBST(SDL_LIBS)
+  rm -f conf.sdltest
+])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+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.10.1], [],
+      [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 AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_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
+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
+# 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
+
+# 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'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # 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 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 13
+
+# 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.60])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)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_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  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  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  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# 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
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check 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  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([acinclude.m4])
diff --git a/build/InnoSetup/Output/update.bat b/build/InnoSetup/Output/update.bat
new file mode 100644
index 0000000..56faee0
--- /dev/null
+++ b/build/InnoSetup/Output/update.bat
@@ -0,0 +1,5 @@
+rm Release.txt
+copy C:\lpg\TiEmu3\RELEASE Release.txt
+rm ChangeLog.txt
+copy C:\lpg\TiEmu3\ChangeLog ChangeLog.txt
+cls
diff --git a/build/InnoSetup/tiemu.iss b/build/InnoSetup/tiemu.iss
new file mode 100644
index 0000000..bed9179
--- /dev/null
+++ b/build/InnoSetup/tiemu.iss
@@ -0,0 +1,475 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+;
+; (c) Copyright 2001-2007, the TiEmu team
+;
+; $Id: tiemu.iss 639 2004-08-19 15:35:33Z roms $
+
+[Setup]
+AppName=TiEmu3-gdb
+AppVerName=TiEmu 3.03 No Gdb
+AppPublisher=The TiEmu Team
+AppPublisherURL=http://lpg.ticalc.org/prj_tiemu/index.html
+AppSupportURL=http://lpg.ticalc.org/prj_tiemu/mailing_list.html
+AppUpdatesURL=http://lpg.ticalc.org/prj_tiemu/win32_download.html
+DefaultDirName={pf}\TiEmu3-gdb
+DefaultGroupName=TiEmu3-gdb
+AllowNoIcons=yes
+LicenseFile=C:\lpg\tiemu3\COPYING
+InfoBeforeFile=C:\lpg\tiemu3\README.win32
+InfoAfterFile=C:\lpg\tiemu3\RELEASE
+
+PrivilegesRequired = admin
+
+;--- Shared Stuffs ---
+[Files]
+; TI libraries
+Source: "C:\lpg\tifiles2\tests\libtifiles2-5.dll"; DestDir: "{cf}\LPG Shared\libs"; Flags: sharedfile; BeforeInstall: DeleteDll('libtifiles2-3.dll');
+Source: "C:\lpg\ticables2\tests\libticables2-2.dll"; DestDir: "{cf}\LPG Shared\libs"; Flags: sharedfile; BeforeInstall: DeleteDll('libticables2-1.dll');
+Source: "C:\lpg\ticalcs2\tests\libticalcs2-7.dll"; DestDir: "{cf}\LPG Shared\libs"; Flags: sharedfile; BeforeInstall: DeleteDll('libticalcs2-2.dll');
+Source: "C:\lpg\ticonv\tests\libticonv-3.dll"; DestDir: "{cf}\LPG Shared\libs"; Flags: sharedfile; BeforeInstall: DeleteDll('libticonv-2.dll');
+
+; I18n files
+Source: "C:\lpg\tifiles2\po\fr.gmo"; DestDir: "{cf}\LPG Shared\libs\locale\fr\LC_MESSAGES"; DestName: "libtifiles2.mo"; Flags: ignoreversion sharedfile;
+Source: "C:\lpg\ticables2\po\fr.gmo"; DestDir: "{cf}\LPG Shared\libs\locale\fr\LC_MESSAGES"; DestName: "libticables2.mo"; Flags: ignoreversion sharedfile;
+Source: "C:\lpg\ticalcs2\po\fr.gmo"; DestDir: "{cf}\LPG Shared\libs\locale\fr\LC_MESSAGES"; DestName: "libticalcs2.mo"; Flags: ignoreversion sharedfile;
+
+; Misc
+Source: "C:\lpg\gtk\bin\libxml2.dll"; DestDir: "{cf}\LPG Shared\libs"; Flags: onlyifdoesntexist sharedfile; BeforeInstall: DeleteDll('libxml2.dll');
+Source: "C:\lpg\gtk\bin\libglade-2.0-0.dll"; DestDir: "{cf}\LPG Shared\libs"; Flags: onlyifdoesntexist sharedfile; BeforeInstall: DeleteDll('libglade-2.0-0.dll');
+
+Source: "C:\lpg\gtk\bin\gtkthemeselector.exe"; DestDir: "{cf}\LPG Shared\bin"; Flags: ignoreversion sharedfile; BeforeInstall: DeleteExe('gtkthemeselector.exe');
+
+; Downloader
+Source: "C:\lpg\tilp2\build\InnoSetup\wget\*.dll"; DestDir: "{cf}\LPG Shared\wget"; Flags: ignoreversion
+Source: "C:\lpg\tilp2\build\InnoSetup\wget\wget.exe"; DestDir: "{cf}\LPG Shared\wget"; Flags: ignoreversion
+Source: "C:\lpg\tilp2\build\InnoSetup\wget\d_and_i.bat"; DestDir: "{cf}\LPG Shared\wget"; Flags: ignoreversion
+
+; DhaHelper driver
+Source: "C:\lpg\ticables2\src\win32\dha\dhahelper.sys"; DestDir: "{cf}\LPG Shared\drivers\dha"; Flags: sharedfile;
+Source: "C:\lpg\ticables2\src\win32\dha\dhasetup.exe";  DestDir: "{cf}\LPG Shared\drivers\dha"; Flags: sharedfile;
+
+; RwPorts driver
+Source: "C:\lpg\ticables2\src\win64\rwp\rwports.sys"; DestDir: "{cf}\LPG Shared\drivers\rwp"; Flags: sharedfile; Check: Is64BitInstallMode
+Source: "C:\lpg\ticables2\src\win64\rwp\rwpsetup.exe";  DestDir: "{cf}\LPG Shared\drivers\rwp"; Flags: sharedfile; Check: Is64BitInstallMode
+
+; USB driver
+;Source: "C:\lpg\libusb-win32\bin_modified\libusb0.sys"; DestDir: "{cf}\LPG Shared\drivers\usb"; Flags: sharedfile;
+Source: "C:\lpg\libusb-win32\bin\*.sys"; DestDir: "{cf}\LPG Shared\drivers\usb"; Flags: sharedfile;
+Source: "C:\lpg\libusb-win32\bin\*.dll"; DestDir: "{cf}\LPG Shared\drivers\usb"; Flags: sharedfile;
+Source: "C:\lpg\ticables2\src\win32\usb\*.cat"; DestDir: "{cf}\LPG Shared\drivers\usb"; Flags: sharedfile;
+Source: "C:\lpg\ticables2\src\win32\usb\*.inf"; DestDir: "{cf}\LPG Shared\drivers\usb"; Flags: sharedfile;
+Source: "C:\lpg\libusb-win32\bin\libusb0.dll"; DestDir: "{win}\system32"; Flags: replacesameversion restartreplace uninsneveruninstall;
+Source: "C:\lpg\libusb-win32\bin\libusb0_x64.dll"; DestDir: "{win}\system32"; Flags: replacesameversion restartreplace uninsneveruninstall; Check: Is64BitInstallMode
+
+[Registry]
+; Create entries for shared libs (needed by other programs)
+Root: HKLM; Subkey: "Software\LPG Shared"; ValueType: string; ValueName: "Path"; ValueData: "{cf}\LPG Shared"
+Root: HKLM; Subkey: "Software\LPG Shared"; ValueType: string; ValueName: "DllPath"; ValueData: "{cf}\LPG Shared\libs"
+;--- End of Shared Stuffs ---
+
+[Tasks]
+Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; MinVersion: 4,4
+Name: "quicklaunchicon"; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:"; MinVersion: 4,4; Flags: unchecked
+Name: "com_ole"; Description: "Install TiEmuOle object for TIGCC and others"; GroupDescription: "Misc:"; Flags: unchecked
+Name: "slv_drv"; Description: "Install USB drivers"; GroupDescription: "Drivers:";
+Name: "dha_drv"; Description: "Install BlackLink/Parallel cable for NT/2k/XP"; GroupDescription: "Drivers:"; MinVersion: 0,4
+
+[Dirs]
+Name: "{app}\screenshots"
+
+[Files]
+; Glade files
+Source: "C:\lpg\tiemu3\glade\*.glade"; DestDir: "{app}\glade"; Flags: ignoreversion;
+
+; Help files
+Source: "C:\lpg\tiemu3\help\*.jpg"; DestDir: "{app}\help"; Flags: ignoreversion;
+Source: "C:\lpg\tiemu3\help\*.png"; DestDir: "{app}\help"; Flags: ignoreversion;
+Source: "C:\lpg\tiemu3\help\*.htm?"; DestDir: "{app}\help"; Flags: ignoreversion;
+
+; Pixmaps files
+Source: "C:\lpg\tiemu3\pixmaps\*.xpm"; DestDir: "{app}\pixmaps"; Flags: ignoreversion;
+Source: "C:\lpg\tiemu3\build\msvc\small.ico"; DestDir: "{app}"; DestName: "romdump.ico"; Flags: ignoreversion;
+
+; Skin files
+Source: "C:\lpg\tiemu3\skins\*.skn"; DestDir: "{app}\skins"; Flags: ignoreversion;
+
+; Keymap files
+Source: "C:\lpg\tiemu3\skins\*.map"; DestDir: "{app}\skins"; Flags: ignoreversion;
+Source: "C:\lpg\tiemu3\skins\ti92.map"; DestDir: "{app}\skins"; DestName: "v200plt.map"; Flags: ignoreversion;
+
+; i18n files
+Source: "C:\lpg\tiemu3\po\fr.gmo"; DestDir: "{app}\locale\fr\LC_MESSAGES"; DestName: "tiemu3.mo"; Flags: ignoreversion;
+
+; Misc files
+Source: "C:\lpg\tiemu3\AUTHORS"; DestDir: "{app}"; DestName: "Authors.txt"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\BUGS"; DestDir: "{app}"; DestName: "Bugs.txt"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\CHANGELOG"; DestDir: "{app}"; DestName: "ChangeLog.txt"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\COPYING"; DestDir: "{app}"; DestName: "License.txt"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\LICENSES"; DestDir: "{app}"; DestName: "Licenses.txt"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\man\ManPage.txt"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\README.win32"; DestDir: "{app}"; DestName: "ReadMe.txt"; Flags: ignoreversion isreadme
+Source: "C:\lpg\tiemu3\RELEASE"; DestDir: "{app}"; DestName: "Release.txt"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\TODO"; DestDir: "{app}"; DestName: "ToDo.txt"; Flags: ignoreversion
+
+; Resource files
+Source: "C:\lpg\tiemu3\misc\romcalls.txt"; DestDir: "{app}\misc"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\misc\iodefs*.txt"; DestDir: "{app}\misc"; Flags: ignoreversion
+Source: "C:\lpg\tiemu3\misc\memmap*.txt"; DestDir: "{app}\misc"; Flags: ignoreversion
+
+; PedRom files
+Source: "C:\lpg\tiemu3\pedrom\pedrom*.tib"; DestDir: "{app}\pedrom"; Flags: ignoreversion
+
+; Binaries
+Source: "C:\lpg\tiemu3\build\msvc\tiemu.exe"; DestDir: "{app}"; DestName: "tiemu.exe"; Flags: ignoreversion
+Source: "C:\lpg\SDL\lib\SDL.dll"; DestDir: "{app}"; Flags: ignoreversion
+
+; COM/OLE object registration
+Source: "C:\lpg\tiemu3\src\ipc\com\tiemups.dll"; DestDir: "{app}"; Flags: regserver;
+Source: "C:\lpg\tiemu3\src\ipc\com\oleaut.tlb"; DestDir: "{app}"; DestName: "tiemu.tlb";
+
+[INI]
+Filename: "{app}\tiemu.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://lpg.ticalc.org/prj_tiemu"
+
+[Icons]
+Name: "{group}\TiEmu"; Filename: "{app}\tiemu.exe"; WorkingDir: "{app}"
+Name: "{group}\TiEmu on the Web"; Filename: "{app}\tiemu.url"
+Name: "{group}\Uninstall TiEmu"; Filename: "{uninstallexe}"
+Name: "{group}\User's Manual"; Filename: "{app}\help\Manual_en.html"
+Name: "{group}\GTK theme selector"; Filename: "{cf}\LPG Shared\bin\gtkthemeselector.exe";
+Name: "{group}\Install GTK+ from web"; Filename: "{app}\wget\d_and_i.bat";
+Name: "{group}\Bug Report"; Filename: "http://sourceforge.net/tracker/?func=add&group_id=23169&atid=377680";
+
+Name: "{userdesktop}\TiEmu"; Filename: "{app}\tiemu.exe"; WorkingDir: "{app}"; MinVersion: 4,4; Tasks: desktopicon
+Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\TiEmu"; Filename: "{app}\tiemu.exe"; WorkingDir: "{app}"; MinVersion: 4,4; Tasks: quicklaunchicon
+
+[Run]
+;Filename: "{app}\tiemu.exe"; Description: "Launch TiEmu"; StatusMsg: "Running TiEmu..."; Flags: postinstall nowait unchecked
+Filename: "{cf}\LPG Shared\wget\d_and_i.bat"; Description: "Download and install GTK+"; StatusMsg: "Running ..."; Flags: nowait postinstall unchecked hidewizard;
+; COM/OLE  registration
+Filename: "{app}\tiemu.exe"; Parameters: "/RegServer"; Tasks: com_ole;
+; Drivers installation
+Filename: "{cf}\LPG Shared\drivers\dha\dhasetup.exe"; Parameters: "install"; MinVersion: 0,4; Tasks: dha_drv; StatusMsg: "Installing DHA driver (this may take few seconds) ..."
+Filename: "rundll32"; Parameters: "libusb0.dll,usb_install_driver_np_rundll {cf}\LPG Shared\drivers\usb\silverlk.inf"; Tasks: slv_drv; StatusMsg: "Installing SilverLink driver (this may take few seconds) ..."
+Filename: "rundll32"; Parameters: "libusb0.dll,usb_install_driver_np_rundll {cf}\LPG Shared\drivers\usb\titanium.inf"; Tasks: slv_drv; StatusMsg: "Installing Titanium driver (this may take few seconds) ..."
+;Filename: "rundll32"; Parameters: "libusb0.dll,usb_install_driver_np_rundll {cf}\LPG Shared\drivers\usb\ti84plus.inf"; Tasks: slv_drv; StatusMsg: "Installing TI84+ driver (this may take few seconds) ..."
+;Filename: "rundll32"; Parameters: "libusb0.dll,usb_install_driver_np_rundll {cf}\LPG Shared\drivers\usb\ti84pse.inf"; Tasks: slv_drv; StatusMsg: "Installing TI84+/SE driver (this may take few seconds) ..."
+;Filename: "rundll32"; Parameters: "libusb0.dll,usb_install_driver_np_rundll {cf}\LPG Shared\drivers\usb\nspire.inf"; Tasks: slv_drv; StatusMsg: "Installing NSpire driver (this may take few seconds) ..."
+
+[UninstallRun]
+; Dha uninstallation
+;Filename: "C:\lpg\ticables2\src\win32\dha\dhasetup.exe"; Parameters: "remove"; MinVersion: 0,4; Tasks: dha_drv;
+; COM/OLE  un-registration
+Filename: "{app}\tiemu.exe"; Parameters: "/UnregServer"; Tasks: com_ole;
+
+[Registry]
+; Boost GTK2 (WinNT/2000/XP)
+Root: HKLM; SubKey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "PANGO_WIN32_NO_UNISCRIBE"; ValueData: "anything"; MinVersion: 0,4;
+
+; File associations
+Root: HKCR; Subkey: ".sav"; ValueType: string; ValueName: ""; ValueData: "TiEmu.Sav";
+Root: HKCR; Subkey: "TiEmu.Sav"; ValueType: string; ValueName: ""; ValueData: "TiEmu state";
+Root: HKCR; Subkey: "TiEmu.Sav\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\tiemu.exe,0"
+Root: HKCR; Subkey: "TiEmu.Sav\shell\open";  ValueType: string; ValueData: "Open with &TiEmu";
+Root: HKCR; Subkey: "TiEmu.Sav\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\tiemu.exe"" ""%1""";
+
+Root: HKCR; Subkey: ".rom"; ValueType: string; ValueName: ""; ValueData: "TiEmu.Rom";
+Root: HKCR; Subkey: "TiEmu.Rom"; ValueType: string; ValueName: ""; ValueData: "Rom Dump";
+Root: HKCR; Subkey: "TiEmu.Rom\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\romdump.ico";
+Root: HKCR; Subkey: "TiEmu.Rom\shell\open";  ValueType: string; ValueData: "Open with &TiEmu";
+Root: HKCR; Subkey: "TiEmu.Rom\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\tiemu.exe"" ""%1""";
+
+; Add LPG libraries to the tiemu's path
+Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\tiemu.exe"; Flags: uninsdeletekeyifempty
+Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\tiemu.exe"; ValueType: string; ValueData: "{app}\tiemu.exe"; Flags: uninsdeletevalue
+Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\tiemu.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app};{code:GetLpgDllPath};{code:GetGtkDllPath}"; Flags: uninsdeletevalue;
+
+[UninstallDelete]
+Type: files; Name: "{app}\tiemu.url"
+
+;; Taken from "http://www.dropline.net/gtk/support.php" with some customizations
+
+[Code]
+var
+  WimpPath: String;
+
+// BEGIN: Version comparison code (http://www.vincenzo.net/isxkb/index.php?title=MDAC_-_How_to_detect_version_of_MDAC_installed)
+procedure DecodeVersion (verstr: String; var verint: array of Integer);
+var
+  i,p: Integer; s: string;
+begin
+  // initialize array
+  verint := [0,0,0,0];
+  i := 0;
+  while ((Length(verstr) > 0) and (i < 4)) do
+  begin
+  	p := pos ('.', verstr);
+  	if p > 0 then
+  	begin
+      if p = 1 then s:= '0' else s:= Copy (verstr, 1, p - 1);
+  	  verint[i] := StrToInt(s);
+  	  i := i + 1;
+  	  verstr := Copy (verstr, p+1, Length(verstr));
+  	end
+  	else
+  	begin
+  	  verint[i] := StrToInt (verstr);
+  	  verstr := '';
+  	end;
+  end;
+
+end;
+
+// This function compares version strings
+// return -1 if ver1 < ver2
+// return  0 if ver1 = ver2
+// return  1 if ver1 > ver2
+function CompareVersion (ver1, ver2: String) : Integer;
+var
+  verint1, verint2: array of Integer;
+  i: integer;
+begin
+
+  SetArrayLength (verint1, 4);
+  DecodeVersion (ver1, verint1);
+
+  SetArrayLength (verint2, 4);
+  DecodeVersion (ver2, verint2);
+
+  Result := 0; i := 0;
+  while ((Result = 0) and ( i < 4 )) do
+  begin
+  	if verint1[i] > verint2[i] then
+  	  Result := 1
+  	else
+      if verint1[i] < verint2[i] then
+  	    Result := -1
+  	  else
+  	    Result := 0;
+  	i := i + 1;
+  end;
+
+end;
+// END: Version comparison code
+
+// Check GTK installation
+function IsGtkInstalled(): Boolean;
+var
+  Exists: boolean;
+  GtkPath: string;
+begin
+  Exists := RegQueryStringValue (HKLM, 'Software\GTK\2.0', 'Path', GtkPath);
+  if not Exists then begin
+    Exists := RegQueryStringValue (HKCU, 'Software\GTK\2.0', 'Path', GtkPath);
+  end;
+   Result := Exists
+end;
+
+// Get GTK installation path
+function GetGtkPath(S: String): String;
+var
+  Exists: boolean;
+  GtkPath: string;
+begin
+  GtkPath := '';
+
+  Exists := RegQueryStringValue (HKLM, 'Software\GTK\2.0', 'Path', GtkPath);
+  if not Exists then begin
+    Exists := RegQueryStringValue (HKCU, 'Software\GTK\2.0', 'Path', GtkPath);
+  end;
+
+  Result := GtkPath
+end;
+
+// Get GTK version
+function GetGtkVersion(): string;
+var
+  Exists: boolean;
+  GtkVersion: string;
+begin
+  GtkVersion := '';
+
+  Exists := RegQueryStringValue (HKLM, 'Software\GTK\2.0', 'Version', GtkVersion);
+  if not Exists then begin
+    Exists := RegQueryStringValue (HKCU, 'Software\GTK\2.0', 'Version', GtkVersion);
+  end;
+  
+  Result := GtkVersion
+end;
+
+// Get GTK DLL path
+function GetGtkDllPath(S: String): String;
+var
+  Exists: boolean;
+  GtkDllPath: string;
+begin
+  GtkDllPath := '';
+
+  Result := GetGtkPath('') + '\bin';
+end;
+
+// Get LPG installation path
+function GetLpgPath(S: String): String;
+var
+  Exists: boolean;
+  LpgPath: string;
+begin
+  LpgPath := '';
+
+ Exists := RegQueryStringValue (HKLM, 'Software\LPG Shared', 'Path', LpgPath);
+  if not Exists then begin
+    Exists := RegQueryStringValue (HKCU, 'Software\LPG Shared', 'Path', LpgPath);
+  end;
+
+  Result := LpgPath
+end;
+
+// Get shared components path
+function GetLpgDllPath (S: String): String;
+var
+  Exists: boolean;
+  LpgPath: string;
+begin
+  Exists := RegQueryStringValue (HKLM, 'Software\LPG Shared', 'DllPath', LpgPath);
+  if not Exists then begin
+    Exists := RegQueryStringValue (HKCU, 'Software\LPG Shared', 'DllPath', LpgPath);
+  end;
+  Result := LpgPath;
+end;
+
+function GetLpgDllCount (S: String): Integer;
+var
+  Exists: boolean;
+  Path: string;
+  Count: Cardinal;
+begin
+  path := ExpandConstant('{cf}\LPG Shared\' + S);
+  Exists := RegQueryDWordValue (HKLM, 'Software\Microsoft\Windows\CurrentVersion\SharedDLLs\', Path, Count);
+end;
+
+// Check for minimum USB driver version
+function IsTiglUsbVersion3Mini (): Boolean;
+var
+  Version: String;
+begin
+  GetVersionNumbersString('C:\WinNT\System\TiglUsb.dll', Version);
+  if CompareStr(Version, '3.0.0.0') < 0 then begin
+    Result := false;
+  end;
+end;
+
+// Display warning about GTK version
+function DisplayWarning(I: Integer): Boolean;
+var
+  S: String;
+begin
+  if(I = 1) then begin
+    S := 'The GTK+ libraries are not installed: ';
+  end;
+  if(I = 2) then begin
+    S := 'The GTK+ libraries are installed but the version is old: ';
+  end;
+  MsgBox(S + 'you will need the GTK+ 2.6.x Runtime Environnement! But, the installer can download and install it for you; simply think to check the box at the last tab/page. Otherwise, you can still download it from the start menu (start menu > programs > tiemu > install gtk+ from the web).', mbError, MB_OK);
+end;
+
+// Check for previous program presence and uninstall if needed
+function CheckUninstall(S: String): Boolean;
+var
+  Exists: boolean;
+  UnInsExe: String;
+  ResultCode: Integer;
+  I: Integer;
+  L: Integer;
+begin
+  Exists := RegKeyExists(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\' + S + '_is1');
+  Result := false;
+
+  if Exists then begin
+    if MsgBox('The program need to be uninstalled. Click YES to uninstall it or NO to force installation.', mbConfirmation, MB_YESNO) = IDNO
+    then begin
+      Result := true
+    end
+    else begin
+      if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\' + S + '_is1', 'UninstallString', uninsexe) then
+      begin
+
+        L := Length(uninsexe);
+        for I:=1 to L-1
+        do begin
+          uninsexe[i] := uninsexe[i+1];
+        end;
+        SetLength(uninsexe, L-2);
+
+        if not Exec(uninsexe, '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode)
+        then begin
+            Result := false;
+        end
+        else begin
+          if ResultCode <> 0
+          then begin
+            Result := false;
+          end
+          else begin
+            Result := true;
+          end;
+        end;
+      end;
+    end;
+  end
+  else begin
+    Result := true;
+  end;
+end;
+
+// Does various checks before doing anything
+function InitializeSetup(): Boolean;
+begin
+  // Retrieve GTK path
+  if not IsGtkInstalled() then begin
+    DisplayWarning(1);
+  end;
+
+  // Retrieve GTK version
+  if IsGtkInstalled() then begin
+    if CompareVersion(GetGtkVersion(), '2.6.10') < 0 then begin
+        DisplayWarning(2);
+    end;
+  end;
+
+  // Check version of USB driver
+  if IsTiglUsbVersion3Mini() then begin
+    MsgBox('SilverLink driver v2.x has been removed of your system. Now, TiLP/TiEmu requires v3.x (check out the README for download location).', mbError, MB_OK);
+  end;
+
+  // Check version of USB driver
+  if IsTiglUsbVersion3Mini() then begin
+    MsgBox('SilverLink driver v2.x has been removed of your system. Now, TiLP/TiEmu requires v3.x (check out the README for download location).', mbError, MB_OK);
+  end;
+
+  // Check for non-NT and WiMP theme
+  WimpPath := GetGtkPath('') + '\lib\gtk-2.0\2.4.0\engines\libwimp.dll';
+  if FileExists(WimpPath) and not UsingWinNT() then begin
+        MsgBox('Tip: you are running a non-NT platform with the GTK+ WiMP theme engine installed. If you get a lot of warnings about fonts in console, run the Gtk+ Theme Selector as provided in the start menu group of TiLP/TiEmu', mbError, MB_OK);
+  end;
+  
+  // Uninstall before installing new release
+  if not CheckUninstall('TiEmu3-gdb') then
+    Result := false
+  else
+    Result := true;
+end;
+
+// Delete shared DLL
+procedure DeleteDll(const FileName: string);
+var
+  pf: string;
+begin
+  pf := ExpandConstant('{app}');
+  DeleteFile(pf + '\' + Filename);
+end;
+
+// Delete shared EXE
+procedure DeleteExe(const FileName: string);
+begin
+  DeleteDll(FileName);
+end;
diff --git a/build/Makefile.am b/build/Makefile.am
new file mode 100644
index 0000000..2abbb80
--- /dev/null
+++ b/build/Makefile.am
@@ -0,0 +1,15 @@
+EXTRA_DIST = InnoSetup ipaq mingw msvc nsis
+
+distclean: clean
+
+clean: 
+	$(RM) \#*
+	$(RM) *~
+	$(RM) core
+	$(RM) ./msvc/*.ncb
+	$(RM) ./msvc/*.ilk
+	$(RM) ./msvc/*.dep
+	$(RM) ./msvc/*.opt
+	$(RM) -Rfv ./msvc/output
+	$(RM) -Rfv ./msvc/test
+	$(RM) ./msvc/tiemu*.exe
\ No newline at end of file
diff --git a/build/Makefile.in b/build/Makefile.in
new file mode 100644
index 0000000..08d747b
--- /dev/null
+++ b/build/Makefile.in
@@ -0,0 +1,462 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = build
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+EXTRA_DIST = InnoSetup ipaq mingw msvc nsis
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  build/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  build/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir 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 maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+distclean: clean
+
+clean: 
+	$(RM) \#*
+	$(RM) *~
+	$(RM) core
+	$(RM) ./msvc/*.ncb
+	$(RM) ./msvc/*.ilk
+	$(RM) ./msvc/*.dep
+	$(RM) ./msvc/*.opt
+	$(RM) -Rfv ./msvc/output
+	$(RM) -Rfv ./msvc/test
+	$(RM) ./msvc/tiemu*.exe
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/build/ipaq/ReadMe.txt b/build/ipaq/ReadMe.txt
new file mode 100644
index 0000000..f1b99a4
--- /dev/null
+++ b/build/ipaq/ReadMe.txt
@@ -0,0 +1,67 @@
+How to build TiEmu for iPAQ H3970 ?
+
+First, the main site for Linux PDA support is <http://www.handhelds.org>.
+You will find all you need about the Familiar distribution and GPE (GTK).
+
+Cross-compilation is covered here: 
+<http://handhelds.org/moin/moin.cgi/GpeCrossCompilation>
+
+Some tips:
+<http://www.handhelds.org/minihowto/porting-software.html>
+
+We will use the easier method (and probably the best one): OpenEmbedded based 
+GPE SDK. The latest one is available here: <http://handhelds.org/~florian/sdk/gpe-sdk-20050210.tar.bz2>.
+Almost everything you need should be included in the archive, just unpack it to /.
+
+To cross-compile TiEmu and the TiLP framework, copy the cross-config.sh script at the top of the source and run it.
+If this does'nt work, you can follow the guidelines above...
+
+To install connection:
+1. modprobe usbnet
+2. ifconfig usb0 192.168.0.200 up
+3. ssh/scp
+
+To mount SD card:
+1. edit /etc/modutils
+2. Add into 'h3900_mmc':
+   h3900_asic
+   mmc_asic3
+   vfat
+3. run update-modules
+4. mount /dev/mmc/part1 /usr/local
+
+To build a GPE application, you need to do this:
+
+1. export PKG_CONFIG_PATH=/usr/local/arm/oe/arm-linux/lib/pkgconfig
+2. export PATH=/usr/local/arm/oe/bin:$PATH
+3. Change to the location of your source
+4. Run ./configure --host=arm-linux --disable-nls 
+   Option: --prefix=/usr/local/arm/oe/arm-linux
+5. Files are installed in /usr/local/arm/oe/arm-linux if you choose the option.
+6. On the iPAQ, you must copy files with the same directory tree (aka
+/usr/local/arm/oe/arm-linux)
+
+To debug:
+
+1. Get gdb source (the same version as arm-linux-gdb if possible, 6.2)
+2. Go to gdb/gdbserver, run ./configure --host=arm-linux and do make
+3. You will get a gdbserver executable targetted for ARM. You can strip it 
+   to reduce size.
+4. Copy gdbserver executable onto the iPAQ (with scp). 
+5. Run 'gdbserver tiemu host:1234'
+6. Run locally 'gdb ./tiemu'
+7. Type in 'remote target ipaq:1234'
+8. Type in 'continue' for running (bug: don't type run !)
+
+That's all !
+
+---
+
+Thanks to Andrew Seddon of Cambridge Signal Processing <http://camsig.co.uk)
+who donated a PDA (iPAQ PocketPC H3970 with GPE installed).
+
+Thanks to Kevin for some tips about gdb.
+
+---
+
+15/04/2005, Romain Li�vin
diff --git a/build/ipaq/cross-config.sh b/build/ipaq/cross-config.sh
new file mode 100755
index 0000000..7209ce5
--- /dev/null
+++ b/build/ipaq/cross-config.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+export PKG_CONFIG_PATH=/usr/local/arm/oe/arm-linux/lib/pkgconfig
+export PATH=/usr/local/arm/oe/bin:$PATH
+./configure --host=arm-linux --target=arm-linux --build=i386-linux --disable-nls --prefix=/usr/local/arm/oe/arm-linux
diff --git a/build/mingw/ReadMe.txt b/build/mingw/ReadMe.txt
new file mode 100644
index 0000000..1aa52a8
--- /dev/null
+++ b/build/mingw/ReadMe.txt
@@ -0,0 +1,283 @@
+Compiling LPG Software with MinGW
+Version 1.99 20080113
+Copyright (C) 2005-2008 Kevin Kofler
+Copyright (C) 2001-2006 Romain Lievin
+Copyright (C) 2006 Tyler Cassidy
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This is how to compile LPG software with MinGW. This bugger can be tricky so watch out. :)
+
+These compiling instructions will work for:
+- libticables2, libticonv, libtifiles2, libticables2
+- TiLP 2
+- TiEmu 3
+- GFM
+- SkinEdit
+
+Follow the instructions very closely or you will soon see that monkeys will start biting. ;-)
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+---------------------------------------
+| Retrieving sources                  |
+---------------------------------------
+
+There are two ways to retrieve source code:
+- downloads tarballs from <http://sourceforge.net/project/showfiles.php?group_id=23169>
+- uses SubVersion (svn for short)
+
+1) from tarballs: create a folder and extract all of your tarballs
+
+2) from subversion: you will have to install svn-tools (linux) or a client (TortoiseSVN/Win32).
+Take a look at <http://tortoisesvn.tigris.org> and <http://svnbook.red-bean.com>.
+ 
+There is no specific tree for download sources but you can use this convenient one:
+
+	c:\lpg\ or /home/devel/
+	|
+	+- gfm
+	+- skinedit
+	+- tfdocgen
+	+- ticables2
+	+- ticalcs2
+	+- ticonv
+	+- tiemu3
+	+- tifile2
+	+- ticables2
+	+- tilp2
+
+Next, check-out the following URLs for each target folder: 
+- svn co http://svn.tilp.info/repos/tilp/libticables/trunk ticables2 
+- svn co http://svn.tilp.info/repos/tilp/libticalcs/trunk ticalcs2 
+- svn co http://svn.tilp.info/repos/tilp/libtifiles/trunk tifiles2 
+- svn co http://svn.tilp.info/repos/tilp/libticonv/trunk ticonv  
+- svn co http://svn.tilp.info/repos/tilp/tilp/trunk tilp2
+- svn co http://svn.tilp.info/repos/tilp/tiemu/trunk tiemu3
+- svn co http://svn.tilp.info/repos/tilp/tfdocgen/trunk tfdocgen
+- svn co http://svn.tilp.info/repos/tiemu/skinedit/trunk skinedit
+- svn co http://svn.tilp.info/repos/tilp/gfm/trunk gfm
+
+---------------------------------------
+| Compiling on Windows                |
+---------------------------------------
+
+1. Download the following stuff, but do not install it yet!
+   - MinGW and MSYS from http://www.mingw.org/
+   - Bison Binaries, Dependancies and Developer Files from http://gnuwin32.sf.net/packages/bison.htm
+   - Flex Binaries, Dependancies and Developer Files from http://gnuwin32.sf.net/packages/flex.htm
+
+2. Extract the MinGW stuff into C:\mingw and install MSYS into C:\msys, not C:\msys\1.0
+
+3. Extract all the Bison and Flex archives into the C:\mingw directory
+
+4. Create a C:\msys\target folder. This is where the compiled stuff will be placed.
+   This is also the location where you will install GladeWin32 (see below).
+
+5. Download and install the GladeWin32 Development Packages from
+   http://prdownloads.sf.net/gladewin32/gtk-win32-devel-2.6.10-rc1.exe and make sure you check the
+   "Install MSYS environment variables" checkbox when the installer asks you, if you don't, the
+   monkeys WILL bite :)
+
+   WARNING: DON'T build against GTK+ 2.8 for Windows! GTK+ 2.8 uses Cairo, which doesn't work at all
+            on Windows 95/98/Me. Nobody seems interested in fixing that. We've learned this the hard
+            way. You have been warned.
+
+   You have to change the target folder of the installer into C:\msys\target otherwise you will have to
+   replace any 'prefix=/target' entry in any of INST_PATH\lib\pkgconfig\*.pc by 'prefix=INST_PATH'.
+
+6. Download and untar libusb-win32-device-bin from
+   http://sourceforge.net/project/showfiles.php?group_id=78138
+   Install it using the script provided in the build/mingw directory of libticables2.
+
+7. Install SDL from http://www.libsdl.org (for sound emulation in TiEmu).
+
+8. Edit the C:\msys\etc\profile file and add the following on a new line at the bottom:
+   export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/target/lib/pkgconfig:/mingw/lib/pkgconfig
+
+9. Restart MSYS if you have done step 8 while MSYS was running.
+
+10. Now let's compile. Open up MSYS if you haven't already. Make sure all of your source is extracted
+    and ready to compile. With your basic Linux skills, go into the following directory and type the
+    following:
+
+    - Go into the libticables2 directory
+    - Run:
+      ./configure --prefix=/target
+      make
+      make install
+
+11. Repeat Step 10 for the additional libti* libraries in the FOLLOWING order: libticonv, libtifiles2,
+    libticalcs2.
+
+12. Ok. Now all you have to do is repeat step 10 for TiLP, TiEmu, or GFM, or all of them if you so
+    wish! For TiEmu, you'll also need SDL unless you configure with --disable-sound.
+
+13. Your files are now all located in /target (C:\msys\target). If it does not work, an instruction
+    may have been missed or performed wrong, or the source code is broken (which would be a bug,
+    please report it).
+
+Have fun :)
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+---------------------------------------------------
+| Building an Installer on Windows for TiEmu3+GDB |
+---------------------------------------------------
+
+Once you have successfully built TiEmu 3, here's how to build an installer on Windows:
+
+1. Fetch the latest NSIS installer from http://nsis.sf.net and install it.
+
+2. Fetch the NsisUnz plugin from http://saivert.com/nsis/nsisunz.7z and decompress nsisunz.dll to
+   your NSIS\Plugins directory.
+
+3. Fetch UPX from http://upx.sf.net and unzip it.
+
+4. Adjust the paths in build\nsis\tiemu.nsi (in the TiEmu 3 source directory) for your installation.
+
+5. Right-click on build\nsis\tiemu.nsi and select "Build".
+
+NOTE: TiLP and GFM don't have NSIS installer scripts yet.
+
+------------------------------------------------------------
+| Building an Installer on Windows for TiLP2 or TiEmu3-GDB |
+------------------------------------------------------------
+
+Once you have successfully built TiLP2/TiEmu3, here's how to build an installer on Windows:
+
+1. Fetch the latest InnoSetup installer v5 from http://www.jrsoftware.org/isinfo.php and install it.
+
+2. Fetch the GNU wget for Win32 from http://xoomer.alice.it/hherold/wget-1.10.2b.zip and unzip it into build/InnoSetup/wget.
+
+3. Press Ctrl+F9 ("Build>Compile").
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+---------------------------------------
+| Cross Compiling on Linux (Fedora)   |
+---------------------------------------
+
+1. Download and Install the following RPMs from
+   http://sourceforge.net/project/showfiles.php?group_id=204414 :
+   - mingw-binutils
+   - mingw-gcc-core
+   - mingw-gcc-g++
+   - mingw-w32api
+   - mingw-runtime
+
+2. Install WINE from Fedora. (Can be retrieved with yum: "yum install wine".)
+
+3. Install the last GTK+ 2.6 development package (version 2.6.10-rc1) from http://gladewin32.sf.net
+   in WINE.
+   WARNING: DON'T build against GTK+ 2.8 for Windows! GTK+ 2.8 uses Cairo, which doesn't work at all
+            on Windows 95/98/Me. Nobody seems interested in fixing that. We've learned this the hard
+            way. You have been warned.
+
+4. Run the following command:
+   ln -s ~/.wine/c/GTK /target
+   (This makes pkg-config happy, you can replace .../c/... with whatever directory/drive you wish to
+   use.)
+
+5. In order to avoid a needless dependency on mingwm10.dll and/or libgcc_sjlj_1.dll, edit the
+   following files:
+   /usr/local/lib/gcc/i386-mingw32/4.2.1-sjlj/libstdc++.la
+   /usr/local/lib/gcc/i386-mingw32/4.2.1-sjlj/libsupc++.la
+   /usr/local/lib/gcc/i386-mingw32/4.2.1-sjlj/debug/libstdc++.la
+   and remove "-lmingwthrd" and "-lgcc_s".
+
+6. Download and untar libusb-win32-device-bin from
+   http://sourceforge.net/project/showfiles.php?group_id=78138
+   Install it using the script provided in the build/mingw directory of libticables2:
+   cd libusb-win32-device-bin-*/libusb-win32
+   PREFIX=~/.wine/c/tiemu ./install.sh
+
+7. Download the SDL source from http://www.libsdl.org (the binaries probably won't work due to iconv)
+   You can build a static library from the source using the following options:
+   ln -s /usr/include/wine/windows/dsound.h /usr/local/i386-mingw32/include/ # (for Direct Sound support)
+   source cross-mingw32-gtkaio.sh #(otherwise it won't find iconv and then get confused when it's there)
+   export CFLAGS="-Os -s -fno-exceptions"
+   export CXXFLAGS="-Os -s -fno-exceptions"
+   sed -i -e 's/test x\$have_directx = xyes/test x$have_dsound = xyes/g' configure # (don't require all of DirectX for dsound)
+   sed -i -e 's/#include <ddraw\.h>//g' src/audio/windx5/directx.h
+   sed -i -e 's/#include <dinput\.h>//g' src/audio/windx5/directx.h
+   ./configure --host=i386-mingw32 --build=i686-redhat-linux-gnu --prefix=... --disable-shared
+   make
+   make install
+   For the prefix, I recommend creating a new directory.
+   You can also use the following configure options to get a sound-only build of SDL:
+   --disable-video --disable-events --disable-joystick --disable-cdrom --disable-timers --disable-loadso
+   (WARNING: Only use these for static builds, a DLL with all that stuff disabled WILL cause problems!)
+
+8. Edit cross-mingw32-gtkaio.sh to your system's needs.
+
+9. Use the following commands to build TiEmu (TiLP and GFM can be built the same way, if this is
+   broken, please report it as a bug):
+   source cross-mingw32-gtkaio.sh #(needs to be done for EACH build!)
+   export PATH=/path/to/sdl-mingw/bin:$PATH #(replace /path/to/sdl-mingw with the prefix from step 7)
+   export CFLAGS="-Os -s -fno-exceptions"
+   export CXXFLAGS="-Os -s -fno-exceptions"
+   cd libticables-mingw-build
+   ./configure --prefix=~/.wine/c/tiemu --host=i386-mingw32 --build=i686-redhat-linux-gnu
+   make
+   make install
+   cd ../libticonv-mingw-build
+   ./configure --prefix=~/.wine/c/tiemu --host=i386-mingw32 --build=i686-redhat-linux-gnu
+   make
+   make install
+   cd ../libtifiles-mingw-build
+   ./configure --prefix=~/.wine/c/tiemu --host=i386-mingw32 --build=i686-redhat-linux-gnu
+   make
+   make install
+   cd ../libticalcs-mingw-build
+   ./configure --prefix=~/.wine/c/tiemu --host=i386-mingw32 --build=i686-redhat-linux-gnu
+   make
+   make install
+   cd ../tiemu-mingw-build
+   ./configure --prefix=~/.wine/c/tiemu --host=i386-mingw32 --build=i686-redhat-linux-gnu
+   make
+   make install
+   i386-mingw32-strip ~/.wine/c/tiemu/bin/*
+   NOTE: You'll have to substitute an absolute path for ~ to make configure happy.
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+---------------------------------------
+| Running your software on WINE       |
+---------------------------------------
+
+If you have built your program against GTK+ 2.6 as per the instructions above, it will run in WINE.
+
+1. Open WINE regedit and add ";c:\GTK\bin" to HKEY_CURRENT_USER\Environment\PATH.
+
+2. Copy all the .ttf files from /usr/share/fonts/bitstream-vera/ to ~/.wine/c/windows/Fonts so GTK+
+   in WINE has fonts to work with.
+
+3. Add "bitstream vera sans" to the aliases for "sans" and likewise for "serif", "monospace" and
+   "courier" in ~/.wine/c/GTK/etc/pango/pango.aliases.
+
+4. Run:
+   wine 'c:\tiemu\bin\tiemu.exe'
+
+WARNING: DON'T use GTK+ 2.8 if you want to be able to test with WINE!
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+---------------------------------------
+| Cross-Building a Windows Installer  |
+---------------------------------------
+
+Once you have successfully cross-built TiEmu 3, here's how to build a Windows installer on Fedora:
+
+1. Install NSIS from: http://repo.calcforge.org/fedora/
+
+2. Fetch the NsisUnz plugin from http://saivert.com/nsis/nsisunz.7z and decompress nsisunz.dll to
+   your /usr/share/nsis/Plugins directory.
+
+3. Install UPX from Fedora. (Can be retrieved with yum: "yum install upx".)
+
+4. Use the following commands to build the TiEmu setup wizard:
+   cd build/nsis
+   makensis tiemu-cross.nsi
+
+NOTE: TiLP and GFM don't have NSIS installer scripts yet.
diff --git a/build/mingw/cross-mingw32-gtkaio.sh b/build/mingw/cross-mingw32-gtkaio.sh
new file mode 100755
index 0000000..353c4a7
--- /dev/null
+++ b/build/mingw/cross-mingw32-gtkaio.sh
@@ -0,0 +1,13 @@
+# This script sets up variables for cross-compilation of GTK+ programs to MinGW.
+# It assumes a GTK+ development environment installation from gladewin32.sf.net in WINE.
+# You'll also need a: ln -s ~/.wine/c/GTK /target
+export CC=i386-mingw32-gcc
+export CXX=i386-mingw32-g++
+export RC=i386-mingw32-windres
+export GTK_BASEPATH=~/.wine/c/GTK
+export PATH=$GTK_BASEPATH/bin:$PATH
+export ACLOCAL_FLAGS="-I $GTK_BASEPATH/share/aclocal $ACLOCAL_FLAGS"
+export C_INCLUDE_PATH=$GTK_BASEPATH/include:/usr/local/i386-mingw32/include
+export LIBRARY_PATH=$GTK_BASEPATH/lib:/usr/local/i386-mingw32/lib/w32api:/usr/local/i386-mingw32/lib
+export PKG_CONFIG_PATH=/usr/local/i386-mingw32/lib/pkgconfig:$GTK_BASEPATH/lib/pkgconfig:~/.wine/c/tiemu/lib/pkgconfig
+export LIBS=-L/target/lib
diff --git a/build/mingw/tiemu.ico b/build/mingw/tiemu.ico
new file mode 100644
index 0000000..8996a57
Binary files /dev/null and b/build/mingw/tiemu.ico differ
diff --git a/build/mingw/tiemu.rc b/build/mingw/tiemu.rc
new file mode 100644
index 0000000..c091573
--- /dev/null
+++ b/build/mingw/tiemu.rc
@@ -0,0 +1,46 @@
+#define IDI_ICON1                       101
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+1 VERSIONINFO
+ FILEVERSION 3,0,3,0
+ PRODUCTVERSION 3,0,3,0
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0x28L
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E4"
+        BEGIN
+            VALUE "Comments", "This program is placed under GPL license. The license can be found on www.gnu.org\0"
+            VALUE "CompanyName", "Linux Programmer Group\0"
+            VALUE "FileDescription", "TiEmu\0"
+            VALUE "FileVersion", "3.03\0"
+            VALUE "InternalName", "TiEmu\0"
+            VALUE "LegalCopyright", "Copyright � 2000-2008, The TiEmu Team\0"
+            VALUE "LegalTrademarks", "The TiEmu Team\0"
+            VALUE "OriginalFilename", "tiemu.exe\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "TiEmu 3\0"
+            VALUE "ProductVersion", "3, 0, 3, 0\0"
+            VALUE "SpecialBuild", "Windows build\0"
+        END
+    END
+END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1               ICON    DISCARDABLE     "tiemu.ico"
+/////////////////////////////////////////////////////////////////////////////
+
diff --git a/build/msvc/ReadMe.txt b/build/msvc/ReadMe.txt
new file mode 100644
index 0000000..4cb638e
--- /dev/null
+++ b/build/msvc/ReadMe.txt
@@ -0,0 +1,95 @@
+Compiling LPG Software with MSVC v6
+Version 20090103
+Copyright (C) 2005-2007 Kevin Kofler
+Copyright (C) 2001-2009 Romain Lievin
+Copyright (C) 2006 Tyler Cassidy
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This is how to compile LPG software with MSVC. This bugger can be tricky so watch out. :)
+
+These compiling instructions will work for:
+- libticables2, libticonv, libtifiles2, libticables2
+- TiLP 2
+- TiEmu 3
+- GFM
+- SkinEdit
+
+Follow the instructions very closely or you will soon see that monkeys will start biting. ;-)
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+---------------------------------------
+| Retrieving sources                  |
+---------------------------------------
+
+There are two ways to retrieve source code:
+- downloads tarballs from <http://sourceforge.net/project/showfiles.php?group_id=23169>
+- uses SubVersion (svn for short) from <svn.tilp.info>
+
+1) from tarballs: create a folder and extract all of your tarballs
+
+2) from subversion: you will have to install svn-tools (linux) or a client (TortoiseSVN/Win32).
+Take a look at <http://tortoisesvn.tigris.org> and <http://svnbook.red-bean.com>.
+ 
+There is a specific tree to use for build:
+
+	C:\LPG\
+	|
+	+- GTK
+	+- SDL
+	+- libusb-win32
+	+- gfm
+	+- skinedit
+	+- tfdocgen
+	+- ticables2
+	+- ticalcs2
+	+- ticonv
+	+- tiemu3
+	+- tifile2
+	+- ticables2
+	+- tilp2
+
+Next, check-out the following URLs for each target folder: 
+- svn co http://svn.tilp.info/repos/tilp/libticables/trunk ticables2 
+- svn co http://svn.tilp.info/repos/tilp/libticalcs/trunk ticalcs2 
+- svn co http://svn.tilp.info/repos/tilp/libtifiles/trunk tifiles2 
+- svn co http://svn.tilp.info/repos/tilp/libticonv/trunk ticonv  
+- svn co http://svn.tilp.info/repos/tilp/tilp/trunk tilp2
+- svn co http://svn.tilp.info/repos/tilp/tiemu/trunk tiemu3
+- svn co http://svn.tilp.info/repos/tilp/tfdocgen/trunk tfdocgen
+- svn co http://svn.tilp.info/repos/tiemu/skinedit/trunk skinedit
+- svn co http://svn.tilp.info/repos/tilp/gfm/trunk gfm
+
+---------------------------------------
+| Compiling on Windows                |
+---------------------------------------
+
+1) Have MSVC 6.0  properly installed
+
+2) Download and install the GladeWin32 Development Packages from
+   http://prdownloads.sf.net/gladewin32/gtk-win32-devel-2.6.10-rc1.exe and make sure you check the
+   "Install MSVC environment variables" checkbox when the installer asks you, if you don't, the
+   monkeys WILL bite :)
+   
+   Download and install the GladeWin32 Development Packages from
+   http://prdownloads.sf.net/gladewin32/gtk-win32-devel-2.6.10-rc1.exe and make sure you check the
+   "Install MSYS environment variables" checkbox when the installer asks you, if you don't, the
+   monkeys WILL bite :)
+
+3) Download and untar libusb-win32-device-bin from
+   <http://sourceforge.net/project/showfiles.php?group_id=78138>
+   
+4) Download and unzip libSDL from <http://www.libsdl.org/release/SDL-devel-1.2.13-VC6.zip>.
+
+5) Open an MSVC project (tilp2, tiemu3, ...) at c:\lpg\project\build\msvc and build.
+
+Note for TiEmu: the MSVC project at "base_folder\tiemu\src\core\uae" has to be built before.
+
+6) Object and executables files will be produced in "C:\lpg\msvc". The generated executables will
+not run without some resource files. To copy them, you will find in c:\lpg\tilp or c:\lpg\tiemu
+a script named install.bat.
+
+Have fun :)
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/build/msvc/TiEmu.ico b/build/msvc/TiEmu.ico
new file mode 100755
index 0000000..8996a57
Binary files /dev/null and b/build/msvc/TiEmu.ico differ
diff --git a/build/msvc/TiEmu3.dsp b/build/msvc/TiEmu3.dsp
new file mode 100644
index 0000000..c395eb8
--- /dev/null
+++ b/build/msvc/TiEmu3.dsp
@@ -0,0 +1,63 @@
+# Microsoft Developer Studio Project File - Name="TiEmu3" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=TiEmu3 - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "TiEmu3.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "TiEmu3.mak" CFG="TiEmu3 - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "TiEmu3 - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "TiEmu3 - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF  "$(CFG)" == "TiEmu3 - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+
+!ELSEIF  "$(CFG)" == "TiEmu3 - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+
+!ENDIF 
+
+# Begin Target
+
+# Name "TiEmu - Win32 Release"
+# Name "TiEmu - Win32 Debug"
+# End Target
+# End Project
diff --git a/build/msvc/TiEmu3.dsw b/build/msvc/TiEmu3.dsw
new file mode 100644
index 0000000..03698f0
--- /dev/null
+++ b/build/msvc/TiEmu3.dsw
@@ -0,0 +1,143 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "TiEmu3_Console"=.\TiEmu3_Console.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name uae
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name ticables2
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name ticalcs2
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name tifiles2
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name ticonv
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "TiEmu3_Windows"=.\TiEmu3_Windows.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name uae
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name ticables2
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name ticalcs2
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name ticonv
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name tifiles2
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "ticables2"=..\..\..\ticables2\build\msvc\ticables2.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "ticalcs2"=..\..\..\ticalcs2\build\msvc\ticalcs2.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name ticables2
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name tifiles2
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name ticonv
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "ticonv"=..\..\..\ticonv\build\msvc\ticonv.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "tifiles2"=..\..\..\tifiles2\build\msvc\tifiles2.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name ticonv
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "uae"=..\..\src\core\uae\uae.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/build/msvc/TiEmu3_Console.dsp b/build/msvc/TiEmu3_Console.dsp
new file mode 100755
index 0000000..8ba98c0
--- /dev/null
+++ b/build/msvc/TiEmu3_Console.dsp
@@ -0,0 +1,753 @@
+# Microsoft Developer Studio Project File - Name="TiEmu3_Console" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=TiEmu3_Console - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "TiEmu3_Console.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "TiEmu3_Console.mak" CFG="TiEmu3_Console - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "TiEmu3_Console - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "TiEmu3_Console - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "TiEmu3_Console - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "C:\lpg\msvc\Output\tiemu3"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /w /W0 /GX /O2 /I "c:\lpg\\tiemu3\src\com_ole" /I "c:\lpg\\tiemu3\src\ipc\com" /I "c:\lpg\\tiemu3\src\misc" /I "c:\lpg\\tiemu3\src\gui\calc" /I "c:\lpg\\tiemu3\src\core\dbg" /I "c:\lpg\\tiemu3\src\core\ti_sw" /I "c:\lpg\\tiemu3\src\gui\debugger" /I "." /I "../../../ticables2/src" /I "../../../tifiles2/src" /I "../../../ticalcs2/src" /I "../../../ticonv/src" /I "../../src/win32" /I "C:\LPG\GTK\INCLUDE\GTK-2.0" /I "C:\LPG\GTK\LIB\GTK-2.0\INCLUDE" /I "C:\LPG\GTK\INCLUD [...]
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 /out:"tiemu.exe"
+
+!ELSEIF  "$(CFG)" == "TiEmu3_Console - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "C:\lpg\msvc"
+# PROP Intermediate_Dir "C:\lpg\msvc\output\tiemu3"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MD /W3 /GX /ZI /Od /I "C:\LPG\GTK\include\cairo" /I "c:\lpg\\tiemu3\src\com_ole" /I "c:\lpg\\tiemu3\src\ipc\com" /I "c:\lpg\\tiemu3\src\misc" /I "c:\lpg\\tiemu3\src\gui\calc" /I "c:\lpg\\tiemu3\src\core\dbg" /I "c:\lpg\\tiemu3\src\core\ti_sw" /I "c:\lpg\\tiemu3\src\gui\debugger" /I "." /I "../../../ticables2/src" /I "../../../tifiles2/src" /I "../../../ticalcs2/src" /I "../../../ticonv/src" /I "../../src/win32" /I "C:\LPG\GTK\INCLUDE\GTK-2.0" /I "C:\LPG\GTK\LIB\GTK-2.0 [...]
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\lpg\msvc\tiemu.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "TiEmu3_Console - Win32 Release"
+# Name "TiEmu3_Console - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Group "core"
+
+# PROP Default_Filter ""
+# Begin Group "uae"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\newcpu.c
+
+!IF  "$(CFG)" == "TiEmu3_Console - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "TiEmu3_Console - Win32 Debug"
+
+# ADD CPP /w /W0
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\table68k
+# End Source File
+# End Group
+# Begin Group "ti_hw"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\dbus.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\flash.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\gscales.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\hw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\hwprot.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\kbd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\m68k.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem89.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem89tm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem92.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem92p.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\memv2.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\ports.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\rtc_hw3.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\tichars.c
+# End Source File
+# End Group
+# Begin Group "dbg"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\bkpts.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\debug.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\disasm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\fpudasm.c
+# End Source File
+# End Group
+# Begin Group "ti_sw"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\er_codes.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\handles.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\hwpm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\iodefs.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\mem_map.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\registers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\romcalls.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\timem.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\vat.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\libuae.lib
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\core\engine.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\error.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\images.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\interface.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\state.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\type2str.c
+# End Source File
+# End Group
+# Begin Group "gui"
+
+# PROP Default_Filter ""
+# Begin Group "debug"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_all.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_bits.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_bkpts.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_cause.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_code.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_data.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_dock.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_entry.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_heap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_iop.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_mem.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_pclog.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_regs.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_romcall.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_stack.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_vectors.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_wnds.c
+# End Source File
+# End Group
+# Begin Group "calc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\calc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\dnd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keyboard.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keymap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keynames.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keypress.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\popup.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\screen.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\skinkeys.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\skinops.c
+# End Source File
+# End Group
+# Begin Group "dlgbox"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\about.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\dboxes.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\device.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\filesel.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\fs_misc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\infos.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\manpage.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\pbars.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\quicksend.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\refresh.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\release.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\romversion.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\scroptions.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\splash.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\support.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\wizard.c
+# End Source File
+# End Group
+# Begin Group "logger"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\logger\log_link.c
+# End Source File
+# End Group
+# End Group
+# Begin Group "misc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\misc\cmdline.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\files.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gdb\libiberty\gettimeofday.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\logging.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\paths.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\rcfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\screenshot.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\tie_error.c
+# End Source File
+# End Group
+# Begin Group "ipc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\ipc\com\oleaut.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\ipc\com\oleaut_i.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\ipc\com\registry.cpp
+# End Source File
+# End Group
+# Begin Group "sound"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\sound\audio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\sound\stream.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\gui\main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\tsource.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\newcpu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\version.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\icon2.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\icon3.ico
+# End Source File
+# Begin Source File
+
+SOURCE=..\mingw\tiemu.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\tiemu.ico
+# End Source File
+# Begin Source File
+
+SOURCE=..\mingw\tiemu.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\TiEmu3.ico
+# End Source File
+# End Group
+# Begin Group "Library Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\glib-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gdk-win32-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gtk-win32-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gobject-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gdk_pixbuf-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gthread-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gmodule-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\pango-1.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\atk-1.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\glade-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE=C:\LPG\GTK\lib\intl.lib
+# End Source File
+# Begin Source File
+
+SOURCE=C:\LPG\GTK\lib\z.lib
+# End Source File
+# Begin Source File
+
+SOURCE="c:\lpg\sdl\lib\SDLmain.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="c:\lpg\sdl\lib\SDL.lib"
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\BUGS
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\ChangeLog
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\po\fr.po
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\RELEASE
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\TODO
+# End Source File
+# End Group
+# Begin Group "Misc Files"
+
+# PROP Default_Filter ""
+# Begin Group "IO defs"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_ti89_hw1.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_ti89_hw2.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_ti89t_hw3.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_ti89t_hw4.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_ti92_hw1.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_ti92p_hw1.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_ti92p_hw2.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\iodefs_v200_hw2.txt
+# End Source File
+# End Group
+# Begin Group "ROM calls"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\misc\romcalls.lst
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\romcalls.txt
+# End Source File
+# End Group
+# Begin Group "MEM maps"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_ti89_hw1.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_ti89_hw2.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_ti89t_hw3.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_ti89t_hw4.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_ti92_hw1.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_ti92p_hw1.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_ti92p_hw2.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\misc\memmap_v200_hw2.txt
+# End Source File
+# End Group
+# End Group
+# End Target
+# End Project
diff --git a/build/msvc/TiEmu3_Console.dsw b/build/msvc/TiEmu3_Console.dsw
new file mode 100755
index 0000000..eb53ba3
--- /dev/null
+++ b/build/msvc/TiEmu3_Console.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "TiEmu3_Console"=.\TiEmu3_Console.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/build/msvc/TiEmu3_Windows.dsp b/build/msvc/TiEmu3_Windows.dsp
new file mode 100755
index 0000000..b29fa57
--- /dev/null
+++ b/build/msvc/TiEmu3_Windows.dsp
@@ -0,0 +1,645 @@
+# Microsoft Developer Studio Project File - Name="TiEmu3_Windows" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=TiEmu3_Windows - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "TiEmu3_Windows.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "TiEmu3_Windows.mak" CFG="TiEmu3_Windows - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "TiEmu3_Windows - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "TiEmu3_Windows - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "TiEmu3_Windows - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "C:\lpg\msvc\Output\tiemu3"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /w /W0 /GX /O2 /I "c:\lpg\\tiemu3\src\com_ole" /I "c:\lpg\\tiemu3\src\ipc\com" /I "c:\lpg\\tiemu3\src\misc" /I "c:\lpg\\tiemu3\src\gui\calc" /I "c:\lpg\\tiemu3\src\core\dbg" /I "c:\lpg\\tiemu3\src\core\ti_sw" /I "c:\lpg\\tiemu3\src\gui\debugger" /I "." /I "../../../ticables2/src" /I "../../../tifiles2/src" /I "../../../ticalcs2/src" /I "../../../ticonv/src" /I "../../src/win32" /I "C:\LPG\GTK\INCLUDE\GTK-2.0" /I "C:\LPG\GTK\LIB\GTK-2.0\INCLUDE" /I "C:\LPG\GTK\INCLUD [...]
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib   /nologo /subsystem:windows /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib   /nologo /subsystem:windows /machine:I386 /out:"tiemu.exe"
+
+!ELSEIF  "$(CFG)" == "TiEmu3_Windows - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "C:\lpg\msvc"
+# PROP Intermediate_Dir "C:\lpg\msvc\Output\tiemu3"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MD /w /W0 /GX /ZI /Od /I "C:\LPG\GTK\include\cairo" /I "c:\lpg\\tiemu3\src\com_ole" /I "c:\lpg\\tiemu3\src\ipc\com" /I "c:\lpg\\tiemu3\src\misc" /I "c:\lpg\\tiemu3\src\gui\calc" /I "c:\lpg\\tiemu3\src\core\dbg" /I "c:\lpg\\tiemu3\src\core\ti_sw" /I "c:\lpg\\tiemu3\src\gui\debugger" /I "." /I "../../../ticables2/src" /I "../../../tifiles2/src" /I "../../../ticalcs2/src" /I "../../../ticonv/src" /I "../../src/win32" /I "C:\LPG\GTK\INCLUDE\GTK-2.0" /I "C:\LPG\GTK\LIB\GTK- [...]
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib   /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib   /nologo /subsystem:windows /debug /machine:I386 /out:"c:\lpg\msvc\tiemu.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "TiEmu3_Windows - Win32 Release"
+# Name "TiEmu3_Windows - Win32 Debug"
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\BUGS
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\ChangeLog
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\RELEASE
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\TODO
+# End Source File
+# End Group
+# Begin Group "Library Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\glib-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gdk-win32-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gtk-win32-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gobject-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gdk_pixbuf-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gthread-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\gmodule-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\pango-1.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\atk-1.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="C:\LPG\GTK\lib\glade-2.0.lib"
+# End Source File
+# Begin Source File
+
+SOURCE=C:\LPG\GTK\lib\intl.lib
+# End Source File
+# Begin Source File
+
+SOURCE=C:\LPG\GTK\lib\z.lib
+# End Source File
+# Begin Source File
+
+SOURCE="c:\lpg\sdl\lib\SDL.lib"
+# End Source File
+# Begin Source File
+
+SOURCE="c:\lpg\sdl\lib\SDLmain.lib"
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\tiemu.ico
+# End Source File
+# Begin Source File
+
+SOURCE=..\mingw\tiemu.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\TiEmu3.ico
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\newcpu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\version.h
+# End Source File
+# End Group
+# Begin Group "Source Files"
+
+# PROP Default_Filter ""
+# Begin Group "core"
+
+# PROP Default_Filter ""
+# Begin Group "uae"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\newcpu.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\table68k
+# End Source File
+# End Group
+# Begin Group "ti_hw"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\dbus.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\flash.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\gscales.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\hw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\hwprot.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\kbd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\m68k.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem89.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem89tm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem92.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\mem92p.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\memv2.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\ports.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\rtc_hw3.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_hw\tichars.c
+# End Source File
+# End Group
+# Begin Group "dbg"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\bkpts.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\debug.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\disasm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\dbg\fpudasm.c
+# End Source File
+# End Group
+# Begin Group "ti_sw"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\er_codes.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\handles.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\hwpm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\iodefs.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\mem_map.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\registers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\romcalls.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\timem.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\ti_sw\vat.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\uae\libuae.lib
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\core\engine.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\error.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\images.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\interface.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\state.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\core\type2str.c
+# End Source File
+# End Group
+# Begin Group "gui"
+
+# PROP Default_Filter ""
+# Begin Group "debug"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_all.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_bits.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_bkpts.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_cause.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_code.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_data.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_dock.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_entry.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_heap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_iop.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_mem.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_pclog.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_regs.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_romcall.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_stack.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_vectors.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\debugger\dbg_wnds.c
+# End Source File
+# End Group
+# Begin Group "calc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\calc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\dnd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keyboard.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keymap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keynames.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\keypress.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\popup.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\screen.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\skinkeys.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\calc\skinops.c
+# End Source File
+# End Group
+# Begin Group "dlgbox"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\about.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\dboxes.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\device.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\filesel.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\fs_misc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\infos.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\manpage.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\pbars.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\quicksend.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\refresh.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\release.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\romversion.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\scroptions.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\splash.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\support.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\wizard.c
+# End Source File
+# End Group
+# Begin Group "logger"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\gui\logger\log_link.c
+# End Source File
+# End Group
+# End Group
+# Begin Group "misc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\misc\cmdline.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\files.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gdb\libiberty\gettimeofday.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\logging.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\paths.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\rcfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\screenshot.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\misc\tie_error.c
+# End Source File
+# End Group
+# Begin Group "ipc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\ipc\com\oleaut.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\ipc\com\oleaut_i.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\ipc\com\registry.cpp
+# End Source File
+# End Group
+# Begin Group "sound"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\sound\audio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\sound\stream.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\gui\main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gui\tsource.c
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/msvc/TiEmu3_Windows.dsw b/build/msvc/TiEmu3_Windows.dsw
new file mode 100644
index 0000000..59376cd
--- /dev/null
+++ b/build/msvc/TiEmu3_Windows.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "TiEmu3_Windows"=.\TiEmu3_Windows.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/build/msvc/dirent.h b/build/msvc/dirent.h
new file mode 100644
index 0000000..83e6111
--- /dev/null
+++ b/build/msvc/dirent.h
@@ -0,0 +1,68 @@
+/*  TiLP - link program for TI calculators
+ *  Copyright (C) 1999-2001  Romain Lievin
+ *
+ *  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.
+ */
+
+#ifdef __WIN32__
+
+#ifndef DIRENT_H
+#define DIRENT_H
+
+#include <sys/stat.h>
+
+//#define S_IFMT     0170000   // bitmask for the file type bitfields
+#define __S_IFMT     0170000   // bitmask for the file type bitfields
+#define S_IFSOCK   0140000   // socket
+#define S_IFLNK    0120000   // symbolic link
+//#define S_IFREG    0100000   // regular file
+#define __S_IFREG    0100000   // regular file
+#define S_IFBLK    0060000   // block device
+//#define S_IFDIR    0040000   // directory
+#define __S_IFDIR  0040000   // directory
+//#define S_IFCHR    0020000   // character device
+#define S_IFIFO    0010000   // fifo
+#define S_ISUID    0004000   // set UID bit
+#define S_ISGID    0002000   // set GID bit (see below)
+#define S_ISVTX    0001000   // sticky bit (see below)
+#define S_IRWXU    00700     // mask for file owner permissions
+#define S_IRUSR    00400     // owner has read permission
+#define S_IWUSR    00200     // owner has write permission
+#define S_IXUSR    00100     // owner has execute permission
+#define S_IRWXG    00070     // mask for group permissions
+#define S_IRGRP    00040     // group has read permission
+#define S_IWGRP    00020     // group has write permission
+#define S_IXGRP    00010     // group has execute permission
+#define S_IRWXO    00007     // mask for permissions for others (not in group)
+#define S_IROTH    00004     // others have read permission
+#define S_IWOTH    00002     // others have write permisson
+#define S_IXOTH    00001     // others have execute permisson
+
+/* Test macros for file types.  */
+
+#define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
+
+#define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
+#define S_ISCHR(mode)    __S_ISTYPE((mode), __S_IFCHR)
+#define S_ISBLK(mode)    __S_ISTYPE((mode), __S_IFBLK)
+#define S_ISREG(mode)    __S_ISTYPE((mode), __S_IFREG)
+#ifdef __S_IFIFO
+# define S_ISFIFO(mode)  __S_ISTYPE((mode), __S_IFIFO)
+#endif
+
+
+#endif
+
+#endif
diff --git a/build/msvc/inttypes.h b/build/msvc/inttypes.h
new file mode 100644
index 0000000..0e8af69
--- /dev/null
+++ b/build/msvc/inttypes.h
@@ -0,0 +1,305 @@
+// ISO C9x  compliant inttypes.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 
+// 
+//  Copyright (c) 2006 Alexander Chemeris
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// 
+//   1. Redistributions of source code must retain the above copyright notice,
+//      this list of conditions and the following disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the following disclaimer in the
+//      documentation and/or other materials provided with the distribution.
+// 
+//   3. The name of the author may be used to endorse or promote products
+//      derived from this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// 
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_INTTYPES_H_ // [
+#define _MSC_INTTYPES_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <stdint.h>
+
+// 7.8 Format conversion of integer types
+
+typedef struct {
+   intmax_t quot;
+   intmax_t rem;
+} imaxdiv_t;
+
+// 7.8.1 Macros for format specifiers
+
+#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [   See footnote 185 at page 198
+
+// The fprintf macros for signed integers are:
+#define PRId8       "d"
+#define PRIi8       "i"
+#define PRIdLEAST8  "d"
+#define PRIiLEAST8  "i"
+#define PRIdFAST8   "d"
+#define PRIiFAST8   "i"
+
+#define PRId16       "hd"
+#define PRIi16       "hi"
+#define PRIdLEAST16  "hd"
+#define PRIiLEAST16  "hi"
+#define PRIdFAST16   "hd"
+#define PRIiFAST16   "hi"
+
+#define PRId32       "I32d"
+#define PRIi32       "I32i"
+#define PRIdLEAST32  "I32d"
+#define PRIiLEAST32  "I32i"
+#define PRIdFAST32   "I32d"
+#define PRIiFAST32   "I32i"
+
+#define PRId64       "I64d"
+#define PRIi64       "I64i"
+#define PRIdLEAST64  "I64d"
+#define PRIiLEAST64  "I64i"
+#define PRIdFAST64   "I64d"
+#define PRIiFAST64   "I64i"
+
+#define PRIdMAX     "I64d"
+#define PRIiMAX     "I64i"
+
+#define PRIdPTR     "Id"
+#define PRIiPTR     "Ii"
+
+// The fprintf macros for unsigned integers are:
+#define PRIo8       "o"
+#define PRIu8       "u"
+#define PRIx8       "x"
+#define PRIX8       "X"
+#define PRIoLEAST8  "o"
+#define PRIuLEAST8  "u"
+#define PRIxLEAST8  "x"
+#define PRIXLEAST8  "X"
+#define PRIoFAST8   "o"
+#define PRIuFAST8   "u"
+#define PRIxFAST8   "x"
+#define PRIXFAST8   "X"
+
+#define PRIo16       "ho"
+#define PRIu16       "hu"
+#define PRIx16       "hx"
+#define PRIX16       "hX"
+#define PRIoLEAST16  "ho"
+#define PRIuLEAST16  "hu"
+#define PRIxLEAST16  "hx"
+#define PRIXLEAST16  "hX"
+#define PRIoFAST16   "ho"
+#define PRIuFAST16   "hu"
+#define PRIxFAST16   "hx"
+#define PRIXFAST16   "hX"
+
+#define PRIo32       "I32o"
+#define PRIu32       "I32u"
+#define PRIx32       "I32x"
+#define PRIX32       "I32X"
+#define PRIoLEAST32  "I32o"
+#define PRIuLEAST32  "I32u"
+#define PRIxLEAST32  "I32x"
+#define PRIXLEAST32  "I32X"
+#define PRIoFAST32   "I32o"
+#define PRIuFAST32   "I32u"
+#define PRIxFAST32   "I32x"
+#define PRIXFAST32   "I32X"
+
+#define PRIo64       "I64o"
+#define PRIu64       "I64u"
+#define PRIx64       "I64x"
+#define PRIX64       "I64X"
+#define PRIoLEAST64  "I64o"
+#define PRIuLEAST64  "I64u"
+#define PRIxLEAST64  "I64x"
+#define PRIXLEAST64  "I64X"
+#define PRIoFAST64   "I64o"
+#define PRIuFAST64   "I64u"
+#define PRIxFAST64   "I64x"
+#define PRIXFAST64   "I64X"
+
+#define PRIoMAX     "I64o"
+#define PRIuMAX     "I64u"
+#define PRIxMAX     "I64x"
+#define PRIXMAX     "I64X"
+
+#define PRIoPTR     "Io"
+#define PRIuPTR     "Iu"
+#define PRIxPTR     "Ix"
+#define PRIXPTR     "IX"
+
+// The fscanf macros for signed integers are:
+#define SCNd8       "d"
+#define SCNi8       "i"
+#define SCNdLEAST8  "d"
+#define SCNiLEAST8  "i"
+#define SCNdFAST8   "d"
+#define SCNiFAST8   "i"
+
+#define SCNd16       "hd"
+#define SCNi16       "hi"
+#define SCNdLEAST16  "hd"
+#define SCNiLEAST16  "hi"
+#define SCNdFAST16   "hd"
+#define SCNiFAST16   "hi"
+
+#define SCNd32       "ld"
+#define SCNi32       "li"
+#define SCNdLEAST32  "ld"
+#define SCNiLEAST32  "li"
+#define SCNdFAST32   "ld"
+#define SCNiFAST32   "li"
+
+#define SCNd64       "I64d"
+#define SCNi64       "I64i"
+#define SCNdLEAST64  "I64d"
+#define SCNiLEAST64  "I64i"
+#define SCNdFAST64   "I64d"
+#define SCNiFAST64   "I64i"
+
+#define SCNdMAX     "I64d"
+#define SCNiMAX     "I64i"
+
+#ifdef _WIN64 // [
+#  define SCNdPTR     "I64d"
+#  define SCNiPTR     "I64i"
+#else  // _WIN64 ][
+#  define SCNdPTR     "ld"
+#  define SCNiPTR     "li"
+#endif  // _WIN64 ]
+
+// The fscanf macros for unsigned integers are:
+#define SCNo8       "o"
+#define SCNu8       "u"
+#define SCNx8       "x"
+#define SCNX8       "X"
+#define SCNoLEAST8  "o"
+#define SCNuLEAST8  "u"
+#define SCNxLEAST8  "x"
+#define SCNXLEAST8  "X"
+#define SCNoFAST8   "o"
+#define SCNuFAST8   "u"
+#define SCNxFAST8   "x"
+#define SCNXFAST8   "X"
+
+#define SCNo16       "ho"
+#define SCNu16       "hu"
+#define SCNx16       "hx"
+#define SCNX16       "hX"
+#define SCNoLEAST16  "ho"
+#define SCNuLEAST16  "hu"
+#define SCNxLEAST16  "hx"
+#define SCNXLEAST16  "hX"
+#define SCNoFAST16   "ho"
+#define SCNuFAST16   "hu"
+#define SCNxFAST16   "hx"
+#define SCNXFAST16   "hX"
+
+#define SCNo32       "lo"
+#define SCNu32       "lu"
+#define SCNx32       "lx"
+#define SCNX32       "lX"
+#define SCNoLEAST32  "lo"
+#define SCNuLEAST32  "lu"
+#define SCNxLEAST32  "lx"
+#define SCNXLEAST32  "lX"
+#define SCNoFAST32   "lo"
+#define SCNuFAST32   "lu"
+#define SCNxFAST32   "lx"
+#define SCNXFAST32   "lX"
+
+#define SCNo64       "I64o"
+#define SCNu64       "I64u"
+#define SCNx64       "I64x"
+#define SCNX64       "I64X"
+#define SCNoLEAST64  "I64o"
+#define SCNuLEAST64  "I64u"
+#define SCNxLEAST64  "I64x"
+#define SCNXLEAST64  "I64X"
+#define SCNoFAST64   "I64o"
+#define SCNuFAST64   "I64u"
+#define SCNxFAST64   "I64x"
+#define SCNXFAST64   "I64X"
+
+#define SCNoMAX     "I64o"
+#define SCNuMAX     "I64u"
+#define SCNxMAX     "I64x"
+#define SCNXMAX     "I64X"
+
+#ifdef _WIN64 // [
+#  define SCNoPTR     "I64o"
+#  define SCNuPTR     "I64u"
+#  define SCNxPTR     "I64x"
+#  define SCNXPTR     "I64X"
+#else  // _WIN64 ][
+#  define SCNoPTR     "lo"
+#  define SCNuPTR     "lu"
+#  define SCNxPTR     "lx"
+#  define SCNXPTR     "lX"
+#endif  // _WIN64 ]
+
+#endif // __STDC_FORMAT_MACROS ]
+
+// 7.8.2 Functions for greatest-width integer types
+
+// 7.8.2.1 The imaxabs function
+#define imaxabs _abs64
+
+// 7.8.2.2 The imaxdiv function
+
+// This is modified version of div() function from Microsoft's div.c found
+// in %MSVC.NET%\crt\src\div.c
+#ifdef STATIC_IMAXDIV // [
+static
+#else // STATIC_IMAXDIV ][
+_inline
+#endif // STATIC_IMAXDIV ]
+imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
+{
+   imaxdiv_t result;
+
+   result.quot = numer / denom;
+   result.rem = numer % denom;
+
+   if (numer < 0 && result.rem > 0) {
+      // did division wrong; must fix up
+      ++result.quot;
+      result.rem -= denom;
+   }
+
+   return result;
+}
+
+// 7.8.2.3 The strtoimax and strtoumax functions
+#define strtoimax _strtoi64
+#define strtoumax _strtoui64
+
+// 7.8.2.4 The wcstoimax and wcstoumax functions
+#define wcstoimax _wcstoi64
+#define wcstoumax _wcstoui64
+
+
+#endif // _MSC_INTTYPES_H_ ]
diff --git a/build/msvc/net.bat b/build/msvc/net.bat
new file mode 100755
index 0000000..7dad3c7
--- /dev/null
+++ b/build/msvc/net.bat
@@ -0,0 +1,6 @@
+del *.ncb
+del *.ilk
+del *.dep
+del *.opt
+deltree /y output
+deltree /y test
diff --git a/build/msvc/small.ico b/build/msvc/small.ico
new file mode 100755
index 0000000..8f94d9a
Binary files /dev/null and b/build/msvc/small.ico differ
diff --git a/build/msvc/stdint.h b/build/msvc/stdint.h
new file mode 100644
index 0000000..4a3af73
--- /dev/null
+++ b/build/msvc/stdint.h
@@ -0,0 +1,69 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: stdints.h 368 2004-03-22 18:42:08Z roms $ */
+
+/*  libtifiles - Ti File Format library, a part of the TiLP project
+ *  Copyright (C) 1999-2004  Romain Lievin
+ *
+ *  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.
+ */
+
+/* 
+   Encapsulate the ISO-C99 'stdint.h' header for platforms which haven't it
+*/
+
+#ifndef __TIEMU_STDINT__
+#define __TIEMU_STDINT__
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#else
+# if defined(__WIN32__)
+#  include <windows.h>
+
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4142 )
+#endif
+
+typedef unsigned __int8		uint8_t;
+typedef unsigned __int16	uint16_t;
+typedef unsigned __int32	uint32_t;
+typedef unsigned __int64	uint64_t;
+
+typedef __int8 		int8_t;
+typedef __int16 	int16_t;
+typedef __int32 	int32_t;
+typedef __int64		int64_t;
+
+typedef int64_t   intmax_t;
+
+#ifdef _MSC_VER
+#pragma warning( pop ) 
+#endif
+
+# elif defined(__BSD__)
+#  include <inttypes.h>
+# else
+
+#  include <inttypes.h>
+# endif				/* __WIN32__, __BSD__ */
+
+#endif				/* HAVE_STDINT_H */
+
+#endif				/* __TIFILES_STDINT__ */
diff --git a/build/msvc/unistd.h b/build/msvc/unistd.h
new file mode 100644
index 0000000..e0c3f6f
--- /dev/null
+++ b/build/msvc/unistd.h
@@ -0,0 +1,34 @@
+/*  TiLP - link program for TI calculators
+ *  Copyright (C) 1999-2001  Romain Lievin
+ *
+ *  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.
+ */
+
+#ifdef __WIN32__
+
+#ifndef UNISTD_H
+#define UNISTD_H
+
+#include <direct.h> //for mkdir, chdir, getcwd
+#include <io.h>		//for access
+
+#define F_OK 0
+#define mkdir(dir,mode) _mkdir(dir)
+
+void usleep(int ms);
+
+#endif
+
+#endif
diff --git a/build/nsis/Readme.txt b/build/nsis/Readme.txt
new file mode 100644
index 0000000..a298613
--- /dev/null
+++ b/build/nsis/Readme.txt
@@ -0,0 +1,104 @@
+TiEmu 3 (version 3.02)
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2008, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2007, Peter Fernandes
+Licensed under the GNU General Public License version 2 or later.
+
+1. Installed components
+
+The following components have been successfully installed:
+* TiEmu 3 (with TIGCC debugging support)
+* libticables2
+* libticonv
+* libtifiles2
+* libticalcs2
+* libusb (DLL only, see section 2.2)
+* GTK+ (if not already present)
+* Tcl
+* Tk
+* [Incr Tcl]
+* [Incr Tk]
+* [Incr widgets]
+* readline (linked statically into TiEmu)
+* libgui (linked statically into TiEmu)
+* GDB (linked statically into TiEmu)
+* Insight (linked statically into TiEmu)
+* SDL (linked statically into TiEmu)
+
+Uninstalling TiEmu removes all these components except GTK+, which can be
+uninstalled separately.
+
+2. Real link cable support
+
+If you want to link TiEmu to a real calculator through a link cable, you may
+need to install additional drivers which are not installed with TiEmu:
+
+2.1. DhaHelper/RWPorts
+
+In order to use TI's BlackLink serial cables or home-made serial or parallel
+cables on any NT-based version of Windows (Windows NT 4, Windows 2000, Windows
+XP, Windows 2003 or any newer version of Windows), you'll need to install the
+DhaHelper (32-bit) or RWPorts (64-bit) driver. These drivers are currently not
+installed by this package of TiEmu. DhaHelper can be installed by installing
+TiLP 2 for Windows, version 1.07a or newer.
+
+2.2. Libusb (SilverLink)
+
+In order to use TI's SilverLink USB cables (formerly known as TI-GraphLink
+USB), you'll need to install the libusb driver for Windows at:
+http://sourceforge.net/projects/libusb-win32
+You also need the silverlk.inf file included with libticables2. The easiest
+way to install this driver with the correct .inf files is to install TiLP 2
+for Windows, version 1.07 or newer. This package currently only installs the
+DLL, NOT the driver.
+
+IMPORTANT: This driver is NOT compatible with the driver used by TI Connect,
+installing it will replace TI's driver or the opposite. In order to use TI
+Connect, you'll have to uninstall the libusb driver and reinstall TI's driver.
+Likewise, to use the SilverLink in TiEmu again, you'll have to uninstall TI's
+driver and reinstall the libusb one. As an alternative, we suggest using TiLP
+(TiLP 2 >= 1.07a) which uses the libusb driver.
+
+3. GTK+ Troubleshooting
+
+If you're getting one of these:
+- ** WARNING **: Couldn't load font "MS Sans Serif 8" falling back to "Sans 8"
+- ** ERROR **: file shape.c line 75: assertion failed: (glyphs->num_glyphs > 0)
+or any other warning or error message regarding fonts/glyphs, the fix is to
+open your C:\Program Files\Shared Files\Gtk\2.0\etc\gtk-2.0\gtkrc and to add
+this:
+	style "user-font"
+	{
+	font_name="Arial"
+	}
+	widget_class "*" style "user-font"
+This forces GTK+ to use a compatible font (Arial) and reportedly fixes both
+the aforementioned problems, and probably others too.
+
+Another source of errors like the aforementioned ones is attempting to use GTK+
+2.8 or higher with a Windows version not supported by that version of GTK+.
+GTK+ 2.8 or higher requires Windows 2000, XP or newer. If you're running Windows
+95, 98, Me or NT 4, use GTK+ 2.6 instead.
+
+If you are getting any errors with DLLs, such as "The procedure entry point
+atk_relation_set_add_relation_by_type could not be located in the dynamic link
+library libatk-1.0-0.dll", make sure you have one and only ONE version of the
+GTK+ DLLs. If unsure, remove all GTK+ packages and install it again.
+
+4. Usage
+
+The installer automatically creates program entries in the Windows Startup menu.
+In order to get detailed instructions on how to use TiEmu, right-click on the
+emulated calculator screen and select "Misc" / "User's Manual".
+
+5. Contact Information
+
+You can reach us through our project web page:
+http://lpg.ticalc.org/prj_tiemu/
+Links to bug/feature/patch/support trackers, forums and mailing lists can be
+found on the web page.
+
+        -- Kevin Kofler for the TiEmu Team
diff --git a/build/nsis/tiemu-cross.nsi b/build/nsis/tiemu-cross.nsi
new file mode 100644
index 0000000..5b87e63
--- /dev/null
+++ b/build/nsis/tiemu-cross.nsi
@@ -0,0 +1,2370 @@
+; Script generated by the HM NIS Edit Script Wizard.
+
+; Other definitions
+!define GTK_MIN_VER "2.6.10"
+!define GTK_PKG_VER "-rc1"
+
+; HM NIS Edit Wizard helper defines
+!define PRODUCT_NAME "TiEmu"
+!define PRODUCT_VERSION "3.02a"
+!define PRODUCT_PUBLISHER "The TiEmu Team"
+!define PRODUCT_WEB_SITE "http://lpg.ticalc.org/prj_tiemu/index.html"
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\tiemu.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
+
+SetCompressor /SOLID lzma
+
+!packhdr tmpexe.tmp "upx --best -q tmpexe.tmp"
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+
+; Version comparisons
+!include "vercmp.nsi"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Start menu page
+var ICONS_GROUP
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "TiEmu"
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
+!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\tiemu.exe"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\share\tiemu\Readme.txt"
+!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; Language files
+!insertmacro MUI_LANGUAGE "English"
+
+; Reserve files
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+; MUI end ------
+
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+OutFile "Setup.exe"
+InstallDir "$PROGRAMFILES\TiEmu"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+ShowInstDetails show
+ShowUnInstDetails show
+
+Function .onInit
+; Check if GTK+ is installed
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkfound
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkfound
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'GTK+ not found. Please install the "GTK+ 2.6.x Runtime Environment" (${GTK_MIN_VER} or higher). If you proceed, the setup program will be downloaded and launched automatically.' IDOK installgtk IDCANCEL abortinstall
+gtkfound:
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "Version"
+  StrCmp $0 "" 0 gtkverfound
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "Version"
+  StrCmp $0 "" gtkvernotok
+gtkverfound:
+  Push "${GTK_MIN_VER}"
+  Push $0
+  Call CompareVersions
+  Pop $0
+  IntCmp $0 1 gtkverok
+gtkvernotok:
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Wrong GTK+ package version. You need at least version ${GTK_MIN_VER}. If you proceed, the setup program will be downloaded and launched automatically.' IDCANCEL abortinstall
+installgtk:
+; Connect to the Internet
+  ClearErrors
+  Dialer::AttemptConnect
+  IfErrors gtkinstallfailed
+  Pop $0
+  StrCmp $0 "online" 0 gtkinstallfailed
+; Fetch installer
+; Do the download quietly because the GUI isn't even loaded at that point, and because I can't get
+; the progress meters to work with the "Modern UI" anyway.
+  NSISdl::download_quiet "http://kent.dl.sourceforge.net/gladewin32/gtk-win32-${GTK_MIN_VER}${GTK_PKG_VER}.exe" "$TEMP\gtksetup.exe"
+  Pop $0
+  StrCmp $0 "cancel" abortinstall
+  StrCmp $0 "success" 0 gtkinstallfailed
+; Run the installer
+  ExecWait '"$TEMP\gtksetup.exe"' $0
+  Delete "$TEMP\gtksetup.exe"
+; The GTK+ installer is a NSIS installer as well. Errorlevel 1 means canceled by the user.
+  IntCmp $0 1 abortinstall
+  IntCmp $0 0 0 gtkinstallfailed gtkinstallfailed
+; Check again if GTK+ is installed
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkverok
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkverok
+gtkinstallfailed:
+  MessageBox MB_OK|MB_ICONSTOP "GTK+ installation failed."
+abortinstall:
+  Abort
+gtkverok:
+; Check if libxml is present
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "DllPath"
+  StrCmp $0 "" 0 gtkdllpathok
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "DllPath"
+  StrCmp $0 "" 0 gtkdllpathok
+  MessageBox MB_OK|MB_ICONSTOP "Invalid GTK+ installation (cannot locate GTK+ DLL path)."
+  Abort
+gtkdllpathok:
+  IfFileExists "$0\libxml2.dll" libxmlfound 0
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Incomplete GTK+ installation: libxml2.dll not found. If you proceed, libxml2-2.6.27.zip will be downloaded and unpacked automatically.' IDOK 0 IDCANCEL abortinstall
+; Connect to the Internet
+  ClearErrors
+  Dialer::AttemptConnect
+  IfErrors gtkinstallfailed
+  Pop $1
+  StrCmp $1 "online" 0 gtkinstallfailed
+; Fetch and extract ZIP
+  NSISdl::download_quiet "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-2.6.27.zip" "$TEMP\libxml2-2.6.27.zip"
+  Pop $1
+  StrCmp $1 "cancel" abortinstall
+  StrCmp $1 "success" 0 gtkinstallfailed
+  nsisunz::UnzipToStack /noextractpath /file "bin/libxml2.dll" "$TEMP\libxml2-2.6.27.zip" $0
+  Pop $1
+  Delete "$TEMP\libxml2-2.6.27.zip"
+  StrCmp $1 "success" 0 gtkinstallfailed
+libxmlfound:
+; Check if libglade is present
+  IfFileExists "$0\libglade-2.0-0.dll" libgladefound 0
+; Check GTK+ version to get a matching libglade
+  ReadRegStr $1 HKLM "Software\GTK\2.0" "Version"
+  StrCmp $1 "" 0 gtkverfound2
+  ReadRegStr $1 HKCU "Software\GTK\2.0" "Version"
+  StrCmp $1 "" 0 gtkverfound2
+  MessageBox MB_OK|MB_ICONSTOP "Invalid GTK+ installation (cannot check version)."
+  Abort
+gtkverfound2:
+  Push "2.8.0"
+  Push $1
+  Call CompareVersions
+  Pop $1
+  IntCmp $1 1 gtkis28
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Incomplete GTK+ installation: libglade-2.0-0.dll not found. If you proceed, libglade-2.4.0-bin.zip will be downloaded and unpacked automatically.' IDOK 0 IDCANCEL abortinstall
+  StrCpy $2 "http://kent.dl.sourceforge.net/gladewin32/libglade-2.4.0-bin.zip"
+  Goto gtkis26
+gtkis28:
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Incomplete GTK+ installation: libglade-2.0-0.dll not found. If you proceed, libglade-2.6.0.zip will be downloaded and unpacked automatically.' IDOK 0 IDCANCEL abortinstall
+  StrCpy $2 "http://ftp.gnome.org/pub/gnome/binaries/win32/libglade/2.6/libglade-2.6.0.zip"
+gtkis26:
+; Connect to the Internet
+  ClearErrors
+  Dialer::AttemptConnect
+  IfErrors gtkinstallfailed
+  Pop $1
+  StrCmp $1 "online" 0 gtkinstallfailed
+; Fetch and extract ZIP
+  NSISdl::download_quiet $2 "$TEMP\libglade-bin.zip"
+  Pop $1
+  StrCmp $1 "cancel" abortinstall
+  StrCmp $1 "success" 0 gtkinstallfailed
+  nsisunz::UnzipToStack /noextractpath /file "bin/libglade-2.0-0.dll" "$TEMP\libglade-bin.zip" $0
+  Pop $1
+  Delete "$TEMP\libglade-bin.zip"
+  StrCmp $1 "success" 0 gtkinstallfailed
+libgladefound:
+; If $INSTDIR points to a Bin\ directory, fix it to point to the root of the tree.
+  StrLen $0 $INSTDIR
+  IntCmp $0 4 notbin notbin
+  IntOp $0 $0 - 4
+  StrCpy $1 $INSTDIR "" $0
+  StrCmp $1 "\bin" 0 notbin
+  StrCpy $INSTDIR $INSTDIR $0
+notbin:
+FunctionEnd
+
+Section "MainSection" SEC01
+; Delete obsolete files
+  Delete "$INSTDIR\share\tiemu\skins\emuti92plus.skn"
+  Delete "$INSTDIR\share\tiemu\skins\emuti89.skn"
+  Delete "$INSTDIR\share\tiemu\glade\comm-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\comm-2.glade"
+  Delete "$INSTDIR\include\tilp\update.h"
+  Delete "$INSTDIR\include\tilp\tnode.h"
+  Delete "$INSTDIR\include\tilp\tikeys.h"
+  Delete "$INSTDIR\include\tilp\ticalcs.h"
+  Delete "$INSTDIR\include\tilp\pause.h"
+  Delete "$INSTDIR\include\tilp\keys92p.h"
+  Delete "$INSTDIR\include\tilp\keys89.h"
+  Delete "$INSTDIR\include\tilp\keys83p.h"
+  Delete "$INSTDIR\include\tilp\keys73.h"
+  Delete "$INSTDIR\include\tilp\headers.h"
+  Delete "$INSTDIR\include\tilp\calc_ver.h"
+  Delete "$INSTDIR\include\tilp\calc_int.h"
+  Delete "$INSTDIR\include\tilp\calc_err.h"
+  Delete "$INSTDIR\include\tilp\calc_def.h"
+  Delete "$INSTDIR\include\tilp\typesxx.h"
+  Delete "$INSTDIR\include\tilp\typesv2.h"
+  Delete "$INSTDIR\include\tilp\types92p.h"
+  Delete "$INSTDIR\include\tilp\types92.h"
+  Delete "$INSTDIR\include\tilp\types89.h"
+  Delete "$INSTDIR\include\tilp\types86.h"
+  Delete "$INSTDIR\include\tilp\types85.h"
+  Delete "$INSTDIR\include\tilp\types83p.h"
+  Delete "$INSTDIR\include\tilp\types83.h"
+  Delete "$INSTDIR\include\tilp\types82.h"
+  Delete "$INSTDIR\include\tilp\types73.h"
+  Delete "$INSTDIR\include\tilp\tifiles.h"
+  Delete "$INSTDIR\include\tilp\stdints.h"
+  Delete "$INSTDIR\include\tilp\macros.h"
+  Delete "$INSTDIR\include\tilp\grp_ops.h"
+  Delete "$INSTDIR\include\tilp\filesxx.h"
+  Delete "$INSTDIR\include\tilp\files9x.h"
+  Delete "$INSTDIR\include\tilp\files8x.h"
+  Delete "$INSTDIR\include\tilp\file_ver.h"
+  Delete "$INSTDIR\include\tilp\file_int.h"
+  Delete "$INSTDIR\include\tilp\file_err.h"
+  Delete "$INSTDIR\include\tilp\file_def.h"
+  Delete "$INSTDIR\include\tilp\timeout.h"
+  Delete "$INSTDIR\include\tilp\ticables.h"
+  Delete "$INSTDIR\include\tilp\export.h"
+  Delete "$INSTDIR\include\tilp\cabl_ver.h"
+  Delete "$INSTDIR\include\tilp\cabl_int.h"
+  Delete "$INSTDIR\include\tilp\cabl_err.h"
+  Delete "$INSTDIR\include\tilp\cabl_def.h"
+  RMDir "$INSTDIR\include\tilp"
+  Delete "$INSTDIR\bin\libticalcs-4.dll"
+  Delete "$INSTDIR\bin\libtifiles-0.dll"
+  Delete "$INSTDIR\bin\libticables-3.dll"
+  Delete "$INSTDIR\lib\libticalcs.la"
+  Delete "$INSTDIR\lib\libticalcs.dll.a"
+  Delete "$INSTDIR\lib\libtifiles.la"
+  Delete "$INSTDIR\lib\libtifiles.dll.a"
+  Delete "$INSTDIR\lib\pkgconfig\ticalcs.pc"
+  Delete "$INSTDIR\lib\pkgconfig\tifiles.pc"
+  Delete "$INSTDIR\lib\pkgconfig\ticables.pc"
+  Delete "$INSTDIR\lib\libticables.la"
+  Delete "$INSTDIR\lib\libticables.dll.a"
+  Delete "$INSTDIR\bin\libticables2-0.dll"
+  Delete "$INSTDIR\bin\libticalcs2-0.dll"
+  Delete "$INSTDIR\bin\libticalcs2-1.dll"
+  Delete "$INSTDIR\bin\libticalcs2-2.dll"
+  Delete "$INSTDIR\bin\libticalcs2-6.dll"
+  Delete "$INSTDIR\bin\libticonv-0.dll"
+  Delete "$INSTDIR\bin\libticonv-1.dll"
+  Delete "$INSTDIR\bin\libticonv-2.dll"
+  Delete "$INSTDIR\bin\libtifiles2-0.dll"
+  Delete "$INSTDIR\bin\libtifiles2-1.dll"
+  Delete "$INSTDIR\bin\libtifiles2-2.dll"
+  Delete "$INSTDIR\bin\libtifiles2-3.dll"
+  Delete "$INSTDIR\bin\libtifiles2-4.dll"
+  Delete "$INSTDIR\include\tilp2\stdints.h"
+  Delete "$INSTDIR\include\tilp2\macros.h"
+  Delete "$INSTDIR\include\tilp2\tnode.h"
+  Delete "$INSTDIR\man\man1\tiemu.1"
+  RMDir "$INSTDIR\man\man1"
+  Delete "$INSTDIR\share\tiemu\glade\about-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\calc-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\device-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_bkpts-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_cause-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_code-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_data-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_entry-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_heap-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_ioports-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_mem-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_pclog-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_regs-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_stack-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_vectors-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dboxes-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\infos-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\manpage-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\pbars-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\popup-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\quicksend-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\release-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\romversion-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\scroptions-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\wizard-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\about-2.glade"
+  Delete "$INSTDIR\share\tiemu\pixmaps\bkpt_tmp.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\run.xpm"
+
+; Install files
+  SetOutPath "$INSTDIR\lib"
+  File "../../../../.wine/c/tiemu/lib\libticables2.dll.a"
+  File "../../../../.wine/c/tiemu/lib\libticables2.la"
+  SetOutPath "$INSTDIR\lib\pkgconfig"
+  File "../../../../.wine/c/tiemu/lib\pkgconfig\ticables2.pc"
+  File "../../../../.wine/c/tiemu/lib\pkgconfig\tifiles2.pc"
+  File "../../../../.wine/c/tiemu/lib\pkgconfig\ticalcs2.pc"
+  File "../../../../.wine/c/tiemu/lib\pkgconfig\ticonv.pc"
+  SetOutPath "$INSTDIR\lib"
+  File "../../../../.wine/c/tiemu/lib\libtifiles2.dll.a"
+  File "../../../../.wine/c/tiemu/lib\libtifiles2.la"
+  File "../../../../.wine/c/tiemu/lib\libticalcs2.dll.a"
+  File "../../../../.wine/c/tiemu/lib\libticalcs2.la"
+  File "../../../../.wine/c/tiemu/lib\libticonv.dll.a"
+  File "../../../../.wine/c/tiemu/lib\libticonv.la"
+  SetOutPath "$INSTDIR\lib\dde1.2"
+  File "../../../../.wine/c/tiemu/lib\dde1.2\tcldde12.dll"
+  File "../../../../.wine/c/tiemu/lib\dde1.2\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib\reg1.1"
+  File "../../../../.wine/c/tiemu/lib\reg1.1\tclreg11.dll"
+  File "../../../../.wine/c/tiemu/lib\reg1.1\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "../../../../.wine/c/tiemu/lib\tclConfig.sh"
+  File "../../../../.wine/c/tiemu/lib\libtcl84.a"
+  File "../../../../.wine/c/tiemu/lib\libtclstub84.a"
+  SetOutPath "$INSTDIR\lib\tk8.4"
+  File "../../../../.wine/c/tiemu/lib\tk8.4\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "../../../../.wine/c/tiemu/lib\tkConfig.sh"
+  File "../../../../.wine/c/tiemu/lib\libtk84.a"
+  File "../../../../.wine/c/tiemu/lib\libtkstub84.a"
+  SetOutPath "$INSTDIR\lib\itcl3.2"
+  File "../../../../.wine/c/tiemu/lib\itcl3.2\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "../../../../.wine/c/tiemu/lib\libitclstub32.a"
+  SetOutPath "$INSTDIR\lib\itk3.2"
+  File "../../../../.wine/c/tiemu/lib\itk3.2\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "../../../../.wine/c/tiemu/lib\libitkstub32.a"
+  SetOutPath "$INSTDIR\bin"
+  File "../../../../.wine/c/tiemu/bin\libticables2-1.dll"
+  File "../../../../.wine/c/tiemu/bin\libtifiles2-5.dll"
+  File "../../../../.wine/c/tiemu/bin\libticalcs2-7.dll"
+  File "../../../../.wine/c/tiemu/bin\libticonv-3.dll"
+  File "../../../../.wine/c/tiemu/bin\libusb0.dll"
+  File "../../../../.wine/c/tiemu/bin\tiemu.exe"
+  File "../../../../.wine/c/tiemu/bin\tiemu.tlb"
+  File "../../../../.wine/c/tiemu/bin\tiemups.dll"
+  File "../../../../.wine/c/tiemu/bin\tcl84.dll"
+  File "../../../../.wine/c/tiemu/bin\tclsh84.exe"
+  File "../../../../.wine/c/tiemu/bin\tclpip84.dll"
+  File "../../../../.wine/c/tiemu/bin\tk84.dll"
+  File "../../../../.wine/c/tiemu/bin\wish84.exe"
+  File "../../../../.wine/c/tiemu/bin\itcl32.dll"
+  File "../../../../.wine/c/tiemu/bin\itk32.dll"
+  SetOutPath "$INSTDIR\include\tilp2"
+  File "../../../../.wine/c/tiemu/include\tilp2\export1.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\export2.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\export3.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\export4.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\ticables.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\timeout.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\files8x.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\files9x.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\stdints1.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\stdints2.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\stdints3.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\stdints4.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\tifiles.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types73.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types82.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types83.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types83p.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types84p.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types85.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types86.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types89.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types89t.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types92.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\types92p.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\typesv2.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\typesnsp.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\typesxx.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\keys73.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\keys83p.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\keys89.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\keys92p.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\ticalcs.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\charset.h"
+  File "../../../../.wine/c/tiemu/include\tilp2\ticonv.h"
+  SetOutPath "$INSTDIR\include"
+  File "../../../../.wine/c/tiemu/include\tcl.h"
+  File "../../../../.wine/c/tiemu/include\tclDecls.h"
+  File "../../../../.wine/c/tiemu/include\tclPlatDecls.h"
+  SetOutPath "$INSTDIR\include\X11"
+  File "../../../../.wine/c/tiemu/include\X11\X.h"
+  File "../../../../.wine/c/tiemu/include\X11\Xatom.h"
+  File "../../../../.wine/c/tiemu/include\X11\Xfuncproto.h"
+  File "../../../../.wine/c/tiemu/include\X11\Xlib.h"
+  File "../../../../.wine/c/tiemu/include\X11\Xutil.h"
+  File "../../../../.wine/c/tiemu/include\X11\cursorfont.h"
+  File "../../../../.wine/c/tiemu/include\X11\keysym.h"
+  File "../../../../.wine/c/tiemu/include\X11\keysymdef.h"
+  SetOutPath "$INSTDIR\include"
+  File "../../../../.wine/c/tiemu/include\tk.h"
+  File "../../../../.wine/c/tiemu/include\tkPlatDecls.h"
+  File "../../../../.wine/c/tiemu/include\tkIntXlibDecls.h"
+  File "../../../../.wine/c/tiemu/include\tkDecls.h"
+  File "../../../../.wine/c/tiemu/include\itcl.h"
+  File "../../../../.wine/c/tiemu/include\itclDecls.h"
+  File "../../../../.wine/c/tiemu/include\itclInt.h"
+  File "../../../../.wine/c/tiemu/include\itclIntDecls.h"
+  File "../../../../.wine/c/tiemu/include\itk.h"
+  File "../../../../.wine/c/tiemu/include\itkDecls.h"
+  SetOutPath "$INSTDIR\share\tiemu\glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\calc-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\device-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_bits-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_bkpts-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_cause-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_code-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_data-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_dock-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_entry-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_heap-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_ioports-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_mem-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_pclog-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_regs-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_stack-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dbg_vectors-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\dboxes-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\infos-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\log_link-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\manpage-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\pbars-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\popup-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\quicksend-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\release-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\romversion-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\scroptions-2.glade"
+  File "../../../../.wine/c/tiemu/share\tiemu\glade\wizard-2.glade"
+  SetOutPath "$INSTDIR\share\tiemu\help"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\FAQ.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\Manual_en.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter01.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter02.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter03.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter04.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter05.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter06.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter07.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter08.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter09.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter10.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter11.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter20.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter21.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\chapter22.html"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\calc_infos.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_bkpts.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_heap.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_mem.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_registers.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_search.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_source.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_sr.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\dbg_stack.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\linkport.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\log_link.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\logo_lpg.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\logo_tiemu.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\no_skin.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\popup_menu.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\romversion.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\screenshot.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\wizard.png"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\skinedit.jpg"
+  File "../../../../.wine/c/tiemu/share\tiemu\help\tiemu.jpg"
+  SetOutPath "$INSTDIR\share\tiemu\pedrom"
+  File "../../../../.wine/c/tiemu/share\tiemu\pedrom\pedrom89.tib"
+  File "../../../../.wine/c/tiemu/share\tiemu\pedrom\pedrom89ti.tib"
+  File "../../../../.wine/c/tiemu/share\tiemu\pedrom\pedrom9x.tib"
+  File "../../../../.wine/c/tiemu/share\tiemu\pedrom\pedromv2.tib"
+  File "../../../../.wine/c/tiemu/share\tiemu\pedrom\pedrom.txt"
+  SetOutPath "$INSTDIR\share\tiemu\misc"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_ti89_hw1.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_ti89_hw2.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_ti89t_hw3.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_ti89t_hw4.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_ti92_hw1.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_ti92p_hw1.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_ti92p_hw2.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\iodefs_v200_hw2.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_ti89_hw1.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_ti89_hw2.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_ti89t_hw3.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_ti89t_hw4.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_ti92_hw1.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_ti92p_hw1.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_ti92p_hw2.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\memmap_v200_hw2.txt"
+  File "../../../../.wine/c/tiemu/share\tiemu\misc\romcalls.txt"
+  SetOutPath "$INSTDIR\share\tiemu\pixmaps"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\bkpt.xpm"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\icon.xpm"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\logo.xpm"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\romdump.ico"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\romdump.xpm"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\run_1.xpm"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\run_2.xpm"
+  File "../../../../.wine/c/tiemu/share\tiemu\pixmaps\void.xpm"
+  SetOutPath "$INSTDIR\share\tiemu\skins"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ipaq_89.skn"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ipaq_92.skn"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ipaq_v200plt.skn"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ti89.skn"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ti89t.skn"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ti92.skn"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\v200plt.skn"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ti89.map"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ti89_fr.map"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ti92.map"
+  File "../../../../.wine/c/tiemu/share\tiemu\skins\ti92_fr.map"
+  SetOutPath "$INSTDIR\share\tiemu"
+  File "../../../../.wine/c/tiemu/share\tiemu\COPYING"
+  File "../../../../.wine/c/tiemu/share\tiemu\RELEASE"
+  File "../../../../.wine/c/tiemu/share\tiemu\AUTHORS"
+  File "../../../../.wine/c/tiemu/share\tiemu\LICENSES"
+  File "../../../../.wine/c/tiemu/share\tiemu\Manpage.txt"
+  File "Readme.txt"
+  SetOutPath "$INSTDIR\share\tcl8.4\http1.0"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\http1.0\http.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\http1.0\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\http2.4"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\http2.4\http.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\http2.4\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\opt0.4"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\opt0.4\optparse.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\opt0.4\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\encoding"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\ascii.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\big5.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1250.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1251.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1252.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1253.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1254.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1255.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1256.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1257.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp1258.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp437.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp737.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp775.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp850.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp852.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp855.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp857.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp860.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp861.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp862.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp863.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp864.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp865.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp866.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp869.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp874.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp932.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp936.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp949.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\cp950.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\dingbats.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\ebcdic.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\euc-cn.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\euc-jp.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\euc-kr.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\gb12345.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\gb1988.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\gb2312.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso2022-jp.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso2022-kr.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso2022.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-1.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-10.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-13.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-14.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-15.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-16.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-2.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-3.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-4.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-5.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-6.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-7.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-8.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\iso8859-9.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\jis0201.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\jis0208.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\jis0212.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\koi8-r.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\koi8-u.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\ksc5601.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macCentEuro.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macCroatian.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macCyrillic.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macDingbats.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macGreek.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macIceland.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macJapan.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macRoman.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macRomania.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macThai.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macTurkish.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\macUkraine.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\shiftjis.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\symbol.enc"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\encoding\tis-620.enc"
+  SetOutPath "$INSTDIR\share\tcl8.4\msgcat1.3"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\msgcat1.3\msgcat.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\msgcat1.3\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\tcltest2.2"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\tcltest2.2\pkgIndex.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\tcltest2.2\tcltest.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\auto.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\history.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\init.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\ldAout.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\package.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\parray.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\safe.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\word.tcl"
+  File "../../../../.wine/c/tiemu/share\tcl8.4\tclIndex"
+  SetOutPath "$INSTDIR\share\tk8.4\images"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\README"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\logo.eps"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\logo100.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\logo64.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\logoLarge.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\logoMed.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\pwrdLogo.eps"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\pwrdLogo100.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\pwrdLogo150.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\pwrdLogo175.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\pwrdLogo200.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\pwrdLogo75.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\images\tai-ku.gif"
+  SetOutPath "$INSTDIR\share\tk8.4\msgs"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\cs.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\de.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\el.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\en.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\en_gb.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\es.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\fr.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\it.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\nl.msg"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgs\ru.msg"
+  SetOutPath "$INSTDIR\share\tk8.4"
+  File "../../../../.wine/c/tiemu/share\tk8.4\bgerror.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\button.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\choosedir.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\clrpick.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\comdlg.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\console.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\dialog.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\entry.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\focus.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\listbox.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\menu.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\mkpsenc.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\msgbox.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\obsolete.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\optMenu.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\palette.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\panedwindow.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\safetk.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\scale.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\scrlbar.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\spinbox.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\tearoff.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\text.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\tk.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\tkfbox.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\unsupported.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\xmfbox.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\prolog.ps"
+  File "../../../../.wine/c/tiemu/share\tk8.4\tclIndex"
+  File "../../../../.wine/c/tiemu/share\tk8.4\tkAppInit.c"
+  SetOutPath "$INSTDIR\share\tk8.4\demos\images"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\earth.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\earthris.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\face.bmp"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\flagdown.bmp"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\flagup.bmp"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\gray25.bmp"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\letters.bmp"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\noletter.bmp"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\pattern.bmp"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\tcllogo.gif"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\images\teapot.ppm"
+  SetOutPath "$INSTDIR\share\tk8.4\demos"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\README"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\arrow.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\bind.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\bitmap.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\browse"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\button.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\check.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\clrpick.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\colors.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\cscroll.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\ctext.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\dialog1.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\dialog2.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\entry1.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\entry2.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\entry3.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\filebox.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\floor.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\form.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\hello"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\hscale.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\icon.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\image1.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\image2.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\items.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\ixset"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\label.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\labelframe.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\license.terms"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\menu.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\menubu.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\msgbox.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\paned1.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\paned2.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\plot.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\puzzle.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\radio.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\rmt"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\rolodex"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\ruler.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\sayings.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\search.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\spin.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\square"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\states.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\style.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\tclIndex"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\tcolor"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\text.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\timer"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\twind.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\vscale.tcl"
+  File "../../../../.wine/c/tiemu/share\tk8.4\demos\widget"
+  SetOutPath "$INSTDIR\share\itcl3.2"
+  File "../../../../.wine/c/tiemu/share\itcl3.2\itcl.tcl"
+  SetOutPath "$INSTDIR\share\itk3.2"
+  File "../../../../.wine/c/tiemu/share\itk3.2\Archetype.itk"
+  File "../../../../.wine/c/tiemu/share\itk3.2\Toplevel.itk"
+  File "../../../../.wine/c/tiemu/share\itk3.2\Widget.itk"
+  File "../../../../.wine/c/tiemu/share\itk3.2\itk.tcl"
+  File "../../../../.wine/c/tiemu/share\itk3.2\tclIndex"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\scripts"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\buttonbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\calendar.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\canvasprintbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\canvasprintdialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\checkbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\combobox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\dateentry.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\datefield.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\dialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\dialogshell.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\disjointlistbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\entryfield.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\extbutton.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\extfileselectionbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\extfileselectiondialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\feedback.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\fileselectionbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\fileselectiondialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\finddialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\hierarchy.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\hyperhelp.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\labeledframe.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\labeledwidget.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\mainwindow.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\menubar.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\messagebox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\messagedialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\notebook.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\optionmenu.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\pane.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\panedwindow.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\promptdialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\pushbutton.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\radiobox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\regexpfield.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\scrolledcanvas.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\scrolledframe.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\scrolledhtml.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\scrolledlistbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\scrolledtext.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\scrolledwidget.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\selectionbox.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\selectiondialog.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\shell.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\spindate.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\spinint.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\spinner.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\spintime.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\tabnotebook.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\tabset.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\timeentry.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\timefield.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\toolbar.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\watch.itk"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\colors.itcl"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\roman.itcl"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\scopedobject.itcl"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\tclIndex"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\scripts\unknownimage.gif"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\iwidgets.tcl"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\pkgIndex.tcl"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\license.terms"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\demos\images"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\box.xbm"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\clear.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\close.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\copy.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\cut.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\exit.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\find.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\help.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\line.xbm"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\mag.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\new.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\open.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\oval.xbm"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\paste.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\points.xbm"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\poly.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\print.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\ruler.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\save.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\select.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\images\text.xbm"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\demos\html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\buttonbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\calendar.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\canvasprintbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\canvasprintdialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\checkbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\combobox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\dateentry.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\datefield.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\dialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\dialogshell.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\disjointlistbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\entryfield.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\extbutton.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\extfileselectionbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\extfileselectiondialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\feedback.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\fileselectionbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\fileselectiondialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\finddialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\hierarchy.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\hyperhelp.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\iwidgets4.0.0UserCmds.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\labeledframe.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\labeledwidget.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\mainwindow.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\menubar.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\messagebox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\messagedialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\notebook.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\optionmenu.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\panedwindow.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\promptdialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\pushbutton.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\radiobox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\scopedobject.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\scrolledcanvas.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\scrolledframe.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\scrolledhtml.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\scrolledlistbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\scrolledtext.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\selectionbox.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\selectiondialog.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\shell.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\spindate.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\spinint.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\spinner.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\spintime.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\tabnotebook.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\tabset.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\timeentry.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\timefield.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\toolbar.n.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\html\watch.n.html"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\demos"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\buttonbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\calendar"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\canvasprintbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\canvasprintdialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\catalog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\checkbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\combobox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\dateentry"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\datefield"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\demo.html"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\dialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\dialogshell"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\disjointlistbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\entryfield"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\extbutton"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\extfileselectionbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\extfileselectiondialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\feedback"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\fileselectionbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\fileselectiondialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\finddialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\hierarchy"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\hyperhelp"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\iwidgets.gif"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\labeledframe"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\labeledwidget"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\mainwindow"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\menubar"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\messagebox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\messagedialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\notebook"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\optionmenu"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\panedwindow"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\promptdialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\pushbutton"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\radiobox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\scopedobject"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\scrolledcanvas"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\scrolledframe"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\scrolledhtml"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\scrolledlistbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\scrolledtext"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\selectionbox"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\selectiondialog"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\shell"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\spindate"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\spinint"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\spinner"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\spintime"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\tabnotebook"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\tabset"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\timeentry"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\timefield"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\toolbar"
+  File "../../../../.wine/c/tiemu/share\iwidgets4.0.1\demos\watch"
+  SetOutPath "$INSTDIR\share\redhat\gui"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\tclIndex"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\pkgIndex.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\advice.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\balloon.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\bbox.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\bgerror.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\bindings.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\canvas.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\cframe.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\center.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\debug.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\def.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\internet.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\font.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\gensym.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\gettext.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\hooks.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\lframe.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\list.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\looknfeel.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\menu.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\mono.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\multibox.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\parse_args.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\path.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\postghost.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\prefs.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\print.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\sendpr.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\topbind.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\toolbar.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\ulset.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\wframe.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\wingrab.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\ventry.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\combobox.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\pane.tcl"
+  File "../../../../.wine/c/tiemu/share\redhat\gui\panedwindow.tcl"
+  SetOutPath "$INSTDIR\share\insight1.0\images"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\Movie_off.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\Movie_on.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\bottom.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\bp.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\check.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\console.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\continue.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\down.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\edit.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\finish.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\gdbtk_icon.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\help.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\home.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\insight.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\less.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\memory.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\more.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\next.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\next_check.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\next_frame.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\next_hit.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\next_line.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\nexti.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\open.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\prev_hit.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\reg.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\rewind.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\run.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\run_expt.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\src.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\stack.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\step.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\stepi.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\stop.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\tdump.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\tp.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\up.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\vars.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\watch.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\watch_movie.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images\icons.txt"
+  SetOutPath "$INSTDIR\share\insight1.0\images2"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\Movie_off.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\Movie_on.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\bottom.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\bp.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\check.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\console.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\continue.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\down.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\edit.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\finish.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\function.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\gdbtk_icon.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\help.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\home.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\insight.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\less.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\memory.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\more.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\next.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\next_check.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\next_frame.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\next_hit.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\next_line.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\nexti.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\open.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\prev_hit.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\reg.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\rewind.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\run.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\run_expt.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\src.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\stack.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\step.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\stepi.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\stop.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\target.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\tdump.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\tp.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\up.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\vars.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\watch.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\watch_movie.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\images2\icons.txt"
+  SetOutPath "$INSTDIR\share\insight1.0\help\images"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\frame_info.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\mem_menu.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\mem_popup.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\mem_pref.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_bal.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_bp_bal.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_bpop.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_menu.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_pop.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_stat.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_thread.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\src_toolbar.gif"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\browser1.png"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\browser2.png"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\insightbwr.png"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\reg.png"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\reg_menu.png"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\images\watch.png"
+  SetOutPath "$INSTDIR\share\insight1.0\help\trace"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\console.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\gbl_pref.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\help.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\license.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\locals.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\memory.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\reg_pref.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\register.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\source.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\src_pref.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\stack.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\target.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\tdump.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\tp.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\tracedlg.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\watch.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\trace\index.toc"
+  SetOutPath "$INSTDIR\share\insight1.0\help"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\breakpoint.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\browser.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\console.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\debug.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\gbl_pref.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\help.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\index.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\license.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\locals.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\memory.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\register.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\session.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\source.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\src_pref.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\stack.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\target.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\thread.html"
+  File "../../../../.wine/c/tiemu/share\insight1.0\help\watch.html"
+  SetOutPath "$INSTDIR\share\insight1.0"
+  File "../../../../.wine/c/tiemu/share\insight1.0\about.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\actiondlg.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\editor.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\helpviewer.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\interface.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\ipc.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\locals.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\main.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\modal.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\prefs.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\session.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\tdump.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\tfind_args.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\tracedlg.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\tty.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\util.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\warning.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\watch.tcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\gdbmenubar.itcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\gdbtoolbar.itcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\pluginwin.itcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\srcbar.itcl"
+  File "../../../../.wine/c/tiemu/share\insight1.0\attachdlg.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\blockframe.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\bpwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\browserwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\console.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\cspref.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\debugwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\download.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\ehandler.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\embeddedwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\gdbevent.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\gdbwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\globalpref.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\ipcpref.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\kod.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\managedwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\mempref.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\memwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\process.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\regwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\srcpref.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\srctextwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\srcwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\stackwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\targetselection.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\toplevelwin.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\vartree.ith"
+  File "../../../../.wine/c/tiemu/share\insight1.0\attachdlg.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\blockframe.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\bpwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\browserwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\console.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\cspref.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\debugwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\download.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\ehandler.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\gdbevent.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\globalpref.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\ipcpref.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\kod.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\managedwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\mempref.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\memwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\process.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\regwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\srcpref.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\srctextwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\srcwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\stackwin.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\targetselection.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\vartree.itb"
+  File "../../../../.wine/c/tiemu/share\insight1.0\tclIndex"
+  SetOutPath "$INSTDIR\share\man\man1"
+  File "../../../../.wine/c/tiemu/share\man\man1\tiemu.1"
+  SetOutPath "$INSTDIR\man\mann"
+  File "../../../../.wine/c/tiemu/man\mann\body.n"
+  File "../../../../.wine/c/tiemu/man\mann\class.n"
+  File "../../../../.wine/c/tiemu/man\mann\code.n"
+  File "../../../../.wine/c/tiemu/man\mann\configbody.n"
+  File "../../../../.wine/c/tiemu/man\mann\delete.n"
+  File "../../../../.wine/c/tiemu/man\mann\ensemble.n"
+  File "../../../../.wine/c/tiemu/man\mann\find.n"
+  File "../../../../.wine/c/tiemu/man\mann\itcl.n"
+  File "../../../../.wine/c/tiemu/man\mann\itcl_class.n"
+  File "../../../../.wine/c/tiemu/man\mann\itcl_info.n"
+  File "../../../../.wine/c/tiemu/man\mann\itclvars.n"
+  File "../../../../.wine/c/tiemu/man\mann\local.n"
+  File "../../../../.wine/c/tiemu/man\mann\scope.n"
+  File "../../../../.wine/c/tiemu/man\mann\Archetype.n"
+  File "../../../../.wine/c/tiemu/man\mann\Toplevel.n"
+  File "../../../../.wine/c/tiemu/man\mann\Widget.n"
+  File "../../../../.wine/c/tiemu/man\mann\itk.n"
+  File "../../../../.wine/c/tiemu/man\mann\itkvars.n"
+  File "../../../../.wine/c/tiemu/man\mann\usual.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_buttonbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_calendar.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_canvasprintbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_canvasprintdialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_checkbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_combobox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_dateentry.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_datefield.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_dialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_dialogshell.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_disjointlistbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_entryfield.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_extbutton.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_extfileselectionbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_extfileselectiondialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_feedback.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_fileselectionbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_fileselectiondialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_finddialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_hierarchy.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_hyperhelp.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_labeledframe.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_labeledwidget.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_mainwindow.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_menubar.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_messagebox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_messagedialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_notebook.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_optionmenu.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_panedwindow.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_promptdialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_pushbutton.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_radiobox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_scopedobject.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_scrolledcanvas.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_scrolledframe.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_scrolledhtml.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_scrolledlistbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_scrolledtext.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_selectionbox.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_selectiondialog.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_shell.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_spindate.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_spinint.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_spinner.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_spintime.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_tabnotebook.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_tabset.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_timeentry.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_timefield.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_toolbar.n"
+  File "../../../../.wine/c/tiemu/man\mann\iwidgets_watch.n"
+
+; OLE Registration
+  ExecWait '"$INSTDIR\bin\tiemu.exe" /RegServer'
+  RegDLL "$INSTDIR\bin\tiemups.dll"
+
+; Shortcuts
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\TiEmu.lnk" "$INSTDIR\bin\tiemu.exe"
+  CreateShortCut "$DESKTOP\TiEmu.lnk" "$INSTDIR\bin\tiemu.exe"
+  !insertmacro MUI_STARTMENU_WRITE_END
+
+; File associations
+  WriteRegStr HKCR ".sav" "" "TiEmu.Sav"
+  WriteRegStr HKCR "TiEmu.Sav" "" "TiEmu state"
+  WriteRegStr HKCR "TiEmu.Sav\DefaultIcon" "" "$INSTDIR\bin\tiemu.exe,0"
+  WriteRegStr HKCR "TiEmu.Sav\shell\open" "" "Open with &TiEmu"
+  WriteRegStr HKCR "TiEmu.Sav\shell\open\command" "" '"$INSTDIR\bin\tiemu.exe" "%1"'
+
+  WriteRegStr HKCR ".rom" "" "TiEmu.Rom"
+  WriteRegStr HKCR "TiEmu.Rom" "" "Rom Dump"
+  WriteRegStr HKCR "TiEmu.Rom\DefaultIcon" "" "$INSTDIR\share\tiemu\pixmaps\romdump.ico"
+  WriteRegStr HKCR "TiEmu.Rom\shell\open" "" "Open with &TiEmu"
+  WriteRegStr HKCR "TiEmu.Rom\shell\open\command" "" '"$INSTDIR\bin\tiemu.exe" "%1"'
+SectionEnd
+
+Section -AdditionalIcons
+  SetOutPath $INSTDIR
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Readme.lnk" "$INSTDIR\share\tiemu\Readme.txt"
+  !insertmacro MUI_STARTMENU_WRITE_END
+SectionEnd
+
+Section -Post
+  WriteUninstaller "$INSTDIR\uninst.exe"
+  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\tiemu.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\tiemu.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
+SectionEnd
+
+
+Function un.onUninstSuccess
+  HideWindow
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
+FunctionEnd
+
+Function un.onInit
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+  Abort
+FunctionEnd
+
+Section Uninstall
+  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
+
+; File associations
+  DeleteRegKey HKCR "TiEmu.Rom"
+  DeleteRegKey HKCR ".rom"
+  DeleteRegKey HKCR "TiEmu.Sav"
+  DeleteRegKey HKCR ".sav"
+
+; OLE Unregistration
+  UnregDLL "$INSTDIR\bin\tiemups.dll"
+  ExecWait '"$INSTDIR\bin\tiemu.exe" /UnregServer'
+
+  Delete "$INSTDIR\${PRODUCT_NAME}.url"
+  Delete "$INSTDIR\uninst.exe"
+  Delete "$INSTDIR\man\mann\iwidgets_watch.n"
+  Delete "$INSTDIR\man\mann\iwidgets_toolbar.n"
+  Delete "$INSTDIR\man\mann\iwidgets_timefield.n"
+  Delete "$INSTDIR\man\mann\iwidgets_timeentry.n"
+  Delete "$INSTDIR\man\mann\iwidgets_tabset.n"
+  Delete "$INSTDIR\man\mann\iwidgets_tabnotebook.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spintime.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spinner.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spinint.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spindate.n"
+  Delete "$INSTDIR\man\mann\iwidgets_shell.n"
+  Delete "$INSTDIR\man\mann\iwidgets_selectiondialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_selectionbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledtext.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledlistbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledhtml.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledframe.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledcanvas.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scopedobject.n"
+  Delete "$INSTDIR\man\mann\iwidgets_radiobox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_pushbutton.n"
+  Delete "$INSTDIR\man\mann\iwidgets_promptdialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_panedwindow.n"
+  Delete "$INSTDIR\man\mann\iwidgets_optionmenu.n"
+  Delete "$INSTDIR\man\mann\iwidgets_notebook.n"
+  Delete "$INSTDIR\man\mann\iwidgets_messagedialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_messagebox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_menubar.n"
+  Delete "$INSTDIR\man\mann\iwidgets_mainwindow.n"
+  Delete "$INSTDIR\man\mann\iwidgets_labeledwidget.n"
+  Delete "$INSTDIR\man\mann\iwidgets_labeledframe.n"
+  Delete "$INSTDIR\man\mann\iwidgets_hyperhelp.n"
+  Delete "$INSTDIR\man\mann\iwidgets_hierarchy.n"
+  Delete "$INSTDIR\man\mann\iwidgets_finddialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_fileselectiondialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_fileselectionbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_feedback.n"
+  Delete "$INSTDIR\man\mann\iwidgets_extfileselectiondialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_extfileselectionbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_extbutton.n"
+  Delete "$INSTDIR\man\mann\iwidgets_entryfield.n"
+  Delete "$INSTDIR\man\mann\iwidgets_disjointlistbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_dialogshell.n"
+  Delete "$INSTDIR\man\mann\iwidgets_dialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_datefield.n"
+  Delete "$INSTDIR\man\mann\iwidgets_dateentry.n"
+  Delete "$INSTDIR\man\mann\iwidgets_combobox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_checkbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_canvasprintdialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_canvasprintbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_calendar.n"
+  Delete "$INSTDIR\man\mann\iwidgets_buttonbox.n"
+  Delete "$INSTDIR\man\mann\usual.n"
+  Delete "$INSTDIR\man\mann\itkvars.n"
+  Delete "$INSTDIR\man\mann\itk.n"
+  Delete "$INSTDIR\man\mann\Widget.n"
+  Delete "$INSTDIR\man\mann\Toplevel.n"
+  Delete "$INSTDIR\man\mann\Archetype.n"
+  Delete "$INSTDIR\man\mann\scope.n"
+  Delete "$INSTDIR\man\mann\local.n"
+  Delete "$INSTDIR\man\mann\itclvars.n"
+  Delete "$INSTDIR\man\mann\itcl_info.n"
+  Delete "$INSTDIR\man\mann\itcl_class.n"
+  Delete "$INSTDIR\man\mann\itcl.n"
+  Delete "$INSTDIR\man\mann\find.n"
+  Delete "$INSTDIR\man\mann\ensemble.n"
+  Delete "$INSTDIR\man\mann\delete.n"
+  Delete "$INSTDIR\man\mann\configbody.n"
+  Delete "$INSTDIR\man\mann\code.n"
+  Delete "$INSTDIR\man\mann\class.n"
+  Delete "$INSTDIR\man\mann\body.n"
+  Delete "$INSTDIR\share\man\man1\tiemu.1"
+  Delete "$INSTDIR\share\insight1.0\tclIndex"
+  Delete "$INSTDIR\share\insight1.0\vartree.itb"
+  Delete "$INSTDIR\share\insight1.0\targetselection.itb"
+  Delete "$INSTDIR\share\insight1.0\stackwin.itb"
+  Delete "$INSTDIR\share\insight1.0\srcwin.itb"
+  Delete "$INSTDIR\share\insight1.0\srctextwin.itb"
+  Delete "$INSTDIR\share\insight1.0\srcpref.itb"
+  Delete "$INSTDIR\share\insight1.0\regwin.itb"
+  Delete "$INSTDIR\share\insight1.0\process.itb"
+  Delete "$INSTDIR\share\insight1.0\memwin.itb"
+  Delete "$INSTDIR\share\insight1.0\mempref.itb"
+  Delete "$INSTDIR\share\insight1.0\managedwin.itb"
+  Delete "$INSTDIR\share\insight1.0\kod.itb"
+  Delete "$INSTDIR\share\insight1.0\ipcpref.itb"
+  Delete "$INSTDIR\share\insight1.0\globalpref.itb"
+  Delete "$INSTDIR\share\insight1.0\gdbevent.itb"
+  Delete "$INSTDIR\share\insight1.0\ehandler.itb"
+  Delete "$INSTDIR\share\insight1.0\download.itb"
+  Delete "$INSTDIR\share\insight1.0\debugwin.itb"
+  Delete "$INSTDIR\share\insight1.0\cspref.itb"
+  Delete "$INSTDIR\share\insight1.0\console.itb"
+  Delete "$INSTDIR\share\insight1.0\browserwin.itb"
+  Delete "$INSTDIR\share\insight1.0\bpwin.itb"
+  Delete "$INSTDIR\share\insight1.0\blockframe.itb"
+  Delete "$INSTDIR\share\insight1.0\attachdlg.itb"
+  Delete "$INSTDIR\share\insight1.0\vartree.ith"
+  Delete "$INSTDIR\share\insight1.0\toplevelwin.ith"
+  Delete "$INSTDIR\share\insight1.0\targetselection.ith"
+  Delete "$INSTDIR\share\insight1.0\stackwin.ith"
+  Delete "$INSTDIR\share\insight1.0\srcwin.ith"
+  Delete "$INSTDIR\share\insight1.0\srctextwin.ith"
+  Delete "$INSTDIR\share\insight1.0\srcpref.ith"
+  Delete "$INSTDIR\share\insight1.0\regwin.ith"
+  Delete "$INSTDIR\share\insight1.0\process.ith"
+  Delete "$INSTDIR\share\insight1.0\memwin.ith"
+  Delete "$INSTDIR\share\insight1.0\mempref.ith"
+  Delete "$INSTDIR\share\insight1.0\managedwin.ith"
+  Delete "$INSTDIR\share\insight1.0\kod.ith"
+  Delete "$INSTDIR\share\insight1.0\ipcpref.ith"
+  Delete "$INSTDIR\share\insight1.0\globalpref.ith"
+  Delete "$INSTDIR\share\insight1.0\gdbwin.ith"
+  Delete "$INSTDIR\share\insight1.0\gdbevent.ith"
+  Delete "$INSTDIR\share\insight1.0\embeddedwin.ith"
+  Delete "$INSTDIR\share\insight1.0\ehandler.ith"
+  Delete "$INSTDIR\share\insight1.0\download.ith"
+  Delete "$INSTDIR\share\insight1.0\debugwin.ith"
+  Delete "$INSTDIR\share\insight1.0\cspref.ith"
+  Delete "$INSTDIR\share\insight1.0\console.ith"
+  Delete "$INSTDIR\share\insight1.0\browserwin.ith"
+  Delete "$INSTDIR\share\insight1.0\bpwin.ith"
+  Delete "$INSTDIR\share\insight1.0\blockframe.ith"
+  Delete "$INSTDIR\share\insight1.0\attachdlg.ith"
+  Delete "$INSTDIR\share\insight1.0\srcbar.itcl"
+  Delete "$INSTDIR\share\insight1.0\pluginwin.itcl"
+  Delete "$INSTDIR\share\insight1.0\gdbtoolbar.itcl"
+  Delete "$INSTDIR\share\insight1.0\gdbmenubar.itcl"
+  Delete "$INSTDIR\share\insight1.0\watch.tcl"
+  Delete "$INSTDIR\share\insight1.0\warning.tcl"
+  Delete "$INSTDIR\share\insight1.0\util.tcl"
+  Delete "$INSTDIR\share\insight1.0\tty.tcl"
+  Delete "$INSTDIR\share\insight1.0\tracedlg.tcl"
+  Delete "$INSTDIR\share\insight1.0\tfind_args.tcl"
+  Delete "$INSTDIR\share\insight1.0\tdump.tcl"
+  Delete "$INSTDIR\share\insight1.0\session.tcl"
+  Delete "$INSTDIR\share\insight1.0\prefs.tcl"
+  Delete "$INSTDIR\share\insight1.0\modal.tcl"
+  Delete "$INSTDIR\share\insight1.0\main.tcl"
+  Delete "$INSTDIR\share\insight1.0\locals.tcl"
+  Delete "$INSTDIR\share\insight1.0\ipc.tcl"
+  Delete "$INSTDIR\share\insight1.0\interface.tcl"
+  Delete "$INSTDIR\share\insight1.0\helpviewer.tcl"
+  Delete "$INSTDIR\share\insight1.0\editor.tcl"
+  Delete "$INSTDIR\share\insight1.0\actiondlg.tcl"
+  Delete "$INSTDIR\share\insight1.0\about.tcl"
+  Delete "$INSTDIR\share\insight1.0\help\watch.html"
+  Delete "$INSTDIR\share\insight1.0\help\thread.html"
+  Delete "$INSTDIR\share\insight1.0\help\target.html"
+  Delete "$INSTDIR\share\insight1.0\help\stack.html"
+  Delete "$INSTDIR\share\insight1.0\help\src_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\source.html"
+  Delete "$INSTDIR\share\insight1.0\help\session.html"
+  Delete "$INSTDIR\share\insight1.0\help\register.html"
+  Delete "$INSTDIR\share\insight1.0\help\memory.html"
+  Delete "$INSTDIR\share\insight1.0\help\locals.html"
+  Delete "$INSTDIR\share\insight1.0\help\license.html"
+  Delete "$INSTDIR\share\insight1.0\help\index.html"
+  Delete "$INSTDIR\share\insight1.0\help\help.html"
+  Delete "$INSTDIR\share\insight1.0\help\gbl_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\debug.html"
+  Delete "$INSTDIR\share\insight1.0\help\console.html"
+  Delete "$INSTDIR\share\insight1.0\help\browser.html"
+  Delete "$INSTDIR\share\insight1.0\help\breakpoint.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\index.toc"
+  Delete "$INSTDIR\share\insight1.0\help\trace\watch.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\tracedlg.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\tp.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\tdump.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\target.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\stack.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\src_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\source.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\register.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\reg_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\memory.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\locals.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\license.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\help.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\gbl_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\console.html"
+  Delete "$INSTDIR\share\insight1.0\help\images\watch.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\reg_menu.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\reg.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\insightbwr.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\browser2.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\browser1.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_toolbar.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_thread.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_stat.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_pop.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_menu.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_bpop.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_bp_bal.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_bal.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\mem_pref.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\mem_popup.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\mem_menu.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\frame_info.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\icons.txt"
+  Delete "$INSTDIR\share\insight1.0\images2\watch_movie.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\watch.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\vars.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\up.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\tp.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\tdump.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\target.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\stop.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\stepi.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\step.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\stack.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\src.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\run_expt.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\run.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\rewind.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\reg.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\prev_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\open.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\nexti.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_line.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_frame.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_check.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\more.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\memory.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\less.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\insight.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\home.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\help.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\gdbtk_icon.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\function.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\finish.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\edit.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\down.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\continue.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\console.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\check.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\bp.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\bottom.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\Movie_on.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\Movie_off.gif"
+  Delete "$INSTDIR\share\insight1.0\images\icons.txt"
+  Delete "$INSTDIR\share\insight1.0\images\watch_movie.gif"
+  Delete "$INSTDIR\share\insight1.0\images\watch.gif"
+  Delete "$INSTDIR\share\insight1.0\images\vars.gif"
+  Delete "$INSTDIR\share\insight1.0\images\up.gif"
+  Delete "$INSTDIR\share\insight1.0\images\tp.gif"
+  Delete "$INSTDIR\share\insight1.0\images\tdump.gif"
+  Delete "$INSTDIR\share\insight1.0\images\stop.gif"
+  Delete "$INSTDIR\share\insight1.0\images\stepi.gif"
+  Delete "$INSTDIR\share\insight1.0\images\step.gif"
+  Delete "$INSTDIR\share\insight1.0\images\stack.gif"
+  Delete "$INSTDIR\share\insight1.0\images\src.gif"
+  Delete "$INSTDIR\share\insight1.0\images\run_expt.gif"
+  Delete "$INSTDIR\share\insight1.0\images\run.gif"
+  Delete "$INSTDIR\share\insight1.0\images\rewind.gif"
+  Delete "$INSTDIR\share\insight1.0\images\reg.gif"
+  Delete "$INSTDIR\share\insight1.0\images\prev_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images\open.gif"
+  Delete "$INSTDIR\share\insight1.0\images\nexti.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_line.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_frame.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_check.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next.gif"
+  Delete "$INSTDIR\share\insight1.0\images\more.gif"
+  Delete "$INSTDIR\share\insight1.0\images\memory.gif"
+  Delete "$INSTDIR\share\insight1.0\images\less.gif"
+  Delete "$INSTDIR\share\insight1.0\images\insight.gif"
+  Delete "$INSTDIR\share\insight1.0\images\home.gif"
+  Delete "$INSTDIR\share\insight1.0\images\help.gif"
+  Delete "$INSTDIR\share\insight1.0\images\gdbtk_icon.gif"
+  Delete "$INSTDIR\share\insight1.0\images\finish.gif"
+  Delete "$INSTDIR\share\insight1.0\images\edit.gif"
+  Delete "$INSTDIR\share\insight1.0\images\down.gif"
+  Delete "$INSTDIR\share\insight1.0\images\continue.gif"
+  Delete "$INSTDIR\share\insight1.0\images\console.gif"
+  Delete "$INSTDIR\share\insight1.0\images\check.gif"
+  Delete "$INSTDIR\share\insight1.0\images\bp.gif"
+  Delete "$INSTDIR\share\insight1.0\images\bottom.gif"
+  Delete "$INSTDIR\share\insight1.0\images\Movie_on.gif"
+  Delete "$INSTDIR\share\insight1.0\images\Movie_off.gif"
+  Delete "$INSTDIR\share\redhat\gui\panedwindow.tcl"
+  Delete "$INSTDIR\share\redhat\gui\pane.tcl"
+  Delete "$INSTDIR\share\redhat\gui\combobox.tcl"
+  Delete "$INSTDIR\share\redhat\gui\ventry.tcl"
+  Delete "$INSTDIR\share\redhat\gui\wingrab.tcl"
+  Delete "$INSTDIR\share\redhat\gui\wframe.tcl"
+  Delete "$INSTDIR\share\redhat\gui\ulset.tcl"
+  Delete "$INSTDIR\share\redhat\gui\toolbar.tcl"
+  Delete "$INSTDIR\share\redhat\gui\topbind.tcl"
+  Delete "$INSTDIR\share\redhat\gui\sendpr.tcl"
+  Delete "$INSTDIR\share\redhat\gui\print.tcl"
+  Delete "$INSTDIR\share\redhat\gui\prefs.tcl"
+  Delete "$INSTDIR\share\redhat\gui\postghost.tcl"
+  Delete "$INSTDIR\share\redhat\gui\path.tcl"
+  Delete "$INSTDIR\share\redhat\gui\parse_args.tcl"
+  Delete "$INSTDIR\share\redhat\gui\multibox.tcl"
+  Delete "$INSTDIR\share\redhat\gui\mono.tcl"
+  Delete "$INSTDIR\share\redhat\gui\menu.tcl"
+  Delete "$INSTDIR\share\redhat\gui\looknfeel.tcl"
+  Delete "$INSTDIR\share\redhat\gui\list.tcl"
+  Delete "$INSTDIR\share\redhat\gui\lframe.tcl"
+  Delete "$INSTDIR\share\redhat\gui\hooks.tcl"
+  Delete "$INSTDIR\share\redhat\gui\gettext.tcl"
+  Delete "$INSTDIR\share\redhat\gui\gensym.tcl"
+  Delete "$INSTDIR\share\redhat\gui\font.tcl"
+  Delete "$INSTDIR\share\redhat\gui\internet.tcl"
+  Delete "$INSTDIR\share\redhat\gui\def.tcl"
+  Delete "$INSTDIR\share\redhat\gui\debug.tcl"
+  Delete "$INSTDIR\share\redhat\gui\center.tcl"
+  Delete "$INSTDIR\share\redhat\gui\cframe.tcl"
+  Delete "$INSTDIR\share\redhat\gui\canvas.tcl"
+  Delete "$INSTDIR\share\redhat\gui\bindings.tcl"
+  Delete "$INSTDIR\share\redhat\gui\bgerror.tcl"
+  Delete "$INSTDIR\share\redhat\gui\bbox.tcl"
+  Delete "$INSTDIR\share\redhat\gui\balloon.tcl"
+  Delete "$INSTDIR\share\redhat\gui\advice.tcl"
+  Delete "$INSTDIR\share\redhat\gui\pkgIndex.tcl"
+  Delete "$INSTDIR\share\redhat\gui\tclIndex"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\watch"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\toolbar"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\timefield"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\timeentry"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\tabset"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\tabnotebook"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spintime"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spinner"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spinint"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spindate"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\shell"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\selectiondialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\selectionbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledtext"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledlistbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledhtml"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledframe"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledcanvas"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scopedobject"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\radiobox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\pushbutton"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\promptdialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\panedwindow"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\optionmenu"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\notebook"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\messagedialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\messagebox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\menubar"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\mainwindow"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\labeledwidget"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\labeledframe"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\iwidgets.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\hyperhelp"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\hierarchy"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\finddialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\fileselectiondialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\fileselectionbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\feedback"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\extfileselectiondialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\extfileselectionbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\extbutton"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\entryfield"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\disjointlistbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\dialogshell"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\dialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\demo.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\datefield"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\dateentry"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\combobox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\checkbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\catalog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\canvasprintdialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\canvasprintbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\calendar"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\buttonbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\watch.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\toolbar.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\timefield.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\timeentry.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\tabset.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\tabnotebook.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spintime.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spinner.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spinint.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spindate.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\shell.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\selectiondialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\selectionbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledtext.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledlistbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledhtml.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledframe.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledcanvas.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scopedobject.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\radiobox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\pushbutton.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\promptdialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\panedwindow.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\optionmenu.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\notebook.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\messagedialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\messagebox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\menubar.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\mainwindow.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\labeledwidget.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\labeledframe.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\iwidgets4.0.0UserCmds.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\hyperhelp.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\hierarchy.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\finddialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\fileselectiondialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\fileselectionbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\feedback.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\extfileselectiondialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\extfileselectionbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\extbutton.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\entryfield.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\disjointlistbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\dialogshell.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\dialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\datefield.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\dateentry.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\combobox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\checkbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\canvasprintdialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\canvasprintbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\calendar.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\buttonbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\text.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\select.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\save.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\ruler.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\print.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\poly.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\points.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\paste.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\oval.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\open.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\new.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\mag.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\line.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\help.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\find.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\exit.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\cut.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\copy.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\close.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\clear.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\box.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\license.terms"
+  Delete "$INSTDIR\share\iwidgets4.0.1\pkgIndex.tcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\iwidgets.tcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\unknownimage.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\tclIndex"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scopedobject.itcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\roman.itcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\colors.itcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\watch.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\toolbar.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\timefield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\timeentry.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\tabset.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\tabnotebook.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spintime.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spinner.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spinint.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spindate.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\shell.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\selectiondialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\selectionbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledwidget.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledtext.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledlistbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledhtml.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledframe.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledcanvas.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\regexpfield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\radiobox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\pushbutton.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\promptdialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\panedwindow.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\pane.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\optionmenu.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\notebook.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\messagedialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\messagebox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\menubar.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\mainwindow.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\labeledwidget.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\labeledframe.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\hyperhelp.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\hierarchy.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\finddialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\fileselectiondialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\fileselectionbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\feedback.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\extfileselectiondialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\extfileselectionbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\extbutton.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\entryfield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\disjointlistbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\dialogshell.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\dialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\datefield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\dateentry.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\combobox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\checkbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\canvasprintdialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\canvasprintbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\calendar.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\buttonbox.itk"
+  Delete "$INSTDIR\share\itk3.2\tclIndex"
+  Delete "$INSTDIR\share\itk3.2\itk.tcl"
+  Delete "$INSTDIR\share\itk3.2\Widget.itk"
+  Delete "$INSTDIR\share\itk3.2\Toplevel.itk"
+  Delete "$INSTDIR\share\itk3.2\Archetype.itk"
+  Delete "$INSTDIR\share\itcl3.2\itcl.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\widget"
+  Delete "$INSTDIR\share\tk8.4\demos\vscale.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\twind.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\timer"
+  Delete "$INSTDIR\share\tk8.4\demos\text.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\tcolor"
+  Delete "$INSTDIR\share\tk8.4\demos\tclIndex"
+  Delete "$INSTDIR\share\tk8.4\demos\style.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\states.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\square"
+  Delete "$INSTDIR\share\tk8.4\demos\spin.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\search.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\sayings.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\ruler.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\rolodex"
+  Delete "$INSTDIR\share\tk8.4\demos\rmt"
+  Delete "$INSTDIR\share\tk8.4\demos\radio.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\puzzle.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\plot.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\paned2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\paned1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\msgbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\menubu.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\menu.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\license.terms"
+  Delete "$INSTDIR\share\tk8.4\demos\labelframe.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\label.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\ixset"
+  Delete "$INSTDIR\share\tk8.4\demos\items.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\image2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\image1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\icon.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\hscale.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\hello"
+  Delete "$INSTDIR\share\tk8.4\demos\form.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\floor.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\filebox.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\entry3.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\entry2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\entry1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\dialog2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\dialog1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\ctext.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\cscroll.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\colors.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\clrpick.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\check.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\button.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\browse"
+  Delete "$INSTDIR\share\tk8.4\demos\bitmap.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\bind.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\arrow.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\README"
+  Delete "$INSTDIR\share\tk8.4\demos\images\teapot.ppm"
+  Delete "$INSTDIR\share\tk8.4\demos\images\tcllogo.gif"
+  Delete "$INSTDIR\share\tk8.4\demos\images\pattern.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\noletter.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\letters.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\gray25.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\flagup.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\flagdown.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\face.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\earthris.gif"
+  Delete "$INSTDIR\share\tk8.4\demos\images\earth.gif"
+  Delete "$INSTDIR\share\tk8.4\tkAppInit.c"
+  Delete "$INSTDIR\share\tk8.4\tclIndex"
+  Delete "$INSTDIR\share\tk8.4\prolog.ps"
+  Delete "$INSTDIR\share\tk8.4\xmfbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\unsupported.tcl"
+  Delete "$INSTDIR\share\tk8.4\tkfbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\tk.tcl"
+  Delete "$INSTDIR\share\tk8.4\text.tcl"
+  Delete "$INSTDIR\share\tk8.4\tearoff.tcl"
+  Delete "$INSTDIR\share\tk8.4\spinbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\scrlbar.tcl"
+  Delete "$INSTDIR\share\tk8.4\scale.tcl"
+  Delete "$INSTDIR\share\tk8.4\safetk.tcl"
+  Delete "$INSTDIR\share\tk8.4\panedwindow.tcl"
+  Delete "$INSTDIR\share\tk8.4\palette.tcl"
+  Delete "$INSTDIR\share\tk8.4\optMenu.tcl"
+  Delete "$INSTDIR\share\tk8.4\obsolete.tcl"
+  Delete "$INSTDIR\share\tk8.4\msgbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\mkpsenc.tcl"
+  Delete "$INSTDIR\share\tk8.4\menu.tcl"
+  Delete "$INSTDIR\share\tk8.4\listbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\focus.tcl"
+  Delete "$INSTDIR\share\tk8.4\entry.tcl"
+  Delete "$INSTDIR\share\tk8.4\dialog.tcl"
+  Delete "$INSTDIR\share\tk8.4\console.tcl"
+  Delete "$INSTDIR\share\tk8.4\comdlg.tcl"
+  Delete "$INSTDIR\share\tk8.4\clrpick.tcl"
+  Delete "$INSTDIR\share\tk8.4\choosedir.tcl"
+  Delete "$INSTDIR\share\tk8.4\button.tcl"
+  Delete "$INSTDIR\share\tk8.4\bgerror.tcl"
+  Delete "$INSTDIR\share\tk8.4\msgs\ru.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\nl.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\it.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\fr.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\es.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\en_gb.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\en.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\el.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\de.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\cs.msg"
+  Delete "$INSTDIR\share\tk8.4\images\tai-ku.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo75.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo200.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo175.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo150.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo100.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo.eps"
+  Delete "$INSTDIR\share\tk8.4\images\logoMed.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logoLarge.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logo64.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logo100.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logo.eps"
+  Delete "$INSTDIR\share\tk8.4\images\README"
+  Delete "$INSTDIR\share\tcl8.4\tclIndex"
+  Delete "$INSTDIR\share\tcl8.4\word.tcl"
+  Delete "$INSTDIR\share\tcl8.4\safe.tcl"
+  Delete "$INSTDIR\share\tcl8.4\parray.tcl"
+  Delete "$INSTDIR\share\tcl8.4\package.tcl"
+  Delete "$INSTDIR\share\tcl8.4\ldAout.tcl"
+  Delete "$INSTDIR\share\tcl8.4\init.tcl"
+  Delete "$INSTDIR\share\tcl8.4\history.tcl"
+  Delete "$INSTDIR\share\tcl8.4\auto.tcl"
+  Delete "$INSTDIR\share\tcl8.4\tcltest2.2\tcltest.tcl"
+  Delete "$INSTDIR\share\tcl8.4\tcltest2.2\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\msgcat1.3\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\msgcat1.3\msgcat.tcl"
+  Delete "$INSTDIR\share\tcl8.4\encoding\tis-620.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\symbol.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\shiftjis.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macUkraine.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macTurkish.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macThai.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macRomania.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macRoman.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macJapan.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macIceland.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macGreek.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macDingbats.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macCyrillic.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macCroatian.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macCentEuro.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\ksc5601.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\koi8-u.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\koi8-r.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\jis0212.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\jis0208.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\jis0201.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-9.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-8.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-7.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-6.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-5.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-4.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-3.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-2.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-16.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-15.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-14.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-13.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-10.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-1.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso2022.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso2022-kr.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso2022-jp.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\gb2312.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\gb1988.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\gb12345.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\euc-kr.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\euc-jp.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\euc-cn.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\ebcdic.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\dingbats.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp950.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp949.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp936.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp932.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp874.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp869.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp866.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp865.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp864.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp863.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp862.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp861.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp860.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp857.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp855.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp852.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp850.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp775.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp737.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp437.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1258.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1257.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1256.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1255.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1254.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1253.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1252.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1251.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1250.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\big5.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\ascii.enc"
+  Delete "$INSTDIR\share\tcl8.4\opt0.4\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\opt0.4\optparse.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http2.4\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http2.4\http.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http1.0\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http1.0\http.tcl"
+  Delete "$INSTDIR\share\tiemu\LICENSES"
+  Delete "$INSTDIR\share\tiemu\AUTHORS"
+  Delete "$INSTDIR\share\tiemu\RELEASE"
+  Delete "$INSTDIR\share\tiemu\COPYING"
+  Delete "$INSTDIR\share\tiemu\Manpage.txt"
+  Delete "$INSTDIR\share\tiemu\Readme.txt"
+  Delete "$INSTDIR\share\tiemu\skins\ti92_fr.map"
+  Delete "$INSTDIR\share\tiemu\skins\ti92.map"
+  Delete "$INSTDIR\share\tiemu\skins\ti89_fr.map"
+  Delete "$INSTDIR\share\tiemu\skins\ti89.map"
+  Delete "$INSTDIR\share\tiemu\skins\v200plt.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ti92.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ti89t.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ti89.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ipaq_v200plt.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ipaq_92.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ipaq_89.skn"
+  Delete "$INSTDIR\share\tiemu\pixmaps\void.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\run_2.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\run_1.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\romdump.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\romdump.ico"
+  Delete "$INSTDIR\share\tiemu\pixmaps\logo.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\icon.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\bkpt.xpm"
+  Delete "$INSTDIR\share\tiemu\misc\romcalls.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_v200_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti92p_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti92p_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti92_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89t_hw4.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89t_hw3.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_v200_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti92p_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti92p_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti92_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89t_hw4.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89t_hw3.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom.txt"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedromv2.tib"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom9x.tib"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom89ti.tib"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom89.tib"
+  Delete "$INSTDIR\share\tiemu\help\tiemu.jpg"
+  Delete "$INSTDIR\share\tiemu\help\skinedit.jpg"
+  Delete "$INSTDIR\share\tiemu\help\wizard.png"
+  Delete "$INSTDIR\share\tiemu\help\screenshot.png"
+  Delete "$INSTDIR\share\tiemu\help\romversion.png"
+  Delete "$INSTDIR\share\tiemu\help\popup_menu.png"
+  Delete "$INSTDIR\share\tiemu\help\no_skin.png"
+  Delete "$INSTDIR\share\tiemu\help\logo_tiemu.png"
+  Delete "$INSTDIR\share\tiemu\help\logo_lpg.png"
+  Delete "$INSTDIR\share\tiemu\help\log_link.png"
+  Delete "$INSTDIR\share\tiemu\help\linkport.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_stack.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_sr.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_source.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_search.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_registers.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_mem.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_heap.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_bkpts.png"
+  Delete "$INSTDIR\share\tiemu\help\calc_infos.png"
+  Delete "$INSTDIR\share\tiemu\help\chapter22.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter21.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter20.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter11.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter10.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter09.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter08.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter07.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter06.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter05.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter04.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter03.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter02.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter01.html"
+  Delete "$INSTDIR\share\tiemu\help\Manual_en.html"
+  Delete "$INSTDIR\share\tiemu\help\FAQ.html"
+  Delete "$INSTDIR\share\tiemu\glade\wizard-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\scroptions-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\romversion-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\release-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\quicksend-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\popup-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\pbars-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\manpage-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\log_link-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\infos-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dboxes-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_vectors-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_stack-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_regs-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_pclog-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_mem-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_ioports-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_heap-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_entry-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_dock-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_data-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_code-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_cause-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_bkpts-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_bits-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\device-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\calc-2.glade"
+  Delete "$INSTDIR\include\itkDecls.h"
+  Delete "$INSTDIR\include\itk.h"
+  Delete "$INSTDIR\include\itclIntDecls.h"
+  Delete "$INSTDIR\include\itclInt.h"
+  Delete "$INSTDIR\include\itclDecls.h"
+  Delete "$INSTDIR\include\itcl.h"
+  Delete "$INSTDIR\include\tkDecls.h"
+  Delete "$INSTDIR\include\tkIntXlibDecls.h"
+  Delete "$INSTDIR\include\tkPlatDecls.h"
+  Delete "$INSTDIR\include\tk.h"
+  Delete "$INSTDIR\include\X11\keysymdef.h"
+  Delete "$INSTDIR\include\X11\keysym.h"
+  Delete "$INSTDIR\include\X11\cursorfont.h"
+  Delete "$INSTDIR\include\X11\Xutil.h"
+  Delete "$INSTDIR\include\X11\Xlib.h"
+  Delete "$INSTDIR\include\X11\Xfuncproto.h"
+  Delete "$INSTDIR\include\X11\Xatom.h"
+  Delete "$INSTDIR\include\X11\X.h"
+  Delete "$INSTDIR\include\tclPlatDecls.h"
+  Delete "$INSTDIR\include\tclDecls.h"
+  Delete "$INSTDIR\include\tcl.h"
+  Delete "$INSTDIR\include\tilp2\ticonv.h"
+  Delete "$INSTDIR\include\tilp2\charset.h"
+  Delete "$INSTDIR\include\tilp2\ticalcs.h"
+  Delete "$INSTDIR\include\tilp2\keys92p.h"
+  Delete "$INSTDIR\include\tilp2\keys89.h"
+  Delete "$INSTDIR\include\tilp2\keys83p.h"
+  Delete "$INSTDIR\include\tilp2\keys73.h"
+  Delete "$INSTDIR\include\tilp2\typesxx.h"
+  Delete "$INSTDIR\include\tilp2\typesnsp.h"
+  Delete "$INSTDIR\include\tilp2\typesv2.h"
+  Delete "$INSTDIR\include\tilp2\types92p.h"
+  Delete "$INSTDIR\include\tilp2\types92.h"
+  Delete "$INSTDIR\include\tilp2\types89t.h"
+  Delete "$INSTDIR\include\tilp2\types89.h"
+  Delete "$INSTDIR\include\tilp2\types86.h"
+  Delete "$INSTDIR\include\tilp2\types85.h"
+  Delete "$INSTDIR\include\tilp2\types84p.h"
+  Delete "$INSTDIR\include\tilp2\types83p.h"
+  Delete "$INSTDIR\include\tilp2\types83.h"
+  Delete "$INSTDIR\include\tilp2\types82.h"
+  Delete "$INSTDIR\include\tilp2\types73.h"
+  Delete "$INSTDIR\include\tilp2\tifiles.h"
+  Delete "$INSTDIR\include\tilp2\stdints4.h"
+  Delete "$INSTDIR\include\tilp2\stdints3.h"
+  Delete "$INSTDIR\include\tilp2\stdints2.h"
+  Delete "$INSTDIR\include\tilp2\stdints1.h"
+  Delete "$INSTDIR\include\tilp2\files9x.h"
+  Delete "$INSTDIR\include\tilp2\files8x.h"
+  Delete "$INSTDIR\include\tilp2\timeout.h"
+  Delete "$INSTDIR\include\tilp2\ticables.h"
+  Delete "$INSTDIR\include\tilp2\export4.h"
+  Delete "$INSTDIR\include\tilp2\export3.h"
+  Delete "$INSTDIR\include\tilp2\export2.h"
+  Delete "$INSTDIR\include\tilp2\export1.h"
+  Delete "$INSTDIR\bin\itk32.dll"
+  Delete "$INSTDIR\bin\itcl32.dll"
+  Delete "$INSTDIR\bin\wish84.exe"
+  Delete "$INSTDIR\bin\tk84.dll"
+  Delete "$INSTDIR\bin\tclpip84.dll"
+  Delete "$INSTDIR\bin\tclsh84.exe"
+  Delete "$INSTDIR\bin\tcl84.dll"
+  Delete "$INSTDIR\bin\tiemups.dll"
+  Delete "$INSTDIR\bin\tiemu.tlb"
+  Delete "$INSTDIR\bin\tiemu.exe"
+  Delete "$INSTDIR\bin\libusb0.dll"
+  Delete "$INSTDIR\bin\libticonv-3.dll"
+  Delete "$INSTDIR\bin\libticalcs2-7.dll"
+  Delete "$INSTDIR\bin\libtifiles2-5.dll"
+  Delete "$INSTDIR\bin\libticables2-1.dll"
+  Delete "$INSTDIR\lib\libitkstub32.a"
+  Delete "$INSTDIR\lib\itk3.2\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\libitclstub32.a"
+  Delete "$INSTDIR\lib\itcl3.2\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\libtkstub84.a"
+  Delete "$INSTDIR\lib\libtk84.a"
+  Delete "$INSTDIR\lib\tkConfig.sh"
+  Delete "$INSTDIR\lib\tk8.4\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\libtclstub84.a"
+  Delete "$INSTDIR\lib\libtcl84.a"
+  Delete "$INSTDIR\lib\tclConfig.sh"
+  Delete "$INSTDIR\lib\reg1.1\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\reg1.1\tclreg11.dll"
+  Delete "$INSTDIR\lib\dde1.2\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\dde1.2\tcldde12.dll"
+  Delete "$INSTDIR\lib\libticonv.la"
+  Delete "$INSTDIR\lib\libticonv.dll.a"
+  Delete "$INSTDIR\lib\libticalcs2.la"
+  Delete "$INSTDIR\lib\libticalcs2.dll.a"
+  Delete "$INSTDIR\lib\libtifiles2.la"
+  Delete "$INSTDIR\lib\libtifiles2.dll.a"
+  Delete "$INSTDIR\lib\pkgconfig\ticonv.pc"
+  Delete "$INSTDIR\lib\pkgconfig\ticalcs2.pc"
+  Delete "$INSTDIR\lib\pkgconfig\tifiles2.pc"
+  Delete "$INSTDIR\lib\pkgconfig\ticables2.pc"
+  Delete "$INSTDIR\lib\libticables2.la"
+  Delete "$INSTDIR\lib\libticables2.dll.a"
+
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Readme.lnk"
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
+  Delete "$DESKTOP\TiEmu.lnk"
+  Delete "$SMPROGRAMS\$ICONS_GROUP\TiEmu.lnk"
+
+  RMDir "$SMPROGRAMS\$ICONS_GROUP"
+  RMDir "$INSTDIR\share\tk8.4\msgs"
+  RMDir "$INSTDIR\share\tk8.4\images"
+  RMDir "$INSTDIR\share\tk8.4\demos\images"
+  RMDir "$INSTDIR\share\tk8.4\demos"
+  RMDir "$INSTDIR\share\tk8.4"
+  RMDir "$INSTDIR\share\tiemu\skins"
+  RMDir "$INSTDIR\share\tiemu\pixmaps"
+  RMDir "$INSTDIR\share\tiemu\pedrom"
+  RMDir "$INSTDIR\share\tiemu\misc"
+  RMDir "$INSTDIR\share\tiemu\help"
+  RMDir "$INSTDIR\share\tiemu\glade"
+  RMDir "$INSTDIR\share\tiemu\images"
+  RMDir "$INSTDIR\share\tiemu"
+  RMDir "$INSTDIR\share\tcl8.4\tcltest2.2"
+  RMDir "$INSTDIR\share\tcl8.4\opt0.4"
+  RMDir "$INSTDIR\share\tcl8.4\msgcat1.3"
+  RMDir "$INSTDIR\share\tcl8.4\http2.4"
+  RMDir "$INSTDIR\share\tcl8.4\http1.0"
+  RMDir "$INSTDIR\share\tcl8.4\encoding"
+  RMDir "$INSTDIR\share\tcl8.4"
+  RMDir "$INSTDIR\share\redhat\gui"
+  RMDir "$INSTDIR\share\redhat"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\scripts"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\demos\images"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\demos\html"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\demos"
+  RMDir "$INSTDIR\share\iwidgets4.0.1"
+  RMDir "$INSTDIR\share\itk3.2"
+  RMDir "$INSTDIR\share\itcl3.2"
+  RMDir "$INSTDIR\share\insight1.0\images2"
+  RMDir "$INSTDIR\share\insight1.0\images"
+  RMDir "$INSTDIR\share\insight1.0\help\trace"
+  RMDir "$INSTDIR\share\insight1.0\help\images"
+  RMDir "$INSTDIR\share\insight1.0\help"
+  RMDir "$INSTDIR\share\insight1.0"
+  RMDir "$INSTDIR\share\man\man1"
+  RMDir "$INSTDIR\share\man"
+  RMDir "$INSTDIR\share"
+  RMDir "$INSTDIR\man\mann"
+  RMDir "$INSTDIR\man"
+  RMDir "$INSTDIR\lib\tk8.4"
+  RMDir "$INSTDIR\lib\reg1.1"
+  RMDir "$INSTDIR\lib\pkgconfig"
+  RMDir "$INSTDIR\lib\itk3.2"
+  RMDir "$INSTDIR\lib\itcl3.2"
+  RMDir "$INSTDIR\lib\dde1.2"
+  RMDir "$INSTDIR\lib"
+  RMDir "$INSTDIR\include\X11"
+  RMDir "$INSTDIR\include\tilp2"
+  RMDir "$INSTDIR\include"
+  RMDir "$INSTDIR\bin"
+  RMDir "$INSTDIR"
+
+  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+  SetAutoClose true
+SectionEnd
diff --git a/build/nsis/tiemu.nsi b/build/nsis/tiemu.nsi
new file mode 100644
index 0000000..45683cf
--- /dev/null
+++ b/build/nsis/tiemu.nsi
@@ -0,0 +1,2371 @@
+; Script generated by the HM NIS Edit Script Wizard.
+
+; Other definitions
+!define UPXDIR "E:\UPX"
+!define GTK_MIN_VER "2.6.10"
+!define GTK_PKG_VER "-rc1"
+
+; HM NIS Edit Wizard helper defines
+!define PRODUCT_NAME "TiEmu"
+!define PRODUCT_VERSION "3.02a"
+!define PRODUCT_PUBLISHER "The TiEmu Team"
+!define PRODUCT_WEB_SITE "http://lpg.ticalc.org/prj_tiemu/index.html"
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\tiemu.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
+
+SetCompressor /SOLID lzma
+
+!packhdr tmpexe.tmp "${UPXDIR}\upx.exe --best -q tmpexe.tmp"
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+
+; Version comparisons
+!include "vercmp.nsi"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Start menu page
+var ICONS_GROUP
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "TiEmu"
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
+!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\tiemu.exe"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\share\tiemu\Readme.txt"
+!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; Language files
+!insertmacro MUI_LANGUAGE "English"
+
+; Reserve files
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+; MUI end ------
+
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+OutFile "Setup.exe"
+InstallDir "$PROGRAMFILES\TiEmu"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+ShowInstDetails show
+ShowUnInstDetails show
+
+Function .onInit
+; Check if GTK+ is installed
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkfound
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkfound
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'GTK+ not found. Please install the "GTK+ 2.6.x Runtime Environment" (${GTK_MIN_VER} or higher). If you proceed, the setup program will be downloaded and launched automatically.' IDOK installgtk IDCANCEL abortinstall
+gtkfound:
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "Version"
+  StrCmp $0 "" 0 gtkverfound
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "Version"
+  StrCmp $0 "" gtkvernotok
+gtkverfound:
+  Push "${GTK_MIN_VER}"
+  Push $0
+  Call CompareVersions
+  Pop $0
+  IntCmp $0 1 gtkverok
+gtkvernotok:
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Wrong GTK+ package version. You need at least version ${GTK_MIN_VER}. If you proceed, the setup program will be downloaded and launched automatically.' IDCANCEL abortinstall
+installgtk:
+; Connect to the Internet
+  ClearErrors
+  Dialer::AttemptConnect
+  IfErrors gtkinstallfailed
+  Pop $0
+  StrCmp $0 "online" 0 gtkinstallfailed
+; Fetch installer
+; Do the download quietly because the GUI isn't even loaded at that point, and because I can't get
+; the progress meters to work with the "Modern UI" anyway.
+  NSISdl::download_quiet "http://kent.dl.sourceforge.net/gladewin32/gtk-win32-${GTK_MIN_VER}${GTK_PKG_VER}.exe" "$TEMP\gtksetup.exe"
+  Pop $0
+  StrCmp $0 "cancel" abortinstall
+  StrCmp $0 "success" 0 gtkinstallfailed
+; Run the installer
+  ExecWait '"$TEMP\gtksetup.exe"' $0
+  Delete "$TEMP\gtksetup.exe"
+; The GTK+ installer is a NSIS installer as well. Errorlevel 1 means canceled by the user.
+  IntCmp $0 1 abortinstall
+  IntCmp $0 0 0 gtkinstallfailed gtkinstallfailed
+; Check again if GTK+ is installed
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkverok
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "Path"
+  StrCmp $0 "" 0 gtkverok
+gtkinstallfailed:
+  MessageBox MB_OK|MB_ICONSTOP "GTK+ installation failed."
+abortinstall:
+  Abort
+gtkverok:
+; Check if libxml is present
+  ReadRegStr $0 HKLM "Software\GTK\2.0" "DllPath"
+  StrCmp $0 "" 0 gtkdllpathok
+  ReadRegStr $0 HKCU "Software\GTK\2.0" "DllPath"
+  StrCmp $0 "" 0 gtkdllpathok
+  MessageBox MB_OK|MB_ICONSTOP "Invalid GTK+ installation (cannot locate GTK+ DLL path)."
+  Abort
+gtkdllpathok:
+  IfFileExists "$0\libxml2.dll" libxmlfound 0
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Incomplete GTK+ installation: libxml2.dll not found. If you proceed, libxml2-2.6.27.zip will be downloaded and unpacked automatically.' IDOK 0 IDCANCEL abortinstall
+; Connect to the Internet
+  ClearErrors
+  Dialer::AttemptConnect
+  IfErrors gtkinstallfailed
+  Pop $1
+  StrCmp $1 "online" 0 gtkinstallfailed
+; Fetch and extract ZIP
+  NSISdl::download_quiet "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-2.6.27.zip" "$TEMP\libxml2-2.6.27.zip"
+  Pop $1
+  StrCmp $1 "cancel" abortinstall
+  StrCmp $1 "success" 0 gtkinstallfailed
+  nsisunz::UnzipToStack /noextractpath /file "bin/libxml2.dll" "$TEMP\libxml2-2.6.27.zip" $0
+  Pop $1
+  Delete "$TEMP\libxml2-2.6.27.zip"
+  StrCmp $1 "success" 0 gtkinstallfailed
+libxmlfound:
+; Check if libglade is present
+  IfFileExists "$0\libglade-2.0-0.dll" libgladefound 0
+; Check GTK+ version to get a matching libglade
+  ReadRegStr $1 HKLM "Software\GTK\2.0" "Version"
+  StrCmp $1 "" 0 gtkverfound2
+  ReadRegStr $1 HKCU "Software\GTK\2.0" "Version"
+  StrCmp $1 "" 0 gtkverfound2
+  MessageBox MB_OK|MB_ICONSTOP "Invalid GTK+ installation (cannot check version)."
+  Abort
+gtkverfound2:
+  Push "2.8.0"
+  Push $1
+  Call CompareVersions
+  Pop $1
+  IntCmp $1 1 gtkis28
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Incomplete GTK+ installation: libglade-2.0-0.dll not found. If you proceed, libglade-2.4.0-bin.zip will be downloaded and unpacked automatically.' IDOK 0 IDCANCEL abortinstall
+  StrCpy $2 "http://kent.dl.sourceforge.net/gladewin32/libglade-2.4.0-bin.zip"
+  Goto gtkis26
+gtkis28:
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Incomplete GTK+ installation: libglade-2.0-0.dll not found. If you proceed, libglade-2.6.0.zip will be downloaded and unpacked automatically.' IDOK 0 IDCANCEL abortinstall
+  StrCpy $2 "http://ftp.gnome.org/pub/gnome/binaries/win32/libglade/2.6/libglade-2.6.0.zip"
+gtkis26:
+; Connect to the Internet
+  ClearErrors
+  Dialer::AttemptConnect
+  IfErrors gtkinstallfailed
+  Pop $1
+  StrCmp $1 "online" 0 gtkinstallfailed
+; Fetch and extract ZIP
+  NSISdl::download_quiet $2 "$TEMP\libglade-bin.zip"
+  Pop $1
+  StrCmp $1 "cancel" abortinstall
+  StrCmp $1 "success" 0 gtkinstallfailed
+  nsisunz::UnzipToStack /noextractpath /file "bin/libglade-2.0-0.dll" "$TEMP\libglade-bin.zip" $0
+  Pop $1
+  Delete "$TEMP\libglade-bin.zip"
+  StrCmp $1 "success" 0 gtkinstallfailed
+libgladefound:
+; If $INSTDIR points to a Bin\ directory, fix it to point to the root of the tree.
+  StrLen $0 $INSTDIR
+  IntCmp $0 4 notbin notbin
+  IntOp $0 $0 - 4
+  StrCpy $1 $INSTDIR "" $0
+  StrCmp $1 "\bin" 0 notbin
+  StrCpy $INSTDIR $INSTDIR $0
+notbin:
+FunctionEnd
+
+Section "MainSection" SEC01
+; Delete obsolete files
+  Delete "$INSTDIR\share\tiemu\skins\emuti92plus.skn"
+  Delete "$INSTDIR\share\tiemu\skins\emuti89.skn"
+  Delete "$INSTDIR\share\tiemu\glade\comm-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\comm-2.glade"
+  Delete "$INSTDIR\include\tilp\update.h"
+  Delete "$INSTDIR\include\tilp\tnode.h"
+  Delete "$INSTDIR\include\tilp\tikeys.h"
+  Delete "$INSTDIR\include\tilp\ticalcs.h"
+  Delete "$INSTDIR\include\tilp\pause.h"
+  Delete "$INSTDIR\include\tilp\keys92p.h"
+  Delete "$INSTDIR\include\tilp\keys89.h"
+  Delete "$INSTDIR\include\tilp\keys83p.h"
+  Delete "$INSTDIR\include\tilp\keys73.h"
+  Delete "$INSTDIR\include\tilp\headers.h"
+  Delete "$INSTDIR\include\tilp\calc_ver.h"
+  Delete "$INSTDIR\include\tilp\calc_int.h"
+  Delete "$INSTDIR\include\tilp\calc_err.h"
+  Delete "$INSTDIR\include\tilp\calc_def.h"
+  Delete "$INSTDIR\include\tilp\typesxx.h"
+  Delete "$INSTDIR\include\tilp\typesv2.h"
+  Delete "$INSTDIR\include\tilp\types92p.h"
+  Delete "$INSTDIR\include\tilp\types92.h"
+  Delete "$INSTDIR\include\tilp\types89.h"
+  Delete "$INSTDIR\include\tilp\types86.h"
+  Delete "$INSTDIR\include\tilp\types85.h"
+  Delete "$INSTDIR\include\tilp\types83p.h"
+  Delete "$INSTDIR\include\tilp\types83.h"
+  Delete "$INSTDIR\include\tilp\types82.h"
+  Delete "$INSTDIR\include\tilp\types73.h"
+  Delete "$INSTDIR\include\tilp\tifiles.h"
+  Delete "$INSTDIR\include\tilp\stdints.h"
+  Delete "$INSTDIR\include\tilp\macros.h"
+  Delete "$INSTDIR\include\tilp\grp_ops.h"
+  Delete "$INSTDIR\include\tilp\filesxx.h"
+  Delete "$INSTDIR\include\tilp\files9x.h"
+  Delete "$INSTDIR\include\tilp\files8x.h"
+  Delete "$INSTDIR\include\tilp\file_ver.h"
+  Delete "$INSTDIR\include\tilp\file_int.h"
+  Delete "$INSTDIR\include\tilp\file_err.h"
+  Delete "$INSTDIR\include\tilp\file_def.h"
+  Delete "$INSTDIR\include\tilp\timeout.h"
+  Delete "$INSTDIR\include\tilp\ticables.h"
+  Delete "$INSTDIR\include\tilp\export.h"
+  Delete "$INSTDIR\include\tilp\cabl_ver.h"
+  Delete "$INSTDIR\include\tilp\cabl_int.h"
+  Delete "$INSTDIR\include\tilp\cabl_err.h"
+  Delete "$INSTDIR\include\tilp\cabl_def.h"
+  RMDir "$INSTDIR\include\tilp"
+  Delete "$INSTDIR\bin\libticalcs-4.dll"
+  Delete "$INSTDIR\bin\libtifiles-0.dll"
+  Delete "$INSTDIR\bin\libticables-3.dll"
+  Delete "$INSTDIR\lib\libticalcs.la"
+  Delete "$INSTDIR\lib\libticalcs.dll.a"
+  Delete "$INSTDIR\lib\libtifiles.la"
+  Delete "$INSTDIR\lib\libtifiles.dll.a"
+  Delete "$INSTDIR\lib\pkgconfig\ticalcs.pc"
+  Delete "$INSTDIR\lib\pkgconfig\tifiles.pc"
+  Delete "$INSTDIR\lib\pkgconfig\ticables.pc"
+  Delete "$INSTDIR\lib\libticables.la"
+  Delete "$INSTDIR\lib\libticables.dll.a"
+  Delete "$INSTDIR\bin\libticables2-0.dll"
+  Delete "$INSTDIR\bin\libticalcs2-0.dll"
+  Delete "$INSTDIR\bin\libticalcs2-1.dll"
+  Delete "$INSTDIR\bin\libticalcs2-2.dll"
+  Delete "$INSTDIR\bin\libticalcs2-6.dll"
+  Delete "$INSTDIR\bin\libticonv-0.dll"
+  Delete "$INSTDIR\bin\libticonv-1.dll"
+  Delete "$INSTDIR\bin\libticonv-2.dll"
+  Delete "$INSTDIR\bin\libtifiles2-0.dll"
+  Delete "$INSTDIR\bin\libtifiles2-1.dll"
+  Delete "$INSTDIR\bin\libtifiles2-2.dll"
+  Delete "$INSTDIR\bin\libtifiles2-3.dll"
+  Delete "$INSTDIR\bin\libtifiles2-4.dll"
+  Delete "$INSTDIR\include\tilp2\stdints.h"
+  Delete "$INSTDIR\include\tilp2\macros.h"
+  Delete "$INSTDIR\include\tilp2\tnode.h"
+  Delete "$INSTDIR\man\man1\tiemu.1"
+  RMDir "$INSTDIR\man\man1"
+  Delete "$INSTDIR\share\tiemu\glade\about-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\calc-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\device-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_bkpts-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_cause-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_code-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_data-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_entry-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_heap-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_ioports-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_mem-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_pclog-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_regs-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_stack-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_vectors-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\dboxes-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\infos-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\manpage-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\pbars-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\popup-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\quicksend-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\release-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\romversion-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\scroptions-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\wizard-2.gladep"
+  Delete "$INSTDIR\share\tiemu\glade\about-2.glade"
+  Delete "$INSTDIR\share\tiemu\pixmaps\bkpt_tmp.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\run.xpm"
+
+; Install files
+  SetOutPath "$INSTDIR\lib"
+  File "..\..\..\..\TiEmu\lib\libticables2.dll.a"
+  File "..\..\..\..\TiEmu\lib\libticables2.la"
+  SetOutPath "$INSTDIR\lib\pkgconfig"
+  File "..\..\..\..\TiEmu\lib\pkgconfig\ticables2.pc"
+  File "..\..\..\..\TiEmu\lib\pkgconfig\tifiles2.pc"
+  File "..\..\..\..\TiEmu\lib\pkgconfig\ticalcs2.pc"
+  File "..\..\..\..\TiEmu\lib\pkgconfig\ticonv.pc"
+  SetOutPath "$INSTDIR\lib"
+  File "..\..\..\..\TiEmu\lib\libtifiles2.dll.a"
+  File "..\..\..\..\TiEmu\lib\libtifiles2.la"
+  File "..\..\..\..\TiEmu\lib\libticalcs2.dll.a"
+  File "..\..\..\..\TiEmu\lib\libticalcs2.la"
+  File "..\..\..\..\TiEmu\lib\libticonv.dll.a"
+  File "..\..\..\..\TiEmu\lib\libticonv.la"
+  SetOutPath "$INSTDIR\lib\dde1.2"
+  File "..\..\..\..\TiEmu\lib\dde1.2\tcldde12.dll"
+  File "..\..\..\..\TiEmu\lib\dde1.2\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib\reg1.1"
+  File "..\..\..\..\TiEmu\lib\reg1.1\tclreg11.dll"
+  File "..\..\..\..\TiEmu\lib\reg1.1\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "..\..\..\..\TiEmu\lib\tclConfig.sh"
+  File "..\..\..\..\TiEmu\lib\libtcl84.a"
+  File "..\..\..\..\TiEmu\lib\libtclstub84.a"
+  SetOutPath "$INSTDIR\lib\tk8.4"
+  File "..\..\..\..\TiEmu\lib\tk8.4\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "..\..\..\..\TiEmu\lib\tkConfig.sh"
+  File "..\..\..\..\TiEmu\lib\libtk84.a"
+  File "..\..\..\..\TiEmu\lib\libtkstub84.a"
+  SetOutPath "$INSTDIR\lib\itcl3.2"
+  File "..\..\..\..\TiEmu\lib\itcl3.2\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "..\..\..\..\TiEmu\lib\libitclstub32.a"
+  SetOutPath "$INSTDIR\lib\itk3.2"
+  File "..\..\..\..\TiEmu\lib\itk3.2\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\lib"
+  File "..\..\..\..\TiEmu\lib\libitkstub32.a"
+  SetOutPath "$INSTDIR\bin"
+  File "..\..\..\..\TiEmu\bin\libticables2-1.dll"
+  File "..\..\..\..\TiEmu\bin\libtifiles2-5.dll"
+  File "..\..\..\..\TiEmu\bin\libticalcs2-7.dll"
+  File "..\..\..\..\TiEmu\bin\libticonv-3.dll"
+  File "..\..\..\..\TiEmu\bin\libusb0.dll"
+  File "..\..\..\..\TiEmu\bin\tiemu.exe"
+  File "..\..\..\..\TiEmu\bin\tiemu.tlb"
+  File "..\..\..\..\TiEmu\bin\tiemups.dll"
+  File "..\..\..\..\TiEmu\bin\tcl84.dll"
+  File "..\..\..\..\TiEmu\bin\tclsh84.exe"
+  File "..\..\..\..\TiEmu\bin\tclpip84.dll"
+  File "..\..\..\..\TiEmu\bin\tk84.dll"
+  File "..\..\..\..\TiEmu\bin\wish84.exe"
+  File "..\..\..\..\TiEmu\bin\itcl32.dll"
+  File "..\..\..\..\TiEmu\bin\itk32.dll"
+  SetOutPath "$INSTDIR\include\tilp2"
+  File "..\..\..\..\TiEmu\include\tilp2\export1.h"
+  File "..\..\..\..\TiEmu\include\tilp2\export2.h"
+  File "..\..\..\..\TiEmu\include\tilp2\export3.h"
+  File "..\..\..\..\TiEmu\include\tilp2\export4.h"
+  File "..\..\..\..\TiEmu\include\tilp2\ticables.h"
+  File "..\..\..\..\TiEmu\include\tilp2\timeout.h"
+  File "..\..\..\..\TiEmu\include\tilp2\files8x.h"
+  File "..\..\..\..\TiEmu\include\tilp2\files9x.h"
+  File "..\..\..\..\TiEmu\include\tilp2\stdints1.h"
+  File "..\..\..\..\TiEmu\include\tilp2\stdints2.h"
+  File "..\..\..\..\TiEmu\include\tilp2\stdints3.h"
+  File "..\..\..\..\TiEmu\include\tilp2\stdints4.h"
+  File "..\..\..\..\TiEmu\include\tilp2\tifiles.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types73.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types82.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types83.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types83p.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types84p.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types85.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types86.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types89.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types89t.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types92.h"
+  File "..\..\..\..\TiEmu\include\tilp2\types92p.h"
+  File "..\..\..\..\TiEmu\include\tilp2\typesv2.h"
+  File "..\..\..\..\TiEmu\include\tilp2\typesnsp.h"
+  File "..\..\..\..\TiEmu\include\tilp2\typesxx.h"
+  File "..\..\..\..\TiEmu\include\tilp2\keys73.h"
+  File "..\..\..\..\TiEmu\include\tilp2\keys83p.h"
+  File "..\..\..\..\TiEmu\include\tilp2\keys89.h"
+  File "..\..\..\..\TiEmu\include\tilp2\keys92p.h"
+  File "..\..\..\..\TiEmu\include\tilp2\ticalcs.h"
+  File "..\..\..\..\TiEmu\include\tilp2\charset.h"
+  File "..\..\..\..\TiEmu\include\tilp2\ticonv.h"
+  SetOutPath "$INSTDIR\include"
+  File "..\..\..\..\TiEmu\include\tcl.h"
+  File "..\..\..\..\TiEmu\include\tclDecls.h"
+  File "..\..\..\..\TiEmu\include\tclPlatDecls.h"
+  SetOutPath "$INSTDIR\include\X11"
+  File "..\..\..\..\TiEmu\include\X11\X.h"
+  File "..\..\..\..\TiEmu\include\X11\Xatom.h"
+  File "..\..\..\..\TiEmu\include\X11\Xfuncproto.h"
+  File "..\..\..\..\TiEmu\include\X11\Xlib.h"
+  File "..\..\..\..\TiEmu\include\X11\Xutil.h"
+  File "..\..\..\..\TiEmu\include\X11\cursorfont.h"
+  File "..\..\..\..\TiEmu\include\X11\keysym.h"
+  File "..\..\..\..\TiEmu\include\X11\keysymdef.h"
+  SetOutPath "$INSTDIR\include"
+  File "..\..\..\..\TiEmu\include\tk.h"
+  File "..\..\..\..\TiEmu\include\tkPlatDecls.h"
+  File "..\..\..\..\TiEmu\include\tkIntXlibDecls.h"
+  File "..\..\..\..\TiEmu\include\tkDecls.h"
+  File "..\..\..\..\TiEmu\include\itcl.h"
+  File "..\..\..\..\TiEmu\include\itclDecls.h"
+  File "..\..\..\..\TiEmu\include\itclInt.h"
+  File "..\..\..\..\TiEmu\include\itclIntDecls.h"
+  File "..\..\..\..\TiEmu\include\itk.h"
+  File "..\..\..\..\TiEmu\include\itkDecls.h"
+  SetOutPath "$INSTDIR\share\tiemu\glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\calc-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\device-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_bits-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_bkpts-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_cause-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_code-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_data-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_dock-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_entry-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_heap-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_ioports-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_mem-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_pclog-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_regs-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_stack-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dbg_vectors-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\dboxes-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\infos-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\log_link-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\manpage-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\pbars-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\popup-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\quicksend-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\release-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\romversion-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\scroptions-2.glade"
+  File "..\..\..\..\TiEmu\share\tiemu\glade\wizard-2.glade"
+  SetOutPath "$INSTDIR\share\tiemu\help"
+  File "..\..\..\..\TiEmu\share\tiemu\help\FAQ.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\Manual_en.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter01.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter02.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter03.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter04.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter05.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter06.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter07.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter08.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter09.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter10.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter11.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter20.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter21.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\chapter22.html"
+  File "..\..\..\..\TiEmu\share\tiemu\help\calc_infos.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_bkpts.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_heap.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_mem.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_registers.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_search.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_source.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_sr.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\dbg_stack.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\linkport.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\log_link.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\logo_lpg.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\logo_tiemu.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\no_skin.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\popup_menu.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\romversion.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\screenshot.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\wizard.png"
+  File "..\..\..\..\TiEmu\share\tiemu\help\skinedit.jpg"
+  File "..\..\..\..\TiEmu\share\tiemu\help\tiemu.jpg"
+  SetOutPath "$INSTDIR\share\tiemu\pedrom"
+  File "..\..\..\..\TiEmu\share\tiemu\pedrom\pedrom89.tib"
+  File "..\..\..\..\TiEmu\share\tiemu\pedrom\pedrom89ti.tib"
+  File "..\..\..\..\TiEmu\share\tiemu\pedrom\pedrom9x.tib"
+  File "..\..\..\..\TiEmu\share\tiemu\pedrom\pedromv2.tib"
+  File "..\..\..\..\TiEmu\share\tiemu\pedrom\pedrom.txt"
+  SetOutPath "$INSTDIR\share\tiemu\misc"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_ti89_hw1.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_ti89_hw2.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_ti89t_hw3.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_ti89t_hw4.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_ti92_hw1.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_ti92p_hw1.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_ti92p_hw2.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\iodefs_v200_hw2.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_ti89_hw1.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_ti89_hw2.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_ti89t_hw3.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_ti89t_hw4.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_ti92_hw1.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_ti92p_hw1.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_ti92p_hw2.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\memmap_v200_hw2.txt"
+  File "..\..\..\..\TiEmu\share\tiemu\misc\romcalls.txt"
+  SetOutPath "$INSTDIR\share\tiemu\pixmaps"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\bkpt.xpm"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\icon.xpm"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\logo.xpm"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\romdump.ico"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\romdump.xpm"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\run_1.xpm"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\run_2.xpm"
+  File "..\..\..\..\TiEmu\share\tiemu\pixmaps\void.xpm"
+  SetOutPath "$INSTDIR\share\tiemu\skins"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ipaq_89.skn"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ipaq_92.skn"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ipaq_v200plt.skn"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ti89.skn"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ti89t.skn"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ti92.skn"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\v200plt.skn"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ti89.map"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ti89_fr.map"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ti92.map"
+  File "..\..\..\..\TiEmu\share\tiemu\skins\ti92_fr.map"
+  SetOutPath "$INSTDIR\share\tiemu"
+  File "..\..\..\..\TiEmu\share\tiemu\COPYING"
+  File "..\..\..\..\TiEmu\share\tiemu\RELEASE"
+  File "..\..\..\..\TiEmu\share\tiemu\AUTHORS"
+  File "..\..\..\..\TiEmu\share\tiemu\LICENSES"
+  File "..\..\..\..\TiEmu\share\tiemu\Manpage.txt"
+  File "Readme.txt"
+  SetOutPath "$INSTDIR\share\tcl8.4\http1.0"
+  File "..\..\..\..\TiEmu\share\tcl8.4\http1.0\http.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\http1.0\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\http2.4"
+  File "..\..\..\..\TiEmu\share\tcl8.4\http2.4\http.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\http2.4\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\opt0.4"
+  File "..\..\..\..\TiEmu\share\tcl8.4\opt0.4\optparse.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\opt0.4\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\encoding"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\ascii.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\big5.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1250.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1251.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1252.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1253.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1254.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1255.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1256.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1257.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp1258.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp437.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp737.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp775.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp850.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp852.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp855.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp857.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp860.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp861.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp862.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp863.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp864.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp865.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp866.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp869.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp874.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp932.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp936.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp949.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\cp950.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\dingbats.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\ebcdic.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\euc-cn.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\euc-jp.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\euc-kr.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\gb12345.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\gb1988.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\gb2312.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso2022-jp.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso2022-kr.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso2022.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-1.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-10.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-13.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-14.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-15.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-16.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-2.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-3.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-4.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-5.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-6.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-7.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-8.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\iso8859-9.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\jis0201.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\jis0208.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\jis0212.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\koi8-r.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\koi8-u.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\ksc5601.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macCentEuro.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macCroatian.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macCyrillic.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macDingbats.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macGreek.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macIceland.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macJapan.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macRoman.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macRomania.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macThai.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macTurkish.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\macUkraine.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\shiftjis.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\symbol.enc"
+  File "..\..\..\..\TiEmu\share\tcl8.4\encoding\tis-620.enc"
+  SetOutPath "$INSTDIR\share\tcl8.4\msgcat1.3"
+  File "..\..\..\..\TiEmu\share\tcl8.4\msgcat1.3\msgcat.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\msgcat1.3\pkgIndex.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4\tcltest2.2"
+  File "..\..\..\..\TiEmu\share\tcl8.4\tcltest2.2\pkgIndex.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\tcltest2.2\tcltest.tcl"
+  SetOutPath "$INSTDIR\share\tcl8.4"
+  File "..\..\..\..\TiEmu\share\tcl8.4\auto.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\history.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\init.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\ldAout.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\package.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\parray.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\safe.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\word.tcl"
+  File "..\..\..\..\TiEmu\share\tcl8.4\tclIndex"
+  SetOutPath "$INSTDIR\share\tk8.4\images"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\README"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\logo.eps"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\logo100.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\logo64.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\logoLarge.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\logoMed.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\pwrdLogo.eps"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\pwrdLogo100.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\pwrdLogo150.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\pwrdLogo175.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\pwrdLogo200.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\pwrdLogo75.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\images\tai-ku.gif"
+  SetOutPath "$INSTDIR\share\tk8.4\msgs"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\cs.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\de.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\el.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\en.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\en_gb.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\es.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\fr.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\it.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\nl.msg"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgs\ru.msg"
+  SetOutPath "$INSTDIR\share\tk8.4"
+  File "..\..\..\..\TiEmu\share\tk8.4\bgerror.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\button.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\choosedir.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\clrpick.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\comdlg.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\console.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\dialog.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\entry.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\focus.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\listbox.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\menu.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\mkpsenc.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\msgbox.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\obsolete.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\optMenu.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\palette.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\panedwindow.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\safetk.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\scale.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\scrlbar.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\spinbox.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\tearoff.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\text.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\tk.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\tkfbox.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\unsupported.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\xmfbox.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\prolog.ps"
+  File "..\..\..\..\TiEmu\share\tk8.4\tclIndex"
+  File "..\..\..\..\TiEmu\share\tk8.4\tkAppInit.c"
+  SetOutPath "$INSTDIR\share\tk8.4\demos\images"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\earth.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\earthris.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\face.bmp"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\flagdown.bmp"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\flagup.bmp"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\gray25.bmp"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\letters.bmp"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\noletter.bmp"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\pattern.bmp"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\tcllogo.gif"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\images\teapot.ppm"
+  SetOutPath "$INSTDIR\share\tk8.4\demos"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\README"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\arrow.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\bind.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\bitmap.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\browse"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\button.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\check.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\clrpick.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\colors.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\cscroll.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\ctext.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\dialog1.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\dialog2.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\entry1.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\entry2.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\entry3.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\filebox.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\floor.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\form.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\hello"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\hscale.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\icon.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\image1.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\image2.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\items.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\ixset"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\label.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\labelframe.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\license.terms"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\menu.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\menubu.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\msgbox.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\paned1.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\paned2.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\plot.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\puzzle.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\radio.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\rmt"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\rolodex"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\ruler.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\sayings.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\search.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\spin.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\square"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\states.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\style.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\tclIndex"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\tcolor"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\text.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\timer"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\twind.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\vscale.tcl"
+  File "..\..\..\..\TiEmu\share\tk8.4\demos\widget"
+  SetOutPath "$INSTDIR\share\itcl3.2"
+  File "..\..\..\..\TiEmu\share\itcl3.2\itcl.tcl"
+  SetOutPath "$INSTDIR\share\itk3.2"
+  File "..\..\..\..\TiEmu\share\itk3.2\Archetype.itk"
+  File "..\..\..\..\TiEmu\share\itk3.2\Toplevel.itk"
+  File "..\..\..\..\TiEmu\share\itk3.2\Widget.itk"
+  File "..\..\..\..\TiEmu\share\itk3.2\itk.tcl"
+  File "..\..\..\..\TiEmu\share\itk3.2\tclIndex"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\scripts"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\buttonbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\calendar.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\canvasprintbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\canvasprintdialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\checkbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\combobox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\dateentry.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\datefield.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\dialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\dialogshell.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\disjointlistbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\entryfield.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\extbutton.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\extfileselectionbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\extfileselectiondialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\feedback.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\fileselectionbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\fileselectiondialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\finddialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\hierarchy.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\hyperhelp.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\labeledframe.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\labeledwidget.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\mainwindow.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\menubar.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\messagebox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\messagedialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\notebook.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\optionmenu.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\pane.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\panedwindow.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\promptdialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\pushbutton.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\radiobox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\regexpfield.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\scrolledcanvas.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\scrolledframe.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\scrolledhtml.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\scrolledlistbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\scrolledtext.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\scrolledwidget.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\selectionbox.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\selectiondialog.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\shell.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\spindate.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\spinint.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\spinner.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\spintime.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\tabnotebook.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\tabset.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\timeentry.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\timefield.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\toolbar.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\watch.itk"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\colors.itcl"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\roman.itcl"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\scopedobject.itcl"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\tclIndex"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\scripts\unknownimage.gif"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\iwidgets.tcl"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\pkgIndex.tcl"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\license.terms"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\demos\images"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\box.xbm"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\clear.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\close.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\copy.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\cut.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\exit.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\find.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\help.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\line.xbm"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\mag.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\new.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\open.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\oval.xbm"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\paste.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\points.xbm"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\poly.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\print.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\ruler.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\save.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\select.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\images\text.xbm"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\demos\html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\buttonbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\calendar.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\canvasprintbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\canvasprintdialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\checkbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\combobox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\dateentry.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\datefield.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\dialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\dialogshell.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\disjointlistbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\entryfield.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\extbutton.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\extfileselectionbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\extfileselectiondialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\feedback.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\fileselectionbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\fileselectiondialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\finddialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\hierarchy.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\hyperhelp.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\iwidgets4.0.0UserCmds.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\labeledframe.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\labeledwidget.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\mainwindow.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\menubar.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\messagebox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\messagedialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\notebook.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\optionmenu.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\panedwindow.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\promptdialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\pushbutton.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\radiobox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\scopedobject.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\scrolledcanvas.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\scrolledframe.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\scrolledhtml.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\scrolledlistbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\scrolledtext.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\selectionbox.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\selectiondialog.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\shell.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\spindate.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\spinint.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\spinner.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\spintime.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\tabnotebook.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\tabset.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\timeentry.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\timefield.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\toolbar.n.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\html\watch.n.html"
+  SetOutPath "$INSTDIR\share\iwidgets4.0.1\demos"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\buttonbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\calendar"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\canvasprintbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\canvasprintdialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\catalog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\checkbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\combobox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\dateentry"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\datefield"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\demo.html"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\dialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\dialogshell"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\disjointlistbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\entryfield"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\extbutton"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\extfileselectionbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\extfileselectiondialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\feedback"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\fileselectionbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\fileselectiondialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\finddialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\hierarchy"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\hyperhelp"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\iwidgets.gif"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\labeledframe"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\labeledwidget"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\mainwindow"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\menubar"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\messagebox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\messagedialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\notebook"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\optionmenu"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\panedwindow"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\promptdialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\pushbutton"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\radiobox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\scopedobject"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\scrolledcanvas"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\scrolledframe"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\scrolledhtml"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\scrolledlistbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\scrolledtext"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\selectionbox"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\selectiondialog"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\shell"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\spindate"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\spinint"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\spinner"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\spintime"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\tabnotebook"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\tabset"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\timeentry"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\timefield"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\toolbar"
+  File "..\..\..\..\TiEmu\share\iwidgets4.0.1\demos\watch"
+  SetOutPath "$INSTDIR\share\redhat\gui"
+  File "..\..\..\..\TiEmu\share\redhat\gui\tclIndex"
+  File "..\..\..\..\TiEmu\share\redhat\gui\pkgIndex.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\advice.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\balloon.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\bbox.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\bgerror.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\bindings.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\canvas.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\cframe.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\center.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\debug.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\def.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\internet.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\font.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\gensym.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\gettext.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\hooks.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\lframe.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\list.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\looknfeel.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\menu.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\mono.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\multibox.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\parse_args.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\path.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\postghost.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\prefs.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\print.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\sendpr.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\topbind.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\toolbar.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\ulset.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\wframe.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\wingrab.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\ventry.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\combobox.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\pane.tcl"
+  File "..\..\..\..\TiEmu\share\redhat\gui\panedwindow.tcl"
+  SetOutPath "$INSTDIR\share\insight1.0\images"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\Movie_off.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\Movie_on.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\bottom.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\bp.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\check.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\console.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\continue.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\down.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\edit.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\finish.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\gdbtk_icon.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\help.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\home.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\insight.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\less.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\memory.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\more.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\next.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\next_check.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\next_frame.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\next_hit.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\next_line.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\nexti.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\open.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\prev_hit.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\reg.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\rewind.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\run.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\run_expt.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\src.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\stack.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\step.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\stepi.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\stop.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\tdump.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\tp.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\up.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\vars.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\watch.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\watch_movie.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images\icons.txt"
+  SetOutPath "$INSTDIR\share\insight1.0\images2"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\Movie_off.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\Movie_on.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\bottom.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\bp.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\check.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\console.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\continue.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\down.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\edit.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\finish.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\function.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\gdbtk_icon.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\help.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\home.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\insight.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\less.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\memory.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\more.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\next.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\next_check.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\next_frame.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\next_hit.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\next_line.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\nexti.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\open.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\prev_hit.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\reg.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\rewind.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\run.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\run_expt.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\src.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\stack.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\step.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\stepi.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\stop.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\target.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\tdump.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\tp.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\up.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\vars.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\watch.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\watch_movie.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\images2\icons.txt"
+  SetOutPath "$INSTDIR\share\insight1.0\help\images"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\frame_info.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\mem_menu.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\mem_popup.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\mem_pref.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_bal.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_bp_bal.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_bpop.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_menu.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_pop.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_stat.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_thread.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\src_toolbar.gif"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\browser1.png"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\browser2.png"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\insightbwr.png"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\reg.png"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\reg_menu.png"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\images\watch.png"
+  SetOutPath "$INSTDIR\share\insight1.0\help\trace"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\console.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\gbl_pref.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\help.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\license.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\locals.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\memory.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\reg_pref.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\register.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\source.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\src_pref.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\stack.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\target.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\tdump.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\tp.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\tracedlg.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\watch.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\trace\index.toc"
+  SetOutPath "$INSTDIR\share\insight1.0\help"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\breakpoint.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\browser.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\console.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\debug.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\gbl_pref.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\help.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\index.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\license.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\locals.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\memory.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\register.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\session.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\source.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\src_pref.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\stack.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\target.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\thread.html"
+  File "..\..\..\..\TiEmu\share\insight1.0\help\watch.html"
+  SetOutPath "$INSTDIR\share\insight1.0"
+  File "..\..\..\..\TiEmu\share\insight1.0\about.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\actiondlg.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\editor.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\helpviewer.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\interface.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\ipc.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\locals.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\main.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\modal.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\prefs.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\session.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\tdump.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\tfind_args.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\tracedlg.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\tty.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\util.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\warning.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\watch.tcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\gdbmenubar.itcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\gdbtoolbar.itcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\pluginwin.itcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\srcbar.itcl"
+  File "..\..\..\..\TiEmu\share\insight1.0\attachdlg.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\blockframe.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\bpwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\browserwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\console.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\cspref.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\debugwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\download.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\ehandler.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\embeddedwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\gdbevent.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\gdbwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\globalpref.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\ipcpref.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\kod.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\managedwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\mempref.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\memwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\process.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\regwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\srcpref.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\srctextwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\srcwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\stackwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\targetselection.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\toplevelwin.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\vartree.ith"
+  File "..\..\..\..\TiEmu\share\insight1.0\attachdlg.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\blockframe.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\bpwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\browserwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\console.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\cspref.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\debugwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\download.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\ehandler.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\gdbevent.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\globalpref.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\ipcpref.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\kod.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\managedwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\mempref.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\memwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\process.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\regwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\srcpref.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\srctextwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\srcwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\stackwin.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\targetselection.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\vartree.itb"
+  File "..\..\..\..\TiEmu\share\insight1.0\tclIndex"
+  SetOutPath "$INSTDIR\share\man\man1"
+  File "..\..\..\..\TiEmu\share\man\man1\tiemu.1"
+  SetOutPath "$INSTDIR\man\mann"
+  File "..\..\..\..\TiEmu\man\mann\body.n"
+  File "..\..\..\..\TiEmu\man\mann\class.n"
+  File "..\..\..\..\TiEmu\man\mann\code.n"
+  File "..\..\..\..\TiEmu\man\mann\configbody.n"
+  File "..\..\..\..\TiEmu\man\mann\delete.n"
+  File "..\..\..\..\TiEmu\man\mann\ensemble.n"
+  File "..\..\..\..\TiEmu\man\mann\find.n"
+  File "..\..\..\..\TiEmu\man\mann\itcl.n"
+  File "..\..\..\..\TiEmu\man\mann\itcl_class.n"
+  File "..\..\..\..\TiEmu\man\mann\itcl_info.n"
+  File "..\..\..\..\TiEmu\man\mann\itclvars.n"
+  File "..\..\..\..\TiEmu\man\mann\local.n"
+  File "..\..\..\..\TiEmu\man\mann\scope.n"
+  File "..\..\..\..\TiEmu\man\mann\Archetype.n"
+  File "..\..\..\..\TiEmu\man\mann\Toplevel.n"
+  File "..\..\..\..\TiEmu\man\mann\Widget.n"
+  File "..\..\..\..\TiEmu\man\mann\itk.n"
+  File "..\..\..\..\TiEmu\man\mann\itkvars.n"
+  File "..\..\..\..\TiEmu\man\mann\usual.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_buttonbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_calendar.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_canvasprintbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_canvasprintdialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_checkbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_combobox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_dateentry.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_datefield.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_dialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_dialogshell.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_disjointlistbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_entryfield.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_extbutton.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_extfileselectionbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_extfileselectiondialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_feedback.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_fileselectionbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_fileselectiondialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_finddialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_hierarchy.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_hyperhelp.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_labeledframe.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_labeledwidget.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_mainwindow.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_menubar.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_messagebox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_messagedialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_notebook.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_optionmenu.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_panedwindow.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_promptdialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_pushbutton.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_radiobox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_scopedobject.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_scrolledcanvas.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_scrolledframe.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_scrolledhtml.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_scrolledlistbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_scrolledtext.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_selectionbox.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_selectiondialog.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_shell.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_spindate.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_spinint.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_spinner.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_spintime.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_tabnotebook.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_tabset.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_timeentry.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_timefield.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_toolbar.n"
+  File "..\..\..\..\TiEmu\man\mann\iwidgets_watch.n"
+
+; OLE Registration
+  ExecWait '"$INSTDIR\bin\tiemu.exe" /RegServer'
+  RegDLL "$INSTDIR\bin\tiemups.dll"
+
+; Shortcuts
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\TiEmu.lnk" "$INSTDIR\bin\tiemu.exe"
+  CreateShortCut "$DESKTOP\TiEmu.lnk" "$INSTDIR\bin\tiemu.exe"
+  !insertmacro MUI_STARTMENU_WRITE_END
+
+; File associations
+  WriteRegStr HKCR ".sav" "" "TiEmu.Sav"
+  WriteRegStr HKCR "TiEmu.Sav" "" "TiEmu state"
+  WriteRegStr HKCR "TiEmu.Sav\DefaultIcon" "" "$INSTDIR\bin\tiemu.exe,0"
+  WriteRegStr HKCR "TiEmu.Sav\shell\open" "" "Open with &TiEmu"
+  WriteRegStr HKCR "TiEmu.Sav\shell\open\command" "" '"$INSTDIR\bin\tiemu.exe" "%1"'
+
+  WriteRegStr HKCR ".rom" "" "TiEmu.Rom"
+  WriteRegStr HKCR "TiEmu.Rom" "" "Rom Dump"
+  WriteRegStr HKCR "TiEmu.Rom\DefaultIcon" "" "$INSTDIR\share\tiemu\pixmaps\romdump.ico"
+  WriteRegStr HKCR "TiEmu.Rom\shell\open" "" "Open with &TiEmu"
+  WriteRegStr HKCR "TiEmu.Rom\shell\open\command" "" '"$INSTDIR\bin\tiemu.exe" "%1"'
+SectionEnd
+
+Section -AdditionalIcons
+  SetOutPath $INSTDIR
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Readme.lnk" "$INSTDIR\share\tiemu\Readme.txt"
+  !insertmacro MUI_STARTMENU_WRITE_END
+SectionEnd
+
+Section -Post
+  WriteUninstaller "$INSTDIR\uninst.exe"
+  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\tiemu.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\tiemu.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
+SectionEnd
+
+
+Function un.onUninstSuccess
+  HideWindow
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
+FunctionEnd
+
+Function un.onInit
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+  Abort
+FunctionEnd
+
+Section Uninstall
+  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
+
+; File associations
+  DeleteRegKey HKCR "TiEmu.Rom"
+  DeleteRegKey HKCR ".rom"
+  DeleteRegKey HKCR "TiEmu.Sav"
+  DeleteRegKey HKCR ".sav"
+
+; OLE Unregistration
+  UnregDLL "$INSTDIR\bin\tiemups.dll"
+  ExecWait '"$INSTDIR\bin\tiemu.exe" /UnregServer'
+
+  Delete "$INSTDIR\${PRODUCT_NAME}.url"
+  Delete "$INSTDIR\uninst.exe"
+  Delete "$INSTDIR\man\mann\iwidgets_watch.n"
+  Delete "$INSTDIR\man\mann\iwidgets_toolbar.n"
+  Delete "$INSTDIR\man\mann\iwidgets_timefield.n"
+  Delete "$INSTDIR\man\mann\iwidgets_timeentry.n"
+  Delete "$INSTDIR\man\mann\iwidgets_tabset.n"
+  Delete "$INSTDIR\man\mann\iwidgets_tabnotebook.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spintime.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spinner.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spinint.n"
+  Delete "$INSTDIR\man\mann\iwidgets_spindate.n"
+  Delete "$INSTDIR\man\mann\iwidgets_shell.n"
+  Delete "$INSTDIR\man\mann\iwidgets_selectiondialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_selectionbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledtext.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledlistbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledhtml.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledframe.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scrolledcanvas.n"
+  Delete "$INSTDIR\man\mann\iwidgets_scopedobject.n"
+  Delete "$INSTDIR\man\mann\iwidgets_radiobox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_pushbutton.n"
+  Delete "$INSTDIR\man\mann\iwidgets_promptdialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_panedwindow.n"
+  Delete "$INSTDIR\man\mann\iwidgets_optionmenu.n"
+  Delete "$INSTDIR\man\mann\iwidgets_notebook.n"
+  Delete "$INSTDIR\man\mann\iwidgets_messagedialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_messagebox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_menubar.n"
+  Delete "$INSTDIR\man\mann\iwidgets_mainwindow.n"
+  Delete "$INSTDIR\man\mann\iwidgets_labeledwidget.n"
+  Delete "$INSTDIR\man\mann\iwidgets_labeledframe.n"
+  Delete "$INSTDIR\man\mann\iwidgets_hyperhelp.n"
+  Delete "$INSTDIR\man\mann\iwidgets_hierarchy.n"
+  Delete "$INSTDIR\man\mann\iwidgets_finddialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_fileselectiondialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_fileselectionbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_feedback.n"
+  Delete "$INSTDIR\man\mann\iwidgets_extfileselectiondialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_extfileselectionbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_extbutton.n"
+  Delete "$INSTDIR\man\mann\iwidgets_entryfield.n"
+  Delete "$INSTDIR\man\mann\iwidgets_disjointlistbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_dialogshell.n"
+  Delete "$INSTDIR\man\mann\iwidgets_dialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_datefield.n"
+  Delete "$INSTDIR\man\mann\iwidgets_dateentry.n"
+  Delete "$INSTDIR\man\mann\iwidgets_combobox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_checkbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_canvasprintdialog.n"
+  Delete "$INSTDIR\man\mann\iwidgets_canvasprintbox.n"
+  Delete "$INSTDIR\man\mann\iwidgets_calendar.n"
+  Delete "$INSTDIR\man\mann\iwidgets_buttonbox.n"
+  Delete "$INSTDIR\man\mann\usual.n"
+  Delete "$INSTDIR\man\mann\itkvars.n"
+  Delete "$INSTDIR\man\mann\itk.n"
+  Delete "$INSTDIR\man\mann\Widget.n"
+  Delete "$INSTDIR\man\mann\Toplevel.n"
+  Delete "$INSTDIR\man\mann\Archetype.n"
+  Delete "$INSTDIR\man\mann\scope.n"
+  Delete "$INSTDIR\man\mann\local.n"
+  Delete "$INSTDIR\man\mann\itclvars.n"
+  Delete "$INSTDIR\man\mann\itcl_info.n"
+  Delete "$INSTDIR\man\mann\itcl_class.n"
+  Delete "$INSTDIR\man\mann\itcl.n"
+  Delete "$INSTDIR\man\mann\find.n"
+  Delete "$INSTDIR\man\mann\ensemble.n"
+  Delete "$INSTDIR\man\mann\delete.n"
+  Delete "$INSTDIR\man\mann\configbody.n"
+  Delete "$INSTDIR\man\mann\code.n"
+  Delete "$INSTDIR\man\mann\class.n"
+  Delete "$INSTDIR\man\mann\body.n"
+  Delete "$INSTDIR\share\man\man1\tiemu.1"
+  Delete "$INSTDIR\share\insight1.0\tclIndex"
+  Delete "$INSTDIR\share\insight1.0\vartree.itb"
+  Delete "$INSTDIR\share\insight1.0\targetselection.itb"
+  Delete "$INSTDIR\share\insight1.0\stackwin.itb"
+  Delete "$INSTDIR\share\insight1.0\srcwin.itb"
+  Delete "$INSTDIR\share\insight1.0\srctextwin.itb"
+  Delete "$INSTDIR\share\insight1.0\srcpref.itb"
+  Delete "$INSTDIR\share\insight1.0\regwin.itb"
+  Delete "$INSTDIR\share\insight1.0\process.itb"
+  Delete "$INSTDIR\share\insight1.0\memwin.itb"
+  Delete "$INSTDIR\share\insight1.0\mempref.itb"
+  Delete "$INSTDIR\share\insight1.0\managedwin.itb"
+  Delete "$INSTDIR\share\insight1.0\kod.itb"
+  Delete "$INSTDIR\share\insight1.0\ipcpref.itb"
+  Delete "$INSTDIR\share\insight1.0\globalpref.itb"
+  Delete "$INSTDIR\share\insight1.0\gdbevent.itb"
+  Delete "$INSTDIR\share\insight1.0\ehandler.itb"
+  Delete "$INSTDIR\share\insight1.0\download.itb"
+  Delete "$INSTDIR\share\insight1.0\debugwin.itb"
+  Delete "$INSTDIR\share\insight1.0\cspref.itb"
+  Delete "$INSTDIR\share\insight1.0\console.itb"
+  Delete "$INSTDIR\share\insight1.0\browserwin.itb"
+  Delete "$INSTDIR\share\insight1.0\bpwin.itb"
+  Delete "$INSTDIR\share\insight1.0\blockframe.itb"
+  Delete "$INSTDIR\share\insight1.0\attachdlg.itb"
+  Delete "$INSTDIR\share\insight1.0\vartree.ith"
+  Delete "$INSTDIR\share\insight1.0\toplevelwin.ith"
+  Delete "$INSTDIR\share\insight1.0\targetselection.ith"
+  Delete "$INSTDIR\share\insight1.0\stackwin.ith"
+  Delete "$INSTDIR\share\insight1.0\srcwin.ith"
+  Delete "$INSTDIR\share\insight1.0\srctextwin.ith"
+  Delete "$INSTDIR\share\insight1.0\srcpref.ith"
+  Delete "$INSTDIR\share\insight1.0\regwin.ith"
+  Delete "$INSTDIR\share\insight1.0\process.ith"
+  Delete "$INSTDIR\share\insight1.0\memwin.ith"
+  Delete "$INSTDIR\share\insight1.0\mempref.ith"
+  Delete "$INSTDIR\share\insight1.0\managedwin.ith"
+  Delete "$INSTDIR\share\insight1.0\kod.ith"
+  Delete "$INSTDIR\share\insight1.0\ipcpref.ith"
+  Delete "$INSTDIR\share\insight1.0\globalpref.ith"
+  Delete "$INSTDIR\share\insight1.0\gdbwin.ith"
+  Delete "$INSTDIR\share\insight1.0\gdbevent.ith"
+  Delete "$INSTDIR\share\insight1.0\embeddedwin.ith"
+  Delete "$INSTDIR\share\insight1.0\ehandler.ith"
+  Delete "$INSTDIR\share\insight1.0\download.ith"
+  Delete "$INSTDIR\share\insight1.0\debugwin.ith"
+  Delete "$INSTDIR\share\insight1.0\cspref.ith"
+  Delete "$INSTDIR\share\insight1.0\console.ith"
+  Delete "$INSTDIR\share\insight1.0\browserwin.ith"
+  Delete "$INSTDIR\share\insight1.0\bpwin.ith"
+  Delete "$INSTDIR\share\insight1.0\blockframe.ith"
+  Delete "$INSTDIR\share\insight1.0\attachdlg.ith"
+  Delete "$INSTDIR\share\insight1.0\srcbar.itcl"
+  Delete "$INSTDIR\share\insight1.0\pluginwin.itcl"
+  Delete "$INSTDIR\share\insight1.0\gdbtoolbar.itcl"
+  Delete "$INSTDIR\share\insight1.0\gdbmenubar.itcl"
+  Delete "$INSTDIR\share\insight1.0\watch.tcl"
+  Delete "$INSTDIR\share\insight1.0\warning.tcl"
+  Delete "$INSTDIR\share\insight1.0\util.tcl"
+  Delete "$INSTDIR\share\insight1.0\tty.tcl"
+  Delete "$INSTDIR\share\insight1.0\tracedlg.tcl"
+  Delete "$INSTDIR\share\insight1.0\tfind_args.tcl"
+  Delete "$INSTDIR\share\insight1.0\tdump.tcl"
+  Delete "$INSTDIR\share\insight1.0\session.tcl"
+  Delete "$INSTDIR\share\insight1.0\prefs.tcl"
+  Delete "$INSTDIR\share\insight1.0\modal.tcl"
+  Delete "$INSTDIR\share\insight1.0\main.tcl"
+  Delete "$INSTDIR\share\insight1.0\locals.tcl"
+  Delete "$INSTDIR\share\insight1.0\ipc.tcl"
+  Delete "$INSTDIR\share\insight1.0\interface.tcl"
+  Delete "$INSTDIR\share\insight1.0\helpviewer.tcl"
+  Delete "$INSTDIR\share\insight1.0\editor.tcl"
+  Delete "$INSTDIR\share\insight1.0\actiondlg.tcl"
+  Delete "$INSTDIR\share\insight1.0\about.tcl"
+  Delete "$INSTDIR\share\insight1.0\help\watch.html"
+  Delete "$INSTDIR\share\insight1.0\help\thread.html"
+  Delete "$INSTDIR\share\insight1.0\help\target.html"
+  Delete "$INSTDIR\share\insight1.0\help\stack.html"
+  Delete "$INSTDIR\share\insight1.0\help\src_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\source.html"
+  Delete "$INSTDIR\share\insight1.0\help\session.html"
+  Delete "$INSTDIR\share\insight1.0\help\register.html"
+  Delete "$INSTDIR\share\insight1.0\help\memory.html"
+  Delete "$INSTDIR\share\insight1.0\help\locals.html"
+  Delete "$INSTDIR\share\insight1.0\help\license.html"
+  Delete "$INSTDIR\share\insight1.0\help\index.html"
+  Delete "$INSTDIR\share\insight1.0\help\help.html"
+  Delete "$INSTDIR\share\insight1.0\help\gbl_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\debug.html"
+  Delete "$INSTDIR\share\insight1.0\help\console.html"
+  Delete "$INSTDIR\share\insight1.0\help\browser.html"
+  Delete "$INSTDIR\share\insight1.0\help\breakpoint.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\index.toc"
+  Delete "$INSTDIR\share\insight1.0\help\trace\watch.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\tracedlg.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\tp.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\tdump.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\target.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\stack.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\src_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\source.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\register.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\reg_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\memory.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\locals.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\license.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\help.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\gbl_pref.html"
+  Delete "$INSTDIR\share\insight1.0\help\trace\console.html"
+  Delete "$INSTDIR\share\insight1.0\help\images\watch.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\reg_menu.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\reg.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\insightbwr.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\browser2.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\browser1.png"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_toolbar.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_thread.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_stat.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_pop.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_menu.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_bpop.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_bp_bal.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\src_bal.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\mem_pref.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\mem_popup.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\mem_menu.gif"
+  Delete "$INSTDIR\share\insight1.0\help\images\frame_info.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\icons.txt"
+  Delete "$INSTDIR\share\insight1.0\images2\watch_movie.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\watch.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\vars.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\up.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\tp.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\tdump.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\target.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\stop.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\stepi.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\step.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\stack.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\src.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\run_expt.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\run.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\rewind.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\reg.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\prev_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\open.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\nexti.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_line.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_frame.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next_check.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\next.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\more.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\memory.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\less.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\insight.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\home.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\help.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\gdbtk_icon.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\function.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\finish.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\edit.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\down.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\continue.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\console.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\check.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\bp.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\bottom.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\Movie_on.gif"
+  Delete "$INSTDIR\share\insight1.0\images2\Movie_off.gif"
+  Delete "$INSTDIR\share\insight1.0\images\icons.txt"
+  Delete "$INSTDIR\share\insight1.0\images\watch_movie.gif"
+  Delete "$INSTDIR\share\insight1.0\images\watch.gif"
+  Delete "$INSTDIR\share\insight1.0\images\vars.gif"
+  Delete "$INSTDIR\share\insight1.0\images\up.gif"
+  Delete "$INSTDIR\share\insight1.0\images\tp.gif"
+  Delete "$INSTDIR\share\insight1.0\images\tdump.gif"
+  Delete "$INSTDIR\share\insight1.0\images\stop.gif"
+  Delete "$INSTDIR\share\insight1.0\images\stepi.gif"
+  Delete "$INSTDIR\share\insight1.0\images\step.gif"
+  Delete "$INSTDIR\share\insight1.0\images\stack.gif"
+  Delete "$INSTDIR\share\insight1.0\images\src.gif"
+  Delete "$INSTDIR\share\insight1.0\images\run_expt.gif"
+  Delete "$INSTDIR\share\insight1.0\images\run.gif"
+  Delete "$INSTDIR\share\insight1.0\images\rewind.gif"
+  Delete "$INSTDIR\share\insight1.0\images\reg.gif"
+  Delete "$INSTDIR\share\insight1.0\images\prev_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images\open.gif"
+  Delete "$INSTDIR\share\insight1.0\images\nexti.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_line.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_hit.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_frame.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next_check.gif"
+  Delete "$INSTDIR\share\insight1.0\images\next.gif"
+  Delete "$INSTDIR\share\insight1.0\images\more.gif"
+  Delete "$INSTDIR\share\insight1.0\images\memory.gif"
+  Delete "$INSTDIR\share\insight1.0\images\less.gif"
+  Delete "$INSTDIR\share\insight1.0\images\insight.gif"
+  Delete "$INSTDIR\share\insight1.0\images\home.gif"
+  Delete "$INSTDIR\share\insight1.0\images\help.gif"
+  Delete "$INSTDIR\share\insight1.0\images\gdbtk_icon.gif"
+  Delete "$INSTDIR\share\insight1.0\images\finish.gif"
+  Delete "$INSTDIR\share\insight1.0\images\edit.gif"
+  Delete "$INSTDIR\share\insight1.0\images\down.gif"
+  Delete "$INSTDIR\share\insight1.0\images\continue.gif"
+  Delete "$INSTDIR\share\insight1.0\images\console.gif"
+  Delete "$INSTDIR\share\insight1.0\images\check.gif"
+  Delete "$INSTDIR\share\insight1.0\images\bp.gif"
+  Delete "$INSTDIR\share\insight1.0\images\bottom.gif"
+  Delete "$INSTDIR\share\insight1.0\images\Movie_on.gif"
+  Delete "$INSTDIR\share\insight1.0\images\Movie_off.gif"
+  Delete "$INSTDIR\share\redhat\gui\panedwindow.tcl"
+  Delete "$INSTDIR\share\redhat\gui\pane.tcl"
+  Delete "$INSTDIR\share\redhat\gui\combobox.tcl"
+  Delete "$INSTDIR\share\redhat\gui\ventry.tcl"
+  Delete "$INSTDIR\share\redhat\gui\wingrab.tcl"
+  Delete "$INSTDIR\share\redhat\gui\wframe.tcl"
+  Delete "$INSTDIR\share\redhat\gui\ulset.tcl"
+  Delete "$INSTDIR\share\redhat\gui\toolbar.tcl"
+  Delete "$INSTDIR\share\redhat\gui\topbind.tcl"
+  Delete "$INSTDIR\share\redhat\gui\sendpr.tcl"
+  Delete "$INSTDIR\share\redhat\gui\print.tcl"
+  Delete "$INSTDIR\share\redhat\gui\prefs.tcl"
+  Delete "$INSTDIR\share\redhat\gui\postghost.tcl"
+  Delete "$INSTDIR\share\redhat\gui\path.tcl"
+  Delete "$INSTDIR\share\redhat\gui\parse_args.tcl"
+  Delete "$INSTDIR\share\redhat\gui\multibox.tcl"
+  Delete "$INSTDIR\share\redhat\gui\mono.tcl"
+  Delete "$INSTDIR\share\redhat\gui\menu.tcl"
+  Delete "$INSTDIR\share\redhat\gui\looknfeel.tcl"
+  Delete "$INSTDIR\share\redhat\gui\list.tcl"
+  Delete "$INSTDIR\share\redhat\gui\lframe.tcl"
+  Delete "$INSTDIR\share\redhat\gui\hooks.tcl"
+  Delete "$INSTDIR\share\redhat\gui\gettext.tcl"
+  Delete "$INSTDIR\share\redhat\gui\gensym.tcl"
+  Delete "$INSTDIR\share\redhat\gui\font.tcl"
+  Delete "$INSTDIR\share\redhat\gui\internet.tcl"
+  Delete "$INSTDIR\share\redhat\gui\def.tcl"
+  Delete "$INSTDIR\share\redhat\gui\debug.tcl"
+  Delete "$INSTDIR\share\redhat\gui\center.tcl"
+  Delete "$INSTDIR\share\redhat\gui\cframe.tcl"
+  Delete "$INSTDIR\share\redhat\gui\canvas.tcl"
+  Delete "$INSTDIR\share\redhat\gui\bindings.tcl"
+  Delete "$INSTDIR\share\redhat\gui\bgerror.tcl"
+  Delete "$INSTDIR\share\redhat\gui\bbox.tcl"
+  Delete "$INSTDIR\share\redhat\gui\balloon.tcl"
+  Delete "$INSTDIR\share\redhat\gui\advice.tcl"
+  Delete "$INSTDIR\share\redhat\gui\pkgIndex.tcl"
+  Delete "$INSTDIR\share\redhat\gui\tclIndex"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\watch"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\toolbar"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\timefield"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\timeentry"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\tabset"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\tabnotebook"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spintime"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spinner"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spinint"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\spindate"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\shell"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\selectiondialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\selectionbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledtext"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledlistbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledhtml"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledframe"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scrolledcanvas"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\scopedobject"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\radiobox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\pushbutton"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\promptdialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\panedwindow"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\optionmenu"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\notebook"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\messagedialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\messagebox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\menubar"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\mainwindow"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\labeledwidget"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\labeledframe"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\iwidgets.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\hyperhelp"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\hierarchy"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\finddialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\fileselectiondialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\fileselectionbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\feedback"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\extfileselectiondialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\extfileselectionbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\extbutton"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\entryfield"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\disjointlistbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\dialogshell"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\dialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\demo.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\datefield"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\dateentry"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\combobox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\checkbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\catalog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\canvasprintdialog"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\canvasprintbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\calendar"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\buttonbox"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\watch.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\toolbar.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\timefield.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\timeentry.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\tabset.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\tabnotebook.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spintime.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spinner.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spinint.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\spindate.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\shell.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\selectiondialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\selectionbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledtext.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledlistbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledhtml.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledframe.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scrolledcanvas.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\scopedobject.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\radiobox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\pushbutton.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\promptdialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\panedwindow.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\optionmenu.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\notebook.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\messagedialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\messagebox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\menubar.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\mainwindow.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\labeledwidget.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\labeledframe.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\iwidgets4.0.0UserCmds.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\hyperhelp.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\hierarchy.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\finddialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\fileselectiondialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\fileselectionbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\feedback.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\extfileselectiondialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\extfileselectionbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\extbutton.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\entryfield.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\disjointlistbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\dialogshell.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\dialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\datefield.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\dateentry.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\combobox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\checkbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\canvasprintdialog.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\canvasprintbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\calendar.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\html\buttonbox.n.html"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\text.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\select.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\save.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\ruler.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\print.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\poly.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\points.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\paste.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\oval.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\open.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\new.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\mag.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\line.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\help.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\find.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\exit.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\cut.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\copy.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\close.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\clear.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\demos\images\box.xbm"
+  Delete "$INSTDIR\share\iwidgets4.0.1\license.terms"
+  Delete "$INSTDIR\share\iwidgets4.0.1\pkgIndex.tcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\iwidgets.tcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\unknownimage.gif"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\tclIndex"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scopedobject.itcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\roman.itcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\colors.itcl"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\watch.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\toolbar.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\timefield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\timeentry.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\tabset.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\tabnotebook.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spintime.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spinner.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spinint.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\spindate.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\shell.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\selectiondialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\selectionbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledwidget.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledtext.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledlistbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledhtml.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledframe.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\scrolledcanvas.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\regexpfield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\radiobox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\pushbutton.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\promptdialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\panedwindow.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\pane.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\optionmenu.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\notebook.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\messagedialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\messagebox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\menubar.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\mainwindow.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\labeledwidget.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\labeledframe.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\hyperhelp.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\hierarchy.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\finddialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\fileselectiondialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\fileselectionbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\feedback.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\extfileselectiondialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\extfileselectionbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\extbutton.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\entryfield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\disjointlistbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\dialogshell.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\dialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\datefield.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\dateentry.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\combobox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\checkbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\canvasprintdialog.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\canvasprintbox.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\calendar.itk"
+  Delete "$INSTDIR\share\iwidgets4.0.1\scripts\buttonbox.itk"
+  Delete "$INSTDIR\share\itk3.2\tclIndex"
+  Delete "$INSTDIR\share\itk3.2\itk.tcl"
+  Delete "$INSTDIR\share\itk3.2\Widget.itk"
+  Delete "$INSTDIR\share\itk3.2\Toplevel.itk"
+  Delete "$INSTDIR\share\itk3.2\Archetype.itk"
+  Delete "$INSTDIR\share\itcl3.2\itcl.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\widget"
+  Delete "$INSTDIR\share\tk8.4\demos\vscale.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\twind.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\timer"
+  Delete "$INSTDIR\share\tk8.4\demos\text.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\tcolor"
+  Delete "$INSTDIR\share\tk8.4\demos\tclIndex"
+  Delete "$INSTDIR\share\tk8.4\demos\style.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\states.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\square"
+  Delete "$INSTDIR\share\tk8.4\demos\spin.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\search.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\sayings.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\ruler.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\rolodex"
+  Delete "$INSTDIR\share\tk8.4\demos\rmt"
+  Delete "$INSTDIR\share\tk8.4\demos\radio.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\puzzle.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\plot.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\paned2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\paned1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\msgbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\menubu.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\menu.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\license.terms"
+  Delete "$INSTDIR\share\tk8.4\demos\labelframe.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\label.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\ixset"
+  Delete "$INSTDIR\share\tk8.4\demos\items.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\image2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\image1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\icon.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\hscale.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\hello"
+  Delete "$INSTDIR\share\tk8.4\demos\form.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\floor.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\filebox.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\entry3.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\entry2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\entry1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\dialog2.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\dialog1.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\ctext.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\cscroll.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\colors.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\clrpick.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\check.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\button.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\browse"
+  Delete "$INSTDIR\share\tk8.4\demos\bitmap.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\bind.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\arrow.tcl"
+  Delete "$INSTDIR\share\tk8.4\demos\README"
+  Delete "$INSTDIR\share\tk8.4\demos\images\teapot.ppm"
+  Delete "$INSTDIR\share\tk8.4\demos\images\tcllogo.gif"
+  Delete "$INSTDIR\share\tk8.4\demos\images\pattern.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\noletter.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\letters.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\gray25.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\flagup.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\flagdown.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\face.bmp"
+  Delete "$INSTDIR\share\tk8.4\demos\images\earthris.gif"
+  Delete "$INSTDIR\share\tk8.4\demos\images\earth.gif"
+  Delete "$INSTDIR\share\tk8.4\tkAppInit.c"
+  Delete "$INSTDIR\share\tk8.4\tclIndex"
+  Delete "$INSTDIR\share\tk8.4\prolog.ps"
+  Delete "$INSTDIR\share\tk8.4\xmfbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\unsupported.tcl"
+  Delete "$INSTDIR\share\tk8.4\tkfbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\tk.tcl"
+  Delete "$INSTDIR\share\tk8.4\text.tcl"
+  Delete "$INSTDIR\share\tk8.4\tearoff.tcl"
+  Delete "$INSTDIR\share\tk8.4\spinbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\scrlbar.tcl"
+  Delete "$INSTDIR\share\tk8.4\scale.tcl"
+  Delete "$INSTDIR\share\tk8.4\safetk.tcl"
+  Delete "$INSTDIR\share\tk8.4\panedwindow.tcl"
+  Delete "$INSTDIR\share\tk8.4\palette.tcl"
+  Delete "$INSTDIR\share\tk8.4\optMenu.tcl"
+  Delete "$INSTDIR\share\tk8.4\obsolete.tcl"
+  Delete "$INSTDIR\share\tk8.4\msgbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\mkpsenc.tcl"
+  Delete "$INSTDIR\share\tk8.4\menu.tcl"
+  Delete "$INSTDIR\share\tk8.4\listbox.tcl"
+  Delete "$INSTDIR\share\tk8.4\focus.tcl"
+  Delete "$INSTDIR\share\tk8.4\entry.tcl"
+  Delete "$INSTDIR\share\tk8.4\dialog.tcl"
+  Delete "$INSTDIR\share\tk8.4\console.tcl"
+  Delete "$INSTDIR\share\tk8.4\comdlg.tcl"
+  Delete "$INSTDIR\share\tk8.4\clrpick.tcl"
+  Delete "$INSTDIR\share\tk8.4\choosedir.tcl"
+  Delete "$INSTDIR\share\tk8.4\button.tcl"
+  Delete "$INSTDIR\share\tk8.4\bgerror.tcl"
+  Delete "$INSTDIR\share\tk8.4\msgs\ru.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\nl.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\it.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\fr.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\es.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\en_gb.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\en.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\el.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\de.msg"
+  Delete "$INSTDIR\share\tk8.4\msgs\cs.msg"
+  Delete "$INSTDIR\share\tk8.4\images\tai-ku.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo75.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo200.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo175.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo150.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo100.gif"
+  Delete "$INSTDIR\share\tk8.4\images\pwrdLogo.eps"
+  Delete "$INSTDIR\share\tk8.4\images\logoMed.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logoLarge.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logo64.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logo100.gif"
+  Delete "$INSTDIR\share\tk8.4\images\logo.eps"
+  Delete "$INSTDIR\share\tk8.4\images\README"
+  Delete "$INSTDIR\share\tcl8.4\tclIndex"
+  Delete "$INSTDIR\share\tcl8.4\word.tcl"
+  Delete "$INSTDIR\share\tcl8.4\safe.tcl"
+  Delete "$INSTDIR\share\tcl8.4\parray.tcl"
+  Delete "$INSTDIR\share\tcl8.4\package.tcl"
+  Delete "$INSTDIR\share\tcl8.4\ldAout.tcl"
+  Delete "$INSTDIR\share\tcl8.4\init.tcl"
+  Delete "$INSTDIR\share\tcl8.4\history.tcl"
+  Delete "$INSTDIR\share\tcl8.4\auto.tcl"
+  Delete "$INSTDIR\share\tcl8.4\tcltest2.2\tcltest.tcl"
+  Delete "$INSTDIR\share\tcl8.4\tcltest2.2\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\msgcat1.3\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\msgcat1.3\msgcat.tcl"
+  Delete "$INSTDIR\share\tcl8.4\encoding\tis-620.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\symbol.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\shiftjis.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macUkraine.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macTurkish.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macThai.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macRomania.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macRoman.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macJapan.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macIceland.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macGreek.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macDingbats.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macCyrillic.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macCroatian.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\macCentEuro.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\ksc5601.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\koi8-u.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\koi8-r.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\jis0212.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\jis0208.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\jis0201.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-9.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-8.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-7.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-6.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-5.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-4.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-3.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-2.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-16.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-15.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-14.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-13.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-10.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso8859-1.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso2022.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso2022-kr.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\iso2022-jp.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\gb2312.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\gb1988.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\gb12345.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\euc-kr.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\euc-jp.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\euc-cn.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\ebcdic.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\dingbats.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp950.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp949.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp936.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp932.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp874.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp869.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp866.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp865.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp864.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp863.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp862.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp861.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp860.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp857.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp855.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp852.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp850.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp775.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp737.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp437.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1258.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1257.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1256.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1255.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1254.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1253.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1252.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1251.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\cp1250.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\big5.enc"
+  Delete "$INSTDIR\share\tcl8.4\encoding\ascii.enc"
+  Delete "$INSTDIR\share\tcl8.4\opt0.4\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\opt0.4\optparse.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http2.4\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http2.4\http.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http1.0\pkgIndex.tcl"
+  Delete "$INSTDIR\share\tcl8.4\http1.0\http.tcl"
+  Delete "$INSTDIR\share\tiemu\LICENSES"
+  Delete "$INSTDIR\share\tiemu\AUTHORS"
+  Delete "$INSTDIR\share\tiemu\RELEASE"
+  Delete "$INSTDIR\share\tiemu\COPYING"
+  Delete "$INSTDIR\share\tiemu\Manpage.txt"
+  Delete "$INSTDIR\share\tiemu\Readme.txt"
+  Delete "$INSTDIR\share\tiemu\skins\ti92_fr.map"
+  Delete "$INSTDIR\share\tiemu\skins\ti92.map"
+  Delete "$INSTDIR\share\tiemu\skins\ti89_fr.map"
+  Delete "$INSTDIR\share\tiemu\skins\ti89.map"
+  Delete "$INSTDIR\share\tiemu\skins\v200plt.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ti92.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ti89t.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ti89.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ipaq_v200plt.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ipaq_92.skn"
+  Delete "$INSTDIR\share\tiemu\skins\ipaq_89.skn"
+  Delete "$INSTDIR\share\tiemu\pixmaps\void.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\run_2.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\run_1.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\romdump.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\romdump.ico"
+  Delete "$INSTDIR\share\tiemu\pixmaps\logo.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\icon.xpm"
+  Delete "$INSTDIR\share\tiemu\pixmaps\bkpt.xpm"
+  Delete "$INSTDIR\share\tiemu\misc\romcalls.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_v200_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti92p_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti92p_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti92_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89t_hw4.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89t_hw3.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\memmap_ti89_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_v200_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti92p_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti92p_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti92_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89t_hw4.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89t_hw3.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89_hw2.txt"
+  Delete "$INSTDIR\share\tiemu\misc\iodefs_ti89_hw1.txt"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom.txt"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedromv2.tib"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom9x.tib"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom89ti.tib"
+  Delete "$INSTDIR\share\tiemu\pedrom\pedrom89.tib"
+  Delete "$INSTDIR\share\tiemu\help\tiemu.jpg"
+  Delete "$INSTDIR\share\tiemu\help\skinedit.jpg"
+  Delete "$INSTDIR\share\tiemu\help\wizard.png"
+  Delete "$INSTDIR\share\tiemu\help\screenshot.png"
+  Delete "$INSTDIR\share\tiemu\help\romversion.png"
+  Delete "$INSTDIR\share\tiemu\help\popup_menu.png"
+  Delete "$INSTDIR\share\tiemu\help\no_skin.png"
+  Delete "$INSTDIR\share\tiemu\help\logo_tiemu.png"
+  Delete "$INSTDIR\share\tiemu\help\logo_lpg.png"
+  Delete "$INSTDIR\share\tiemu\help\log_link.png"
+  Delete "$INSTDIR\share\tiemu\help\linkport.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_stack.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_sr.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_source.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_search.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_registers.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_mem.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_heap.png"
+  Delete "$INSTDIR\share\tiemu\help\dbg_bkpts.png"
+  Delete "$INSTDIR\share\tiemu\help\calc_infos.png"
+  Delete "$INSTDIR\share\tiemu\help\chapter22.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter21.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter20.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter11.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter10.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter09.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter08.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter07.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter06.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter05.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter04.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter03.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter02.html"
+  Delete "$INSTDIR\share\tiemu\help\chapter01.html"
+  Delete "$INSTDIR\share\tiemu\help\Manual_en.html"
+  Delete "$INSTDIR\share\tiemu\help\FAQ.html"
+  Delete "$INSTDIR\share\tiemu\glade\wizard-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\scroptions-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\romversion-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\release-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\quicksend-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\popup-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\pbars-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\manpage-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\log_link-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\infos-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dboxes-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_vectors-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_stack-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_regs-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_pclog-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_mem-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_ioports-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_heap-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_entry-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_dock-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_data-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_code-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_cause-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_bkpts-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\dbg_bits-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\device-2.glade"
+  Delete "$INSTDIR\share\tiemu\glade\calc-2.glade"
+  Delete "$INSTDIR\include\itkDecls.h"
+  Delete "$INSTDIR\include\itk.h"
+  Delete "$INSTDIR\include\itclIntDecls.h"
+  Delete "$INSTDIR\include\itclInt.h"
+  Delete "$INSTDIR\include\itclDecls.h"
+  Delete "$INSTDIR\include\itcl.h"
+  Delete "$INSTDIR\include\tkDecls.h"
+  Delete "$INSTDIR\include\tkIntXlibDecls.h"
+  Delete "$INSTDIR\include\tkPlatDecls.h"
+  Delete "$INSTDIR\include\tk.h"
+  Delete "$INSTDIR\include\X11\keysymdef.h"
+  Delete "$INSTDIR\include\X11\keysym.h"
+  Delete "$INSTDIR\include\X11\cursorfont.h"
+  Delete "$INSTDIR\include\X11\Xutil.h"
+  Delete "$INSTDIR\include\X11\Xlib.h"
+  Delete "$INSTDIR\include\X11\Xfuncproto.h"
+  Delete "$INSTDIR\include\X11\Xatom.h"
+  Delete "$INSTDIR\include\X11\X.h"
+  Delete "$INSTDIR\include\tclPlatDecls.h"
+  Delete "$INSTDIR\include\tclDecls.h"
+  Delete "$INSTDIR\include\tcl.h"
+  Delete "$INSTDIR\include\tilp2\ticonv.h"
+  Delete "$INSTDIR\include\tilp2\charset.h"
+  Delete "$INSTDIR\include\tilp2\ticalcs.h"
+  Delete "$INSTDIR\include\tilp2\keys92p.h"
+  Delete "$INSTDIR\include\tilp2\keys89.h"
+  Delete "$INSTDIR\include\tilp2\keys83p.h"
+  Delete "$INSTDIR\include\tilp2\keys73.h"
+  Delete "$INSTDIR\include\tilp2\typesxx.h"
+  Delete "$INSTDIR\include\tilp2\typesnsp.h"
+  Delete "$INSTDIR\include\tilp2\typesv2.h"
+  Delete "$INSTDIR\include\tilp2\types92p.h"
+  Delete "$INSTDIR\include\tilp2\types92.h"
+  Delete "$INSTDIR\include\tilp2\types89t.h"
+  Delete "$INSTDIR\include\tilp2\types89.h"
+  Delete "$INSTDIR\include\tilp2\types86.h"
+  Delete "$INSTDIR\include\tilp2\types85.h"
+  Delete "$INSTDIR\include\tilp2\types84p.h"
+  Delete "$INSTDIR\include\tilp2\types83p.h"
+  Delete "$INSTDIR\include\tilp2\types83.h"
+  Delete "$INSTDIR\include\tilp2\types82.h"
+  Delete "$INSTDIR\include\tilp2\types73.h"
+  Delete "$INSTDIR\include\tilp2\tifiles.h"
+  Delete "$INSTDIR\include\tilp2\stdints4.h"
+  Delete "$INSTDIR\include\tilp2\stdints3.h"
+  Delete "$INSTDIR\include\tilp2\stdints2.h"
+  Delete "$INSTDIR\include\tilp2\stdints1.h"
+  Delete "$INSTDIR\include\tilp2\files9x.h"
+  Delete "$INSTDIR\include\tilp2\files8x.h"
+  Delete "$INSTDIR\include\tilp2\timeout.h"
+  Delete "$INSTDIR\include\tilp2\ticables.h"
+  Delete "$INSTDIR\include\tilp2\export4.h"
+  Delete "$INSTDIR\include\tilp2\export3.h"
+  Delete "$INSTDIR\include\tilp2\export2.h"
+  Delete "$INSTDIR\include\tilp2\export1.h"
+  Delete "$INSTDIR\bin\itk32.dll"
+  Delete "$INSTDIR\bin\itcl32.dll"
+  Delete "$INSTDIR\bin\wish84.exe"
+  Delete "$INSTDIR\bin\tk84.dll"
+  Delete "$INSTDIR\bin\tclpip84.dll"
+  Delete "$INSTDIR\bin\tclsh84.exe"
+  Delete "$INSTDIR\bin\tcl84.dll"
+  Delete "$INSTDIR\bin\tiemups.dll"
+  Delete "$INSTDIR\bin\tiemu.tlb"
+  Delete "$INSTDIR\bin\tiemu.exe"
+  Delete "$INSTDIR\bin\libusb0.dll"
+  Delete "$INSTDIR\bin\libticonv-3.dll"
+  Delete "$INSTDIR\bin\libticalcs2-7.dll"
+  Delete "$INSTDIR\bin\libtifiles2-5.dll"
+  Delete "$INSTDIR\bin\libticables2-1.dll"
+  Delete "$INSTDIR\lib\libitkstub32.a"
+  Delete "$INSTDIR\lib\itk3.2\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\libitclstub32.a"
+  Delete "$INSTDIR\lib\itcl3.2\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\libtkstub84.a"
+  Delete "$INSTDIR\lib\libtk84.a"
+  Delete "$INSTDIR\lib\tkConfig.sh"
+  Delete "$INSTDIR\lib\tk8.4\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\libtclstub84.a"
+  Delete "$INSTDIR\lib\libtcl84.a"
+  Delete "$INSTDIR\lib\tclConfig.sh"
+  Delete "$INSTDIR\lib\reg1.1\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\reg1.1\tclreg11.dll"
+  Delete "$INSTDIR\lib\dde1.2\pkgIndex.tcl"
+  Delete "$INSTDIR\lib\dde1.2\tcldde12.dll"
+  Delete "$INSTDIR\lib\libticonv.la"
+  Delete "$INSTDIR\lib\libticonv.dll.a"
+  Delete "$INSTDIR\lib\libticalcs2.la"
+  Delete "$INSTDIR\lib\libticalcs2.dll.a"
+  Delete "$INSTDIR\lib\libtifiles2.la"
+  Delete "$INSTDIR\lib\libtifiles2.dll.a"
+  Delete "$INSTDIR\lib\pkgconfig\ticonv.pc"
+  Delete "$INSTDIR\lib\pkgconfig\ticalcs2.pc"
+  Delete "$INSTDIR\lib\pkgconfig\tifiles2.pc"
+  Delete "$INSTDIR\lib\pkgconfig\ticables2.pc"
+  Delete "$INSTDIR\lib\libticables2.la"
+  Delete "$INSTDIR\lib\libticables2.dll.a"
+
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Readme.lnk"
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
+  Delete "$DESKTOP\TiEmu.lnk"
+  Delete "$SMPROGRAMS\$ICONS_GROUP\TiEmu.lnk"
+
+  RMDir "$SMPROGRAMS\$ICONS_GROUP"
+  RMDir "$INSTDIR\share\tk8.4\msgs"
+  RMDir "$INSTDIR\share\tk8.4\images"
+  RMDir "$INSTDIR\share\tk8.4\demos\images"
+  RMDir "$INSTDIR\share\tk8.4\demos"
+  RMDir "$INSTDIR\share\tk8.4"
+  RMDir "$INSTDIR\share\tiemu\skins"
+  RMDir "$INSTDIR\share\tiemu\pixmaps"
+  RMDir "$INSTDIR\share\tiemu\pedrom"
+  RMDir "$INSTDIR\share\tiemu\misc"
+  RMDir "$INSTDIR\share\tiemu\help"
+  RMDir "$INSTDIR\share\tiemu\glade"
+  RMDir "$INSTDIR\share\tiemu\images"
+  RMDir "$INSTDIR\share\tiemu"
+  RMDir "$INSTDIR\share\tcl8.4\tcltest2.2"
+  RMDir "$INSTDIR\share\tcl8.4\opt0.4"
+  RMDir "$INSTDIR\share\tcl8.4\msgcat1.3"
+  RMDir "$INSTDIR\share\tcl8.4\http2.4"
+  RMDir "$INSTDIR\share\tcl8.4\http1.0"
+  RMDir "$INSTDIR\share\tcl8.4\encoding"
+  RMDir "$INSTDIR\share\tcl8.4"
+  RMDir "$INSTDIR\share\redhat\gui"
+  RMDir "$INSTDIR\share\redhat"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\scripts"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\demos\images"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\demos\html"
+  RMDir "$INSTDIR\share\iwidgets4.0.1\demos"
+  RMDir "$INSTDIR\share\iwidgets4.0.1"
+  RMDir "$INSTDIR\share\itk3.2"
+  RMDir "$INSTDIR\share\itcl3.2"
+  RMDir "$INSTDIR\share\insight1.0\images2"
+  RMDir "$INSTDIR\share\insight1.0\images"
+  RMDir "$INSTDIR\share\insight1.0\help\trace"
+  RMDir "$INSTDIR\share\insight1.0\help\images"
+  RMDir "$INSTDIR\share\insight1.0\help"
+  RMDir "$INSTDIR\share\insight1.0"
+  RMDir "$INSTDIR\share\man\man1"
+  RMDir "$INSTDIR\share\man"
+  RMDir "$INSTDIR\share"
+  RMDir "$INSTDIR\man\mann"
+  RMDir "$INSTDIR\man"
+  RMDir "$INSTDIR\lib\tk8.4"
+  RMDir "$INSTDIR\lib\reg1.1"
+  RMDir "$INSTDIR\lib\pkgconfig"
+  RMDir "$INSTDIR\lib\itk3.2"
+  RMDir "$INSTDIR\lib\itcl3.2"
+  RMDir "$INSTDIR\lib\dde1.2"
+  RMDir "$INSTDIR\lib"
+  RMDir "$INSTDIR\include\X11"
+  RMDir "$INSTDIR\include\tilp2"
+  RMDir "$INSTDIR\include"
+  RMDir "$INSTDIR\bin"
+  RMDir "$INSTDIR"
+
+  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+  SetAutoClose true
+SectionEnd
diff --git a/build/nsis/vercmp.nsi b/build/nsis/vercmp.nsi
new file mode 100644
index 0000000..c566b3e
--- /dev/null
+++ b/build/nsis/vercmp.nsi
@@ -0,0 +1,112 @@
+; This file comes from the NSIS archive.
+
+;-----------------------------------------------------------------------------
+ ; CompareVersions
+ ; input:
+ ;    top of stack = existing version
+ ;    top of stack-1 = needed version
+ ; output:
+ ;    top of stack = 1 if current version => neded version, else 0
+ ; version is a string in format "xx.xx.xx.xx" (number of interger sections 
+ ; can be different in needed and existing versions)
+
+Function CompareVersions
+   ; stack: existing ver | needed ver
+   Exch $R0 
+   Exch
+   Exch $R1 
+   ; stack: $R1|$R0
+
+   Push $R1
+   Push $R0
+   ; stack: e|n|$R1|$R0
+
+   ClearErrors
+   loop:
+      IfErrors VersionNotFound
+      Strcmp $R0 "" VersionTestEnd
+
+      Call ParseVersion
+      Pop $R0
+      Exch
+
+      Call ParseVersion
+      Pop $R1 
+      Exch
+
+      IntCmp $R1 $R0 +1 VersionOk VersionNotFound
+      Pop $R0
+      Push $R0
+
+   goto loop
+   
+   VersionTestEnd:
+      Pop $R0
+      Pop $R1
+      Push $R1
+      Push $R0
+      StrCmp $R0 $R1 VersionOk VersionNotFound
+
+   VersionNotFound:
+      StrCpy $R0 "0"
+      Goto end
+      
+   VersionOk:
+      StrCpy $R0 "1"
+end:
+   ; stack: e|n|$R1|$R0
+   Exch $R0
+   Pop $R0
+   Exch $R0
+   ; stack: res|$R1|$R0
+   Exch
+   ; stack: $R1|res|$R0
+   Pop $R1
+   ; stack: res|$R0
+   Exch
+   Pop $R0
+   ; stack: res
+FunctionEnd
+
+;---------------------------------------------------------------------------------------
+ ; ParseVersion
+ ; input:
+ ;      top of stack = version string ("xx.xx.xx.xx")
+ ; output: 
+ ;      top of stack   = first number in version ("xx")
+ ;      top of stack-1 = rest of the version string ("xx.xx.xx")
+Function ParseVersion
+   Exch $R1 ; version
+   Push $R2
+   Push $R3
+
+   StrCpy $R2 1
+   loop:
+      StrCpy $R3 $R1 1 $R2
+      StrCmp $R3 "." loopend
+      StrLen $R3 $R1
+      IntCmp $R3 $R2 loopend loopend
+      IntOp $R2 $R2 + 1
+      Goto loop
+   loopend:
+   Push $R1
+   StrCpy $R1 $R1 $R2
+   Exch $R1
+
+   StrLen $R3 $R1
+   IntOp $R3 $R3 - $R2
+   IntOp $R2 $R2 + 1
+   StrCpy $R1 $R1 $R3 $R2
+
+   Push $R1
+   
+   Exch 2
+   Pop $R3
+   
+   Exch 2
+   Pop $R2
+
+   Exch 2
+   Pop $R1
+FunctionEnd
+;---------------------------------------------------------------------------------------
diff --git a/compile b/compile
new file mode 100755
index 0000000..9bb997a
--- /dev/null
+++ b/compile
@@ -0,0 +1,99 @@
+#! /bin/sh
+
+# Wrapper for compilers which do not understand `-c -o'.
+
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 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.
+
+# Usage:
+# compile PROGRAM [ARGS]...
+# `-o FOO.o' is removed from the args passed to the actual compile.
+
+prog=$1
+shift
+
+ofile=
+cfile=
+args=
+while test $# -gt 0; do
+   case "$1" in
+    -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we do something ugly here.
+       ofile=$2
+       shift
+       case "$ofile" in
+	*.o | *.obj)
+	   ;;
+	*)
+	   args="$args -o $ofile"
+	   ofile=
+	   ;;
+       esac
+       ;;
+    *.c)
+       cfile=$1
+       args="$args $1"
+       ;;
+    *)
+       args="$args $1"
+       ;;
+   esac
+   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 "$prog" $args
+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.
+"$prog" $args
+status=$?
+
+if test -f "$cofile"; then
+   mv "$cofile" "$ofile"
+fi
+
+rmdir $lockdir
+exit $status
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..278f9e9
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1516 @@
+#! /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 Free Software Foundation,
+#   Inc.
+
+timestamp='2007-07-22'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$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 at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    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 __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *: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'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-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*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		echo x86_64-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 ;;
+    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 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa:Linux:*:*)
+    	echo xtensa-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    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
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..e448911
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,495 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#undef ENABLE_NLS
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the `argz_count' function. */
+#undef HAVE_ARGZ_COUNT
+
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define to 1 if you have the `argz_next' function. */
+#undef HAVE_ARGZ_NEXT
+
+/* Define to 1 if you have the `argz_stringify' function. */
+#undef HAVE_ARGZ_STRINGIFY
+
+/* Define to 1 if you have the `asprintf' function. */
+#undef HAVE_ASPRINTF
+
+/* Define to 1 if the compiler understands __builtin_expect. */
+#undef HAVE_BUILTIN_EXPECT
+
+/* Define to 1 if you have the `bzero' function. */
+#undef HAVE_BZERO
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Defines if your system has the crypt function */
+#undef HAVE_CRYPT
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNPRINTF
+
+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNWPRINTF
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Use -fvisibility=hidden flag */
+#undef HAVE_FVISIBILITY
+
+/* Define to 1 if you have the `fwprintf' function. */
+#undef HAVE_FWPRINTF
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getegid' function. */
+#undef HAVE_GETEGID
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgid' function. */
+#undef HAVE_GETGID
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `getuid' function. */
+#undef HAVE_GETUID
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* Define if you have libjpeg */
+#undef HAVE_LIBJPEG
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define if you have libpng */
+#undef HAVE_LIBPNG
+
+/* Define if you have a working libpthread (will enable threaded code) */
+#undef HAVE_LIBPTHREAD
+
+/* Define if you have libz */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the 'long double' type. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `mkdir' function. */
+#undef HAVE_MKDIR
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if
+   _GNU_SOURCE is defined. */
+#undef HAVE_NL_LOCALE_NAME
+
+/* Define if your printf() function supports format strings with positions. */
+#undef HAVE_POSIX_PRINTF
+
+/* Define to 1 if you have the <pthread/linuxthreads/pthread.h> header file.
+   */
+#undef HAVE_PTHREAD_LINUXTHREADS_PTHREAD_H
+
+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
+#undef HAVE_PTHREAD_MUTEX_RECURSIVE
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#undef HAVE_PTHREAD_RWLOCK
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the res_init function */
+#undef HAVE_RES_INIT
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+   zero-length file name argument. */
+#undef HAVE_STAT_EMPTY_STRING_BUG
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <tilp2/ticables.h> header file. */
+#undef HAVE_TILP2_TICABLES_H
+
+/* Define to 1 if you have the <tilp2/ticalcs.h> header file. */
+#undef HAVE_TILP2_TICALCS_H
+
+/* Define to 1 if you have the <tilp2/tifiles.h> header file. */
+#undef HAVE_TILP2_TIFILES_H
+
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the 'unsigned long long' type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+   declarations. */
+#undef HAVE_VISIBILITY
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define if you have the 'wchar_t' type. */
+#undef HAVE_WCHAR_T
+
+/* Define to 1 if you have the `wcslen' function. */
+#undef HAVE_WCSLEN
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
+/* Define if you want Xinerama support */
+#undef HAVE_XINERAMA
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#undef INTDIV0_RAISES_SIGFPE
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* Defined to disable the debugger */
+#undef NO_DEBUGGER
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
+/* Define if the pthread_in_use() detection is hard. */
+#undef PTHREAD_IN_USE_DETECTION_HARD
+
+/* Define to the type of arg 1 for `select'. */
+#undef SELECT_TYPE_ARG1
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#undef SELECT_TYPE_ARG234
+
+/* Define to the type of arg 5 for `select'. */
+#undef SELECT_TYPE_ARG5
+
+/* The size of `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of `char *', as computed by sizeof. */
+#undef SIZEOF_CHAR_P
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#undef SIZE_MAX
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if the POSIX multithreading library can be used. */
+#undef USE_POSIX_THREADS
+
+/* Define if references to the POSIX multithreading library should be made
+   weak. */
+#undef USE_POSIX_THREADS_WEAK
+
+/* Define if the GNU Pth multithreading library can be used. */
+#undef USE_PTH_THREADS
+
+/* Define if references to the GNU Pth multithreading library should be made
+   weak. */
+#undef USE_PTH_THREADS_WEAK
+
+/* Define if the old Solaris multithreading library can be used. */
+#undef USE_SOLARIS_THREADS
+
+/* Define if references to the old Solaris multithreading library should be
+   made weak. */
+#undef USE_SOLARIS_THREADS_WEAK
+
+/* Define if the Win32 multithreading API can be used. */
+#undef USE_WIN32_THREADS
+
+/* Version number of package */
+#undef VERSION
+
+/* Use D-Bus support */
+#undef WITH_DBUS
+
+/* Use KDE support */
+#undef WITH_KDE
+
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Compatibility define */
+#undef ksize_t
+
+/* Define as the type of the result of subtracting two pointers, if the system
+   doesn't define it. */
+#undef ptrdiff_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define the real type of socklen_t */
+#undef socklen_t
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
+
+
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init     libintl_lock_init
+#define glthread_lock_lock     libintl_lock_lock
+#define glthread_lock_unlock   libintl_lock_unlock
+#define glthread_lock_destroy  libintl_lock_destroy
+#define glthread_rwlock_init     libintl_rwlock_init
+#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
+#define glthread_rwlock_unlock   libintl_rwlock_unlock
+#define glthread_rwlock_destroy  libintl_rwlock_destroy
+#define glthread_recursive_lock_init     libintl_recursive_lock_init
+#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
+#define glthread_once                 libintl_once
+#define glthread_once_call            libintl_once_call
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+
diff --git a/config.rpath b/config.rpath
new file mode 100755
index 0000000..c492a93
--- /dev/null
+++ b/config.rpath
@@ -0,0 +1,614 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2006 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    darwin*)
+      case $cc_basename in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    mingw* | pw32* | os2*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux*)
+      case $cc_basename in
+        icc* | ecc*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+        *)
+          case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ C*)
+              wl='-Wl,'
+              ;;
+          esac
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # Set some defaults for GNU ld with shared library support. These
+  # are reset later if shared libraries are not supported. Putting them
+  # here allows them to be overridden if necessary.
+  # Unlike libtool, we use -rpath here, not --rpath, since the documented
+  # option of GNU ld is called -rpath, not --rpath.
+  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we cannot use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    interix3*)
+      hardcode_direct=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+          ld_shlibs=no
+          ;;
+        *)
+          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+          else
+            ld_shlibs=no
+          fi
+          ;;
+      esac
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = no; then
+    hardcode_libdir_flag_spec=
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+          ;;
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            hardcode_direct=yes
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          ;;
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case $cc_basename in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        hardcode_direct=yes
+        # hardcode_minus_L: Not really in the search PATH,
+        # but as the default location of the library.
+        hardcode_minus_L=yes
+      fi
+      ;;
+    hpux11*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct=no
+            ;;
+          *)
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      hardcode_direct=yes
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      else
+        case "$host_os" in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+        esac
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      ;;
+    sysv5* | sco3.2v5* | sco5v6*)
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    ;;
+  aix4* | aix5*)
+    ;;
+  amigaos*)
+    ;;
+  beos*)
+    ;;
+  bsdi[45]*)
+    ;;
+  cygwin* | mingw* | pw32*)
+    shrext=.dll
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    ;;
+  dgux*)
+    ;;
+  freebsd1*)
+    ;;
+  kfreebsd*-gnu)
+    ;;
+  freebsd* | dragonfly*)
+    ;;
+  gnu*)
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case $host_cpu in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    ;;
+  interix3*)
+    ;;
+  irix5* | irix6* | nonstopux*)
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux*)
+    ;;
+  knetbsd*-gnu)
+    ;;
+  netbsd*)
+    ;;
+  newsos6)
+    ;;
+  nto-qnx*)
+    ;;
+  openbsd*)
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    ;;
+  osf3* | osf4* | osf5*)
+    ;;
+  solaris*)
+    ;;
+  sunos4*)
+    ;;
+  sysv4 | sysv4.3*)
+    ;;
+  sysv4*MP*)
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    ;;
+  uts4*)
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..5defff6
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1622 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
+
+timestamp='2007-01-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 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.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted 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.
+
+# 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 <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       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-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-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 \
+	| 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 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| score \
+	| sh | sh[1234] | sh[24]a | 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 | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-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-* \
+	| 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-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| 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-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| 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-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | 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-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	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
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	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
+		;;
+	cr16c)
+		basic_machine=cr16c-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
+		;;
+	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'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	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-/'`
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	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
+		;;
+	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)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	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
+		;;
+	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
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	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
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	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[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.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -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* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -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*)
+	# 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
+		;;
+	-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
+		;;
+	# 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
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	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
+				;;
+			-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/configure b/configure
new file mode 100755
index 0000000..97b90aa
--- /dev/null
+++ b/configure
@@ -0,0 +1,36645 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for TiEmu 3.03.
+#
+# Report bugs to <tiemu-users at lists.sourceforge.net>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf at gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "$0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='TiEmu'
+PACKAGE_TARNAME='tiemu'
+PACKAGE_VERSION='3.03'
+PACKAGE_STRING='TiEmu 3.03'
+PACKAGE_BUGREPORT='tiemu-users at lists.sourceforge.net'
+
+ac_default_prefix=/usr/local
+ac_unique_file="src/gui/main.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+gt_needs=
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+am__isrc
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+MAINTAINER_MODE_TRUE
+MAINTAINER_MODE_FALSE
+MAINT
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+SED
+GREP
+EGREP
+LN_S
+ECHO
+AR
+RANLIB
+DSYMUTIL
+NMEDIT
+DLLTOOL
+AS
+OBJDUMP
+CPP
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+CXXCPP
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+GROFF
+USE_GROFF_TRUE
+USE_GROFF_FALSE
+RC
+USE_NLS
+GETTEXT_MACRO_VERSION
+MSGFMT
+GMSGFMT
+MSGFMT_015
+GMSGFMT_015
+XGETTEXT
+XGETTEXT_015
+MSGMERGE
+XGETTEXT_EXTRA_OPTIONS
+INTL_MACOSX_LIBS
+LIBICONV
+LTLIBICONV
+INTLLIBS
+LIBINTL
+LTLIBINTL
+POSUB
+INCINTL
+PKG_CONFIG
+TICABLES_CFLAGS
+TICABLES_LIBS
+TICALCS_CFLAGS
+TICALCS_LIBS
+TIFILES_CFLAGS
+TIFILES_LIBS
+TICONV_CFLAGS
+TICONV_LIBS
+GLIB_CFLAGS
+GLIB_LIBS
+GTK_CFLAGS
+GTK_LIBS
+GLADE_CFLAGS
+GLADE_LIBS
+DBUS_GLIB_CFLAGS
+DBUS_GLIB_LIBS
+dbus
+LIBOBJS
+LIBZ
+SDL_CONFIG
+SDL_CFLAGS
+SDL_LIBS
+LIBUTIL
+LIBCOMPAT
+LIBCRYPT
+LIBSOCKET
+LIBRESOLV
+X_EXTRA_LIBS
+LIBUCB
+LIBDL
+XMKMF
+X_INCLUDES
+X_LDFLAGS
+x_libraries
+x_includes
+LIBSM
+X_PRE_LIBS
+LIB_X11
+LIBXINERAMA
+QTE_NORTTI
+LIB_XEXT
+LIBPTHREAD
+USE_THREADS
+KDE_MT_LDFLAGS
+KDE_MT_LIBS
+USER_INCLUDES
+USER_LDFLAGS
+LIBPNG
+LIBJPEG
+qt_libraries
+qt_includes
+QT_INCLUDES
+QT_LDFLAGS
+MOC
+UIC
+UIC_TR
+LIB_QT
+LIB_QPE
+kde_qtver
+KDE_EXTRA_RPATH
+KDE_RPATH
+kde_libraries
+kde_includes
+KDE_LDFLAGS
+KDE_INCLUDES
+all_includes
+all_libraries
+AUTODIRS
+DCOPIDL
+DCOPIDL2CPP
+DCOP_DEPENDENCIES
+KDECONFIG
+kde_libs_prefix
+kde_libs_htmldir
+kde_htmldir
+kde_appsdir
+kde_icondir
+kde_sounddir
+kde_datadir
+kde_locale
+kde_confdir
+kde_mimedir
+kde_wallpaperdir
+kde_bindir
+kde_templatesdir
+kde_servicesdir
+kde_servicetypesdir
+kde_moduledir
+kde_styledir
+kde_widgetdir
+LIB_KDECORE
+LIB_KDEUI
+LIB_KIO
+LIB_SMB
+LIB_KAB
+LIB_KHTML
+LIB_KSPELL
+LIB_KPARTS
+LIB_KDEPRINT
+LIB_KSYCOCA
+LIB_KFILE
+LIB_KFM
+kde
+NO_GDB_TRUE
+NO_GDB_FALSE
+subdirs
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+F77
+FFLAGS
+PKG_CONFIG
+TICABLES_CFLAGS
+TICABLES_LIBS
+TICALCS_CFLAGS
+TICALCS_LIBS
+TIFILES_CFLAGS
+TIFILES_LIBS
+TICONV_CFLAGS
+TICONV_LIBS
+GLIB_CFLAGS
+GLIB_LIBS
+GTK_CFLAGS
+GTK_LIBS
+GLADE_CFLAGS
+GLADE_LIBS
+DBUS_GLIB_CFLAGS
+DBUS_GLIB_LIBS
+XMKMF'
+ac_subdirs_all='src/gdb'
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_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=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures TiEmu 3.03 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/tiemu]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of TiEmu 3.03:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --enable-static[=PKGS]  build static libraries [default=no]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-nls           do not use Native Language Support
+  --disable-rpath         do not hardcode runtime library paths
+  --disable-sound         disable sound emulation
+  --disable-sdltest       Do not try to compile and run a test SDL program
+  --enable-embedded       link to Qt-embedded, don't use X
+  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment
+  --disable-mt            link to non-threaded Qt (deprecated)
+  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.
+  --disable-threading     disables threading even if libpthread found
+  --disable-rpath         do not use the rpath feature of ld
+  --disable-path-check    don't try to find out, where to install
+  --disable-debugger      disable the built-in debugger
+  --disable-gdb           disable the GDB-based source-level debugger
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-tags[=TAGS]      include additional configurations [automatic]
+  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
+  --without-libintl-prefix     don't search for libintl in includedir and libdir
+  --with-dbus             Compile with D-Bus support
+  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)
+  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)
+  --without-kde           Compile without KDE support
+  --with-xinerama         enable support for Xinerama
+  --with-extra-includes=DIR
+                          adds non standard include paths
+  --with-extra-libs=DIR   adds non standard library paths
+  --with-qt-dir=DIR       where the root of Qt is installed
+  --with-qt-includes=DIR  where the Qt includes are.
+  --with-qt-libraries=DIR where the Qt library is installed.
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  PKG_CONFIG  path to pkg-config utility
+  TICABLES_CFLAGS
+              C compiler flags for TICABLES, overriding pkg-config
+  TICABLES_LIBS
+              linker flags for TICABLES, overriding pkg-config
+  TICALCS_CFLAGS
+              C compiler flags for TICALCS, overriding pkg-config
+  TICALCS_LIBS
+              linker flags for TICALCS, overriding pkg-config
+  TIFILES_CFLAGS
+              C compiler flags for TIFILES, overriding pkg-config
+  TIFILES_LIBS
+              linker flags for TIFILES, overriding pkg-config
+  TICONV_CFLAGS
+              C compiler flags for TICONV, overriding pkg-config
+  TICONV_LIBS linker flags for TICONV, overriding pkg-config
+  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
+  GLADE_CFLAGS
+              C compiler flags for GLADE, overriding pkg-config
+  GLADE_LIBS  linker flags for GLADE, overriding pkg-config
+  DBUS_GLIB_CFLAGS
+              C compiler flags for DBUS_GLIB, overriding pkg-config
+  DBUS_GLIB_LIBS
+              linker flags for DBUS_GLIB, 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 <tiemu-users at lists.sourceforge.net>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+TiEmu configure 3.03
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by TiEmu $as_me 3.03, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+gt_needs="$gt_needs "
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+am__api_version='1.10'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+
+          test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
+  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
+  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
+  # Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+  if test -z "$kde_save_INSTALL_given" ; then
+    # OK, user hasn't given any INSTALL, autoconf found one for us
+    # now we test, if it supports the -p flag
+    { echo "$as_me:$LINENO: checking for -p flag to install" >&5
+echo $ECHO_N "checking for -p flag to install... $ECHO_C" >&6; }
+    rm -f confinst.$$.* > /dev/null 2>&1
+    echo "Testtest" > confinst.$$.orig
+    ac_res=no
+    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
+      if test -f confinst.$$.new ; then
+        # OK, -p seems to do no harm to install
+	INSTALL="${INSTALL} -p"
+	ac_res=yes
+      fi
+    fi
+    rm -f confinst.$$.*
+    { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+  fi
+
+  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
+    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+  fi
+  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
+    INSTALL_SCRIPT='${INSTALL}'
+  fi
+
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+
+  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.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+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
+    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+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='tiemu'
+ VERSION='3.03'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&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"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&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
+
+  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$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_headers="$ac_config_headers config.h"
+
+ac_config_files="$ac_config_files Makefile build/Makefile glade/Makefile help/Makefile man/Makefile misc/Makefile pedrom/Makefile pixmaps/Makefile po/Makefile.in skins/Makefile src/Makefile tiemu.lsm tiemu.spec"
+
+
+{ echo "$as_me:$LINENO: checking for something to drink while compiling" >&5
+echo $ECHO_N "checking for something to drink while compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: err: no fridge found!" >&5
+echo "${ECHO_T}err: no fridge found!" >&6; }
+
+# Setup libtool.
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=no
+fi
+
+
+
+
+
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+# Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort.  b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions.  Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+
+{ echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6; }
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+    # Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_GREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+    # Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_EGREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+
+   fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+NM="$lt_cv_path_NM"
+
+{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 4603 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_i386_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_x86_64_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  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
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	lt_cv_cc_needs_belf=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     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
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { echo "$as_me:$LINENO: result: $DLLTOOL" >&5
+echo "${ECHO_T}$DLLTOOL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_DLLTOOL="dlltool"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
+echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  { echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
+echo "${ECHO_T}$ac_ct_AS" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_AS" = x; then
+    AS="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    AS=$ac_ct_AS
+  fi
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+echo "${ECHO_T}$OBJDUMP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
+echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  ;;
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$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=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
+
+depcc="$CXX"  am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_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
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$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 "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  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
+{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+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
+
+fi
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_prog_f77_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+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
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+# find the maximum length of command line arguments
+{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ 	]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	      lt_cv_sys_max_cmd_len=$new_result &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on massive
+      # amounts of additional arguments before passing them to the linker.
+      # It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6; }
+fi
+
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux* | k*bsd*-gnu)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDGIRSTW]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6; }
+else
+  { echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+echo "${ECHO_T}$DSYMUTIL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { echo "$as_me:$LINENO: result: $NMEDIT" >&5
+echo "${ECHO_T}$NMEDIT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+echo "${ECHO_T}$ac_ct_NMEDIT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+
+    { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+   # By default we will add the -single_module flag. You can override
+   # by either setting the environment variable LT_MULTI_MODULE
+   # non-empty at configure time, or by adding -multi_module to the
+   # link flags.
+   echo "int foo(void){return 1;}" > conftest.c
+   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+     -dynamiclib ${wl}-single_module conftest.c
+   if test -f libconftest.dylib; then
+     lt_cv_apple_cc_single_mod=yes
+     rm -rf libconftest.dylib*
+   fi
+   rm conftest.c
+      fi
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; }
+    { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  lt_cv_ld_exported_symbols_list=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	lt_cv_ld_exported_symbols_list=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[0123])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*)
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+   10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+   10.[012]*)
+     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+   10.*)
+     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil="~$DSYMUTIL \$lib || :"
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+
+enable_dlopen=no
+enable_win32_dll=yes
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+lt_save_CC="$CC"
+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
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm -r conftest*
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7950: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7954: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic='-qnocommon'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8240: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:8244: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $rm -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8344: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:8348: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  whole_archive_flag_spec=
+  thread_safe_flag_spec=
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_direct=no
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
+  always_export_symbols=no
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+	link_all_deplibs=no
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  hardcode_direct=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L=yes
+  	  hardcode_libdir_flag_spec='-L$libdir'
+  	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc=no
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      whole_archive_flag_spec=''
+      link_all_deplibs=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+        module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+        archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+        module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	hardcode_direct=yes
+	export_dynamic_flag_spec='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld='+b $libdir'
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var" || \
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         old_striplib="$STRIP -S"
+         { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+       ;;
+   *)
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    { echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* 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 shl_load ();
+/* 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_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  { echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* 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 dlopen ();
+/* 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_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_svld_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_dld_link=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 10721 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 10821 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# Report which library types will actually be built
+{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix[4-9]*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+{ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+{ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6; }
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    export_dynamic_flag_spec \
+    thread_safe_flag_spec \
+    whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
+    old_archive_cmds \
+    old_archive_from_new_cmds \
+    predep_objects \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    compiler_lib_search_dirs \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    no_undefined_flag \
+    export_symbols_cmds \
+    hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
+    hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
+    lt_cv_prog_compiler_c_o \
+    fix_srcfile_path \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    old_archive_from_new_cmds | \
+    archive_cmds | \
+    archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
+    old_archive_from_expsyms_cmds | \
+    export_symbols_cmds | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  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
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags was given.
+if test "${with_tags+set}" = set; then
+  withval=$with_tags; tagnames="$withval"
+fi
+
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  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
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+compiler_lib_search_dirs_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm -r conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_CXX=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  aix[4-9]*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  :
+	else
+	  # We have old collect2
+	  hardcode_direct_CXX=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_CXX=yes
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  hardcode_libdir_separator_CXX=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag_CXX='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag_CXX="-z nodefs"
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	no_undefined_flag_CXX=' ${wl}-bernotok'
+	allow_undefined_flag_CXX=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	whole_archive_flag_spec_CXX='$convenience'
+	archive_cmds_need_lc_CXX=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag_CXX=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+      archive_cmds_need_lc_CXX=no
+      hardcode_direct_CXX=no
+      hardcode_automatic_CXX=yes
+      hardcode_shlibpath_var_CXX=unsupported
+      whole_archive_flag_spec_CXX=''
+      link_all_deplibs_CXX=yes
+      allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+      if test "$GXX" = yes ; then
+      output_verbose_link_cmd='echo'
+      archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+      module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+      module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+        archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+        archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      fi
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_CXX=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    ld_shlibs_CXX=no
+    ;;
+  freebsd-elf*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  freebsd* | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    aCC*)
+      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_CXX=:
+
+      case $host_cpu in
+      hppa*64*|ia64*) ;;
+      *)
+	export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  interix[3-9]*)
+    hardcode_direct_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	link_all_deplibs_CXX=yes
+	;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux* | k*bsd*-gnu)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	archive_cmds_need_lc_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC* | pgcpp*)
+        # Portland Group C++ compiler
+	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C++ 5.9
+	  no_undefined_flag_CXX=' -zdefs'
+	  archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+	  # Not sure whether something based on
+	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	  # would be better.
+	  output_verbose_link_cmd='echo'
+
+	  # Archives containing C++ object files must be created using
+	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	  # necessary to make sure instantiated templates are included
+	  # in the archive.
+	  old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	  ;;
+	esac
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  netbsd* | netbsdelf*-gnu)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    ld_shlibs_CXX=no
+    ;;
+  openbsd*)
+    if test -f /usr/libexec/ld.so; then
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      fi
+      output_verbose_link_cmd='echo'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx*)
+	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx*)
+	allow_undefined_flag_CXX=' -expect_unresolved \*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        archive_cmds_need_lc_CXX=yes
+	no_undefined_flag_CXX=' -zdefs'
+	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-R$libdir'
+	hardcode_shlibpath_var_CXX=no
+	case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    # The compiler driver will combine and reorder linker options,
+	    # but understands `-z linker_flag'.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	    ;;
+	esac
+	link_all_deplibs_CXX=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	  case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	  esac
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+    no_undefined_flag_CXX='${wl}-z,text'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    no_undefined_flag_CXX='${wl}-z,text'
+    allow_undefined_flag_CXX='${wl}-z,nodefs'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+    export_dynamic_flag_spec_CXX='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+compiler_lib_search_dirs_CXX=
+if test -n "$compiler_lib_search_path_CXX"; then
+  compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+    #
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           lt_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd* | netbsdelf*-gnu)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13222: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13226: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $rm -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13326: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13330: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+  ;;
+  linux* | k*bsd*-gnu)
+    link_all_deplibs_CXX=no
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" || \
+   test -n "$runpath_var_CXX" || \
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    export_dynamic_flag_spec_CXX \
+    thread_safe_flag_spec_CXX \
+    whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
+    old_archive_cmds_CXX \
+    old_archive_from_new_cmds_CXX \
+    predep_objects_CXX \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    compiler_lib_search_dirs_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    no_undefined_flag_CXX \
+    export_symbols_cmds_CXX \
+    hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
+    hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
+    lt_cv_prog_compiler_c_o_CXX \
+    fix_srcfile_path_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    old_archive_from_new_cmds_CXX | \
+    archive_cmds_CXX | \
+    archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
+    old_archive_from_expsyms_cmds_CXX | \
+    export_symbols_cmds_CXX | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  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
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="\
+      program t
+      end
+"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm -r conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix[4-9]*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+{ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6; }
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      else
+	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_F77='-qnocommon'
+         lt_prog_compiler_wl_F77='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-KPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fpic'
+	lt_prog_compiler_static_F77='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_F77='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_F77='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_pic_works_F77=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14924: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14928: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_static_works_F77=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_F77=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_F77=yes
+     fi
+   fi
+   $rm -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
+    :
+else
+    lt_prog_compiler_static_F77=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15028: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:15032: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_F77=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_F77=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_F77=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_F77='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+	link_all_deplibs_F77=no
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_F77=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_F77=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_F77=
+      export_dynamic_flag_spec_F77=
+      whole_archive_flag_spec_F77=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_F77=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_F77=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_F77=yes
+  	  hardcode_libdir_flag_spec_F77='-L$libdir'
+  	  hardcode_libdir_separator_F77=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_F77="-z nodefs"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_F77='$convenience'
+	  archive_cmds_need_lc_F77=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_F77=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_F77=no
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      whole_archive_flag_spec_F77=''
+      link_all_deplibs_F77=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+        module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+        archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+        module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_F77=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	hardcode_direct_F77=yes
+	export_dynamic_flag_spec_F77='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_F77=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	*)
+	  hardcode_direct_F77=yes
+	  export_dynamic_flag_spec_F77='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct_F77=yes
+	hardcode_shlibpath_var_F77=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec_F77='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_F77='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs_F77=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_F77='$CC -r -o $output$reload_objs'
+	  hardcode_direct_F77=no
+        ;;
+	motorola)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_F77=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_F77='${wl}-z,text'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_F77='${wl}-z,text'
+      allow_undefined_flag_F77='${wl}-z,nodefs'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6; }
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+	pic_flag=$lt_prog_compiler_pic_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+   test -n "$runpath_var_F77" || \
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6; }
+
+if test "$hardcode_action_F77" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    compiler_lib_search_dirs_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    fix_srcfile_path_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  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
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm -r conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+old_archive_cmds_GCJ=$old_archive_cmds
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17248: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:17252: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_GCJ=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_GCJ='-qnocommon'
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-KPIC'
+	lt_prog_compiler_static_GCJ='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-fpic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_GCJ='-KPIC'
+	  lt_prog_compiler_static_GCJ='-Bstatic'
+	  lt_prog_compiler_wl_GCJ='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_GCJ='-KPIC'
+	  lt_prog_compiler_static_GCJ='-Bstatic'
+	  lt_prog_compiler_wl_GCJ=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_GCJ='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_GCJ='-Kconform_pic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17538: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:17542: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_static_works_GCJ=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_GCJ=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_GCJ=yes
+     fi
+   fi
+   $rm -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then
+    :
+else
+    lt_prog_compiler_static_GCJ=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17642: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:17646: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_GCJ=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_GCJ=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=no
+      enable_shared_with_static_runtimes_GCJ=yes
+      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+	link_all_deplibs_GCJ=no
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_GCJ=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_GCJ=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_GCJ" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_GCJ=
+      export_dynamic_flag_spec_GCJ=
+      whole_archive_flag_spec_GCJ=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_GCJ=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_GCJ=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_GCJ=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_GCJ=yes
+  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+  	  hardcode_libdir_separator_GCJ=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_GCJ=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_GCJ="-z nodefs"
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_GCJ=' ${wl}-bernotok'
+	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_GCJ='$convenience'
+	  archive_cmds_need_lc_GCJ=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_GCJ='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_GCJ=no
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      whole_archive_flag_spec_GCJ=''
+      link_all_deplibs_GCJ=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+        module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+        archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+        module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_GCJ=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_GCJ=:
+
+	hardcode_direct_GCJ=yes
+	export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_GCJ=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_GCJ=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+	  ;;
+	*)
+	  hardcode_direct_GCJ=yes
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct_GCJ=yes
+	hardcode_shlibpath_var_GCJ=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+	  hardcode_direct_GCJ=no
+        ;;
+	motorola)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_GCJ=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_GCJ=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_GCJ='${wl}-z,text'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_GCJ='${wl}-z,text'
+      allow_undefined_flag_GCJ='${wl}-z,nodefs'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
+test "$ld_shlibs_GCJ" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+	pic_flag=$lt_prog_compiler_pic_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_GCJ=no
+        else
+	  archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
+fi
+
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+fi
+
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+   test -n "$runpath_var_GCJ" || \
+   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
+
+if test "$hardcode_action_GCJ" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    compiler_lib_search_dirs_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    fix_srcfile_path_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  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
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm -r conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+lt_cv_prog_compiler_c_o_RC=yes
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    compiler_lib_search_dirs_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    fix_srcfile_path_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  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
+
+CC="$lt_save_CC"
+
+	;;
+
+      *)
+	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
+if test "${ac_cv_search_strerror+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 strerror ();
+int
+main ()
+{
+return strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' cposix; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_search_strerror=$ac_res
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_strerror+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_strerror+set}" = set; then
+  :
+else
+  ac_cv_search_strerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
+ac_res=$ac_cv_search_strerror
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+# Extract the first word of "groff", so it can be a program name with args.
+set dummy groff; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_GROFF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$GROFF"; then
+  ac_cv_prog_GROFF="$GROFF" # 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_GROFF="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_GROFF" && ac_cv_prog_GROFF="no"
+fi
+fi
+GROFF=$ac_cv_prog_GROFF
+if test -n "$GROFF"; then
+  { echo "$as_me:$LINENO: result: $GROFF" >&5
+echo "${ECHO_T}$GROFF" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ if test "$GROFF" != "no"; then
+  USE_GROFF_TRUE=
+  USE_GROFF_FALSE='#'
+else
+  USE_GROFF_TRUE='#'
+  USE_GROFF_FALSE=
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_RC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RC"; then
+  ac_cv_prog_RC="$RC" # 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_RC="${ac_tool_prefix}windres"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+  { echo "$as_me:$LINENO: result: $RC" >&5
+echo "${ECHO_T}$RC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RC"; then
+  ac_ct_RC=$RC
+  # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_RC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RC"; then
+  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # 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_RC="windres"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RC=$ac_cv_prog_ac_ct_RC
+if test -n "$ac_ct_RC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_RC" >&5
+echo "${ECHO_T}$ac_ct_RC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_RC" = x; then
+    RC="windres"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    RC=$ac_ct_RC
+  fi
+else
+  RC="$ac_cv_prog_RC"
+fi
+
+
+# Checks for libraries.
+
+  { echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&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
+
+  { echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6; }
+
+
+
+
+      GETTEXT_MACRO_VERSION=0.17
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$MSGFMT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+    ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+  { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$XGETTEXT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    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
+  { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+    rm -f messages.po
+
+    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$MSGMERGE" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+    ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+  { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+        test -n "$localedir" || localedir='${datadir}/locale'
+
+
+    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+  ac_config_commands="$ac_config_commands po-directories"
+
+
+
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break ;;
+      *)
+	test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+                                                { echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; }
+if test "${acl_cv_rpath+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+echo "${ECHO_T}$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+  enableval=$enable_rpath; :
+else
+  enable_rpath=yes
+fi
+
+
+
+                  acl_libdirstem=lib
+  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+  if test -n "$searchpath"; then
+    acl_save_IFS="${IFS= 	}"; IFS=":"
+    for searchdir in $searchpath; do
+      if test -d "$searchdir"; then
+        case "$searchdir" in
+          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+          *) searchdir=`cd "$searchdir" && pwd`
+             case "$searchdir" in
+               */lib64 ) acl_libdirstem=lib64 ;;
+             esac ;;
+        esac
+      fi
+    done
+    IFS="$acl_save_IFS"
+  fi
+
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval=$with_libiconv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+
+fi
+
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  LIBICONV_PREFIX=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                LIBICONV_PREFIX="$basedir"
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
+echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1
+_ACEOF
+
+  fi
+    { echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
+echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  gt_cv_func_CFLocaleCopyCurrent=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	gt_cv_func_CFLocaleCopyCurrent=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFLOCALECOPYCURRENT 1
+_ACEOF
+
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+
+
+
+
+
+
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+    case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+    if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        { echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6; }
+if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$gt_func_gnugettext_libc=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$gt_func_gnugettext_libc=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$gt_func_gnugettext_libc'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+          am_save_CPPFLAGS="$CPPFLAGS"
+
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+  { echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
+if test "${am_cv_func_iconv+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  am_cv_func_iconv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+    { echo "$as_me:$LINENO: checking for working iconv" >&5
+echo $ECHO_N "checking for working iconv... $ECHO_C" >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+            am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      if test "$cross_compiling" = yes; then
+  case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          return 1;
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    return 1;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  am_cv_func_iconv_works=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+      LIBS="$am_save_LIBS"
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5
+echo "${ECHO_T}$am_cv_func_iconv_works" >&6; }
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    { echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; }
+    { echo "$as_me:$LINENO: result: $LIBICONV" >&5
+echo "${ECHO_T}$LIBICONV" >&6; }
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then
+  withval=$with_libintl_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+
+fi
+
+      LIBINTL=
+  LTLIBINTL=
+  INCINTL=
+  LIBINTL_PREFIX=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='intl '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+              else
+                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                LIBINTL_PREFIX="$basedir"
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+    done
+  fi
+
+          { echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6; }
+if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+                        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$gt_func_gnugettext_libintl=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$gt_func_gnugettext_libintl=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                eval "$gt_func_gnugettext_libintl=yes"
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"
+fi
+ac_res=`eval echo '${'$gt_func_gnugettext_libintl'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+        fi
+
+                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+                    LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  { echo "$as_me:$LINENO: checking whether to use NLS" >&5
+echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6; }
+  if test "$USE_NLS" = "yes"; then
+    { echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
+echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6; }
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    { echo "$as_me:$LINENO: result: $gt_source" >&5
+echo "${ECHO_T}$gt_source" >&6; }
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        { echo "$as_me:$LINENO: checking how to link with libintl" >&5
+echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; }
+        { echo "$as_me:$LINENO: result: $LIBINTL" >&5
+echo "${ECHO_T}$LIBINTL" >&6; }
+
+  for element in $INCINTL; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+      fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+    fi
+
+        POSUB=po
+  fi
+
+
+
+    INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+
+
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&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
+	{ echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	else
+		{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+		PKG_CONFIG=""
+	fi
+
+fi
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for TICABLES" >&5
+echo $ECHO_N "checking for TICABLES... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TICABLES_CFLAGS"; then
+        pkg_cv_TICABLES_CFLAGS="$TICABLES_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ticables2 >= 1.3.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ticables2 >= 1.3.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TICABLES_CFLAGS=`$PKG_CONFIG --cflags "ticables2 >= 1.3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TICABLES_LIBS"; then
+        pkg_cv_TICABLES_LIBS="$TICABLES_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ticables2 >= 1.3.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ticables2 >= 1.3.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TICABLES_LIBS=`$PKG_CONFIG --libs "ticables2 >= 1.3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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
+	        TICABLES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ticables2 >= 1.3.0"`
+        else
+	        TICABLES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ticables2 >= 1.3.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$TICABLES_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (ticables2 >= 1.3.0) were not met:
+
+$TICABLES_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 TICABLES_CFLAGS
+and TICABLES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (ticables2 >= 1.3.0) were not met:
+
+$TICABLES_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 TICABLES_CFLAGS
+and TICABLES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 TICABLES_CFLAGS
+and TICABLES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 TICABLES_CFLAGS
+and TICABLES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	TICABLES_CFLAGS=$pkg_cv_TICABLES_CFLAGS
+	TICABLES_LIBS=$pkg_cv_TICABLES_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for TICALCS" >&5
+echo $ECHO_N "checking for TICALCS... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TICALCS_CFLAGS"; then
+        pkg_cv_TICALCS_CFLAGS="$TICALCS_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ticalcs2 >= 1.0.7\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ticalcs2 >= 1.0.7") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TICALCS_CFLAGS=`$PKG_CONFIG --cflags "ticalcs2 >= 1.0.7" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TICALCS_LIBS"; then
+        pkg_cv_TICALCS_LIBS="$TICALCS_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ticalcs2 >= 1.0.7\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ticalcs2 >= 1.0.7") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TICALCS_LIBS=`$PKG_CONFIG --libs "ticalcs2 >= 1.0.7" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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
+	        TICALCS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ticalcs2 >= 1.0.7"`
+        else
+	        TICALCS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ticalcs2 >= 1.0.7"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$TICALCS_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (ticalcs2 >= 1.0.7) were not met:
+
+$TICALCS_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 TICALCS_CFLAGS
+and TICALCS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (ticalcs2 >= 1.0.7) were not met:
+
+$TICALCS_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 TICALCS_CFLAGS
+and TICALCS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 TICALCS_CFLAGS
+and TICALCS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 TICALCS_CFLAGS
+and TICALCS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	TICALCS_CFLAGS=$pkg_cv_TICALCS_CFLAGS
+	TICALCS_LIBS=$pkg_cv_TICALCS_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for TIFILES" >&5
+echo $ECHO_N "checking for TIFILES... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TIFILES_CFLAGS"; then
+        pkg_cv_TIFILES_CFLAGS="$TIFILES_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tifiles2 >= 1.0.7\"") >&5
+  ($PKG_CONFIG --exists --print-errors "tifiles2 >= 1.0.7") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TIFILES_CFLAGS=`$PKG_CONFIG --cflags "tifiles2 >= 1.0.7" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TIFILES_LIBS"; then
+        pkg_cv_TIFILES_LIBS="$TIFILES_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tifiles2 >= 1.0.7\"") >&5
+  ($PKG_CONFIG --exists --print-errors "tifiles2 >= 1.0.7") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TIFILES_LIBS=`$PKG_CONFIG --libs "tifiles2 >= 1.0.7" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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
+	        TIFILES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tifiles2 >= 1.0.7"`
+        else
+	        TIFILES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tifiles2 >= 1.0.7"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$TIFILES_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (tifiles2 >= 1.0.7) were not met:
+
+$TIFILES_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 TIFILES_CFLAGS
+and TIFILES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (tifiles2 >= 1.0.7) were not met:
+
+$TIFILES_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 TIFILES_CFLAGS
+and TIFILES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 TIFILES_CFLAGS
+and TIFILES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 TIFILES_CFLAGS
+and TIFILES_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	TIFILES_CFLAGS=$pkg_cv_TIFILES_CFLAGS
+	TIFILES_LIBS=$pkg_cv_TIFILES_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for TICONV" >&5
+echo $ECHO_N "checking for TICONV... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TICONV_CFLAGS"; then
+        pkg_cv_TICONV_CFLAGS="$TICONV_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ticonv >= 1.0.4\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ticonv >= 1.0.4") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TICONV_CFLAGS=`$PKG_CONFIG --cflags "ticonv >= 1.0.4" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TICONV_LIBS"; then
+        pkg_cv_TICONV_LIBS="$TICONV_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ticonv >= 1.0.4\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ticonv >= 1.0.4") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TICONV_LIBS=`$PKG_CONFIG --libs "ticonv >= 1.0.4" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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
+	        TICONV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ticonv >= 1.0.4"`
+        else
+	        TICONV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ticonv >= 1.0.4"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$TICONV_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (ticonv >= 1.0.4) were not met:
+
+$TICONV_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 TICONV_CFLAGS
+and TICONV_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (ticonv >= 1.0.4) were not met:
+
+$TICONV_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 TICONV_CFLAGS
+and TICONV_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 TICONV_CFLAGS
+and TICONV_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 TICONV_CFLAGS
+and TICONV_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	TICONV_CFLAGS=$pkg_cv_TICONV_CFLAGS
+	TICONV_LIBS=$pkg_cv_TICONV_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for GLIB" >&5
+echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GLIB_CFLAGS"; then
+        pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.6.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GLIB_LIBS"; then
+        pkg_cv_GLIB_LIBS="$GLIB_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.6.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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 --errors-to-stdout --print-errors "glib-2.0 >= 2.6.0"`
+        else
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.6.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GLIB_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.6.0) were not met:
+
+$GLIB_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 GLIB_CFLAGS
+and GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (glib-2.0 >= 2.6.0) were not met:
+
+$GLIB_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 GLIB_CFLAGS
+and GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 GLIB_CFLAGS
+and GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 GLIB_CFLAGS
+and GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
+	GLIB_LIBS=$pkg_cv_GLIB_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for GTK" >&5
+echo $ECHO_N "checking for GTK... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK_CFLAGS"; then
+        pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.6.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.6.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GTK_LIBS"; then
+        pkg_cv_GTK_LIBS="$GTK_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.6.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.6.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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 --errors-to-stdout --print-errors "gtk+-2.0 >= 2.6.0"`
+        else
+	        GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.6.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GTK_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (gtk+-2.0 >= 2.6.0) were not met:
+
+$GTK_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 GTK_CFLAGS
+and GTK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (gtk+-2.0 >= 2.6.0) were not met:
+
+$GTK_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 GTK_CFLAGS
+and GTK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 GTK_CFLAGS
+and GTK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 GTK_CFLAGS
+and GTK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
+	GTK_LIBS=$pkg_cv_GTK_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for GLADE" >&5
+echo $ECHO_N "checking for GLADE... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GLADE_CFLAGS"; then
+        pkg_cv_GLADE_CFLAGS="$GLADE_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.4.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.4.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLADE_CFLAGS=`$PKG_CONFIG --cflags "libglade-2.0 >= 2.4.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GLADE_LIBS"; then
+        pkg_cv_GLADE_LIBS="$GLADE_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.4.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.4.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLADE_LIBS=`$PKG_CONFIG --libs "libglade-2.0 >= 2.4.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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
+	        GLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libglade-2.0 >= 2.4.0"`
+        else
+	        GLADE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libglade-2.0 >= 2.4.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GLADE_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (libglade-2.0 >= 2.4.0) were not met:
+
+$GLADE_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 GLADE_CFLAGS
+and GLADE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (libglade-2.0 >= 2.4.0) were not met:
+
+$GLADE_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 GLADE_CFLAGS
+and GLADE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 GLADE_CFLAGS
+and GLADE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 GLADE_CFLAGS
+and GLADE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	GLADE_CFLAGS=$pkg_cv_GLADE_CFLAGS
+	GLADE_LIBS=$pkg_cv_GLADE_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+# D-Bus support
+
+# Check whether --with-dbus was given.
+if test "${with_dbus+set}" = set; then
+  withval=$with_dbus; dbus=$withval
+else
+  dbus=no
+fi
+
+if test "x$dbus" = "xyes"; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for DBUS_GLIB" >&5
+echo $ECHO_N "checking for DBUS_GLIB... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$DBUS_GLIB_CFLAGS"; then
+        pkg_cv_DBUS_GLIB_CFLAGS="$DBUS_GLIB_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.60\"") >&5
+  ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.60") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_DBUS_GLIB_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.60" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$DBUS_GLIB_LIBS"; then
+        pkg_cv_DBUS_GLIB_LIBS="$DBUS_GLIB_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.60\"") >&5
+  ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.60") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_DBUS_GLIB_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.60" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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
+	        DBUS_GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-glib-1 >= 0.60"`
+        else
+	        DBUS_GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= 0.60"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$DBUS_GLIB_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (dbus-glib-1 >= 0.60) were not met:
+
+$DBUS_GLIB_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 DBUS_GLIB_CFLAGS
+and DBUS_GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (dbus-glib-1 >= 0.60) were not met:
+
+$DBUS_GLIB_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 DBUS_GLIB_CFLAGS
+and DBUS_GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: 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 DBUS_GLIB_CFLAGS
+and DBUS_GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: 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 DBUS_GLIB_CFLAGS
+and DBUS_GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	DBUS_GLIB_CFLAGS=$pkg_cv_DBUS_GLIB_CFLAGS
+	DBUS_GLIB_LIBS=$pkg_cv_DBUS_GLIB_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_DBUS 1
+_ACEOF
+
+else
+        DBUS_GLIB_CFLAGS=
+        DBUS_GLIB_LIBS=
+fi
+
+
+
+
+# Checks for header files.
+{ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
+echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdbool_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+	struct s { _Bool s: 1; _Bool t; } s;
+
+	char a[true == 1 ? 1 : -1];
+	char b[false == 0 ? 1 : -1];
+	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+	char d[(bool) 0.5 == true ? 1 : -1];
+	bool e = &s;
+	char f[(_Bool) 0.0 == false ? 1 : -1];
+	char g[true];
+	char h[sizeof (_Bool)];
+	char i[sizeof s.t];
+	enum { j = false, k = true, l = false * true, m = true * 256 };
+	_Bool n[m];
+	char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+	char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+#	if defined __xlc__ || defined __GNUC__
+	 /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+	    reported by James Lemley on 2005-10-05; see
+	    http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+	    This test is not quite right, since xlc is allowed to
+	    reject this program, as the initializer for xlcbug is
+	    not one of the forms that C requires support for.
+	    However, doing the test right would require a runtime
+	    test, and that would make cross-compilation harder.
+	    Let us hope that IBM fixes the xlc bug, and also adds
+	    support for this kind of constant expression.  In the
+	    meantime, this test will reject xlc, which is OK, since
+	    our stdbool.h substitute should suffice.  We also test
+	    this with GCC, where it should work, to detect more
+	    quickly whether someone messes up the test in the
+	    future.  */
+	 char digs[] = "0123456789";
+	 int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+#	endif
+	/* Catch a bug in an HP-UX C compiler.  See
+	   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+	   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+	 */
+	_Bool q = true;
+	_Bool *pq = &q;
+
+int
+main ()
+{
+
+	*pq |= q;
+	*pq |= ! q;
+	/* Refer to every declared value, to avoid compiler optimizations.  */
+	return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+		+ !m + !n + !o + !p + !q + !pq);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdbool_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_stdbool_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; }
+{ echo "$as_me:$LINENO: checking for _Bool" >&5
+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
+if test "${ac_cv_type__Bool+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef _Bool ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type__Bool=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type__Bool=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
+if test $ac_cv_type__Bool = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STDBOOL_H 1
+_ACEOF
+
+fi
+
+
+for ac_header in fcntl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in libintl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/timeb.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in stdint.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+for ac_header in tilp2/ticables.h tilp2/ticalcs.h tilp2/tifiles.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ echo "$as_me:$LINENO: checking for working memcmp" >&5
+echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
+if test "${ac_cv_func_memcmp_working+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_working=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+  /* Some versions of memcmp are not 8-bit clean.  */
+  char c0 = '\100', c1 = '\200', c2 = '\201';
+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+    return 1;
+
+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+     or more and with at least one buffer not starting on a 4-byte boundary.
+     William Lewis provided this test program.   */
+  {
+    char foo[21];
+    char bar[21];
+    int i;
+    for (i = 0; i < 4; i++)
+      {
+	char *a = foo + i;
+	char *b = bar + i;
+	strcpy (a, "--------01111111");
+	strcpy (b, "--------10000000");
+	if (memcmp (a, b, 16) >= 0)
+	  return 1;
+      }
+    return 0;
+  }
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_memcmp_working=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_memcmp_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
+echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
+  *" memcmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
+
+
+#AC_C_RESTRICT
+{ echo "$as_me:$LINENO: checking for working volatile" >&5
+echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
+if test "${ac_cv_c_volatile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_volatile=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_c_volatile=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define volatile
+_ACEOF
+
+fi
+
+
+# Checks for libraries.
+
+{ echo "$as_me:$LINENO: checking for pow in -lm" >&5
+echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* 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 pow ();
+int
+main ()
+{
+return pow ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_m_pow=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_m_pow=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
+echo "${ECHO_T}$ac_cv_lib_m_pow" >&6; }
+if test $ac_cv_lib_m_pow = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_pthread_pthread_create=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+  LIBS="-lpthread $LIBS"
+
+fi
+ #AC_CHECK_LIB(comdlg32, GetOpenFileName)
+
+# Check for zlib
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
+echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <zlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
+echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_zlib_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for compress in -lz" >&5
+echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z_compress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 compress ();
+int
+main ()
+{
+return compress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_z_compress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_z_compress=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
+echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; }
+if test $ac_cv_lib_z_compress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+fi
+
+LIBZ="$LIBS"
+LIBS=""
+
+
+# Checks for library functions.
+
+
+for ac_header in sys/select.h sys/socket.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+{ echo "$as_me:$LINENO: checking types of arguments for select" >&5
+echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6; }
+if test "${ac_cv_func_select_args+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
+ for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
+  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+int
+main ()
+{
+extern int select ($ac_arg1,
+					    $ac_arg234, $ac_arg234, $ac_arg234,
+					    $ac_arg5);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+ done
+done
+# Provide a safe default value.
+: ${ac_cv_func_select_args='int,int *,struct timeval *'}
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
+echo "${ECHO_T}$ac_cv_func_select_args" >&6; }
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG1 $1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG234 ($2)
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG5 ($3)
+_ACEOF
+
+rm -f conftest*
+
+{ echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5
+echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; }
+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f conftest.sym conftest.file
+echo >conftest.file
+if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_lstat_dereferences_slashed_symlink=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+     /* Linux will dereference the symlink and fail.
+	That is better in the sense that it means we will not
+	have to compile and use the lstat wrapper.  */
+     return lstat ("conftest.sym/", &sbuf) == 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_lstat_dereferences_slashed_symlink=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+else
+  # If the `ln -s' command failed, then we probably don't even
+  # have an lstat function.
+  ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f conftest.sym conftest.file
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
+echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+
+test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+
+cat >>confdefs.h <<_ACEOF
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+
+if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+  case " $LIBOBJS " in
+  *" lstat.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
+ ;;
+esac
+
+fi
+
+{ echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5
+echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6; }
+if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_stat_empty_string_bug=yes
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+  return stat ("", &sbuf) == 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_stat_empty_string_bug=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_stat_empty_string_bug=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5
+echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6; }
+if test $ac_cv_func_stat_empty_string_bug = yes; then
+  case " $LIBOBJS " in
+  *" stat.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS stat.$ac_objext"
+ ;;
+esac
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STAT_EMPTY_STRING_BUG 1
+_ACEOF
+
+fi
+
+
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* 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 $ac_func ();
+/* 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_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+{ echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; }
+if test "${ac_cv_func__doprnt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _doprnt (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* 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 _doprnt ();
+/* 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__doprnt || defined __stub____doprnt
+choke me
+#endif
+
+int
+main ()
+{
+return _doprnt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func__doprnt=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func__doprnt=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6; }
+if test $ac_cv_func__doprnt = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+
+
+
+
+
+
+
+for ac_func in bzero memset mkdir select strchr strrchr strstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* 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 $ac_func ();
+/* 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_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Platform specific tests.
+CFLAGS_FOR_BUILD="$CFLAGS"
+export CFLAGS_FOR_BUILD
+case $host in
+  *-*-mingw*)            ARCH="-D__WIN32__ -D__MINGW32__ -mwindows -D_WINDOWS" ;;
+  *-*-*bsd*)             ARCH="-D__BSD__" ;;
+  i[3456]86-*-linux-*) ARCH="-D__I386__ -D__LINUX__" ;;
+  i[3456]86-apple-darwin*) ARCH="-D__I386__ -D__MACOSX__" ;;
+  arm*-*-linux-*)        ARCH="-D__IPAQ__ -D__LINUX__" ;;
+  powerpc-*-linux-*)     ARCH="-D__PPC__  -D__LINUX__" ;;
+  powerpc-apple-darwin*) ARCH="-D__PPC__  -D__MACOSX__" ;;
+  *-apple-darwin*)       ARCH="-D__MACOSX__" ;;
+  *)                     ARCH="-D__LINUX__" ;;
+esac
+CFLAGS="$CFLAGS $ARCH"
+
+# Check for SDL if sound support is wanted
+# Check whether --enable-sound was given.
+if test "${enable_sound+set}" = set; then
+  enableval=$enable_sound; tiemu_use_sound=$enableval
+else
+  tiemu_use_sound=yes
+fi
+
+{ echo "$as_me:$LINENO: checking whether to enable sound emulation" >&5
+echo $ECHO_N "checking whether to enable sound emulation... $ECHO_C" >&6; }
+if test "${tiemu_use_sound+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  tiemu_use_sound=yes
+fi
+{ echo "$as_me:$LINENO: result: $tiemu_use_sound" >&5
+echo "${ECHO_T}$tiemu_use_sound" >&6; }
+if test "x$tiemu_use_sound" = "xyes"; then
+        SDL_VERSION=1.2.0
+
+# Check whether --with-sdl-prefix was given.
+if test "${with_sdl_prefix+set}" = set; then
+  withval=$with_sdl_prefix; sdl_prefix="$withval"
+else
+  sdl_prefix=""
+fi
+
+
+# Check whether --with-sdl-exec-prefix was given.
+if test "${with_sdl_exec_prefix+set}" = set; then
+  withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval"
+else
+  sdl_exec_prefix=""
+fi
+
+# Check whether --enable-sdltest was given.
+if test "${enable_sdltest+set}" = set; then
+  enableval=$enable_sdltest;
+else
+  enable_sdltest=yes
+fi
+
+
+  if test x$sdl_exec_prefix != x ; then
+    sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
+    if test x${SDL_CONFIG+set} != xset ; then
+      SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
+    fi
+  fi
+  if test x$sdl_prefix != x ; then
+    sdl_args="$sdl_args --prefix=$sdl_prefix"
+    if test x${SDL_CONFIG+set} != xset ; then
+      SDL_CONFIG=$sdl_prefix/bin/sdl-config
+    fi
+  fi
+
+  if test "x$prefix" != xNONE; then
+    PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+  fi
+  # Extract the first word of "sdl-config", so it can be a program name with args.
+set dummy sdl-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_SDL_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $SDL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
+  ;;
+esac
+fi
+SDL_CONFIG=$ac_cv_path_SDL_CONFIG
+if test -n "$SDL_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5
+echo "${ECHO_T}$SDL_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  min_sdl_version=$SDL_VERSION
+  { echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5
+echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6; }
+  no_sdl=""
+  if test "$SDL_CONFIG" = "no" ; then
+    no_sdl=yes
+  else
+    SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
+    SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
+
+    sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+    sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+    if test "x$enable_sdltest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_CXXFLAGS="$CXXFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $SDL_CFLAGS"
+      CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+      LIBS="$LIBS $SDL_LIBS"
+      rm -f conf.sdltest
+      if test "$cross_compiling" = yes; then
+  echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "SDL.h"
+
+char*
+my_strdup (char *str)
+{
+  char *new_str;
+
+  if (str)
+    {
+      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+      strcpy (new_str, str);
+    }
+  else
+    new_str = NULL;
+
+  return new_str;
+}
+
+int main (int argc, char *argv[])
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  /* This hangs on some systems (?)
+  system ("touch conf.sdltest");
+  */
+  { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = my_strdup("$min_sdl_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_sdl_version");
+     exit(1);
+   }
+
+   if (($sdl_major_version > major) ||
+      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
+      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
+    {
+      return 0;
+    }
+  else
+    {
+      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
+      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
+      printf("*** best to upgrade to the required version.\n");
+      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
+      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
+      printf("*** config.cache before re-running configure\n");
+      return 1;
+    }
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+no_sdl=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+       CFLAGS="$ac_save_CFLAGS"
+       CXXFLAGS="$ac_save_CXXFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_sdl" = x ; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     :
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+     if test "$SDL_CONFIG" = "no" ; then
+       echo "*** The sdl-config script installed by SDL could not be found"
+       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
+       echo "*** your path, or set the SDL_CONFIG environment variable to the"
+       echo "*** full path to sdl-config."
+     else
+       if test -f conf.sdltest ; then
+        :
+       else
+          echo "*** Could not run SDL test program, checking why..."
+          CFLAGS="$CFLAGS $SDL_CFLAGS"
+          CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+          LIBS="$LIBS $SDL_LIBS"
+          cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include "SDL.h"
+
+int main(int argc, char *argv[])
+{ return 0; }
+#undef  main
+#define main K_and_R_C_main
+
+int
+main ()
+{
+ return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+   echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding SDL or finding the wrong"
+          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	 echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
+          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
+          echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+          CFLAGS="$ac_save_CFLAGS"
+          CXXFLAGS="$ac_save_CXXFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     SDL_CFLAGS=""
+     SDL_LIBS=""
+     { { echo "$as_me:$LINENO: error: *** SDL version $SDL_VERSION not found!" >&5
+echo "$as_me: error: *** SDL version $SDL_VERSION not found!" >&2;}
+   { (exit 1); exit 1; }; }
+
+  fi
+
+
+  rm -f conf.sdltest
+
+else
+        CFLAGS="$CFLAGS -DNO_SOUND"
+        SDL_CFLAGS=
+        SDL_LIBS=
+fi
+
+
+
+# KDE dialogs support
+
+# Check whether --with-kde was given.
+if test "${with_kde+set}" = set; then
+  withval=$with_kde; kde=$withval
+else
+  kde=default
+fi
+
+if test "x$kde" = "xdefault"; then
+  case $host_os in
+    *mingw*)
+      kde=no
+      ;;
+    *)
+      kde=yes
+      ;;
+  esac
+fi
+if test "x$kde" = "xyes"; then
+        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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$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
+
+depcc="$CXX"  am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_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
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$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
+
+
+
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      { echo "$as_me:$LINENO: checking for main in -lutil" >&5
+echo $ECHO_N "checking for main in -lutil... $ECHO_C" >&6; }
+if test "${ac_cv_lib_util_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_util_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_util_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_main" >&5
+echo "${ECHO_T}$ac_cv_lib_util_main" >&6; }
+if test $ac_cv_lib_util_main = yes; then
+  LIBUTIL="-lutil"
+fi
+
+   { echo "$as_me:$LINENO: checking for main in -lcompat" >&5
+echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6; }
+if test "${ac_cv_lib_compat_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcompat  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_compat_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_compat_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
+echo "${ECHO_T}$ac_cv_lib_compat_main" >&6; }
+if test $ac_cv_lib_compat_main = yes; then
+  LIBCOMPAT="-lcompat"
+fi
+
+   kde_have_crypt=
+   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 crypt ();
+int
+main ()
+{
+return crypt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_crypt_crypt=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_crypt_crypt=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
+if test $ac_cv_lib_crypt_crypt = yes; then
+  LIBCRYPT="-lcrypt"; kde_have_crypt=yes
+else
+  { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
+echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
+if test "${ac_cv_lib_c_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 crypt ();
+int
+main ()
+{
+return crypt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_c_crypt=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_c_crypt=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
+if test $ac_cv_lib_c_crypt = yes; then
+  kde_have_crypt=yes
+else
+
+        { echo "$as_me:$LINENO: WARNING: you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support" >&5
+echo "$as_me: WARNING: you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support" >&2;}
+	kde_have_crypt=no
+
+fi
+
+fi
+
+
+   if test $kde_have_crypt = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CRYPT 1
+_ACEOF
+
+   fi
+
+  { echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
+  if test "${ac_cv_socklen_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+main ()
+{
+
+socklen_t a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_socklen_t=socklen_t
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+main ()
+{
+
+int a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_socklen_t=int
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_socklen_t=size_t
+
+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_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
+
+
+fi
+
+
+  { echo "$as_me:$LINENO: result: $ac_cv_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_socklen_t" >&6; }
+  if test "$ac_cv_socklen_t" != "socklen_t"; then
+
+cat >>confdefs.h <<_ACEOF
+#define socklen_t $ac_cv_socklen_t
+_ACEOF
+
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define ksize_t socklen_t
+_ACEOF
+
+
+
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dnet_dnet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dnet_dnet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+   fi
+   { echo "$as_me:$LINENO: checking for inet_ntoa" >&5
+echo $ECHO_N "checking for inet_ntoa... $ECHO_C" >&6; }
+if test "${ac_cv_func_inet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define inet_ntoa to an innocuous variant, in case <limits.h> declares inet_ntoa.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define inet_ntoa innocuous_inet_ntoa
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char inet_ntoa (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef inet_ntoa
+
+/* 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 inet_ntoa ();
+/* 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_inet_ntoa || defined __stub___inet_ntoa
+choke me
+#endif
+
+int
+main ()
+{
+return inet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_inet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_inet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_func_inet_ntoa" >&6; }
+
+   if test $ac_cv_func_inet_ntoa = no; then
+     { echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5
+echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 inet_ntoa ();
+int
+main ()
+{
+return inet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_nsl_inet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_nsl_inet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6; }
+if test $ac_cv_lib_nsl_inet_ntoa = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+   fi
+   { echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
+if test "${ac_cv_func_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char connect (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* 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 ();
+/* 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_connect || defined __stub___connect
+choke me
+#endif
+
+int
+main ()
+{
+return connect ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_connect=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_connect=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6; }
+
+   if test $ac_cv_func_connect = no; then
+      { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_socket_connect=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_socket_connect=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
+if test $ac_cv_lib_socket_connect = yes; then
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+   fi
+
+   { echo "$as_me:$LINENO: checking for remove" >&5
+echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
+if test "${ac_cv_func_remove+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define remove to an innocuous variant, in case <limits.h> declares remove.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define remove innocuous_remove
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char remove (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef remove
+
+/* 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 ();
+/* 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_remove || defined __stub___remove
+choke me
+#endif
+
+int
+main ()
+{
+return remove ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_remove=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_remove=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
+echo "${ECHO_T}$ac_cv_func_remove" >&6; }
+
+   if test $ac_cv_func_remove = no; then
+      { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
+echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
+if test "${ac_cv_lib_posix_remove+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_posix_remove=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_posix_remove=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
+echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
+if test $ac_cv_lib_posix_remove = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+   fi
+
+   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+   { echo "$as_me:$LINENO: checking for shmat" >&5
+echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
+if test "${ac_cv_func_shmat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shmat innocuous_shmat
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shmat (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shmat
+
+/* 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 ();
+/* 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_shmat || defined __stub___shmat
+choke me
+#endif
+
+int
+main ()
+{
+return shmat ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_shmat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_shmat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
+if test $ac_cv_func_shmat = yes; then
+  :
+else
+  { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
+echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ipc_shmat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ipc_shmat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
+echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
+if test $ac_cv_lib_ipc_shmat = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+fi
+
+
+   # Solaris 2.6 and others need -lresolv for res_init
+
+for ac_func in res_init
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* 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 $ac_func ();
+/* 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_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+     kde_libs_safe="$LIBS"
+     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <resolv.h>
+
+int
+main ()
+{
+
+res_init();
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  LIBRESOLV="-lresolv"
+        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RES_INIT 1
+_ACEOF
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     LIBS=$kde_libs_safe
+
+fi
+done
+
+
+   LIBSOCKET="$X_EXTRA_LIBS"
+
+
+
+   { echo "$as_me:$LINENO: checking for killpg in -lucb" >&5
+echo $ECHO_N "checking for killpg in -lucb... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ucb_killpg+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lucb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 killpg ();
+int
+main ()
+{
+return killpg ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ucb_killpg=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ucb_killpg=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_killpg" >&5
+echo "${ECHO_T}$ac_cv_lib_ucb_killpg" >&6; }
+if test $ac_cv_lib_ucb_killpg = yes; then
+  LIBUCB="-lucb"
+fi
+
+
+   case $host in     *-*-lynxos* )
+        { echo "$as_me:$LINENO: checking LynxOS header file wrappers" >&5
+echo $ECHO_N "checking LynxOS header file wrappers... $ECHO_C" >&6; }
+        CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
+        { echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6; }
+        { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
+echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_bsd_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_bsd_gethostbyname=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test $ac_cv_lib_bsd_gethostbyname = yes; then
+  LIBSOCKET="-lbsd"
+fi
+          ;;
+    esac
+
+     { echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6; }
+if test "${ac_cv_type_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef int ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_int=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+echo "${ECHO_T}$ac_cv_type_int" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr $ac_mid + 1`
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_hi=`expr '(' $ac_mid ')' - 1`
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_int=$ac_lo;;
+'') if test "$ac_cv_type_int" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_int=0
+   fi ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef int ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    {
+      long int i = longval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%lu\n", i);
+    }
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_int=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_int" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_int=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+  { echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6; }
+if test "${ac_cv_type_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef long ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_long=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr $ac_mid + 1`
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_hi=`expr '(' $ac_mid ')' - 1`
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') if test "$ac_cv_type_long" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_long=0
+   fi ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef long ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    {
+      long int i = longval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%lu\n", i);
+    }
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_long=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_long" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_long=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+  { echo "$as_me:$LINENO: checking for char *" >&5
+echo $ECHO_N "checking for char *... $ECHO_C" >&6; }
+if test "${ac_cv_type_char_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef char * ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_char_p=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_char_p=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5
+echo "${ECHO_T}$ac_cv_type_char_p" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of char *" >&5
+echo $ECHO_N "checking size of char *... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_char_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr $ac_mid + 1`
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_hi=`expr '(' $ac_mid ')' - 1`
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char_p=$ac_lo;;
+'') if test "$ac_cv_type_char_p" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_char_p=0
+   fi ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char * ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    {
+      long int i = longval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%lu\n", i);
+    }
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_char_p=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_char_p" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_char_p=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5
+echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
+_ACEOF
+
+  { echo "$as_me:$LINENO: checking for char" >&5
+echo $ECHO_N "checking for char... $ECHO_C" >&6; }
+if test "${ac_cv_type_char+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef char ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_char=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_char=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
+echo "${ECHO_T}$ac_cv_type_char" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of char" >&5
+echo $ECHO_N "checking size of char... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_char+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr $ac_mid + 1`
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_hi=`expr '(' $ac_mid ')' - 1`
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char=$ac_lo;;
+'') if test "$ac_cv_type_char" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_char=0
+   fi ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef char ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    {
+      long int i = longval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%lu\n", i);
+    }
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_char=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_char" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_char=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
+echo "${ECHO_T}$ac_cv_sizeof_char" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+
+{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+
+LIBDL="-ldl"
+ac_cv_have_dlfcn=yes
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking for shl_unload in -ldld" >&5
+echo $ECHO_N "checking for shl_unload in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_shl_unload+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 shl_unload ();
+int
+main ()
+{
+return shl_unload ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_shl_unload=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_shl_unload=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_unload" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_unload" >&6; }
+if test $ac_cv_lib_dld_shl_unload = yes; then
+
+LIBDL="-ldld"
+ac_cv_have_shload=yes
+
+fi
+
+
+
+
+
+
+
+# Check whether --enable-embedded was given.
+if test "${enable_embedded+set}" = set; then
+  enableval=$enable_embedded; kde_use_qt_emb=$enableval
+else
+  kde_use_qt_emb=no
+
+fi
+
+
+# Check whether --enable-qtopia was given.
+if test "${enable_qtopia+set}" = set; then
+  enableval=$enable_qtopia; kde_use_qt_emb_palm=$enableval
+else
+  kde_use_qt_emb_palm=no
+
+fi
+
+
+if test "$kde_use_qt_emb" = "no"; then
+
+{ echo "$as_me:$LINENO: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6; }
+
+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 "${kde_cv_have_x+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
+   kde_x_includes=NO
+else
+   kde_x_includes=$x_includes
+fi
+if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
+   kde_x_libraries=NO
+else
+   kde_x_libraries=$x_libraries
+fi
+
+# below we use the standard autoconf calls
+ac_x_libraries=$kde_x_libraries
+ac_x_includes=$kde_x_includes
+
+if test "$ac_x_includes" = NO; then
+  # Guess where to find include files, by looking for this one X11 .h file.
+  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+  # First, try using that file with no special directory specified.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$x_direct_test_include>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+  for ac_dir in               \
+    /usr/X11/include          \
+    /usr/X11R6/include        \
+    /usr/X11R5/include        \
+    /usr/X11R4/include        \
+                              \
+    /usr/include/X11          \
+    /usr/include/X11R6        \
+    /usr/include/X11R5        \
+    /usr/include/X11R4        \
+                              \
+    /usr/local/X11/include    \
+    /usr/local/X11R6/include  \
+    /usr/local/X11R5/include  \
+    /usr/local/X11R4/include  \
+                              \
+    /usr/local/include/X11    \
+    /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 \
+    ; \
+  do
+    if test -r "$ac_dir/$x_direct_test_include"; then
+      ac_x_includes=$ac_dir
+      break
+    fi
+  done
+fi
+
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+  # Check for the libraries.
+
+  test -z "$x_direct_test_library" && x_direct_test_library=Xt
+  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS="$LIBS"
+  LIBS="-l$x_direct_test_library $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+${x_direct_test_function}()
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+    /usr/X11/lib          \
+    /usr/X11R6/lib        \
+    /usr/X11R5/lib        \
+    /usr/X11R4/lib        \
+                          \
+    /usr/lib/X11          \
+    /usr/lib/X11R6        \
+    /usr/lib/X11R5        \
+    /usr/lib/X11R4        \
+                          \
+    /usr/local/X11/lib    \
+    /usr/local/X11R6/lib  \
+    /usr/local/X11R5/lib  \
+    /usr/local/X11R4/lib  \
+                          \
+    /usr/local/lib/X11    \
+    /usr/local/lib/X11R6  \
+    /usr/local/lib/X11R5  \
+    /usr/local/lib/X11R4  \
+                          \
+    /usr/X386/lib         \
+    /usr/x386/lib         \
+    /usr/XFree86/lib/X11  \
+                          \
+    /usr/lib              \
+    /usr/local/lib        \
+    /usr/unsupported/lib  \
+    /usr/athena/lib       \
+    /usr/local/x11r5/lib  \
+    /usr/lpp/Xamples/lib  \
+    /lib/usr/lib/X11	  \
+                          \
+    /usr/openwin/lib      \
+    /usr/openwin/share/lib \
+    ; \
+do
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = NO
+
+case "$host" in
+mips-sgi-irix6*)
+  ;;
+*-*-solaris*)
+  ;;
+*)
+  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; 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 | /lib) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -f -r conftest.dir
+fi
+
+  if test -z "$ac_x_includes"; then
+    ac_x_includes="."
+  fi
+  if test -z "$ac_x_libraries"; then
+    ac_x_libraries="/usr/lib"
+  fi
+esac
+#from now on we use our own again
+
+# when the user already gave --x-includes, we ignore
+# what the standard autoconf macros told us.
+if test "$kde_x_includes" = NO; then
+  kde_x_includes=$ac_x_includes
+fi
+
+# for --x-libraries too
+if test "$kde_x_libraries" = NO; then
+  kde_x_libraries=$ac_x_libraries
+fi
+
+if test "$kde_x_includes" = NO; then
+  { { echo "$as_me:$LINENO: error: Can't find X includes. Please check your installation and add the correct paths!" >&5
+echo "$as_me: error: Can't find X includes. Please check your installation and add the correct paths!" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+if test "$kde_x_libraries" = NO; then
+  { { echo "$as_me:$LINENO: error: Can't find X libraries. Please check your installation and add the correct paths!" >&5
+echo "$as_me: error: Can't find X libraries. Please check your installation and add the correct paths!" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Record where we found X for the cache.
+kde_cv_have_x="have_x=yes \
+         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+
+fi
+
+eval "$kde_cv_have_x"
+
+if test "$have_x" != yes; then
+  { echo "$as_me:$LINENO: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6; }
+  no_x=yes
+else
+  { echo "$as_me:$LINENO: result: libraries $kde_x_libraries, headers $kde_x_includes" >&5
+echo "${ECHO_T}libraries $kde_x_libraries, headers $kde_x_includes" >&6; }
+fi
+
+if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
+  X_INCLUDES=""
+  x_includes=".";  else
+  x_includes=$kde_x_includes
+  X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
+  X_LDFLAGS=""
+  x_libraries="/usr/lib";  else
+  x_libraries=$kde_x_libraries
+  X_LDFLAGS="-L$x_libraries"
+fi
+all_includes="$X_INCLUDES"
+all_libraries="$X_LDFLAGS"
+
+
+
+
+
+
+# Check for libraries that X11R6 Xt/Xaw programs need.
+ac_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+# 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.
+#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
+{ echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
+echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
+  LIBSM="-lSM -lICE"
+fi
+
+
+LDFLAGS="$ac_save_LDFLAGS"
+
+
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+
+
+{ echo "$as_me:$LINENO: checking for libXext" >&5
+echo $ECHO_N "checking for libXext... $ECHO_C" >&6; }
+if test "${kde_cv_have_libXext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+kde_ldflags_safe="$LDFLAGS"
+kde_libs_safe="$LIBS"
+
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+LIBS="-lXext -lX11 $LIBSOCKET"
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+int
+main ()
+{
+
+printf("hello Xext\n");
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  kde_cv_have_libXext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	kde_cv_have_libXext=no
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+LDFLAGS=$kde_ldflags_safe
+LIBS=$kde_libs_safe
+
+fi
+
+
+{ echo "$as_me:$LINENO: result: $kde_cv_have_libXext" >&5
+echo "${ECHO_T}$kde_cv_have_libXext" >&6; }
+
+if test "$kde_cv_have_libXext" = "no"; then
+  { { echo "$as_me:$LINENO: error: We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either." >&5
+echo "$as_me: error: We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+{ echo "$as_me:$LINENO: checking for Xinerama" >&5
+echo $ECHO_N "checking for Xinerama... $ECHO_C" >&6; }
+
+
+# Check whether --with-xinerama was given.
+if test "${with_xinerama+set}" = set; then
+  withval=$with_xinerama;
+    no_xinerama=no
+
+else
+
+    no_xinerama=yes
+
+
+fi
+
+
+kde_save_LDFLAGS="$LDFLAGS"
+kde_save_CFLAGS="$CFLAGS"
+kde_save_LIBS="$LIBS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+CFLAGS="$CFLAGS -I$x_includes"
+LIBS="-lXinerama -lXext"
+
+if test "x$no_xinerama" = "xno"; then
+
+  if test "${ac_cv_have_xinerama+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+	  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+  			#include <X11/extensions/Xinerama.h>
+int
+main ()
+{
+XineramaIsActive(NULL);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_have_xinerama="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_have_xinerama="no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+else
+  ac_cv_have_xinerama=no;
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_cv_have_xinerama" >&5
+echo "${ECHO_T}$ac_cv_have_xinerama" >&6; }
+
+LIBXINERAMA=""
+
+if test "$ac_cv_have_xinerama" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XINERAMA 1
+_ACEOF
+
+  LIBXINERAMA="-lXinerama"
+fi
+
+
+
+LDFLAGS="$kde_save_LDFLAGS"
+CFLAGS="$kde_save_CFLAGS"
+LIBS="$kde_save_LIBS"
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+else
+    CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
+  CFLAGS="$CFLAGS -DQWS"
+  LDFLAGS="$LDFLAGS -DQWS"
+  QTE_NORTTI="-fno-rtti -DQWS"
+  X_PRE_LIBS=""
+  LIB_X11=""
+  LIB_XEXT=""
+  LIBSM=""
+  X_INCLUDES=""
+  X_LDFLAGS=""
+  x_includes=""
+  x_libraries=""
+
+
+
+
+
+
+
+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 -z ""; then
+  kde_qtver=3
+  kde_qtsubver=1
+else
+  kde_qtsubver=`echo "" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+  # following is the check if subversion isnt found in passed argument
+  if test "$kde_qtsubver" = ""; then
+    kde_qtsubver=1
+  fi
+  kde_qtver=`echo "" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+  if test "$kde_qtver" = "1"; then
+    kde_qtsubver=42
+  fi
+fi
+
+if test -z ""; then
+  if test "$kde_qtver" = "2"; then
+    if test $kde_qtsubver -gt 0; then
+      kde_qt_minversion=">= Qt 2.2.2"
+    else
+      kde_qt_minversion=">= Qt 2.0.2"
+    fi
+  fi
+  if test "$kde_qtver" = "3"; then
+    kde_qt_minversion=">= Qt 3.0.2"
+  fi
+  if test "$kde_qtver" = "1"; then
+    kde_qt_minversion=">= 1.42 and < 2.0"
+  fi
+else
+   kde_qt_minversion=
+fi
+
+if test -z ""; then
+   if test $kde_qtver = 3; then
+     kde_qt_verstring="QT_VERSION >= 302"
+   fi
+   if test $kde_qtver = 2; then
+     if test $kde_qtsubver -gt 0; then
+       kde_qt_verstring="QT_VERSION >= 222"
+     else
+       kde_qt_verstring="QT_VERSION >= 200"
+     fi
+   fi
+   if test $kde_qtver = 1; then
+    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+   fi
+else
+   kde_qt_verstring=
+fi
+
+if test $kde_qtver = 3; then
+  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
+fi
+if test $kde_qtver = 2; then
+   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+fi
+if test $kde_qtver = 1; then
+   kde_qt_dirs="$QTDIR /usr/lib/qt"
+fi
+
+
+{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_pthread_pthread_create=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+  LIBPTHREAD="-lpthread"
+fi
+
+
+
+
+    # Check whether --enable-kernel-threads was given.
+if test "${enable_kernel_threads+set}" = set; then
+  enableval=$enable_kernel_threads; kde_use_kernthreads=$enableval
+else
+  kde_use_kernthreads=no
+fi
+
+
+    if test "$kde_use_kernthreads" = "yes"; then
+      ac_save_CXXFLAGS="$CXXFLAGS"
+      ac_save_CFLAGS="$CFLAGS"
+      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
+      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
+
+for ac_header in pthread/linuxthreads/pthread.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to tiemu-users at lists.sourceforge.net ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+      CXXFLAGS="$ac_save_CXXFLAGS"
+      CFLAGS="$ac_save_CFLAGS"
+      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
+        kde_use_kernthreads=no
+      else
+                { echo "$as_me:$LINENO: checking for pthread_join in -llthread" >&5
+echo $ECHO_N "checking for pthread_join in -llthread... $ECHO_C" >&6; }
+if test "${ac_cv_lib_lthread_pthread_join+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-llthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_lthread_pthread_join=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_lthread_pthread_join=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_lthread_pthread_join" >&5
+echo "${ECHO_T}$ac_cv_lib_lthread_pthread_join" >&6; }
+if test $ac_cv_lib_lthread_pthread_join = yes; then
+  LIBPTHREAD="-llthread -llgcc_r"
+fi
+         if test "x$LIBPTHREAD" = "x"; then
+          kde_use_kernthreads=no
+        else
+          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
+        fi
+      fi
+    else
+      USE_THREADS=""
+      if test -z "$LIBPTHREAD"; then
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -pthread" >&5
+echo $ECHO_N "checking whether $CXX supports -pthread... $ECHO_C" >&6; }
+kde_cache=`echo pthread | sed 'y% .=/+-%____p_%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+   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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+  save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -pthread"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+ return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  CXXFLAGS="$save_CXXFLAGS"
+  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
+
+
+fi
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ USE_THREADS="-pthread"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+      fi
+    fi
+
+    case $host_os in
+ 	solaris*)
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -mt" >&5
+echo $ECHO_N "checking whether $CXX supports -mt... $ECHO_C" >&6; }
+kde_cache=`echo mt | sed 'y% .=/+-%____p_%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+   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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+  save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -mt"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+ return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  CXXFLAGS="$save_CXXFLAGS"
+  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
+
+
+fi
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ USE_THREADS="-mt"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+    		;;
+        freebsd*)
+                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                ;;
+        aix*)
+                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                LIBPTHREAD="$LIBPTHREAD -lc_r"
+                ;;
+        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+                if test "$CXX" = "KCC"; then
+                  CXXFLAGS="$CXXFLAGS --thread_safe"
+		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
+                fi
+                ;;
+	*)
+		;;
+    esac
+
+
+
+
+{ echo "$as_me:$LINENO: checking for extra includes" >&5
+echo $ECHO_N "checking for extra includes... $ECHO_C" >&6; }
+
+# Check whether --with-extra-includes was given.
+if test "${with_extra_includes+set}" = set; then
+  withval=$with_extra_includes; kde_use_extra_includes="$withval"
+else
+  kde_use_extra_includes=NONE
+
+fi
+
+kde_extra_includes=
+if test -n "$kde_use_extra_includes" && \
+   test "$kde_use_extra_includes" != "NONE"; then
+
+   ac_save_ifs=$IFS
+   IFS=':'
+   for dir in $kde_use_extra_includes; do
+     kde_extra_includes="$kde_extra_includes $dir"
+     USER_INCLUDES="$USER_INCLUDES -I$dir"
+   done
+   IFS=$ac_save_ifs
+   kde_use_extra_includes="added"
+else
+   kde_use_extra_includes="no"
+fi
+
+
+{ echo "$as_me:$LINENO: result: $kde_use_extra_includes" >&5
+echo "${ECHO_T}$kde_use_extra_includes" >&6; }
+
+kde_extra_libs=
+{ echo "$as_me:$LINENO: checking for extra libs" >&5
+echo $ECHO_N "checking for extra libs... $ECHO_C" >&6; }
+
+# Check whether --with-extra-libs was given.
+if test "${with_extra_libs+set}" = set; then
+  withval=$with_extra_libs; kde_use_extra_libs=$withval
+else
+  kde_use_extra_libs=NONE
+
+fi
+
+if test -n "$kde_use_extra_libs" && \
+   test "$kde_use_extra_libs" != "NONE"; then
+
+   ac_save_ifs=$IFS
+   IFS=':'
+   for dir in $kde_use_extra_libs; do
+     kde_extra_libs="$kde_extra_libs $dir"
+     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
+     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
+   done
+   IFS=$ac_save_ifs
+   kde_use_extra_libs="added"
+else
+   kde_use_extra_libs="no"
+fi
+
+
+
+{ echo "$as_me:$LINENO: result: $kde_use_extra_libs" >&5
+echo "${ECHO_T}$kde_use_extra_libs" >&6; }
+
+
+
+
+{ echo "$as_me:$LINENO: checking for libz" >&5
+echo $ECHO_N "checking for libz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+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
+
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include<zlib.h>
+
+int
+main ()
+{
+return (zlibVersion() == ZLIB_VERSION);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "ac_cv_lib_z='-lz'"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "ac_cv_lib_z=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+
+fi
+if test ! "$ac_cv_lib_z" = no; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBZ="$ac_cv_lib_z"
+
+  { echo "$as_me:$LINENO: result: $ac_cv_lib_z" >&5
+echo "${ECHO_T}$ac_cv_lib_z" >&6; }
+else
+  { { echo "$as_me:$LINENO: error: not found. Check your installation and look into config.log" >&5
+echo "$as_me: error: not found. Check your installation and look into config.log" >&2;}
+   { (exit 1); exit 1; }; }
+  LIBZ=""
+
+fi
+
+
+
+
+{ echo "$as_me:$LINENO: checking for libpng" >&5
+echo $ECHO_N "checking for libpng... $ECHO_C" >&6; }
+if test "${ac_cv_lib_png+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
+else
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
+fi
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+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
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include<png.h>
+
+int
+main ()
+{
+
+    png_structp png_ptr = png_create_read_struct(  /* image ptr */
+		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+    return( png_ptr != 0 );
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "ac_cv_lib_png='-lpng $LIBZ -lm'"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "ac_cv_lib_png=no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+
+fi
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPNG 1
+_ACEOF
+
+  LIBPNG="$ac_cv_lib_png"
+
+  { echo "$as_me:$LINENO: result: $ac_cv_lib_png" >&5
+echo "${ECHO_T}$ac_cv_lib_png" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  LIBPNG=""
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for libjpeg6b" >&5
+echo $ECHO_N "checking for libjpeg6b... $ECHO_C" >&6; }
+if test "${ac_cv_lib_jpeg_6b+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+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_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg6b -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Override any gcc2 internal prototype to avoid an error.  */
+struct jpeg_decompress_struct;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+typedef int size_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
+                                    int version, size_t structsize);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+
+int
+main ()
+{
+jpeg_CreateDecompress(0L, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "ac_cv_lib_jpeg_6b=-ljpeg6b"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "ac_cv_lib_jpeg_6b=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_6b`\" = no"; then
+  LIBJPEG="$ac_cv_lib_jpeg_6b"
+  { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_6b" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_6b" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+{ echo "$as_me:$LINENO: checking for libjpeg" >&5
+echo $ECHO_N "checking for libjpeg... $ECHO_C" >&6; }
+if test "${ac_cv_lib_jpeg_normal+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+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_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Override any gcc2 internal prototype to avoid an error.  */
+struct jpeg_decompress_struct;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+typedef int size_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
+                                    int version, size_t structsize);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+
+int
+main ()
+{
+jpeg_CreateDecompress(0L, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "ac_cv_lib_jpeg_normal=-ljpeg"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "ac_cv_lib_jpeg_normal=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_normal`\" = no"; then
+  LIBJPEG="$ac_cv_lib_jpeg_normal"
+  { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_normal" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_normal" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+       LIBJPEG=
+
+
+fi
+
+
+
+fi
+
+
+
+jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
+
+jpeg_incdir=NO
+for i in $jpeg_incdirs;
+do
+  for j in jpeglib.h;
+  do
+    echo "configure: 32463: $i/$j" >&5
+    if test -r "$i/$j"; then
+      echo "taking that" >&5
+      jpeg_incdir=$i
+      break 2
+    fi
+  done
+done
+
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+else
+  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
+    { echo "$as_me:$LINENO: WARNING:
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+" >&5
+echo "$as_me: WARNING:
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+" >&2;}
+  else
+    { echo "$as_me:$LINENO: WARNING: libjpeg not found. disable JPEG support." >&5
+echo "$as_me: WARNING: libjpeg not found. disable JPEG support." >&2;}
+  fi
+  jpeg_incdir=
+  LIBJPEG=
+fi
+
+
+
+
+
+
+
+
+
+# Check whether --enable-mt was given.
+if test "${enable_mt+set}" = set; then
+  enableval=$enable_mt; kde_use_qt_mt=$enableval
+else
+
+    if test $kde_qtver = 3; then
+      kde_use_qt_mt=yes
+    else
+      kde_use_qt_mt=no
+    fi
+
+
+fi
+
+
+USING_QT_MT=""
+
+
+KDE_MT_LDFLAGS=
+KDE_MT_LIBS=
+if test "x$kde_use_qt_mt" = "xyes"; then
+
+
+
+    if test -z "$LIBPTHREAD"; then
+    if test -z "$USE_THREADS"; then
+      kde_check_threading_default=no
+    else
+      kde_check_threading_default=yes
+    fi
+  else
+    kde_check_threading_default=yes
+  fi
+  # Check whether --enable-threading was given.
+if test "${enable_threading+set}" = set; then
+  enableval=$enable_threading; kde_use_threading=$enableval
+else
+  kde_use_threading=$kde_check_threading_default
+fi
+
+  if test "x$kde_use_threading" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+  fi
+
+  if test "x$kde_use_threading" = "xyes"; then
+    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
+    KDE_MT_LDFLAGS="$USE_THREADS"
+    KDE_MT_LIBS="$LIBPTHREAD"
+  else
+    kde_use_qt_mt=no
+  fi
+fi
+
+
+
+kde_qt_was_given=yes
+
+if test -z "$LIBQT_GLOB"; then
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    LIBQT_GLOB="libqte.*"
+  else
+    LIBQT_GLOB="libqt.*"
+  fi
+fi
+
+if test -z "$LIBQT"; then
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    qtlib="qte"
+  else
+    qtlib="qt"
+  fi
+
+  kde_int_qt="-l$qtlib"
+else
+  kde_int_qt="$LIBQT"
+  kde_lib_qt_set=yes
+fi
+
+if test -z "$LIBQPE"; then
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    if test "x$kde_use_qt_emb_palm" = "xyes"; then
+      LIB_QPE="-lqpe"
+    else
+      LIB_QPE=""
+    fi
+  else
+    LIB_QPE=""
+  fi
+fi
+
+
+if test "x$kde_use_qt_mt" = "xyes"; then
+  if test -z "$LIBQT"; then
+    LIBQT="-l$qtlib-mt"
+    kde_int_qt="-l$qtlib-mt"
+  else
+    LIBQT="$qtlib-mt"
+    kde_int_qt="$qtlib-mt"
+  fi
+  LIBQT_GLOB="lib$qtlib-mt.*"
+  USING_QT_MT="using -mt"
+else
+  LIBQT="-l$qtlib"
+fi
+
+if test $kde_qtver != 1; then
+
+
+
+  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+fi
+
+if test $kde_qtver = 3; then
+
+  LIBQT="$LIBQT $LIBDL"
+fi
+
+{ echo "$as_me:$LINENO: checking for Qt" >&5
+echo $ECHO_N "checking for Qt... $ECHO_C" >&6; }
+
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
+fi
+ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+qt_libraries=""
+qt_includes=""
+
+# Check whether --with-qt-dir was given.
+if test "${with_qt_dir+set}" = set; then
+  withval=$with_qt_dir;   ac_qt_includes="$withval"/include
+       ac_qt_libraries="$withval"/lib
+       ac_qt_bindir="$withval"/bin
+
+fi
+
+
+
+# Check whether --with-qt-includes was given.
+if test "${with_qt_includes+set}" = set; then
+  withval=$with_qt_includes;
+       ac_qt_includes="$withval"
+
+fi
+
+
+kde_qt_libs_given=no
+
+
+# Check whether --with-qt-libraries was given.
+if test "${with_qt_libraries+set}" = set; then
+  withval=$with_qt_libraries;   ac_qt_libraries="$withval"
+       kde_qt_libs_given=yes
+
+fi
+
+
+if test "${ac_cv_have_qt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  #try to guess Qt locations
+
+qt_incdirs=""
+for dir in $kde_qt_dirs; do
+   qt_incdirs="$qt_incdirs $dir/include $dir"
+done
+qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include/qt3 /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
+if test ! "$ac_qt_includes" = "NO"; then
+   qt_incdirs="$ac_qt_includes $qt_incdirs"
+fi
+
+if test "$kde_qtver" != "1"; then
+  kde_qt_header=qstyle.h
+else
+  kde_qt_header=qglobal.h
+fi
+
+
+qt_incdir=NO
+for i in $qt_incdirs;
+do
+  for j in $kde_qt_header;
+  do
+    echo "configure: 32698: $i/$j" >&5
+    if test -r "$i/$j"; then
+      echo "taking that" >&5
+      qt_incdir=$i
+      break 2
+    fi
+  done
+done
+
+ac_qt_includes="$qt_incdir"
+
+qt_libdirs=""
+for dir in $kde_qt_dirs; do
+   qt_libdirs="$qt_libdirs $dir/lib $dir"
+done
+qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
+if test ! "$ac_qt_libraries" = "NO"; then
+  qt_libdir=$ac_qt_libraries
+else
+  qt_libdirs="$ac_qt_libraries $qt_libdirs"
+  # if the Qt was given, the chance is too big that libqt.* doesn't exist
+  qt_libdir=NONE
+  for dir in $qt_libdirs; do
+    try="ls -1 $dir/${LIBQT_GLOB}"
+    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&5 ; fi
+  done
+fi
+
+ac_qt_libraries="$qt_libdir"
+
+
+ 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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+
+
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#include <qiconview.h>
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+    QStringList *t = new QStringList();
+    Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+    QIconView iv(0);
+    iv.setWordWrapIconText(false);
+    QString s;
+    s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+    (void)QStyleFactory::create(QString::null);
+    QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+    return 0;
+}
+EOF
+
+
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest; then
+  rm -f conftest*
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+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 "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+  ac_cv_have_qt="have_qt=no"
+  ac_qt_notfound=""
+  missing_qt_mt=""
+  if test "$ac_qt_includes" = NO; then
+    if test "$ac_qt_libraries" = NO; then
+      ac_qt_notfound="(headers and libraries)";
+    else
+      ac_qt_notfound="(headers)";
+    fi
+  else
+    if test "x$kde_use_qt_mt" = "xyes"; then
+       missing_qt_mt="
+Make sure that you have compiled Qt with thread support!"
+       ac_qt_notfound="(library $qtlib-mt)";
+    else
+       ac_qt_notfound="(library $qtlib)";
+    fi
+  fi
+
+  { { echo "$as_me:$LINENO: error: Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt" >&5
+echo "$as_me: error: Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  have_qt="yes"
+fi
+
+fi
+
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+  { echo "$as_me:$LINENO: result: $have_qt" >&5
+echo "${ECHO_T}$have_qt" >&6; };
+else
+  ac_cv_have_qt="have_qt=yes \
+    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+  { echo "$as_me:$LINENO: result: libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT" >&5
+echo "${ECHO_T}libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT" >&6; }
+
+  qt_libraries="$ac_qt_libraries"
+  qt_includes="$ac_qt_includes"
+fi
+
+if test ! "$kde_qt_libs_given" = "yes"; then
+
+
+{ echo "$as_me:$LINENO: checking if Qt compiles without flags" >&5
+echo $ECHO_N "checking if Qt compiles without flags... $ECHO_C" >&6; }
+if test "${kde_cv_qt_direct+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ 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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
+ac_LIBRARY_PATH="$LIBRARY_PATH"
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_includes"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
+else
+LIBS="$LIBQT $LIBSOCKET"
+fi
+LD_LIBRARY_PATH=
+export LD_LIBRARY_PATH
+LIBRARY_PATH=
+export LIBRARY_PATH
+
+
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#include <qiconview.h>
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+    QStringList *t = new QStringList();
+    Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+    QIconView iv(0);
+    iv.setWordWrapIconText(false);
+    QString s;
+    s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+    (void)QStyleFactory::create(QString::null);
+    QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+    return 0;
+}
+EOF
+
+
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest; then
+  kde_cv_qt_direct="yes"
+else
+  kde_cv_qt_direct="no"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
+export LD_LIBRARY_PATH
+LIBRARY_PATH="$ac_LIBRARY_PATH"
+export LIBRARY_PATH
+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
+
+
+fi
+
+
+if test "$kde_cv_qt_direct" = "yes"; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  qt_libraries=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+fi
+
+
+
+
+if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+ QT_INCLUDES=""
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$all_libraries $QT_LDFLAGS"
+fi
+test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+
+
+
+
+   qt_bindirs=""
+   for dir in $kde_qt_dirs; do
+      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
+   done
+   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
+   if test ! "$ac_qt_bindir" = "NO"; then
+      qt_bindirs="$ac_qt_bindir $qt_bindirs"
+   fi
+
+
+   { echo "$as_me:$LINENO: checking for moc" >&5
+echo $ECHO_N "checking for moc... $ECHO_C" >&6; }
+   if test -n "$MOC"; then
+        kde_cv_path="$MOC";
+   else
+        kde_cache=`echo moc | sed 'y%./+-%__p_%'`
+
+        if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        kde_cv_path="NONE"
+	dirs="$qt_bindirs"
+	kde_save_IFS=$IFS
+	IFS=':'
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+        done
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/moc"; then
+	    if test -n ""
+	    then
+              evalstr="$dir/moc  2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/moc"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/moc"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
+   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+      { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+    { { echo "$as_me:$LINENO: error: No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+" >&5
+echo "$as_me: error: No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+" >&2;}
+   { (exit 1); exit 1; }; }
+
+   else
+      { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+      MOC=$kde_cv_path
+
+   fi
+
+   if test -z "$UIC_NOT_NEEDED"; then
+
+   { echo "$as_me:$LINENO: checking for uic" >&5
+echo $ECHO_N "checking for uic... $ECHO_C" >&6; }
+   if test -n "$UIC"; then
+        kde_cv_path="$UIC";
+   else
+        kde_cache=`echo uic | sed 'y%./+-%__p_%'`
+
+        if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        kde_cv_path="NONE"
+	dirs="$qt_bindirs"
+	kde_save_IFS=$IFS
+	IFS=':'
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+        done
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/uic"; then
+	    if test -n ""
+	    then
+              evalstr="$dir/uic  2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/uic"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/uic"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
+   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+      { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+      UIC=""
+   else
+      { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+      UIC=$kde_cv_path
+
+   fi
+
+     if test -z "$UIC" ; then
+
+    { echo "$as_me:$LINENO: WARNING: No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+" >&5
+echo "$as_me: WARNING: No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+" >&2;}
+
+       exit 1
+     elif test $kde_qtver = 3; then
+
+    { echo "$as_me:$LINENO: checking whether uic supports -L " >&5
+echo $ECHO_N "checking whether uic supports -L ... $ECHO_C" >&6; }
+    kde_cache=`echo L | sed 'y% .=/+-%____p_%'`
+    if { as_var=kde_cv_prog_uic_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        cat >conftest.ui <<EOT
+        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+        ac_uic_testrun="$UIC -L /nonexistant conftest.ui >/dev/null"
+        if { (eval echo "$as_me:$LINENO: \"$ac_uic_testrun\"") >&5
+  (eval $ac_uic_testrun) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+            eval "kde_cv_prog_uic_$kde_cache=yes"
+        else
+            eval "kde_cv_prog_uic_$kde_cache=no"
+        fi
+        rm -f conftest*
+
+fi
+
+
+    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+        :
+        ac_uic_supports_libpath=yes
+    else
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+        :
+        ac_uic_supports_libpath=no
+    fi
+
+
+    { echo "$as_me:$LINENO: checking whether uic supports -nounload " >&5
+echo $ECHO_N "checking whether uic supports -nounload ... $ECHO_C" >&6; }
+    kde_cache=`echo nounload | sed 'y% .=/+-%____p_%'`
+    if { as_var=kde_cv_prog_uic_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        cat >conftest.ui <<EOT
+        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+        ac_uic_testrun="$UIC -nounload  conftest.ui >/dev/null"
+        if { (eval echo "$as_me:$LINENO: \"$ac_uic_testrun\"") >&5
+  (eval $ac_uic_testrun) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+            eval "kde_cv_prog_uic_$kde_cache=yes"
+        else
+            eval "kde_cv_prog_uic_$kde_cache=no"
+        fi
+        rm -f conftest*
+
+fi
+
+
+    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+        :
+        ac_uic_supports_nounload=yes
+    else
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+        :
+        ac_uic_supports_nounload=no
+    fi
+
+
+       if test x$ac_uic_supports_libpath = xyes; then
+           UIC="$UIC -L \$(kde_widgetdir)"
+       fi
+       if test x$ac_uic_supports_nounload = xyes; then
+           UIC="$UIC -nounload"
+       fi
+     fi
+   else
+     UIC="echo uic not available: "
+   fi
+
+
+
+
+   UIC_TR="i18n"
+   if test $kde_qtver = 3; then
+     UIC_TR="tr2i18n"
+   fi
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking if Qt needs $LIBJPEG" >&5
+echo $ECHO_N "checking if Qt needs $LIBJPEG... $ECHO_C" >&6; }
+if test "${kde_cv_qt_jpeg+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ 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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
+LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <qapplication.h>
+int
+main ()
+{
+
+            int argc;
+            char** argv;
+            QApplication app(argc, argv);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "kde_cv_qt_jpeg=no"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "kde_cv_qt_jpeg=yes"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+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
+
+
+fi
+
+
+if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  LIBJPEG_QT='$(LIBJPEG)'
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  LIBJPEG_QT=
+fi
+
+
+
+if test "x$kde_use_qt_emb" != "xyes"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for rpath" >&5
+echo $ECHO_N "checking for rpath... $ECHO_C" >&6; }
+# Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+  enableval=$enable_rpath; USE_RPATH=$enableval
+else
+  USE_RPATH=yes
+fi
+
+
+if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
+
+  KDE_RPATH="-R \$(kde_libraries)"
+
+  if test -n "$qt_libraries"; then
+    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
+  fi
+    if test -n "$X_LDFLAGS"; then
+    KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
+  fi
+  if test -n "$KDE_EXTRA_RPATH"; then
+    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
+  fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: $USE_RPATH" >&5
+echo "${ECHO_T}$USE_RPATH" >&6; }
+
+{ echo "$as_me:$LINENO: checking for KDE" >&5
+echo $ECHO_N "checking for KDE... $ECHO_C" >&6; }
+
+if test "${prefix}" != NONE; then
+  kde_includes=${prefix}/include
+  ac_kde_includes=$prefix/include
+
+  if test "${exec_prefix}" != NONE; then
+    kde_libraries=${exec_prefix}/lib
+    ac_kde_libraries=$exec_prefix/lib
+  else
+    kde_libraries=${prefix}/lib
+    ac_kde_libraries=$prefix/lib
+  fi
+else
+  ac_kde_includes=
+  ac_kde_libraries=
+  kde_libraries=""
+  kde_includes=""
+fi
+
+if test "${ac_cv_have_kde+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  #try to guess kde locations
+
+if test "$kde_qtver" = 1; then
+  kde_check_header="ksock.h"
+  kde_check_lib="libkdecore.la"
+else
+  kde_check_header="ksharedptr.h"
+  kde_check_lib="libkio.la"
+fi
+
+if test -z ""; then
+
+test -n "$KDEDIR" || KDEDIR=`kde-config --prefix`
+kde_incdirs="$KDEDIR/include/kde3 $KDEDIR/include/kde $KDEDIR/include"
+kde_incdirs="$kde_incdirs $ac_kde_includes"
+
+kde_incdir=NO
+for i in $kde_incdirs;
+do
+  for j in $kde_check_header;
+  do
+    echo "configure: 33488: $i/$j" >&5
+    if test -r "$i/$j"; then
+      echo "taking that" >&5
+      kde_incdir=$i
+      break 2
+    fi
+  done
+done
+
+ac_kde_includes="$kde_incdir"
+
+if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
+  { { echo "$as_me:$LINENO: error:
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!" >&5
+echo "$as_me: error:
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+kde_libdirs="$KDEDIR/lib`kde-config --libsuffix`"
+kde_libdirs="$kde_libdirs $ac_kde_libraries"
+
+kde_libdir=NO
+for i in $kde_libdirs;
+do
+  for j in $kde_check_lib;
+  do
+    echo "configure: 33517: $i/$j" >&5
+    if test -r "$i/$j"; then
+      echo "taking that" >&5
+      kde_libdir=$i
+      break 2
+    fi
+  done
+done
+
+ac_kde_libraries="$kde_libdir"
+
+if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
+{ { echo "$as_me:$LINENO: error:
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!" >&5
+echo "$as_me: error:
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_kde_libraries="$kde_libdir"
+
+if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
+  ac_cv_have_kde="have_kde=no"
+else
+  ac_cv_have_kde="have_kde=yes \
+    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+fi
+
+else
+  ac_cv_have_kde="have_kde=no"
+
+fi
+
+fi
+
+eval "$ac_cv_have_kde"
+
+if test "$have_kde" != "yes"; then
+ if test "${prefix}" = NONE; then
+  ac_kde_prefix="$ac_default_prefix"
+ else
+  ac_kde_prefix="$prefix"
+ fi
+ if test "$exec_prefix" = NONE; then
+  ac_kde_exec_prefix="$ac_kde_prefix"
+  { echo "$as_me:$LINENO: result: will be installed in $ac_kde_prefix" >&5
+echo "${ECHO_T}will be installed in $ac_kde_prefix" >&6; }
+ else
+  ac_kde_exec_prefix="$exec_prefix"
+  { echo "$as_me:$LINENO: result: will be installed in $ac_kde_prefix and $ac_kde_exec_prefix" >&5
+echo "${ECHO_T}will be installed in $ac_kde_prefix and $ac_kde_exec_prefix" >&6; }
+ fi
+
+ kde_libraries="${ac_kde_exec_prefix}/lib"
+ kde_includes=${ac_kde_prefix}/include
+
+else
+  ac_cv_have_kde="have_kde=yes \
+    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+  { echo "$as_me:$LINENO: result: libraries $ac_kde_libraries, headers $ac_kde_includes" >&5
+echo "${ECHO_T}libraries $ac_kde_libraries, headers $ac_kde_includes" >&6; }
+
+  kde_libraries="$ac_kde_libraries"
+  kde_includes="$ac_kde_includes"
+fi
+
+
+
+if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
+ KDE_INCLUDES=""
+else
+ KDE_INCLUDES="-I$kde_includes"
+ all_includes="$KDE_INCLUDES $all_includes"
+fi
+
+KDE_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
+ all_libraries="$all_libraries $KDE_LDFLAGS"
+fi
+
+
+
+
+
+
+all_libraries="$all_libraries $USER_LDFLAGS"
+all_includes="$all_includes $USER_INCLUDES"
+
+
+
+
+
+  # Check whether --enable-path-check was given.
+if test "${enable_path_check+set}" = set; then
+  enableval=$enable_path_check;
+  if test "$enableval" = "no";
+    then ac_use_path_checking="default"
+    else ac_use_path_checking=""
+  fi
+
+else
+
+  if test "$kde_qtver" = 1;
+    then ac_use_path_checking=""
+    else ac_use_path_checking="default"
+  fi
+
+
+fi
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for KDE paths" >&5
+echo $ECHO_N "checking for KDE paths... $ECHO_C" >&6; }
+kde_result=""
+kde_cached_paths=yes
+if test "${kde_cv_all_paths+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+if test "$ac_use_path_checking" = "default"; then
+
+  if test -z "$kde_htmldir"; then
+    kde_htmldir='\${prefix}/share/doc/HTML'
+  fi
+  if test -z "$kde_appsdir"; then
+    kde_appsdir='\${prefix}/share/applnk'
+  fi
+  if test -z "$kde_icondir"; then
+    kde_icondir='\${prefix}/share/icons'
+  fi
+  if test -z "$kde_sounddir"; then
+    kde_sounddir='\${prefix}/share/sounds'
+  fi
+  if test -z "$kde_datadir"; then
+    kde_datadir='\${prefix}/share/apps'
+  fi
+  if test -z "$kde_locale"; then
+    kde_locale='\${prefix}/share/locale'
+  fi
+  if test -z "$kde_cgidir"; then
+    kde_cgidir='\${exec_prefix}/cgi-bin'
+  fi
+  if test -z "$kde_confdir"; then
+    kde_confdir='\${prefix}/share/config'
+  fi
+  if test -z "$kde_mimedir"; then
+    kde_mimedir='\${prefix}/share/mimelnk'
+  fi
+  if test -z "$kde_toolbardir"; then
+    kde_toolbardir='\${prefix}/share/toolbar'
+  fi
+  if test -z "$kde_wallpaperdir"; then
+    kde_wallpaperdir='\${prefix}/share/wallpapers'
+  fi
+  if test -z "$kde_templatesdir"; then
+    kde_templatesdir='\${prefix}/share/templates'
+  fi
+  if test -z "$kde_bindir"; then
+    kde_bindir='\${exec_prefix}/bin'
+  fi
+  if test -z "$kde_servicesdir"; then
+    kde_servicesdir='\${prefix}/share/services'
+  fi
+  if test -z "$kde_servicetypesdir"; then
+    kde_servicetypesdir='\${prefix}/share/servicetypes'
+  fi
+  if test -z "$kde_moduledir"; then
+    if test "$kde_qtver" = "2"; then
+      kde_moduledir='\${exec_prefix}/lib/kde2'
+    else
+      kde_moduledir='\${exec_prefix}/lib/kde3'
+    fi
+  fi
+  if test -z "$kde_styledir"; then
+    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
+  fi
+  if test -z "$kde_widgetdir"; then
+    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+  fi
+
+
+  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+	kde_htmldir=\"$kde_htmldir\" \
+	kde_appsdir=\"$kde_appsdir\" \
+	kde_icondir=\"$kde_icondir\" \
+	kde_sounddir=\"$kde_sounddir\" \
+	kde_datadir=\"$kde_datadir\" \
+	kde_locale=\"$kde_locale\" \
+	kde_cgidir=\"$kde_cgidir\" \
+	kde_confdir=\"$kde_confdir\" \
+	kde_mimedir=\"$kde_mimedir\" \
+	kde_toolbardir=\"$kde_toolbardir\" \
+	kde_wallpaperdir=\"$kde_wallpaperdir\" \
+	kde_templatesdir=\"$kde_templatesdir\" \
+	kde_bindir=\"$kde_bindir\" \
+	kde_servicesdir=\"$kde_servicesdir\" \
+	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+	kde_moduledir=\"$kde_moduledir\" \
+   kde_styledir=\"$kde_styledir\" \
+	kde_widgetdir=\"$kde_widgetdir\" \
+	kde_result=defaults"
+
+
+else
+
+  if test $kde_qtver = 1; then
+     { echo "$as_me:$LINENO: result: compiling" >&5
+echo "${ECHO_T}compiling" >&6; }
+
+
+    { echo "$as_me:$LINENO: checking for KDE headers installed" >&5
+echo $ECHO_N "checking for KDE headers installed... $ECHO_C" >&6; }
+
+     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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+    printf("kde_wallpaperdir=\\"%s\\"\n",
+	KApplication::kde_wallpaperdir().data());
+    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+    printf("kde_styledir=\\"/tmp/dummy\\"\n");
+    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+    return 0;
+    }
+EOF
+
+ ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+   { { echo "$as_me:$LINENO: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+  KDE_TEST_RPATH=
+
+  if test -n "$USE_RPATH"; then
+
+     if test -n "$kde_libraries"; then
+       KDE_TEST_RPATH="-R $kde_libraries"
+     fi
+
+     if test -n "$qt_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+     fi
+
+     if test -n "$x_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+     fi
+
+     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+  fi
+
+{ echo "$as_me:$LINENO: checking for KDE libraries installed" >&5
+echo $ECHO_N "checking for KDE libraries installed... $ECHO_C" >&6; }
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { { echo "$as_me:$LINENO: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+  kde_result=done
+else
+  kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+
+  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+	kde_htmldir=\"$kde_htmldir\" \
+	kde_appsdir=\"$kde_appsdir\" \
+	kde_icondir=\"$kde_icondir\" \
+	kde_sounddir=\"$kde_sounddir\" \
+	kde_datadir=\"$kde_datadir\" \
+	kde_locale=\"$kde_locale\" \
+	kde_cgidir=\"$kde_cgidir\" \
+	kde_confdir=\"$kde_confdir\" \
+	kde_mimedir=\"$kde_mimedir\" \
+	kde_toolbardir=\"$kde_toolbardir\" \
+	kde_wallpaperdir=\"$kde_wallpaperdir\" \
+	kde_templatesdir=\"$kde_templatesdir\" \
+	kde_bindir=\"$kde_bindir\" \
+	kde_servicesdir=\"$kde_servicesdir\" \
+	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+	kde_moduledir=\"$kde_moduledir\" \
+   kde_styledir=\"$kde_styledir\" \
+	kde_widgetdir=\"$kde_widgetdir\" \
+	kde_result=$kde_result"
+
+
+
+  else
+     { { echo "$as_me:$LINENO: error: path checking not yet supported for KDE 2" >&5
+echo "$as_me: error: path checking not yet supported for KDE 2" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+fi
+
+  kde_cached_paths=no
+
+fi
+
+eval "$kde_cv_all_paths"
+ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+   test -z "$kde_datadir" || test -z "$kde_locale"  ||
+   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
+   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+   test -z "$kde_styledir" || test -z "kde_widgetdir"
+   test "x$kde_have_all_paths" != "xyes"; then
+     kde_have_all_paths=no
+  fi
+
+if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
+  # wrong values were cached, may be, we can set better ones
+  kde_result=
+  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
+  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
+  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+  kde_have_all_paths=
+  kde_styledir=
+  kde_widgetdir=
+
+if test "$ac_use_path_checking" = "default"; then
+
+  if test -z "$kde_htmldir"; then
+    kde_htmldir='\${prefix}/share/doc/HTML'
+  fi
+  if test -z "$kde_appsdir"; then
+    kde_appsdir='\${prefix}/share/applnk'
+  fi
+  if test -z "$kde_icondir"; then
+    kde_icondir='\${prefix}/share/icons'
+  fi
+  if test -z "$kde_sounddir"; then
+    kde_sounddir='\${prefix}/share/sounds'
+  fi
+  if test -z "$kde_datadir"; then
+    kde_datadir='\${prefix}/share/apps'
+  fi
+  if test -z "$kde_locale"; then
+    kde_locale='\${prefix}/share/locale'
+  fi
+  if test -z "$kde_cgidir"; then
+    kde_cgidir='\${exec_prefix}/cgi-bin'
+  fi
+  if test -z "$kde_confdir"; then
+    kde_confdir='\${prefix}/share/config'
+  fi
+  if test -z "$kde_mimedir"; then
+    kde_mimedir='\${prefix}/share/mimelnk'
+  fi
+  if test -z "$kde_toolbardir"; then
+    kde_toolbardir='\${prefix}/share/toolbar'
+  fi
+  if test -z "$kde_wallpaperdir"; then
+    kde_wallpaperdir='\${prefix}/share/wallpapers'
+  fi
+  if test -z "$kde_templatesdir"; then
+    kde_templatesdir='\${prefix}/share/templates'
+  fi
+  if test -z "$kde_bindir"; then
+    kde_bindir='\${exec_prefix}/bin'
+  fi
+  if test -z "$kde_servicesdir"; then
+    kde_servicesdir='\${prefix}/share/services'
+  fi
+  if test -z "$kde_servicetypesdir"; then
+    kde_servicetypesdir='\${prefix}/share/servicetypes'
+  fi
+  if test -z "$kde_moduledir"; then
+    if test "$kde_qtver" = "2"; then
+      kde_moduledir='\${exec_prefix}/lib/kde2'
+    else
+      kde_moduledir='\${exec_prefix}/lib/kde3'
+    fi
+  fi
+  if test -z "$kde_styledir"; then
+    kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
+  fi
+  if test -z "$kde_widgetdir"; then
+    kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
+  fi
+
+
+  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+	kde_htmldir=\"$kde_htmldir\" \
+	kde_appsdir=\"$kde_appsdir\" \
+	kde_icondir=\"$kde_icondir\" \
+	kde_sounddir=\"$kde_sounddir\" \
+	kde_datadir=\"$kde_datadir\" \
+	kde_locale=\"$kde_locale\" \
+	kde_cgidir=\"$kde_cgidir\" \
+	kde_confdir=\"$kde_confdir\" \
+	kde_mimedir=\"$kde_mimedir\" \
+	kde_toolbardir=\"$kde_toolbardir\" \
+	kde_wallpaperdir=\"$kde_wallpaperdir\" \
+	kde_templatesdir=\"$kde_templatesdir\" \
+	kde_bindir=\"$kde_bindir\" \
+	kde_servicesdir=\"$kde_servicesdir\" \
+	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+	kde_moduledir=\"$kde_moduledir\" \
+   kde_styledir=\"$kde_styledir\" \
+	kde_widgetdir=\"$kde_widgetdir\" \
+	kde_result=defaults"
+
+
+else
+
+  if test $kde_qtver = 1; then
+     { echo "$as_me:$LINENO: result: compiling" >&5
+echo "${ECHO_T}compiling" >&6; }
+
+
+    { echo "$as_me:$LINENO: checking for KDE headers installed" >&5
+echo $ECHO_N "checking for KDE headers installed... $ECHO_C" >&6; }
+
+     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
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+    printf("kde_wallpaperdir=\\"%s\\"\n",
+	KApplication::kde_wallpaperdir().data());
+    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+    printf("kde_styledir=\\"/tmp/dummy\\"\n");
+    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+    return 0;
+    }
+EOF
+
+ ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+   { { echo "$as_me:$LINENO: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+  KDE_TEST_RPATH=
+
+  if test -n "$USE_RPATH"; then
+
+     if test -n "$kde_libraries"; then
+       KDE_TEST_RPATH="-R $kde_libraries"
+     fi
+
+     if test -n "$qt_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+     fi
+
+     if test -n "$x_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+     fi
+
+     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+  fi
+
+{ echo "$as_me:$LINENO: checking for KDE libraries installed" >&5
+echo $ECHO_N "checking for KDE libraries installed... $ECHO_C" >&6; }
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { { echo "$as_me:$LINENO: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+  kde_result=done
+else
+  kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+
+  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+	kde_htmldir=\"$kde_htmldir\" \
+	kde_appsdir=\"$kde_appsdir\" \
+	kde_icondir=\"$kde_icondir\" \
+	kde_sounddir=\"$kde_sounddir\" \
+	kde_datadir=\"$kde_datadir\" \
+	kde_locale=\"$kde_locale\" \
+	kde_cgidir=\"$kde_cgidir\" \
+	kde_confdir=\"$kde_confdir\" \
+	kde_mimedir=\"$kde_mimedir\" \
+	kde_toolbardir=\"$kde_toolbardir\" \
+	kde_wallpaperdir=\"$kde_wallpaperdir\" \
+	kde_templatesdir=\"$kde_templatesdir\" \
+	kde_bindir=\"$kde_bindir\" \
+	kde_servicesdir=\"$kde_servicesdir\" \
+	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+	kde_moduledir=\"$kde_moduledir\" \
+   kde_styledir=\"$kde_styledir\" \
+	kde_widgetdir=\"$kde_widgetdir\" \
+	kde_result=$kde_result"
+
+
+
+  else
+     { { echo "$as_me:$LINENO: error: path checking not yet supported for KDE 2" >&5
+echo "$as_me: error: path checking not yet supported for KDE 2" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+fi
+
+  eval "$kde_cv_all_paths"
+   if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+   test -z "$kde_datadir" || test -z "$kde_locale"  ||
+   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
+   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+   test -z "$kde_styledir" || test -z "kde_widgetdir"
+   test "x$kde_have_all_paths" != "xyes"; then
+     kde_have_all_paths=no
+  fi
+
+  kde_result="$kde_result (cache overridden)"
+fi
+if test "$kde_have_all_paths" = "no"; then
+  { { echo "$as_me:$LINENO: error: configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+" >&5
+echo "$as_me: error: configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  rm -f conftest*
+  { echo "$as_me:$LINENO: result: $kde_result" >&5
+echo "${ECHO_T}$kde_result" >&6; }
+fi
+
+bindir=$kde_bindir
+
+
+
+        kde_default_bindirs="`kde-config --prefix`/bin /usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+        if test -n "$KDEDIRS"; then
+           kde_save_IFS=$IFS
+           IFS=:
+           for dir in $KDEDIRS; do
+                kde_default_bindirs="$dir/bin $kde_default_bindirs "
+           done
+           IFS=$kde_save_IFS
+        fi
+        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
+
+   { echo "$as_me:$LINENO: checking for dcopidl" >&5
+echo $ECHO_N "checking for dcopidl... $ECHO_C" >&6; }
+   if test -n "$DCOPIDL"; then
+        kde_cv_path="$DCOPIDL";
+   else
+        kde_cache=`echo dcopidl | sed 'y%./+-%__p_%'`
+
+        if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        kde_cv_path="NONE"
+	dirs="$kde_default_bindirs"
+	kde_save_IFS=$IFS
+	IFS=':'
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+        done
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/dcopidl"; then
+	    if test -n ""
+	    then
+              evalstr="$dir/dcopidl  2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/dcopidl"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/dcopidl"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
+   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+      { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+    { { echo "$as_me:$LINENO: error: The important program dcopidl was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program dcopidl was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+   { (exit 1); exit 1; }; }
+
+   else
+      { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+      DCOPIDL=$kde_cv_path
+
+   fi
+
+
+   { echo "$as_me:$LINENO: checking for dcopidl2cpp" >&5
+echo $ECHO_N "checking for dcopidl2cpp... $ECHO_C" >&6; }
+   if test -n "$DCOPIDL2CPP"; then
+        kde_cv_path="$DCOPIDL2CPP";
+   else
+        kde_cache=`echo dcopidl2cpp | sed 'y%./+-%__p_%'`
+
+        if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        kde_cv_path="NONE"
+	dirs="$kde_default_bindirs"
+	kde_save_IFS=$IFS
+	IFS=':'
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+        done
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/dcopidl2cpp"; then
+	    if test -n ""
+	    then
+              evalstr="$dir/dcopidl2cpp  2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/dcopidl2cpp"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/dcopidl2cpp"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
+   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+      { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+    { { echo "$as_me:$LINENO: error: The important program dcopidl2cpp was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program dcopidl2cpp was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+   { (exit 1); exit 1; }; }
+
+   else
+      { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+      DCOPIDL2CPP=$kde_cv_path
+
+   fi
+
+
+   { echo "$as_me:$LINENO: checking for kde-config" >&5
+echo $ECHO_N "checking for kde-config... $ECHO_C" >&6; }
+   if test -n "$KDECONFIG"; then
+        kde_cv_path="$KDECONFIG";
+   else
+        kde_cache=`echo kde-config | sed 'y%./+-%__p_%'`
+
+        if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        kde_cv_path="NONE"
+	dirs="$kde_default_bindirs"
+	kde_save_IFS=$IFS
+	IFS=':'
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+        done
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/kde-config"; then
+	    if test -n ""
+	    then
+              evalstr="$dir/kde-config  2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/kde-config"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/kde-config"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
+   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+      { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+   else
+      { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+      KDECONFIG=$kde_cv_path
+
+   fi
+
+
+        DCOP_DEPENDENCIES='$(DCOPIDL)'
+
+
+
+
+
+        if test -x "$KDECONFIG"; then # it can be "compiled"
+          kde_libs_prefix=`$KDECONFIG --prefix`
+          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
+               { { echo "$as_me:$LINENO: error: $KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+                          This means it has been moved since you installed it.
+                          This won't work. Please recompile kdelibs for the new prefix.
+                          " >&5
+echo "$as_me: error: $KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+                          This means it has been moved since you installed it.
+                          This won't work. Please recompile kdelibs for the new prefix.
+                          " >&2;}
+   { (exit 1); exit 1; }; }
+           fi
+           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
+        else
+           kde_libs_prefix='$(prefix)'
+           kde_libs_htmldir='$(kde_htmldir)'
+        fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test "$kde_qtver" = 1; then
+  kde_minidir="$kde_icondir/mini"
+else
+# for KDE 1 - this breaks KDE2 apps using minidir, but
+# that's the plan ;-/
+  kde_minidir="/dev/null"
+fi
+
+
+
+
+
+
+if test $kde_qtver = 3; then
+   LIB_KDECORE='-lkdecore'
+
+   LIB_KDEUI='-lkdeui'
+
+   LIB_KIO='-lkio'
+
+   LIB_SMB='-lsmb'
+
+   LIB_KAB='-lkab'
+
+   LIB_KHTML='-lkhtml'
+
+   LIB_KSPELL='-lkspell'
+
+   LIB_KPARTS='-lkparts'
+
+   LIB_KDEPRINT='-lkdeprint'
+
+# these are for backward compatibility
+   LIB_KSYCOCA='-lkio'
+
+   LIB_KFILE='-lkio'
+
+elif test $kde_qtver = 2; then
+   LIB_KDECORE='-lkdecore'
+
+   LIB_KDEUI='-lkdeui'
+
+   LIB_KIO='-lkio'
+
+   LIB_KSYCOCA='-lksycoca'
+
+   LIB_SMB='-lsmb'
+
+   LIB_KFILE='-lkfile'
+
+   LIB_KAB='-lkab'
+
+   LIB_KHTML='-lkhtml'
+
+   LIB_KSPELL='-lkspell'
+
+   LIB_KPARTS='-lkparts'
+
+   LIB_KDEPRINT='-lkdeprint'
+
+else
+   LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
+
+   LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
+
+   LIB_KFM='-lkfm $(LIB_KDECORE)'
+
+   LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
+
+   LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
+
+fi
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_KDE 1
+_ACEOF
+
+fi
+
+
+# Ensure MSVC-compatible struct packing convention is used when
+# compiling for Win32 with gcc.
+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
+# gcc2 uses "-fnative-struct".
+case $host_os in
+*mingw*|*cygwin*)
+  if test x$GCC = xyes; then
+    msnative_struct=''
+    { echo "$as_me:$LINENO: checking how to get MSVC-compatible struct packing" >&5
+echo $ECHO_N "checking how to get MSVC-compatible struct packing... $ECHO_C" >&6; }
+    if test -z "$ac_cv_prog_CC"; then
+      our_gcc="$CC"
+    else
+      our_gcc="$ac_cv_prog_CC"
+    fi
+    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+      2.)
+        if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+          msnative_struct='-fnative-struct'
+        fi
+        ;;
+      *)
+        if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+          msnative_struct='-mms-bitfields'
+        fi
+        ;;
+    esac
+    if test x"$msnative_struct" = x ; then
+      { echo "$as_me:$LINENO: result: no way" >&5
+echo "${ECHO_T}no way" >&6; }
+      { echo "$as_me:$LINENO: WARNING: produced libraries might be incompatible with MSVC-compiled code" >&5
+echo "$as_me: WARNING: produced libraries might be incompatible with MSVC-compiled code" >&2;}
+    else
+      CFLAGS="$CFLAGS $msnative_struct"
+      { echo "$as_me:$LINENO: result: ${msnative_struct}" >&5
+echo "${ECHO_T}${msnative_struct}" >&6; }
+    fi
+  fi
+  ;;
+esac
+
+# Check for the new -fvisibility=hidden flag introduced in gcc 4.0
+# Allow to reduce shared library size and avoid symbol clash
+# Unfortunately, this only works for fully static builds. If any parts of GDB are built shared (--enable-shared or --enable-shared-*), we currently have no way to disable it just for these parts. -- Kevin
+case $host_os in
+*mingw*)
+  ;;
+*)
+    case "$ac_configure_args" in
+    *--enable-shared*)
+      ;;
+    *)
+        if test x$GCC = xyes; then
+           visibility_flag=''
+           { echo "$as_me:$LINENO: checking whether gcc accepts -fvisibility" >&5
+echo $ECHO_N "checking whether gcc accepts -fvisibility... $ECHO_C" >&6; }
+           if test -z "$ac_cv_prog_CC"; then
+              our_gcc="$CC"
+           else
+              our_gcc="$ac_cv_prog_CC"
+           fi
+           if $our_gcc -v --help 2>/dev/null | grep "fvisibility" >/dev/null; then
+              visibility_flag='-fvisibility=hidden'
+           fi
+           if test x"$visibility_flag" = x ; then
+              { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+           else
+              CFLAGS="$CFLAGS $visibility_flag"
+              { echo "$as_me:$LINENO: result: ${visibility_flag}" >&5
+echo "${ECHO_T}${visibility_flag}" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FVISIBILITY 1
+_ACEOF
+
+            fi
+        fi
+        ;;
+    esac
+  ;;
+esac
+
+case "$host" in
+  *-*-linux*) EXFL="-Wl,--export-dynamic" ;;
+  *)          EXFL="" ;;
+esac
+LDFLAGS="$LDFLAGS $EXFL"
+
+# On Darwin, libglade chokes on stripped executables.
+case "$host" in
+  *-apple-darwin*)
+    case "$CFLAGS $CXXFLAGS $LDFLAGS" in
+      *" -s "*|"-s "*|*" -s"|"-s")
+         echo "warning: cannot strip libglade executables on this host"
+         CFLAGS=`echo "$CFLAGS"|sed 's/\( -s\)* / /g;s/^-s //g;s/ -s$//g;s/^-s$//g'`
+         CXXFLAGS=`echo "$CXXFLAGS"|sed 's/\( -s\)* / /g;s/^-s //g;s/ -s$//g;s/^-s$//g'`
+         LDFLAGS=`echo "$LDFLAGS"|sed 's/\( -s\)* / /g;s/^-s //g;s/ -s$//g;s/^-s$//g'`
+         ;;
+    esac
+    ;;
+esac
+
+# some extra flags
+CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED -DDEBUGGER"
+CXXFLAGS="$CFLAGS -fno-rtti -fno-exceptions"
+
+
+
+
+
+# Debugger support (can be disabled for embedded architectures)
+# Check whether --enable-debugger was given.
+if test "${enable_debugger+set}" = set; then
+  enableval=$enable_debugger; tiemu_use_debugger=$enableval
+else
+  tiemu_use_debugger=yes
+fi
+
+{ echo "$as_me:$LINENO: checking whether to use the debugger" >&5
+echo $ECHO_N "checking whether to use the debugger... $ECHO_C" >&6; }
+if test "${tiemu_use_debugger+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  tiemu_use_debugger=yes
+fi
+{ echo "$as_me:$LINENO: result: $tiemu_use_debugger" >&5
+echo "${ECHO_T}$tiemu_use_debugger" >&6; }
+if test x$tiemu_use_debugger = xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DEBUGGER 1
+_ACEOF
+
+fi
+
+# GDB support (can be disabled)
+# Check whether --enable-gdb was given.
+if test "${enable_gdb+set}" = set; then
+  enableval=$enable_gdb; tiemu_use_gdb=$enableval
+else
+  tiemu_use_gdb=$tiemu_use_debugger
+fi
+
+{ echo "$as_me:$LINENO: checking whether to use the GDB-based source-level debugger" >&5
+echo $ECHO_N "checking whether to use the GDB-based source-level debugger... $ECHO_C" >&6; }
+if test "${tiemu_use_gdb+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  tiemu_use_gdb=$tiemu_use_debugger
+fi
+{ echo "$as_me:$LINENO: result: $tiemu_use_gdb" >&5
+echo "${ECHO_T}$tiemu_use_gdb" >&6; }
+if test x$tiemu_use_gdb = xno; then
+  CFLAGS="$CFLAGS -DNO_GDB"
+fi
+ if test x$tiemu_use_gdb = xno; then
+  NO_GDB_TRUE=
+  NO_GDB_FALSE='#'
+else
+  NO_GDB_TRUE='#'
+  NO_GDB_FALSE=
+fi
+
+
+# It makes no sense to enable GDB without the debugger!
+if test x$tiemu_use_debugger = xno -a x$tiemu_use_gdb = xyes; then
+  { { echo "$as_me:$LINENO: error: cannot enable GDB without the debugger" >&5
+echo "$as_me: error: cannot enable GDB without the debugger" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Run GDB configury (if enabled)
+if test x$tiemu_use_gdb = xyes; then
+  ac_configure_args="$ac_configure_args --target=m68k-coff --disable-tui --disable-werror"
+
+  ac_configure_args=`echo "$ac_configure_args" | sed "s,'CC=[^']*',,g;s,'CFLAGS=[^']*',,g;s,'CXX=[^']*',,g;s,'CXXFLAGS=[^']*',,g;s,'LDFLAGS=[^']*',,g;s,'LIBS=[^']*',,g;s,'build_alias=[^']*',,g;s,'host_alias=[^']*',,g;s,'target_alias=[^']*',,g"`
+
+  subdirs="$subdirs src/gdb"
+
+fi
+
+# Output.
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_GROFF_TRUE}" && test -z "${USE_GROFF_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USE_GROFF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USE_GROFF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${NO_GDB_TRUE}" && test -z "${NO_GDB_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"NO_GDB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"NO_GDB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by TiEmu $as_me 3.03, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+TiEmu config.status 3.03
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "build/Makefile") CONFIG_FILES="$CONFIG_FILES build/Makefile" ;;
+    "glade/Makefile") CONFIG_FILES="$CONFIG_FILES glade/Makefile" ;;
+    "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;;
+    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+    "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;;
+    "pedrom/Makefile") CONFIG_FILES="$CONFIG_FILES pedrom/Makefile" ;;
+    "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;;
+    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "skins/Makefile") CONFIG_FILES="$CONFIG_FILES skins/Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "tiemu.lsm") CONFIG_FILES="$CONFIG_FILES tiemu.lsm" ;;
+    "tiemu.spec") CONFIG_FILES="$CONFIG_FILES tiemu.spec" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
+MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
+MAINT!$MAINT$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+SED!$SED$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+LN_S!$LN_S$ac_delim
+ECHO!$ECHO$ac_delim
+AR!$AR$ac_delim
+RANLIB!$RANLIB$ac_delim
+DSYMUTIL!$DSYMUTIL$ac_delim
+NMEDIT!$NMEDIT$ac_delim
+DLLTOOL!$DLLTOOL$ac_delim
+AS!$AS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+OBJDUMP!$OBJDUMP$ac_delim
+CPP!$CPP$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+CXXCPP!$CXXCPP$ac_delim
+F77!$F77$ac_delim
+FFLAGS!$FFLAGS$ac_delim
+ac_ct_F77!$ac_ct_F77$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+GROFF!$GROFF$ac_delim
+USE_GROFF_TRUE!$USE_GROFF_TRUE$ac_delim
+USE_GROFF_FALSE!$USE_GROFF_FALSE$ac_delim
+RC!$RC$ac_delim
+USE_NLS!$USE_NLS$ac_delim
+GETTEXT_MACRO_VERSION!$GETTEXT_MACRO_VERSION$ac_delim
+MSGFMT!$MSGFMT$ac_delim
+GMSGFMT!$GMSGFMT$ac_delim
+MSGFMT_015!$MSGFMT_015$ac_delim
+GMSGFMT_015!$GMSGFMT_015$ac_delim
+XGETTEXT!$XGETTEXT$ac_delim
+XGETTEXT_015!$XGETTEXT_015$ac_delim
+MSGMERGE!$MSGMERGE$ac_delim
+XGETTEXT_EXTRA_OPTIONS!$XGETTEXT_EXTRA_OPTIONS$ac_delim
+INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim
+LIBICONV!$LIBICONV$ac_delim
+LTLIBICONV!$LTLIBICONV$ac_delim
+INTLLIBS!$INTLLIBS$ac_delim
+LIBINTL!$LIBINTL$ac_delim
+LTLIBINTL!$LTLIBINTL$ac_delim
+POSUB!$POSUB$ac_delim
+INCINTL!$INCINTL$ac_delim
+PKG_CONFIG!$PKG_CONFIG$ac_delim
+TICABLES_CFLAGS!$TICABLES_CFLAGS$ac_delim
+TICABLES_LIBS!$TICABLES_LIBS$ac_delim
+TICALCS_CFLAGS!$TICALCS_CFLAGS$ac_delim
+TICALCS_LIBS!$TICALCS_LIBS$ac_delim
+TIFILES_CFLAGS!$TIFILES_CFLAGS$ac_delim
+TIFILES_LIBS!$TIFILES_LIBS$ac_delim
+TICONV_CFLAGS!$TICONV_CFLAGS$ac_delim
+TICONV_LIBS!$TICONV_LIBS$ac_delim
+GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
+GLIB_LIBS!$GLIB_LIBS$ac_delim
+GTK_CFLAGS!$GTK_CFLAGS$ac_delim
+GTK_LIBS!$GTK_LIBS$ac_delim
+GLADE_CFLAGS!$GLADE_CFLAGS$ac_delim
+GLADE_LIBS!$GLADE_LIBS$ac_delim
+DBUS_GLIB_CFLAGS!$DBUS_GLIB_CFLAGS$ac_delim
+DBUS_GLIB_LIBS!$DBUS_GLIB_LIBS$ac_delim
+dbus!$dbus$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LIBZ!$LIBZ$ac_delim
+SDL_CONFIG!$SDL_CONFIG$ac_delim
+SDL_CFLAGS!$SDL_CFLAGS$ac_delim
+SDL_LIBS!$SDL_LIBS$ac_delim
+LIBUTIL!$LIBUTIL$ac_delim
+LIBCOMPAT!$LIBCOMPAT$ac_delim
+LIBCRYPT!$LIBCRYPT$ac_delim
+LIBSOCKET!$LIBSOCKET$ac_delim
+LIBRESOLV!$LIBRESOLV$ac_delim
+X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
+LIBUCB!$LIBUCB$ac_delim
+LIBDL!$LIBDL$ac_delim
+XMKMF!$XMKMF$ac_delim
+X_INCLUDES!$X_INCLUDES$ac_delim
+X_LDFLAGS!$X_LDFLAGS$ac_delim
+x_libraries!$x_libraries$ac_delim
+x_includes!$x_includes$ac_delim
+LIBSM!$LIBSM$ac_delim
+X_PRE_LIBS!$X_PRE_LIBS$ac_delim
+LIB_X11!$LIB_X11$ac_delim
+LIBXINERAMA!$LIBXINERAMA$ac_delim
+QTE_NORTTI!$QTE_NORTTI$ac_delim
+LIB_XEXT!$LIB_XEXT$ac_delim
+LIBPTHREAD!$LIBPTHREAD$ac_delim
+USE_THREADS!$USE_THREADS$ac_delim
+KDE_MT_LDFLAGS!$KDE_MT_LDFLAGS$ac_delim
+KDE_MT_LIBS!$KDE_MT_LIBS$ac_delim
+USER_INCLUDES!$USER_INCLUDES$ac_delim
+USER_LDFLAGS!$USER_LDFLAGS$ac_delim
+LIBPNG!$LIBPNG$ac_delim
+LIBJPEG!$LIBJPEG$ac_delim
+qt_libraries!$qt_libraries$ac_delim
+qt_includes!$qt_includes$ac_delim
+QT_INCLUDES!$QT_INCLUDES$ac_delim
+QT_LDFLAGS!$QT_LDFLAGS$ac_delim
+MOC!$MOC$ac_delim
+UIC!$UIC$ac_delim
+UIC_TR!$UIC_TR$ac_delim
+LIB_QT!$LIB_QT$ac_delim
+LIB_QPE!$LIB_QPE$ac_delim
+kde_qtver!$kde_qtver$ac_delim
+KDE_EXTRA_RPATH!$KDE_EXTRA_RPATH$ac_delim
+KDE_RPATH!$KDE_RPATH$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+kde_libraries!$kde_libraries$ac_delim
+kde_includes!$kde_includes$ac_delim
+KDE_LDFLAGS!$KDE_LDFLAGS$ac_delim
+KDE_INCLUDES!$KDE_INCLUDES$ac_delim
+all_includes!$all_includes$ac_delim
+all_libraries!$all_libraries$ac_delim
+AUTODIRS!$AUTODIRS$ac_delim
+DCOPIDL!$DCOPIDL$ac_delim
+DCOPIDL2CPP!$DCOPIDL2CPP$ac_delim
+DCOP_DEPENDENCIES!$DCOP_DEPENDENCIES$ac_delim
+KDECONFIG!$KDECONFIG$ac_delim
+kde_libs_prefix!$kde_libs_prefix$ac_delim
+kde_libs_htmldir!$kde_libs_htmldir$ac_delim
+kde_htmldir!$kde_htmldir$ac_delim
+kde_appsdir!$kde_appsdir$ac_delim
+kde_icondir!$kde_icondir$ac_delim
+kde_sounddir!$kde_sounddir$ac_delim
+kde_datadir!$kde_datadir$ac_delim
+kde_locale!$kde_locale$ac_delim
+kde_confdir!$kde_confdir$ac_delim
+kde_mimedir!$kde_mimedir$ac_delim
+kde_wallpaperdir!$kde_wallpaperdir$ac_delim
+kde_bindir!$kde_bindir$ac_delim
+kde_templatesdir!$kde_templatesdir$ac_delim
+kde_servicesdir!$kde_servicesdir$ac_delim
+kde_servicetypesdir!$kde_servicetypesdir$ac_delim
+kde_moduledir!$kde_moduledir$ac_delim
+kde_styledir!$kde_styledir$ac_delim
+kde_widgetdir!$kde_widgetdir$ac_delim
+LIB_KDECORE!$LIB_KDECORE$ac_delim
+LIB_KDEUI!$LIB_KDEUI$ac_delim
+LIB_KIO!$LIB_KIO$ac_delim
+LIB_SMB!$LIB_SMB$ac_delim
+LIB_KAB!$LIB_KAB$ac_delim
+LIB_KHTML!$LIB_KHTML$ac_delim
+LIB_KSPELL!$LIB_KSPELL$ac_delim
+LIB_KPARTS!$LIB_KPARTS$ac_delim
+LIB_KDEPRINT!$LIB_KDEPRINT$ac_delim
+LIB_KSYCOCA!$LIB_KSYCOCA$ac_delim
+LIB_KFILE!$LIB_KFILE$ac_delim
+LIB_KFM!$LIB_KFM$ac_delim
+kde!$kde$ac_delim
+NO_GDB_TRUE!$NO_GDB_TRUE$ac_delim
+NO_GDB_FALSE!$NO_GDB_FALSE$ac_delim
+subdirs!$subdirs$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status.  If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless.  But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
+ac_dB='\\)[	 (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+  sed -n '
+	t rset
+	:rset
+	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+	t ok
+	d
+	:ok
+	s/[\\&,]/\\&/g
+	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+  ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[	 #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+  # Write a here document:
+    cat >>$CONFIG_STATUS <<_ACEOF
+    # First, check the format of the line:
+    cat >"\$tmp/defines.sed" <<\\CEOF
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+b
+:def
+_ACEOF
+  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+  grep . conftest.tail >/dev/null || break
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+  if test x"$ac_file" != x-; then
+    echo "/* $configure_input  */" >"$tmp/config.h"
+    cat "$ac_result" >>"$tmp/config.h"
+    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f $ac_file
+      mv "$tmp/config.h" $ac_file
+    fi
+  else
+    echo "/* $configure_input  */"
+    cat "$ac_result"
+  fi
+  rm -f "$tmp/out12"
+# Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
+_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" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # 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 ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    { as_dir=$dirpart/$fdir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    "po-directories":C)
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; 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
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done ;;
+
+  esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+  # Remove --cache-file and --srcdir arguments so they do not pile up.
+  ac_sub_configure_args=
+  ac_prev=
+  eval "set x $ac_configure_args"
+  shift
+  for ac_arg
+  do
+    if test -n "$ac_prev"; then
+      ac_prev=
+      continue
+    fi
+    case $ac_arg in
+    -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=*)
+      ;;
+    --config-cache | -C)
+      ;;
+    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+      ac_prev=srcdir ;;
+    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+      ;;
+    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+      ac_prev=prefix ;;
+    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+      ;;
+    *)
+      case $ac_arg in
+      *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      esac
+      ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
+    esac
+  done
+
+  # Always prepend --prefix to ensure using the same prefix
+  # in subdir configurations.
+  ac_arg="--prefix=$prefix"
+  case $ac_arg in
+  *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+  # Pass --silent
+  if test "$silent" = yes; then
+    ac_sub_configure_args="--silent $ac_sub_configure_args"
+  fi
+
+  ac_popdir=`pwd`
+  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+    # Do not complain, so a configure script can configure whichever
+    # parts of a large source tree are present.
+    test -d "$srcdir/$ac_dir" || continue
+
+    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+    echo "$as_me:$LINENO: $ac_msg" >&5
+    echo "$ac_msg" >&6
+    { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+    cd "$ac_dir"
+
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      ac_sub_configure=$ac_srcdir/configure.gnu
+    elif test -f "$ac_srcdir/configure"; then
+      ac_sub_configure=$ac_srcdir/configure
+    elif test -f "$ac_srcdir/configure.in"; then
+      # This should be Cygnus configure.
+      ac_sub_configure=$ac_aux_dir/configure
+    else
+      { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
+echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+      ac_sub_configure=
+    fi
+
+    # The recursion is here.
+    if test -n "$ac_sub_configure"; then
+      # Make the cache file name correct relative to the subdirectory.
+      case $cache_file in
+      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+      *) # Relative name.
+	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+      esac
+
+      { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+      # The eval makes quoting arguments work.
+      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+	{ { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
+echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    cd "$ac_popdir"
+  done
+fi
+
+
+echo
+echo "To run the TiEmu emulator, you will need an image (ROM dump or FLASH upgrade)."
+echo "As those files are copyrighted by Texas Instruments, they will never be"
+echo "distributed with the emulator... In replacement, you can use PedRom which"
+echo "is provided with TiEmu."
+echo
+echo "It you need a ROM dump, you can get one from your calculator"
+echo "with the 'ROM dump' function of TiLP."
+echo "Otherwise, you can use a TI's FLASH OS upgrade (AMS) as image."
+echo "Note: TiLP is available at http://lpg.ticalc.org/prj_tilp."
+echo
+echo "Now, you can type 'make' and 'make install'"
+echo ;
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..56b52c1
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,339 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl $Id: configure.in 409 2004-06-07 21:10:20Z roms $
+
+dnl Init.
+AC_PREREQ(2.57)
+AC_INIT(TiEmu, 3.03, [tiemu-users at lists.sourceforge.net])
+
+AM_INIT_AUTOMAKE([dist-bzip2])
+AM_MAINTAINER_MODE
+
+AC_PREFIX_DEFAULT(/usr/local)
+
+dnl Files to configure.
+AC_CONFIG_SRCDIR([src/gui/main.c])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([
+  Makefile
+  build/Makefile
+  glade/Makefile
+  help/Makefile
+  man/Makefile
+  misc/Makefile
+  pedrom/Makefile
+  pixmaps/Makefile
+  po/Makefile.in
+  skins/Makefile
+  src/Makefile
+  tiemu.lsm
+  tiemu.spec
+])
+
+AC_MSG_CHECKING([for something to drink while compiling])
+AC_MSG_RESULT([err: no fridge found!])
+
+# Setup libtool.
+AC_DISABLE_STATIC
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_PROG_LN_S
+AC_ISC_POSIX
+AC_CHECK_PROG(GROFF, groff, yes, no)
+AM_CONDITIONAL(USE_GROFF, test "$GROFF" != "no")
+AC_CHECK_TOOL(RC, windres, windres)
+
+# Checks for libraries.
+AM_GNU_GETTEXT(external)
+AC_SUBST(INCINTL)
+
+PKG_CHECK_MODULES(TICABLES, ticables2 >= 1.3.0)
+AC_SUBST(TICABLES_CFLAGS)
+AC_SUBST(TICABLES_LIBS)
+
+PKG_CHECK_MODULES(TICALCS, ticalcs2 >= 1.0.7)
+AC_SUBST(TICALCS_CFLAGS)
+AC_SUBST(TICALCS_LIBS)
+
+PKG_CHECK_MODULES(TIFILES, tifiles2 >= 1.0.7)
+AC_SUBST(TIFILES_CFLAGS)
+AC_SUBST(TIFILES_LIBS)
+
+PKG_CHECK_MODULES(TICONV, ticonv >= 1.0.4)
+AC_SUBST(TICONV_CFLAGS)
+AC_SUBST(TICONV_LIBS)
+
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6.0)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.4.0)
+AC_SUBST(GLADE_CFLAGS)
+AC_SUBST(GLADE_LIBS)
+
+# D-Bus support
+AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus], [Compile with D-Bus support]), [dbus=$withval], [dbus=no])
+if test "x$dbus" = "xyes"; then
+        PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.60)
+        AC_DEFINE(WITH_DBUS, 1, [Use D-Bus support])
+else
+        DBUS_GLIB_CFLAGS=
+        DBUS_GLIB_LIBS=
+fi
+AC_SUBST(DBUS_GLIB_CFLAGS)
+AC_SUBST(DBUS_GLIB_LIBS)
+AC_SUBST(dbus)
+
+# Checks for header files.
+AC_HEADER_STDBOOL
+AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([libintl.h])
+AC_CHECK_HEADERS([sys/timeb.h])
+AC_CHECK_HEADERS(stdint.h)
+AC_CHECK_HEADERS([tilp2/ticables.h tilp2/ticalcs.h tilp2/tifiles.h])
+dnl AC_CHECK_HEADERS([Carbon/Carbon.h])
+
+dnl # Add Carbon framework if detected
+dnl if test x"$ac_cv_header_Carbon_Carbon_h" = xyes ; then
+dnl   LDFLAGS="$LDFLAGS -framework Carbon"
+dnl #fi
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_FUNC_MEMCMP
+#AC_C_RESTRICT
+AC_C_VOLATILE
+
+# Checks for libraries.
+AC_CHECK_LIB(m, pow)
+AC_CHECK_LIB(pthread, pthread_create) dnl needed by GThread
+#AC_CHECK_LIB(comdlg32, GetOpenFileName)
+
+# Check for zlib
+AC_CHECK_HEADER(zlib.h)
+AC_CHECK_LIB(z, compress)
+LIBZ="$LIBS"
+LIBS=""
+AC_SUBST(LIBZ)
+
+# Checks for library functions.
+AC_FUNC_SELECT_ARGTYPES
+AC_FUNC_STAT 
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([bzero memset mkdir select strchr strrchr strstr])
+
+# Platform specific tests.
+CFLAGS_FOR_BUILD="$CFLAGS"
+export CFLAGS_FOR_BUILD
+dnl AC_CANONICAL_HOST
+case $host in
+  *-*-mingw*)            ARCH="-D__WIN32__ -D__MINGW32__ -mwindows -D_WINDOWS" ;;
+  *-*-*bsd*)             ARCH="-D__BSD__" ;;
+  i[[3456]]86-*-linux-*) ARCH="-D__I386__ -D__LINUX__" ;; 
+  i[[3456]]86-apple-darwin*) ARCH="-D__I386__ -D__MACOSX__" ;;
+  arm*-*-linux-*)        ARCH="-D__IPAQ__ -D__LINUX__" ;;
+  powerpc-*-linux-*)     ARCH="-D__PPC__  -D__LINUX__" ;;
+  powerpc-apple-darwin*) ARCH="-D__PPC__  -D__MACOSX__" ;;
+  *-apple-darwin*)       ARCH="-D__MACOSX__" ;;
+  *)                     ARCH="-D__LINUX__" ;;
+esac
+CFLAGS="$CFLAGS $ARCH"
+
+# Check for SDL if sound support is wanted
+AC_ARG_ENABLE(sound,
+  AC_HELP_STRING([--disable-sound], [disable sound emulation]),
+  [tiemu_use_sound=$enableval], [tiemu_use_sound=yes])
+AC_CACHE_CHECK([whether to enable sound emulation],
+  [tiemu_use_sound], [tiemu_use_sound=yes])
+if test "x$tiemu_use_sound" = "xyes"; then
+        SDL_VERSION=1.2.0
+        AM_PATH_SDL($SDL_VERSION,
+                    :,
+                    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
+        )
+else
+        CFLAGS="$CFLAGS -DNO_SOUND"
+        SDL_CFLAGS=
+        SDL_LIBS=
+fi
+AC_SUBST(SDL_CFLAGS)
+AC_SUBST(SDL_LIBS)
+
+# KDE dialogs support
+AC_ARG_WITH(kde, AC_HELP_STRING([--without-kde], [Compile without KDE support]), [kde=$withval], [kde=default])
+if test "x$kde" = "xdefault"; then
+  case $host_os in
+    *mingw*)
+      kde=no
+      ;;
+    *)
+      kde=yes
+      ;;
+  esac
+fi
+if test "x$kde" = "xyes"; then
+        AC_PROG_CXX
+        AC_PATH_KDE
+        AC_DEFINE(WITH_KDE, 1, [Use KDE support])
+fi
+AC_SUBST(kde)
+
+# Ensure MSVC-compatible struct packing convention is used when
+# compiling for Win32 with gcc.
+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
+# gcc2 uses "-fnative-struct".
+case $host_os in
+*mingw*|*cygwin*)
+  if test x$GCC = xyes; then
+    msnative_struct=''
+    AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
+    if test -z "$ac_cv_prog_CC"; then
+      our_gcc="$CC"
+    else
+      our_gcc="$ac_cv_prog_CC"
+    fi
+    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+      2.)
+        if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+          msnative_struct='-fnative-struct'
+        fi
+        ;;
+      *)
+        if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+          msnative_struct='-mms-bitfields'
+        fi
+        ;;
+    esac
+    if test x"$msnative_struct" = x ; then
+      AC_MSG_RESULT([no way])
+      AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
+    else
+      CFLAGS="$CFLAGS $msnative_struct"
+      AC_MSG_RESULT([${msnative_struct}])
+    fi
+  fi
+  ;;
+esac
+
+# Check for the new -fvisibility=hidden flag introduced in gcc 4.0
+# Allow to reduce shared library size and avoid symbol clash
+# Unfortunately, this only works for fully static builds. If any parts of GDB are built shared (--enable-shared or --enable-shared-*), we currently have no way to disable it just for these parts. -- Kevin
+case $host_os in
+*mingw*)
+  ;;
+*)
+    case "$ac_configure_args" in
+    *--enable-shared*)
+      ;;
+    *)
+        if test x$GCC = xyes; then
+           visibility_flag=''
+           AC_MSG_CHECKING([whether gcc accepts -fvisibility])
+           if test -z "$ac_cv_prog_CC"; then
+              our_gcc="$CC"
+           else
+              our_gcc="$ac_cv_prog_CC"
+           fi
+           if $our_gcc -v --help 2>/dev/null | grep "fvisibility" >/dev/null; then
+              visibility_flag='-fvisibility=hidden'
+           fi
+           if test x"$visibility_flag" = x ; then
+              AC_MSG_RESULT([no])
+           else
+              CFLAGS="$CFLAGS $visibility_flag"
+              AC_MSG_RESULT([${visibility_flag}])
+              AC_DEFINE(HAVE_FVISIBILITY, 1, [Use -fvisibility=hidden flag])
+            fi
+        fi
+        ;;
+    esac
+  ;;
+esac
+
+case "$host" in
+  *-*-linux*) EXFL="-Wl,--export-dynamic" ;;
+  *)          EXFL="" ;;
+esac
+LDFLAGS="$LDFLAGS $EXFL"
+
+# On Darwin, libglade chokes on stripped executables.
+case "$host" in
+  *-apple-darwin*)
+    case "$CFLAGS $CXXFLAGS $LDFLAGS" in
+      *" -s "*|"-s "*|*" -s"|"-s")
+         echo "warning: cannot strip libglade executables on this host"
+         CFLAGS=`echo "$CFLAGS"|sed 's/\( -s\)* / /g;s/^-s //g;s/ -s$//g;s/^-s$//g'`
+         CXXFLAGS=`echo "$CXXFLAGS"|sed 's/\( -s\)* / /g;s/^-s //g;s/ -s$//g;s/^-s$//g'`
+         LDFLAGS=`echo "$LDFLAGS"|sed 's/\( -s\)* / /g;s/^-s //g;s/ -s$//g;s/^-s$//g'`
+         ;;
+    esac
+    ;;
+esac
+
+# some extra flags
+CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED -DDEBUGGER"
+CXXFLAGS="$CFLAGS -fno-rtti -fno-exceptions"
+
+AC_SUBST(CFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(CXXFLAGS)
+
+# Debugger support (can be disabled for embedded architectures)
+AC_ARG_ENABLE(debugger,
+  AC_HELP_STRING([--disable-debugger], [disable the built-in debugger]),
+  [tiemu_use_debugger=$enableval], [tiemu_use_debugger=yes])
+AC_CACHE_CHECK([whether to use the debugger],
+  [tiemu_use_debugger], [tiemu_use_debugger=yes])
+if test x$tiemu_use_debugger = xno; then
+  AC_DEFINE(NO_DEBUGGER, 1, [Defined to disable the debugger])
+fi
+
+# GDB support (can be disabled)
+AC_ARG_ENABLE(gdb,
+  AC_HELP_STRING([--disable-gdb], [disable the GDB-based source-level debugger]),
+  [tiemu_use_gdb=$enableval], [tiemu_use_gdb=$tiemu_use_debugger])
+AC_CACHE_CHECK([whether to use the GDB-based source-level debugger],
+  [tiemu_use_gdb], [tiemu_use_gdb=$tiemu_use_debugger])
+if test x$tiemu_use_gdb = xno; then
+  CFLAGS="$CFLAGS -DNO_GDB"
+fi
+AM_CONDITIONAL(NO_GDB, test x$tiemu_use_gdb = xno)
+
+# It makes no sense to enable GDB without the debugger!
+if test x$tiemu_use_debugger = xno -a x$tiemu_use_gdb = xyes; then
+  AC_MSG_ERROR([cannot enable GDB without the debugger])
+fi
+
+# Run GDB configury (if enabled)
+if test x$tiemu_use_gdb = xyes; then
+  ac_configure_args="$ac_configure_args --target=m68k-coff --disable-tui --disable-werror"
+  changequote(<<,>>)
+  ac_configure_args=`echo "$ac_configure_args" | sed "s,'CC=[^']*',,g;s,'CFLAGS=[^']*',,g;s,'CXX=[^']*',,g;s,'CXXFLAGS=[^']*',,g;s,'LDFLAGS=[^']*',,g;s,'LIBS=[^']*',,g;s,'build_alias=[^']*',,g;s,'host_alias=[^']*',,g;s,'target_alias=[^']*',,g"`
+  changequote([,])
+  AC_CONFIG_SUBDIRS(src/gdb)
+fi
+
+# Output.
+AC_OUTPUT
+
+echo
+echo "To run the TiEmu emulator, you will need an image (ROM dump or FLASH upgrade)."
+echo "As those files are copyrighted by Texas Instruments, they will never be"
+echo "distributed with the emulator... In replacement, you can use PedRom which"
+echo "is provided with TiEmu."
+echo
+echo "It you need a ROM dump, you can get one from your calculator"
+echo "with the 'ROM dump' function of TiLP."
+echo "Otherwise, you can use a TI's FLASH OS upgrade (AMS) as image."
+echo "Note: TiLP is available at [http://lpg.ticalc.org/prj_tilp]."
+echo
+echo "Now, you can type 'make' and 'make install'"
+echo ;
+
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..51606f8
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,464 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+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
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  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.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  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,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Must come before tru64.
+
+  # Intel's C compiler understands `-MD -MF file'.  However
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # 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:
+
+  "$@" -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'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
diff --git a/desktop/kde/README b/desktop/kde/README
new file mode 100644
index 0000000..57e62a2
--- /dev/null
+++ b/desktop/kde/README
@@ -0,0 +1,12 @@
+This directory contains shortcuts and mime types for KDE integration.
+You have to copy:
+- tiemu.desktop to 
+	$HOME/.local/share/applications or /usr/share/applications
+- x-tiemu-*.desktop to 
+	$HOME/.kde/share/mimelnk/application or /usr/share/mimelnk/application
+
+You will have to add a reference to skinedit.desktop into the menu:
+- edit $HOME/.config/menus/applications-kmenuedit.menu
+- add an entry like '<Filename>tiemu.desktop</Filename>'
+
+
diff --git a/desktop/kde/install.sh b/desktop/kde/install.sh
new file mode 100755
index 0000000..7d5f9c0
--- /dev/null
+++ b/desktop/kde/install.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "Beware: script intented to developers: unsupported!"
+cp tiemup.desktop /usr/share/applications
+cp x-tiemu-*.desktop /usr/share/mimelnk/application
+echo "Files copied."
\ No newline at end of file
diff --git a/desktop/kde/tiemu.desktop b/desktop/kde/tiemu.desktop
new file mode 100644
index 0000000..ab48a75
--- /dev/null
+++ b/desktop/kde/tiemu.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Comment=
+Exec='/usr/local/bin/tiemu'
+GenericName=
+Icon=/usr/local/share/tiemu/pixmaps/icon.xpm
+InitialPreference=2
+MimeType=application/x-tiemu-rom;application/x-tiemu-sav;
+Name=TiEmu
+Path=
+StartupNotify=true
+Terminal=false
+TerminalOptions=
+Type=Application
+X-KDE-SubstituteUID=false
+X-KDE-Username=
diff --git a/desktop/kde/x-tiemu-rom.desktop b/desktop/kde/x-tiemu-rom.desktop
new file mode 100644
index 0000000..6c1d600
--- /dev/null
+++ b/desktop/kde/x-tiemu-rom.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Encoding=UTF-8
+MimeType=application/x-tiemu-rom
+Comment=TiEmu Rom Dump
+Comment[fr]=Fichier ROM TiEmu
+Icon=/usr/local/share/tiemu/pixmaps/romdump.xpm
+Type=MimeType
+Patterns=*.rom;
diff --git a/desktop/kde/x-tiemu-sav.desktop b/desktop/kde/x-tiemu-sav.desktop
new file mode 100644
index 0000000..7fe579f
--- /dev/null
+++ b/desktop/kde/x-tiemu-sav.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Encoding=UTF-8
+MimeType=application/x-tiemu-sav
+Comment=TiEmu State Image
+Comment[fr]=Fichier Image d'Etat
+Icon=/usr/local/share/tiemu/pixmaps/icon.xpm
+Type=MimeType
+Patterns=*.sav;
diff --git a/docs/Debugging_TiEmu.txt b/docs/Debugging_TiEmu.txt
new file mode 100644
index 0000000..e0ad266
--- /dev/null
+++ b/docs/Debugging_TiEmu.txt
@@ -0,0 +1,43 @@
+How to debug TiEmu
+==================
+
+NOTE: This is ONLY about debugging TiEmu itself, NOT about using the TiEmu
+      debugger.
+
+I. Introduction
+
+When built with GDB support enabled, TiEmu is a mixed C and Tcl (with portions
+of C++ for KDE or OLE Automation support) program. Most of TiEmu is C code, this
+can be debugged using GDB or a GDB frontend of your choice. The C++ code can
+also be debugged this way. However, GDB doesn't support debugging interpreted
+languages such as Tcl. Luckily, there's a solution available: the TclPro
+debugger, which has been made Free Software in 2000.
+
+II. Debugging the Tcl code in TiEmu with TclPro
+
+Here's a step-by-step guide to using the TclPro debugger to debug the Tcl/Tk
+code in TiEmu's copy of Insight:
+1. If you haven't installed TclPro yet, do it now. Under Fedora, use:
+   yum install tclpro
+2. Start the TclPro debugger, either from the menu, or:
+   prodebug
+3. Set the TclPro debugger to remote debugging:
+   File / New Project... / Remote Debugging / OK
+4. Open a terminal emulator (command window).
+5. Tell Insight to load the TclPro debugging stub (in the terminal):
+   export DEBUG_STUB=/usr/bin/initdebug.tcl
+   The stub takes care of instrumenting the Tcl code for debugging and
+   connecting to the running TclPro debugger.
+6. Start TiEmu (in the same terminal):
+   tiemu
+
+As soon as TiEmu initializes GDB (i.e. after you select a ROM to emulate), the
+connection to the TclPro debugger will be established. You can now click "Run"
+in the TclPro debugger and/or use any of its debugging features.
+
+Note that it is possible to use the TclPro debugger together with GDB if you
+need to debug both the C and the Tcl code. GDB works at machine code level,
+the TclPro debugger works by instrumenting the Tcl code, so they don't interfere
+with each other.
+
+        Kevin Kofler
\ No newline at end of file
diff --git a/docs/TiEmu_sdk.txt b/docs/TiEmu_sdk.txt
new file mode 100644
index 0000000..5ff2e33
--- /dev/null
+++ b/docs/TiEmu_sdk.txt
@@ -0,0 +1,64 @@
+*****************************************************************
+* Notes about TiEmu SDK						*
+*								*
+* Last update: 2007-04-15					*
+*****************************************************************
+
+
+Introduction
+------------
+
+The TiEmu SDK provides way to use TiEmu from an external application.
+It has been primarily developed for use by KTIGCC & TIGCC-IDE.
+
+At the time being:
+- Win32 users can use an OLE Automation object (since 2.81c/20061030),
+- Linux users can use a DCOP object (since 2.81/20060524).
+
+A D-Bus interface for use with KTIGCC 2 is also available (since
+2.81c/20061030), but not compiled by default, you can enable it with the
+--enable-dbus configure option. (That option is enabled in the Fedora RPM.)
+
+
+How to use it?
+--------------
+
+Actually, there is no instalable SDK yet. You have to download TiEmu
+source code and take a look at the 'sdk' folder:
+
+sdk
+|
++--- dcop:	readme.txt and dcoptest.cpp sample program
++--- oleaut:	readme.txt and oletest.cpp sample program
+
+
+Entry points
+------------
+
+TiEmu currently provides the following calls:
+
+- image_loaded			return TRUE if an image has been loaded
+- emulated_calc_type		return emulated calculator type (1) if image loaded
+- emulated_hw_version		return hardware revision (2) if image loaded
+- emulated_os_version		return OS version as a string like "2.08" if image loaded
+- ready_for_transfers		TRUE if calculator is ready for transfers and if image loaded and engine running
+- send_file			send one filename if image loaded and engine running
+- send_files			send several filenames at once  if image loaded and engine running (not provided in OLE)
+- debug_file			does the same work than the 'Debug file with TiEmu...' item of the popup menu  if image loaded and engine running
+- reset_calc			reset calculator and clear RAM depending on argument if image loaded; close debugger if open, too
+- execute_command		send ASCII keys to calculator (internally converted to TI scancodes) if image loaded
+- turn_calc_on			like pressing the ON key if image loaded and engine running
+- enter_debugger		raises a breakpoint and open the debugger if image loaded and engine running
+
+(1)
+#define TI92 		(1 << 0)
+#define TI89 		(1 << 1)
+#define TI92p	 	(1 << 2)
+#define V200		(1 << 3)
+#define TI89t		(1 << 4)
+
+(2)
+#define HW1	1
+#define HW2	2
+#define HW3     3
+#define HW4     4
\ No newline at end of file
diff --git a/docs/TiEmu_skin_format.txt b/docs/TiEmu_skin_format.txt
new file mode 100644
index 0000000..5736add
--- /dev/null
+++ b/docs/TiEmu_skin_format.txt
@@ -0,0 +1,218 @@
+                     TiEmu v2.00 skin format
+                     ***********************
+
+Author : Julien BLACHE <jb at tilp.info>
+
+
+I. Summary
+**********
+
+  This file documents the TiEmu v2.00 skin format. This skin format is
+inspired from the VTi 2.5 skin format, with some improvements. However,
+it is *not* compatible with the original VTi 2.5 skin format.
+
+  Skin files use the ".skn" extension. They consist of a header
+containing LCD and keys positions along with some other informations,
+followed by a JPEG image.
+
+  The size of the header is not fixed ; it is determined by the length
+of the strings it contains. See below for more explanations.
+
+  These skins can be produced using the Skinedit editor bundled with
+TiEmu v2.00.
+
+
+II. Header
+**********
+
+  The header consists of 3 types of data :
+   - strings (S)
+   - integers (I)
+   - RECT structs (R)
+
+  The RECT struct is composed of 4 uint32_t integers, indicating the
+coordinates of the top-left and bottom-right coordinates of a
+rectangle.
+  The RECT struct is defined as follows :
+
+        struct RECT
+        {
+           uint32_t left;
+           uint32_t top;
+           uint32_t right;
+           uint32_t bottom;
+        };
+
+  Note also that all integers are unsigned and 32 bits long. The ISO
+C99 standard type "uint32_t" (defined in <stdint.h> should be used to
+manipulate them.
+
+  Last, strings are *not* NULL-terminated, and preceeded by a uint32
+indicating their size when needed. It's up to you to NULL-terminate
+the string before use.
+
+
+  Here's how the header is decomposed (address in hex) :
+
+  0x000 - 0x00F (S) (16 bytes): "TiEmu v2.00" (NULL-padded)
+        This string indicates the version of the skin. The version
+        will match the version of TiEmu in which the change was
+        introduced.
+  0x010 - 0x013 (I) (4 bytes) : endianness flag
+        This integer is used to determine whether the skin was
+        produced on a machine using the same endianness as the host
+        we're running on.
+        When writing the skin, this integer has the value 0xFEEDBABE ;
+        when reading the skin, if the value does not match 0xFEEDBABE,
+        then you need to byteswap all the 32-bits integers.
+  0x014 - 0x017 (I) (4 bytes) : JPEG offset
+        This integer gives the position of the JPEG data in the
+        file. A call to fseek() will bring you to the beginning of the
+        JPEG image.
+  0x018 - 0x01B (I) (4 bytes) : string length
+        Length of the following string.
+  0x01C - 0x*** (S) (?? bytes): skin's name
+        This string is used to store the skin's name.
+  0x*** - 0x*** (I) (4 bytes) : string length
+        Length of the following string.
+  0x*** - 0x*** (S) (?? bytes): author's name
+        This string is used to store the author's name.
+  0x*** - 0x*** (I) (4 bytes) : color type
+        This integer determines which color scheme is to be used for
+        the LCD black/white pixels.
+        It is either 0 (low contrast), 1 (high contrast) or 2 (custom
+        colors).
+  0x*** - 0x*** (I) (4 bytes) : LCD white color
+        24 bits R/G/B value.
+  0x*** - 0x*** (I) (4 bytes) : LCD black color
+        24 bits R/G/B value.
+  0x*** - 0x*** (S) (8 bytes) : calc type
+        This string determines the calc type. Types are allocated as
+        follows :
+         "TI-73",         "TI-82",          "TI-83",
+         "TI-83+",        "TI-85",          "TI-86",
+         "Ti-89",         "TI-92",          "TI-92+",
+         "V200PLT".
+  0x*** - 0x*** (R) (16 bytes) : LCD position
+        A RECT struct, indicating the LCD position.
+  0x*** - 0x*** (I) (4 bytes) : number of RECT structs
+	This integer determines the number of RECT structs containing
+	keys positions. As new calculators will appear, we might need
+	more than the 80 usual keys.
+  0x*** - 0x*** (R) (80 x 16 bytes) : keys positions
+        RECT structs, indicating the keys positions.
+  0x*** - 0x*** : JPEG data
+        The JPEG image.
+
+  All the coordinates are given with an origin at the top-left of the
+*unscaled* JPEG image. This means you'll have to take care of the
+coordinates whenever the skin is scaled.
+
+
+III. Keys definitions
+*********************
+
+  Here is how the 80 RECT struct defining keys positions are arranged ;
+currently, we can handle up to 80 keys.
+
+      Ti-73            TI-82        TI-85        TI-89        TI-92                
+                       TI-83        TI-86                     TI-92+               
+                       TI-83+                                                      
+                       TI-84+										 Titanium
+
+ 0.   Y=               Y=           F1           F1           Grab (Hand)          
+ 1.   Window           Window       F2           F2           F1                   
+ 2.   Zoom             Zoom         F3           F3           F2                   
+ 3.   Trace            Trace        F4           F4           F3                   
+ 4.   Graph            Graph        F5           F5           F4                   
+ 5.   2nd              2nd          2nd          2nd          F5                   
+ 6.   Mode             Mode         Exit         Shift        F6                   
+ 7.   Del              Del          More         Esc          F7                   
+ 8.   Left             Left         Left         Left         F8                   
+ 9.   Right            Right        Right        Right        Q                    
+10.   Up               Up           Up           Up           W                    
+11.   Down             Down         Down         Down         E                    
+12.   Math             Alpha        Alpha        Diamond      R                    
+13.   Draw             X,T,theta    x-var        Alpha        T                    
+14.   List             Stat         Del          Apps         Y                    
+15.   x^2              Math         Graph        Home         U                    
+16.   ^                Matrx        Stat         Mode         I                    
+17.   Prgm             Prgm         Prgm         Catalog      O                    
+18.   Apps             Vars         Custom       Backspace    P                    
+19.   Clear            Clear        Clear        Clear        A                    
+20.   Unit             x^-1         log          X            S                    
+21.   b/c              sin          sin          Y            D                    
+22.   F<->D            cos          cos          Z            F                    
+23.   A(b/c) <-> d/e   tan          tan          T            G                    
+24.   Const            ^            ^            ^            H                    
+25.   Simp             x^2          ln           =            J                    
+26.   %                , (Comma)    ee           (            K                    
+27.   (                (            (            )            L                    
+28.   )                )            )            , (Comma)    Z                    
+29.   / (Divide)       / (Divide)   / (Divide)   / (Divide)   X                    
+30.   x                log          x^2          |            C                    
+31.   7                7            7            7            V                    
+32.   8                8            8            8            B                    
+33.   9                9            9            9            N                    
+34.   *                *            *            *            M                    
+35.   , (Comma)        ln           , (Comma)    ee           Theta                
+36.   4                4            4            4            Shift                
+37.   5                5            5            5            On                   
+38.   6                6            6            6            Diamond              
+39.   -                -            -            -            2nd (Alpha area)     
+40.   Sto>             Sto>         Sto>         Sto>         Sto>                 
+41.   1                1            1            1            Space                
+42.   2                2            2            2            =                    
+43.   3                3            3            3            Backspace            
+44.   +                +            +            +            Enter (Alpha area)   
+45.   On               On           On           On           2nd (Cursor area)    
+46.   0                0            0            0            Esc                  
+47.   . (Period)       . (Period)   . (Period)   . (Period)   Mode                 
+48.   (-)              (-)          (-)          (-)          Clear                
+49.   Enter            Enter        Enter        Enter        ln                   
+50.                                                           Apps                 
+51.                                                           Enter (Cursor area)  
+52.                                                           Left                 
+53.                                                           Right                
+54.                                                           Up                   
+55.                                                           Down                 
+56.                                                           sin                  
+57.                                                           cos                  
+58.                                                           tan                  
+59.                                                           ^                    
+60.                                                           (                    
+61.                                                           )                    
+62.                                                           , (Comma)            
+63.                                                           / (Divide)           
+64.                                                           7                    
+65.                                                           8                    
+66.                                                           9                    
+67.                                                           *                    
+68.                                                           4                    
+69.                                                           5                    
+70.                                                           6                    
+71.                                                           -                    
+72.                                                           1                    
+73.                                                           2                    
+74.                                                           3                    
+75.                                                           +                    
+76.                                                           0                    
+77.                                                           . (Period)           
+78.                                                           (-)                  
+79.                                                           Enter (Numeric area) 
+
+
+IV. JPEG image
+***************
+
+  Starting at the offset given by the uint32 located at 0x014, a JPEG
+image. It is an exact copy of the original JPEG file.
+  Thus, stripping down the header, you can open the skin image with
+any JPEG-aware program.
+
+
+V. Contact
+***********
+
+  This file and the skin format were put together by Julien
+BLACHE. Please mail <jb at tilp.info> for any question.
diff --git a/docs/VTi_skin_format.txt b/docs/VTi_skin_format.txt
new file mode 100644
index 0000000..b036183
--- /dev/null
+++ b/docs/VTi_skin_format.txt
@@ -0,0 +1,96 @@
+*****************************************************************
+* File format of the VTi 2.5 skin files				*
+* Documentation by Romain Lievin <roms at lpg.ticalc.org>		*
+*								*
+* These informations have been extracted from the Vti source	*
+* code (rom.cpp) which have been released by R. Wagner.		*
+*								*
+* Begin: 17/04/2002						*
+* Last update: 25/04/2002					*
+*****************************************************************
+
+
+Remark: I use the C notation for numbers (12: decimal, 0x1A: hexadecimal, 
+'C': character). Moreover, all words are in LSB-MSB format.
+
+This document describes the file format of VTi v2.1 & v2.5 skins.
+A skin file (.skn) is a composite file which contains informations and data 
+(image).
+
+
+The VTi v2.1 skin file format
+-----------------------------
+
+  The following is a table of the bytes that make up a skin file.
+
+  Adress				What It Contains
+  ---------------------------------------------------------------------------
+  0x000-0x007	0-7		An header: "VTIv2.1 "
+   ???
+  0x050-0x053	80-83		The value of the 'White' LCD pixel (32 bits)
+  0x054-0x057	84-87		The value of the 'Black' LCD pixel (true color)
+  0x058-0x067	88-103		1x RECT structure (the display coords in skin)
+  0x068-0x567	104-1383	80x RECT structures (the keys coords in skin)
+
+  0x568-0x...	1384-...	A JPEG encoded image placed right after
+
+
+The VTi v2.5 skin file format
+-----------------------------
+
+  The following is a table of the bytes that make up a skin file.
+
+  Adress                                What It Contains
+  ---------------------------------------------------------------------------
+  0x000-0x007   0-7             An header: "VTIv2.5 "
+  0x008-0x047   8-71		Skin's name (64 chars)
+  0x048-0x087	72-135		Skin's author (64 chars)
+  0x088-0x08F	136-143		Calculator type ?
+  0x090-0x093   144-147         The value of the 'White' LCD pixel (32 bits)
+  0x094-0x097   148-151         The value of the 'Black' LCD pixel (true color)
+  0x098-0x0A7   152-167         1x RECT structure (the display coords in skin)
+  0x0A8-0x5A7   168-1447        80x RECT structures (the keys coords in skin)
+
+  0x5A8-0x...   1448-...        A JPEG encoded image placed right after
+
+
+
+
+  RECT is a common Win32 structure which has the following format:
+
+	typedef struct tagRECT {
+		uint32_t left;
+		uint32_t top;
+		uint32_t right;
+		uint32_t bottom;
+	} RECT;
+
+  The keys coordinates are stored in an array of 80 structures. These 
+  structures are parsed for searching a mouse position which fits into. Once 
+  found, the index is mapped into a TI key by an array such as:
+
+  const char sknKey89[] = {
+    TIKEY_F1, TIKEY_F2, TIKEY_F3, TIKEY_F4, TIKEY_F5,
+    TIKEY_2ND, TIKEY_SHIFT, TIKEY_ESCAPE, TIKEY_LEFT, TIKEY_RIGHT,
+    TIKEY_UP, TIKEY_DOWN, TIKEY_DIAMOND, TIKEY_ALPHA, TIKEY_APPS,
+    TIKEY_COS, TIKEY_MODE, TIKEY_F6, TIKEY_BACKSPACE, TIKEY_CLEAR,
+    TIKEY_X, TIKEY_Y, TIKEY_Z, TIKEY_T, TIKEY_POWER,
+    TIKEY_EQUALS, TIKEY_PALEFT, TIKEY_PARIGHT, TIKEY_COMMA, TIKEY_DIVIDE,
+    TIKEY_LN, TIKEY_7, TIKEY_8, TIKEY_9, TIKEY_MULTIPLY,
+    TIKEY_SIN, TIKEY_4, TIKEY_5, TIKEY_6, TIKEY_MINUS,
+    TIKEY_STORE, TIKEY_1, TIKEY_2, TIKEY_3, TIKEY_PLUS,
+    TIKEY_ON, TIKEY_0, TIKEY_PERIOD, TIKEY_NEGATE, TIKEY_ENTER1
+    };
+
+  This array contains some values which come from an enumeration. Values 
+  contained in this array must match with the keys placed in the skin in the 
+  same order.
+
+  The enumeration is also used for keyboard mapping. The order is not 
+  important but this enumeration is a basis for some other transcoding arrays 
+  (TIKEY_XXX to row/col hardware key).
+
+  enum {	
+	TIKEY_DOWN, TIKEY_RIGHT, TIKEY_UP, TIKEY_LEFT, TIKEY_HAND, TIKEY_SHIFT, 		...
+	MAX_KEY // important !
+	};
\ No newline at end of file
diff --git a/docs/img_format.txt b/docs/img_format.txt
new file mode 100644
index 0000000..4aa82b7
--- /dev/null
+++ b/docs/img_format.txt
@@ -0,0 +1,225 @@
+*****************************************************************
+* File format of the TiEmu v2.0 image files						*
+* Documentation by Romain Lievin <roms at tilp.info>				*
+*																*
+* Begin: 17/05/2005												*
+* Last update: 31/07/2006										*
+*****************************************************************
+
+
+Remark: I use the C notation for numbers (12: decimal, 0x1A: hexadecimal, 
+'C': character). Moreover, all words are in LSB-MSB format.
+
+This document describes the file format of *.img files.
+An TiEmu image file is a composite file which contains:
+- a header section
+- a pure data section
+
+
+The TiEmu v2.00 image format (revision 2) => IMG_INFO in src/core/images.h
+-----------------------------------------
+
+  The following is a table of the bytes that make up a such file.
+
+  Address		Size	What It Contains
+  ---------------------------------------------------------------------------
+  0x00-0x0F	0-15	16	a signature: "TiEmu img v2.00" (NULL-padded)
+  
+  0x10-0x13	16-19	4	structure revision (2)
+  0x14-0x17	20-23	4	offset to the data section (0x40)
+  0x18		24		1	calculator type (2 = TI92)
+  0x19-0x1F	25-29	5	firmware revision ("2.08\0")
+  0x1E		30		1	FLASH/PROM (2/0)
+  0x1F		31		1	has boot (1/0)
+  0x20-0x23	32-35	4	pure data size
+  0x24		36		1	hw type (1/2/3/4)
+  0x25		37		1	ROM base address
+  0x26		38-59	n	filled with 0 (reserved for future use)
+  0x3c-0x3f	60-63	4	pointer on data (unused here)
+  
+  0x40-..	64-..		pure data (ROM image)
+ 
+ 
+Calculator type (libtifiles defs):
+
+#define TI92 		(1 << 0)
+#define TI89 		(1 << 1)
+#define TI92p	 	(1 << 2)
+#define V200		(1 << 3)
+#define TI89t		(1 << 4)
+ 
+Note: FLASH upgrade does not have boot block.
+
+
+The TiEmu v2.00 save format (revision 21) => SAV_INFO in src/core/state.h
+-----------------------------------------
+
+  The following is a table of the bytes that make up a such file.
+
+  Before this header, there is a "TiEmu v2.00 image format" header.
+  And next, there is the following header:
+
+  Address		Size	What It Contains
+  ---------------------------------------------------------------------------
+  0x40-0x43	0-3		4	structure revision (21)
+  0x44-0x47	4-7		4	size of structure
+  0x48-0x4b	8-11	4	offset to M68K area
+  0x4c-0x4f	12-15	4	offset to IO area
+  0x50-0x53	16-19	4	offset to RAM area
+  0x54-0x57	20-23	4	offset to HW infos
+  0x58-0x5b	24-27	4	offset to FLASH changes
+  0x5c-0x5f	28-31	4	offset to bkpts area
+  0x60-0x63 32-35	4	offset to image location (size + string)
+  0x64-...			.	pure data (see below)
+  
+ at M68K: => regstruct in src/core/uae/newcpu.h
+	
+
+ at IO:
+	HW1 I/O ports: @HW.io_size bytes
+	HW2 I/O ports: @HW.io2_size bytes
+	HW3 I/O ports: @HW.io3_size bytes
+
+ at RAM:
+	RAM contents: @HW.ram_size bytes
+
+ at HW: => Ti68kHardware in src/core/ti68k_def.h
+	Ti68kHardware structure contents. See below and note at the bottom of the page:
+
+	typedef struct
+	{
+		time_t	s;
+		int		ms;
+	} TTIME;
+
+	typedef struct
+	{
+		// misc (non hardware pseudo-constants)
+		int			calc_type;
+
+		int			ram_size;	// RAM size
+		int			rom_size;	// ROM size
+		int			io_size;	// HWx io size
+		int			io2_size;	// HW2 io size
+		int			io3_size;	// HW3 io size
+
+		uint32_t	rom_base;	// ROM base address
+		int			rom_flash;	// ROM type
+		char		rom_version[5];	// ROM/AMS version 
+
+		int			hw_type;	// HW1/2/3/4
+
+		int			ti92v1;		// ROM v1.x(y)
+		int			ti92v2;		// ROM v2.x
+
+		int			lcd_w;		// LCD physical width
+		int			lcd_h;		// LCD physical height
+
+		// keyboard
+		int			on_key;
+
+		// lcd
+		uint32_t	lcd_adr;	// LCD address (as $4c00)
+		char*		lcd_ptr;	// direct pointer to LCD in PC RAM
+		int			contrast;
+		int			log_w;		// LCD logical width
+		int			log_h;		// LCD logical height
+		int			on_off;
+		unsigned long	lcd_tick;// used by grayscales
+
+		// memory
+		uint8_t*	rom;		// ROM
+		uint8_t*	ram;		// RAM
+		uint8_t*	io;			// HW1/2/3 i/o ports
+		uint8_t*	io2;		// HW2/3   i/o ports
+		uint8_t*	io3;		// HW3	   i/o ports
+		uint8_t*	unused;		// unused
+
+		uint32_t	initial_ssp;// SSP at vector #0
+		uint32_t	initial_pc;	// PC  at vector #1
+
+		// timer
+		uint8_t     timer_value;// Current timer value
+		uint8_t     timer_init;	// Value to reload
+
+		// rtc (hw2)
+		uint8_t		rtc_value;	// RTC value
+
+		// rtc (hw3)
+		TTIME		rtc3_ref;	// time reference
+		TTIME		rtc3_beg;	// time value when
+		TTIME		rtc3_load;	// clock is load
+
+		// protection
+		int			protect;		// hw protection state
+		uint32_t	archive_limit;	// archive memory limit
+		int			ram_exec[64];	// RAM page execution protection bitmask
+
+	} Ti68kHardware;
+
+ at FLASH: => FLASH_WSM in src/core/ti_hw/flash.h
+	For p blocks (p = @HW.rom_size >> 16):
+		4 bytes: whether bank has been modified
+			If modified:
+				64KB: FLASH page contents eg. @HW.rom[p<<16]
+
+ at bkpts: => Ti68kBreakpoints in src/core/ti68k_def.h & ADDR_RANGE/ADDR_BITS in src/core/dbg/bkpts.h
+	code:
+		4 bytes: number of bkpts
+			4 bytes: address
+			...
+			4 bytes: address
+	
+	exception:
+		same as above
+	
+	pgmentry:
+		same as above
+	
+	mem_rb:
+		same as above
+	
+	mem_rw:
+		same as above
+	
+	mem_rl:
+		same as above
+	
+	mem_wb:
+		same as above
+	
+	mem_ww:
+		same as above
+	
+	mem_wl:
+		same as above
+	
+	mem_rng_r:
+		4 bytes: number of breakpoints
+			8 bytes: lower & upper value
+			...
+			8 bytes: lower & upper value
+	
+	mem_rng_w:
+		same as above
+
+	bits: (added in rev. 21)
+		4 bytes: number of breakpoints
+			4 bytes: address
+			2 bytes: checks & states
+			2 bytes: padding (00)
+
+ at image location: 
+	4 bytes : string length + 1
+	m bytes: ROM image filename (NULL-terminated)
+
+	4 bytes: string length + 1
+	n bytes: TIB image filename (NULL-terminated)
+
+Note:
+	sizeof(char) = 1
+	sizeof(int)  = 4
+	sizeof(long) = 4
+	sizeof(*ptr) = 8
+
+Note2: if structure is stored in file, padding may appear to round-up size to 4 bytes.
\ No newline at end of file
diff --git a/docs/iodefs_format.txt b/docs/iodefs_format.txt
new file mode 100644
index 0000000..e54a106
--- /dev/null
+++ b/docs/iodefs_format.txt
@@ -0,0 +1,33 @@
+*****************************************************************
+* File format of the TiEmu v2.0 iodefs files					*
+* Documentation by Romain Lievin <roms at tilp.info>				*
+*																*
+* Begin: 29/03/2007												*
+* Last update:													*
+*****************************************************************
+
+
+This document describes the file format of iodefs_*_hw?.txt files.
+Those files contains dynamic definitions of the various I/O ports
+existing on calculators.
+
+Filename is following this scheme: iodefs_[model]_hw[revision].txt.
+
+1) This file is made up of various sections like [System]. 
+Sections name are placed within brackets. 
+Sections are interpreted as a top node.
+
+2) Within each section, there are on ore items like this:
+
+	$600001	| 1	| rw	| <.....2.0>			| Stack overflow	| AI7 enable,Interleave RAM
+
+- first column is address
+- second one tells how many bytes (1,2,4) are occuppied
+- third one is access (ro,wo,rw)
+- fourth one describes used bits; <all> is a convenient way to describe all bits
+- fifth column is the name of the item (displayed at left)
+- last column is a comma separated list of bit names. You should not write more than 16 chars for bit names
+
+Please keep in mind there are very few syntaxical checks. So, write it with care!
+
+---
\ No newline at end of file
diff --git a/docs/mails/Kevin Kofler/mail1.txt b/docs/mails/Kevin Kofler/mail1.txt
new file mode 100644
index 0000000..0370ee3
--- /dev/null
+++ b/docs/mails/Kevin Kofler/mail1.txt	
@@ -0,0 +1,68 @@
+Salut,
+
+Je pense qu'il est temps de penser � nous mettre d'accord au sujet de la
+gestion des informations de d�bogage. Voil� ma vision des choses, je serais
+content d'avoir ton avis: suggestions, am�liorations, suppression de
+features que tu retiens non impl�mentables, ...
+
+Pour commencer, je vais commencer par d�finir ce que j'entends par
+"informations de d�bogage". Je vois 3 grands types d'informations:
+1. informations symboliques niveau assembleur. Cela comprend les noms des
+labels (labels de code, variables). Ces informations sont probablement les
+plus simples � g�rer, il suffit � mon avis en grande partie de r�utiliser du
+code qui existe d�j� pour les ROM_CALLs. Ce sont aussi les seules
+informations qu'on peut obtenir de l'assembleur A68k. (L'assembleur GNU g�re
+aussi le 2.)
+2. lignes des sources. Ces informations mettent en relation les instructions
+du code machine avec les lignes des sources C ou assembleur (GNU). Cela
+implique rajouter un "source view" au d�bogueur et de permettre de faire du
+single-stepping et des breakpoints dans la fen�tre de source.
+3. position (pour les variables "automatiques") et type des variables C. Au
+niveau interface, �a se traduit en l'affichage des valeurs des variables,
+les watchpoints (version haut niveau des data breakpoints), ... C'est le
+plus dur � g�rer, mais quand le 1. et le 2. seront r�gl�s, je pense qu'il
+sera in�vitable de nous plonger l�-dessus pour que le d�bogueur soit
+complet.
+
+Je compte r�aliser �a de la mani�re suivante: ld-tigcc �met, en plus des
+ex�cutables, un fichier nomprog.dbg qui contiendra les informations de
+d�bogage. Il serait bien que ce fichier soit chargeable comme un fichier TI
+dans TiEmu. Le chargement se passerait id�alement de la mani�re suivante:
+* L'utilisateur "envoie" nomprog.dbg.
+* TiEmu va chercher l'ex�cutable de m�me nom et pour la bonne calculatrice.
+(Cet ex�cutable pourra �tre suppos� non compress�.)
+* TiEmu l'envoie (en RAM, pas en archive, pour pouvoir mettre un
+breakpoint).
+* TiEmu place un "program entry breakpoint" sur ce programme. (Oui, il
+faudra d'abord impl�menter �a, cf. mes mails pr�c�dents.)
+* TiEmu l'ex�cute � travers la ligne de commande. Attention, ici, il faudra
+un hack: il faudra faire en sorte que l'appel en ligne 1010 correspondant �
+"ASAP or Exec string too long" soit tra�t� comme un nop jusqu'� ce que le
+breakpoint soit atteint. Cela ne devrait pas �tre trop dur � impl�menter
+directement au niveau de l'�mulation d'instructions � mon avis.
+* D�s que le breakpoint est atteint, TiEmu fait en sorte que la protection
+anti-ex�cution soit d�sactiv�e pour tous les 64 KO du programmes (pas
+seulement les premiers 8 ou 24 KO).
+* TiEmu charge les informations de d�bogage (en les relogeant � la bonne
+adresse) et affiche le d�bogueur.
+
+Mon id�e du format de d�bogage est le suivant: Le fichier .dbg sera en fait
+un .a qui contiendra:
+* symbinfo.dat: informations symboliques
+* srclines.dat: lignes des sources
+* cvars.dat: position et type des variables
+* toutes les sources r�f�renc�es dans srclines.dat, de fa�on � permettre la
+compilation dans un r�pertoire temporaire effectu�e par l'IDE, ou de
+d�boguer facilement sur une machine qui n'est pas la machine de
+d�veloppement. (Les librairies statiques compil�es avec informations de
+d�bogage devront aussi contenir ces sources, pour les m�mes raisons.)
+(Ceci est sujet � des changements. Tes suggestions sont les bienvenues. Les
+d�tails des contenus des *.dat restent � d�finir.)
+
+Il faudra aussi qu'on se mette d'accord pour la r�partition des t�ches:
+j'aurai certainement besoin de ton aide pour ce qui est interface graphique
+(je n'ai encore rien programm� en GTK), et je vais certainement m'occuper
+enti�rement du linker. Le reste est sujet de discussion.
+
+C'est tout pour l'instant, j'ai certainement d'autres choses encore � dire �
+ce sujet, mais je n'ai pas le temps maintenant...
\ No newline at end of file
diff --git a/docs/mails/Kevin Kofler/mail2.txt b/docs/mails/Kevin Kofler/mail2.txt
new file mode 100644
index 0000000..edcfe4f
--- /dev/null
+++ b/docs/mails/Kevin Kofler/mail2.txt	
@@ -0,0 +1,50 @@
+Salut Romain,
+
+> Par contre,  j'en profites pour te poser quelques questions:
+> - combien dois-je �muler de niveaux de gris: 2 ou 3, 4 ou 5, 7 ou 8 ?
+> <<* Ce serait bien d'avoir aussi une option 8 niveaux de gris (moyenne de
+7
+> plans plut�t que de 6).>>
+
+Les nombres de niveaux de gris interessants sont 2, 4, 7 et 8:
+* 2: plane0 (1/1)
+* 4: plane0, plane0, plane1 (2/3, 1/3)
+* 7: plane2, plane0, plane1, plane0, plane1, plane0 (3/6, 2/6, 1/6)
+* 8: plane1, plane0, plane2, plane0, plane0, plane1, plane0 (4/7, 2/7, 1/7)
+
+> - sur quel �v�nement puis-je me synchroniser pour les niveaux de gris.
+
+D�j�, �a va d�pendre de la version mat�rielle que tu �mules:
+* HW1: Tu peux travailler en termes de changements d'adresse de l'�cran.
+(Sache que les routines n'�crivent dans le port pour changer de plan que si
+l'adresse change.) Une chose que tu peux essayer de faire par exemple est de
+d�tecter automatiquement le nombre de ndg: prends les 6 derni�res adresses
+de l'�cran (suffisamment r�centes) et regarde:
+- Si tu n'as pas 6 adresses ou si les premi�res ont d�j� expir�, tu es en
+blanc&noir.
+- S'il n'y a qu'une adresse diff�rente, tu es en blanc&noir.
+- S'il n'y a que 2 adresses diff�rentes, tu en en 4 ndg.
+- Si tu as 3 adresses diff�rentes, tu es en 7 ou 8 ndg. Tu ne vas pas
+pouvoir distinguer ces cas en regardant seulement les changements, il faudra
+mesurer les temps d'exposition. S'ils sont uniformes, ce sont 7 ndg, s'il y
+en a un 2 fois plus long, ce sont 8 ndg (s�quence plane0, plane0).
+Avec �a (ou alors en te servant du choix dans le menu), tu regardes les
+listes ci-dessus et tu t'en sers pour faire des moyennes. Pour les 4 ndg, tu
+auras aussi besoin d'une mesure du temps d'exposition pour savoir quel plan
+est le plan fonc� et lequel est le plan clair.
+* HW2/HW3: Rel�ve les contenus de l'�cran � des intervalles de temps
+r�guliers. Le port 0x70001D existe pour synchroniser les routines avec
+l'�cran. Il faudra flipper le sign bit de ce port � chaque fois que tu as
+fini de relever une capture d'�cran. Attention, les routines de gris HW2/HW3
+copient seulement un tiers de l'�cran � la fois, donc il faudra faire la
+moyenne de 9 rel�vements en 4 ndg, 18 en 7 ndg et 21 en 8 ndg. Par
+cons�quent, le timer de rel�vement ne devra pas �tre trop lent. Le vrai
+mat�riel le met � 90 Hz environ. Soit tu prends le pgcd (126 rel�vements),
+mais c'est tr�s long, soit tu restes avec des choix � faire � la main.
+Malheureusement, une autod�tection n'est pas aussi simple que sur HW1, parce
+que tu ne peux pas faire des comparaisons d'adresses, et le contenu peut
+changer entre 2 frames. Une id�e serait de prendre les 126 rel�vements pour
+l'option "blurry" et d'en faire l'option par d�faut, et de proposer les
+autres alternatives pour un meilleur rendu.
+
+        Kevin Kofler
\ No newline at end of file
diff --git a/docs/mails/Kevin Kofler/mail3.txt b/docs/mails/Kevin Kofler/mail3.txt
new file mode 100644
index 0000000..45350de
--- /dev/null
+++ b/docs/mails/Kevin Kofler/mail3.txt	
@@ -0,0 +1,21 @@
+> au fait, je te rappelles que, comme convenu, je n'ai pas impl�ment� les
+> ghosts:
+> <<
+> // 000000-03ffff : RAM (256 KB), non ghost'ed
+> // 100000-1fffff :
+> // 200000-2fffff : image of 0x000000 (ghost), not emulated for
+compatibility
+> // 300000-3fffff :
+> // 400000-4fffff : image of 0x000000 (ghost), not emulated for
+compatibility
+> // 500000-5fffff :
+> >>
+>
+> Dois-je l'impl�menter en 0x400xx ?
+
+Surtout pas. �a donnerait des tonnes de programmes qui ne marchent que sur
+TiEmu et pas sur le vrai mat�riel.
+
+En revanche, les ghosts en 0x200000 et 0x400000, tu devrais les mettre (sur
+HW3 seulement, �videmment). GhostBuster utilise �a pour convertir les
+programmes qui �crivent en 0x400xx pour les interruptions.
\ No newline at end of file
diff --git a/docs/mails/Kevin Kofler/mail4.txt b/docs/mails/Kevin Kofler/mail4.txt
new file mode 100644
index 0000000..a55b0c2
--- /dev/null
+++ b/docs/mails/Kevin Kofler/mail4.txt	
@@ -0,0 +1,18 @@
+> > * virer la gestion de $600010 sur HW2/HW3, ce port est HW1-only et doit
+> > �tre
+> > ignor� sur HW2/HW3.
+>
+> j'ai quelque chose de pas normal:
+> - sur HW2, le port $600xxx est utilis� mais pas celui en $700xxx (comme
+> sur HW1)
+> - sur HW3, les 2 sont utilis�s et il faut que j'utilise celui en $600xxx
+> pour avoir le bon LCD.
+
+Olivier m'a pourtant dit qu'il t'a d�j� signal� l'origine du probl�me... AMS
+3.00 �crit dans la rang� 0x7100xx qui sur HW3 N'EST PAS un ghost de la
+rang�e 0x7000xx, mais de nouveaux ports. Ton code capture des �critures en
+0x710017 comme des changements de port LCD, et c'est faux.
+
+Et AMS n'initialise pas 0x700017 parce que la valeur par d�faut de ce port
+est 0, ce qui donne un plan � 0x4c00. Il faut que ton code d'initialisation
+mette LCD_MEM � 0x4c00 au d�part sur HW2 et HW3.
\ No newline at end of file
diff --git a/docs/mails/Kevin Kofler/mail5.txt b/docs/mails/Kevin Kofler/mail5.txt
new file mode 100644
index 0000000..baf0a65
--- /dev/null
+++ b/docs/mails/Kevin Kofler/mail5.txt	
@@ -0,0 +1,30 @@
+
+
+> > Sinon, on peut peut-�tre "tricher" aussi: si quelque chose �crit vers
+> > LCD_MEM avec les bons types de movem, on rel�ve la source de la copie et
+> > on
+> > l'enregistre comme "plan".
+>
+> dans ce cas, pourquoi ne pas �crire l'adresse et le num�ro du plan � une
+> adresse inutilis�e sur les TI mais connue de TiEmu ? Ce serait simple et
+> efficace � tous les niveaux. Inconv�nient (comme tu me l'avais fait
+> remarquer): certains programmes pourraient ne pas marcher en ndg.
+
+Pourquoi pas reconna�tre les s�quences de movem dans TiEmu? �a ne
+n�cessiterait aucun changement au niveau des logiciels eux-m�mes.
+
+Pour commencer: Si code ex�cut� = "movem.l  (%a0)+,%d0-%d7/%a2-%a6; movem.l
+%d0-%d7/%a2-%a6,(%a1)" et (%a1)==0x4c00, alors plan:=(%a0). Ensuite, pour
+graphlib-titanik et graphlib-iceberg: Si code ex�cut� = "movem.l
+(%a0)+,%d0-%d7/%a2-%a6; movem.l  %d0-%d7/%a2-%a6,(%a1)" (le m�me qu'avant)
+et (%a1)==0x4c00+12, alors plan:=-12(%a0). Ensuite, faut voir quelles autres
+s�quences de movem sont en circulation. Genlib est susceptible d'utiliser
+des trucs bizarres. Les autres, je suppose qu'ils utilisent du code
+"normal", c'est-�-dire la premi�re s�quence (TitaniK/Iceberg sont d�j�
+exotiques, j'avoue, mais c'est parce que je ne copie que 3000 octets sur
+Titanium pour pouvoir ex�cuter du code dans les 840 octets restants, qui ne
+sont pas prot�g�s contre l'ex�cution (vu qu'ils sont dans la plage
+0x5000-0x5fff)).
+
+        Kevin Kofler
+
diff --git a/docs/mails/Kevin Kofler/mail6.txt b/docs/mails/Kevin Kofler/mail6.txt
new file mode 100644
index 0000000..a1d1a90
--- /dev/null
+++ b/docs/mails/Kevin Kofler/mail6.txt	
@@ -0,0 +1,24 @@
+La proc�dure, c'est:
+* On r�cup�re le FolderListHandle d'une mani�re ou d'une autre (le challenge
+�tant de le faire d'une mani�re qui soit � la fois compatible avec tous les
+AMS et ne n�cessite pas d'�muler tout un ROM_CALL pour faire un
+FolderListHandle = SymFindHome(SYMSTR("main")).folder; - faire �a
+impliquerait appeler toute la fonction SymFindHome �mul�e depuis le code PC,
+donc ce n'est pas du tout pratique).
+* On recherche le r�pertoire dans ce handle (structure SYM_ENTRY *), on
+prend le champ "handle" et on se retrouve avec un autre handle contenant la
+table des fichiers dans ce r�pertoire.
+* On recherche le fichier dans ce handle (encore une structure SYM_ENTRY *),
+on prend � nouveau le champ "handle" et on se retrouve avec le handle du
+contenu du fichier.
+* ATTENTION, il faut absolument r�sister � la tentation de d�r�f�rencer ce
+handle! Avant d'ex�cuter le programme, AMS le d�place avec un HeapMoveHigh.
+Et il peut aussi �tre d�plac� � tout moment pour d'autres raisons. Il faut
+donc garder ce num�ro de handle en m�moire et faire un breakpoint non sur
+l'adresse HeapDeref(handle)+2 calcul�e statiquement, mais sur la _condition_
+PC=HeapDeref(handle)+2 avec HeapDeref �valu� � chaque fois. Si tu n'as pas
+encore de framework pour mettre un breakpoint sur des conditions complexes,
+c'est le moment d'en mettre un, on en aura de toute fa�on besoin pour le
+d�bogueur C t�t ou tard.
+
+        Kevin Kofler
\ No newline at end of file
diff --git a/docs/mails/Kevin Kofler/mail7.txt b/docs/mails/Kevin Kofler/mail7.txt
new file mode 100644
index 0000000..65b54ac
--- /dev/null
+++ b/docs/mails/Kevin Kofler/mail7.txt	
@@ -0,0 +1,46 @@
+Maybe we can base our debugging support on this?
+http://sources.redhat.com/ml/gdb-patches/2001-02/msg00490.html
+This integrates UAE with GDB, at least so it claims. It is written for old
+versions (see the 2001 date), but maybe I can get it up to task. It will
+still be much less work than writing the glue code from scratch (something I
+also considered), and probably also less work than writing source-level
+debugging support from scratch.
+
+The way I see this would be that there would be 2 classes of debugging
+windows:
+* windows based on the GDB core: source/disassembly view (and yes, I would
+use the disassembler in GDB/Binutils, the one from VTI has licensing issues
+anyway - I'd of course port the code you added, such as F-Line stuff, to the
+new disassembler), maybe breakpoints, and of course new windows which don't
+exist yet, for example: watchpoints, local variables, global variables,
+expression evaluator, ... I wonder if there is a GTK-based GDB frontend
+somewhere, from which we could lift some of the windows. Unfortunately,
+Insight uses TK and DDD uses Motif, so these are not options.
+* windows using the UAE or TI core directly, with the current code: memory
+view, register view, PC log, handle view, ... Some of these could also be
+implemented through GDB, but using UAE directly is better for performance,
+so I don't see a good reason to change things to use a slower interface.
+
+If we go down this route, I'll also have to get GDB/BFD and ld-tigcc to
+agree about a debugging information format, but that's something to worry
+about once basic GDB support is working (in a branch, or in SVN HEAD if
+Romain wants to branch the release - there is no way we will break the 2.00
+release with this sort of experiments).
+
+The suggested roadmap would then be:
+1. branch TiEmu for debugging support (I'm waiting for a sufficiently stable
+version for that; we're close, but things are still too much of a moving
+target for me)
+2. integrate Will Cohen's GDB-UAE glue code into the branch
+3. change the disassembly view to use GDB facilities
+4.-6. (will have to mostly co-evolve, I guess) add debugging information
+output to ld-tigcc, support for the chosen debugging information format to
+BFD/GDB, implement additional GDB-based windows
+
+The end result would be solid debugging support, including things like
+variable location tracking which allow debugging optimized binaries (-O0 is
+not always an option with TIGCC due to size constraints). The downside would
+of course be that TiEmu would depend on GDB, and a patched in-tree version
+at that, so it would get a lot larger.
+
+        Kevin Kofler
\ No newline at end of file
diff --git a/docs/mails/Kevin Kofler/probegho.89z b/docs/mails/Kevin Kofler/probegho.89z
new file mode 100644
index 0000000..9004c83
Binary files /dev/null and b/docs/mails/Kevin Kofler/probegho.89z differ
diff --git a/docs/mails/Kevin Kofler/probegho.c b/docs/mails/Kevin Kofler/probegho.c
new file mode 100644
index 0000000..ee65b52
--- /dev/null
+++ b/docs/mails/Kevin Kofler/probegho.c	
@@ -0,0 +1,18 @@
+#define USE_TI89
+#define USE_TI92P
+#define USE_V200
+#define SAVE_SCREEN
+#include <tigcclib.h>
+void _main(void) {
+ unsigned long *p=(unsigned long *)4;
+ unsigned long firstlong=*(unsigned long *)0;
+ clrscr();
+ try_again:
+ while (*(p++)!=firstlong) {
+  if ((unsigned long)p>=0x600000) return;
+ }
+ if (memcmp(p-1,0,1000)) goto try_again;
+ printf("%lp\n",p-1);
+ ngetchx();
+ goto try_again;
+}
diff --git a/docs/mails/Lionel Debroux/line1111.txt b/docs/mails/Lionel Debroux/line1111.txt
new file mode 100644
index 0000000..77ef11e
--- /dev/null
+++ b/docs/mails/Lionel Debroux/line1111.txt	
@@ -0,0 +1,108 @@
+TI-89 AMS 2.05 Line 1111 Emulator Technical Information by Greg Dietsche
+
+email: gforce at calc.org
+web: http://gforce.calc.org/
+
+This file is best viewed in Notepad with word wrap turned off.
+
+Examples of each F-Line Instruction can be found in a program
+called FLINE which is included with KerNO version 2.0 and above.
+
+Functions In the order they are handled:
+
+	6 byte bsr w/long word displacement
+		.word 0xFFF0
+		.long displacement
+
+	4 byte ROM CALL
+		.word 0xFFF2
+		.word rom call index * 4
+
+	2 byte ROM CALL
+		.word 0xF800 + Rom Call Index	(range $0 through $7EF inclusive)
+
+	6 byte bra w/long word displacement
+		.word 0xF800 + 0x7F1	(0xFFF1)
+		.long displacement
+
+__________________________________________________________________________________________
+;The TI-89 AMS 2.04 - 2.08 Line 1111 Emulator
+
+movem.l  %d0/%a0-%a2,-(%a7)   /* [0x2124DE Line 1111 emulator begin 0x10 bytes stacked
+movea.l  (0x12,%a7),%a0       /* [0x2124E2 get FXXX instruction pointer in a0
+clr.l    %d0                  /* [0x2124E6 
+move.w   (%a0),%d0            /* [0x2124E8 move FXXX instruction to d0
+movea.l  %a0,%a1              /* [0x2124EA a0 and a1 point to FXXX instruction
+move     %usp,%a2             /* [0x2124EC a2==user mode stack pointer (a7)
+
+;check for bsr with longword displacement
+cmpi.w   #0xFFF0,%d0          /* 
+bne.s    \notFFF0  	      /*+0x1A*/ /* [0x2124F2 not bsr, so check for rom call
+addq.l   #6,%a0               /* [0x2124F4 a0 = pc when returning back to caller
+move.l   %a0,-(%a2)           /* [0x2124F6 save pc to user stack for rts of called func
+move     %a2,%usp             /* [0x2124F8 update the user stack pointer
+addq.l   #2,%a1               /* [0x2124FA point a1 at 4 bytes data following $FFF0
+adda.l   (%a1),%a1            /* [0x2124FC add (X's) value at $fff0XXXXXXXX to a1 (calculate jump to addr)
+move.l   %a1,(0x12,%a7)       /* [0x2124FE save jump to addr on stack for rte instruction
+movem.l  (%a7)+,%d0/%a0-%a2   /* [0x212502 restore saved registers
+jmp      RTE_LABEL            /* [0x212506 rte will now return to called function, called func will return to stacked pc value
+
+__L21250C:
+\notFFF0:
+;at this point:
+;a0=a1=FXXX instruction
+;a2=user stack pointer
+;d0.l = FXXX instruction
+;0x10 bytes extra are stacked to save destroyed registers
+;FFF2 instruction is used for making rom calls. It supports rom call #$0 through #$FFFF
+;it will be used on ams versions with a rom call table containing more than 0x800 entries
+;for now, the two byte F800 instruction is used. FFF2 requires 4 bytes.
+cmpi.w   #0xFFF2,%d0          /* [0x21250C
+bne.s    \notFFF2  /*+0x22*/  /* [0x212510
+addq.l   #4,%a0               /* [0x212512  a0=pc after called func returns
+move.l   %a0,-(%a2)           /* [0x212514  stack new pc on usp
+move.w   (-0x2,%a0),%d0       /* [0x212516  d0.w == data portion of FFF2 instruction
+move     %a2,%usp             /* [0x21251A  update user stack pointer (yes, this is slightly out of logical order)
+movea.l  #0x23A1C6,%a0        /* [0x21251C   jump table address move.l $c8,a0
+move.l   (0x0,%a0,%d0.w),(0x12,%a7)/* [0x212522 save address of called func for rte
+movem.l  (%a7)+,%d0/%a0-%a2   /* [0x212528 restore saved registers (0x10 bytes)
+jmp      RTE_LABEL            /* [0x21252C return from interrupt
+__L212532:
+/notFFF2: 
+;at this point:
+;a0=a1=FXXX instruction
+;a2=user stack pointer
+;d0.l = FXXX instruction
+;0x10 bytes extra are stacked to save destroyed registers
+andi.w   #0xFFF,%d0           /* [0x212532 get rom call index + 0x800
+cmpi.w   #0x800,%d0           /* [0x212536 
+blt      __L212582	      /*+0x48*/ /* [0x21253A if index is less than 0x800 then crash
+
+cmpi.w   #0xFF0,%d0           /* [0x21253E 
+bge      /NotRomCall  	      /*+0x28*/ /* [0x212542 
+
+addq.l   #2,%a0               /* [0x212546 a0=ret addr for called func
+andi.w   #0x7FF,%d0           /* [0x212548 get rom call index
+move     %usp,%a1             /* [0x21254C a1=usp (why not use a2?)
+move.l   %a0,-(%a1)           /* [0x21254E stack ret addr for called func
+move     %a1,%usp             /* [0x212550 save new user stack pointer
+movea.l  #0x23A1C6,%a0        /* [0x212552 jump table address (move.l $c8,a0)
+rol.l    #2,%d0               /* [0x212558 multiply rom call index by 4
+adda.l   %d0,%a0              /* [0x21255A (rom call index *4)+rom call table=pointer to address of rom call
+move.l   (%a0),(0x12,%a7)     /* [0x21255C save rom call address for rte
+movem.l  (%a7)+,%d0/%a0-%a2   /* [0x212560 restore saved registers
+jmp      RTE_LABEL            /* [0x212564 return from exception
+__L21256A:
+/NotRomCall:
+;at this point:
+;d0=rom call index
+;d0 is greater than #$ff0
+a0=a1=FXXX instruction
+a2=user stack pointer
+cmpi.w   #0xFF1,%d0           /* [0x21256A long jump
+bne.s    __L212582  /*+0x14*/ /* [0x21256E if d0 != #$FF1 then crash
+addq.l   #2,%a0               /* [0x212570 a0 points to the coresponding .l data
+adda.l   (%a0),%a0            /* [0x212572 increment pc with offset
+move.l   %a0,(0x12,%a7)       /* [0x212574 store new pc
+movem.l  (%a7)+,%d0/%a0-%a2   /* [0x212578 restore registers
+jmp      RTE_LABEL            /* [0x21257C return from exception
diff --git a/docs/mails/Lionel Debroux/mem_mapping.txt b/docs/mails/Lionel Debroux/mem_mapping.txt
new file mode 100644
index 0000000..8214665
--- /dev/null
+++ b/docs/mails/Lionel Debroux/mem_mapping.txt	
@@ -0,0 +1,32 @@
+Il m'appara�t que pour la V200, TIEmu �mule un ghost 
+de 0x200000-0x3FFFFF � 0x400000-0x5FFFFF, ce qu'il 
+ne faut pas faire (que le dump soit tronqu� � 2 MB 
+ou non) !
+
+R�capitulons les emplacements des m�moires et des 
+ghosts:
+* TI-89:
+    * RAM � 0x000000-0x03FFFF;
+    * 7 ghosts de la RAM jusqu'� 0x200000;
+    * Flash � 0x200000-0x3FFFFF;
+    * pas de ghost de la Flash.
+* TI-89 Titanium:
+    * RAM � 0x000000-0x03FFFF;
+    * ghosts de la RAM � 0x200000 et 0x400000 (ne 
+les �mule surtout pas, �a encouragerait leur 
+utilisation qui est peu s�re - incompatibilit�s en 
+perspective si TI les enl�ve dans la V200T ?);
+    * Flash � 0x800000-0xBFFFFF;
+    * � ma connaissance pas de ghost de la Flash.
+* TI-92+:
+    * RAM � 0x000000-0x03FFFF;
+    * 7 ghosts de la RAM jusqu'� 0x200000;
+    * Flash � 0x400000-0x5FFFFF;
+    * ghost de la Flash � 0x200000-0x3FFFFF SUR HW2 
+UNIQUEMENT (ne pas l'�muler emp�che l'�mulation de 
+ROMs de V200 patch�es).
+* V200:
+    * RAM � 0x000000-0x03FFFF;
+    * 7 ghosts de la RAM jusqu'� 0x200000;
+    * Flash � 0x200000-0x5FFFFF;
+    * pas de ghost de la Flash.
\ No newline at end of file
diff --git a/docs/mails/Olivier Armand/7000xx_Ports.txt b/docs/mails/Olivier Armand/7000xx_Ports.txt
new file mode 100644
index 0000000..021b3ab
--- /dev/null
+++ b/docs/mails/Olivier Armand/7000xx_Ports.txt	
@@ -0,0 +1,56 @@
+============================================================================
+7000xx_Port.txt - More details on unknown TI68K $7000xx HW2 I/O Ports
+ - February 2002 -  Olivier Armand (ExtendeD) - <ola.e-ml at wanadoo.fr>
+============================================================================
+
+
+You should read Johan Eilert's TI89 hardware programming documentation
+before reading this one.
+
+
+$0x700008 to $700000F : (rw)
+=======================
+
+These ports are the ghosts of the ports for the protection of execution in
+RAM ($700000 to $700007). Any writing to either the real ports or the ghosts
+will change both ports (eg $700002 and $70000A).
+
+
+$700014.w : (Rw)
+===========
+
+Real Time Clock. Incremented every 2^13 = 8192 seconds exactly.
+The whole word must be read : reading the port byte by byte can return wrong
+values.
+The timer is not incremented when the batteries have been removed, but the
+value it had when they were removed is kept. Removing the lithium battery
+and putting it back gives a random value to the timer.
+
+
+$70001F.b : (Rw)
+===========
+
+bit 2 : activates the incrementation of $700014.w when bit 1 is set. Set by
+        AMS on reset.
+bit 1 : its effect depends on the state of bit 2.
+ bit2/bit1
+   1   1   : State set by AMS on reset. $700014.w is incremented.
+   1   0   : Auto-ints 1, 2, 3 and 5 are inhibited. The RTC is stopped.
+   0   1   : The RTC is stopped. The auto-ints works normally.
+   0   0   : The RTC is stopped. The frequencies of all the auto-ints are
+             lower (OSC2 must be slower).
+             AI1 : ~ 176 Hz instead of 256 Hz. 
+             AI3 : ~ 40 ticks per minute instead of 60.
+             AI5 : ~ 13.2 Hz instead 19.3 Hz.
+   Only AMS initializes theses bits on reset. The boot code does not.
+
+bit 0 : Something to do with the contrast (see J89hw.txt), AND :
+Clearing this bit activate the execution in areas from which the Protection
+can be disabled :
+ROM_BASE+$12000 to ROM_BASE+$17FFF and ROM_BASE+$1A000 to ROM_BASE+$1FFFF.
+The execution in the boot sector is not protected by the protection
+controlled by this bit.
+
+
+-----------
+End Of File
diff --git a/docs/mails/Olivier Armand/mail1.txt b/docs/mails/Olivier Armand/mail1.txt
new file mode 100644
index 0000000..447d94d
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail1.txt	
@@ -0,0 +1,65 @@
+Salut !
+
+Pour une ROM originale (en .v2u) de V200, le plus simple est de la prendre
+directement sur le site de TI (AMS 2.09 uniquement) :
+http://education.ti.com/us/product/apps/v200os.html
+
+Pour une ROM de V200 patch�e afin de pouvoir tourner sur Virtual TI, elle
+peut �tre trouv�e dans le package que j'avais fait lors de l'apparition de
+la V200 : http://membres.lycos.fr/extended/AMS_2.07_Dev_Kit.zip
+Un fichier d�crit les patches effectu�s. Attention, les autres documents du
+package ne sont plus � jour, il vaut mieux utiliser celui-ci :
+http://www.ticalc.org/pub/text/calcinfo/ams_2.08_doc.zip
+J'ai aussi les AMS 2.08 et 2.09 patch�s de la m�me mani�re que je peux
+envoyer si tu en as vraiment besoin.
+
+Pour une ROM originale de Titanium (AMS 3.00), je viens de l'uploader ici :
+http://membres.lycos.fr/extended/titanic.orig.zip (l'AMS n'est pas encore
+disponible sur le site de TI). C'est un ROM Dump fait par Samuel Stearley
+des 2 premiers Mo (il n'a pas pu aller plus loin avec l'outil de dump qu'il
+utilise) : une partie des Flash Apps qui �taient install�es sont donc
+coup�es, mais ce n'est pas g�nant (elles peuvent �tre enlev�es � la main
+avec un �diteur hexa, ou les demi apps seront normalement nettoy�es au
+d�marrage de l'AMS). Samuel m'a donn�e l'autorisation d'en faire ce que je
+veux, mais je pr�f�re qu'on ne parle pas trop de ce lien.
+
+J'ai aussi une version au format .89u (venant du CD donn� avec la Titanium),
+mais elle est identique, avec le header et la taille correspondants.
+
+J'ai fait de la m�me mani�re une version patch�e qui permet de le faire
+tourner cette ROM de Titanium sur VTI. Les patchs se comptent par milliers
+et sont en grande partie fait de fa�on automatique, donc l'AMS plante un peu
+parfois, mais ce n'est pas g�nant. Le package contient un document (assez
+confus, il n'�tait pas fait pour �tre distribu� si t�t) qui d�crit les
+patches effectu�s, ainsi qu'un certains nombres d'informations int�ressantes
+sur la Titanium et l'AMS 3.00. Je l'ai envoy� r�cemment � quelques
+d�veloppeurs qui avaient des besoins sp�cifiques de tests de programmes sur
+Titanium.
+La Titanium n'a pas trop de particularit�s, � part un ROM_BASE � 0x800000,
+les sp�cificit�s sur les ghost spaces de la RAM, et les protections
+d'ex�cution comme d�crits plusieurs fois sur le forum de la TICT. Au niveau
+des ports i/o, de nouveaux sont apparus � 0x700010 concernant la gestion de
+l'horloge et de l'USB (cf le document du package). Et L'auto-int 3 est
+maintenant li�e � l'USB.
+Les ports relatifs � l'horloge sont assez clairs, mais je n'ai pas encore
+beaucoup regard� ceux de l'USB. Ils semblent tr�s similaires � ceux d�crits
+par Dan Englander sur le forum de Detached Solutions. Dan m'a dit qu'il
+n'avait pas plus d'infos dessus. Il serait interessant de comprendre en
+d�tail le fonctionnement de ces ports, mais �a � l'air assez complexe.
+Le package est disponible ici :
+http://www.ifrance.com/ti68k/titanium-info.zip . Je pr�f�rerais que le lien
+/ le package ne soient pas redistribu�s.
+
+A propos d'�mulation, il serait int�ressant de g�rer les ports d�crits ici :
+http://www.ticalc.org/pub/text/calcinfo/7000xx_ports.zip , ainsi que tout ce
+qui concerne les protections d'ex�cution et leur faille correctement.
+
+Je suis tr�s int�ress� par TiEmu. Malheureusement le d�bogueur de la
+derni�re version �tait inutilisable sous Windows XP, beaucoup trop lent...
+Je n'ai pas encore test� sous Linux.
+
+Je suis pr�t � te donner tout autres renseignements dont tu aurais besoin.
+
+++
+
+ Olivier Armand
\ No newline at end of file
diff --git a/docs/mails/Olivier Armand/mail2.txt b/docs/mails/Olivier Armand/mail2.txt
new file mode 100644
index 0000000..bff4351
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail2.txt	
@@ -0,0 +1,104 @@
+> > J'ai aussi une version au format .89u (venant du CD donn� avec la
+> > Titanium),
+> > mais elle est identique, avec le header et la taille correspondants.
+>
+> Je peux l'avoir pour tester ma libtifiles (import/export de tib et autres
+> .89u) ?
+
+Je viens de l'uploader ici :
+http://www.ifrance.com/ti68k/TI89Titanium_OS300.zip
+
+> je crois savoir qu'il faut un VTi modifi� par Muchembled pour faire
+> tourner la V200. Si oui, est-ce que tu sais quelles modifs il a effectu�
+> dessus ?
+
+JM a perdu les sources apr�s un crash de disque je crois. En fait il y a au
+moins deux versions de VTI de JM (j'en ai une de f�vrier 2001, et une autre
+de mai 2001). Je ne sais pas si tu en as une des deux, mais celle de f�vrier
+(qui fait maintenant 1878 ko) ajoute par rapport � la derni�re version de
+Rusty Wagner, dans le debugger :
+- un menu d�roulant permettant d'atteindre n'importe quelle ROM Call, dont
+la liste de noms peut �tre mise � jour en �ditant un fichier externe
+- un compteur de cycles
+- un menu "set program entry breakpoint" qui marche sur plus de versions
+d'AMS
+- des boutons pour modifier les flags (Z, N, C, V, etc.) et le masque
+d'interruption de SR plus facilement
+- une �mulation du mode Trace du 68000
+- une �mulation du ghost de la Flash sur 92+, qui apparait entre 0x200000 et
+0x400000 (image identique de 0x400000-0x600000)
+- peut �tre un tas d'autres trucs, mais qui n'apparaissent pas de fa�on
+�vidente
+
+La version de mai 2001 ajoute un menu "Action on breakpoint : Break" ou
+"Save state image". Je ne vois pas trop son inter�t, mais c'�tait peut �tre
+utile pour JM pour ses propres programmes. Et "set data breakpoint" plante
+dans cette version.
+
+> J'ai retest� mon support v200 et il plante toujours sur une ILLEGAL
+> instruction. Apparemment, apr�s un RTS, il part n'importe o� en RAM !
+> C'est pas forc�ment un bug puisque j'ai constat� que ce le faisait aussi
+> au boot (routine sp�ciale ?).
+> Dans ce cas, je pense qu'il d�pile un niveau de trop mais je vois pas
+pkwoi.
+
+Bizarre comme probl�me... Je veux bien t'aider � d�bugger �a si tu veux.
+
+> Je misais �ventuellement sur les modifs de JM pour savoir si j'�tais pass�
+� cot� de qqchose.
+
+Non, je ne pense pas que �a ait quelque chose � voir. La ROM de V200 que
+j'ai patch� � besoin de l'�mulation du ghost de la Flash pour permettre
+l'ex�cution et la lecture dans la zone 0x200000 - 0x400000 comme le ferait
+une V200 r�elle. VTI place la ROM � 0x400000, donc le ghost space est
+n�cessaire.
+
+> <<Au reset, � 0x2121BA, l'AMS regarde si 0x400000 est un ghost space ou
+non.
+> Patcher en bra.l (->0x6000001A) pour que ce ne soit jamais un ghost.>>
+> Dois-je comprendre que si TiEmu n'impl�mente pas les ghost spaces, une ROM
+> de V200 ne marchera pas ?
+
+Ah oui, en effet, j'avais oubli� ce probl�me. Cette protection de TI est
+peut-�tre pour �viter que quelqu'un essaie de faire tourner un AMS de V200
+sur 92+, o� le ghost space existe effectivement. Si jamais ce bout de code
+d�tecte que 0x400000+n est identique � 0x200000+n, il lance le boot. Donc ce
+qui devrait se passer sur TiEmu est un simple lancement du boot, pas un
+ILLEGAL, c'est bizarre...
+Il faut de toute mani�re effectivement g�rer le ghost space pour que �a
+marche sous TiEmu.
+
+> Question de terminologie: qu'entends-tu par ghost space ? Pour moi,
+> �lectronicien, il s'agit d'une zone m�moire qui n'existe pas physiquement
+> mais qui est un mirroir d'une zone r�elle. C'est tr�s souvent le cas
+> lorsqu'on fait un d�codage d'addresse incomplet.
+
+Oui, c'est bien cela, et c'est bien aussi d� au d�codage d'adresses (ROM et
+RAM) sur TI68k. Le "reflet" est identique � l'"original" en lecture, mais il
+a des comportements diff�rents en ce qui concerne l'ex�cution, et peut-�tre
+l'�criture pour la FlashROM (je n'ai pas test�). Ceci est notamment d� aux
+ing�nieurs de TI qui ne font pas attention � ces reflets en programmant leur
+puces de protection.
+On peut ainsi contourner sans probl�me la protection d'ex�cution en FlashROM
+sur 92+ (qui m'a permis de faire "Pedrhum", un projet de cohabitation de AMS
+et de PedroM, l'OS alternatif de PpHd - d'autres techniques sont utilis�es
+pour les autres mod�les de calc. Le shell CS de Flanker utilise lui cette
+faille que j'ai trouv�e pour s'ex�cuter en Flash). Et ceci a permis � JM de
+d�couvrir la fameuse faille de la protection d'ex�cution du ghost space de
+la RAM (utilis�e avec enter_ghost_space / EXECUTE_IN_GHOST_SPACE de TIGCC),
+et � Kevin Kofler d'�crire H220xTSR qui permet l'installation de TSR.
+Ces comportements particuliers ne sont pas n�cessaires pour une �mulation
+simple comme le fait VTI (tant que les protections ne sont pas elles aussi
+�mul�es), mais pourraient �tre interessants pour une �mulation tr�s
+r�aliste.
+
+> Si l'envie t'en prends, maille-moi de fa�on � ce que je te fournisse la
+> derni�re version. Je fais de temps en temps des alpha releases sur le site
+> mais elles sont pas forc�ment int�ressantes.
+
+Oui, je serais interess�. Je suis pr�t � faire des tests sous Windows XP
+et/ou Linux.
+
+++
+
+Olivier Armand
\ No newline at end of file
diff --git a/docs/mails/Olivier Armand/mail3.txt b/docs/mails/Olivier Armand/mail3.txt
new file mode 100644
index 0000000..793c455
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail3.txt	
@@ -0,0 +1,45 @@
+Salut !
+
+> En parlant de boot, je me suis tjs demand� comment il fonctionnait. En
+> effet, la RAM est en 0 et le boot aussi en 0.
+> En tant qu'�lectronicien, je suppose que la calc boote par d�faut sur le
+> premier secteur de la FLASH. Ensuite, je pense qu'elle copie la table de
+> vecteurs en RAM et ptet quelques routines (trampoline). Puis, par une
+> bascule, elle swappe la FLASH et la RAM pour que la RAM se retrouve en 0
+> et la FLASH en ROM_base.
+>
+> C'est une technique extr�ment utilis�e en �lectronique qd on souhaite
+> faire du d�veloppement. Par ex: on a un moniteur en EPROM qui vient
+> charger du code en RAM, on fait un RESET et la RAM est intervertit avec
+> l'EPROM. On ex�cute maintenant le code en RAM. Au RESET, suivant, la
+> situation s'inverse, on repart sur le moniteur.
+
+Au signal RESET du processeur, le d�codeur d'adresse map la FlashROM � 0x0
+le temps que le processeur initialise SR et PC avec ce qu'il trouve dans 0x0
+et 0x4 (qui sont donc en fait ROM_base + 0 et ROM_base + 4). Puis le
+d�codeur replace imm�diatement la FlashROM � ROM_base, et la RAM � 0x0 (je
+ne sais pas comment il d�termine ce moment, mais c'est en gros ce que mon
+prof de structure des ordinateurs m'avait expliqu� quand je lui avait pos�
+cette question).
+Ainsi la RAM et la FlashROM se trouvent bien � leurs adresses finales
+lorsque la premi�re instruction du boot est ex�cut�e. Le swap n'est pas fait
+par le boot lui-m�me, il n'en a m�me pas conscience. Et donc pas besoin de
+trampoline non plus.
+
+Puis tr�s grossi�rement :
+Apr�s toutes les tests et initialisations de l'hardware et des vecteurs
+d'interruption, le boot regarde si (CertificateMemory + 2).w est nul. Si
+c'est le cas, alors un AMS devrait bien �tre install�, et le boot recherche
+le point d'entr�e du code du reset et y saute.
+Si (CertificateMemory + 2).w est non nul (ce qui peut �tre le cas si un
+transfert d'AMS a �t� interrompu par exemple, puisque ce flag n'est remis �
+0 qu'une fois l'AMS bien install�), le boot continue son ex�cution (et
+affiche 'press I to install product code' pour permettre une r�ception
+d'AMS).
+En plus du test de CertificateMemory + 2, la combinaison Apps+ON est aussi
+v�rif�e, et lance la suite du boot de la m�me mani�re que si
+CertificateMemory + 2 �tait non nul.
+
+++
+
+ Olivier Armand
\ No newline at end of file
diff --git a/docs/mails/Olivier Armand/mail4.txt b/docs/mails/Olivier Armand/mail4.txt
new file mode 100644
index 0000000..6f66f3a
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail4.txt	
@@ -0,0 +1,29 @@
+
+
+> j'aurais quelques questions:
+> - est-ce que l'impl�mentation de la protection dans TiEmu est inutile,
+> utile, un plus ou indispensable ?
+
+C'est utile pour d�boguer des bogues qui y sont li�s, mais pas
+indispensable.
+
+> - qu'est-ce que les ghost spaces ? Est-ce la RAM miroit�e � partir de
+> 0x20000 ?
+
+Oui:
+0x20000 et multiples jusqu'� 0x1e0000 sur TI-92.
+0x40000 et multiples jusqu'� 0x1c0000 sur TI-92 II, TI-92+, TI-89, Voyage
+200.
+0x200000 et 0x400000 sur TI-89 Titanium. (Le reste, c'est-�-dire
+0x40000-0x1fffff, est apparemment inutilis�.)
+Sur la TI-89 Titanium (HW3), on ne peut rien ex�cuter � ces endroits. Sur
+HW2, on peut ex�cuter du code � ces endroits si et seulement si on peut
+l'ex�cuter aussi � 0x3f000-0x3ffff. Sur HW1, on peut ex�cuter ce qu'on veut
+� 0-0x1bffff, mais il y a des protections bizarres sur 0x1c0000-1x1fffff
+(cf. J89hw.txt pour les d�tails).
+
+L'utilisation de ces espaces fant�me permet aussi de passer outre les
+protections qui activent l'AI7.
+
+        Kevin Kofler
+
diff --git a/docs/mails/Olivier Armand/mail5.txt b/docs/mails/Olivier Armand/mail5.txt
new file mode 100644
index 0000000..5783f21
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail5.txt	
@@ -0,0 +1,53 @@
+
+
+Re-salut !
+
+Pour toute cette gestion de l'horloge, en r�sum� (tout �a est dans ma doc
+sur les nouvelles ROM Calls de l'AMS 2.07 mais �parpill� un peu partout) :
+L'AMS n'utilise que l'auto-int 3 pour g�rer son horloge. Celle-ci se
+d�clenche exactement toute les secondes de fa�on tr�s pr��ise. L'AMS
+incr�mente un timer interne (que j'ai appel� OneSecondTimer) stock� en RAM.
+Puis tout le reste de l'AMS se base dessus pour g�rer la conversion en
+date/heure sous forme de cha�ne, g�rer les fuseaux horaires, etc.
+L'auto-int3 est contr�l�e par le bit 2 de 0x600015, qui doit �tre arm� pour
+qu'elle se d�clenche.
+
+La ROM Call ClockOn fait : si pas HW1, bset #2,$600015.
+La ROM Call IsClockOn fait un btst #2,$600015
+
+Quand la calculatrice est �teinte, $600005 est fix� correctement par le trap
+#4 pour qu'elle soit aussi r�veill�e par l'auto-int3. OneSecondTimer est
+ainsi aussi incr�ment� m�me pendant que la calc dort.
+
+$700014 n'est *jamais* utilis� par l'AMS ou le boot. Je d�couvert son
+fonctionnement un peu par hasard en bidouillant ces ports inconnus, et en
+plusieurs jours car c'�tait pas facile de se synchroniser avec une
+incr�mentation aussi lente qu'on ne connait pas.
+
+Donc pour une bonne �mulation de l'horloge, il suffit que $600015:2 puisse
+�tre fix� et lu, et contr�le correctement l'auto-int3. $600005 doit aussi
+�tre bien �mul�.
+$700014 n'est pas vraiment n�cessaire par contre.
+Et il faut que la calc soit d�tect�e comme n'�tant pas une HW1. Je n'ai pas
+regard� pour TiEmu, mais normalement un test d'HW par l'AMS sur une ROM avec
+boot retourne la bonne version correspondant au boot, et sur une ROM sans
+boot retourne "HW2" (d� aux valeurs al�atoires � la place du boot : l'AMS
+fournit alors un HWParmBlock de remplacement).
+
+Par contre sur Titanium, c'est nettement plus compliqu� :) Toute l'horloge
+est g�r�e en hardware sans l'auto-int3, et donc sans utiliser $600015 ou
+$600005. Plusieurs des nouveaux ports � $7100xx sont utilis�s. C'est assez
+complexe, le mieux est que tu regardes la partie "Horloge" de ma doc de mon
+package sur la Titanium.
+
+> il utilise le timer pour le comptage des
+> secondes (r�f�rence � court terme) et le d�compte (r�f�rence � long terme)
+> pour venir se recaler dessus de fa�on p�riodique.
+
+De fa�on hardware ? Par quel mat�riel le d�compte lent est-il fait ? (pour
+l'AI3, c'est avec l'OSC2).
+En tout cas ce timer ($700014) ne semble servir � rien actuellement.
+
+++
+
+Olivier
\ No newline at end of file
diff --git a/docs/mails/Olivier Armand/mail6.txt b/docs/mails/Olivier Armand/mail6.txt
new file mode 100644
index 0000000..f0173fc
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail6.txt	
@@ -0,0 +1,62 @@
+Salut,
+
+> 1�) Sur les zones 'read protected', quelle valeur est lue ? 0x14141414
+
+Je ne sais pas si cette valeur est toujours la m�me.
+Les zones de la ROM prot�g�es en lecture peuvent �tre lues uniquement si la
+"Protection" (celle qui prot�ge les �critures en flashROM, les lectures /
+�critures de certains ports I/O, etc.) est d�sactiv�e.
+Pour TIEmu, tu peux faire retourner toujours la m�me chose quand la
+Protection est active, �a ne g�ne pas.
+Par contre ce qui serait int�ressant que l'hexeditor permette toujours de
+lire les zones prot�g�es quelque que soit l'�tat de la protection, sinon
+d�boguer des tests utilisant les certificats devient infaisable.
+
+>   * The memory at $218000-$219FFF is read protected.  (?)
+C'est ce que Johan dit, et je l'ai v�rif� sur une vraie calc. Je ne comprend
+pas pourquoi TI � impl�menter �a.
+L'OS alternatif PedroM de PpHd doit �tre coup� en 2 � cause de �a, et l'AMS
+contient des 0xFF sur toute la zone puisqu'elle est inutilisable.
+
+> 2�) Sinon, aurais-tu un �diteur hexa on calc � me conseiller pour viewer
+> la RAM/ROM d'une TI89 ?
+Ca d�pend de ce que tu veux en faire, mais l'application flash Command Post
+Plus de Greg Dietsche est pas mal un contient plusieurs outils qui vont au
+del� de �a. tthdex de la TICT est un programme assembleur �quivalent, mais
+il est moins pratique pour regarder n'importe quelle zone de la m�moire je
+crois.
+Personnellement j'utilise DB92 qui est un d�bogueur complet, avec �diteur
+hexa (d'ailleurs il y a plusieurs d�tails tr�s simples de ce programme qui
+serait pas mal � impl�menter dans TiEmu, je peux te faire une liste
+d�taill�e si tu veux). La toute derni�re version de DB92 est disponible ici
+: http://membres.lycos.fr/hwti/DB92_NOSTUB_ALPHA_041test.rar
+
+> qu'en est-il des ghost spaces ? J'ai impl�ment� le support de la Titanium
+> et j'ai le meme pb qu'avec la V200: illegal instruction.
+
+Comme l'AMS n'utilise pas les ghost spaces, le probl�me ne doit pas venir de
+l� de toute fa�on.
+Les 89/92+/V200 ont des images de la zone 0x0-0x3FFFF en 0x40000-0x7FFFF,
+0x80000-0xBFFFF, etc. jusqu'� 0x200000.
+La Titanium n'a aucun de ces ghost spaces. Les siens sont des images de
+0x0-0x1FFFFF en 0x200000 et 0x400000, sachant que la zone 0x40000-0x1FFFFF
+retourne des valeurs al�atoires en lecture je crois. Il est possible que ces
+ghost disparaissent dans des futures versions de la Titanium, et/ou que de
+la RAM soit ajout�e, d'apr�s certaines routines de l'AMS.
+En ce qui concerne la protection d'ex�cution en RAM, la zone 0x0-0x3FFFF est
+contr�l�e de la m�me mani�re que sur 89/92+/V200. Je crois que personne ne
+sait actuellement comment l'ex�cution dans les ghost spaces � 0x200000 et
+0x400000 est contr�l�e sur Titanium (sur 89/92+/V200, l'ex�cution dans les
+ghost spaces � 0x40000, 0x80000, etc. peut �tre autoris�e par le bit 7 du
+port 0x70006). Peut-�tre que l'ex�cution est totalement bannie dans ces
+ghost spaces de la Titanium.
+
+> J'ai pas mal arrang� les choses depuis la derni�re fois. Un build est
+> dispo sur le site (la Linux est un peu - r�cente) si t'as envie
+> d'essayer...
+
+Ok je vais tester.
+
+++, bonne continuation,
+
+Olivier
\ No newline at end of file
diff --git a/docs/mails/Olivier Armand/mail7.txt b/docs/mails/Olivier Armand/mail7.txt
new file mode 100644
index 0000000..5c84260
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail7.txt	
@@ -0,0 +1,162 @@
+> PS: soit pas �tonn� si je r�ponds pas ce WE because LAN party + barbecue +
+> lac ;-)
+
+Ok, bah j'esp�re que c'�tait chouette :)
+
+J'ai test� cette nouvelle version, c'est vraiment g�nial :) Il n'y a plus un
+seul ralentissement, ni de CPU consomm� pour rien. J'ai enfin pu tester le
+debugger en profondeur.
+Voil� une liste de remarques assez grosse, j'esp�re qu'elle pourra te donner
+des id�es et premettre de corriger des bugs. Certaines id�es de trucs �
+ajouter sont indispensables je pense, d'autres permettrait de vraiment
+beaucoup acc�lerer le travail le debug sous TiEmu.
+
+Les bugs :
+
+* Pour le probl�me du crash avec la Titanium : il vient de la routine
+d�crite dans le commentaire '[1]' de mon titanium-info.txt, qui d�termine
+dynamiquement la taille de la RAM disponible.
+Les blocs de 64ko de la RAM sont test�s un � un pour voir s'ils sont valides
+(�criture puis lecture). Comme TiEmu �mule pour l'instant des ghost spaces �
+0x40000, 0x80000, etc. qui n'existent pas, ces blocs semblent valides et
+l'AMS croit finalement avoir affaire � une RAM de 1Mo (tu as fait arr�ter
+les reflets � 0x100000 on dirait. Pour l'�mulation des 89 standard/92+/V200,
+il faudrait les faire arr�ter � 0x200000 en fait).
+Puis plus loin dans le code du reset, une boucle efface un grosse partie de
+la RAM en utilisant la taille calcul�e par la routine pr�c�dente : les
+reflets sont aussi effac�s, et donc les vecteurs � 0x0+n le sont. Les
+utilisations des vecteurs qui suivent feront ensuite planter l'AMS. Pour
+corriger le probl�me, il suffit d'emp�cher l'�criture dans les ghost spaces,
+qui n'existent pas sur Titanium.
+Il y a peut-�tre d'autres probl�mes pour cette �mulation de la Titanium,
+mais il faut d�j� corriger �a pour y voir plus clair.
+
+* Lorsqu'un code breakpoint a �t� touch�, impossible de faire un step ou un
+step over ensuite (TiEmu crash).
+
+* Si on ferme une fen�tre du d�bugger, les choix coch�s dans le menu Windows
+de la fen�tre 'Code/Source' ne correspondent plus car ils ne sont pas mis �
+jour.
+
+* Ctrl+F dans la fen�tre Memory fait appara�tre une petite zone de texte
+�ditable, je ne vois pas � quoi elle sert.
+
+* Au d�marrage, la fen�tre Memory a deux onglets commen�ant � l'adresse 0,
+je ne sais pas si c'est normal (un seul suffirait).
+
+* lea $4C00,a0 est d�ssasembl� en lea tios::CALC_TI89,A0 ? (� 0x8123B4 sur
+Titanium) Pourquoi pas LCD_MEM ?
+
+* L'onglet visible de la fen�tre memory n'est pas rafra�chit apr�s un 'Run
+to cursor' ou un 'step' par exemple, il faut changer d'onglet pour forcer le
+rafra�chissement.
+
+* Un 'step over' sur une instruction 'bra' doit s�rement mettre un
+breakpoint temporaire juste derri�re l'instruction. Il faudrait plut�t qu'un
+'step over' se comporte de la m�me fa�on qu'un 'step' sur cette instruction.
+Pareil pour un 'jmp' (je n'ai pas regard� s'il y avait aussi le probl�me).
+
+* Impossible de quitter TiEmu quand des breakpoints sont � chaque fois
+touch�s : TiEmu ne peut pas �tre ferm� tant que les fen�tres du d�bugger ne
+sont pas ferm�es, et les breakpoints r�ouvrent imm�diatement les fen�tres du
+d�bugger.
+
+
+Les trucs qui pourraient �tre modifi�s :
+
+* Le scroll des instructions vers le bas dans la fen�tre Code/Source : lors
+du passage � l'�cran d'apr�s, on se perd (l'instruction s�lectionn�e devient
+la premi�re). Peut-�tre que seulement un demi-�cran pourrait �tre scroll� ?.
+Pareil pour la fen�tre Memory.
+
+* Les fen�tres du d�bogueur : il faudrait pouvoir toutes les r�duire /
+restaurer d'un coup, lorsque la fen�tre de l'image de la calc est r�duite ou
+restaur�e par exemple. Et est-ce que ce serait possible qu'une seule fen�tre
+(ou 2 : une pour la calc et une pour le debugger) apparaisse dans la barre
+des t�ches ? Parce que l� �a fait pas mal de monde et ce n'est pas tr�s
+utile.
+
+* Lors d'un set breakpoint dans la fen�tre Code / source, la s�lection
+revient imm�diatement � PC. Ce serait mieux qu'elle se place l� o� on a
+plac� / retir� le breakpoint, �a provoque un saut un peu g�nant
+actuellement.
+
+* Il est assez difficile de savoir exactement ou on est dans la fen�tre
+Memory avec des lignes de 16 octets. Il faudrait par exemple un affichage
+quelque part de l'adresse de l'octet selectionn�, sinon on se retrouve la
+plupart du temps � recompter depuis le d�but de la ligne.
+
+* L'adresse affich�e dans la fen�tre Memory comme titre d'un onglet devrait
+�tre plut�t l'adresse du premier octet affich� (pour l'instant elle reste
+constante), sinon elle ne correspond plus � rien quand on scroll.
+
+* La fen�tre Code/Source est un peu trop petite au d�marrage de TiEmu, 2
+instructions sont cach�es, la fen�tre doit �tre � chaque fois r�agrandie.
+
+* Lorsque l'on fait un 'Run to cursor', tout reste immobile et on n'a pas
+l'impression qu'il a �t� ex�cut� : en fait l'instruction courante et la
+s�lection sont confondues, et seule la couleur de la s�lection appara�t. Il
+faudrait peut-�tre une troisi�me couleur lorsque les deux sont confondues,
+comme le fait VTI.
+
+
+Les trucs qui pourraient �tre ajout�s  (sachant que les premiers sont les
+plus indispensables) :
+
+* Une fen�tre ou une zone dans une fen�tre affichant la pile manque vraiment
+(un hexdump depuis a7).
+
+* Une fonction de recherche dans la fen�tre Memory est indispensable.
+L'id�al est la fonction fournie par DB92 : on tape une s�quence d'octets en
+hexa, ou une s�quence de caract�res ASCII, aussi grande que l'on veut. VTI
+lui ne permet que de chercher des octets/mots/long mots, align�s pour les
+deux derniers en plus, c'est dommage. Il faudrait aussi une fonction (et son
+raccourci clavier) 'search next' pour continuer la recherche, comme sous
+DB92.
+
+* Il manque vraiment "goto address" comme sous VTI dans la fen�tre Memory.
+
+* Un "View memory" dans le menu clic-droit de Code / Source serait pratique,
+qui ouvrirait un onglet dans la fen�tre Memory avec pour adresse
+l'instruction cliqu�e (VTI ne l'a pas non plus, mais DB92 l'a).
+De la m�me mani�re une fonction  "view disassembly" dans Memory qui ferait
+un "goto address" dans la fen�tre Code/Source vers l'adresse s�lectionn�e
+serait tr�s pratique (la version de VTI de JM l'a, je ne sais plus pour la
+version originale).
+
+* Dans la fen�tre Memory, ce serait bien de pouvoir modifier une train�e
+d'octets successifs comme sous DB92. Sous DB92, on passe en mode �dition en
+appuyant sur 'E', puis on tape les octets digit par digit ins�r�s un � un
+avec le curseur qui avance, comme un �diteur de texte. Je ne sais pas si
+c'est faisable avec les widgets GTK utilis�s actuellement.
+
+* Des toggle buttons seraient pratiques plut�t que du texte � �diter, � la
+mani�re des versions de VTI de Julien Muchembled, pour modifier les �tats
+des bits de SR dans la fen�tre Registers.
+
+* Deux trucs tr�s simples qui serait tr�s pratique : dans la fen�tre
+Registers, un menu clic droit sur les registres d'adresses qui permettrait
+d'ouvrir un nouvel onglet dans la fen�tre Memory depuis l'adresse point�e
+par le registre cliqu�, ou de faire un 'goto address' dans la fen�tre
+Code/Source vers cette adresse point�e.
+
+* Un truc peut-�tre un peu compliqu� � r�aliser : une fen�tre (voir dans la
+m�me fen�tre que PC log), similaire � Trace, qui contiendrait une call stack
+: les adresses des derniers jsr / bsr / FLine RomCalls / trap ex�cut�s, et
+supprim�s de la liste lors des rts / rte.
+Il faudrait faire attention au interruptions (pas de log de la call stack),
+et aux retours de fonction qui peuvent �tre fait � la main par certains
+programmes en lisant le contenu de la pile (dans ces cas l�, le depilage de
+la call stack pourra �tre mis � jour au prochain retour de fonction effectu�
+correctement, en regardant sur la pile � quel appelle rts / rte correspond).
+Je regarde souvent les appels � la main sous VTI en lisant le contenu de la
+pile, c'est extr�ment difficile de retrouver quelle sont les adresses de
+retour.
+
+
+Je suis tr�s content de ce que �a donne actuellement, TiEmu est tr�s
+prometteur.
+
+++
+
+Olivier Armand
\ No newline at end of file
diff --git a/docs/mails/Olivier Armand/mail8.txt b/docs/mails/Olivier Armand/mail8.txt
new file mode 100644
index 0000000..f058760
--- /dev/null
+++ b/docs/mails/Olivier Armand/mail8.txt	
@@ -0,0 +1,113 @@
+
+
+Salut !
+
+L'AMS plante en bouclant au milieu d'une �criture en Flash invalide.
+Elle est effectu�e dans la fonction du trap #11 qui nettoie la Flash
+au reset : la limite sup�rieure de la Flash (FlashMemoryEnd), qui est
+calcul�e dynamiquement uniquement sur Titanium, a �t� mal calcul�e, et
+l'�criture essaie d'aller trop loin en m�moire.
+
+Le calcul dynamique de la taille de la FlashROM est effectu� avant par
+une autre fonction du trap #11, ajout�e sp�cialement sur l'AMS 3.00 de
+la Titanium. J'ai document� �a dans ma doc sur la Titanium
+(commentaire 2). Il semble que des futurs mod�les pourrait avoir 8Mo
+de Flash, ou alors ce serait pour garder une compatibilit� du code
+avec la TI-89, je ne sais pas trop.
+
+En tout cas voil� ce qu'il faut que tu impl�mentes sur TiEmu pour
+�viter le probl�me : des commandes sont envoy�es � la m�moire Flash
+pour d�terminer sur quel mod�le on se trouve, voil� le bout de code de
+l'AMS correspondant :
+
+lea CertMem,a1 ; Any valid address within the device (= the EEPROM
+chip). Sur TI, semble devoir �tre CertMem absolument (?)
+move.w #$9090,(a1) ; Read Identifier Codes
+move.w ROM_BASE,d1 ; Identifier code address + 0 -> Manufacturer Code
+move.w ROM_BASE+2,d2 ; Bottom parameter device code
+move.l #$400000,d0
+cmp.w #$89,d1      ; Manufacturer Code
+beq Ret
+cmp.w #$B5,d2      ;  Bottom parameter device code
+beq Ret
+move.l #$800000,d0
+Ret:
+move.w #$5050,(a1) ; Clear Status Register
+move.w #$FFFF,(a1) ; Read Array
+move.l d0,d1
+addi.l #ROM_BASE,d1
+move.l d1,a0
+
+Il faut donc que lorsque la commande 0x9090 est envoy�e � ROM_BASE +
+0x10000,  le manufacturer code retourn� � la lecture de ROM_BASE.w
+soit 0x89 (le bottom parameter device code, $B5 n'a pas besoin d'�tre
+bon puisque le test fait est un OU, mais tu peux l'impl�menter si tu
+veux).
+
+Tu peux avoir plus de d�tail sur ces commandes en lisant la datasheet
+de la FlashROM de la V200, car le m�me type semble �tre utilis� sur la
+Titanium.
+Note que le manufacturer code de la V200 est 0xB0. Je ne connais pas
+son bottom parameter device code.
+
+Il semble y avoir un autre probl�me plus loin dans le code du reset,
+mais comme � chaque que la calc est reset�e je dois rentrer moi-m�me �
+la main les variables de l'AMS mal fix�es � cause du bug pr�c�dent, et
+que TiEmu crash bizarrement parfois lorsque j'appuie sur 'stop' du
+d�bogueur alors que on est en mode 'run', j'ai du mal � voir le
+probl�me. Ce serait plus simple que du fasse un nouveau build avec ce
+premier probl�me corrig�.
+
+Quelques autres remarques :
+
+* La fen�tre Memory n'est pas toujours rafra�chie. Il y a le bouton
+refresh, mais on ne pense pas toujours � l'utiliser. Elle n'est pas
+rafra�chie notamment lorsque un breakpoint est touch�, ce serait
+possible de forcer le rafra�chissement � ce moment l� ?
+
+* Pour le probl�me de scroll d'instructions g�nant dont je te parlais
+: va n'importe o� dans l'AMS o� il y a des instructions valides,
+scroll instruction par instruction vers le bas, tu verras que sur
+certaines instructions le scroll est effectu� en haut, mais pas en bas
+de la fen�tre (la derni�re instruction reste la m�me).
+
+* Quelques id�es pas forc�ment tr�s urgentes mais qui seraient
+int�ressantes � impl�menter :
+- L'AMS utilise le registre a6 comme frame pointer, et acc�de
+relativement � ce registre aux variables locales cr��es et aux
+param�tres de la fonction ex�cut�e.
+Le probl�me est qu'avec des instructions de type cmp.w -$54(a6),d0, on
+voudrait savoir ce qu'il y a � la variable � l'offset $54 : il faut
+alors sortir une calculatrice hexa, calculer l'adresse r�elle et aller
+dans la fen�tre Memory trouver la valeur.
+L'id�al serait d'avoir dans la m�me fen�tre que stack frame, un memory
+dumper qui ressemble � celui de la pile, mais avec les offsets
+relatifs au registre a6 plut�t que des adresses r�elles (offsets
+positifs et n�gatifs pour pouvoir regarder � la fois les variables
+locales et les param�tres de la fonction). Par exemple :
+-6  0084
+-4  5600
+-2  0000
+0   0090
+2   4924
+4   2828
+6   0000
+Il faudrait que la fen�tre puisse �tre scrollable � l'infini dans les
+deux sens, on ne peut pas savoir la quantit� de variables que la
+fonction peut utiliser.
+Si c'est trop compliquer � r�aliser, �crire � c�t� de l'instruction
+l'adresse correspondant � -$54(a6) dans l'exemple pr�c�dent suffirait
+pour pouvoir se d�brouiller, mais serait beaucoup moins bien.
+
+- Un syst�me de breakpoint temporaire sur instruction, comme sous GDB,
+serait pratique (breakpoint qui dispara�t la premi�re fois qu'il est
+touch�) : il m'arrive souvent de placer un breakpoint apr�s un bsr ou
+un jsr de l'AMS avant de faire un step into dans la sous-routine au
+cas o� elle serait trop profonde et que j'abandonne le d�boguage �
+quelques niveaux d'appels plus profond. Je fais un run et mon
+breakpoint est touch�; je l'enl�ve et je continue. Un breakpoint
+temporaire �viterait d'avoir � l'enlever � chaque fois.
+
+++, bonne continuation,
+
+-- Olivier
diff --git a/docs/mails/Olivier Armand/titanium-info.txt b/docs/mails/Olivier Armand/titanium-info.txt
new file mode 100644
index 0000000..f849a21
--- /dev/null
+++ b/docs/mails/Olivier Armand/titanium-info.txt	
@@ -0,0 +1,1029 @@
+=================================================
+== titanium-info.txt==
+
+Notes sur l'AMS 3.00 de la TI-89 Titanium
+- Olivier Armand - ola dot e-ml at wanadoo dot fr
+
+Cr�ation : 8 juin 2004
+Derni�re maj : 30 juin 2004
+
+* Ne pas redistribuer * Do not redistribute *
+=================================================
+
+
+Toutes les adresses sont compt�es avec ROM_BASE � $200000 au lieu de
+$800000 pour plus de facilit�.
+
+========
+Adresses
+========
+
+ROM de 0 � 0x156eb2 inclu -> Comme si allait de 0x212000 � 0x368eB2
+inclus.
+Le boot de la Titanium est � 0x800000. Les certificats sont �
+0x810000, etc...
+
+=======================================================
+Patches effectu�s pour obtenir titanic_patched_orig.rom
+=======================================================
+
+titanic_patched_orig.rom pourra ensuite passer par le patcheur
+automatique patchanic.
+
+- La ROM fait 2Mo : une partie de la m�moire r�serv�e aux Flash Apps /
+  archives est coup�e dans l'image de Samuel (et on lui enl�ve un
+  octet)
+
+- VTI regarde � Boot+5 pour avoir le type de calc (89 ou 92+). Patcher
+en 0x20.b pour qu'il �mule une 92+.
+
+- 0x210000 (0x10000) mis � 0xFFF8 pour �viter d'avoir un Corrupt
+  Certificate Memory au boot. 0x210002.w est mis � 0 pour passer �
+  l'AMS en cas de reset (voir la partie BOOT plus loin). Pour ex�cuter
+  le boot sans passer par l'AMS, mettre quelque chose diff�rent de 0
+  (mais attention, les nouveaux ports i/o le feront boucler
+  ind�finiment dans l'appel � 20041A [qui lance le code principal du
+  boot. Semble ne pas y voir de probl�me si on boot avec vecteur
+  $200100 et d0.l != 0 ??? (param du boot)]
+  Maj : des fois se lance, des fois non... Ou simplement un ini de
+  ports pose probl�me avec l'�cran ?).
+
+- Fonction renvoyant la taille de la RAM renvoie maintenant 256ko (cf
+  commentaire [1]). On patche cette fonction (move.w #$8AA,D0; trap #0)
+  en rempla�ant les deux movea.l #$200000,a3 par #$40000,a3 (il
+  testera ainsi un ghost existant vraiment).
+
+[[[- Pour arriver aux routines cherchant les zones fin AMS/d�but
+Apps/d�but Archives/fin Flash (patch similaire � celui pour la V200) :
+ Au reset, dans la premi�re s�rie des bsr, on rentre dans le dernier �
+ 0x212488
+ On rentre dans le jsr apr�s le trap #A.
+ On rentre dans la fonction 6 du trap #11, on arrive � 0x24D418, c'est
+ ici.]]]
+=> Pas besoin de patch pour Titanium (lecture d'une variable pour
+la fin de la flash sur Titanium, qui est correcte, cf [2])
+
+[[[- Routine � 0x24D6DC plac�e juste apr�s cette fonction du trap #11 qui
+  a pour r�le d'obtenir le d�but de la zone Archive (�quivalent au
+  filtre HW1 / V200) : il reste un filtre HW1 pour les 89 simples
+  s�rement (mais ROM_BASE + $190000, ici $990000 (non patch� par
+  patchanic))
+=> Xpand n'est plus n�cessaire ! Et il n'y rien � patcher.
+
+- Rom Call init_unit_system (303D3CC) : utilise une table d'adresses
+  qui ne fait que 2 adresses... (s�par�es par 4 octets). patchanic ne
+  peut pas fonctionner, on  patche � la main. L'adresse de la table
+  est plac�e sur a2 quatre  instructions plus loin (c'est 30D2C8). 
+
+- Suppression des Flash Apps de l'image de la ROM de Samuel qui
+  semblent faire �crire � $400000 (fonction 7 du trap #11 : nettoyage
+  des apps).
+
+- Une adresse absolue en m�moire au milieu de nul part :( � 2DB766.
+
+- Encore une table de 2 adresses, s�par�es par 4 octets : 34514C.
+
+[[[- Une table de 3 adresses non patch�es. patchanic ne peut pas se
+  permettre de d�tecter des tables de si petites tables, sinon
+  n'importe quoi est patch�. Corrig� � la main : 306C8E (les adresses
+  sont s�par�es chacunes par 4 octets).
+=> maj : patchanic est normalement maintenant capable de les detecter
+  (il y en a plusieurs de ce type).
+
+- Une table de 2 adresses s�par�es par 4 octets, d�crivant les
+  m�thodes d'une Flash App interne (Self Test) : 2245A8.
+  Les adresses des m�thodes de toutes les Flash Apps internes sont ainsi
+  patch�es � la main : on recherche "{S=" (magic number) et on patche
+  les adresses qui se trouvent pas tr�s loin plus bas, juste avant le
+  nom de l'App (sachant que pour la plupart, patchanic fera le
+  travail).
+ TODO Automatiser ceci, c'est faisable.
+
+- Une adresse isol�e pour l'apps de configuration de l'horloge : 3535B2
+
+[[- Des adresses isol�es pour le Var-Link : 35693A, 356946, 356952, 356A1A
+  35696A, 3569B0
+=> maj : patchanic g�re normalement ce patch automatiquement
+
+- Le pointeur de la table des RC qui est un peu isol� du reste :
+  212150
+
+- cmpi.w #$FFF8,ROM_BASE+$10000 du boot : la forme de l'instruction ne
+  peut pas �tre patch�e par patchanic. Il semble n'y avoir cette
+  instruction qu'ici dans la ROM. 2008B0.
+
+- Quelques adresses-variables dans la table des RC qui ne peuvent pas
+  �tre patch�es par patchanic (adresse trop �lev�e) (ce patch n'est
+  pas vraiment indispensable pour l'ex�cution de l'AMS) : RC 43D
+  (FlashMemoryEnd) et RC 43C (?HW1ArchiveMemoryBeginning) : 23D182 et
+  23D186.
+
+- Deux adresses isol�es � DB778 s�par�es de 4 octets.
+
+- Deux adresses isol�es dans le boot : $200100.
+
+Pour detecter des patchs manquants : brktpt avec VTI sur
+800000-A00000. Prendre la premi�re ligne (m�me si la deuxi�me est
+s�lectionn�e).
+
+
+===================================
+Commentaires sur la ROM (num�rot�s)
+===================================
+
+*** !!!Ghost dangereux???!!! Eviter de l'utiliser.
+
+[1] 2123e8: Pour effacer la RAM, au lieu d'avoir une adresse en dure comme
+sur 89 ($3FFF4) pour la fin de la RAM, celle-ci est obtenue avec la
+fonction $22224C [pas une RC] (puis -$C pour avoir l'�quivalent de
+$3FFF4).
+
+ALGO:
+Cette fonction prend une adresse sur la pile (ici NULL), la met dans
+a1 et fait :
+move.w #$8AA,D0; trap #0;
+Le trap #0 dispatch la fonction :
+regparm (a1) = res (pointeur)
+if (res)
+   *res = NULL;
+Si les 1024 premiers octets de la RAM sont �gaux � 0x200000+x, 200000,
+sinon 600000 -> a3.
+*10000 = C5A3C5A3
+....
+-> teste si on peut relire ca apr�s et boucle.
+La boucle fait:
+A0=10000
+A2=0
+D0=10000
+Bcl:
+Test (A0)
+Si pas ok
+   Si A2 = 0
+   A2 = A0
+Si ok
+   Si A2 != 0
+      Si res != NULL
+	*res = A1
+      Quitte
+   Sinon
+      D0+=10000
+A0+=10000
+Bcl tant que A0<A3
+
+BUGS:
+* Si tra�n�e continue de blocs invalides jusqu'� la fin (A3),
+*res = NULL
+Pourquoi attendre un bloc valide pour �crire le r�sultat ?
+
+RESUME:
+long f(*long) : si param != NULL, y �crit l'adresse du plus grand bloc
+de 64ko de la RAM ne fonctionnant pas (ie adresse de fin de la RAM +
+1), ou NULL si toute la RAM disponible (jusqu'� 0x200000 ou 0x600000)
+fonctionne. Si param = NULL, n'�crit rien. Le premier bloc n'est pas test�.
+Retourne la quantit� de RAM disponible, ou la quantit� de RAM de
+l'adresse 0 au premier bloc de RAM ne fonctionnant pas (non inclus).
+La RAM va de 0 � 200000 (avec un reflet � 400000), ou de 0 � 6000000
+(vraiment ?) s'il n'y a pas de reflet.
+Bizarre, surtout le fait d'attendre un bloc valide (un reflet par
+exemple), cf BUGS...
+
+APPELS:
+au boot de l'AMS (2123e8) avec un param�tre NULL. Le r�sultat (d0) est
+stock� dans une variable interne � l'AMS (5B2C). Cette variable est
+utilis�e plusieurs fois, entre autres :
+- pour calculer le checksum de la RAM par le trap #4
+- � 2DB46e, dans la fonction 2DB3C0, pour "Ram size" de la commande
+getconfg(). Une petite fonction l'appel avec un param�tre NULL (2124e2).
+Celle-ci est uniquement appel�e � 251AD4, dans la fonction commen�ant
+� 25195e, dessinant la fen�tre Mem. Un appel � une fonction
+�quivalente �xiste sur TI89, mais celle-ci retourne directement 0x40000.
+
+Le boot semble utiliser 256ko de RAM uniquement (cf 0x2004A8)
+
+VTI:
+Retourne 0x200000 � cause de l'�mulation du ghost space (tous les
+blocs semblent valides), et tout sera effac� (et donc m�me la table
+des vecteurs !) -> patch�.
+
+HACK:
+Faire retourner une valeur inf�rieure � la fonction semble �tre
+possible et ne pas g�ner ensuite l'AMS. Ceci permettrait de se reserver
+de la RAM � la fin de celle-ci, qui ne sera jamais touch�e par l'AMS.
+Il suffit de sauter de sauter apr�s l'appel de la fonction, ou de
+hooker le trap #0 si �a aide.
+
+
+---------------------------
+
+*** !!!Attention � l'ancien FlashMemoryEnd qui ne sera plus valide.
+
+[2] 0x21246C : appel au reset de la fonction � 213028. La fonction
+n'est pas une RC.
+Elle appel la fonction $14 du trap #11 (nouvelle fonction).
+Copie une fonction en RAM. Les commandes pour la FlashROM semblent
+�tre les m�mes que celles pour la V200 (Sharp LH28F320BFHE-PBTLZ2), et
+sont aussi compatibles avec les 89/92+.
+Cf page 7 de la datasheet de la Flash de la V200.
+
+ALGO: (en ROM � 21303A)
+
+lea CertMem,a1 ; Any valid address within the device (= the Flash
+		 EEPROM chip)
+               ; Sur TI, semble devoir �tre CertMem absolument (?)
+		 [m�me chose sur V200]
+move.w #$9090,(a1) ; Read Identifier Codes
+move.w ROM_BASE,d1 ; Identifier code address + 0 -> Manufacturer Code
+move.w ROM_BASE+2,d2 ; Bottom parameter device code
+move.l #$400000,d0
+cmp.w #$89,d1      ; Manufacturer Code (celui de la V200 est $B0)
+beq Ret
+cmp.w #$B5,d2      ;  Bottom parameter device code
+beq Ret
+move.l #$800000,d0
+Ret:
+move.w #$5050,(a1) ; Clear Status Register
+move.w #$FFFF,(a1) ; Read Array
+move.l d0,d1
+addi.l #ROM_BASE,d1
+move.l d1,a0
+quit
+
+Bottom parameter device (cf p.16 de la datasheet et sh�ma p.6) : en
+configuration bottom parameter pour le partitionnement, le plane de
+param�tres est � l'adresse la plus basse de la puce.
+
+Code fait : si FlashROM pas reconnue (ni manufacturer code, ni device
+code), retourne ROM_BASE + ROM_BASE, sinon retourne ROM_BASE + 400000
+(ce doit �tre le cas sur les Titanium actuelles).
+
+RESUME:
+trap #11:$14 retourne dans a0 FlashMemoryEnd, et dans d0.l
+FlashMemorySize, calcul�s dynamiquement en fonction de la puce.
+Certains mod�les pourraient donc avoir 8Mo de Flash au lieu de 4Mo ?
+Ou permet simplement d'�tre compatible avec la TI89 (mais le fait que
+ROM_BASE + ROM_BASE tombe bien comme il faut sur 92+ semble un peut
+bizarre...)
+Attention, la variable-ROM Call FlashMemoryEnd qui existait d�j� est
+elle fixe : ROM_BASE + $400000.
+d0 est stock� au reset dans une variable interne ($5B1A). Il est aussi
+shift� � droite de 16 bits et stock� dans $5B1E. Cette derni�re
+variable ne semble jamais utilis�e par l'AMS. Elle n'est accessible
+via la table des RC.
+a0 est stock� la variable interne $5B28. Elle est retourn�e par la
+nouvelle ROM Call (607) (voir commentaire [9]). La variable est
+utilis�e un peu partout, notamment lors des �critures en FlashROM.
+
+APPELS:
+appel au reset (c'est son seul appel, pour �viter trop de d�protection
+de flash inutile). La fonction n'est pas une RC.
+
+VTI:
+Renvoie une taille de $200000 et une FlashMemoryEnd � $400000, ce qui
+convient. Pas besoin de patcher.
+
+HACK:
+Pourrait �tre hack� de la m�me mani�re que le calcul dynamique de la
+taille de la RAM, par un saut apr�s l'appel ou en hookant le trap #11.
+Un test rapide a �t� fait en faisant retourner a0 (FlashMemoryEnd) =
+$380000 et d0 (FlashMemorySize) = $1800000 : getconfg() retourne une
+taille de m�moire archive de 0, et le menu Mem un taille de 64ko (le
+bloc pour la garbage collection) , ce qui est correct.
+
+
+---------------------------
+
+[3] Les Flash Apps risquent de commencer � $360000 au lieu de $340000 sur
+TI89 AMS 3.00 si jamais il sort, �tant donn� sa taille (routine de
+calcul des diff�rentes zones : 24D476).
+
+[4] Message affich� � la pr�paration des Flash Apps (Installation in
+progress... Do not interrupt!). (la barre charge � l'appel � $2DC434).
+
+[5] Un test au reset fait afficher : USB: device not responding
+Le Desktop est activ� automatiquement comme sur V200.
+Ic�ne Window Editor du Desktop un peu modifi�e.
+Quelques cha�nes ajout�es ou modifi�es :
+-LINK TRANSMISSION ACTIVE: ON KEY ABORTS TRANSFER
++I/O ACTIVE: ON KEY ABORTS TRANSFER
+-RECEIVED: 
++I/O: RECEIVED 
+-SENDING: 
++I/O: SENDING 
+-TI-89
++TI-89 Titanium
++USB: SENDING 
++VAR[,PORT]
++USB ACTIVE: ON KEY ABORTS TRANSFER
++USB: RECEIVED 
++USB: Searching for device�
++USB: Device Not Supported
++USB: Device Not Responding
++ is archived!
++Are you sure?
+R�ception de donn�es : affiche "I/O: RECEIVED main\data" pour le port
+  non-USB (Avant, n'affichait rien).
+Suppression d'une variable archiv�e avec backspace depuis le Var-Link
+  maintenant possible : affiche une bo�te de dialogue "main\data is
+  archived! Are you sure?"
+
+[6] "Installation in progress" et "Do not interrupt!" affich�s � la
+pr�paration des FlashApps ne sont pas sous forme de cha�nes dans l'AMS.
+Est une image ?!
+
+[7] Vti de JM ne permet plus de faire de Set program entry breakpoint. 
+
+[8] Xpand ne semble plus n�cessaire, cf les patches appliqu�s.
+
+[9] Une partie des ROM Calls ajout�es avec l'AMS 2.07 n'existent plus
+: readHandshake, writeHandshake, startBPTimer, stopBPTimer (auraient
+pu �tre utilis�es pour un protocole de communication). Un appel �
+elles lance un ER_ROM_ROUTINE_NOT_AVAILABLE avec un dc.w $A36B (elles
+pointent toutes vers ce dc.w).
+La m�me fonction que pour OSVRegisterTimer, OSVFreeTimer, qui
+n'existent plus depuis AMS 2.04, est utilis�e (et ce sont peut-�tre
+les seules utilisations de la fonction et du message d'erreur).
+
+*** !!! Ne plus utiliser l'ancienne ROM Call FlashMemoryEnd qui
+    pourrait retourner un r�sultat faux ?
+[10] Apparition d'une seule nouvelle ROM Call : ROM_CALL_607.
+Elle retourne dans a0 FlashMemoryEnd calcul� dynamiquement par le code
+du reset � l'aide de la fonction $14 du trap #11 (voir commentaire
+[2]).
+
+[11] Bhuvanesh : GetCalc/SendCalc have the port number as an optional
+argument. If not specified or if it is zero, GetCalc will listen to
+both ports, and SendCalc will use USB if there is a non-TI89 on USB,
+otherwise it will use DBus.
+AB_getGateArrayVersion() returns 3. I checked with Command Post Plus,
+and hardwareRevision=2 and gateArray=3.
+Et hardwareID = 9.
+
+[12] Le mauvais fixage du masque de protection d'ex�cution en RAM par
+le trap #4 existe toujours (mauvaise adresse sur usp). Correction
+n�cessaire par hw3patch.
+La seule diff�rence dans trap #11:$F (calcul du masque de protection
+d'ex�cution en RAM) est un d�blocage de 16 blocs de 4ko au lieu de 6.
+
+
+---------------------------
+
+========
+trap #11
+========
+
+D�protection :
+- ori.b #1,$5B35 apr�s le deuxi�me d0,(a0)
+- Plus de bclr/bset � $600015. Ne sera pas compatible avec la HW1 ?
+(pourtant le filtre HW1 de la m�moire archive existe encore, cf patches
+appliqu�s). Le boot les a toujours par contre, lui. Le reset ne les a
+plus.
+
+A propos de $5B35
+-----------------
+
+Ceci est valable m�me pour les anciennes versions d'AMS (pas regard�
+lesquelles exactement).
+
+Au reset, apr�s initialisation de quelques ports, � $212318 : test
+$5B04.l pour un mot de passe ($F0A5960F). Si c'est le bon *ET*
+(nouveau test sp�cifique � l'AMS 3.00) si $5B35 est nul (d�t�ction
+du trap #11 qui �tait en cours d'ex�cution) , ex�cute un bout de code
+situ� pr�s de celui de l'AI6 ($22201C). Sinon test le mot de passe
+invers� (not) ($F5A69F0). Si c'est le bon, une routine du trap #4 qui
+est appel�e ($221CCE), qui permet de r�veiller la calc (le trap #4 est
+repris en route, d�tection d'un reboot pendant que la calc est �teinte
+par l'enl�vement d'une pile, le boot permet de faire �a, voir partie
+BOOT). La valeur de a7 est r�cup�r�e d'une variable ($5B00).
+
+L'AI6 teste aussi le mot de passe en regardant s'il correspond trap
+#4 pr�c�demment ($F5A69F0). Sinon, il l'efface. Il lit un octet �
+$5B30 (valeur du contraste) et le stocke. Puis il teste les piles
+(3,4V). Si elles sont bonnes, il continue son ex�cution normale
+[222060] (teste la combinaison du reset et reset si besoin, et fixe la
+valeur du constraste � celle dans la variable $5B30, � l'aide de la
+sous-routine de OSContrastDn et Up [appel � 2220B0] ).
+Si les piles ne sont pas bonnes, efface le bit 2 de $600015, fixe la
+waitstate ($600003) � $CD. Si le mot de passe n'est _pas_ $F5A69F0
+(celui pour le trap #4), il met usp dans la pile et stocke a7 dans
+$5B00 (m�me variable que la lecture au reset), puis il �crit comme mot
+de passe $F0A5960F (permettra de revenir dans l'AI6 apr�s
+reboot). Puis dans les 2 cas, il attend un peu. Si le mot de passe est
+$F5A69F0 (celui pour le trap #4), il finit l'AI6 en fixant le niveau du
+contraste (cf plus haut). Sinon il efface le mot de passe, arme
+$600015:2 (AI3), refixe la valeur de usp en la lisant de la pile (cf la
+sauvegarde plus haut quand le mdp n'�tait pas $F5A69F0), et fini l'AI6
+en testant la combo de touches pour le reset et en fixant le contraste.
+
+La routine de l'AI6 appel�e par le boot lors d'une d�tection du mot de
+passe $F0A5960F appelle une s�rie de fonction qui :
+- Initialise plusieurs ports et variables (m�me sous routine que le
+  reset dans sa s�rie de bsr � $21249A, le 3�me ici)
+- OSLinkReset
+- bsr � une sous-routine intialisant beaucoup de nouveaux ports et des
+  variables s�rement li�es � ces ports i/o. ($222026 -> 3479EA). Ce
+  bsr n'est pr�sent que sur Titanium.
+- Iinitalise des variables, et fait un OSRegisterTimer pour le timer 7.
+- Initialise encore des variables avec la RC 473 (OSqclear, OSOnBreak,
+  ...)
+- OSRegisterTimer(APD)
+- trap #11:$10 (mise-�-jour de la protection d'execution en m�moire
+  archive)
+- Appel le trap #11:$F (Changement du masque de protection d'ex�cution
+en RAM) � l'aide de la fonction $212D28, en lui donnant en param�tre
+l'adresse permettant de d�finir la fen�tre d'ex�cution (lue �
+$5B0E). Il s'arrange avant l'appel pour mettre l'adresse � $14 + usp,
+mais ceci est inutile ? Par contre le fait de fixer ssp = usp + $14
+fait qu'apr�s l'appel, usp + $10 pointe sur l'adresse de retour qui
+est bien dans l'AMS, donc  trap #11:$F fera bien son boulot.
+
+Puis il refixe la valeur de usp en la lisant de la pile (cf la
+sauvegarde plus haut quand le mdp n'�tait pas $F5A69F0), et fini l'AI6
+en testant la combo de touches pour le reset et en fixant le
+contraste. (m�me fin que plus haut).
+
+Le trap #4 met le mot de passe ($5B04) � $F5A69F0 avant d'avoir �teint
+la calc ($221C0E). Il le mettra � 0 avant de quitter.
+
+RESUME:
+AI6 :
+ Si mdp = $F5... (trap #4 en cours d'ex�cution), et si les piles sont
+ faibles, attend un peu, continue normalement. S'il y a des piles, ne
+ teste pas la combinaison de touches de reset.
+ Si mdp est autre chose, et si les piles sont faibles, stocke le
+ contexte en RAM (ssp+usp), fixe le mdp � $F0... ('AI6 en cours'), et
+ attend un peu. Puis efface le mdp, et continue normalement. 'AI6 en
+ cours' ne correspond donc qu'� cette boucle d'attente, et � des piles
+ faibles.
+trap #4 :
+ Fixe le mdp � $F5... (trap #4 en cours) et l'efface � la
+ fin.
+reset :
+ Si mdp est 'trap #4 en cours', saute � lui pour que la calc se
+ rallume et qu'il finisse normalement.
+ Si mdp est 'AI6 en cours', et sur AMS 3.00 si le trap #11 n'est pas
+ 'en cours' saute � lui pour qu'il r�initialise  plusieurs variables
+ et ports i/o et finisse son ex�cution  normalement.
+
+TODO
+A quoi sert l'AI6 ? trap #11 peut �tre en cours ?
+Contraste : remis si enl�vement de pile sans avoir �t� �teint
+seulement. AI6 ex�cut� dans ce cas ?
+Hook : si on appelle pas l'ancien AI6, la calc ne veut pas �tre
+allum�e (Manque acknowledge ?). Puis si on enl�ve une pile, se rallume
+(et contraste pas bon).
+Enlever une pile sans �teindre sans l'AI6 d'origine provoque le reset
+(d� � h220xtsr apparamment).
+Toute infos sur tout �a est bienvenue.
+
+HACK (non test�):
+R�alisable pour beaucoup d'AMS s�rement, et pour tous les mod�les.
+Le syst�me de mot de passe permet d'ex�cuter du code tr�s t�t au
+reset. Si on fait passer par l'AI6, la protection d'ex�cution en RAM
+est normalement r�initialis�e comme il faut (ghost space par
+exemple). Le hook sera appel� au rte (on place son adresse sur la
+pile). Pour la Titanium, on peut avant de lancer le reset modifier la
+variable interne $5B0E pour que l'ex�cution du trap #11:$F par l'AI6
+d�bloque l'ex�cution en RAM dans le bloc ou se trouve le TSR. Ou alors
+on utilise un hw3patch.
+Le code est appel� seulement apr�s une 20aine d'instruction du reset,
+qui initialisent des ports i/o (tests des mdp � $212318).
+Prendre garde � l'effacement complet de la RAM qui suit
+encore plus loin.
+Aucune id�e si �a a un quelconque inter�t.
+
+
+$5B35 (suite)
+-------------
+
+Il est initialis� � z�ro au reset, et entre autres par
+EV_centralDispatcher et le r�veil de la calc du trap #4.
+
+Son bit 0 est arm� au d�but du trap #11 et d�sarm� � la fin. Il
+permet de d�tecter que le trap #11 est en cours et �viter une
+r�cup�ration du contexte par le code du reset.
+
+Le bit 1 de $5B35 semble �tre arm� lorsque le port USB est actif (via
+la commande TI-Basic sendcalc ou par l'envoi via le var-link). Aucune
+id�e pour la r�ception de donn�es.
+Quel est l'inter�t de ce bit, puisqu'il n'y a jamais de btst dessus ?
+
+Les autres bits ne semblent pas �tre utilis�s.
+
+---------------------------
+
+trap #11 : $13
+==============
+
+Pas de fonction associ�e. Jamais utilis�.
+Ne fait qu'un rts !
+
+trap #11 : $14
+==============
+
+Cf commentaire [2].
+
+trap #11 : $15
+==============
+Fonction � 212C8E
+Param : d4.l, d5.w
+Appels : 34E698, 3510C2
+Code � 24C4A6
+
+(d3.l d6.w)
+Affiche USB Active etc.
+Lecture de certificats...
+...
+Semble utiliser toujours les m�mes routines.
+Msg Link transfer Complet ou link transmission error.
+
+Appel � 34E698 : gestion du link ? Un peu avant, une dialog demande si
+overwrite ou skip.
+Quelque chose � avoir avec les Flash Apps : entour� de Ev_currentApp,
+Ev_getAppID, OO_getAppAttr, OO_appMarkDelete (ex�cut� si oui � la
+dialog), ROM CALL 424 qui appelle OO_DeleteMarkedApps (34E682),
+FL_addCert, ...
+
+Presque pareil pour le deuxi�me appel (autour se ressemble beaucoup !)
+Pas le temps de regarder plus en d�tail.
+
+trap #11 : $16
+==============
+
+Fonction � 212DC2
+Param : void - Retourne : bool ?
+Appels : 34B330
+Code : 34B39E
+
+Lecture de certificats, peut-�tre de l'�criture...
+Pas le temps de regarder plus en d�tail.
+
+
+---------------------------
+
+====
+BOOT
+====
+
+Ce qui suit n'est pas sp�cifique � la Titanium.
+Apr�s plusieurs tests (pile, d�protection) et initialisation de ports
+i/o, test � $200272 si (CertMem + 2).w est nul. Si oui, et si le
+premier mot de l'AMS (ROM_BASE + $12000).w est non nul, l'adresse du
+reset de l'AMS est cherch�e et l'AMS est boot�e. La RAM n'a pas �t�
+modifi�e jusqu'� maintenant, et en cas de pile enlev�e pendant un trap
+#4, ceci peut �tre r�cup�r� (voir "A propos de $5B35" dans la partie
+sur le trap #11.
+Si un des deux tests �choue, le boot continue son initialisation pour
+arriver finalement � l'�cran d'envoi d'AMS si tout s'est bien
+pass�. [le test des combo Apps+On et peut-�tre '(-)' ')' + On doivent
+se trouver s�rement avant ces 2 tests].
+L'ancienne version de VTI remplace toujours CertMem par quelques
+dizaines d'octets de certificat cod� en dur de VTI, avec CertMem.w =
+$FFF8 et CertMem+2.w nul -> le boot passe tout de suite la main �
+l'AMS.
+Dans la version de JM, les certificats sont ceux du .rom. Il est donc
+n�cessaire de patcher CertMem + 2 en le mettant � nul pour qu'un
+'reset' de VTI lance tout de suite l'AMS.
+
+Ce qui suit est sp�cifique � la Titanium.
+Si on met quelque chose diff�rent de nul, le boot bouclera un moment
+dans le vide, � cause des nouveaux ports i/o que VTI ne fait pas
+r�agir correctement.
+
+Le boot comporte maintenant quelques 'rts', plut�t qu'un 4E75 cr��
+dynamiquement avant d'�tre ex�cut�.
+
+Les �critures en RAM 'move.w a0,$4400' sem�es un peu partout dans le
+code ont maintenant disparu du boot.
+
+
+=========
+Ports I/O
+=========
+
+Nouveaux � $7100XX, qui n'est maintenant plus un reflet de $7000xx.
+
+ini par l'AI6
+ini boot / reset
+Routines � 2051F4 - 347160 - 347640
+sous-routines reset ?
+Beaucoup d'utilisations dans le boot code :
+Dans l'ordre d'apparition (adresses croissantes)
+$81, $80, $4C, $39, $54, $31, $8B, $2F, $8F, $4D, $87, $29,
+$5A, $5B, $4A, $4B, $55, $57, $56, $22, $24, $26, $8E, $89, $27,
+$91, $94, $34, $A0, $2E, $96, $93, $9A, $9B, $95, $90, $98, $99, $92,
+$97
+
+Dans l'ordre (40 ports, tous en .b) :
+$22, $24, $26, $27, $29, $2E, $2F, $31, $34, $39, $4A, $4B, $4C, $4D,
+$54, $55, $56, $57, $5A, $5B, $80, $81, $87, $89, $8B, $8E, $8F, $90,
+$91, $92, $93, $94, $95, $96, $97, $98, $99, $9A, $9B, $A0.
+
+Avec les ports de l'horloge (cf plus loin) (pr�c�d�s par #) :
+$22, $24, $26, $27, $29, $2E, $2F, $31, $34, $39, #40.l, #44 #45,
+#46.l, $4A, $4B, $4C, $4D, $54, $55, $56, $57, $5A, $5B, #5F, $80,
+$81, $87, $89, $8B, $8E, $8F, $90, $91, $92, $93, $94, $95, $96, $97,
+$98, $99, $9A, $9B, $A0.
+
+Les ports qui suivent $A0 doivent aussi �tre utilis�s, mais jusqu'o� ?
+(cf 207136 ou $349212 (m�me bout de code en plus peut-�tre))
+
+Tr�s proche des ports trouv�s par Dan Englender pour la TI-84+ (cf
+http://www.detachedsolutions.com/forum/viewtopic.php?t=1759). Serait
+donc peut-�tre le m�me HW (voir commentaire plus loin).
+J'ai �crit � Dan, il n'a pas plus d'infos pour l'instant.
+
+Les ports de Dan Englender manquant dans cette liste :
+$49, $4F
+Les ports que Dan ne cite pas : particuli�rement de $22 � $39.
+
+Les ports dans cette zone non cit�s ci-dessus ne semblent pas �tre
+utilis�s (du moins pas par adressage directe, peut-�tre que des (a0)+
+sont utilis�s, etc.).
+
+-----------------------------
+
+=======
+Horloge
+=======
+
+[[ maj - r�sum� : l'horloge est maintenant enti�rement g�r�e de fa�on
+HW, afin de laisser l'auto-int3 libre pour l'USB.
+
+[[Desktop : commentaires pour la d�couverte des ports, maintenant
+inutile.
+---------
+
+AMS: un table � 345164?
+[[ maj : table contenant les adresses des nouveaux ports de l'horloge 
+
+La premi�re adresse de la table ($71005F) est
+lue par le Desktop � l'arrive de EV_NULL ($341EFC, premi�re
+sous-fonction). Le bit 0 est test�.[maj : IsClockOn!] S'il est non
+nul, le reste de la table est utilis� (345204, dans la sous-fonction
+3451D2)
+[maj] commentaire d�plac� dans OneSecondTimerGet plus bas.
+A l'appel (341FC4) : _du32u32(d0.l=60, d1.l=f()) : -> f() / 60,
+r�sultat dans d1.l.
+Si *($8324 + $BE) = d1.l -> quitte.
+Sinon...
+Au final, affichage de l'heure !
+
+--- ---- --- --- -- --- --- ---- -- ---
+Utilisation de la m�me table pour toutes les fonctions de l'horloge.
+
+
+IsClockOn
+---------
+Retourne $71005F:0
+
+ClockOn
+-------
+bset $710005F:0
+Si on avait avant le bset !IsClockOn, appelle
+OneSecondTimerSet($5BB0 (ie OneSecondTimer), 0.w)
+Dans tous les cas, $5BBE = 1. (indique ClockOn)
+
+[Sur AMS 2.09 : Si pas HW1, bset 2,$600015; rts]
+
+Ports relatifs � l'horloge :
+$40.l (�crire), $44, $45, $46.l, $5F:0
+
+Toute cette gestion de l'horloge ne semble pas �tre faite par le boot.
+
+ClockOff
+--------
+
+Appel 3451D2 (getOneSecondTimer(pt_bidon))
+Stocke le retour (d0) dans $5BB0. Puis bclr $5F:0 et clr.w $5BBE
+(indique ClockOff).
+
+AI3
+---
+
+N'est plus utilis� pour l'horloge, mais pour le port USB (d�clench� �
+son utilisation d'apr�s le test que j'ai fait faire � Samuel). Utilise
+des ports i/o de l'USB, et fait des TimerRestart (pas trop le temps de
+regarder).
+-> maintenant utilis�e comme interruption pour le traitement de
+l'USB.
+Le boot a maintenant tendance � avoir SR=$2200 plut�t que $2300 �
+cause de �a.
+
+Trap #4
+-------
+
+clr.w $600014 avant d'�teindre sur AMS 3, dans tous les cas (plus de
+traitement avec l'AI3 comme sur la famille AMS 2.07).
+Toute la gestion de l'AI3 qui r�veille la calc a �t� supprim�e, et le
+port $600014 est �crit directement avec les valeurs plut�t que d'avoir
+les valeurs calcul�es en fonction de l'�tat de l'horloge.
+
+Seules diff�rences apparentes : 2 nouvelles sous-routines appel�es
+tout � la fin (221D9E).
+1�re :
+Si 5BBE.w && !IsClockOn
+  $5BB0.l (OneSecondTimer ?) = 0
+  ClockOn
+
+2�me :
+Relatif au link USB s�rement.
+wait $1DE84 *n cycles
+Si $71004D:6 == 1
+  Si $8410.b == $B0
+    appel � une routine cmplexe utilisant $710039 (34781E)
+    quitte
+  sinon
+    quitte
+  Si $8410.b == $A0
+   $8411.b = 2
+quitte
+
+Reset
+-----
+
+Routine de r�initialisation de l'horloge (23A3F2) (premi�re
+utilisation des nouveaux ports).
+
+Sur AMS 2.07 on avait :
+<<Au reset, l'AMS v�rifie si une variable interne (un long mot) proche
+de la variable TimeFormat contient toujours un certain magic number
+(0x2AAAAAAA). Si c'est le cas, alors l'AMS consid�re que la variable
+DateFormat n'a pas �t� corrompue, et qu'il peut utiliser la valeur
+qu'elle contient sans avoir besoin de l'initialiser.
+Ceci permet � l'AMS de retrouver le format de date utilis� avant le
+reset, pour que l'utilisateur n'ait pas � re-r�gler ce format.
+Si le contenu de la variable de v�rification ne correspond pas au
+magic number, DateFormat est initialis�e � 1. Si le contenu de la
+variable de v�rification ne correspond pas au magic number, TimeFormat
+est initialis�e � 12.>>
+
+Sur HW3 (vu dans cette routine d'initialisation, avec la doc sur la
+V200 / AMS 2.08) :
+TimeFormat = 5BB6.b
+DateFormat = 5BB7.b
+TimeZone = 5BB4.w
+5BBE.w ?
+Magic pour la r�cup�ration : 5BB8.l
+OneSecondTimer = 5BB0.l (5C06 sur TI-89 AMS 2.09)
+
+Le reset fait:
+Si magic ok, appel 345340 et quitte
+345340 (nouvelle sur AMS3):
+ Si 5BBE.w != 0 && !IsClockOn
+  5BB0.l = 0
+  ClockOn
+
+Si magic pas ok:
+Clockoff(); ClockOn();
+Appel OneSecondTimerSet(NewValue.l = 0, 0.w)
+Fixe les formats + TimeZone
+fixe magic et quitte
+
+ClockOn est r�alis� par cette fonction d'initialisation plut�t que
+s�paremment (sur AMS 2.09, il �tait � la fin du 2�me bsr de la s�rie
+des bsr du reset [appel � la sous-fonction qui est le corps de
+ClockOn]).
+
+Tous les acc�s � OneSecondTimer sont maintenant remplac�s par (cf plus
+bas) :
+3451D2: long OneSecondTimerGet (char *res)
+345290 OneSecondTimerSet(NewValue.l, 0.w)
+
+
+
+
+void OneSecondTimerSet (newValue.l, mmm.w)
+---------------------
+
+� 345290
+OneSecondTimer($5BB0) = newValue
+Quitte si !IsClockOn
+$710040.l = newValue
+if (mmm.b < 16)
+ tmp = mmm.b
+else
+ tmp = 0
+$710044 = tmp
+bclr #1,$710005F puis bset
+
+long GetOneSecondTimer (char *res)
+-----------------
+
+� 3451D2
+
+if !IsClockOn
+ *res = 0
+ return OneSecondTimer ($5BB0)
+
+
+ $46 est lu, $47 (avec 1(a0), etc... !), $48 et $49 et plac�s
+c�te � c�te. Puis $45 est lu.
+ (en fait les ports ne sont lus qu'une fois � chaque boucle)
+  tmp = 0
+  tmp2 = 0
+  while ($46.l != tmp || $45.b != tmp2)
+     tmp = $46.l
+  *res = $45.b
+  return $46.l
+
+--------------------
+
+
+Initialisation de ports par le 2�me bsr de la s�rie du reset
+============================================================
+Code � 222264.
+
+A propos de $600000 (toute version d'AMS) et de la valeur initiale du
+contraste (nouvelle valeur sp�ciale pour Titanium).
+
+($5B30 est l'�quivalent du $5B98 sur V200 2.09, valeur du constraste)
+(d1.b : $5D18, d0.b 5B30)
+Si HW1
+ $10 -> d0 #E maintenant !
+ F -> d1
+Si HW2
+ 20 -> d0
+ 1F -> d1
+Si $5B19 != 0 ; toujours vrai sur HW1 ! cf 'reset' plus bas
+  avant ------
+   $A -> D0
+  nouveau -----
+  Si HARDWARE_PARM_BLOCK.hardwareID == 9 (Titanium)
+   $D -> D0
+  Sinon
+   D0 /= 2
+  Fin nouveau ------
+Sinon
+ #$80.b->$600000 (?)
+$5B30 = d0.b (valeur du contraste)
+OSContrastUp pour la fixer r�ellement.
+
+Et dans OSContrastUp ou Dn :
+Si $5B19 = 0
+  Si nouvelle valeur contraste % 2 ? bset : bclr  #5,$600000
+
+Et au tout d�but du reset :
+Si pas HW1
+  $5B19 = $FF
+Sinon
+  600018.w = $FFFF (~2.9V)
+  $600000.b = $80
+  wait
+  $5B18.b = $1F ; contraste max (cf $60001D)
+  btst #2,$600000
+   seq d0 (clr si batt level is above)
+  move.b #$FF,5B19
+ ; puis d0 pas utilis� !
+  beq ContinueReset ; jamais vrai ! (aurait du �tre avant l'instruction
+                    ; pr�c�dente ?)
+  bclr #7,$600000
+  bclr #4,$5B18 ;  contraste max - donc toujours fais sur HW1
+                ;  -> $5B18=$F
+
+TODO
+Pas tr�s clair, toute info est la bienvenue.
+
+
+Autres ports
+============
+
+$71004D
+-------
+
+USB: Searching for device... pour envoi � partir du var-link � 34A1A8
+La plupart des ROM Calls semblent fonctionner avec les anciens ports
+i/o � $6000xx (LinkTxQueueActive, OSLinkReset, OSLinkClose, ...)
+Regarder toutes les RC de link.h. (utilisation en m�me temps que
+5B35:1). Par exemple 349E58, 34A284, 34B868, et encore quelques
+routines apr�s ces adresses (search).
+  et trap #4 : 347664, 347160
+Envoi des donn�es par bloc ? (il y a des memcpy dans trap #11 : $15)
+
+$71005A
+-------
+
+A EV_getc.
+
+
+==============================
+Infos sur USB de Dan Englender
+==============================
+
+Horloge
+-------
+
+"bit 6, iy+3Fh controls whether the clock is on or off (regarding the
+OS setting, not the hardware setting)."
+$5F:0 semble �tre l'�quivalent ?
+
+"To set the clock, set the values you want into ports 41h through 44h,
+and then output 01h to port 40h, followed by 03h to port
+40h. Outputting values directly to ports 45h through 48h has no
+effect."
+41h->44h = $40.l?
+Mais ne ressemble pas trop (cf OneSecondTimerSet qui est plus
+compliqu�).
+
+USB
+---
+
+<<The following ports seemed to be obviously related to the USB
+because their values changed when I plugged in the cable: 49h, 4Ah,
+4Ch, 4Dh, 4Fh, 54h, 57h, 5Bh, 80h, 81h, 87h, 89h, 8Bh, and A0h through
+AFh.
+Additionally, the following ports seemed related to USB because they
+were accessed in what I think is link code: 8Eh, 8Fh, 90h, 91h, 92h,
+93h, 94h, 98h, 9Ah.>>
+
+M�me ports aux m�mes adresses ! (encore un peu plus m�me)
+Mais il y a des ports de $22 � $39 que Dan ne cite pas...
+
+
+------------------------
+
+---------------------------
+
+TESTS
+=====
+
+SIDE, ID et BomberMaze68k semblent fonctionner (sans compter la
+protection d'ex�cution).
+
+
+---------------------------
+
+BUGS
+====
+
+Ils sont dus � de mauvais patches par patchanic. Pas vraiment le temps
+de les corriger, et ils ne g�nent pas trop pour l'instant.
+
+Menu F5 du var-link compl�tement bugg�.
+Pareil pour Menu F6 ligne 1 de Home.
+Dans catalog, au milieu des C : all rights reserved, etc... (~8
+symboles pas bon). Et les commandes clrdraw, clrhome, etc. ont
+disparues et ne r�pondent pas dans l'home. (s�rement un patch de donn�es
+des commandes... TODO : voir ou ca se trouve).
+Sendcalc variableexistantpas fait une link transmission error...
+Pas d'horloge ? (car le bit sur $6000xx ne tiens pas ?)
+Commande sur la clock dans home par reconnue : par exemple ClockOn
+
+---
+
+Boot : boucle bizarrement. + probl�me de check de battery d'apr�s Samuel ?
+port lu � 2060E8 pose probl�me ?
+
+trap 11 : 7 et $D ne fonctionnement pas. Seulement $D toujours ex�cut�
+m�me sans Flash Apps.
+
+-------------------
+
+
+=====
+TODO
+=====
+
+Nouvelle combo != APPS+ON pour recevoir l'AMS via l'USB, comme sur
+  84P? (apparemment non)
+Changements au niveau de l'�cran ? (la valeur initiale du contraste
+  n'est plus la m�me).
+Comment envoyer via le port USB (ROM CALL sendcalc() passe par
+l'ancien) ?
+Bug du reset ne prot�geant pas correctement la m�moire archive en
+ex�cution corrig� ?
+M�me stealth i/o ports ?
+Protection du boot comme sur V200 ?
+Chercher msg USB Device...
+  +USB: Searching for device�
+  +USB: Device Not Supported
+  +USB: Device Not Responding 
+  et quand 'not supported'. Regarde AI4.
+  Pourrait �tre interessant de d�tailler son protocole/fonctionnement
+  pour dialogue avec un p�riph�rique externe ?
+Regarder ports io (boot + trap #11 + AMS)
+Samuel : changement dans le fonctionnement des piles ?
+Nouvelles Fonctions du trap #11, comprendre
+Tenter un programme de diff d'AMS ?
+Trouver une utilit� pour les hooks des limites de RAM et ROM.
+222300 : mais #$80,$600000 dans un cas alors que j89hw dit toujours 0
+  (sur ancien AMS aussi). bug de Lionel ?
+Automatiser le patch des m�thodes des Flash Apps (cf partie patches).
+Comprendre trap #11 : $15/$16
+voir utilisations mdp / $5B35 ailleurs encore.
+�criture de 4 octets dans port clock possible, ou octet par octet
+  n�cessaire comme le fait l'AMS ?
+Comprendre "Initialisation de ports par le 2�me bsr"
+Ports de $22 � $39 que Dan ne cite pas, pas USB ?
+Chercher ports $7100XX dans AMS, pas d�j� list�s. 
+AI3 : code
+Routines autour de ClockOn, etc.
+Ports Nouveaux, diff�rents � $7000xx ? Comparer toutes les ini des
+  anciens ports par le reset.
+
+Demander Samuel / Buvhanesh
+===========================
+
+Qui a-t-il � la place du ghost space de la RAM ?
+
+
+End Of File
diff --git a/docs/ti_hw/fargo/Convert.txt b/docs/ti_hw/fargo/Convert.txt
new file mode 100644
index 0000000..2893ed5
--- /dev/null
+++ b/docs/ti_hw/fargo/Convert.txt
@@ -0,0 +1,170 @@
+----------------------------------------------------------------------------
+CONVERTING FARGO 0.1.X PROGRAMS
+----------------------------------------------------------------------------
+
+This document describes some of the steps needed to convert Fargo 0.1.x
+programs to Fargo II.
+
+Libraries are now accessed simply by included their corresponding header
+files. And, the program entry point and comment are now specified by
+exporting them using XDEF, rather than using the @program macro.
+Example:
+
+----------- begin ------------
+	@program	prog_code,prog_name
+prog_code:
+	rts
+prog_name	dc.b	"This program does nothing.",0
+	reloc_start
+	add_library	flib
+	add_library	hexlib
+	reloc_end
+	end
+------------ end -------------
+
+would be changed to:
+
+----------- begin ------------
+	include	"flib.h"
+	include	"hexlib.h"
+	xdef	_main
+	xdef	_comment
+_main:
+	rts
+_comment	dc.b	"This program does nothing.",0
+	end
+------------ end -------------
+
+Libraries are also created differently. Example:
+
+-------- sillylib.asm --------
+	@library	sillylib
+	label	boring
+	rts
+	label	pointless
+	rts
+	reloc_start
+	reloc_end
+	end
+-------- sillylib.sym --------
+\1,boring
+\1,pointless
+-------- sillylib.fn ---------
+; boring() does nothing
+; pointless() does more of the same
+------------ end -------------
+
+would be changed to:
+
+-------- sillylib.asm --------
+	xdef	_library
+	xdef	sillylib at 0000
+	xdef	sillylib at 0001
+sillylib at 0000:
+	rts
+sillylib at 0001:
+	rts
+_library	dc.b	"sillylib",0
+	end
+--------- sillylib.h ---------
+; boring() does nothing
+sillylib::boring	equ	sillylib at 0000
+; pointless() does more of the same
+sillylib::pointless	equ	sillylib at 0001
+------------ end -------------
+
+Notice that library calls are now done as "libname::funcname" rather than
+"libname[funcname]". If you use Emacs, you may change your library calls
+using the following regexp replace:
+Replace "\([ 	,][a-z]+\)\[\(.+\)\]" with "\1::\2".
+             ^ Tab character (yielded by Ctrl-Q Ctrl-I)
+
+----------------------------------------------------------------------------
+
+The library "romlib" has been replaced by the pseudolibrary "tios". The
+following calls have undergone name changes:
+
+ romlib[destroy_handle]    ->  tios::HeapFree
+ romlib[create_handle]     ->  tios::HeapAlloc
+ romlib[resize_handle]     ->  tios::HeapRealloc
+ romlib[dispose_handle]    ->  tios::HeapFreeIndir
+ romlib[set_activity]      ->  tios::ST_busy
+ romlib[puttext]           ->  tios::DrawStrXY
+ romlib[putchar]           ->  tios::DrawCharXY
+ romlib[set_font]          ->  tios::FontSetSys
+ romlib[update_status]     ->  tios::ST_eraseHelp
+ romlib[gr_draw_to]        ->  tios::DrawTo
+ romlib[gr_move_to]        ->  tios::MoveTo
+ romlib[gr_set_buffer]     ->  tios::PortSet
+ romlib[gr_screen_buffer]  ->  tios::PortRestore
+ romlib[draw_window]       ->  tios::WinActivate
+ romlib[destroy_window]    ->  tios::WinClose
+ romlib[create_window]     ->  tios::WinOpen
+ romlib[puttext_window]    ->  tios::WinStrXY
+
+In addition, the following macro had its name changed:
+
+ handle_ptr -> tios::DEREF
+
+In most cases the name change was made because the new name is the genuine
+name used by TI in their ROM source code. In other cases, where it wasn't
+possible for me to find out the real name, I chose a name that seemed to
+be consistent with TI's naming style.
+
+----------------------------------------------------------------------------
+
+Since ROM 2.1 uses different RAM addresses than ROM 1.x, you will have to
+change all your direct references to RAM addresses with references to the
+"tios" pseudolibrary. I think the most common direct addresses used by
+Fargo 0.1.x programs were the keyboard variables, $75A0, $75B0, etc.; to
+change these, simply subtract $7594 and add tios::kb_vars. For example:
+
+ $75A0 -> tios::kb_vars+$C
+ $75B0 -> tios::kb_vars+$1C
+ $75B2 -> tios::kb_vars+$1E
+
+Also make sure you change all direct references to $4440 to LCD_MEM or
+tios::main_lcd, and $761C to STATUS_LINE or tios::status_flags.
+See tios.h for additional examples.
+
+Since Fargo II programs run in User mode rather than Supervisor mode, you
+won't be able to use privileged instructions outside of an exception
+handler. Usually the only two you will have used before are STOP and
+MOVE xx,SR. You will have to do without STOP, unless you access it via
+a trap handler. However, MOVE xx,SR can be substituted with something
+different. Here are a couple examples:
+
+	move.w	#$700,d0		;\ disable interrupts, and put
+	trap	#1			;/ the old int mask in D0
+	bclr.b	#2,$600001		; disable protection of memory
+	move.l	$64,old_int_1		; save pointer to old int 1 handler
+	move.l	new_int_1(pc),$64	; install custom int 1 handler
+	bset.b	#2,$600001		; re-enable protection of memory
+	trap	#1			; restore the old interrupt mask
+
+	move.w	#$700,d0		;\ disable interrupts, and put
+	trap	#1			;/ the old int mask in D0
+	move.w	d0,-(sp)		; push old int mask onto stack
+	...
+	...				; do something that requires 
+	...				; interrupts to be disabled
+	...
+	move.w	(sp)+,d0		;\ restore old
+	trap	#1			;/  int mask
+
+Note that $64 is used to access the auto-int 1 exception vector, rather
+than $20064. This provides compatibility with 256K calculators. Because
+$64 was used, the protection of memory in the range $000000..$00011F
+had to be temporarily disabled. See LowLevel.txt.
+
+----------------------------------------------------------------------------
+
+The kernel no longer exports a function called "find_var". Instead, use
+tios::FindSymEntry. Remember that since it is a ROM routine, it destroys
+registers d0-d2/a0-a1.
+
+The 4-shade grayscale library included with Fargo is different from the
+old graylib. It has been renamed to gray4lib. It now works similarly to
+graylib7. Also, graylib7 has been renamed to gray7lib.
+
+----------------------------------------------------------------------------
diff --git a/docs/ti_hw/fargo/Fargo.txt b/docs/ti_hw/fargo/Fargo.txt
new file mode 100644
index 0000000..eb2b39d
--- /dev/null
+++ b/docs/ti_hw/fargo/Fargo.txt
@@ -0,0 +1,981 @@
+		  ________
+		 /\  _____\
+		 \ \ \____/   __    __ __    __       __
+		  \ \  ___\ /'__`\ /\ `__\ /'__`\   /'__`\
+		   \ \ \__//\ \_\ \\ \ \  /\ \_\ \ /\ \_\ \
+		    \ \_\  \ \___/_\\ \_\ \ \____ \\ \____/
+		     \/_/   \/___/_/ \/_/  \/____\ \\/___/
+					     /\____/
+					     \/___/
+
+				Fargo v0.2.7.1
+		   Copyright (C) 1996-1998 David Ellsworth
+			     All rights reserved.
+
+==============================================================================
+			      Table of contents
+==============================================================================
+
+ Part 1: Using Fargo
+ -------------------
+ 1.1: Introduction
+ 1.2: Requirements
+ 1.3: Installing Fargo
+ 1.3.1: Installing Fargo from DOS
+ 1.3.2: Installing Fargo from Linux
+ 1.3.3: Installing Fargo without FLink
+ 1.4: Running Fargo programs
+ 1.5: Using FBrowser
+ 1.6: Running old Fargo programs
+ 1.7: Troubleshooting
+
+ Part 2: Programming for Fargo
+ ----------------------------
+ 2.1: Introduction
+ 2.2: Lists of helpful information
+ 2.3: Programming overview
+ 2.4: The Fargo source code format
+ 2.5: The Fargo object code format
+
+ Part 3: Other topics
+ --------------------
+ 3.1: Legal stuff
+ 3.2: Contacting the developer
+ 3.3: New versions and information
+ 3.4: Revision history
+ 3.5: Known bugs
+ 3.6: Planned features
+
+==============================================================================
+			     Part 1: Using Fargo
+==============================================================================
+------------------------------------------------------------------------------
+ 1.1: Introduction
+------------------------------------------------------------------------------
+
+Fargo is a software extension for the TI-92 graphing calculator that enables
+the execution of machine language programs. These programs are stored on your
+calculator as PRGM variables.
+
+Fargo itself consists of two primary components: the kernel and the shell.
+The kernel contains low level bootstrap routines that are used to load and
+run Fargo programs. It is also the interface whereby Fargo programs can
+communicate with the TI-92's built-in ROM OS while maintaining compatibility
+across all supported ROM versions. The shell provides an simple and organized
+way to list and execute Fargo programs that are stored in the calculator's
+memory. Fargo lets you use any program as your shell. The default shell
+packaged with Fargo is FBrowser.
+
+Fargo also includes a development toolkit for creating Fargo software. For
+more information on it, see the Part 2 of this document.
+
+------------------------------------------------------------------------------
+ 1.2: Requirements
+------------------------------------------------------------------------------
+
+You must have access to a Graph-Link cable if you have a Macintosh and/or
+want to use TI's software to transfer Fargo to your TI-92. A PC program is
+supplied with Fargo that will allow you to transfer group files and backups
+using a homemade link (both the parallel and serial cables are supported).
+
+Fargo currently supports the following ROMs:
+
++---------+--------------------+
+| Version |       Date         |
++---------+--------------------+
+| 1.0b1   | September 13, 1995 |
+| 1.2     | October 11, 1995   |
+| 1.3     | October 20, 1995   | /\
+| 1.4     | November 17, 1995  | /\ older date format: Month DD, YYYY
+| 1.5     | 01/02/96           | \/ newer date format: MM/DD/YY
+| 1.7     | 01/18/96           | \/
+| 1.8     | 02/28/96           |
+| 1.10    | 03/20/96           | \____ note that there are two
+| 1.10    | 03/26/96           | /     ROMs designated as 1.10
+| 1.11    | 04/11/96           |
+| 1.12    | 05/08/96           |
+| 2.1     | 08/19/96           | <--- TI-92 II (available in Europe only)
++---------+--------------------+
+
+If your ROM is not on the list, please contact me! (see section 3.2)
+
+To find out what ROM version your TI-92 has, press [Diamond] [(] from the
+PrgmIO screen. Then press [2nd] [QUIT] to go back.
+
+Note that "1.12" stands for "one point twelve" rather than "one point one
+two"; therefore ROM 1.12 is newer than, for example, ROM 1.7.
+
+------------------------------------------------------------------------------
+ 1.3.1: Installing Fargo from DOS
+------------------------------------------------------------------------------
+
+The following procedure details the process of putting Fargo onto your
+TI-92. This process will preserve all the files that you currently have on
+your calculator.
+
+The first step is to unzip Fargo into a directory on hard disk. For
+discussion purposes, let's call that directory "F:\FARGO".
+
+Next, make sure you set the environment variable FARGO to F:\FARGO and make
+sure F:\FARGO\BIN is in your path. To make this permanent, add the following
+lines to the file C:\AUTOEXEC.BAT:
+
+  SET FARGO=F:\FARGO
+  SET PATH=%PATH%;%FARGO%\BIN
+
+After you have made these settings, you may install Fargo on your calculator.
+If you have a homemade parallel link cable, you may install Fargo by typing
+"autofarg" at the DOS prompt. Otherwise, move on to section 1.3.3.
+
+------------------------------------------------------------------------------
+ 1.3.2: Installing Fargo from Linux
+------------------------------------------------------------------------------
+
+The first step is to untar Fargo into a directory in your filesystem. For
+discussion purposes, let's call that directory "/usr/fargo".
+
+Next, make sure you set the environment variable FARGO to "/usr/fargo" and
+make sure both $FARGO/bin and $FARGO/flink are in your path. To make this
+permanent, add the following lines to your global profile:
+
+  export FARGO=/usr/fargo
+  PATH=$PATH:$FARGO/bin:$FARGO/flink
+
+If you are using c-shell, use this instead:
+
+  setenv FARGO /usr/fargo
+  set path = ( $path $FARGO/bin $FARGO/flink )
+
+If you have a homemade parallel or serial link cable, go to $FARGO/tidev, read
+the README there, and install tidev. You may then install Fargo on your TI-92
+by typing "autofarg" at the shell prompt. Otherwise, you are out of luck. You
+will have to go to Windows to use TI-Graph Link.
+
+------------------------------------------------------------------------------
+ 1.3.3: Installing Fargo without FLink
+------------------------------------------------------------------------------
+
+First, make sure you have read and followed section 1.3.1.
+
+Transfer a backup from your TI-92 to F:\FARGO. You can give the backup any
+name you want. From the DOS command line, execute the following command:
+
+  F:\FARGO>putfargo <name of backup>
+
+where <name of backup> is the name of the backup file you made, including
+the .92b extension. This will load the Fargo core into the backup file. Now
+transfer this modified backup file to your TI-92. There is now one step
+remaining: transfer all the .92p files from F:\FARGO to your TI-92. You now
+have Fargo on your calculator.
+
+The following .92p files are required to run FBrowser:
+
+  asm\prgm\flib.92p
+	Fargolib. Contains useful routines not found in ROM.
+
+  asm\prgm\shell.92p
+	FBrowser; the listing of programs you will see by default
+	when you press [Shift] [ON].
+
+The remaining .92p files are sample Fargo programs and libraries.
+
+------------------------------------------------------------------------------
+ 1.4: Running Fargo programs
+------------------------------------------------------------------------------
+
+To launch the Fargo shell, use the hotkey [Shift] [ON]. This works from
+anywhere, provided that your TI-92 becomes idle within 1/4 second after the
+hotkey was pressed.
+
+You may also start Fargo programs in the same way that TI-BASIC programs are
+called. For example, to directly start the Sierpinski Triangle demo, you would
+enter "sierpin()" from the home screen.
+
+The Fargo shell can be executed just like any other Fargo program. As an
+alternative to pressing Shift-ON, you may execute the TI-BASIC command
+"shell()". Any Fargo program renamed to "shell" will be triggered when you
+press [Shift] [ON].
+
+If you press [Shift] [ON] and there is no variable called "shell" in your
+calculator's memory, Fargo will display the message "SHELL NOT FOUND" in the
+status line.
+
+If a program has been directly launched, and for some reason it cannot be
+executed, Fargo will display an error message on the status line at the
+bottom of the screen. The message briefly describes what went wrong.
+
+FBrowser requires the single library "flib". Different programs may require
+different libraries.
+
+If Fargo is not present on your TI-92, pressing [Shift] [ON] will have no
+effect, and Fargo programs launched from TI-BASIC will do absolutely nothing.
+To load Fargo into your TI-92, follow the instructions in Section 1.3.
+
+------------------------------------------------------------------------------
+ 1.5: Using FBrowser (a.k.a. the Fargo shell)
+------------------------------------------------------------------------------
+
+When you start the FBrowser, it displays a menu of the folders on your
+TI-92. There are two modes of operation; one is the folder view, which is
+the default upon startup, and the second is the program view.
+
+Use the following keys to navigate through FBrowser:
+
+ [Left]       - switch to folder view
+ [Right]      - switch to program view (enter folder)
+ [Up]         - move cursor up
+ [Down]       - move cursor down
+ [2nd] [Up]   - page up
+ [2nd] [Down] - page down
+ [ENTER]      - execute program / enter folder
+ [space]      - toggle file list filtering
+ [F1]         - display "about" dialog box
+ [EXIT]       - quit
+
+If a program you attempt to execute fails, FBrowser will display an error
+dialog box describing the error.
+
+You may bypass the Fargo shell by launching programs directly from TI-BASIC.
+
+Note that when you have file list filtering turned off, file types are no
+longer meaningful; therefore, Fargo programs will not have their comments
+displayed, and will not execute when you press [ENTER].
+
+------------------------------------------------------------------------------
+ 1.6: Running old Fargo programs
+------------------------------------------------------------------------------
+
+Before Fargo II was released, many programs had been written for the original
+Fargo. Since Fargo II used a completely redesigned program format, and even
+ran programs in a different processor mode, compatibility with older programs
+was broken. It was expected that all of the existing programs would need to be
+converted and recompiled in order to run under Fargo II.
+
+But with the release of Fargo 0.2.2, this changed. With the addition of the
+Fargo 0.1.x compatibility module, legacy Fargo programs could now be run under
+the same environment as Fargo II programs.
+
+The compatibility module is optional; you must specifically choose to install
+it. To do this, simply follow the same installation procedure outlined in
+Section 1.3, but use "pfcompat" instead of "putfargo". For an automatic
+installation, use "afcompat" instead of "autofarg". In a manual installation,
+make sure you send the files in "asm\oldfargo" to your TI-92 after the backup
+has been sent.
+
+The Fargo 0.1.x library "romlib" is integrated with the compatibility module.
+It does not need to be present on your calculator. All other Fargo 0.1.x libs
+will need to be put into the folder "OLDFARGO" in order to be recognized. This
+insures that they will not be confused with Fargo II libraries, which go in
+the folder "MAIN". However, programs themselves can be put into any folder,
+regardless.
+
+Note that if your TI-92's ROM version is not 1.x, most Fargo 0.1.x programs
+will need to be modified somewhat in order to run properly. 
+
+------------------------------------------------------------------------------
+ 1.7: Troubleshooting
+------------------------------------------------------------------------------
+
+Everything in this section is documented in the "In Case of Difficulty"
+section of the TI-92 manual, on page 498; however, since so many people post
+on the mailing lists asking about this, I've decided to include it here.
+
+If your TI-92 locks up, try holding down [2nd] and [HAND] and pressing [ON].
+If that does not reset it, try removing a battery, holding down [)] and [(-)],
+and inserting the battery while continuing to hold down the two keys until the
+calculator resets.
+
+==============================================================================
+			Part 2: Programming for Fargo
+==============================================================================
+------------------------------------------------------------------------------
+ 2.1: Introduction
+------------------------------------------------------------------------------
+
+Part 2 explains the fundamentals of creating Fargo II programs, including
+pointers to sources of information and a description of the high level source
+code format recognized by the Fargo development kit. Also described is the
+low level object code format recognized by Fargo itself, and generated when
+you compile a program.
+
+Fargo, along with the development kit included with it, automatically handles
+relocation, library linking, and many platform technicalities, such as
+support for multiple ROM versions. In order to use these features properly,
+Fargo requires that you follow a certain format in your source code files.
+This format is streamlined; the development kit takes care of the details of
+converting source code into object code that Fargo can recognize.
+
+There are several impediments to running assembly language programs on the
+TI-92. Fargo deals with all of these, leaving the programmer to concentrate
+on what is most important.
+
+Here are the three most predominant issues:
+
+ - Different versions of the ROM are very much alike, but differ slightly
+   in the offset of most calls. The Fargo kernel solves this by providing
+   a TIOS "pseudolibrary" of ROM calls and RAM addresses. This pseudolibrary
+   uses a table of addresses. This table is chosen from a master table of
+   ROM versions at the time the Fargo kernel is inserted into a backup file.
+
+ - The calculator dynamically rearranges its memory, so there is never a
+   sure way to pinpoint the location of a program in order to access data
+   and do JMPs and JSRs. The Fargo kernel does not face this problem, since
+   it is in a fixed location (the top of RAM). For programs, which do move
+   around, Fargo solves this problem by automatically relocating programs
+   before they are executed.
+
+ - There is very little RAM (about 69K on a 128K calc, or 196K on a 256K
+   calc) to work with, so routines should be optimized to work under low
+   memory conditions. In order to work with this difficulty, the Fargo kernel
+   and program format have been designed to take as little space as possible
+   while still being efficient and modular.
+
+------------------------------------------------------------------------------
+ 2.2: Lists of helpful information
+------------------------------------------------------------------------------
+
+The text files included in the distribution contain information that may be
+useful for writing Fargo programs. These files are nowhere near complete,
+so I welcome corrections and additions. If you have any, please refer to
+section 3.2.
+
+The files in this package are not meant teach you from scratch how to
+program in 68000 assembler; for this, please consult other sources.
+
+The text files are as follows:
+
+  Fargo.txt	Main documentation (this file)
+  Convert.txt	Describes how to convert Fargo 0.1.x programs and libraries
+		to Fargo II.
+  LowLevel.txt	Describes the TI-92's memory map, and lists all the known
+		I/O ports along with descriptions.
+  Traps.txt	Describes the TI-92's usage of the exception vector table.
+  Types.txt	Describes some of the data types used by the TI-92.
+  Handles.txt	Explains how memory handles are used by the TI-92.
+  RAM-1_x.txt	Lists some RAM addresses (low memory globals) along with
+		descriptions. Theses addresses are for ROM 1.x only. They
+		must be converted to be used with Fargo II.
+  ROM-2_1.txt	Contains lots of information gleaned from studying ROM 2.1.
+
+For all the text files, the following conventions apply:
+
+  All numbers are in hexadecimal, except for bit indices or numbers ending
+  with the suffix (d). In certain places, the prefix '$' will be used to
+  clarify that a number is in hex.
+
+  B = byte ( 8 bit integer)
+  W = word (16 bit integer)
+  L = long (32 bit integer)
+
+  Brackets [] designate pointer indirection. This may be followed by ".B",
+  ".W", or ".L" to designate the size of the integer being pointed to.
+
+Remember that the 68000 processor uses "Big Endian" to store integers in
+memory; the most significant byte (MSB) is stored first, and the least
+significant byte (LSB) is stored last. For example, the number $1234 is
+stored as 12 34 in memory.
+
+------------------------------------------------------------------------------
+ 2.3: Programming overview
+------------------------------------------------------------------------------
+
+Fargo executables (PRGM variables) consist of two classes: programs and
+libraries. Programs can be executed directly, and are displayed in the
+Fargo shell. Libraries provide commonly used routines to programs; these
+routines can be used by simply linking the library to the program. This is
+an alternative to copying the source for each routine into the source for
+the program that uses the routines.
+
+Fargo source code is contained in .ASM files. Compiling a program or library
+consists of two steps:
+
+1) Assembling the ASM source file(s) using A68k 2.71.F1.
+2) Using the Fargo Linker to link the object file(s) generated by A68k.
+   This generates a single .92p file.
+
+It is recommended that you use a makefile for compiling your Fargo programs
+and libraries. The way A68k and flinker work together makes this work very
+well. All you have to do is type "make" and everything that has changed is
+recompiled. (And everything that hasn't changed isn't recompiled.)
+
+However, you do not *need* one to compile Fargo programs. The file FARGO.BAT
+is supplied for development under DOS without the use of a makefile. In the
+Linux development kit, a sample makefile is included instead. If you're using
+DOS, you're on your own if you want to try using a makefile.
+
+------------------------------------------------------------------------------
+ 2.4: The Fargo source code format
+------------------------------------------------------------------------------
+
+This section describes how to create an .ASM file that will be assembled into
+an object file that the Fargo Linker can then link into a working Fargo .92p
+file.
+
+This section precisely describes how to create Fargo source code. It might
+also be hard to understand, especially for beginners. To see it in practical
+use, please examine the sample source code that is included with Fargo.
+
++-----------+
+| Libraries |
++-----------+
+
+To generate a library, you must export a symbol named "_library", and all the
+library functions, using the template "libname at XXXX" where "XXXX" is a hex
+number signifying the function index. The symbol "_library" must point to a
+null-terminated string specifying the library name.
+
+This is done like so:
+
+	...
+	xdef	_library
+	xdef	testlib at 0000
+	xdef	testlib at 0001
+	xdef	testlib at 0002
+	...
+	xdef	testlib at XXXX
+
+testlib at 0000:	; exported library symbol number $0000
+	...
+testlib at 0001:	; exported library symbol number $0001
+	...
+testlib at 0002:	; exported library symbol number $0002
+	...
+testlib at XXXX:	; exported library symbol number $XXXX
+	...
+_library	dc.b	"testlib",0
+
++----------+
+| Programs |
++----------+
+
+To generate a program, you must export a symbol named "_main". This symbol
+should point to the program entry point. If you want to give the program a
+comment/description, you must also export a symbol named "_comment", which
+should point to a null-terminated string.
+
+This is done like so:
+
+	...
+	xdef	_main
+	xdef	_comment	; include this only if you define _comment
+	...
+_main:		; program entry point
+	...
+	rts	; return from program
+	...
+_comment	dc.b	"Space Goobers version 19.8",0
+	...
+
++-----------------+
+| Using Libraries |
++-----------------+
+
+Library symbols are accessed as "libname at XXXX". However, each library should
+have its own include file which makes the names much more friendly. For
+example, "kernel at 0000" is aliased to "kernel::find_var" and "flib at 000C" is
+aliased to "flib::random".
+
+NOTE: Although exported library symbols are usually functions, they are not
+      required to be so. They may just as easily point to data.
+
++-----------+
+| Compiling |
++-----------+
+
+To compile a Fargo .ASM file into a .92p file under DOS:
+
+  F:\FARGO>fargo <name>
+
+Where <name> is the name of the .ASM file, without the extension.
+
+Using the Linux development kit, you may manually do this:
+
+ $ a68k <name>.asm
+ $ flinker -o <name>.92p <name>.o
+
+Or you may simply type "make" if you have already written a proper makefile.
+
+------------------------------------------------------------------------------
+ 2.5: The Fargo object code format
+------------------------------------------------------------------------------
+
+The section has been temporarily removed.
+
+==============================================================================
+			     Part 3: Other topics
+==============================================================================
+------------------------------------------------------------------------------
+ 3.1: Legal stuff
+------------------------------------------------------------------------------
+
+The distribution of Fargo is encouraged, as long as all the companion files
+are kept together, unmodified from the form in which they were originally
+released.
+
+I take no liability for any damage caused directly or indirectly by using
+Fargo or any of its companion files. Keep in mind, though, that it is
+extremely unlikely (if not impossible) for your calculator to be damaged by
+software.
+
+You may NOT put Fargo up on any WWW site, FTP site, BBS, or any other form of
+mass distribution, without my agreement. This is NOT to stop the distribution
+of Fargo. It is to allow me to keep track of all the distribution sites out
+there, so I can make sure a bug-fix or upgrade is always available.
+See section 3.2 below.
+
+------------------------------------------------------------------------------
+ 3.2: Contacting me
+------------------------------------------------------------------------------
+
+If you have a question that is about something very basic, that you think a
+normal user could handle, please use one of the mailing lists or newsgroups.
+See http://www.ticalc.org for FAQs and information on TI calculator mailing
+lists and newsgroups.
+
+However, if you have a comment, suggestion, bug report, or something advanced
+that would only be appropriately asked of the developer of Fargo, please
+contact me. I will try to respond to all mail sent to me that warrants a
+response, but please don't be disappointed if I don't -- I get a lot of mail;
+sometimes I don't answer all of it.
+
+You may email me at <davidell at ticalc.org> or <davidell at earthling.net>.
+I also have an account on ICQ; my ID is 2300673.
+
+NOTE: The Fargo development team used to include two other people, Rob Taylor
+      and Dan Eble. However, I (David Ellsworth) am currently the only one
+      developing it. So please don't try to contact them about Fargo.
+
+------------------------------------------------------------------------------
+ 3.3: New versions and information
+------------------------------------------------------------------------------
+
+New versions will always be available at http://www.ticalc.org.
+
+Updates will be announced on the "assembly-92" and "Calc-TI" mailing lists.
+The Calc-TI list echoes to the newsgroup "bit.listserv.calc-ti".
+
+You can download the latest version from:
+
+WEB: http://www.ticalc.org/pub/92/asm/shells
+FTP: ftp.ticalc.org in /pub/92/asm/shells
+
+However, the precise directory is subject to change. If you do not find it in
+one of the above locations, simply start from the top:
+
+WEB: http://www.ticalc.org
+FTP: ftp.ticalc.org in /pub
+
+------------------------------------------------------------------------------
+ 3.4: Revision history
+------------------------------------------------------------------------------
+
+yyyy.mm.dd
+----------
+
+1996.11.10: Fargo v1.0b12
+
+  First public release. This release was unofficial; in fact, it was leaked
+  to the public by a beta tester. (It was leaked by the very first beta tester
+  of Fargo. Rather ironic, isn't it?)
+
+1996.12.09: Fargo v1.0b12 - fixed version of CORE.O
+
+  * Fixed a single-instruction bug which caused programs and libraries to
+    improperly unrelocate when required libraries were not found, resulting in
+    a crash upon execution once all the required libraries were present.
+
+1997.01.02: Fargo v0.1.13
+
+  First official public release.
+
+  * Radically altered the directory organization scheme. It is now possible
+    to compile a Fargo program in any directory.
+  * Streamlined the Fargo distribution. Now only the necessary files, and
+    some small sample programs, are included.
+  * Ported the Fargo file manipulation programs (SUM92, PRGM92, ML92B) to
+    C++ for greater portability.
+  * Gave FLink a rudimentary scripting ability; created a new batch file
+    called AUTOFARG.BAT that automates the task of receiving a backup,
+    putting Fargo into it, and sending it back.
+  * Changed the name of the Fargo shell to "FBrowser" to eliminate
+    confusion between the shell and the core; they now have separate
+    version numbering.
+  * Modified FBrowser to allow folders other than MAIN to be browsed. This
+    does not change the fact that the shell must be in the MAIN folder,
+    though.
+  * Changed the version numbering scheme.
+
+  This release included the following utility versions:
+
+   FBrowser v0.2.0
+   FLink v0.1.5
+   ML92B v1.0
+   PRGM92 v1.0
+
+1997.02.26: Fargo v0.1.13 - masked ROM patch
+
+  * Released patched versions of CORE.O and ROMLIB.92P that allowed Fargo to
+    work on TI-92's with masked (internal) ROM. At the time, ROM 1.11 was the
+    only ROM version being manufactured in masked format, so this patch was
+    released as FIX111.ZIP.
+
+1997.11.01: Fargo v0.1.14
+
+  * Fargo now works on any ROM 1.x TI-92 regardless of how much RAM it has.
+    It will *not*, however, work under ROM 2.1. For that you will still need
+    to wait for Fargo II. NOTE: Fargo programs that hook interrupts using the
+    same method that Fargo 0.1.13 used will still need to be modified to work
+    with 256K of RAM.
+  * flib[idle_loop] now properly looks up the APD value.
+  * Switched over to using DJGPP for all the DOS utilities.
+  * ML92B v1.1.0: Can now patch backups using either of two methods, one
+    which generates large backups (107K or 235K), and one which does not
+    increase the size of a backup at all.
+  * TRIM92B v1.0.0: New program. Trims a 92B backup file to its natural size.
+    Can be used to "uninstall" Fargo from a backup if the wraparound method
+    was used to install it.
+  * PRGM92 v1.0.1: See below.
+  * SUM92: Although all the Fargo utility programs now automatically fix the
+    checksums of files generated or modified, this program is still included.
+    You may use it to fix the checksum on any TI-92 Graph Link file.
+  * FLink v0.1.6: The parallel port is now changable. Sound emulation has
+    been added. Note that when Linux FLink is ported to DOS, this version of
+    DOS FLink will become obsolete, which is why I haven't changed it much.
+
+1997.11.02: Fargo v0.1.15
+
+  * Fixed some bugs in the 0.1.14 distribution. (I probably should have
+    called this version 0.1.14.1.)
+
+1998.01.09: Fargo v0.2.0.1
+
+  First alpha release of Fargo II.
+
+  * ROM 2.1 support, plus a system that makes it easy for me to add support
+    for any new ROM version that may come out (i.e., the TI-92 Plus module)
+    I also added ROM 1.0b1 support. Not that anyone still has that ROM
+    version. But, I thought I might as well.
+  * The Linux development kit is now distributed. So is the DOS kit, of
+    course. But Linux has been my primary (and only) Fargo development
+    platform for quite some time. It is quite possible that you will find
+    bugs in the DOS development utilities, since I have not tested them much.
+    (This applied to Fargo 0.1.14 as well, though I didn't mention it.)
+  * A true linker, replacing PRGM92. The Fargo Linker is called flinker for
+    short, and can link multiple A68k-generated object files into one .92p
+    file. It also replaces ML92B, as it can read the kernel object file and
+    insert it into a backup file. It no longer supports the obsolete
+    wraparound installation method.
+  * Modified A68k 2.71 to work better with Fargo source code. I changed the
+    version number to 2.71.F1. The "F1" stands for Fargo patch #1.
+  * Because a linker is now used, libraries are accessed simply by including
+    a header file and accessing the library functions by name. The way
+    libraries are written is also different now. I also took the liberty of
+    changing the library symbol convention from "libname at funcname" to
+    "libname::funcname". See the included sample source files to see exactly
+    how things have changed.
+  * Another feature that the new linker allows is the use of one or more bss
+    sections, which the kernel now supports. A bss section is a dynamically
+    allocated, uninitialized block of memory that a program can use to store
+    temporary variables. I use the word "temporary" because the bss block is
+    freed when the program exits.
+  * What used to be "romlib" is now integrated with the kernel. The kernel
+    exports two pseudolibraries: "tios" and "kernel". "tios" contains both
+    ROM and RAM addresses. I've added a fair number of new ROM calls. Where
+    possible, I've used the genuine TI names for ROM symbols.
+  * ROM addresses are now looked up from a table rather than looked up
+    dynamically. It is now necessary for me to specifically add an entry in
+    my table for each ROM version. So far, I've implemented tables for
+    1.0b1, 1.2, 1.3, 1.4, 1.7, 1.8, 1.10, 1.11, 1.12, and 2.1. The table
+    lookup is done by flinker when it inserts the kernel into a backup file,
+    so there is no overhead involved; the kernel itself never has to do any
+    ROM version checking.
+  * A totally new program/library file format that takes advantage of the
+    new features provided by using a linker. This format contains both a type
+    and a subtype. This type may be used to associate different file types
+    with specific applications, allowing the application to use the subtype
+    any way it pleases.
+  * Fargo programs now run in User mode rather than Supervisor mode. This
+    should have been done from the very start, but wasn't because Fargo beta
+    was leaked before I finalized things. Therefore I felt obliged to keep
+    backwards compatibility with it in later versions. Since Fargo II is
+    completely new, I took the opportunity to finally switch to User mode.
+    Programmers: you will need to get rid of all STOP and MOVE xx,SR
+    instructions (unless they are used in trap handlers). MOVE xx,SR can be
+    replaced with a MOVE xx,D0 / TRAP #1 sequence.
+  * The TI-BASIC fork in a Fargo module now contains "Prgm:EndPrgm" rather
+    than "Prgm:Pause:EndPrgm". The kernel hooks to intercept calls to
+    programs from TI-BASIC are now much faster and cleaner. The same applies
+    to the Shift-ON hook. Also, the kernel now displays a message on the
+    status line rather than flashing the screen when an error is encountered.
+  * The 4-shade and 7-shade grayscale libraries, and FTerm 1.0b7, have been
+    packaged with Fargo. These were not included with Fargo 0.1.x.
+  * Since this is an alpha release, nothing is absolutely guaranteed to stay
+    the same in later releases. Although I can state with fair certainty that
+    backwards binary compatibility will be maintained, even that is not an
+    absolute certainty.
+  * Note that, although the codename for this project is "Fargo II", it is
+    still called Fargo.
+
+1998.01.10: Fargo v0.2.0.2
+
+  * Fixed an odd checksum bug that occurred in the DOS version of flinker
+    when patching a backup file (putfargo calls flinker). The same bug was
+    also in sum92, which has been fixed as well.
+  * Fixed an incompatibility bug in flinker that made it screw up when trying
+    to patch certain backups
+  * Improved flinker's name-guessing algorithm (which it uses on a program
+    if you leave out the `-n' option). It now skips over directory names.
+  * Added bin/fargo and bin/autofarg scripts and a sample Makefile to the
+    Linux distribution
+  * Removed trim92b from the distribution
+  * Fixed a typo in flib.asm. In zap_screen, it had "d0-d7/a0-d6" instead of
+    "d0-d7/a0-a6".
+  * Made Linux FLink's put92 and get92b check if the calculator is ready
+    before starting the transmission, and wait 5 seconds before giving up.
+    Made get92b return an exit value of 2 if the user chose not to overwrite
+    the file. Fixed a bug in get92 that was storing the wrong file size in the
+    header (the value it should have been plus 6). Incremented Linux FLink's
+    version to 1.2.1.
+  * Decreased the value of TIMAXTIME in tidev's ti.c. Change this if it
+    doesn't seem to work right for you.
+  * Documented the [space] key feature of FBrowser 0.3.0.
+  * Added a "known bugs" section to the documentation.
+  * Slightly modified the list of planned features.
+
+1998.01.10: Fargo v0.2.0.3
+
+  * Fixed a bug in the ROM 1.2 entry of the tios table
+    (HeapFreeIndir was incorrect)
+
+1998.01.13: Fargo v0.2.1
+
+  * Changed the executable file format. It now uses compressed relocation,
+    bss, and import tables. Large programs will now be in fact smaller than
+    they were in Fargo 0.1.x. Flinker can still generate files with the old
+    format, mainly so you can see how much smaller they are with the new one.
+    Note that the compressed tables take slightly longer to process, but I
+    think it is worth it.
+  * Restructured flinker to be cleaner and more modular. (The changes are
+    pretty much invisible to the user, though.) Also added rudimentary
+    support for recognizing XRef operand sizes.
+  * Optimized the kernel. It is now a lot smaller.
+  * Added an optional compatibility module. You may link this in with the
+    kernel to make it compatible with Fargo II programs and libraries that
+    were released before Fargo 0.2.1. If you don't link it in, the kernel
+    will be smaller. Patching a backup with the compatibility module enabled
+    is automated by "pfcompat" in DOS and "putfargo-compat" in Linux. Once
+    you're sure you won't need to execute pre-0.2.1 executables anymore, you
+    can go back to using "putfargo".
+  * Fixed a bug in FBrowser where, if there were multiple files at the end of
+    a list starting with the same letter, you couldn't cycle through them in
+    a loop by pressing that letter repeatedly. Incremented its version number
+    to 0.3.0.1.
+
+1998.01.13: Fargo v0.2.2
+
+  * Added a Fargo 0.1.x compatibility module. It is named "compat1x.o". When
+    executing Fargo 0.1.x programs, their required libraries must be in the
+    folder "oldfargo". Note that Fargo 0.1.x programs still do *not* work on
+    ROM 2.1; they still have all the limitations that "romlib" imposes. You
+    may install this into a backup by using "putfargo-compat1x" in Linux or
+    "pfcmpt1x" in DOS. If you want to combine both 0.1.x *and* pre-0.2.1
+    compatibility, you will need to run flinker manually.
+  * Fixed a bug in FBrowser where, if you tried to enter a folder other than
+    the first one listed, that had no Fargo programs in it, the cursor would
+    get messed up when the error dialog box popped up. Incremented its version
+    number to 0.3.0.2.
+
+1998.01.14: Fargo v0.2.3
+
+  * Optimized the kernel compatibility modules. The pre-0.2.1 module is now
+    much smaller.
+  * Fixed an error in the shell script "fargo" in the Linux toolkit; it had
+    the extra parameter `-p'.
+  * Fixed a bug in flinker where it would sometimes return a garbage exit code
+    even when there wasn't an error.
+  * Improved flinker's recognition of operand sizes.
+  * Improved the error reporting in flinker. It now shows both the section
+    name and offset for each error encountered, where applicable.
+  * Renamed "ROM_origin" to "ROM_base" in tios.h.
+
+1998.01.16: Fargo v0.2.4
+
+  * Made some changes to various documentation files.
+  * Added a "Troubleshooting" section to Fargo.txt.
+  * Fixed a bug in the ROM 2.1 entry of the tios table (WinOpen was incorrect)
+  * Added a new ROM call. I call it "vcbprintf", and it is a virtual callback
+    printf function. This means you can do printf with any custom putchar
+    routine, rather than having to use sprintf to print into a buffer.
+  * Modified FBrowser to display comments and allow program execution even in
+    no-filter mode. Incremented its version to 0.3.1.
+  * Made flinker report the size of the kernel when installing it in a backup
+    file, and the size of a variable when creating a 92p file.
+  * Added a second level of verbosity to flinker.
+  * Removed the '-C' compatibility option from flinker. It now only generates
+    Fargo programs for the current version of Fargo.
+  * Switched to a new directory scheme. There is now an "asm" directory under
+    the Fargo root, and there are four subdirectories under it: "include",
+    "kernel", "lib", and "prgm". All include files, including the ones for
+    libraries, go in "include". Yes, I think this makes more sense than
+    putting them in "lib".
+
+1998.01.22: Fargo v0.2.5
+
+  * Fixed a bug in the Fargo 0.1.x compatibility module where modules that
+    used the 0.1.x kernel pseudolibrary would not properly unrelocate;
+    therefore they would crash upon being run a second time.
+  * Fixed a bug that caused Fargo II programs to load whether or not their
+    required libraries were found, often causing crashes.
+  * Fixed a bug that caused LCD_MEM not to be saved and restored after a
+    module failed to load.
+  * Took the Fargo 0.2.0.x compatibility module out of the distribution. If
+    anyone wants it back, please contact me.
+  * Reworked the Fargo 0.1.x compatibility module so that it now has romlib
+    integrated with itself. If romlib is present in the "oldfargo" folder, it
+    will be ignored. Also removed the checking that caused the Fargo 0.1.x
+    compatibility module to refuse to work on incompatible ROMs.
+    WARNING: If you install the Fargo 0.1.x compatibility module on a TI-92
+             with a ROM version (such as 2.1) that was incompatible with Fargo
+             0.1.x, all the Fargo 0.1.x programs you run will have to have
+             been specially patched to work with your ROM! Otherwise your calc
+             will most likely crash.
+  * Fixed the sprite test program so that the sprite is visible everywhere on
+    the screen, without the compromise of flicker.
+  * Added strlen(), strncmp(), strncpy(), strcat(), and strchr() to the tios
+    pseudolibrary. Added ROM 1.5 support.
+  * Did another major overhaul of flinker. It now handles operand sizes and
+    error reporting even better (and more cleanly).
+  * Made some more modifications to A68k. It now properly differentiates
+    between PC-relative and absolute references to external symbols.
+    Incremented its version to 2.71.F2.
+
+1998.02.07: Fargo v0.2.6
+
+  * Added support for Fargo programs that interface with TI-BASIC. These can
+    be either functions or programs. Functions return a value on the estack.
+    Both functions and programs can take parameters.
+  * Added a sample Fargo/TI-BASIC function to the distribution. It is called
+    "testfunc", and takes a string as a parameter, returning the same string
+    doubled, with an "=" in between the two copies of the string.
+  * Fixed the ROM dumping programs so that they always dump memory in the
+    correct range.
+  * Fixed a bug in "ticat", the tidev-compatible version of "cat", where it
+    was buffering outputted characters instead of outputting them immediately.
+    One of the effects of this was that ROM dumps made using "ticat" would not
+    be complete.
+  * Fixed some bugs in FTerm. Now Diamond-<num>-. correctly outputs an ASCII
+    character, and the cursor keys echo themselves if local echo is enabled.
+    Changed FTerm's version number to 1.0.8.
+  * Put the 0.2.0.x compatibility module back in the distribution. It wasn't
+    requested, but I thought I might as well. If you want to use it, though,
+    you'll have to run flinker manually.
+  * Moved the tios tables to a kernel sourcefile, where they belong. Modified
+    flinker to look for the appropriate tios table in the linked kernel object
+    files, since the tables are no longer hardwired into flinker itself.
+  * Improved the tios naming convention a bit. "main_lcd" has been renamed to
+    "globals", and "kb_vars" has been renamed to "kb_globals". Both of the old
+    names are still provided as aliases in tios.h.
+  * Renamed the tios function ST_redraw to ST_eraseHelp, which is its real
+    name; renamed ST_message to ST_showHelp, since it is the complement of
+    ST_eraseHelp. ST_eraseHelp can be used to update the status line if you
+    set the flag specifying that a help message is being displayed.
+  * Added some functions to the tios pseudolibrary.
+    Misc: push_quantum(), check_estack_size(), OSAlexOut(), ERD_dialog()
+    C functions: memset(), memcmp(), memcpy(), memmove(), abs(), labs()
+    Integer math: _du32u32(), _ds32s32(), _ds16u16(), _ru32u32(), _rs32s32(),
+                  _ru16u16(), _rs16u16()
+  * Made many revisions to ROM-2_1.txt and a small revision to RAM-1_x.txt.
+
+1998.04.09: Fargo v0.2.7
+
+  * Fixed a bug in the Linux distribution: autofarg was missing.
+  * Fixed a bug in gray7lib. It was doing "add #4,sp" after pushing a word.
+  * Removed the note from tidev's readme saying that the "$4" serial link code
+    was untested. It has been tested and it works.
+  * Made some optimizations to FTerm; it should be faster now. Incremented the
+    version number to FTerm 1.0.9.
+  * Added a function to the tios pseudolibrary: DerefSym()
+  * Added support for an alternate version of ROM 1.10, which is dated
+    03/26/96 instead of 03/20/96.
+  * Added a section to the documenation: "Running old Fargo programs". This
+    describes how to install Fargo onto your calc in a configuration that will
+    allow Fargo 0.1.x programs to be run. To further facilitate this, I've
+    added an "afcompat" script, and an "asm/oldfargo" directory with three
+    Fargo 0.1.x libraries in it: flib, graylib, and graylib7.
+
+1998.04.09: Fargo v0.2.7.1
+
+  * Fixed some errors which made it into the distribution:
+    - The "preinstalled backups" uploaded to ticalc.org did not in fact have
+      Fargo installed in them; they were just clean backups.
+    - FTerm, and possibly other .92P files, were not properly recompiled.
+    - There was a small spelling mistake in the description for hexdump.
+
+------------------------------------------------------------------------------
+ 3.5: Known bugs
+------------------------------------------------------------------------------
+
+The following is a list of bugs in Fargo that have been reported to me and
+may have not been fixed yet.
+
+  * The Fargo ROM dumping programs sometimes insert an extraneous bit at the
+    beginning of the transfer, causing the whole transfer to be shifted by one
+    bit. This seems to happen only with homemade links, and only under certain
+    environments (on the PC end).
+
+  * The DOS version of flinker sometimes crashes, and/or generates corrupt
+    output files.
+
+------------------------------------------------------------------------------
+ 3.6: Planned features
+------------------------------------------------------------------------------
+
+The following features are planned for future releases of Fargo II. Once I'm
+satisfied with the feature list, it will go into the beta stage. Currently it
+is still in the alpha stage. Alpha releases will be numbered 0.2.x, 0.3.x,
+0.4.x, etc.; beta releases will start with 1.0.0 and go up from there. I will
+not be so bold as to speculate about a "final" release. I would prefer to keep
+Fargo in beta indefinately.
+
+* TI-92 Plus and TI-89 support. Of course this will have to wait until the
+  actual products are released by TI. ;-)
+
+* Static memory copying (TSR support and general heap reallocation support),
+  overlays, and module decompression
+
+* Many more ROM calls, and documentation for more of the calls.
+
+* A bitplane graphics library. This library will provide calls to allocate
+  and deallocate virtual screens (which will consist of 1, 2 or 3 bitplanes)
+  and to switch between screens. It will automatically do page flipping to
+  simulate grayscale. The LCD RAM at $4440 (or $4720 in ROM 2.1) will no
+  longer be used by Fargo directly; programs will be required to allocate
+  their own screens. This will not require any more memory than is used
+  already, because earlier versions of Fargo save the TIOS screen in a
+  temporary 3840 byte buffer and later restore it. It will also be possible
+  to mark screens as overwritable, so that nested program calls won't waste
+  memory allocating extra screens.
+
+* A graphics library with integrated bitplane support, so you will be able to
+  (for example) paste a non-aligned sprite, or draw a line in any shade of
+  gray. The library calls will of course also work for black and white (one
+  bitplane). Grayscale will no longer need to be treated as a special case.
+
+* Toolkit ports to additional platforms.
+
+* A DOS port of Linux FLink.
+
+* I may write a utility that will load multiple files into a backup file, so
+  that you won't have to send them separately. This may or may not be
+  integrated with flinker.
+
+* I may write a Fargo program that will allow you to send the Fargo kernel
+  to another TI-92 with a different ROM version.
+
+* FBrowser will support plugins, filtering by file type, and multiple views
+  (such as icons, comments only, file stats, etc.). It will also allow itself
+  to be called from another Fargo program (as a library) with the option of a
+  callback filter.
+
+* I am considering releasing the kernel, shell, and development kit source
+  code.
diff --git a/docs/ti_hw/fargo/Handles.txt b/docs/ti_hw/fargo/Handles.txt
new file mode 100644
index 0000000..677904b
--- /dev/null
+++ b/docs/ti_hw/fargo/Handles.txt
@@ -0,0 +1,74 @@
+----------------------------------------------------------------------------
+INTRODUCTION
+----------------------------------------------------------------------------
+
+The TI-92 is capable of dynamically allocating memory blocks. There are
+routines built into its ROM for this. It keeps track of allocated memory by
+assigning a "handle" to each individual block of allocated memory. A handle
+is a convenient way of keeping track of a single memory block. Even if the
+block moves around, the handle does not change. Handles are, in a way,
+"pointers to pointers".
+
+On the TI-92, a handle is a word-sized integer. Each handle has a
+corresponding pointer which points to the memory block represented by the
+handle. This pointer is subject to change when other memory blocks are
+deleted or resized. These pointers are kept in a table; this table is
+pointed to by [$5D42], which usually points to $78B4.
+
+To find the address of a handle's memory block, use the following formula.
+Brackets [] are used to designate pointer indirection.
+
+  address = [[$5D42] + handle * 4].L - 2
+
+If this address evaluates to zero, the handle is unallocated. If it is
+nonzero, it points to the beginning of the memory block. The first word
+in the block, [address], contains the size of the block in words.
+
+Memory blocks are kept in a linked list, starting from handle $0000. From
+there, the handles may be in any order. The next block in the linked list
+may be found with the following formula:
+
+  next_address = address + [address].W * 2
+
+The linked list is terminated when [next_address] equals zero.
+
+----------------------------------------------------------------------------
+STATIC MEMORY HANDLES
+----------------------------------------------------------------------------
+
+Handles 0000 through 0014 are system handles; each one is reserved for a
+specific kind of data. These handles are always present, and are never
+deleted. All handles from 0015 inclusive can contain any kind of dynamic
+data, such as variables, folders other than "main", history entries, and
+the custom menu.
+
+NOTE: I'd advise against using these handles directly. They are probably
+      subject to change in future ROM versions, and are arbitrarily in the
+      order that they are in only because the ROM allocates them in that
+      order during bootup. Anyway, they are all pointed to by various RAM
+      globals, some of which may be documented in RAM-1_x.txt and/or
+      ROM-2_1.txt.
+
+Handle	Data Pointed to
+------	---------------
+0000    ?
+0001    ?
+0002    ?
+0003    ?
+0004    ?
+0005    ?
+0006    ?
+0007    ?
+0008    ?
+0009    ?
+000A	contents of clipboard
+000B	names and handles of all folders (including "main")
+000C	names and handles of all variables in the folder "main"
+000D    ?
+000E	current home screen entry
+000F	PrgmIO screen (239x103 bitmap)
+0010    ?
+0011    ?
+0012    ?
+0013	Graph screen (239x103 bitmap)
+0014	? menu data
diff --git a/docs/ti_hw/fargo/LowLevel.txt b/docs/ti_hw/fargo/LowLevel.txt
new file mode 100644
index 0000000..15f0d55
--- /dev/null
+++ b/docs/ti_hw/fargo/LowLevel.txt
@@ -0,0 +1,245 @@
+-----------------------------------------------------------------------------
+INTRODUCTION
+-----------------------------------------------------------------------------
+
+If all a computer had was its RAM and ROM, it would just be an inert box
+doing invisible calculations. To connect to the outside world, computers
+need I/O ports. On the TI-92, these ports are used to access the keyboard,
+link port, LCD, and some other hardware settings.
+
+This text file describes how the TI-92 organizes its memory, and lists all
+of the known I/O ports.
+
+Since the 68000 processor has no dedicated instructions for reading and
+writing I/O ports, all I/O must be memory-mapped. This means that I/O ports
+are read and written by accessing specific addresses in memory. The
+addresses in the range 600000-60001F correspond to memory-mapped I/O.
+
+Directly accessing I/O ports has its advantages and disadvantages. It is
+very low-level, and gives you complete control. However, it can be a complex
+process, and why reinvent the wheel? For this reason, most I/O tasks (such
+as reading keys, sending and receiving through the link port, and changing
+the contrast) are already handled by the TI-92's ROM.
+
+There are some times when it is still best to directly access the I/O ports.
+The TI-92 is capable of recognizing several keys held down at once, but the
+ROM has no built-in provision for this. When you want to read multiple keys
+at once in a program, you must use direct I/O.
+
+----------------------------------------------------------------------------
+THE MEMORY MAP
+----------------------------------------------------------------------------
+
+Memory addresses are 4 bytes long (32 bits). However, the 68000 processor
+has a 24 bit addressing bus. For this reason, addresses listed here in
+hexidecimal will be 6 digits long.
+
+On the TI-92, memory is mapped out as follows:
+
+000000-1FFFFF : RAM
+200000-3FFFFF : Module ROM, or masked ROM if there's no module
+400000-5FFFFF : Module ROM
+600000-6FFFFF : Memory mapped I/O (lower 6 bits)
+700000-FFFFFF : Nothing (floating bus)
+              : This will probably be used by the TI-92 Plus Module.
+
+Note that, for example, the RAM range covers 2 Mb. This does not mean there
+is 2 Mb of RAM; it means that any RAM accesses beyond the maximum (usually
+128 kb) will wrap around to the beginning. The same goes for ROM, except
+that the maximum is usually 1 Mb.
+
+Most TI-92 ROMs use:
+
+000000-01FFFF to address RAM.
+200000-2FFFFF to address ROM if it is masked (soldered onto the board).
+400000-4FFFFF to address ROM if it is contained in a ROM module.
+600000-60001F to address I/O.
+
+Note: The TI-92 is capable of addressing 256 kb of interleaved RAM. In this
+case, it would be addressed in the range 000000-03FFFF. The European language
+upgrade module (ROM 2.1 / TI-92 II) and the TI-92 Plus Module take advantage
+of this capability, as well as expanding the ROM to 2 MB (400000-5FFFFF).
+
+-----------------------------------------------------------------------------
+THE I/O PORTS
+-----------------------------------------------------------------------------
+
+:RO = read-only
+:WO = write-only (returns random values when read)
+:RW = read/write
+
+       MSB      LSB
+    <76543210|76543210>
+
+:RW [600000]
+    <.....2..|........> = something to do with keyboard
+    <..5.....|........> = bits <....0> of contrast
+    <........|.......0> = clear: interleave RAM (allows use of 256K of RAM)
+    <........|.....2..> = set: generate Auto-Int 7 when memory below [000120]
+			: is written
+
+:WO [600002]
+    <........|........> =
+
+:WO [600004]
+    <........|....3...> = set: 000000..1FFFFF mapped to 200000..3FFFFF
+
+:WO [600006]
+    <........|........> =
+
+:WO [600008]
+    <........|........> =
+
+:WO [60000A]
+    <........|........> =
+
+:RW [60000C]
+    <765.3210|........> = (write) link status
+    <........|7...321.> = (read) link status
+    <........|..5.....> = (read) set: one byte receive buffer has a byte
+    <........|.6......> = (read) set: one byte transmit buffer is empty
+
+:RW [60000E]
+    <.......0|........> = set red output, if direct port access enabled
+    <......1.|........> = set white output, if direct port access enabled
+    <.....2..|........> = read red output
+    <....3...|........> = read white output
+    <.6......|........> = enable direct port access
+    <........|76543210> = read a byte from the receive buffer (1 byte buffer)
+    <........|76543210> = write a byte to the transmit buffer (1 byte buffer)
+
+:WO [600010]
+    <76543210|76543210> = Address of LCD memory divided by 8
+
+:WO [600012]
+    <..543210|........> = LCD horizontal frequency (?maybe?)
+			: The TI-92's ROM writes $31 to this port during
+			: initialization.
+    <........|76543210> = $100 - number of LCD scanlines
+			: If the number of scanlines is smaller than $80 (the
+			: actual height of the LCD) the display will be
+			: duplicated in the lower half. Decreasing the height
+			: darkens the LCD; increasing the height lightens the
+			: LCD. The TI-92's ROM writes $80 to this port during
+			: initialization.
+
+:RW [600014]
+    <........|........> =
+
+:RW [600016]
+    <........|76543210> = Programmable rate generator. Set the timer's init-
+			: ial value by writing it to this port. The timer is
+			: incremented every 6250 clock cycles, unless it has
+			: a value of zero, in which case it is reset to its
+			: initial value. The LCD is refreshed every 16th time
+			: this timer is incremented.
+			:
+			: See also Auto-Ints 1 and 5 in Traps.txt.
+			:
+			: The incrementation rate would be exactly 1600 Hz if
+			: the processor's clock rate were exactly 10 MHz. In
+			: reality, it averages around 1400 Hz, and is depen-
+			: dent on battery power (among other things).
+			:
+			: The ROM sets the initial value of the timer to $B2,
+			: effectively giving it a period of 79 ticks. It uses
+			: the timer for Auto Power Down, which is set to
+			: occur after 6000 interrupts. If the clock rate were
+			: 9.875 MHz, the interrupt rate would be 20 Hz and
+			: countdown delay would be 5 minutes. I think it is
+			: safe to assume that the designers of the TI-92
+			: intended the APD delay to be 5 minutes.
+			:
+			: For this reason, and becaues it is unlikely that
+			: the designers intended the clock rate to be any-
+			: thing other than 10 MHz, I am inclined to think
+			: that they chose the initial value to be $B2 instead
+			: of $B1 for a very particular reason: auto-int 5
+			: will coincide with auto-int 1 with a period of 4,
+			: the maximum period possible. This insures that the
+			: TI-92 will run more smoothly than it would if the
+			: two interrupts coincided with a period of 2 or 1.
+			: If you don't understand this, don't worry -- it is
+			: only a matter of curiosity.
+
+:RW [600018]
+    <......10:76543210> = keyboard row mask; setting a bit masks the
+			: corresponding row of the keyboard from being
+			: read by [60001B].
+
+:RO [60001A]
+    <......1.|........> = ON key status (0=down, 1=up)
+    <........|76543210> = keyboard column mask; if a bit is clear, one or
+			: more keys in the corresponding column are being
+			: held down. Keys in rows masked by [600018] are
+			: ignored.
+
+:WO [60001C]
+    <...43210|........> = Something to do with LCD
+			: The TI-92's ROM writes $21 to this port during
+			: initialization, and $FF when the calculator is
+			: turned off.
+    <........|....3210> = bits <4321.> of contrast
+
+:WO [60001E]
+    <........|........> =
+
+-----------------------------------------------------------------------------
+THE KEYBOARD MATRIX
+-----------------------------------------------------------------------------
+
+As was hinted in the I/O ports section, the keyboard is accessed internally
+as a matrix with 10 rows and 8 columns. This matrix can be read by writing
+[600018], pausing to allow the I/O to recover, then reading [60001B].
+
+Row     +-------+-------+-------+-------+-------+-------+-------+-------+
+ V  Col>| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
++-------+-------+-------+-------+-------+-------+-------+-------+-------+
+| Bit 0 |  down | right |   up  |  left |  hand | shift |diamond|  2nd  |
+| Bit 1 |   3   |   2   |   1   |   F8  |   W   |   S   |   Z   | unused|
+| Bit 2 |   6   |   5   |   4   |   F3  |   E   |   D   |   X   | unused|
+| Bit 3 |   9   |   8   |   7   |   F7  |   R   |   F   |   C   |  STO  |
+| Bit 4 |   ,   |   )   |   (   |   F2  |   T   |   G   |   V   | space |
+| Bit 5 |  TAN  |  COS  |  SIN  |   F6  |   Y   |   H   |   B   |   /   |
+| Bit 6 |   P   | ENTER2|   LN  |   F1  |   U   |   J   |   N   |   ^   |
+| Bit 7 |   *   |  APPS | CLEAR |   F5  |   I   |   K   |   M   |   =   |
+| Bit 8 | unused|  ESC  |  MODE |   +   |   O   |   L   | theta |backspc|
+| Bit 9 |  (-)  |   .   |   0   |   F4  |   Q   |   A   | ENTER1|   -   |
++-------+-------+-------+-------+-------+-------+-------+-------+-------+
+
+Note: ENTER1 is on the alphabetic _and_ numeric keypads.
+      ENTER2 is next to the cursor pad.
+
+Because of the way the TI-92's keyboard is wired, if you hold down three
+keys that form the corners of a rectangle, the TI-92 will think you are
+also holding down the key at the fourth corner.
+
+The [ON] key is special, and is not part of the matrix.
+
+-----------------------------------------------------------------------------
+INTERNAL ROUTINES
+-----------------------------------------------------------------------------
+
+This section contains some system routines that are used in the TI-92's ROM
+to perform specific tasks.
+
+------------
+Reset_Link()
+------------
+Wait $4E20
+Mask Int 5
+Read [60000C].W
+[60000C].B = $E0
+Wait $0100
+Set bit 0 of [60000E].B
+Set bit 1 of [60000E].B
+Wait $0100
+Clear bit 0 of [60000E].B
+Clear bit 1 of [60000E].B
+Wait $0100
+Flush()
+
+-------
+Flush()
+-------
+[60000C].B = $8D
diff --git a/docs/ti_hw/fargo/RAM-1_x.txt b/docs/ti_hw/fargo/RAM-1_x.txt
new file mode 100644
index 0000000..99f7965
--- /dev/null
+++ b/docs/ti_hw/fargo/RAM-1_x.txt
@@ -0,0 +1,235 @@
+-----------------------------------------------------------------------------
+RAM ADDRESSES (LOW MEMORY GLOBALS)
+-----------------------------------------------------------------------------
+
+Note: These addresses apply only for ROM versions 1.2 through 1.12.
+
+00000	: interrupt vector table to 000FF
+00100	:
+
+00120	: (4000) user stack
+04120	: (0320) supervisor stack
+04440	: (0F00) LCD memory
+05340.B	: contrast
+05341.B	:
+05342.B	: Break indicator (nonzero = [ON] has been pressed)
+05343.B	:
+
+05346.W	:
+05348	: (0008)[6] countdown timers, numbered from 0 to 5
+	+0000.L	: initial value of timer
+	+0004.L	: current value of timer; decremented every time
+			Auto-Int 5 is triggered. When it reaches zero, it
+			is reset to its initial value.
+	Notes:	Timer 1 is the countdown timer for APD (Auto Power Down).
+		This timer is initialized to 00001770 whenever data is
+		received into the software link or keyboard buffers. When
+		it reaches zero, if the TI-92 is idle it will turn itself
+		off.
+
+05380	: (0002)[6] words (corresponding to 6 timers at 05348)
+	+0000.W	: When a timer expires, this word is set to 0001.
+
+0538E	: (000C)[2] structures (corresponding to 6 timers at 05348)
+	+0000.L	: When a timer expires, this callback function is called
+	+0004.L	: When a timer expires, this longword is decremented
+	+0008.L	:
+
+053E8	: (0088) circular byte buffer (used for link transmit buffer)
+	+0000.W	: buffer tail (insert byte at [buffer+tail])
+	+0002.W	: buffer head (read byte from [buffer+head])
+	+0004.W	: size of buffer (default: 0080)
+	+0006.W	: number of bytes currently stored in buffer
+	+0008	: circular buffer
+05470	: (0088) circular byte buffer (used for link receive buffer)
+	+0000.W	: buffer tail (insert byte at [buffer+tail])
+	+0002.W	: buffer head (read byte from [buffer+head])
+	+0004.W	: size of buffer (default: 0080)
+	+0006.W	: number of bytes currently stored in buffer
+	+0008	: circular buffer
+054F8.B	: set to 00 when link buffers are flushed
+054F9.B	: set to FF upon entering link ISR, set to 00 upon exiting
+		and when link buffers are flushed
+054FA.B	: set to 00 when link buffers are flushed
+054FB.B	: set to FF when link buffers are flushed
+	  set to 00 when link buffers are flush2-ed
+054FC.B	: set to 00 when link buffers are flush2-ed
+054FD.B	:
+054FE.W	: saved interrupt mask (see calls 4029C6 and 4029D2)
+05500.W	:
+
+05508.L	: SSP (saved when calculator turns off)
+0550C.L	: set to ________ when calc turns off, set to 0 when calc turns on
+05510.L	: checksum from 078B4 to [05536] plus from 00120 to 00FFF (saved
+	  when calculator turns off)
+
+05518.B	: max contrast (default: 1F)
+05519.B	: ? something to do with contrast (and maybe LCD ON/OFF status)
+0551A.L	: pointer after memory heap
+05520.L	: pointer to saved state information ($38 byte structure)
+
+056A0.L	: {estack_max_index}
+056A4.L	: {top_estack}
+056A8.W	: handle of estack
+056AA.L	: pointer to bottom of estack
+
+056B0.W	: handle of currently running TI-BASIC program (zero if none)
+056B2.L : pointer to top TI-BASIC token
+056B6.L : pointer to current TI-BASIC token
+
+056C4.L	: pointer to string for get_lower_char functions
+056C8.B	: character result of get_lower_char functions
+
+05764.L	: menu pointer for 1:Home
+05768.L	: menu handle for  1:Home
+0576A.L	: menu pointer for 2:Y= Editor
+0576E.L	: menu handle for  2:Y= Editor
+05770.L	: menu pointer for 3:Window Editor
+05774.L	: menu handle for  3:Window Editor
+05776.L	: menu pointer for 4:Graph
+0577A.L	: menu handle for  4:Graph
+0577C.L	: menu pointer for 5:Table
+05780.L	: menu handle for  5:Table
+05782.L	: menu pointer for 6:Data/Matrix Editor
+05786.L	: menu handle for  6:Data/Matrix Editor
+05788.L	: menu pointer for 7:Program Editor
+0578C.L	: menu handle for  7:Program Editor
+0578E.L	: menu pointer for 8:Geometry
+05792.L	: menu handle for  8:Geometry
+05794.L	: menu pointer for 9:Text Editor
+05798.L	: menu handle for  9:Text Editor
+
+05820	: (002A) window structure
+0584A.W	: ?
+0584C	: (002A) window structure
+05876.W	: ?
+05878	: (002A) window structure for PrgmIO
+
+05904.W	: name length of variable in        7:Program Editor
+05906.L	: pointer after name of variable in 7:Program Editor
+0590A	: $00 + folder\name of variable in  7:Program Editor
+
+05946	: (002A) window structure for       7:Program Editor
+
+05A28.L	: pointer after name of variable in 9:Text Editor
+05A2C	: $00 + folder\name of variable in  9:Text Editor
+
+05A68	: (002A) window structure for       9:Text Editor
+
+05AD2	: (002A) window structure for 6:Data/Matrix Editor
+
+05BA0.W	: {colint}
+05BA2.W	: {rowint}
+
+05C10	: (0012) screen structure
+	+0000.L	: pointer to current video buffer
+	+0004.B	: width-1 (in pixels)
+	+0005.B	: height-1 (in pixels)
+	+0006.W	: current font
+	+0008.W	: line thickness
+	+000A.W	: x pos
+	+000C.W	: y pos
+	+000E.B	: left edge of clipping rect
+	+000F.B	: top edge of clipping rect
+	+0010.B	: right edge of clipping rect
+	+0011.B	: bottom edge of clipping rect
+05C22.W	: character height (current font)
+
+05C28.W	: character width (current font)
+05C2A.W	: text height (current font)
+
+05C30.W	: screen width (bytes)
+
+05C44	: (0008) rect: used to store tempory bounding box)
+05C4C	: (0008) rect: used to store tempory bounding box)
+
+05C54.L : pointer to current window
+05C58	: (002A) window structure used to store standard window
+
+05CA6	: (002A) window structure
+05CD0.W	: used to store a copy of 057B8
+05CD2	: (0012) used to store a copy of the screen structure at 05C10
+
+05D04.W	: handle of custom menu labels (what you see)
+05D06.W	: handle of custom menu actions (what you get)
+
+05D2C.W : max number of elements in heap table before it needs to be resized
+05D2E.L	: pointer to first byte of free memory in heap
+05D32.L	: gen mem scratch var? contents depend on what was last used..
+05D36.L	: pointer to top of memory heap
+
+05D3C.B	: ?
+
+05D3E.L	: ?
+
+05D42.L	: pointer to heap table
+
+05D8C.W	: handle of folder list
+05D8E.W : handle of main folder (?)
+
+05D72.W : handle of main folder (?)
+
+05DE4	: (002A) window structure for 4:Graph
+
+05E38	: (002A) window structure for 3:Window Editor
+
+05E8C	: (002A) window structure for 5:Table
+
+065CE	: (002A) window structure for 2:Y= Editor
+
+06B0E	: (002A) window structure for 8:Geometry
+
+07512.W	: 1=display graph number (i.e. if there are two graphs activated)
+
+0755E	: (002A) window structure
+
+07594.W	: current keypad scancode
+07596.W	: current status of modifiers
+
+075A0.W	: current keypad scancode (same as 07594?)
+075A2.W	: current status of modifiers (same as 07596?)
+
+075AA	: (000A) circular word buffer (used for key buffer)
+	+0000.W	: buffer tail (insert word at [buffer+tail])
+	+0002.W	: buffer head (read word from [buffer+head])
+	+0004.W	: size of buffer (default: 0002)
+	+0006.W	: number of bytes currently stored in buffer
+	+0008	: circular buffer
+
+075DA	: buffer for storing link packets
+
+075E4.W	: number of items in history
+075E6.W	: item in history currently pointed to
+
+0761C.W	: status line flags, part 1
+	<........|.......0> = 2nd has been pressed
+	<........|......1.> = diamond has been pressed
+	<........|.....2..> = shift has been pressed
+	<........|....3...> = hand has been pressed
+	<........|..5.....> = 2nd-hand has been pressed
+	<........|.6......> = angle mode
+			    : 0=RADIAN
+			    : 1=DEGREE
+	<.......0|7.......> = exact/approx
+			    : 0=AUTO
+			    : 1=EXACT
+			    : 2=APPROXIMATE
+			    : 3=AUTO (?)
+	<...432..|........> = graph mode
+			    : 1=FUNCTION
+			    : 2=PARAMETRIC
+			    : 3=POLAR
+			    : 4=SEQUENCE
+			    : 5=3D
+	<.65.....|........> = activity
+			    : 0=idle
+			    : 1=busy
+			    : 2=paused
+	<7.......|........> = a help message is being displayed
+0761C.W	: status line flags, part 2
+	<........|....32..> = battery level
+			    : 0=good
+			    : 1=replace soon
+			    : 2=replace NOW!
+
+078B4	: Start of dynamic heap
diff --git a/docs/ti_hw/fargo/ROM-2_1.txt b/docs/ti_hw/fargo/ROM-2_1.txt
new file mode 100644
index 0000000..eb5a61b
--- /dev/null
+++ b/docs/ti_hw/fargo/ROM-2_1.txt
@@ -0,0 +1,1088 @@
+char = signed 8-bit integer
+short = signed 16-bit integer
+int = signed 16-bit integer
+long = signed 32-bit integer
+void * = absolute 32-bit pointer
+
+? = name and function unknown
+?something = guessed name, where actual name is unknown
+something? = guessed name, where actual name and function is uncertain
+{something} = description, where name is unknown
+{something?} = description, where name is unknown and function is uncertain
+
+-----------------------------------------------------------------------------
+
+typedef unsigned char  BYTE;
+typedef unsigned short WORD;
+typedef unsigned long  LONG;
+typedef signed char   SBYTE;
+typedef signed short  SWORD;
+typedef signed long   SLONG;
+typedef LONG size_t;
+
+typedef (void *) EStackIndex;
+typedef WORD EStackDisplacement;
+
+typedef union {
+        void *v;
+	BYTE *b;
+        WORD *w;
+        LONG *l;
+        SBYTE *sb;
+        SWORD *sw;
+        SLONG *sl;
+} PTR_ALL;
+
+typedef WORD HANDLE;
+
+typedef struct {
+	HANDLE h; // handle of folder
+	WORD ?disp; // displacement of symbol
+} HSYM;
+
+typedef struct {
+	BYTE left;
+	BYTE top;
+	BYTE right;
+	BYTE bottom;
+} RECT;
+
+typedef struct {
+	WORD Flags;		// 00
+	BYTE CurFont;		// 02
+	BYTE CurAttr;		// 03
+	BYTE Background;	// 04
+	/* blank */		// 05
+	WORD TaskID;		// 06
+	WORD CurX;		// 08
+	WORD CurY;		// 0A
+	WORD CursorX;		// 0C
+	WORD CursorY;		// 0E
+	RECT Client;		// 10
+	RECT Window;		// 14
+	RECT Clip;		// 18
+	RECT Port;		// 1C
+	WORD DupScr;		// 20
+	WINDOW *Next;		// 22
+	char *Title;		// 26
+} WINDOW;
+
+typedef struct {
+	WORD left;
+	WORD top;
+	WORD right;
+	WORD bottom;
+} WIN_RECT;
+
+typedef struct {
+	EStackIndex i;
+	EStackDisplacement o;
+} ESTACK_AND_OFFSET;
+
+typedef struct {
+	BYTE name[8];
+	WORD ?flags;
+	HANDLE hVal;
+} SYM_ENTRY;
+
+#define H_NULL (HANDLE)0
+#define SETUP_FAST_DEREF register scratchHeap = Heap;
+#define DEREF(h) Heap[h]
+#define FDEREF(h) scratchHeap[h]
+#define DEREF_SYM(hsym) DerefSym(hsym)
+#define FDEREF_SYM(hsym) (FDEREF[hsym.h] + hsym.?disp)
+
+#define STOF_ESI  0x4000
+#define STOF_HESI 0x4003
+
+#define TRY if(!(scratch = ER_catch(errorframe))) {
+#define ONERR ER_success(); } else {
+#define ENDTRY }
+#define PASS ER_throwVar(scratch)
+
+#define UNDEFINED_TAG 0x2A
+#define LIST_TAG      0xD9
+#define MATRIX_TAG    0xDB
+#define END_TAG       0xE5
+
+#define ER_STOP          2
+#define ER_DIMENSION   230
+#define ER_MEMORY      670
+#define ER_MEMORY_DML  810
+
+-----------------------------------------------------------------------------
+
+005620	BYTE ?
+005622	BYTE OSOnBreak
+005623	BYTE ?OSDisableBreak
+005624	WORD {saved SR}
+
+0057F9	BYTE ?
+0057FA	void *{end of usable RAM}
+
+005806	float ?scratch1
+005812	float ?scratch2
+
+005910	void *?
+005914	void *?
+005918	void *?
+00591C	void *?
+005920	void *?
+005924	void *?
+005928	void *?
+00592C	void *?
+005930	void *?
+005934	void *?
+005938	void *?
+00593C	void *?
+005940	void *?
+005944	void *?
+005948	void *?
+00594C	void *?
+
+005968	float ?
+005972	float ?
+00597C	EStackIndex ?bottom_expression
+005980	EStackIndex estack_max_index
+005984	EStackIndex top_estack
+005988	HANDLE ?estack_handle
+00598A	EStackIndex bottom_estack
+00598E	BYTE {indicates how a function returned}
+005990	HANDLE NG_code_handle
+005992	LONG ?
+005996	BYTE *{current TI-BASIC instruction}
+
+00599C	BYTE {error something}
+00599E	WORD ERR_code_handle
+0059A0	WORD {error something}
+0059A2	WORD {error something}
+0059A4	BYTE *?{text being interpreted}
+
+0059B4	float ?
+0059BE	float ?
+0059CA	BYTE ?tag0
+0059CB	BYTE ?tag1
+0059CC	BYTE ?tag2
+0059CE	WORD ?estack_size
+0059D0	LONG ?{flags}
+0059D4	WORD ?{flags}
+0059D6	WORD NG_control
+0059D8	LONG ?
+0059DC	LONG ?
+0059E0	LONG ?
+0059E4	LONG ?
+0059E8	WORD ?
+0059EA	WORD ?
+0059EC	WORD ?
+0059EE	WORD ?
+0059F0	LONG ?
+0059F4	EStackIndex ?reg0
+0059F8	EStackIndex ?reg1
+0059FC	EStackIndex ?reg2
+005A00	EStackIndex ?reg3
+005A04	EStackIndex ?reg4
+005A08	EStackIndex ?reg5
+
+005A36	BYTE *{TI-BASIC text being interpreted}
+005A3A	BYTE *{TI-BASIC text being interpreted}
+
+005A80	{pointer to event handler callback function}
+005A84	WORD EV_runningApp
+005A86	WORD EV_currentApp
+005A88	WORD EV_appA
+005A8A	WORD EV_appB
+
+005A8E	WORD EV_errorCode
+
+005B84	HANDLE ?
+
+005D80	WORD colint
+005D82	WORD rowint
+
+005DB2	WORD wData.Flags
+
+005E7A	HANDLE hdmfolder
+005E7C	BYTE dmTag
+
+005EDC	?DATA *dataptr
+
+005EF0	void *?scr_vidbuf
+005EF4	BYTE ?scr_max_x
+005EF5	BYTE ?scr_max_y
+005EF6	WORD ?scr_attr
+005EF8	WORD ?scr_line_thickness
+005EFA	WORD ?scr_x_pos
+005EFC	WORD ?scr_y_pos
+005EFE	RECT ?scr_clip_rect
+005F02	WORD {character height}
+005F04	RECT ScrRect
+005F08	WORD ?SysFontX
+005F0A	WORD SysFontY
+005F0C	BYTE GL_ShadeMods[2]
+005F0E	WORD GL_ShadeOffset
+005F10	WORD ?SysScrWidth
+
+005F30	WINDOW FirstWindow
+
+005FEC	BYTE GOK_Flag
+
+005F64	.bss from dialog.o (0x000C bytes)
+005F64	WORD ?
+005F66	WORD ?
+005F68	WORD ?
+005F6A	WORD ?
+005F6C	CurTE
+
+006000	.bss from ?heap.o (0x0022 bytes)
+
+00600C	WORD {number of elements in the heap table}
+00600E	void *?
+006012	void *?
+006016	void *?
+00601A	void *{first free byte in the heap}
+00601C	BYTE HeapAllocSysFlag
+00601E	void *?scratch
+006022	void **Heap
+
+006042	BYTE ?some_symbol_name[8]
+00604C	WORD ?num_symbols_in_last_used_folder
+00604E	WORD ?whatever_in_last_used_folder
+006050	SYM_ENTRY *?last_used_folder
+006054	SYM_ENTRY *?last_used_folder
+006058	SYM_ENTRY *?last_used_folder
+
+006060	WORD SymTempFolCount
+
+006066	BYTE *?some_folder_name
+00606A	HANDLE ?some_folder_handle
+00606C	HANDLE ?folderList
+
+006070	HANDLE DefTempHandle
+006072	WORD ?
+006074	WORD {error code}
+006076	WORD ?
+
+0060BA	WORD gr_flags
+0060BC	? *gr_active
+0060C0	? *gr_other
+
+00616C	WINDOW wTable1
+006196	WINDOW wTable2
+
+006BA8	zFit
+
+006BD0	WORD seqmode
+
+006CB0	.bss from aptabled.o (0x0090 bytes)
+
+006DB0	WORD SE_offset
+
+007950	WORD MO_splitScreen
+007952	WORD MO_graphCount
+
+007956	WORD MO_fix
+
+00795C	WORD MO_flags
+00795E	WORD ?
+
+00796E	option
+
+0079BE	?BUFFER ?key_buffer
+
+007A36	WINDOW {status line window}
+007A60	LONG ?ST_flags
+
+007A7C	void **?current_stdout_stream
+
+007D30	LONG {random number seed}
+
+40069E	_bcd_math()
+
+400EAC	void ER_throwVar(WORD errorNum)
+400ED6	WORD ER_catch(void *ErrorFrame)
+400EFC	void ER_success(void)
+
+401C20	{TRAP 0 origin}
+
+402102	void off(void)
+402106	void idle(void)
+40210E	OSClearBreak()
+402116	WORD OSCheckBreak(void)
+40211E	OSDisableBreak()
+402124	OSEnableBreak()
+
+402BFA	float FP360 = 360.0
+402C04	float FP180 = 180.0
+402C0E	float ?FPNINE = 9.0
+402C18	float ?FP45 = 45.0
+402C22	float RAD2DEG = 57.29577951308232
+402C2C	float DEG2RAD = 0.0174532925199433
+402C36	float FPZERO = 0.0
+402C40	float FPPTONE = 0.1
+402C4A	float ?FP24THPI = 0.13089969389957
+402C54	float FPPTFIVE = 0.5
+402C5E	float FPPTNINE = 0.9
+402C68	float FPONE = 1.0
+402C72	float ?FPSQRT2 = 1.4142135623731
+402C7C	float ?FPTWO = 2.0
+402C86	float ?FPTHREE = 3.0
+402C90	float ?FPTWOPI = 6.28318530718
+402C9A	float ?FPTEN = 10.0
+402CA4	float ?FPNTEN = -10.0
+402CAE	float ?FP12 = 12.0
+402CB8	float ?FP14 = 14.0
+402CC2	float ?FP20 = 20.0
+402CCC	float ?FP70 = 70.0
+402CD6	float FPBIGGEST
+402CE0	float FPNEGBIGGEST
+402CEA	float FP16000 = 16000.0
+402CF4	float FPN16000 = -16000.0
+402CFE	float ?FPMAXINT = 32767.0
+402D08	float ?FPNMAXINT = -32768.0
+402D12	float ?FPMAXWORD = 65535.0
+402D1C	float ?FP1E14 = 1.0E+14
+402D26	float FP_INVALID
+402CFE	float ?FPLOGE = 0.4342944819032518
+
+4035F4	void {clear key buffer}(?BUFFER *buffer)
+
+40D956	void {resets some tag pointers}(void)
+40D9D8	void ?push_01_01_1F(void)
+40DA08	void ?push_00_1F(void)
+40DA2E	void ?push_01_01_20(void)
+40DA5E	void ?push1(void)
+40DA7A	void push0(void)
+40DA96	void ?push_01_01_00_21(void)
+40DAD2	void ?push2(void)
+40DAEE	?()
+40DB30	?()
+40DB72	?()
+40DBB4	?()
+40DBF2	?()
+
+411302	?{calls a function}()
+
+4115AA	delete_list_element()
+
+417D5E	?(EStackIndex esi)
+41896C	display_statements()
+418B00	void Parse1DExpr(EStackIndex OldTop, Boolean torf, unsigned short width)
+
+421E62	void ?{interpret TI-BASIC text}(EStackIndex esi)
+423856	void ?(EStackIndex esi)
+423922	void push_simplify_statements(EStackIndex esi}
+423C84	{instruction -> routine table}
+
+42A91E	void {resets some stuff}(void)
+
+42FD64	void push_quantum(BYTE tag)
+42FD86	void push_quantum_pair(BYTE tag1, BYTE tag2)
+42FDB6	void push_between(EStackIndex bottom, EStackIndex top)
+42FE06	void delete_between(EStackIndex bottom, EStackIndex top)
+42FE34	WORD deleted_between(EStackIndex bottom, EStackIndex top)
+42FE58	void delete_expression(EStackIndex esi)
+42FE70	WORD deleted_expression(EStackIndex esi)
+42FE88	void move_between_to_top(EStackIndex bottom, EStackIndex top)
+42FEAE	WORD moved_between_top_top(EStackIndex bottom, EStackIndex top)
+42FED4	EStackIndex next_expression_index(EStackIndex esi)
+4300F2	void push_expression(EStackIndex esi)
+43010A	BYTE min_quantum(BYTE a, BYTE b)
+430122	void push_next_arb_int(void)
+43013A	void push_next_arb_real(void)
+430152	void push_expr_quantum(EStackIndex op1, BYTE tag)
+43016A	void push_expr2_quantum(EStackIndex op1, EStackIndex op2, BYTE tag)
+43018C	Boolean ?is_statement(EStackIndex esi, BYTE tag) // is_executable?? is_free_of_tag?
+430216	void {reset a whole lot of stuff}(void)
+4302B2	void ?create_estack(void)
+430324	void reset_estack_size(WORD newsize)
+430378	void check_estack_size(EStackDisplacement i)
+43041E	void reset_control_flags(void)
+4304A6	BYTE *find_error_message(WORD errorCode)
+430510	WORD {proper error code}(WORD errorCode)
+43053A	clear_error_context()
+430560	void {error dialog with error name and line number}(WORD errorNum, WORD *errorName, WORD lineNum, BYTE *buffer)
+4305A1	float ? = 0.0
+4305AB	float ? = 1.0
+4305B5	float ? = -1.0
+4305BF	float ? = 3.1415926535898
+4305C9	float ? = 0.5
+4305D3	float ? = 2.0
+4305DD	float ? = 0.001745329251994423
+4305E7	float ? = 57.29577951308223
+4305E8	void {resets some stuff}(void)
+43061A	?()
+430660	?()
+4306C0	?()
+4307E4	float estack_to_float(EStackIndex esi)
+430828	Boolean is_nan(float x)
+43083E	?()
+43085A	void push_pow(EStackIndex x, EStackIndex y)
+4308DE	void push_Float(float x)
+
+432BD2	?{compile TI-BASIC text}()
+
+4339F2	?{compile TI-BASIC text}()
+4348B2	?{compile TI-BASIC text}()
+4349B2	?{push compiled TI-BASIC onto estack}(BYTE *text)
+
+445206	{instruction -> name table}
+
+447A7A	?()
+
+448948	EV_captureEvents()
+448954	?()
+4489F4	?()
+448A08	EV_defaultHandler()
+448F7C	EV_eventLoop()
+4491F6	EV_getSplitRect()
+449210	?()
+449268	?()
+449300	EV_paintWindows()
+449312	EV_registerMenu()
+44932A	EV_restorePainting()
+449344	?()
+44935C	?()
+4493D0	?()
+4493FC	?()
+44942A	EV_setCmdState()
+449458	EV_setFKeyState()
+4494BA	void EV_startApp(WORD newApp, WORD ?)
+4495A4	?()
+44961A	?()
+44964A	EV_suspendPainting()
+44965A	?()
+4496AC	?()
+4496F6	?()
+44972A	?()
+44974E	?()
+44977C	?()
+449800	?()
+449850	?()
+4498AA	?()
+449900	?()
+449988	?()
+449A4A	?()
+449A68	?()
+449A82	?()
+449AA0	CU_restore()
+449ABC	?()
+449ADA	CU_stop()
+
+44C3CA	{something that draws clipped text with the medium font?}()
+
+44CB26	void {Pause instruction}(EStackIndex message)
+44CBC2	?()
+44CC3C	?()
+44CC60	?()
+44CC82	?()
+44CCDC	?()
+44CD0C	?()
+44CD58	?()
+44CD8E	?()
+44CDB4	?()
+44CDE0	?()
+44CE1A	?()
+44CE78	?()
+44CEB0	void *HToESI(HANDLE h)
+44CECC	?()
+44D15C	?()
+
+450622	TE_close()
+450652	?()
+4506D6	TE_focus()
+45071C	TE_handleEvent()
+450A9A	?()
+450AA8	TE_isBlank()
+450ADE	TE_open()
+450C0C	TE_openFixed()
+450CB2	?()
+450D20	?()
+450D4E	?()
+450D90	TE_reopen()
+450DCC	?()
+450DF8	TE_select()
+450E84	TE_shrinkWrap()
+450EC0	TE_unfocus()
+
+4549BC	partial_len(BYTE *?, BYTE *?)
+454A38	CharNumber()
+
+456BA0	DrawClipChar()
+456CD6	DrawClipLine()
+456D14	DrawClipPix()
+456D54	DrawClipEllipse()
+456F0E	DrawClipRect()
+4571FE	DrawMultiLines()
+45725C	DrawStrWidth()
+4572C8	BYTE FontSetSys(BYTE)
+45731A	BYTE FontGetSys(void)
+457320	WORD FontCharWidth(BYTE ch)
+45735C	GetPix()
+457394	LineTo()
+4573D2	MoveTo()
+4573E0	PortSet()
+457404	PortRestore()
+457420	RestoreScrState()
+457458	SaveScrState()
+457472	?()
+4574E8	ScrRectFill()
+45754E	BitmapGet()
+4575F2	BitmapInit()
+457620	ScrRectOverlap()
+4576AE	BitmapPut()
+457D14	ScrRectScroll()
+457F30	ScrRectShift()
+458108	BitmapSize()
+458134	QScrRectOverlap()
+458168	ScreenClear()
+458198	?()
+4581E4	SetCurAttr()
+4581F0	SetCurClip()
+4581FA	DrawChar()
+458226	DrawFkey()
+458290	DrawIcon()
+4582FE	DrawLine()
+4587F6	DrawPix()
+45885C	DrawStr()
+4588D6	FillTriangle()
+458DC4	FillLines2()
+45906E	BYTE *?FindPixel(WORD x, WORD y)
+459098	?()
+4591A8	?DrawCharMask()
+4593B8	?()
+4595DE	?()
+459674	DrawWinBorder()
+459870	RectWinToWin()
+459898	ScrToHome()
+4598C0	RectWinToScr()
+45997E	ScrToWin()
+4599AE	MakeWinRect()
+4599CC	ScrRectDivide()
+
+459B28	UpdateWindows()
+
+459D10	.text from win.o (0x1866 bytes)
+459D10	WINDOW DeskTop0
+459D3A	WinWidth()
+459D50	WinHeight()
+459D66	WinActivate()
+459D82	WinAttr()
+459D92	WinBackupToScr()
+459DD8	WinBackground()
+459DE4	WinBegin()
+459DF8	WinBitmapGet()
+459EA6	WinBitmapPut()
+459F64	WinBitmapSize()
+459F96	WinChar()
+45A05E	WinCharXY()
+45A102	WinClose()
+45A116	WinClr()
+45A17C	WinDeactivate()
+45A19E	WinDupStat()
+45A1CA	WinEllipse()
+45A276	WinFill()
+45A328	WinFillTriangle()
+45A40C	WinFont()
+45A426	WinHide()
+45A43A	WinHome()
+45A45C	WinInit()
+45A494	WinLine()
+45A554	WinLineNC()
+45A648	WinLineTo()
+45A71E	WinLineRel()
+45A744	WinMoveTo()
+45A756	WinGetCursor()
+45A770	WinFillLines2()
+45A852	WinMoveCursor()
+45A874	WinMoveRel()
+45A88E	WinOpen()
+45AAB2	WinReOpen()
+45ACF6	WinPixGet()
+45ADB0	WinPixSet()
+45AE76	WinRect()
+45AF12	WinScrollV()
+45AFDC	WinScrollH()
+45B0A6	WinStrXY()
+45B0D4	WinStr()
+45B15E	ActivateWindow()
+45B204	ClearPortRegion()
+45B242	WinCharClip()
+45B3E8	WinFind()
+45B41C	WinNewLine()
+45B430	WinRemove()
+45B500	SetShadeOffset()
+45B578	.text from ?font.o
+45B578	SF_font
+
+45CD78	.text from dialog.o (0x142E bytes)
+45CD78	char *SB_Names[6]
+45CDCC	Dialog()
+45D732	NoCallBack()
+45D736	DialogDo()
+45D784	DialogNew()
+45D7D4	DialogAdd()
+45DA0A	DrawStaticButton()
+45DA82	DlgText()
+45DAB8	PopupDraw()
+45DD0E	EditDraw()
+45E0D0	DialogEventHandler()
+45E1A6	.text from ?menu.o
+45E1D8	MenuInit()
+45E206	MenuUpdate()
+45E23C	MenuPopup()
+45E2DA	MenuSubStat()
+45E346	MenuTopStat()
+45E3A4	MenuCheck()
+45E424	MenuBegin()
+45E5E2	MenuOn()
+45E612	MenuTopSelect()
+45E650	MenuTopRedef()
+45E6AA	MenuGetTopRedef()
+45E6DC	MenuEnd()
+
+45FA42	GetPopupOffset()
+
+45FDBC	MenuItemName()
+45FDF8	?()
+45FE3C	?()
+45FEB0	?()
+45FEE2	?()
+45FF2A	MenuItemNSub()
+
+46108E	GKeyIn()
+4611D4
+4611E2	{keyboard data}
+461200	char *?[3]
+46122A	char *?[3]
+461242
+4613D0	QModeKey()
+
+461FB4	.text for ?heap.o (0xFF2 bytes)
+461FB4	void *HeapEnd(void)
+461FBA	HeapAllocPtr()
+461FFC	HeapFreePtr()
+46201A	HeapAvail()
+462026	HeapMax()
+462036	?()
+4620BC	LONG HeapSize(HANDLE h)
+4620E4	HeapFreeIndir(HANDLE h)
+4620FE	HeapFree(HANDLE h)
+46217C	HANDLE HeapAlloc(LONG size)
+46219A	?()
+4621EE	HeapAllocESTACK()
+46226C	HANDLE HeapAllocHigh(LONG size)
+4622A6	HANDLE HeapAllocThrow(LONG size)
+4622BE	HeapAllocHighThrow()
+4622D6	HANDLE HeapRealloc(HANDLE h, LONG newsize)
+4625DA	void *HLock(HANDLE h)
+4625F0	HANDLE HeapLock(HANDLE h)
+462616	WORD HeapGetLock(HANDLE h)
+46263A	HANDLE HeapUnlock(HANDLE h)
+462666	HeapMoveHigh()
+4626A8	void *HeapDeref(HANDLE h)
+4626B8	?()
+46275A	LONG {turn requested block size into actual allocated size}(LONG size)
+462782	void *{generic heap realloc high?}(LONG size, void *block, WORD ?flags)
+4629EA	?()
+462B30	HeapCompress()
+462CEE	HeapGetHandle()
+462E6C	?()
+462F0E	HANDLE {generic heap alloc high?}(LONG size, WORD ?flags)
+462F60	void NeedStack(WORD size)
+462F7A	FreeHandles()
+462FA6	.text for ?sym.o
+462FAC	char *MAIN_FOLDER = "main"
+462FB2	char *DATA_FOLDER = "9998"
+462FB8	char *?GEOM_FOLDER = "9999"
+462FBD	char *{backslash} = "\"
+462FC0	?()
+463114	{init symbol stuff}
+4631A4	?()
+4631E8	?()
+46322E	?FolderTempName(WORD tempNum)
+463256	FolderDelAllTemp()
+463284	HSYM AddSymToFolder(BYTE *sym_name, BYTE *folder_name)
+4632EE	HSYM FindSymInFolder(BYTE *sym_name, BYTE *folder_name)
+4633D0	SymAdd()
+4633F0	?()
+463410	HSYM SymFind(BYTE *sym_name)
+463430	HSYM SymFindMain(BYTE *sym_name)
+463450	?()
+463488	SymDel()
+4634F0	void HSymDel(HSYM hsym)
+4635B6	?()
+463624	WORD FolderFind(BYTE *folder_name)
+46367C	?()
+4636EE	?()
+463702	HANDLE FolderAdd(BYTE *folder_name)
+4637C2	FolderDel()
+463AF8	SYM_ENTRY *DerefSym(HSYM hsym)
+
+463E2C	int ?strcmp8(char *s1, char *s2)
+
+464046	?(void *?)
+464152	HSYM ?GetHSym(SYM_ENTRY *SymEntry, HANDLE SymList)
+46417E	?()
+46427E	?(void *?, WORD ?)
+46438E	?()
+4643E2	?()
+4644A0	?()
+4645BE	SYM_ENTRY *?FindSymEntry(HANDLE list, BYTE *name)
+464690	?(void *?, HANDLE ?)
+
+464CF0	void VarStore(BYTE *DestVar, WORD Flags, WORD SourceSize, ...)
+466020	?()
+4660C4	?()
+466146	VarGraphRefBitsClear()
+466156	?()
+46616E	?()
+4662AC	?()
+4662DA	?()
+46632A	?()
+4663DE	ResetSymFlags()
+
+468EE2	DlgMessage()
+46906C	?()
+46B8EA	FindGrFunc()
+46B974	FindFunc()
+46BA6C	grFuncName()
+46BB12	?()
+46BB42	execute_graph_func()
+46BBDA	?()
+46BC84	?()
+46BCC8	?()
+46BE12	?()
+46BEDA	?()
+46BF24	?()
+46BF4C	gr_del_locals()
+46C002	?()
+46C072	?()
+46C158	?()
+46C268	?()
+46C416	?()
+46C614	grKeyCheck()
+46C6CE	?()
+46C722	?()
+46C806	?()
+46C834	?()
+46C88A	?()
+46C91C	?()
+46C958	?()
+46C982	gr_xres_pixel()
+46CA78	?()
+46CAA8	?()
+46CB02	?()
+46D128	?()
+46D57E	time_loop()
+46D7F0	?()
+46D824	CountSeqFunc()
+46D884	InitTimeSeq()
+46DC44	FirstSeqPlot()
+46DD68	cleanup_seq_mem()
+
+47170C	.text from graph3d.o (0x320A bytes)
+47170C	GR3_paint3d()
+4717DC	GR3_xyToWindow()
+471BEC	addPointToPoly()
+471C28	addTripleToPoly()
+471C8E	apply()
+471DB6	bPointsValid()
+471F70	bZInBounds()
+471FBC	bZOutOfBounds()
+472004	calcExtremes()
+472102	calcScale()
+47249A	drawAxes()
+472788	drawBox()
+472C7E	drawHidden()
+473070	drawLabels()
+4732A8	drawWire()
+473438	drawWireLine()
+47361C	evalz()
+4738E0	orientIPoly()
+473970	outlineIPoly()
+473A12	paintIPoly()
+473B30	prep3d()
+473DC4	prepEye()
+474164	prepGrid()
+474366	transform()
+4744CC	transformPoly()
+474568	truncateLine()
+4745D6	truncatePoint()
+4746F6	truncatePoly()
+474826	worldToWindow()
+474918	.text from aptabled.o (0x5FF2 bytes)
+47491C	te_init
+474A5C	AP_table
+4764C2	tablepaint
+47690C	tableFormat
+47696A	TABLEMoveHighlight
+476A2C	TABLEUnhighlight
+476A54	tablecelldisp
+476A72	clrcolstr
+476AA6	getcolelem
+476B0E	getelement
+476B34	getxelement
+476B82	columnsym
+476C18	tesymtoesi
+476C5C	tetabletowin
+476CE4	resetclip
+476D26	tableEnableFKeys
+476E9A	authTEnableFKeys
+476F7E	Tablesetup
+47722E	TA_callBack
+477484	TblCptX
+477606	tblauthFillEdit
+477B70	getNameInfo
+477D58	tableShiftDown
+477E5A	tableShiftUp
+477F8A	calcdispX
+47819E	setuptblfunc
+4781FC	storetblfunc
+47824E	dispcurcoltbl
+4785B0	storetbinputstart
+478610	dispcolandprompt
+478662	cpt_tbl_fun
+478702	get_tbl_point
+47874A	calcnewcol
+47885E	setupcolexec
+4788BC	prepcoltostore
+4788F2	dispcolumnstbl
+478BE6	dispcolandprompt2
+478C34	getnextcol
+478C84	putnextcol
+478CD4	dispcolname
+478D92	drawlines
+478E92	TblStartValue
+4792F4	FindTblFunc
+479468	displayX
+4794C2	displayXASK
+47977A	independtitle
+479848	cpt_tbinput_ASK
+47991A	Tableinsert
+4799B0	Tabledelete
+479C68	authPutAwayFunc
+47A040	authPutAwayIndep
+47A168	TblClear
+47A1AE	empty_tblinput
+47A1D4	tbl_paint_seq
+47A3F6	tbl_cpt_seq_row
+47A866	tbl_cpt_seq_row_and_disp
+47A8B8	switchtoTauth
+47A8DA	incClipy
+
+47BED2	?{expr}()
+
+48147C	GraphOrTableCmd()
+
+482516	DecodeFloat()
+4825F8	NG_approxESI()
+48266A	?()
+4826DC	?()
+4827DA	NG_tokenize()
+482848	?()
+4828BE	NG_graphESI()
+4829F4	NG_setup_graph_fun()
+482B02	NG_cleanup_graph_fun()
+482B26	?()
+482C74	?()
+482C82	?()
+482C90	int callback_vprintf(void (*func)(char, void *), void *param, char *format, void *va_list)
+483644	?()
+4836F8	?strputchr(char ch, char **p) { *((*p)++) = ch; }
+483706	int sprintf(char *buffer, char *format, ...)
+483742	{variant of printf}(char *format, ...)
+483762	{variant of fprintf}(void **stream, char *format, ...)
+483784	?()
+483B14	{table of pointers to system variable names}
+483CF4	?()
+483D7E	?()
+483DCC	remaining_element_count()
+
+484D2C	push_reversed_tail()
+
+485494	fmod()
+485594	floor()
+4855C8	ceil()
+4855FC	fabs()
+485622	?()
+485686	acos()
+4856B6	?()
+4856E6	?()
+485716	?()
+485746	cos()
+48577E	sin()
+4857B6	?()
+4857EE	?()
+485822	?()
+485856	?()
+48588A	?()
+4858BC	?()
+4858EE	?()
+485920	?()
+485962	?()
+4859C0	?()
+4859F2	?()
+485A86	?()
+485D88	?()
+485DBA	?()
+485DEC	?()
+485E42	?()
+485E5A	?()
+485E96	?()
+485EB0	round12()
+485EE2	round14()
+
+4880A2	?()
+
+4C7FD8	{copyright screen event handler}()
+
+4C912A	void ERD_dialog(WORD errorNum)
+
+4C93EC	ERD_process()
+
+4C9B9A	MO_currentOptions()
+
+4C9D28	MO_digestOptions()
+
+4CE346	{variant of putchar, but does nothing}(char ch)
+
+4CFF00	pushkey()
+
+4CFF56	WORD ?getKey(void)
+
+4D00D0	void OSAlexOut(BYTE *message)
+
+4D0192	void ?(void)
+
+4D11C8	void ST_busy(WORD busy)
+4D1204	Boolean ST_eraseHelp()
+4D1246	?()
+4D12A8	?()
+4D12DC	void ?ST_showHelp(WORD ?flags, BYTE *message)
+4D12FA	?()
+4D137A	?()
+4D1400	?()
+4D1422	?()
+4D143C	void ST_refDsp(WORD ?)
+4D1466	?()
+4D1494	?()
+4D152A	void ?ST_redraw(void)
+4D15D0	?()
+4D1602	?()
+4D1642	?()
+4D16F0	?()
+4D1704	?()
+4D1764	?()
+4D17B0	?()
+4D17F4	void ?ST_clear(void)
+4D1828	void ?(void *?)
+4D1866	void ?ST_text(WORD x, BYTE *message)
+4D18C8	?()
+4D192C	?()
+4D1976	?()
+4D19DC	?()
+4D1A1C	?()
+4D1A6E	LONG ?OSTimerGet(WORD timerNum) /* timerNum is in 1..6 */
+4D1A7E	void ?OSTimerStart(WORD timerNum) /* timerNum is in 1..6 */
+4D1A98	void OSTimerRestart(WORD timerNum) /* timerNum is in 1..6 */
+4D1AD4	?()
+4D1B70	BYTE *os_version = "2.1"
+4D1B74	BYTE *os_date = "08/19/96"
+4D1B80	size_t strlen(char *s)
+4D1B98	int strncmp(char *s1, char *s2, size_t maxlen)
+4D1BEC	char *strncpy(char *dest, char *src, size_t maxlen)
+4D1C20	char *strcat(char *dest, char *src)
+4D1C44	char *strchr(char *s, int c)
+4D1C70	int strcmp(char *s1, char *s2)
+4D1C94	_du32u32()
+4D1CBE	_ds32s32()
+4D1D54	_du16u16()
+4D1D64	?_ds16u16()
+4D1D78	int rand(void)
+4D1DBA	void srand(unsigned int seed)
+4D1DD0	?_ru32u32()
+4D1DF0	?_rs32s32()
+4D1E44	?_ru16u16()
+4D1E52	?_rs16u16()
+4D1E6C	{variant of fputc}(char ch, void **stream)
+4D1EA8	long labs(long x)
+4D1EB4	void *memset(void *s, int c, size_t n)
+4D1F8C  int memcmp(void *s1, void *s2, size_t n)
+4D1FD4	void *memcpy(void *dest, void *src, size_t n)
+4D2108	void *memmove(void *dest, void *src, size_t n)
+4D2160	int abs(int x)
+4D216C	{variant of fputc}(char ch, void **stream)
+
+502B2E	DataClearDlg
+
+502C04	TableMenu
+
+502CA0	TableFormatDlg
+
+502D34	TableDialog
+
+502E0E	StartValueWarnDlg
+
+503EC4	XR_stringPtr
+
+5072F5	XRA_FloatFullPrec
+
+5072FC	XRA_XB_FloatFullPrec
+
+50A50C	{error strings}
+50E43E	{unknown error string} = "Unknown ERROR code"
+50F52C	{error pointer table}
+
+51330E	columnsym()
+
+513472	void *dmsymtoesi(HSYM hsym)
+
+516366	?()
+516388	?()
+516522	?()
+51652C	void initedit(void)
+516582	?()
+516608	?()
+5166EC	?()
+516720	?()
+516868	?()
+516A5E	?()
+516C5E	?()
+516D44	?()
+516E04	?()
+517056	?()
+517322	?()
+517574	?()
+5175DC	?()
+5176AA	?()
+5176FE	?()
+51772A	void resizelist(HSYM hsym, WORD IndexRow, EStackIndex OldTop)
+51787A	static void growmat(WORD oldrow, WORD oldcol, SWORD newrow, SWORD newcol, BYTE matdata)
+517BB4	static void dmtempfolder(void)
+517BD6	void storelist(void)
+517CCE	void storematrix(EStackIndex OldTop)
+518090	void openmatrix(EStackIndex esi)
+5182F6	static HSYM VarStoreData( BYTE *DestVar, WORD Flags, WORD SourceSize, long parm1, short parm2 )
+51838E	void restorelist(WORD Zerosize)
+5184C8	void disp1DExpr(EStackIndex esi, HANDLE *hText, Boolean torf, unsigned short width)
+51853E	void clearDMLedit(void)
+518588	void initcurdataptr(void)
+
+51C3B8	CptDeltax()
+
+51CCB8	HANDLE CreateEmptyList(void)
+51CCF0	?()
+51CD30	ck_valid_float()
+
+51D9AC	GT_Error()
+51D9CA	?()
+51DACC	?()
+51DB26	?()
+51DC22	?()
+51DDFC	?()
+51DE7E	GT_Open()
+51DF12	GT_SaveAs()
+
+5216CA	round12_err()
+
+529814	QSkipGraphErr()
diff --git a/docs/ti_hw/fargo/Traps.txt b/docs/ti_hw/fargo/Traps.txt
new file mode 100644
index 0000000..42159d7
--- /dev/null
+++ b/docs/ti_hw/fargo/Traps.txt
@@ -0,0 +1,191 @@
+-----------------------------------------------------------------------------
+INTRODUCTION
+-----------------------------------------------------------------------------
+
+The 68000 processor keeps a 256(d) byte exception vector table at the bottom
+of memory (address $000000). This table contains pointers to 64(d) vectors;
+each vector is an absolute pointer to a specific location in memory. Most of
+these vectors point to routines, although some have other functions. Each
+vector is referred to with an index between 0(d) to 63(d) inclusive.
+
+The vectors are assigned as follows:
+
+Address in table   Assigned function
+----------------   -----------------
+0000 to 0007       Reset vector (initial SSP and PC)  (0-1)
+0008 to 000B       Bus error vector                     (2)
+000C to 000F       Address error vector                 (3)
+0010 to 0013       Illegal instruction vector           (4)
+0014 to 0017       Zero divide vector                   (5)
+0018 to 001B       CHK instruction vector               (6)
+001C to 001F       TRAPV instruction vector             (7)
+0020 to 0023       Privilege violation vector           (8)
+0024 to 0027       Trace vector                         (9)
+0028 to 002F       Line 1010/1111 emulator vectors  (10-11)
+0030 to 003B       Unassigned, reserved             (12-14)
+003C to 003F       Uninitialised interrupt vector      (15)
+0040 to 005F       Unassigned, reserved             (16-23)
+0060 to 0063       Spurious interrupt vector           (24)
+0064 to 007F       Level 1-7 interrupt auto-vectors (25-31)
+0080 to 00BF       TRAP #0-15 instruction vectors   (32-47)
+00C0 to 00FF       Unassigned, reserved             (48-63)
+0100 to 03FF       User interrupt vectors          (64-255)
+
+Some of these vectors are triggered when an error is encountered by the
+68000 processor. Others can be triggered directly by a TRAP instruction.
+The interrupt auto-vectors, or auto-ints, are triggered when a specific
+hardware event occurs.
+
+Note: Any RAM addresses found here apply only to ROM 1.2 through 1.12.
+
+-----------------------------------------------------------------------------
+VECTORS USED BY THE TI-92
+-----------------------------------------------------------------------------
+
+Line 1010 emulator
+------------------
+  Opcode $Axxx: Trigger error {xxx}, with identical numbering to that used
+  in the (TIOS) variable "errornum". Note that there are some error numbers
+  that are undocumented in Appendix B of the TI-92 manual.
+
+Line 1111 emulator
+------------------
+  Print "Line 1111 Emulator" and freeze. Unused.
+
+Auto-Int 1
+----------
+  Triggered every 4th time [600017] is incremented. It runs at
+  approximately 350 Hz. See Ports.txt.
+
+Auto-Int 2
+----------
+  Triggered periodically while key(s) other than [ON] are held down. The
+  rate depends both on battery strength and on which key(s) are being held
+  down, and is usually in the ballpark of about 600 Hz.
+
+Auto-Int 3
+----------
+  Print "Level 3 Autovector" and freeze. Never triggered.
+
+Auto-Int 4
+----------
+  Link Service
+
+Auto-Int 5
+----------
+  Triggered when [600017] is set to its initial value. After ROM
+  initialization, it runs at approximately 18 Hz. See Ports.txt.
+
+Auto-Int 6
+----------
+  Triggered when [ON] is pressed.
+
+Auto-Int 7
+----------
+  Protected memory violation. Triggered when memory below [$000120] is
+  written while bit 2 of [$600001] is set.
+
+Trap 0
+------
+  JSR ($40xxxx + D0.W)
+
+  D0.W  Subroutine
+  ----- ----------
+  $01A2 [60001A] = $FF, [05342] = $00
+  $01B8 flush word buffer, set size to 1 word (push *buffer)
+  $01E4 [05510] = $00000000, [0550C] = $00000000, JMP $400100 (reset)
+  $01F0 print error string and freeze (push *string)
+
+Trap 1
+------
+  Change Interrupt Mask
+
+  Input : D0.W = new interrupt mask (bits 10,9,8 of new SR)
+  Output: D0.L = old SR
+
+Trap 2
+------
+  Reset Calculator
+
+  Input : nothing
+  Output: calculator is reset
+
+Trap 3
+------
+  ?
+
+Trap 4
+------
+  Turn Off, Turn On (see also Auto-Int 6)
+
+  Input : nothing
+  Output: calculator turns off, waits for [ON]
+
+Trap 5
+------
+  ? same as trap 7
+
+Trap 6
+------
+  ?
+
+Trap 7
+------
+  ? same as trap 5
+
+Trap 8
+------
+  ?
+
+Trap 9
+------
+  A0.L = $4004F8 + 4 * D0.W
+
+  Input : D0.W = {00...11}
+  Output: A0.L = $4004F8 + 4 * D0.W
+	  D0.L = 4 * D0.W;
+
+  D0  pointer to
+  --  ----------
+  00       (ROM)  ?contrast_up()
+  01       (ROM)  WinOpen()
+  02       (ROM)  ?reset_link()
+  03  (RAM)       2 structures
+  04       (ROM)  ?contrast
+  05       (ROM)  WinStr()
+  06  (RAM)       ?key_buffer
+  07       (ROM)  flush word buffer, set size to 1 word (push *buffer)
+  08       (ROM)  table for isupper(), etc.
+  09       (ROM)  ?contrast_up()
+  0A       (ROM)  ?contrast_down()
+  0B       (ROM)  [60001A] = $FF, [05342] = $00
+  0C       (ROM)  getkey() table
+  0D       (ROM)  ?
+  0E  (RAM)       LCD memory
+  0F       (ROM)  Boolean ?read_word_buffer(WORD *a, BUFFER *b)
+  10       (ROM)  RAM test
+  11       (ROM)  WinMoveTo()
+
+TRAP 10
+-------
+  Enter self test
+
+TRAP 11
+-------
+  Print "Trap 11" and Freeze
+
+TRAP 12
+-------
+  Print "Trap 12" and Freeze
+
+TRAP 13
+-------
+  Print "Trap 13" and Freeze
+
+TRAP 14
+-------
+  Print "Trap 14" and Freeze
+
+TRAP 15
+-------
+  Print "ER_throw" and Freeze
diff --git a/docs/ti_hw/fargo/Types.txt b/docs/ti_hw/fargo/Types.txt
new file mode 100644
index 0000000..3878a07
--- /dev/null
+++ b/docs/ti_hw/fargo/Types.txt
@@ -0,0 +1,71 @@
+-----------------------------------------------------------------------------
+INTRODUCTION
+-----------------------------------------------------------------------------
+
+The simplest data type used by the TI-92 is the byte, followed by the word
+and the long integer. However, it is useful to define more complex data
+structures for more complex tasks. This text file describes some of the
+data structures used by the TI-92.
+
+This text file also describes some of the enumerated data types used by the
+TI-92. These are integers in which predefined values have specific meanings.
+
+-----------------------------------------------------------------------------
+ENUMERATED DATA TYPES
+-----------------------------------------------------------------------------
+
+color
+-----
+ 0 = white on black
+ 1 = black on black (!!!)
+ 2 = white on black (??)
+ 3 = gray on white
+ 4 = black on white
+
+font
+----
+ 0 =  5(d) point font
+ 1 =  8(d) point font
+ 2 = 10(d) point font
+
+-----------------------------------------------------------------------------
+DATA STRUCTURES
+-----------------------------------------------------------------------------
+
+point (4 bytes)
+---------------
+ 00.W	x coordinate
+ 02.W	y coordinate
+
+rect (8 bytes)
+--------------
+ 00.W	x1 = coordinate of left edge
+ 02.W	y1 = coordinate of top edge
+ 04.W	x2 = coordinate of right edge
+ 06.W	y2 = coordinate of bottom edge
+
+window (2A bytes)
+-----------------
+ 00.W	flags
+	03 = border width 0= 2 pts, 1 =1 pt
+	05 = 0  store background
+	     1  don't store background
+	06 = translate LF, FF, and CR
+	08 = draw border
+	10 = similar to 11
+	11 = check boundaries
+	12 = display title
+ 02.B	(font) text font
+ 03.B	(color) text color
+ 04.B	background color (0=white, 1=black)
+ 05.B	???
+ 06.W	??? (from 57A4)
+ 08.W	cursor x coordinate from window
+ 0A.W	cursor y coordinate from window
+
+ 10	(rect) border of window
+ 14	(rect) usable area of window
+ 18	(rect) border of window
+ 1C	(rect) inside of window (relative); top left = (0,0)
+ 20.W	handle of block where bitmap is stored
+ 26.L	pointer to window title
diff --git a/docs/ti_hw/flash/EEPROM Programming.htm b/docs/ti_hw/flash/EEPROM Programming.htm
new file mode 100644
index 0000000..716d75f
--- /dev/null
+++ b/docs/ti_hw/flash/EEPROM Programming.htm	
@@ -0,0 +1,293 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://www.users.globalnet.co.uk/%7Ehjames/ti/EEPROM%20Programming_files/filelist.xml"><title>EEPROM Programming</title><!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+  <o:Author>Gareth James</o:Author>
+  <o:Revision>1</o:Revision>
+  <o:TotalTime>0</o:TotalTime>
+  <o:Created>2000-04-12T14:13:00Z</o:Created>
+  <o:Pages>1</o:Pages>
+  <o:Words>415</o:Words>
+  <o:Characters>2367</o:Characters>
+  <o:Lines>19</o:Lines>
+  <o:Paragraphs>4</o:Paragraphs>
+  <o:CharactersWithSpaces>2906</o:CharactersWithSpaces>
+  <o:Version>9.2720</o:Version>
+ </o:DocumentProperties>
+ <o:OfficeDocumentSettings>
+  <o:DoNotRelyOnCSS/>
+ </o:OfficeDocumentSettings>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+  <w:View>Normal</w:View>
+  <w:Zoom>0</w:Zoom>
+  <w:DoNotOptimizeForBrowser/>
+ </w:WordDocument>
+</xml><![endif]-->
+
+
+<style>
+<!--
+ /* Font Definitions */
+ at font-face
+	{font-family:"MS Mincho";
+	panose-1:0 0 0 0 0 0 0 0 0 0;
+	mso-font-alt:"\FF2D\FF33 \660E\671D";
+	mso-font-charset:128;
+	mso-generic-font-family:roman;
+	mso-font-format:other;
+	mso-font-pitch:fixed;
+	mso-font-signature:1 134676480 16 0 131072 0;}
+ at font-face
+	{font-family:"\@MS Mincho";
+	panose-1:0 0 0 0 0 0 0 0 0 0;
+	mso-font-charset:128;
+	mso-generic-font-family:roman;
+	mso-font-format:other;
+	mso-font-pitch:fixed;
+	mso-font-signature:1 134676480 16 0 131072 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-parent:"";
+	margin:0cm;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:12.0pt;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+h3
+	{mso-style-next:Normal;
+	margin-top:12.0pt;
+	margin-right:0cm;
+	margin-bottom:3.0pt;
+	margin-left:0cm;
+	mso-pagination:widow-orphan;
+	page-break-after:avoid;
+	mso-outline-level:3;
+	font-size:13.0pt;
+	font-family:Arial;}
+a:link, span.MsoHyperlink
+	{color:blue;
+	text-decoration:underline;
+	text-underline:single;}
+a:visited, span.MsoHyperlinkFollowed
+	{color:purple;
+	text-decoration:underline;
+	text-underline:single;}
+p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
+	{margin:0cm;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:10.0pt;
+	font-family:"Courier New";
+	mso-fareast-font-family:"Times New Roman";}
+ at page Section1
+	{size:595.3pt 841.9pt;
+	margin:1.0cm 1.0cm 1.0cm 1.0cm;
+	mso-header-margin:35.45pt;
+	mso-footer-margin:35.45pt;
+	mso-paper-source:0;}
+div.Section1
+	{page:Section1;}
+ at page Section2
+	{size:595.3pt 841.9pt;
+	margin:72.0pt 90.0pt 72.0pt 90.0pt;
+	mso-header-margin:35.4pt;
+	mso-footer-margin:35.4pt;
+	mso-paper-source:0;}
+div.Section2
+	{page:Section2;}
+-->
+</style></head>
+
+<body lang="EN-GB" link="blue" vlink="purple" style="">
+
+<div class="Section1">
+
+<h3><b><font size="4" face="Arial"><span style="font-size: 13pt;">EEPROM Programming<o:p></o:p></span></font></b></h3>
+
+<p class="MsoPlainText"><font size="2" face="Courier New"><span style="font-size: 10pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Writing to Flash EEPROMs is much
+slower than writing to RAM, and requires writing control codes to the address
+space of the chip to perform these operations. Apparently the Flash EEPROM used
+is the "SHARP LH28F160S3-L", which has many features (some may be
+disabled) including writing (multiple) words/bytes, erasing 64kb blocks, and
+locking of blocks.<o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">For more information on this chip
+see Johan Borg's file at <a href="http://d188.ryd.student.liu.se/ftp/calculator/ti89/tech/flashrom.txt"><span style="">http://d188.ryd.student.liu.se/ftp/calculator/ti89/tech/flashrom.txt</span></a>,
+he also has put up the datasheet at <a href="ftp://d188.ryd.student.liu.se/calculator/ti89/tech/f160s3.pdf"><span style="">ftp://d188.ryd.student.liu.se/calculator/ti89/tech/f160s3.pdf</span></a>
+which is worth a look.<o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Fortunately only a subset of this
+chips features are used; writing words and erasing blocks. Write operations
+take 12.95 micro-seconds, read operations 100ns, so you can see why a special
+mode of operation is required.<o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">To program the EEPROM we need to
+enter a special mode by writing certain control codes to the address range. Two
+operations can be performed, erase (64kb) sector, and write a word. In this
+write mode reading from the address range gives the status register of the EEPROM,
+generally the only value that is used is that bit 7 of the read word will be
+set when complete. After the operations are complete Read mode is then set by
+writing another control code.<o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">The drawback of this method is that
+the ROM cannot be read whilst write operations are being performed. Therefore
+the writing code must execute from the RAM. Trap 11 handles all of this on the
+calculator, copying the relevant portions to a buffer then executing them.<o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">The following subset of operations
+is used:<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText"><font size="2" face="Courier New"><span style="font-size: 10pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<table border="1" cellspacing="0" cellpadding="0" width="100%" style="border: medium none ; width: 100%; border-collapse: collapse;">
+ <tbody><tr>
+  <td width="9%" valign="top" style="border: 0.5pt solid windowtext; padding: 0cm 5.4pt; width: 9.18%;">
+  <p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Code<o:p></o:p></span></font></p>
+  </td>
+  <td width="90%" valign="top" style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 0.5pt 0.5pt 0.5pt medium; padding: 0cm 5.4pt; width: 90.82%;">
+  <p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Function<o:p></o:p></span></font></p>
+  </td>
+ </tr>
+ <tr>
+  <td width="9%" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 0.5pt 0.5pt; padding: 0cm 5.4pt; width: 9.18%;">
+  <p class="MsoPlainText" align="right" style="text-align: right;"><font size="2" face="Courier New"><span style="font-size: 10pt;">0x5050<o:p></o:p></span></font></p>
+  </td>
+  <td width="90%" valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 0.5pt 0.5pt medium; padding: 0cm 5.4pt; width: 90.82%;">
+  <p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Clear Status
+  Register<o:p></o:p></span></font></p>
+  </td>
+ </tr>
+ <tr>
+  <td width="9%" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 0.5pt 0.5pt; padding: 0cm 5.4pt; width: 9.18%;">
+  <p class="MsoPlainText" align="right" style="text-align: right;"><font size="2" face="Courier New"><span style="font-size: 10pt;">0x1010<o:p></o:p></span></font></p>
+  </td>
+  <td width="90%" valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 0.5pt 0.5pt medium; padding: 0cm 5.4pt; width: 90.82%;">
+  <p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Write Setup
+  (next word will be written)<o:p></o:p></span></font></p>
+  </td>
+ </tr>
+ <tr>
+  <td width="9%" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 0.5pt 0.5pt; padding: 0cm 5.4pt; width: 9.18%;">
+  <p class="MsoPlainText" align="right" style="text-align: right;"><font size="2" face="Courier New"><span style="font-size: 10pt;">0x2020<o:p></o:p></span></font></p>
+  </td>
+  <td width="90%" valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 0.5pt 0.5pt medium; padding: 0cm 5.4pt; width: 90.82%;">
+  <p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Erase Setup<o:p></o:p></span></font></p>
+  </td>
+ </tr>
+ <tr>
+  <td width="9%" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 0.5pt 0.5pt; padding: 0cm 5.4pt; width: 9.18%;">
+  <p class="MsoPlainText" align="right" style="text-align: right;"><font size="2" face="Courier New"><span style="font-size: 10pt;">0xD0D0<o:p></o:p></span></font></p>
+  </td>
+  <td width="90%" valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 0.5pt 0.5pt medium; padding: 0cm 5.4pt; width: 90.82%;">
+  <p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Erase Conform
+  (address)<o:p></o:p></span></font></p>
+  </td>
+ </tr>
+ <tr>
+  <td width="9%" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 0.5pt 0.5pt; padding: 0cm 5.4pt; width: 9.18%;">
+  <p class="MsoPlainText" align="right" style="text-align: right;"><font size="2" face="Courier New"><span style="font-size: 10pt;">0xFFFF<o:p></o:p></span></font></p>
+  </td>
+  <td width="90%" valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 0.5pt 0.5pt medium; padding: 0cm 5.4pt; width: 90.82%;">
+  <p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Read Memory<o:p></o:p></span></font></p>
+  </td>
+ </tr>
+</tbody></table>
+
+<p class="MsoPlainText"><font size="2" face="Courier New"><span style="font-size: 10pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Erasing and writing require to
+writes, e.g. 0x2020, 0xD0D0 to perform erase to prevent accidental operations.<o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><b><font size="3" face="Times New Roman"><span style="font-size: 12pt; font-weight: bold;">Note<o:p></o:p></span></font></b></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">The flash memory is, by default,
+write protected by the system. And can only be written to under special
+circumstances. See <span style="">Intelligent
+Memory<!--[if gte mso 9]><xml>
+ <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F005200650066003400370038003200320031003400370038000000</w:data>
+</xml><![endif]--></span>.<o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoNormal"><b><font size="3" face="Times New Roman"><span style="font-size: 12pt; font-weight: bold;">Examples</span></font></b><span style=""><o:p></o:p></span></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;">;erase 64kb block
+in which ERASE_ADDR resides<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>lea<span style="">   </span><span style="">      </span>(ERASE_ADDR),a2<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#0x5050,(a2)<span style="">      </span>;Clear Status
+Register<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#0x2020,(a2)<span style="">      </span>;Erase Setup<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#0xD0D0,(a2)<span style="">      </span>;Erase Confirm<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;">write_state_busy:<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>(a2),d0<span style="">     </span><span style="">      </span>;Read Status Regis [...]
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>btst<span style="">  </span><span style="">      </span>#7,d0<span style=""> </span><span style="">      </span><span style="">&n [...]
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>beq<span style="">   </span><span style="">      </span>write_state_busy<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#0xFFFF,(a2)<span style="">      </span>;Read<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText"><font size="2" face="Courier New"><span style="font-size: 10pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoPlainText"><font size="2" face="Courier New"><span style="font-size: 10pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;">;write VALUE to
+WRITE_ADDR<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>lea<span style="">   </span><span style="">      </span>(WRITE_ADDR),a2<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#0x5050,(a2)<span style="">      </span>;Clear Status
+Register<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#0x1010,(a2)<span style="">      </span>;Write Setup<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#VALUE,(a2)<span style=""> </span><span style="">      </span>;Erase
+Confirm<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;">write_state_busy:<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>(a2),d0<span style="">     </span><span style="">      </span>;Read Status Regis [...]
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>btst<span style="">  </span><span style="">      </span>#7,d0<span style=""> </span><span style="">      </span><span style="">&n [...]
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>beq<span style="">   </span><span style="">      </span>write_state_busy<o:p></o:p></span></font></p>
+
+<p class="MsoPlainText" style="background: rgb(204, 204, 204) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><font size="2" face="Courier New"><span style="font-size: 10pt;"><span style="">      </span>move.w<span style="">      </span>#0xFFFF,(a2)<span style="">      </span>;Read<o:p></o:p></span></font></p>
+
+</div>
+
+<font size="3" face="Times New Roman"><span style="font-size: 12pt; font-family: "Times New Roman";"><br clear="all" style="page-break-before: always;">
+</span></font>
+
+<div class="Section2">
+
+<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></span></font></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/docs/ti_hw/misc/J89hw.txt b/docs/ti_hw/misc/J89hw.txt
new file mode 100644
index 0000000..ae06e00
--- /dev/null
+++ b/docs/ti_hw/misc/J89hw.txt
@@ -0,0 +1,664 @@
+.. .  .   .    .     .      .        .        .      .     .    .   .  . ..
+
+                     ___________.___  ______  ________
+                     \__    ___/|   |/  __  \/   __   \
+                       |    |   |   |>      <\____    /
+                       |    |   |   /   --   \  /    /
+                       |____|   |___\______  / /____/
+                                           \/
+                  h a r d w a r e    p r o g r a m m i n g
+
+.. .  .   .    .     .      .        .        .      .     .    .   .  . ..
+===========================================================================
+INTRODUCTION                                     File version: 200501150001
+---------------------------------------------------------------------------
+This document contains (some) information about the TI89 hardware as seen
+from the programmer's point of view.  It is assumed that the reader is very
+familiar with computer hardware and low-level programming on M68000 systems.
+Very much applies to the TI92/+ as well, but no similarities or differences
+are mentioned in the text.
+
+This document is messy.  A revised version is underway.
+
+This information is provided AS-IS, with NO guarantee that it is correct or
+complete.  The author can NOT be held responsible for ANY kind of damage
+that might occur from any direct or indirect use of the information in this
+document.
+
+Credits to Johan Borg for his hardware hacking.  His document/s has/ve
+provided valuable information about eg. the HW1 protection chip that I never
+could have found with my "software only" approach.
+
+Credits to Erik Hallb�ck for letting me tortu^H^H^H^H^Hborrow his HW2 TI89.
+With it I could finally fill in many blanks related to the second hardware
+model.
+
+A link to the most recent version of this document and other interesting
+stuff can be found at Olle's site >>>  http://alh.dhs.org/ti89/
+
+-- 
+Johan Eilert <johei804 at student.liu.se>
+
+--
+Updated by Romain Lievin <roms at tilp.info> from Olivier Armand's informations 
+(7000xx_ports.zip). Needed by the TiEmu project.
+CVS: $Id: J89hw.txt 779 2005-01-19 16:23:10Z roms $ <http://svn.technologeek.org/cgi-bin/viewcvs.cgi/tiemu/trunk/docs/ti_hw/misc/J89hw.txt?rev=774&root=tiemu&view=auto>
+
+
+===========================================================================
+HARDWARE PROTECTION OVERVIEW
+---------------------------------------------------------------------------
+The status of the various protections can only be changed when a global
+"lock" is deactivated.  For historical reasons, this "lock" is called "the
+Protection" in this document (note the capital P).
+
+(Note: "consecutive accesses" means consecutive in *time*, not (necessarily)
+consecutive *addresses*.)
+
+The following protection features are *always* active, they cannot be
+disabled.
+Both HW models:
+  * Write accesses to the boot installer sector ($200000-$20FFFF) are
+    filtered and never reach the flash ROM.
+    (This sector is *also* permanently write protected by a feature of the
+    flash ROM chip.)
+HW1 specific:
+  * Any four consecutive accesses to $1C0000-$1FFFFF crashes the calc.
+  * Any three consecutive access to a flash ROM sector (64K) that is within
+    the "multiple access forbidden" range crashes the calc.  (See Stealth I/O
+    section.)  (Effectively inhibits the CPU from fetching instructions from
+    the archive memory.)
+HW2 specific:
+  * An instruction fetch from a flash ROM sector (64K) that is within the
+    "execution forbidden" range crashes the calc.  (See $700012.)
+  * An instruction fetch from a RAM 4K page that has its "execution
+    forbidden" bit set crashes the calc.  The protection hardware also
+    considers the "shadow RAM" range $040000-$1FFFFF to be part of the last
+    RAM page.  (See $700000.)
+
+The following protections are enabled only when the Protection is enabled.
+Both HW models:
+  * Write accesses to the flash ROM ($210000-$3FFFFF) are filtered and never
+    reach the flash ROM.
+  * The certificate memory ($210000-$211FFF) is read protected.
+  * The memory at $218000-$219FFF is read protected.  (?)
+HW2 specific:
+  * Certain memory mapped I/O ports are locked and protected against
+    modification.  (These include, of course, the RAM page protection
+    bitmask and the flash ROM executable sector limit.)
+
+The following protections can be enabled and disabled at any time.
+Both HW models:
+  * Write accesses to $000000-$00011F are filtered and trigger int 7.
+    (See $600001.)
+
+
+===========================================================================
+OSCILLATORS
+---------------------------------------------------------------------------
+The TI89 has two (HW2 has three) separate oscillators, they are refered to
+as OSC1 and OSC2 (and OSC3).
+
+OSC1 is the M68000 CPU clock.
+  HW1: ~10 MHz
+  HW2: ~12 MHz
+
+OSC2 is the timing base for the timers, the link I/O hardware and (HW1 only)
+the LCD controller.
+  HW1: ~680 kHz - ~770 kHz
+  HW2: ??? - (~520 kHz (= 2^19 Hz !)) - ???
+
+The speed of OSC2 can be calculated using this formula (assuming the APD
+time is the default):
+  HW1: OSC2 speed = 242,688,000 / APD_seconds
+  HW2: OSC2 speed = 162,816,000 / APD_seconds
+APD_seconds should be somewhere in the range 300-360 seconds.  If the APD
+time is way longer than 400 seconds on a HW2, the HW1 formula should be used
+instead.  This will happen if, for example, an ignorant game reprograms the
+HW2 timer with the HW1 settings.
+
+OSC3 (HW2 only) is the timing base for the LCD controller.
+  HW2: ??? - (680 kHz) - ???
+
+The speeds of OSC1 and OSC2 seem to be independent of the battery strength,
+but OSC3 runs slower with older batteries.
+
+
+===========================================================================
+INTERRUPT LEVELS
+---------------------------------------------------------------------------
+Level 1:
+  Triggered at a fixed rate: OSC2/2^11.  See $600015:7/1.
+Level 2:
+  Triggered when the *first* unmasked key (see $600019) is *pressed*.
+  Keeping the key pressed, or pressing another without released the first
+  key, will not generate additional interrupts.  The keyboard is not
+  debounced in hardware and the interrupt can occasionally be triggered many
+  times when the key is pressed and sometimes even when the key is released!
+  Write any value to $60001B to acknowledge this interrupt.
+Level 3:
+  Disabled by default by AMS, early versions crash if it is enabled.  When
+  enabled, it is triggered at a fixed rate: OSC2/2^19.  See $600015:2.
+Level 4:
+  Triggered by the link hardware for various reasons.  Read from $60000C and
+  sometimes read/write $60000F to properly acknowledge this interrupt.
+Level 5:
+  Triggered by the programmable timer.  The default rate (set by AMS on
+  reset) is OSC2/(K*2^9), where K=79 for HW1 and K=53 for HW2.  See $600015
+  and $600017.
+Level 6:
+  Triggered when [ON] is pressed.  As with the rest of the keyboard, the
+  lack of hardware debouncing sometimes triggers additional interrupts.
+  Write any value to $60001A to acknowledge this interrupt.
+Level 7:
+  If the "vector table write protection" is enabled, this interrupt is
+  triggered on a write access to any address below $000120.  The write will
+  of course be ignored.  This interrupt is (also) a convenient way to detect
+  stack overflows.  See $600001:2.
+
+
+===========================================================================
+ADDRESS SPACE
+---------------------------------------------------------------------------
+Memory.devices..........Size....Description.....................
+$000000-$1FFFFF		2M	RAM (256K, repeats 8 times)
+  $000000-$00011F	288	(write protected)
+
+$200000-$3FFFFF		2M	flash ROM, (write protected)
+  $200000-$20FFFF	64K	boot code, always write protected
+    $200000-$200007	8	cold reset vector (SSP, PC)
+  $210000-$211FFF 	8K	certificate memory, (read protected)
+  $212000-$217FFF	24K	available for code/data
+  $218000-$219FFF	8K	(read protected ?!?)
+  $21A000-$3FFFFF	1944K	available for code/data
+
+Memory.mapped.I/O.......Size....Description.....................
+$040000-$07FFFF		256K	stealth I/O (HW1 only?)
+$080000-$0BFFFF		256K	stealth I/O (HW1 only?)
+$0C0000-$0FFFFF		256K	stealth I/O (HW1 only?)
+
+$180000-$1BFFFF		256K	stealth I/O
+$1C0000-$1FFFFF		256K	stealth I/O
+
+$200000-$20FFFF		64K	stealth I/O
+$212000-$217FFF		24K	stealth I/O
+$21A000-$21FFFF		24K	stealth I/O
+
+$600000-$60001F		32	memory mapped I/O
+$700000-$70001F		32	memory mapped I/O (HW2 only)
+
+
+===========================================================================
+MEMORY MAPPED I/O
+---------------------------------------------------------------------------
+R = data can be read at any time
+W = data can be written at any time
+r = data can be read only when the Protection is disabled
+w = data can be written only when the Protection is disabled
+
+address direction (default value) description
+	more description
+	:bits	bit description
+		"-" = unused
+		"?" = unknown (but probably unused unless otherwise noted)
+	...
+	yet more description
+
+$600000 RW ($00)
+	:7	Keep clear (=0)
+	:6	Keep clear (=0)
+	:5-3	-
+	:2	1: Battery voltage level is *above* the trig level.
+		(see $600018).
+	:1-0	-
+
+$600001 RW ($04)
+	:7-3	-
+	:2	Write protect vector table ($000000-$00011F).  Int 7 will
+		also be generated on writes to this address range, and on
+		writes to $E00000-$FFFFFF.
+	:1	-
+	:0	HW1: Bit cleared means 256K RAM, bit set means 128K RAM.
+		Consider this bit "read-only" and keep it clear, or
+		else the RAM will not function properly!
+
+$600003 -W ($FF) Bus waitstates
+	The TI89 hardware needs no waitstates.  AMS messes with this port on
+	startup for compatibility with the TI92, but the battery checker
+	will reset it to $FF within one second.
+	:7	-
+	:6-4	Wait states =(7-n) for non-RAM accesses
+	:3	-
+	:2-0	Wait states =(7-n) for RAM accesses
+
+$600005	-W Turn off OSC1 (and the CPU), wake on int level 6 (ON key) and ...
+	:7-5	-
+	:4	... int level 5 (programmable timer)
+	:3	... int level 4 (link)
+	:2	... int level 3 (OSC2/2^19)
+	:1	... int level 2 (keyboard)
+	:0	... int level 1 (OSC2/2^11)
+	Note: Make SURE int level 6 is acknowledged before writing $00 to
+	this port...
+
+$60000C RW ($8D when idle, write $E0 then $8D to reset, $8F when sending)
+	Read to begin acknowledging link interrupt (level 4)
+	:7 AE   Autostart enable, should be set if $600005:3 is set
+	:6 LD   Disable byte sender/receiver (also disables interrupts)
+	:5 LTO  Link timeout disable
+	:4	-
+	Trigger interrupt level 4 on ...
+	:3 CL	... error (timeout or protocol violation)
+	:2 CA	... any link activity
+	:1 CTX	... transmit buffer empty
+	:0 CRX	... byte in receive buffer
+
+	Note: The link hardware generates lots of interrupts and the
+	interrupt handler must know the reason for every one to be able to
+	acknowledge them properly.  Otherwise the CPU will loop the
+	interrupt handler over and over again...
+	If OSC2 is turned off (in calc power-off mode), the only condition
+	that can be detected and generate an interrupt (to wake up the
+	processor) is "any link activity" (:2).
+
+$60000D R- Current link status (interrupt reason)
+	:7 SLE	Error (undefined if :3 =1)
+		Reset link (#$E0 then #$8D to $60000C) to finish acknowledge.
+	:6 STX	Transmit buffer empty (undefined if :5 =1 or :7 =1)
+		Write another byte to $60000F or clear $60000C:1 to finish
+		acknowledge.
+	:5 SRX	Byte in receive buffer (undefined if :7 =1)
+		Read the byte from $60000F to finish acknowledge
+	:4 SLI	Interrupt pending (always =1 in interrupt handler), never used
+	:3 SA	Link activity (AMS int handler quits immediately if 0), used by AMS >= 208
+	:2 ??	External activity ("someone's talking to me!")
+	:1 ?? 	Almost always set
+	:0 ??	Always zero?
+	The bits must be checked in this order: :3, :7, :5, :6 (AMS < 2.08)
+	Else: :3, :7, :5, :2, :6.
+
+$60000E RW Direct link port access
+	:7-4	-
+	:3	Live status of D1/ring/white  (1=pulled down)
+	:2	Live status of D0/tip/red  (1=pulled down)
+	:1	Activate (pull down) D1/ring/white
+	:0	Activate (pull down) D0/tip/red
+	Note: The byte sender/receiver will be confused by direct link port
+	access, it should be disabled first.  (See $60000C:6.)
+	* D0/tip/red is pulled down first (by sender) when sending a '0'.
+	* D1/ring/white is pulled down first (by sender) when sending a '1'.
+	* The innermost ring is signal ground.
+	* The link port normally operates in a half-duplex mode where a bit
+	  is sent by activating the corresponding line ("ring" or "tip") and
+	  the receiver acknowledges by activating the other line.  The
+	  sender now releases its line and finally the receiver releases the
+	  acknowledge.  Whole bytes are always sent, LSB first.  An "error"
+	  condition (="abort") is signalled by activating both lines at the
+	  same time for ~250us.
+	* When generating stereo sound, use tip/red for right channel and
+	  ring/white for left channel.
+
+$60000F RW One-byte link buffer
+	:7-0	READ:  Read one byte from receive (incoming) buffer
+		WRITE: Write one byte to transmit (outgoing) buffer
+		See also $60000D.
+
+$600010 -W ($0980 = $4C00/8)
+	:15-0	HW1: LCD frame buffer address, divided by 8
+		  This address is latched into the LCD controller DMA
+		  address register on each FS (i.e. at the beginning of
+		  every frame).
+		HW2: No function.  See $700017.
+
+$600012 -W ($3180 => 240x128 screen)
+	:15-14	-
+	:13-8	LCD logical width =(64-n)*2 bytes =(64-n)*16 pixels
+		The LCD controller DMA will send this many pixels to the
+		screen for each line (= between each RS).
+	:7-0	LCD logical height =(256-n)
+		Number of "row syncs" (RS) between each "frame sync" (FS).
+		(This is the (logical) screen height.)
+		Note: The contrast must often be adjusted when the logical
+		screen height is changed.  By default, each screen line is
+		"visited" during 1/128 of a frame but if the logical height
+		is set to e.g. 100, each line is now "visited" more often
+		(1/100 of a frame) and will appear darker at the same
+		contrast level because of this.
+	This register is actually two 8-bit registers and each subregister
+	can be written to without disturbing the other 8 bits.
+	Note: The internal counters in the screen controller restarts on
+	writes to this register, but no FS or RS is generated.  Use this
+	during grayscale initialization to force the screen refresh into a
+	known state (for synchronization).
+
+$600015 RW ($1B)
+	:7	Master disable timer interrupts (level 1, 3 and 5)
+	:6	- (HW2: ?)
+	:5-4	Increment rate of $600017
+		%00: OSC2/2^5
+		%01: OSC2/2^9  (AMS default)
+		%10: OSC2/2^12
+		%11: OSC2/2^18
+	:3	Enable incrementing of $600017
+	:2	Trigger interrupt level 3 at OSC2/2^19  (~1 Hz on HW2)
+	:1	OSC2 (and OSC3?) enable (bit clear means oscillator stopped!)
+	:0	LCD controller DMA enable, LCD blank ("white") if =0
+		This bit is only examined by the hardware at the start of
+		each frame.
+		HW1: The DMA steals ~10% of the CPU bus bandwidth.
+
+$600017 RW ($B2 = 257-79 for HW1, $CC = 257-53 for HW2)
+	:7-0	READ:  Read the current value
+		WRITE: Set the initial (and current) value for the timer
+	The timer value is incremented at the rate specified at $600015 and
+	triggers interrupt level 5 when it "overflows" to $00.  The next
+	increment forces the timer to reload the initial value.  The
+	count sequence looks like this:
+	  value, value+1, ..., $FF, $00 (interrupt!), value, value+1, ...
+	To trigger an interrupt every 'n'th increment, write '257-n' to
+	this register.
+
+$600018 RW ($0380)
+	:15-10	-
+	:9-7	Battery voltage trigger level (see $600000:2)
+		(HW2: must also enable batt checker at $70001D:3,0)
+		  %000: ~4.6V, %001: ~4.5V, %010: ~4.3V, %011: ~4.0V,
+		  %100: ~3.7V, %101: ~3.4V, %110: ~3.2V, (%111: ~2.9V  calc resetted!)
+		Remember to wait a while (~250us) before reading from
+		$600000:2 to make sure that the hardware has stabilized.
+		Keep the trig level set to the lowest voltage (%111) when
+		its not in use.  (The keyboard does not work otherwise.)
+		AMS displays "BATT" when the voltage drops below 4.3V and
+		4.0V, respectively.
+	:6-0	Keyboard col mask, bit =1 masks key column (vertical) from
+		being read at $60001B and generate interrupt on key pressed.
+	Note: Some interrupt handlers in AMS writes to this register, so it
+	is a very good idea to disable interrupts first!!!
+
+$60001A RW
+	:1	READ:  Current status of the [ON] key, =0 if pressed
+	:7-0	WRITE: Acknowledge [ON] key interrupt (level 6)
+
+$60001B RW
+	:7-0	READ:  Keyboard row input, each bit =1 means ALL keys in the
+		corresponding key column are UP (not pressed).  See $600019.
+		See also "The Keyboard Matrix," below.
+		WRITE: Acknowledge keyboard interrupt (level 2)
+
+$60001C -W ($21 = 64 cycles/RS = 256 pixels/RS)
+	:7-6	?-
+	:5-2	LCD RS (row sync) frequency, OSC2/((16-n)*8)
+		%1111 turns off the RS completely (used when LCD is off).
+	:1-0	??? Used for sth? -- why otherwise set to %01?
+
+$60001D -W ($80+contrast)
+	:7	HW1: Voltage multiplier enable.  Keep set (=1)!
+		HW2: -
+	:6-5	-
+	:4	HW1: Screen disable (power down)
+		HW2: LCD contrast bit 4 (msb)
+	:3-0	LCD contrast bits 3-0 (bit 3 is msb on HW1)
+
+These are HW2 only --------------------------------------------------------
+
+$700000 RW ($FFDF FFFF FFFF FFFF = allow exec at $005xxx only)
+	Bit SET means instruction fetches NOT allowed in that 4K page.
+	The Protection must be disabled for changes to have any effect.
+$700000	:15-0	$00Fxxx-$000xxx  (one bit for each 4K page)
+$700002	:15-0	$01Fxxx-$010xxx
+$700004	:15-0	$02Fxxx-$020xxx
+$700006	:15-0	$03Fxxx-$030xxx  (bit 15 controls $1FFFFF-$040000 too)
+
+$700008 to $700000F RW
+  These ports are the ghosts of the ports for the protection of execution in
+  RAM ($700000 to $700007). Any writing to either the real ports or the ghosts
+  will change both ports (eg $700002 and $70000A).
+
+$700011	-W ($40, $57 by boot installer when 'i' is pressed)
+	:7-0	??? (something to do with link port transfer speed)
+
+$700012	RW (reset: $0018 => $390000-$3FFFFF) Flash ROM execution protection
+	The Protection must be disabled for changes to have any effect.
+	:15-6	-
+	:5-0	First exec protected flash ROM sector =(n*$10000+$210000)
+
+$700014 RW Real Time Clock
+  Real Time Clock. Incremented every 2^13 = 8192 seconds exactly.
+  The whole word must be read : reading the port byte by byte can return wrong
+  values.
+  The timer is not incremented when the batteries have been removed, but the
+  value it had when they were removed is kept. Removing the lithium battery
+  and putting it back gives a random value to the timer.	
+
+$700017 RW ($00 = $4C00-$5BFF)
+	The HW2 display controller doesn't fetch pixel data from RAM but
+	from its own memory.  This memory is 4K and all CPU writes to the
+	selected address range (below) will go to both RAM and this memory.
+	(NOTE: It is not possible to *read* from the display memory.)
+	:7-2	-
+	:1-0	Display memory snoop range
+		%00: $4C00-$5BFF  %01: $5C00-$6BFF
+		%10: $6C00-$7BFF  %11: $7C00-$8BFF
+	Note: AMS never initializes this register, it simply assumes that
+	the display controller is snooping writes to $4C00-$5BFF.
+	Note: For obvious reasons, the contents of the screen does not
+	change when you write to this register.  This register is NOT the
+	HW2 equivalence of the register at $600010 on HW1.
+
+$70001D RW ($06)
+	:7	Toggles every FS (every time the LCD restarts at line 0)
+	:6-4	-
+	:3	Battery checker bit B (? ???)
+	:2	? (set)
+	:1	Screen enable (clear this bit to shut down LCD)
+	:0	Battery checker bit A (? enable $600000:2)
+	(AMS:) The battery checker bits must both be set (AB=11) prior to
+	checking the voltage level with $600000:2.  Then, after use, bit B
+	must be cleared (AB=10) while the battery trig hardware settles to
+	the "rest" voltage value (%111).  Finally, both bits should be
+	cleared.
+
+$70001F RW ($07)
+	The Protection must be disabled for changes to have any effect.
+	:7-3	-
+	:2	  activates the incrementation of $700014.w when bit 1 is set. Set by
+        AMS on reset.
+	:1		its effect depends on the state of bit 2.
+	:0	Use 5 contrast bits (default for AMS).  When this bit is
+		cleared, the contrast hardware uses $60001D:3-0 only to
+		specify the contrast, effectively emulating a HW1.
+		AND, clearing this bit activate the execution in areas from which the 
+		Protection can be disabled :
+    ROM_BASE+$12000 to ROM_BASE+$17FFF and ROM_BASE+$1A000 to ROM_BASE+$1FFFF.
+    The execution in the boot sector is not protected by the protection
+
+ bit2/bit1
+   1   1   : State set by AMS on reset. $700014.w is incremented.
+   1   0   : Auto-ints 1, 2, 3 and 5 are inhibited. The RTC is stopped.
+   0   1   : The RTC is stopped. The auto-ints works normally.
+   0   0   : The RTC is stopped. The frequencies of all the auto-ints are
+             lower (OSC2 must be slower).
+             AI1 : ~ 176 Hz instead of 256 Hz. 
+             AI3 : ~ 40 ticks per minute instead of 60.
+             AI5 : ~ 13.2 Hz instead 19.3 Hz.
+   Only AMS initializes theses bits on reset. The boot code does not.
+
+
+===========================================================================
+STEALTH I/O
+---------------------------------------------------------------------------
+Apart from the dedicated (memory mapped) I/O, there are special "stealth"
+I/O ports that occupy parts of the RAM and the flash ROM address ranges.
+Every access (read or write) to these special address ranges will issue a
+transparent stealth I/O operation as well as performing the usual access to
+RAM or flash ROM.  To make things less complicated, it is only the *address*
+and the *type* of the access (HW1: READ or WRITE, HW2: READ/WRITE and CPU
+function codes FC2-FC0) that matters to a stealth I/O port, not the actual
+data.  Be careful when WRITING to a stealth I/O port that occupies the same
+address range as RAM!
+
+"N consecutive accesses [to a memory range]" means that there must be no
+other bus activity during these N accesses (they must be consecutive in
+*time*).  Remember that the HW1 LCD controller DMA is constantly fetching
+pixel data from RAM.  (Use $600015:1 to disable it.)
+
+The Protection must be disabled for changes to have any effect.
+$040000-$07FFFF: (HW1 only?)
+  READ:  clears archive memory limit bit 0
+  WRITE: sets archive memory limit bit 0
+$080000-$0BFFFF: (HW1 only?)
+  READ:  clears archive memory limit bit 1
+  WRITE: sets archive memory limit bit 1
+$0C0000-$0FFFFF: (HW1 only?)
+  READ:  clears archive memory limit bit 2
+  WRITE: sets archive memory limit bit 2
+Three consecutive access to any address >=$390000+'limit'*$10000 and <$400000,
+where 'limit' is the combined value of the three bits above, crashes the
+calculator.  Use 'limit'=%111 to disable this protection altogether.
+
+(HW2:? The CPU must be in supervisor mode for changes to have any effect.)
+$180000-$1BFFFF: Screen power control
+  READ:  Screen power off
+  WRITE: Screen power on
+Note: The screen is automatically powered up on reads from the range
+$200000-$3FFFFF.  (However, $60001D:4 is always obeyed.)
+
+$1C0000-$1FFFFF: "the Protection" enable/disable
+Note: Four consecutive accesses to this range crashes a HW1 calc!
+  READ:  Enable the Protection
+  WRITE: Disable the Protection
+Note: No access to this range will have any effect unless the access is
+"authorized," see below.
+
+$200000-$20FFFF,
+$212000-$217FFF,
+$21A000-$21FFFF: "the Protection" access authorization
+HW1:
+  In order to alter the state of the Protection, THREE consecutive read
+  accesses must occur from any of the three ranges above immediately prior
+  to the access to the Protection enable/disable range.
+HW2:
+  (Note: This is somewhat complicated and I don't know exactly how it works.
+   The procedure listed below is probably too strict.  Anyway, this is what
+   AMS and the boot sector does.)
+  In order to alter the state of the Protection, (at least) SEVEN supervisor
+  instruction fetches must occur from any of the three ranges above prior to
+  the access to the Protection enable/disable range.  The choice of
+  instructions is not arbitrary, it must be one of the following sequences:
+  * To DISABLE the Protection:  $4E71, <multiple non-instruction accesses
+    are allowed here>, $4E71, $4E71, $46FC, $2700, $3080, <any instruction
+    here>.  The very next access must be the WRITE to the Protection enable/
+    disable range.
+  * To ENABLE the Protection:  $4E71, <multiple non-instruction accesses are
+    allowed here>, $4E71, $4E71, $46FC, $2700, $3010, <any instruction
+    here>.  The very next access must be the READ from the Protection
+    enable/disable range.
+  ($4E71="nop", $46FC="move #imm16,sr", $3080="move.w d0,(a0)",
+   $3010="move.w (a0),d0")
+
+
+===========================================================================
+KEYBOARD MATRIX
+---------------------------------------------------------------------------
+  \col	6	5	4	3	2	1	0
+row\------------------------------------------------------------
+7:		F1	F2	F3	F4	F5	alpha
+6:		HOME	MODE	CTLG	<-	CLEAR	diamond
+5:		X	Y	Z	T	^	shift
+4:		=	(	)	,	/	2nd
+3:		|	7	8	9	*	> right
+2:		EE	4	5	6	-	v down
+1:		STO>	1	2	3	+	< left
+0:	ESC	APPS	0	.	(-)	ENTER	^ up
+----------------------------------------------------------------
+(I have switched the meaning of "row" and "column" compared to other
+TI89 hardware docs.  I believe it makes more sense this way!  :) )
+
+Reading the keyboard (mini HOW-TO):
+1.  Mask out the columns that are of no interest (see $600019)
+2.  Wait for column mask to settle (AMS waits ~90us)
+3.  Read the row data (see $60001B) and test the row of interest
+E.g.: Status of the CATALOG key: %(1)111_0111 -> ($600019), wait,
+      read bit 6 of ($60001B): 0=pressed 1=released.
+
+When three keys are pressed and these keys make out three corners in a
+rectangle, the fourth key in the last corner will appear "pressed" too.
+E.g.: If F1, F2 and MODE are all pressed simultaneously, HOME will also
+      always be detected as being "pressed."
+
+
+===========================================================================
+HW1 DISPLAY CONTROLLER
+---------------------------------------------------------------------------
+The HW1 display system is divided into two parts: the controller and the
+LCD.  The timing source is OSC2, so it is pretty easy to synchronize the
+screen update with an interrupt (1 or 5) for flicker-free grayscale.  (The
+actual implementation is left as an exercise for the reader.)
+
+It takes one OSC2 cycle to transfer four bits (pixels) to the screen, hence
+the DMA reads one byte from RAM every other OSC2 cycle.  The default width
+of 240 pixels (see $600012) thus takes 60 OSC2 cycles, leaving 4 idle cycles
+at the end of each pixel row (see $60001C).  At the start of each row a "row
+synchronization" signal (called RS) is sent to the LCD.  This is needed
+because only the first 160 pixels will be displayed on the LCD and it must
+somehow know when these 160 pixels start.  Note that the RS generation and
+the logical width are completely independent of each other:  It is possible
+to set the RS rate too fast compared to the time needed to transfer all the
+pixels for a line!  The result is very unpredicatable.  In fact, the RS will
+only be honoured by the DMA when it is idle -- but the LCD always sees it
+and acts upon it!  For the special case when the DMA is finished at the very
+same time as the RS is generated, the DMA will skip the last byte (it will
+not be sent to the LCD) and (properly) start sending the next screen line
+instead.
+
+When 128 pixel rows (see $600013) have been transferred in this manner,
+everything starts over and the "frame synchronization" signal (called FS) is
+activated to tell the LCD to start over from the top again.  At the same
+time, the DMA restart at the top of the frame buffer (see $600010).  (If the
+DMA is ignoring some of the RS because of improper programming (as mentioned
+above), it will ignore all FS that occur at the same time as these RS as
+well!)
+
+When there are less than 100 lines between each FS, the displayed image will
+be "repeated."  E.g. if the logical screen height is set to 45 lines, the
+top of the image will be seen on row 0, row 45 and row 90.  (The reason for
+the duplication is that the row driver is in fact a 100-bit shift register
+where FS is shifted in at the top every RS.)
+
+The frame rate can be calculated:
+  logical_screen_height * RS_interval = /with default settings:/ = 128*64 =
+    = 8192 OSC2 cycles/frame (= ~90 Hz)
+Note that it is only the logical screen height and the contrast that affect
+the overall "darkness" of the screen.
+
+The highest possible (full-screen) frame rate is 4800 OSC2 cycles per frame.
+
+
+===========================================================================
+HW2 DISPLAY CONTROLLER
+---------------------------------------------------------------------------
+The HW2 display controller works very much like its HW1 counterpart, but
+with two major exceptions:
+
+* The timing base is OSC3 which is *completely* unrelated to the timer and
+  the interrupt system.  Luckily, FS is available at $70001D:7 so
+  synchronization (and thus flicker-free grayscale graphics) is possible.
+
+* The display controller does not fetch pixel data from RAM, instead it has
+  an internal 4K display buffer.  The display controller monitors the bus
+  activity and it updates the display buffer on every write to the snoop
+  range (see $700017).  In other words, writes to this range go to both RAM
+  and the display buffer.
+
+
+===========================================================================
+POWER CONTROL
+---------------------------------------------------------------------------
+(to be written)
+
+
+===========================================================================
+END OF FILE
+---------------------------------------------------------------------------
+
+
diff --git a/docs/ti_hw/misc/system.txt b/docs/ti_hw/misc/system.txt
new file mode 100644
index 0000000..60ced22
--- /dev/null
+++ b/docs/ti_hw/misc/system.txt
@@ -0,0 +1,885 @@
+*****************************************************************************
+                           The system                                    
+*****************************************************************************
+
+I ) The processor
+ I.1 ) The exception table
+ I.2 ) Supervisor mode versus user mode
+ I.3 ) Internal exceptions
+ I.4 ) The system byte of the status register
+ I.5 ) The processor response to traps
+
+II ) The calculator
+ II.1 ) The calculator
+ II.2 ) The timer
+ II.3 ) The screen
+ II.4 ) The RAM
+ II.5 ) The keyboard
+ II.6 ) The link microcontroler
+ II.7 ) Conclusion
+
+III ) Fargo
+ III.1 ) Fargo 0.1.x
+ III.2 ) Fargo II 0.2.x
+ III.3 ) Fargo use of the memory
+  III.3.1 ) Introduction
+  III.3.2 ) Relocation: the assembler
+  III.3.3 ) Relocation: Fargo
+ III.4 ) The use of TI OS routines
+
+IV ) The texas instrument's operating system
+ IV.1 ) handles
+ IV.2 ) VAT: variable alocation tables
+ IV.3 ) Lite Pascal
+  IV.3.1 ) introduction
+  IV.3.2 ) Tokenization
+** IV.4 ) Auto-interrupts
+
+**V ) Developing functions
+
+I ) The processor
+
+ When you switch on the calculator, the processor goes to see at address
+$0000000 in the memory: the 64 bits that are stored there are called
+the initialisation vector. They are the address of the memory where the
+first program to be executed is stored. That initialisation vector
+points to the routines of the operating system ( Texas Instrument's OS ) ..
+
+ I.1 ) The exception table
+
+ A trap or exception routine is a program which is called by some internal
+( software ) or external ( hardware ) routines.
+ To each trap, we associate a vector ( the address to the program to be
+executed ). On the 68000 processor, there are 255 vectors. These vectors are
+longwords stored at the beginning of the memory in the exception vector table.
+This table begins at $000000 and is over at $0003FF
+
+here is this table:
+addresses  |  Vector   |   Description
+( hex )    |  number   |
+000000     |    0      |   initialisation vector ( special: 64 bits )
+000008     |    2      |   Bus Error
+00000C     |    3      |   Address Error
+000010     |    4      |   Illegal Instructions
+000014     |    5      |   Division by zero
+000018     |    6      |   "Chk" instruction
+00001C     |    7      |   "Trapv" instruction
+000020     |    8      |   Privilege violation
+000024     |    9      |   Trace
+000028     |   10      |   Line 1010 emulator
+00002C     |   11      |   Line 1111 emulator
+000030/    |   12/     |   Reserved or
+000060     |   24      |   useless
+000064     |   25      |   Auto-Interrupt level 1
+000068     |   26      |   Auto-interrupt level 2
+00006C     |   27      |   Auto-interrupt level 3
+000070     |   28      |   Auto-interrupt level 4
+000074     |   29      |   Auto-interrupt level 5
+000078     |   30      |   Auto-interrupt level 6
+00007C     |   31      |   Auto-interrupt level 7
+000080/    |   32      |   Trap instruction
+0000BF     |   47      |   vectors
+           |  48/63    |   Reserved
+000100     |  64/255   |   User interrupt vectors
+
+ I.2 ) Supervisor mode versus user mode
+
+ The 68000 processor was a revolution when it was released: it was powerful
+and RELIABLE. That reliability ( which is vital to many systems ) was
+accomplished using two modes: supervisor and user mode.
+ The processor runs programs in the user mode. The supervisor mode is
+dedicated to the operating system which launches programs and takes control
+in case of errors or at the end of the execution of the program.
+ In supervisor mode, you have access to all the software and hardware
+resources of the system: the whole status register, the supervisor stack and
+all the instructions ( see I.3.b privilege violation ) .
+ When the supervisor mode is launched ( when any vector is triggered ) , the
+A7 register is modified by the processor and points to the supervisor stack
+opposed to user stack.
+ Note: the supervisor stack on the 92 is 4 KB long. There, is stored some
+information on the program being launched, the state of the processor before
+the program was launched, ...
+
+ I.3 ) Internal exceptions
+
+    a ) "normal traps"
+
+  *  Division by Zero: this trap is called when the divisor of a DIVU or DIVS
+  instruction is equal to zero. The programmer may freely redirect this trap
+  to a self made one to , for example, to recalculate the divisor or to
+  exit from the program with a simple message without freezing the calculator.
+  *  "CHK": The instruction "Chk" allows us to test if an operand is into a
+  certain interval. If not, the Chk trap is called: the programmer may well
+  redirect this trap.
+  *  TrapV: if the V flag is set during the execution  of this instruction,
+  the trap  is called: again, the programmer may redirect this trap.
+  *  Trap: this instruction allows us to redirect our program to one of the
+  32/47 vector: you need just to type: " Trap <number_of_vector> "
+  some are used by the system: look in the "traps.txt" file
+
+    b ) Programming errors
+
+  * Address Error: this happens, when you write or read a word or a longword
+  at an odd address. Bytes may be written anywhere.. This is due to the fact
+  that the processor has only 23 address pins to address 2^24=16Mb of memory.
+  Proper explanation of this phenomenon is included in the Motorola hardware
+  reference manual.
+
+  * Privilege violation: this happens when, in the user mode, a program
+  tries to execute a supervisor mode instruction.
+  supervisor instructions are:
+  	Stop
+  	Reset
+  	Rte
+  	Move.w source,SR
+  	and.w  #data,SR
+  	Eor.w  #data,SR
+  	Or.w   #data,SR
+  	move.l An,USP
+  	move.l USP,An
+
+  You don't need to bother about these instructions ( I have put all this
+  here just for documentation purposes ) : privilege violation traps occur
+  when you haven't set the S bit of the system byte and you are trying to
+  execute a supervisor instruction: it may happen as "illegal instruction"
+  happen: see below.
+
+  * Illegal instructions: an instruction is invalid if the processor doesn't
+  recognize the instruction... As we are using a compiler which code the
+  instructions, there are only two reasons to such a phenomenon:
+   * you have branched to a label which wasn't a label with instructions (
+   for example, a label to a table or some data you use... ) : thus, the
+   processor is trying to execute ... well... nothing at all: data... at
+   best, you get an illegal instruction ( at best cause this could lead to
+   destroying memory, or other such things)
+   * the processor executed one of the following code: $4AFA, $4AFB or 4AFC
+   the first 2 ones are reserved and the last one may be used to force an
+   illegal instruction ( in fact, it is what we do when we write " illegal"
+   to make a breakpoint: see \newbies.txt, section VII.1 )
+
+  * line 1111 emulator or line 1010 emulator: these happen respectively
+  when $FXXX or $AXXX is executed: ( where X is anything ) as sooner, it
+  often happens when you are trying to execute random data...
+  note: line 1010 is used by the system: it is redirected: thus, you should
+  never get such an instruction...
+  Originally, these opcodes were implemented to allow the programmer to define
+  new instructions. Note that the 1111 code is used in later Motorola
+  processors: it is used to control the arithmetic coprocessor.
+  Under some conditions a line A emulator error will be thrown, this comes
+  about from an ER_Throw being thrown without an ER_Catch run before this..
+  The standard use of the Line A emulator on the TI92 is to raise
+  errors in the form $Axxx, where xxx is the error code
+
+  * Trace: when the T bit of the status register, after each instruction,
+  the trace vector is launched: used to write debuggers: that is what Db92
+  does...
+
+ I.4 ) The system byte of the status register
+
+ The system byte is: |T|0|S|0|0|I2|I1|I0|
+Note: you may modify that byte only when in supervisor mode.
+
+*  The T ( trace ) bit is set by the Raven debugger: it allows to "trace" a
+program: when set, after each instruction, it launches the trace vector
+( it launches the program which the trace vector points to: ie: the debugger )
+
+*  The S ( system ) bit : when set, it allows to modify freely the system byte
+and to have access to the supervisor resources.
+
+*  I2,I1 and I0 are the bits of the interrupt mask.
+ The I0, I1 and I2 bits of the system register are used to set the interrupt
+level mask. These bits are set to an interrupt level: if the trap generated
+has a higher level than the interrupt mask, then the trap is executed.
+Otherwise it is ignored. ( ignoring a trap generally means that another
+interrupt, with a higher priority is being treated )
+
+Here is how these bits are set:
+
+          I2   I1   I0
+
+level 0 |  0    0    0 |  ---------> lowest priority
+level 1 |  0    0    1 |
+level 2 |  0    1    0 |
+level 3 |  0    1    1 |
+level 4 |  1    0    0 |
+level 5 |  1    0    1 |
+level 6 |  1    1    0 |
+level 7 |  1    1    1 |  ---------> highest priority
+
+
+Note: #0=%000; #1=%001; #2=%010; etc...
+
+ I.5 ) The processor response to traps
+
+ This section is added for documentation purposes. till you do not decide
+to write a debugger, data in this section will never be of any use to you....
+If you just want to know how it works, then...
+
+The Processor services Exceptions with a certain priority.
+There exist 3 groups:
+
+------------------------------------------------------------------
+|  Group    |   Exception         |   recognition    |  priority |
+------------------------------------------------------------------
+|     0     |     RESET           |  at the end of   |     ^     |
+|           |    BUS ERROR        |  the clock cycle |     |     |    ^
+|           |  ADDRESS ERROR      |                  |     |     |    |
+------------------------------------------------------------------    |
+|     1     |     TRACE           |  at the end of   |     ^     |    |
+|           |  INTERRUPTION       |  an instruction  |     |     |    |
+|           | ILLEGAL INSTRUCTION |  cycle           |     |     |    |
+|           | PRIVILEGE VIOLATION |                  |     |     |    |
+------------------------------------------------------------------    |
+|     2     |  Trap #0 to #15     |  during an       |   NO      |    |
+|           |  TRAPV, CHK         |  instruction     |  PRIORITY |    |
+|           |  DIVU, DIVS         |  cycle           |           |
+|           |  (if division by 0) |                  |           |
+------------------------------------------------------------------
+
+The exception column indicates the names of the exceptions in the group.
+The recognition column indicates when the processor takes into account the
+exceptions.
+The priority column indicates what is the priority ( ie: the one which will
+be treated first ) within the group.
+Finally, the arrow to the right indicates the increasing priority of the
+groups.
+
+Thus, some exceptions may happen during an instruction...
+These groups reflect the way the processor will handle them.
+during each exception, the processor stores some information on the
+supervisor stack so that the OS may found what went wrong...
+
+The group 0 will result in the following data structure on the stack:
+
+Status of the R/W,I/N,FC2,FC1,FC0 pins ( the 5 first bits of the word )  ^
+the address which was on the bus address ( a longword )                  |
+a copy of the instruction register     ( a word )                        |
+a copy of the status register          ( a word )                        |
+the PC                                 ( a longword )                    |
+
+The arrow indicates the decreasing addresses. The Stack pointer points at the
+first entry of that table after the exception.
+
+The group 1 and 2 will result in the following data structure on the stack:
+
+a copy of the status register          ( a word )                        ^
+the PC                                 ( a longword )                    |
+
+
+-----------------------------------------------------------------------------
+
+II ) The calculator
+
+ II.1 ) The calculator.
+
+ Physically, the processor is wired on a card. To the processor, is
+connected other hardware. There is the RAM, the ROM, the timer, the link
+microcontroler, the screen refresher and some others. These devices can be
+accessed through certain addresses ( these addresses depend on the way these
+devices were wired to the processor ). In fact , what happens when you execute
+a move D0,($xxxx) command is: the processor uses some of its output pins to
+write the D0 register at address $xxxx.
+First, the address pins are pulled high or low ( logic level 1 or 0 ) to match
+the address $xxxx. There is some external decoding logic which connected on the
+address bus ( some "and" gates in a small IC ) which triggers only the device
+located at this address. Then, when the data pins are pulled high or low to
+match the D0 register, only the right device reads the pins.
+Thus, this address has no physical meaning: it may be effectively some RAM or
+ROM but it may be the input pin of the graphic controller. Whether it is some
+real memory or the internal register of a peripheral depends on the external
+decoding logic.
+
+$000000-$1FFFFF : RAM
+$200000-$3FFFFF : Module ROM, or masked ROM if there's no module
+$400000-$5FFFFF : Module ROM
+$600000-$6FFFFF : Memory mapped I/O (only the lower 6 bits of the address
+                                     really point to something)
+$700000-$FFFFFF : Nothing (floating bus)
+
+ The Memory mapped I/O is used by all the devices other than RAM and ROM.
+For example, you may command and have access to all the features of the link
+microcontroler by switching some bits at addresses: $60000C and $60000E.
+ Not all these ports are understood... Check the "lowlevel.txt" file for more
+on these.
+ However, here is a list of the most important:
+   *  The timer: it may be freely reprogrammed to trigger interrupts with new
+      frequencies
+   *  The video controller: it is not very well understood but it is possible
+      for now to adjust the contrast, and tell him where to get in memory the
+      data to update the screen. ( see I.7 for more...)
+   *  The I/O link microcontroler: it is possible to directly command the
+      lines of the i/o port.
+   *  The keyboard: it may be read directly by these ports. ( check
+      "lowlevel.txt" and see \lesson\lesson_2.txt)
+
+ II.2 ) The Timer
+
+ Outside of the processor, on the card which supports the processor, there
+is a component, a hardware timer which periodically triggers the auto
+interrupts (see I.1: vector n�25-31)( not all with the same rate ) . These
+interrupts are used by the system to read the keyboard for example and many
+other tasks. They allow the processor (and your programs) to be aware to the
+time.
+ Note:
+1) disabling interrupts will greatly increase the programs speed ( it can
+be done by setting the interrupt mask to level 7 ) but will require special
+programming ( for example: the OS keyboard reading routine uses interrupts:
+you will no be able to access to the keyboard anymore with them: you will
+have to directly read the keyboard controller. To know why, see
+\lesson\lesson_2.txt)
+2) Interrupts can be redirected to create a resident program for example or
+to have grayscale graphics.
+
+ II.3 ) The screen
+
+  As the screen is a simple Black & White screen, a screen is described by
+128(height)*240(width)/8=3840 bytes =$F00 bytes, each bit representing one
+pixel. To display something on the screen you just need to build a
+"virtual screen" in RAM: first, allocate a $F00 bytes long memory area.
+There, the first bit will be the upper left pixel: %1 for on and %0 for off.
+Then, all following bits will be the pixels to the right till the end of the
+upper line of the screen. Then, pixels are mapped the same way, one line
+after the other. Now, if go back at the beginning of that memory area, and
+if you read the bits for $F00 bytes, you will read the pixels from the left
+to the right of one line, from the upper line to the down line.
+
+  All you need now to do is to tell the video controller that you wish him
+to display a picture using the data stored in the area you allocated (you
+need to write to the $600010 I/O port the address of your memory area
+divided by 8: check "lowlevel.txt" ). Now, the video controller
+will read that memory area just like we did and it will update the screen
+100 times per second depending on the data in this memory area.
+
+  On 92 with ROM 1.x, the memory used by the system is at address $4440 and
+on ROM 2.x, this address is $4720. The calculator $600010 port is originally
+configured to get LCD data in this location. To get the exact location of
+the LCD memory, use the system variable: "tios::main_lcd".
+  For more on Grayscale and the use of virtual screens, look at
+\lesson\lesson_3.txt
+
+ II.4 ) The RAM
+
+ Please, note that this section is not very useful for programming it is
+there just for those of you who are interested to know how it works.
+ The 92 was probably originally build to have a 256 k memory. When only 128 k
+are present, then, the RAM can be linearly addressable from the processor:
+the RAM is in one piece: it is one chip.
+ When using 256 k, there are two chip: this allows interleaving 2 and
+increases the access to the memory sometimes with a factor 50 % (I tested it:
+just write a program with many access to memory: you will see..).
+Here is why:
+128k:
+
+-----------         ---------------
+          |   Wire  |             |
+Processor |---------| Memory bank |
+          |         |             |
+-----------         ---------------
+
+256k:
+                        |--------|
+-----------    |--------| Bank 1 |
+          |    |        |--------|
+Processor |----|
+          |    |        |--------|
+-----------    |--------| Bank 2 |
+                        |--------|
+
+The interleaved memory is build so that consecutive addresses are always on
+different memory banks. Here is a schematic of what happens when doing a
+sequential memory access with and without interleaving.
+128k:
+each memory access requires the same access time ( often around 5 or 20
+processor cycles )
+
+address n�i:  i        i+1       i+2
+              |         |         |
+----------------------------------------> time ( unit: processor cycle )
+
+256k:
+each access is done at the same time on both banks: the process is
+paralleled: while the first access will require the same time than without
+interleaving, all other will require half less time if access is sequential.
+
+address n�i:  1    2    3     4    5
+              |    |    |     |    |
+-----------------------------------------> time ( unit: processor cycle )
+
+ II.5 ) The keyboard
+
+To understand the matrix type keyboard, look at the following 4 keys keyboard:
+
+D0  ------------+------------+
+                |            |
+         key 1 |-     key 2 |-
+                |            |
+                +--+         +--+
+                   |            |
+                   |            |
+                   |            |
+D1  ------------+------------+  |
+                |  |         |  |
+         key 3 |-  |  key 4 |-  |
+                |  |         |  |
+                +--+         +--+
+                   |            |
+                   D2           D3
+
+
+Where "+" is a connected node.
+
+ |       ; This is a
+|-       ; manual switch
+ |       ;
+
+ If one pulls high the D2 and D3 lines (+5V), D0 or D1 will be pulled high if
+one key was hit. Now, if you decide to mask column D2 (0V) and apply +5V to D3
+, if you check first D0 then D1, you will know for sure if one of the key 2 or
+4 was hit and you will know which one(s): If key 4 is hit, D1 is high and if
+key 2 is hit, D0 is high.
+ This system can be generalized to any size: the 92 keyboard is based on this
+matrix type design
+
+ A thoughtful search on the 92 motherboard will show you that the 92
+keyboard is wired in a standard fashion. It is a 10 lines/8 columns matrix.
+ The keys are wired so that the two lowest enter keys are the same and the
+highest enter key is different. The on key does not belong to this matrix
+which is build on the basis of the matrix shown in the lowlevel.txt file.
+ The 10+8 lines are directly connected to the CPU: I have been unable to
+get their exact pinout. I don't really understand how this works because
+if the keyboard is directly connected to the CPU, it should interfere with
+the bus.. Don't know really why it works..
+
+ II.6 ) The link microcontroler
+
+ Note: This section was written by Sami Khawam
+       <sKhawam at bigfoot.com>
+       <a9501901 at unet.univie.ac.at>
+
+ All TI calculators have two open-drain lines. There is a method under Fargo
+to access each line individually for input and output (see "lowlevel.txt"),
+but in most cases where byte-transfers are needed, TI's built-in link
+routines are simple en effective to use. The protocol used by these routines
+will be described here:
+
+ When the lines are not active they are high. You should remember that if
+an end of an open-drain line is pulled-down (connected to the ground) by
+a device, all devices that are attached to that line (including the
+device that pulled the line down) will read a low signal even if they are
+trying to pull the line up.
+
+We will assume that Calculator1 (C1) want to send a byte to Calculator2
+(C2).
+The lines will be refered by L1 and L2. In the text "10" means L1 high
+and L2 low, and "01" means L1 low and L2 high.
+
+
+-In idle mode, both lines are high. Depending on the bit that C1 wants to
+ send, it will pull-down different lines:
+
+   * .L2 will be pulled-down if the bit is 1.
+     .C1 reads now 10.
+
+   * .L1 will be pulled-down if the bit is 0.
+     .C1 reads now 01.
+
+ C1 will wait until it reads a 00.
+
+
+-C2 was waiting for a signal change on L1 or L2.
+
+   * .If it reads 10 it knows that the bit sent is 1.
+     .L1 will be pulled-down by C2
+     .Now C2 reads 00. It will wait for a 01
+
+   * .If it reads 01 it knows that the bit sent is 0.
+     .L2 will be pulled-down by C2
+     .Now C2 reads 00. It will wait for a 10
+
+
+-C1 was waiting for a 00. Now it pull-up both lines. After this
+ C1 will read either 01 or 10.
+
+
+-C2 will also pull-up the lines, and reads 11.
+
+-C1 reads also 11.
+
+
+This will be repeated 8 times in order to transfer a bit.
+
+This protocol used by TI on their calculators, is an effective protocol.
+But in most cases you do not need to go through those details when
+programming, since everything is made by the built-in ROM routines.
+ To learn more on the byte level protocol, look at \doc\ti-prot.txt
+
+ II.7 ) Conclusion
+
+ If you are curious enough to open your calculator, you will notice that what
+I explained there is not exactly what happens:
+ There are 4 video controllers: 2 for the lines and 2 for the columns. I found
+no dedicated link microcontroler on my mother board: perhaps does one of the
+video MCU also handle the link ... I also found no external timer and found
+no external address decoding logic for the i/o ports. One should also notice
+that the processor has between 90 and 120 pins ( I did not counted them but
+looked at the processor ) while the original Motorola 68k processor had
+~75 pins. This may mean that the processor has many build in newer functions.
+
+-----------------------------------------------------------------------------
+
+III ) Fargo
+
+ When Fargo is not installed, the TI OS is running and it is not possible to
+have access directly to the processor: it is impossible to execute ASM
+( impossible... perhaps someone will find a way one day ... ). At least,
+no one ever found a leak into the TI OS: it is very well programmed...
+
+ III.1 ) Fargo 0.1.x
+
+ To overcome that problem, David Ellsworth had a great idea:
+He just send the 92 a backup slightly bigger than the calc's memory: at one
+point or another, the address the backup writes to will be bigger than
+$20000 ( 128 kb ). Higher addresses go back at the beginning of the memory:
+( ex: the initialisation vector is $000000 and $020000 is physically just the
+same... Just the way the memory chip is connected ) Thus, the backup will be
+writing in the exception vector table and on the vectors used to send or
+receive data...
+ At one point or another, a special routine, already copied in memory,
+will be triggered instead of those in charge of the backup. Thus, the backup
+will end abnormally but the special routine ( located at the end of the
+memory, at the begening of the core.o file ) will redirect some auto
+interrupts to newer interrupt routine. One of those will test each time it
+is launched by the timer if the [shift] + [on] combination key was hit.
+Then, basic routines ( the core ) and some libs can be send to the 92 to
+execute assembly.
+
+ III.2 ) Fargo II 0.2.x
+
+ That version works exactly the same but it uses an "event handler" which is
+located around 36 kb in the memory. it writes upon that handler the routine
+which then redirects some auto interrupts. It saves the pain to rewrite things
+on the exception table and generates smaller backups....
+
+ Note: The major advantage is that no "RESET" code needs to be run. Restoring
+the vector table was just a matter of one ROM call (although it was done with
+a loop). Fargo 0.1.x had a minimal portion of the actual ROM reset code
+(without the memory clearing code etc.) as writing over all the memory damaged
+sytem data in the RAM and the running CODE in the ROM would therefore crash
+the machine after the backup had been sent. With Fargo II this is not
+necessary.
+
+ III.3 ) Fargo use of the memory
+
+  III.3.1 ) Introduction
+
+ The greatest treat to assembly programming is the TI OS. The thing is that
+it will relocate programs in the RAM so that as little RAM as possible is
+used.
+ For example, if you delete a standard TI program, the OS will move data and
+variables in memory so that RAM is really freed: the memory is defragmented
+just like a defragmentation program works on your Hard Disk.
+ This means that it is impossible to know where in memory programs will be
+executed. This is a problem with immediate addressing: BSR and JSR
+instructions refer to precise addresses which are not known when the program
+is compiled and which are not known even when copied in the RAM: the programs
+they refer to can be moved anytime.
+ This phenomenon is common to all the modern computers. The size of the
+program memory is limited and must be used in the most efficient way
+possible. The solution to this problem is Relocation !!!
+
+  III.3.2 ) Relocation: the assembler
+
+ An easy way to understand how it works is to sneak into the object files
+generated by the A68k assembler ( before they are turned into 92 files by the
+linker: "flinker" ). If you just look into the Fargo.bat file (dos users),
+you will see that a68k generates .o files which are used to build .92p files
+and which are then deleted. Just remove the line which delete these object
+files. Then, assembling one of your program will generate the .92p file and
+a .o file.
+ A file is included in this distribution: \doc\amiga.txt. This file describes
+the format of these object files. Note that this file format is named "amiga"
+because it was originally developed by the authors of the amiga OS and was
+used by the amiga OS.
+
+ Relocation is a process transparent to the user. It must be taken care of by
+the OS.
+ To allow the process to take place, the assembler generates tables at the
+end of the code. These tables contain relative pointers from the beginning of
+the code section. Each of these relative pointer point to a place in the code
+where an immediate address is used. These relative pointers are called offsets.
+
+For example, here is a program I compiled:
+**************************
+ include "flib.h"
+ xdef _main
+ xdef _comment
+
+_main:
+   jsr       flib::clr_scr
+   rts
+
+_comment:
+ dc.b "esai",0
+
+ end
+***************************
+here is the corresponding object file generated.
+
+        0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F   0123456789ABCDEF
+  00   00 00 03 e7 00 00 00 00 00 00 03 e8 00 00 00 01   ..�......�...   00
+  10   20 00 00 00 00 00 03 e9 00 00 00 04 4e b9 00 00    .....�...N�..   10
+  20   00 00 4e 75 65 73 61 69 00 00 4e 71 00 00 03 ef   ..Nuesai..Nq..�   20
+  30   01 00 00 02 5f 6d 61 69 6e 00 00 00 00 00 00 00   .._main........   30
+  40   01 00 00 02 5f 63 6f 6d 6d 65 6e 74 00 00 00 08   .._comment....   40
+  50   81 00 00 03 66 6c 69 62 40 30 30 30 39 00 00 00   �..flib at 0009...   50
+  60   00 00 00 01 00 00 00 02 00 00 00 00 00 00 03 f2   ............._   60
+
+The hunk code begins at $14:
+00 00 03 e9 00 00 00 04 4e b9 00 00 00 00 4e 75 65 73 61 69 00 00 4e 71
+hunk type | hunk length|               code                           |
+
+Note that the name of the program is considered as some code by the assembler
+and that it adds the $00004e71 longword at the end of all program codes
+( don't know really why: probably something to do with Fargo... )
+
+Then the hunk_ext
+
+00 00 03 ef     ;   hunk type
+01 00 00 02 5f 6d 61 69 6e 00 00 00 00 00 00 00   ; symbol type 01
+01 00 00 02 5f 63 6f 6d 6d 65 6e 74 00 00 00 08   ; length: 02 longwords
+81 00 00 03 66 6c 69 62 40 30 30 30 39 00 00 00   ; symbol type 81, length 03
+the last symbol name is the library name/number which is called in the
+program. Here, flib::clr_scr is flib at 0009.
+
+Lastly, following the library symbol is its relocation table.
+00 00 00 01     00 00 00 02
+table lenght |  offsets ( in longwords ) 
+
+Here, there is only one call to clr_scr located at $2 from the beginning of
+the code.
+ Then, flinker will create a Fargo file with the right header structure, it
+will add the code to this file and lastly, will compress these tables and add
+them at the end of the file.
+
+  III.3.3 ) Relocation: Fargo
+
+ Now, if you send this .92p file to the 92 and execute it, here is what Fargo
+will do.
+ First, it will look at these tables. It will get the address of each
+subroutine called and will replace all the blanks left by the assembler in the
+"Jsr" opcodes. It will use the relocation table to know where to do these
+replacements.
+
+ Perhaps some already wondered who relocated the Fargo shell ? Well, the
+Fargo core is stored at the end of the RAM at a place the TI OS never reaches.
+I believe there exist a TI OS variable which gives the end of the available
+memory. All what is necessary to do is to change this variable
+( to decrease it slightly...) .
+
+ Note: it is dangerous to play with it though, in reducing memory size (like
+Raven did). TI-BASIC tokens are processed at the end of memory, if a Fargo
+program writes data at the end of memory and adjusts this pointer then
+this data could be overwritten. If this wasn't the case Fargo would support
+TSR's already (most probably). 
+
+ The only problem left is how Fargo gets the address of the subroutine. I
+believe that in the relocation table, there is the library name. Fargo
+searches this file in memory ( it probably uses the VAT to do so. See IV.2)
+and then reads at the beginning of the library a table which lists the
+relative address -from the beginning of the library file- of the subroutine
+( it probably uses the library number to do so ).
+
+ III.4 ) The use of TI OS routines
+
+ Fargo solves another problem than the problem of relocation.
+There exist different ROM versions for the 92. While these different ROM
+versions correct a few bugs in the different units of the calculator, they
+also have a great drawback. The same routines ( ex: display routines ) are
+not at the same place in different ROM versions. This means that using the
+TI OS routines is not very easy if you want to write a program which will work
+on any 92. The solution is the use of a table of pointers pointing to the
+correct addresses.
+ When Fargo is installed into a backup, it initialises the TIOS library so
+that it uses the right addresses. Each subroutine there is an absolute pointer
+to the right subroutine in ROM.
+ Then, during the relocation process, the TIOS library is not handled like all
+other libraries. To blanks in the "Jsr" opcodes using TIOS are added the
+absolute address corresponding to the routine number in the table library
+-located at the beginning of the file-.
+ RAM constants which were used in the "move.l tios::clr_scr,a0" opcode are
+handled in a similar fashion: the blanks left are replaced by the "subroutine
+absolute address" .
+
+------------------------------------------------------------------------------
+
+IV ) The texas instrument's operating system
+
+ IV.1 ) handles
+
+  When you want to get some dynamic memory ( a memory you will free at the
+end of the program ), you use a TI-OS routine called "tios::HeapAlloc" with
+the correct parameters ( size of memory needed on a longword ). This routine
+will return a word integer: a handle. It is a sort of pointer to the memory
+you asked for. To get the real pointer to that memory, you should use the
+"tios::deref" macro which will return a pointer you will be able to use.
+  Handles are the TI-OS solution to moving programs in memory to save
+as much space as possible ( see II.3 ). Basically, a handle is a number.
+It is the number of an entry in an array. That array is pointed to by the
+longword stored at address $5D42. The entries in this array are the 
+relative address from the beginning of the array to the memory the handle
+represents. So, to get the address of a handle: (($5D42) + handle * 4) - 2
+This is what the "tios::deref" macro does.
+
+Note:  $5D42 == tios::Heap , "-2" isn't done by the tios::deref macro.
+       tios::Heap+handle*4-2 would give the address of the word
+       (preceeding the data) indicating the length of the memory block
+       (in words)
+
+Note: There exist some static handles: these are studied in IV.2
+      Please, check also "handles.txt" .
+      If you wish to use practically handles, look at \doc\68kguide.txt,
+      section 1.9: handles.
+
+Now, if the TI OS decides to move a program in memory to compact the memory
+so that no "holes" are left, it adjusts the pointer to the program or the
+data while the handle number is kept unmodified. If you knew the handle
+number, you can always get the address: the moving process is transparent
+to the user.
+
+ IV.2 ) VAT: variable allocation tables
+
+ As stated in Fargo documentation, handles between 0000 and 0015 included
+are system handles: they are used by TI OS and are de facto static.
+Handles $0B and $0C are used to store the info on folders and files on the 92.
+Note: They have the same use as that of the FAT on a DOS Hard Disk
+
+handle $B : folder table
+handle $C : main folder
+
+The first hex number indicates the relative address from the beginning of the
+file/folder table handle.
+
+format of file/folder tables
+----------------------------
+$00.W : maximum number of files/folders before handle has to be resized
+$02.W : number (N) of files/folders in table
+$04   : listing in the format below (alphabetical order)
+     +$00   : file/folder name (lowercase) terminating in 0s until $08
+     +$08.W : file/folder flags
+            . 3 (bit3)   : locked
+            . 4 (bit4)   : hidden
+            . 7 (bit7)   : folder
+            . 14 (bit14) : parameter (in function/program)
+     +$0A.W : handle of file/file table
+$04 + ( $0C * N ): end of the table
+
+Note: These tables only change in size when more room is required to store the
+      entries, for speed the table is only resized at intervals of 10 entries.
+      This is marked by the first word in the table, their corresponding size
+      change is $78 bytes.
+
+So, the handle $B will point to a table which lists all folders on the calc
+( including the folder "main" ). In this table, you will find the handle of
+each folder and each of these handle will point to a table of files. In each
+of these table of files, there will be the files and their respective handle
+which will point to the file itself.
+
+Note: this last paragraph is included for documentation purposes: using it
+      to effectively access to these handles would probably lead to a big
+      BUGS as resizing these handles could lead the TI OS memory routines to
+      move your program in memory which would mean that the Fargo relocation
+      was useless...
+
+For more on the TI OS file formats, functions/programs structure and
+tokenization, please read Gareth's documentation, \doc\files.txt.
+
+-----------------------------------------------------------------------------
+
+ IV.3 ) Lite Pascal
+
+  IV.3.1 ) introduction
+
+ The programmation langage implemented in the 92 is extremly powerfull as it
+allows the definition of local variables and features many high level langage
+functions.
+ However, as some of you have perhaps allready tested it, it is extremly slow.
+For example, here is a small program i did to test this:
+
+****************
+essai()
+Prgm
+local a,i
+0->a
+For i,0,10000
+a+1->a
+EndFor
+EndPrgm
+****************
+
+The corresponding program i wrote in assembly:
+
+****************
+ include "flib.h"
+ xdef _main
+ xdef _comment
+
+i    equ  10000
+
+_main:
+
+  jsr      flib::clr_scr
+  clr.l    d1
+  move.l   #i-1,d0
+loop
+  add.l    #1,d1
+  dbra.l   d0,loop
+  rts
+
+_comment:
+ dc.b "essai",0
+
+ end
+*************************************
+
+The ti version took exactly 2 minutes to execute on my 92 II
+The assembly version executed itself so fast that it was impossible to
+measure anything. I used the assembly version with the maximum value possible
+for i ( 2^32-1 = 4.5 billion ). Doing 4.5 billion loops took me less than
+one second...
+
+Impressive, eh ? !!
+
+  IV.3.2 ) Tokenization
+
+ The explanation to this phenomenon is the way the ti traduces the program.
+The ti does not generate any assembly code for this program. It interpretes it
+This means that it simulates a computer which understands the lite pascal
+instructions. To do this, it has a whole bunch of subroutines with parameters
+which simulate these instructions.
+ First, when you edit your program, the text of the program is stored
+(probably) in the stack. Upon exit, the OS creates a file to store this
+program. The program is stored in a very peculiar form which is explained in
+\doc\files.txt.
+In fact, it is translated in a post fixed notation: the greatest advantage
+to this notation is that it takes into account the priority of the operateurs.
+Upon execution, two process take place: first, there is an error checking on
+each expression before execution. Then, expressions are executed.
+ The fact that the error checking is not done before execution slows down the
+whole process and the way the instructions are executed is extremly slow by
+itself. A book of mine states that interpretation is usually 10000 slower than
+compilaton.
+
+Note to those interested in compilation theory.
+The process of tokenizing is likely not to be done by a syntax analysis
+program. In this case, most of the errors would have been detected sooner.
+This means that the Post Fixed Notation is probably generated by a homemade
+algorithm. Please, note that it would be possible to write a code generator
+on PC's for the 92 using this post fixed notation. However, the greatest pb
+with this notation is that the code is very difficult to optimize.
+That is why it is not used very often in compilers. Only in interpreters.
+
+*****************************************************************************
+                                 System
+*****************************************************************************
+
+
diff --git a/docs/ti_hw/tie/IO-PORTS.TXT b/docs/ti_hw/tie/IO-PORTS.TXT
new file mode 100644
index 0000000..43c88ec
--- /dev/null
+++ b/docs/ti_hw/tie/IO-PORTS.TXT
@@ -0,0 +1,292 @@
+			I/O Ports Information
+			---------------------
+
+Note:This info was mostly taken from David Ellsworth's Fargo documentation
+
+
+-----------------------------------------------------------------------------
+INTRODUCTION
+-----------------------------------------------------------------------------
+
+If all a computer had was its RAM and ROM, it would just be an inert box
+doing invisible calculations. To connect to the outside world, computers
+need I/O ports. On the TI-89/92+, these ports are used to access the keyboard,
+link port, LCD, and some other hardware settings.
+
+This text file describes how the TI-89/92+ organizes its memory, and lists all
+of the known I/O ports.
+
+Since the 68000 processor has no dedicated instructions for reading and
+writing I/O ports, all I/O must be memory-mapped. This means that I/O ports
+are read and written by accessing specific addresses in memory. The
+addresses in the range 600000-60001F correspond to memory-mapped I/O.
+
+Directly accessing I/O ports has its advantages and disadvantages. It is
+very low-level, and gives you complete control. However, it can be a complex
+process, and why reinvent the wheel? For this reason, most I/O tasks (such
+as reading keys, sending and receiving through the link port, and changing
+the contrast) are already handled by the TI-89/92+'s ROM.
+
+There are some times when it is still best to directly access the I/O ports.
+The TI-89/92+ is capable of recognizing several keys held down at once, but the
+ROM has no built-in provision for this. When you want to read multiple keys
+at once in a program, you must use direct I/O.
+
+----------------------------------------------------------------------------
+THE MEMORY MAP
+----------------------------------------------------------------------------
+
+Memory addresses are 4 bytes long (32 bits). However, the 68000 processor
+has a 24 bit addressing bus. For this reason, addresses listed here in
+hexidecimal will be 6 digits long.
+
+On the TI-89, memory is mapped out as follows:
+
+000000-1FFFFF : RAM
+200000-3FFFFF : Module ROM
+400000-5FFFFF : Nothing
+600000-6FFFFF : Memory mapped I/O (lower 6 bits)
+700000-FFFFFF : Nothing (floating bus)
+
+On the TI-92+, memory is mapped out as follows:
+
+000000-1FFFFF : RAM
+200000-3FFFFF : Module ROM, or masked ROM if there's no module
+400000-5FFFFF : Plus Module ROM
+600000-6FFFFF : Memory mapped I/O (lower 6 bits)
+700000-FFFFFF : Nothing (floating bus)
+
+On the TI92 (2.1 and lower versions), memory is mapped out as follows:
+
+000000-1FFFFF : RAM
+              : (exact:    1FFFF [128kB memory]  3FFFF [256kB memory])
+200000-3FFFFF : Module ROM
+400000-5FFFFF : Expansion ROM (TI92 2.1)
+600000-6FFFFF : Memory mapped I/O (lower 6 bits)
+700000-FFFFFF : Nothing
+
+Note that, for example, the RAM range covers 2 Mb. This does not mean there
+is 2 Mb of RAM; it means that any RAM accesses beyond the maximum (usually
+128 kb) will wrap around to the beginning. The same goes for ROM, except
+that the maximum is usually 1 Mb.
+
+TI-89 ROMs use:
+
+000000-03FFFF to address RAM.
+200000-3FFFFF to address ROM (soldered onto the board).
+600000-60001F to address I/O.
+
+TI-92+/TI92 2.1 ROMs use:
+
+000000-03FFFF to address RAM.
+400000-4FFFFF to address ROM (Plus Module ROM).
+600000-60001F to address I/O.
+
+TI92 (1.x) ROM use:
+
+000000-01FFFF to address RAM.
+200000-3FFFFF to address ROM (Plus Module ROM).
+600000-60001F to address I/O.
+
+-----------------------------------------------------------------------------
+THE I/O PORTS
+-----------------------------------------------------------------------------
+
+:RO = read-only
+:WO = write-only (returns random values when read)
+:RW = read/write
+
+       MSB      LSB
+    <76543210|76543210>
+
+:RW [600000]
+    <.....2..|........> = something to do with keyboard
+    <..5.....|........> = bits <....0> of contrast
+    <........|.......0> = clear: interleave RAM (allows use of 256K of RAM)
+    <........|.....2..> = set: generate Auto-Int 7 when memory below [000120]
+			: is written
+
+:WO [600002]
+    <........|........> =
+
+:WO [600004]
+    <........|....3...> = set: 000000..1FFFFF mapped to 200000..3FFFFF
+
+:WO [600006]
+    <........|........> =
+
+:WO [600008]
+    <........|........> =
+
+:WO [60000A]
+    <........|........> =
+
+:RW [60000C]
+    <765.3210|........> = (write) link status
+    <........|7...321.> = (read) link status
+    <........|..5.....> = (read) set: one byte receive buffer has a byte
+    <........|.6......> = (read) set: one byte transmit buffer is empty
+
+:RW [60000E]
+    <.......0|........> = set red output, if direct port access enabled
+    <......1.|........> = set white output, if direct port access enabled
+    <.....2..|........> = read red output
+    <....3...|........> = read white output
+    <.6......|........> = enable direct port access
+    <........|76543210> = read a byte from the receive buffer (1 byte buffer)
+    <........|76543210> = write a byte to the transmit buffer (1 byte buffer)
+
+:WO [600010]
+    <76543210|76543210> = Address of LCD memory divided by 8
+
+:WO [600012]
+    <..543210|........> = LCD horizontal frequency (?maybe?)
+			: The TI ROM writes $31 to this port during
+			: initialization.
+
+    <........|76543210> = $100 - number of LCD scanlines
+			: If the number of scanlines is smaller than $80 (the
+			: actual height of the LCD) the display will be
+			: duplicated in the lower half. Decreasing the height
+			: darkens the LCD; increasing the height lightens the
+			: LCD. The TI ROM writes $80 to this port during
+			: initialization.
+
+:RW [600014]
+    <........|........> =
+
+:RW [600016]
+    <........|76543210> = Programmable rate generator. Set the timer's init-
+			: ial value by writing it to this port. The timer is
+			: incremented every 6250 clock cycles, unless it has
+			: a value of zero, in which case it is reset to its
+			: initial value. The LCD is refreshed every 16th time
+			: this timer is incremented.
+			:
+			: See also Auto-Ints 1 and 5 in Interrupts.txt.
+			:
+			: The incrementation rate would be exactly 1600 Hz if
+			: the processor's clock rate were exactly 10 MHz. In
+			: reality, it averages around 1400 Hz, and is depen-
+			: dent on battery power (among other things).
+			:
+			: The ROM sets the initial value of the timer to $B2,
+			: effectively giving it a period of 79 ticks. It uses
+			: the timer for Auto Power Down, which is set to
+			: occur after 6000 interrupts. If the clock rate were
+			: 9.875 MHz, the interrupt rate would be 20 Hz and
+			: countdown delay would be 5 minutes. I think it is
+			: safe to assume that the designers of the TI-89/92+
+			: intended the APD delay to be 5 minutes.
+			:
+			: For this reason, and becaues it is unlikely that
+			: the designers intended the clock rate to be any-
+			: thing other than 10 MHz, I am inclined to think
+			: that they chose the initial value to be $B2 instead
+			: of $B1 for a very particular reason: auto-int 5
+			: will coincide with auto-int 1 with a period of 4,
+			: the maximum period possible. This insures that the
+			: TI-89/92+ will run more smoothly than it would if the
+			: two interrupts coincided with a period of 2 or 1.
+			: If you don't understand this, don't worry -- it is
+			: only a matter of curiosity.
+
+:RW [600018]
+    <......10:76543210> = keyboard row mask; setting a bit masks the
+			: corresponding row of the keyboard from being
+			: read by [60001B].
+
+:RW [60001A]
+    <......1.|........> = ON key status (0=down, 1=up)
+    <........|76543210> = keyboard column mask; if a bit is clear, one or
+			: more keys in the corresponding column are being
+			: held down. Keys in rows masked by [600018] are
+			: ignored.
+
+:WO [60001C]
+    <...43210|........> = Something to do with LCD
+			: The TI89/TI92+ ROM writes $21 to this port during
+			: initialization, and $FF when the calculator is
+			: turned off.
+    <........|....3210> = bits <4321.> of contrast
+
+:WO [60001E]
+    <........|........> =
+
+-----------------------------------------------------------------------------
+THE KEYBOARD MATRIX
+-----------------------------------------------------------------------------
+
+As was hinted in the I/O ports section, the keyboard is accessed internally
+as a matrix. This matrix can be read by writing [600018], pausing to
+allow the I/O to recover, then reading [60001B].
+
+Keyboard Matrix on the TI 92:
+-----------------------------
+
+Row     +-------+-------+-------+-------+-------+-------+-------+-------+
+ V  Col>| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
++-------+-------+-------+-------+-------+-------+-------+-------+-------+
+| Bit 0 |  down | right |   up  |  left |  hand | shift |diamond|  2nd  |
+| Bit 1 |   3   |   2   |   1   |   F8  |   W   |   S   |   Z   | unused|
+| Bit 2 |   6   |   5   |   4   |   F3  |   E   |   D   |   X   | unused|
+| Bit 3 |   9   |   8   |   7   |   F7  |   R   |   F   |   C   |  STO  |
+| Bit 4 |   ,   |   )   |   (   |   F2  |   T   |   G   |   V   | space |
+| Bit 5 |  TAN  |  COS  |  SIN  |   F6  |   Y   |   H   |   B   |   /   |
+| Bit 6 |   P   | ENTER2|   LN  |   F1  |   U   |   J   |   N   |   ^   |
+| Bit 7 |   *   |  APPS | CLEAR |   F5  |   I   |   K   |   M   |   =   |
+| Bit 8 | unused|  ESC  |  MODE |   +   |   O   |   L   | theta |backspc|
+| Bit 9 |  (-)  |   .   |   0   |   F4  |   Q   |   A   | ENTER1|   -   |
++-------+-------+-------+-------+-------+-------+-------+-------+-------+
+Note: ENTER1 is on the alphabetic _and_ numeric keypads.
+      ENTER2 is next to the cursor pad.
+
+Keyboard Matrix on the TI 89:
+-----------------------------
+
+Row     +-------+-------+-------+-------+-------+-------+-------+-------+
+ V  Col>| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
++-------+-------+-------+-------+-------+-------+-------+-------+-------+
+| Bit 0 | Alpha | Diam. | Shift |  2nd  | Right | Down  | Left  |  Up   |
+| Bit 1 |   F5  | Clear |   ^   |   /   |   *   |   -   |   +   | Enter |
+| Bit 2 |   F4  |Backspc|   T   |   ,   |   9   |   6   |   3   |  (-)  |
+| Bit 3 |   F3  |Catalog|   Z   |   )   |   8   |   5   |   2   |   .   |
+| Bit 4 |   F2  |  Mode |   Y   |   (   |   7   |   4   |   1   |   0   |
+| Bit 5 |   F1  |  Home |   X   |   =   |   |   |   EE  |  STO  |  Apps |
+| Bit 6 |       |       |       |       |       |       |       |  Esc  |
++-------+-------+-------+-------+-------+-------+-------+-------+-------+
+
+
+Because of the way the TI89/TI92+ 's keyboard is wired, if you hold down three
+keys that form the corners of a rectangle, the TI89/TI92+ will think you are
+also holding down the key at the fourth corner.
+
+The [ON] key is special, and is not part of the matrix.
+
+-----------------------------------------------------------------------------
+INTERNAL ROUTINES
+-----------------------------------------------------------------------------
+
+This section contains some system routines that are used in the TI89/92+'s ROM
+to perform specific tasks.
+
+------------
+Reset_Link()
+------------
+Wait $4E20
+Mask Int 5
+Read [60000C].W
+[60000C].B = $E0
+Wait $0100
+Set bit 0 of [60000E].B
+Set bit 1 of [60000E].B
+Wait $0100
+Clear bit 0 of [60000E].B
+Clear bit 1 of [60000E].B
+Wait $0100
+Flush()
+
+-------
+Flush()
+-------
+[60000C].B = $8D
diff --git a/docs/vat/fld_list.c b/docs/vat/fld_list.c
new file mode 100644
index 0000000..ff77c82
--- /dev/null
+++ b/docs/vat/fld_list.c
@@ -0,0 +1,20 @@
+// C Source File
+// Created 25/02/2005; 10:25:37
+
+#include <tigcclib.h>
+
+// Main Function
+void _main(void)
+{
+	HSym sym;
+	HANDLE folder;
+	HANDLE top;
+	
+	// Use SymFindHome
+	sym = SymFindHome(SYMSTR("main"));
+	folder = sym.folder;
+	
+	// Use DerefSym
+	top = DerefSym(SymFindHome(SYMSTR("main")))->handle;
+	printf("%04x %04x\n", folder, top);
+}
diff --git a/docs/vat/fld_list.tpr b/docs/vat/fld_list.tpr
new file mode 100644
index 0000000..dff60a6
--- /dev/null
+++ b/docs/vat/fld_list.tpr
@@ -0,0 +1,55 @@
+[Settings]
+Archive=0
+Flash OS=0
+Fargo=0
+Use Data Variable=0
+Data Variable=
+Copy Data Variable=1
+Copy Data Variable if Archived=1
+Pack=0
+Packed Variable=
+Project Name=fldlist
+GCC Switches=-Os -Wall -W -Wwrite-strings -ffunction-sections -fdata-sections
+GNU Assembler Switches=
+Assembler Switches=-g -t
+Debug Info=0
+Standard Library=1
+Initialize BSS=1
+Optimize NOPs=1
+Optimize Returns=1
+Optimize Branches=1
+Optimize Moves=1
+Optimize Tests=1
+Optimize Calculations=1
+Remove Unused Sections=1
+Cut Unused Ranges=1
+Reorder Sections=1
+Merge Constants=1
+Binary Output=0
+Command Line=
+Post-Build Process=
+[Library Options]
+Use TI-89=1
+Use TI-92 Plus=1
+Use V200=1
+Optimize Calc Consts=0
+Use Kernel=0
+Use PreOS=0
+Minimum AMS Version Defined=1
+Minimum AMS Version=1.00
+Unofficial OS Support=0
+Reloc Format=AMS
+ROM Call Format=Direct
+BSS Ref Format=Kernel
+Data Ref Format=Kernel
+Use F-Line Jumps=0
+Use 4-Byte F-Line Jumps=0
+Optimize ROM Calls=0
+Use Internal F-Line Emulator=0
+Use Return Value=0
+Enable Error Return=0
+Save Screen=1
+[File Editing]
+Open File=C:\sources\roms\tiemu\docs\vat\fld_list.c.c
+[Included Files]
+C File 1=fld_list.c
diff --git a/docs/vat/vat_doors.htm b/docs/vat/vat_doors.htm
new file mode 100644
index 0000000..82286c7
--- /dev/null
+++ b/docs/vat/vat_doors.htm
@@ -0,0 +1,265 @@
+<html><head><title>Doors Homepage</title>
+   
+<link rev="made" href="mailto:xvassor at mail.dotcom.fr?&cc=deucalion at mail.dotcom.fr"></head>
+<body bgproperties="FIXED" bgcolor="#008080">
+
+<h1>
+<font color="#ffffff">T</font><font color="#c0c0c0">i</font><font color="#818181">p</font><font color="#424242">s</font></h1>
+Here we will write all tips we know about Fargo programming.
+
+<p>We've just wrote a part of the description of the <a href="#VAT">VAT</a>
+! Go and see it !<br>
+<b>WARNING:</b> This is for TI92/92 II <b>only</b> . The VAT on TI89/92+ is slightly different. Mail me if you want infos about it.
+</p><p>When we have time, we will talk about:
+</p><menu>
+<li>
+<b>How to optimize in size a program</b></li>
+
+<li>
+<b>Many other things..</b></li>
+</menu>
+If you have a tip and you want it to be on that page, <a href="mailto:xvassor at mail.dotcom.fr?&cc=deucalion at mail.dotcom.fr">mail
+us!</a>
+<br>
+<hr width="100%">
+
+<p> <a name="VAT"></a>The VAT(variable alocation table) is a table
+which lists the variables and folders of your calc.
+<br>We will describe it in four parts:
+
+</p><p><a href="#1%29">1) The folder table</a>
+<br><a href="#2%29">2) The variables tables</a>
+<br><a href="#3%29">3) Some variables caracteristics</a>
+<br><a href="#Formats">4) Some variable formats</a>
+
+</p><p><a name="1)"></a><b><font size="+2"><font color="#ffffff">1</font><font color="#f2f2f2">)</font>
+<font color="#d8d8d8">T</font><font color="#cbcbcb">h</font><font color="#bebebe">e</font>
+<font color="#a4a4a4">f</font><font color="#979797">o</font><font color="#8a8a8a">l</font><font color="#7d7d7d">d</font><font color="#707070">e</font><font color="#636363">r</font>
+<font color="#494949">t</font><font color="#3c3c3c">a</font><font color="#2f2f2f">b</font><font color="#222222">l</font><font color="#151515">e</font></font></b>
+
+</p><p>For all actual Roms, the folder table is associated with handle #$0B.
+<br>So when you do  <font color="#000099">moveq.w #$B,d0</font>
+<br>                         
+<font color="#000099">tios::DEREF d0,a0</font>
+
+</p><p>You get in a0 the adress of the folder table:
+<br>It has the following format:
+
+</p><p><font color="#000099">0(a0).w = maximum number of folders before handle
+#$B needs to be resized</font>
+<br><font color="#000099">2(a0).w = actual number of folders</font>
+<br>We always have: 2(a0).w <= 0(a0).w
+
+</p><p>After this small header, there is the list, composed of the names of
+the folders, their state, and their associated variables list.
+<br>With     <font color="#000099">addq.l #4,a0</font>
+<br>You get in a0 the adress of the beginning of the list.
+<br>Here is the format:
+
+</p><p><font color="#000099">0(a0) to 7(a0): 8 char name of the folder</font>
+<br><font color="#000099">8(a0).b : a end of string null character</font>
+<br><font color="#000099">9(a0).b : the state byte</font>
+<br><font color="#000099">10(a0).w : the handle of the associated variables
+list</font>
+
+</p><p>Here is an example in hexa:
+
+</p><p><font color="#cc0000">00 0A 00 03</font><font color="#000099"> 64 6F
+63 73  ....docs</font>   -> you see: maxfold = $A = 10,
+nbfold = 3
+<br><font color="#000099">00 00 00 00 00 80 </font><font color="#cc0000">00
+2E</font><font color="#000099">   ........</font>     
+-> handle to the 'docs' folder = $002E
+<br><font color="#000099">67 61 6D 65 73 00 00 00  games...</font>
+<br><font color="#000099">00 80 00 2F 6D 61 69 6E  ....main</font>
+<br><font color="#000099">00 00 00 00 00 80 00 0C   ........</font>
+
+</p><p>The state byte has the following format:
+
+</p><p><font color="#000099"><76543210>:  7 is always set for a folder</font>
+<br><font color="#000099">                    
+5 is set when the folder is checked in the Var-Link or in Doors</font>
+<br><font color="#000099">                    
+3 is set when the folder is locked</font>
+
+</p><p>For example, you can have
+<br><font color="#000099">6D 61 69 6E 00 00 00 00    
+00         80        
+00 0C</font>
+<br>       <font color="#cc0000"><font size="-1">name=
+"main"              
+null char  state byte     handle</font></font>
+
+</p><p>Then the name of the folder is <font color="#cc0000">main</font><font color="#000000">,</font>
+it is <font color="#cc0000">NOT locked and NOT checked</font>, and <font color="#cc0000">its
+handle is #$C </font>(in fact it is always #$C for the 'main' folder)
+
+</p><p><a name="2)"></a><b><font size="+2"><font color="#ffffff">2</font><font color="#f4f4f4">)</font>
+<font color="#dedede">T</font><font color="#d3d3d3">h</font><font color="#c8c8c8">e</font>
+<font color="#b2b2b2">v</font><font color="#a7a7a7">a</font><font color="#9c9c9c">r</font><font color="#919191">i</font><font color="#868686">a</font><font color="#7b7b7b">b</font><font color="#707070">l</font><font color="#656565">e</font><font color="#5a5a5a">s</font>
+<font color="#444444">t</font><font color="#393939">a</font><font color="#2e2e2e">b</font><font color="#232323">l</font><font color="#181818">e</font><font color="#0d0d0d">s</font></font></b>
+
+</p><p>They have nearly the same format than the folder one: they have the
+same header, and the same list format
+<br>The only thing that changes is the state byte format:
+<br>               
+<font color="#000099">7 is never set for a variable</font>
+
+</p><p>So, you can have, for example
+<br><font color="#000099">66 69 6C 65 6C 69 62 00    
+00         00        
+00 16</font>
+<br><font color="#cc0000"><font size="-1">       
+name="filelib"               
+null char  state byte      handle</font></font>
+
+</p><p>Then the name of the variable is <font color="#cc0000">filelib</font><font color="#000000">,</font>
+it is <font color="#cc0000">NOT locked and NOT checked</font>, and <font color="#cc0000">its
+handle is #$16</font>
+
+</p><p><a name="3)"></a><b><font size="+2"><font color="#ffffff">3</font><font color="#f8f8f8">)</font>
+<font color="#eaeaea">S</font><font color="#e3e3e3">o</font><font color="#dcdcdc">m</font><font color="#d5d5d5">e</font>
+<font color="#c7c7c7">v</font><font color="#c0c0c0">a</font><font color="#b9b9b9">r</font><font color="#b2b2b2">i</font><font color="#ababab">a</font><font color="#a4a4a4">b</font><font color="#9d9d9d">l</font><font color="#969696">e</font><font color="#8f8f8f">s</font>
+<font color="#818181">c</font><font color="#7a7a7a">a</font><font color="#737373">r</font><font color="#6c6c6c">a</font><font color="#656565">c</font><font color="#5e5e5e">t</font><font color="#575757">e</font><font color="#505050">r</font><font color="#494949">i</font><font color="#424242">s</font><font color="#3b3b3b">t</font><font color="#343434">i</font><font color="#2d2d2d">c</font><font color="#262626">s</font></font></b>
+
+</p><p>When you have the handle of a variable in d0,you can do:
+
+</p><p>           <font color="#000099">
+tios::DEREF d0,a0</font>
+
+</p><p>You get the adress of the content of the variable in a0
+
+</p><p>After that ALL variables have the following format:
+
+</p><p>        <font color="#000099">0(a0).w
+= size of the variable       </font><b><font color="#000000">WARNING!</font></b>
+This is not the real size of the var: you must add #2 to get the real size
+
+</p><p>Then you can do:
+<br>        move.w (a0),d1 and you have
+
+</p><p>     <font color="#000099">   1(a0,d1.w)
+= the type byte of the variable</font>
+
+</p><p>This type byte can be one of the followings:
+<br>$DC -> <a href="#PRGM">PRGM or FUNC</a>
+<br>$D9 -> <a href="#MAT">MAT or LIST</a>
+<br>$E0 -> TEXT
+<br>$2D -> STR
+<br>$DD -> DATA
+<br>$E1 -> FIG
+<br>$DF -> PIC
+<br>$DE -> GDB
+<br>$E2 -> MACR
+<br>All other values are EXPR variables
+<br>
+</p><hr width="100%">
+<br><a name="PRGM"></a>
+<br>To distinguish the PRGM and FUNC type you have to do:
+
+<p>        <font color="#000099">cmp.b
+#$19,-5(a0,d1.w)</font>
+
+</p><p>If -5(a0,d1.w) is not #$19 then the variable has the FUNC type,else
+it has the PRGM type.
+
+</p><p>Now you will maybe know how to distinguish Fargo vars and normal PRGM
+vars.
+<br>Let's do the following:
+
+</p><p><font color="#000099">        cmp.l        
+#$4150504C,8(a0)    </font><font color="#000000">;comp with
+"APPL"</font>
+<br><font color="#000099">        beq
+</font><font color="#cc0000">\Fargo II prog</font>
+<br><font color="#000099">        cmp.l        
+#$00503130,2(a0)     </font><font color="#000000">;comp
+with "P10"</font>
+<br><font color="#000099">        beq
+</font><font color="#cc0000">\Fargo I prog</font>
+<br><font color="#000099">        cmp.l        
+#$444C4C20,8(a0)    </font><font color="#000000">;comp with
+"DLL "</font>
+<br><font color="#000099">        beq
+</font><font color="#cc0000">\Fargo II library</font>
+<br><font color="#000099">        cmp.l        
+#$004C3130,2(a0)   </font><font color="#000000">  ;comp
+with "L10"</font>
+<br><font color="#000099">        beq
+</font><font color="#cc0000">\Fargo I library</font>
+
+</p><p>And that's all for the PRGM type !
+<br>
+</p><hr width="100%">
+<br><a name="MAT"></a>To distinguish the MAT and LIST type you have to
+do:
+
+<p>        <font color="#000099">cmp.b 
+#$D9,0(a0,d1.w)</font>
+
+</p><p><font color="#000000">If 0(a0,d1.w) is #$D9, then the variable has the
+MAT type else it has the LIST type</font>
+
+</p><p><a name="Formats"></a><font size="+2">4) Some variables formats</font>
+
+</p><p>We only know the following variables formats:
+<br>    <a href="#TEXT">TEXT variables</a>
+<br>    <a href="#PIC">PIC variables</a>
+<br>    <a href="#STR">STRING variables</a>
+
+</p><p><a name="TEXT"></a><font size="+1">TEXT variables</font>
+
+</p><p>Suppose you have a TEXT variable handle in d0.
+<br>    With        <font color="#000099">tios::DEREF   
+d0,a0</font><font color="#000000">       
+you get in a0 the variable adress</font>
+
+</p><p><font color="#000000">From then you have the following format:</font>
+
+</p><p><font color="#000000">    </font><font color="#000099">(a0).w 
+= size of the variable - 2</font>
+<br><font color="#000099">    2(a0).w  = position of
+the cursor in the TIOS editor or in XeTal</font>
+<br><font color="#000099">    from 4(a0).w to the end =
+your text.</font>
+<br><font color="#000099">    Text has the following format:</font>
+<br><font color="#000099">    #13 = nextline</font>
+<br><font color="#000099">    #20 = beginning of a line.
+It is always after a #13 char or a the very beginning of the text</font>
+<br><font color="#000099">    #0 = end of the text</font>
+<br><font color="#000099">    At the end of a TEXT variable,
+you have a #$E0 char, it tells you that it is a TEXT variable</font>
+<br>
+</p><hr width="100%">
+<br><a name="PIC"></a><font size="+1">PIC variables</font>
+
+<p>If a0 is the variable adress, then you have:
+
+</p><p>    <font color="#000099">(a0).w = size of the variable
+- 2</font>
+<br><font color="#000099">    2(a0).w = height of the picture</font>
+<br><font color="#000099">    4(a0).w = width of the picture</font>
+<br><font color="#000099">    from 4(a0).w to the end =
+your picture</font>
+<br><font color="#000099">    If a bit is set, then the
+pixel is on, else, it is off</font>
+<br><font color="#000099">    At the end of a PIC variable,
+you have a #$DF char, it tells you that it is a PIC variable</font>
+<br>
+</p><hr width="100%">
+<br><a name="STR"></a><font size="+1">STRING variables</font>
+
+<p>If a0 is the variable adress, then you have:
+
+</p><p>    <font color="#000099">(a0).w = size of the variable
+- 2</font>
+<br><font color="#000099">    2(a0).b = a null char (#0)</font>
+<br><font color="#000099">    from 3(a0).b to the end =
+your string, it ends with a null char (#0)</font>
+<br><font color="#000099">At the end of a STRING variable, you have a #$2D
+char, it tells you that it is a STRING variable</font>
+
+</p><p>If you want to add something about these formats, or you know the formats
+of other variables types, you can <a href="mailto:doors at altern.org?&cc=deucalio at club-internet.fr">mail
+us</a>
+</p></body></html>
\ No newline at end of file
diff --git a/docs/vat/vatinfo.txt b/docs/vat/vatinfo.txt
new file mode 100644
index 0000000..8c5cafd
--- /dev/null
+++ b/docs/vat/vatinfo.txt
@@ -0,0 +1,200 @@
+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////
+--------------------------------------------------------------------
+     			VAT Description
+    			     v1.2
+
+
+     			BENOIT SCHERRER
+---------------------------------------------------------------------
+////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
+
+
+(in first, I want to tell you that my english is very very bad. )
+(Indeed, I am a young french and speaking english is quite      )
+(difficult for me.                                              )
+
+
+After I wrote the first version of my VAT Description, someone
+send me an other file about the VAT. I didn't know that there
+was already such a file ! Moreover it was bigger, with more
+informations.
+But there was no precise example like in my VAT Description. That
+is why I release an another version, where I add some useful 
+information I saw in the other file.
+
+
+    -----
+
+This text file has 3 parts :
+	  I) FOLDER TABLE DESCRIPTION
+	 II) FILE TABLE DESCRIPTION
+	III) SOME VARIABLES INFORMATION
+
+Well. On the TI92, there are files & folders. But the file table
+and the folder table have pratically the same format.
+
+
+-------------------------------------------------------------------
+ I )  FOLDER TABLE DESCRIpTION : 
+
+
+You must first get the address of the folder table. It is the
+handle $0B. You can get it with :
+ moveq.w #$0B,d0  ;Handle $0B
+ handle_ptr d0,a0 ;
+or better :
+ move.l HANDLE_TABLE_PTR,a0	;address of handle table in a0
+ move.l 44(a0),a0  		;4*$0B
+
+So you have now the starting address of the folder table in a0.
+Here is a example of what it could be :
+
+D496 00 0A 00 03 67 61 6D 65  ....game
+D49E 73 00 00 00 00 88 00 24  s.......
+D4A6 6D 61 69 6E 00 00 00 00  main....
+D4AE 00 80 00 0C 75 74 69 6C  ....util
+D4B6 00 00 00 00 00 80 00 22  ........
+
+The first word is the maximum number of folder that the handle can
+have before the TI have to resize it. Indeed, the TI don't resize
+the folder table each time we create a new folder. When the TI
+resize the handle, it always increase this first word by $0A.
+
+The next word is the current number of folders.
+
+After, there is always 12 bytes for the folder description :
+ - 8 bytes + '0' for the folder name (so 9 bytes for the folder name)
+ - 1 byte for the folder state : if the folder is locked in the
+ Var-Link, this byte will be $88, or else it will be $80
+ - 1 word for the handle of the file list associated with this
+ folder.
+
+So with the previous example :
+
+00 0A : You can have $0A folders before resizing the table.
+00 03 : Current Number of folders
+
+'games' 00 00 00 00 : Folder name + '0' (9 bytes)
+$88 : the folder is locked in Var-Link
+00 24 : Handle of the file list associated to 'games'
+
+'main' 00 00 00 00 00 : Folder name + '0'
+$80 : Folder not locked.
+00 0C : Handle of file list in 'main' (it will be always 00 0C
+  for main)
+
+'util' 00 00 00 00 00 : Folder name + '0'
+$80 : Not locked
+00 22 : Handle of the file list in 'util'
+
+Well, it is not very difficult, because TI92 has only one level
+of folders.
+
+
+
+--------------------------------------------------------------------
+ II )  FILES TABLE DESCRIPTION
+
+The file table is pratically the same as the folder table : they
+have the same format.
+
+You must first have the starting address of a file table.
+For that, use the handle described in the folder description, the
+last word of each folder description.
+
+After, if this handle is in d0, you can do :
+ handle_ptr d0,a0
+And you have in a0 the address of the file list !
+
+As I have already tell you, it is pratically the same format as the
+folder table.
+Here is an example from my TI :
+
+D514 00 0A 00 08 64 62 39 32  ....db92
+D51C 00 00 00 00 00 00 00 1B  ........
+D524 66 6C 69 62 00 00 00 00  flib....
+D52C 00 08 00 15 67 72 61 79  ....gray
+D534 6C 69 62 00 00 00 00 16  lib.....
+  ...
+
+The first word is the same as in the folder description : It is the
+maximum of files entry that contain the file table before being 
+resized. And it is always increaseby $0A when the handle is resized.
+The second (00 08 here) is the number of files.
+After, there is always 12 bytes for the file description (like the
+folder description) :
+ - 8 bytes + '0' for the file name (so 9 bytes)
+ - 1 byte for the file state : if the folder is locked in the
+ Var-Link, this byte will be $08, or else it will be $00
+ - 1 word for the handle of the file
+
+So with the previous example :
+00 0A : You can have $0A files in the folder before resizing the table.
+00 08 : 8 files in this folder
+
+db92 00 00 00 00 00 : the file name
+00 : not locked
+00 1B : handle of the file
+
+flib 00 00 00 00 00 : the filename
+08 : the file is locked
+00 15 : the file handle
+
+graylib 00 00 : the filename
+00 : not locked
+00 14 : the file handle
+
+
+--------------------------------------------------------------------
+ III )  Some Variables information
+
+
+Here are some information about the files :    
+Now you have the file address in a0 for example.
+
+The first word of a variable is the size of datas. The real size 
+of the file (that you can see in Var Link) is the first word + 2.
+So if you want to put the size of the file in d0, you can write :
+ move.w (a0),d0
+ addq.w #2,d0
+
+You may also want to know what type of file it is. For that, you
+have just to go at the end of the file.
+If d0 is the file handle :
+ handle_ptr d0,a0		;address of the file
+ move.w (a0),d0			;size of the file in d0
+ move.b 1(a0,d0.w),d1		;
+
+d1.b has now the file type. Here are all the possibilities I found :
+
+$DC : Program or Function
+$D9 : Matrix or List
+$E0 : TEXT
+$2D : STR
+$DD : DATA
+$E1 : FIG
+$DF : PIC
+$DE : GDB
+$E2 : MACR
+
+$1F : EXPR
+$8F : EXPR (REAL)
+$8B : EXPR (RECTANGULAR)
+$23 : EXPR
+And other types should be EXPR
+
+
+//////////////////////////////////////////////////////////////////////
+************************ SPECIAL THANKS TO ***************************
+//////////////////////////////////////////////////////////////////////
+- The Fargo TEAM !!!
+- Tleilax, for his EXCELLENT DB92 debugger.
+- Gareth, for his text file about ti files
+
+///////////////////////////////////////////////////////////////////////
+************************** CONTACT ME ********************************
+///////////////////////////////////////////////////////////////////////
+If you want to contact me, DON'T HESITATE ! I will try to answer to
+ALL your mails.
+My e-mail address is : p.c.scherrer at wanadoo.fr
+
diff --git a/docs/vkeys/VK.htm b/docs/vkeys/VK.htm
new file mode 100644
index 0000000..981d63d
--- /dev/null
+++ b/docs/vkeys/VK.htm
@@ -0,0 +1,1044 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html dir="ltr"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"><title>Virtual-Key Codes</title>
+
+<script src="VK_fichiers/linkcss.html"></script>
+<script src="VK_fichiers/langref.html"></script>
+<meta name="MS-HKWD" content="keyboard [Win32]">
+<meta name="MS-HKWD" content="keyboard [Win32],virtual-key codes">
+<meta name="MS-HKWD" content="virtual-key codes [Win32]"></head>
+
+<body topmargin="0">
+<h1><font face="Arial, Helvetica, sans-serif">Virtual-Key Codes</font></h1>
+<p><font size="2" face="Arial, Helvetica, sans-serif">The following table shows 
+  the symbolic constant names, decimal values, and mouse or keyboard equivalents 
+  for the virtual-key codes used by the system. The codes are listed in numeric 
+  order. </font></p>
+<table width="600" border="1" cellpadding="1" cellspacing="0">
+  <tbody><tr valign="top" bgcolor="#eeeeee"> 
+    <th width="100" align="left"><font size="2" face="Arial, Helvetica, sans-serif">Symbolic 
+      constant name</font></th>
+    <th width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">Value<br>
+      (decimal)</font></th>
+    <th align="left"><font size="2" face="Arial, Helvetica, sans-serif">Mouse or 
+      keyboard equivalent</font></th>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LBUTTON</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">1</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Left mouse button </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_RBUTTON</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">2</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Right mouse button 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_CANCEL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">3</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Control-break processing 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MBUTTON</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">4</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Middle mouse button 
+      (three-button mouse) </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_XBUTTON1</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">5</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      X1 mouse button</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_XBUTTON2</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">6</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      X2 mouse button</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">7</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Undefined </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BACK</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">8</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">BACKSPACE key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_TAB</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">9</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">TAB key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">10�11</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Reserved </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_CLEAR</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">12</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">CLEAR key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_RETURN</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">13</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">ENTER key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">14�15</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Undefined </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SHIFT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">16</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">SHIFT key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_CONTROL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">17</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">CTRL key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MENU</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">18</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">ALT key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_PAUSE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">19</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">PAUSE key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_CAPITAL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">20</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">CAPS LOCK key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_KANA</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">21</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME Kana mode</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_HANGUEL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">21</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME Hanguel mode (maintained 
+      for compatibility; use <b>VK_HANGUL</b>)</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_HANGUL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">21</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME Hangul mode</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">22</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Undefined </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_JUNJA</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">23</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME Junja mode</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_FINAL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">24</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME final mode</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_HANJA</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">25</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME Hanja mode</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_KANJI</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">25</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME Kanji mode</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">26</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Undefined </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_ESCAPE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">27</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">ESC key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_CONVERT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">28</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME convert</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NONCONVERT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">29</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME nonconvert</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_ACCEPT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">30</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME accept</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MODECHANGE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">31</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">IME mode change request</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SPACE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">32</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">SPACEBAR </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_PRIOR</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">33</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">PAGE UP key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NEXT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">34</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">PAGE DOWN key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_END</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">35</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">END key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_HOME</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">36</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">HOME key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LEFT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">37</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">LEFT ARROW key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_UP</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">38</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">UP ARROW key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_RIGHT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">39</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">RIGHT ARROW key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_DOWN</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">40</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">DOWN ARROW key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SELECT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">41</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">SELECT key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_PRINT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">42</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">PRINT key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_EXECUTE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">43</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">EXECUTE key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SNAPSHOT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">44</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">PRINT SCREEN key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_INSERT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">45</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">INS key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_DELETE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">46</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">DEL key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_HELP</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">47</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">HELP key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">48</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">0 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">49</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">1 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">50</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">2 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">51</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">3 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">52</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">4 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">53</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">5 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">54</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">6 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">55</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">7 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">56</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">8 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">57</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">9 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">58�64</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Undefined </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">65</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">A key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">66</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">B key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">67</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">C key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">68</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">D key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">69</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">E key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">70</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">71</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">G key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">72</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">H key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">73</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">I key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">74</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">J key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">75</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">K key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">76</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">L key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">77</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">M key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">78</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">N key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">79</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">O key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">80</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">P key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">81</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Q key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">82</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">R key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">83</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">S key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">84</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">T key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">85</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">U key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">86</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">V key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">87</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">W key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">88</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">X key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">89</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Y key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">90</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Z key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LWIN</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">91</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Left Windows key (Microsoft� 
+      Natural� keyboard) </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_RWIN</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">92</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Right Windows key (Natural 
+      keyboard) </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_APPS</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">93</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Applications key (Natural 
+      keyboard) </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">94</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Reserved </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SLEEP</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">95</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Computer Sleep key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD0</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">96</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 0 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD1</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">97</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 1 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD2</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">98</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 2 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD3</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">99</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 3 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD4</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">100</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 4 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD5</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">101</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 5 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD6</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">102</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 6 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD7</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">103</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 7 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD8</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">104</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 8 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMPAD9</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">105</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Numeric keypad 9 key 
+      </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MULTIPLY</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">106</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Multiply key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_ADD</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">107</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Add key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SEPARATOR</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">108</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Separator key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SUBTRACT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">109</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Subtract key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_DECIMAL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">110</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Decimal key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_DIVIDE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">111</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Divide key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F1</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">112</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F1 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F2</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">113</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F2 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F3</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">114</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F3 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F4</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">115</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F4 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F5</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">116</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F5 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F6</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">117</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F6 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F7</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">118</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F7 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F8</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">119</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F8 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F9</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">120</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F9 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F10</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">121</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F10 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F11</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">122</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F11 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F12</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">123</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F12 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F13</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">124</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F13 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F14</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">125</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F14 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F15</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">126</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F15 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F16</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">127</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F16 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F17</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">128H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F17 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F18</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">129H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F18 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F19</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">130H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F19 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F20</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">131H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F20 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F21</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">132H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F21 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F22</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">133H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F22 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F23</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">134H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F23 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_F24</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">135H</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">F24 key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">136�143</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Unassigned </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NUMLOCK</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">144</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">NUM LOCK key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_SCROLL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">145</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">SCROLL LOCK key </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">146�150</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">OEM specific</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">151�159</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Unassigned </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LSHIFT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">160</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Left SHIFT key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_RSHIFT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">161</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Right SHIFT key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LCONTROL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">162</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Left CONTROL key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_RCONTROL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">163</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Right CONTROL key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LMENU</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">164</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Left MENU key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_RMENU</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">165</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Right MENU key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BROWSER_BACK</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">166</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Browser Back key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BROWSER_FORWARD</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">167</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Browser Forward key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BROWSER_REFRESH</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">168</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Browser Refresh key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BROWSER_STOP</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">169</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Browser Stop key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BROWSER_SEARCH</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">170</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Browser Search key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BROWSER_FAVORITES</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">171</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Browser Favorites key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_BROWSER_HOME</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">172</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Browser Start and Home key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_VOLUME_MUTE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">173</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Volume Mute key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_VOLUME_DOWN</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">174</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Volume Down key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_VOLUME_UP</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">175</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Volume Up key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MEDIA_NEXT_TRACK</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">176</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Next Track key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MEDIA_PREV_TRACK</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">177</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Previous Track key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MEDIA_STOP</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">178</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Stop Media key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_MEDIA_PLAY_PAUSE</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">179</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Play/Pause Media key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LAUNCH_MAIL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">180</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Start Mail key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LAUNCH_MEDIA_SELECT</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">181</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Select Media key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LAUNCH_APP1</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">182</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Start Application 1 key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_LAUNCH_APP2</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">183</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Start Application 2 key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">184-185</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Reserved</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_1</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">186</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For the US standard keyboard, the ';:' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_PLUS</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">187</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For any country/region, the '+' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_COMMA</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">188</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For any country/region, the ',' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_MINUS</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">189</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For any country/region, the '-' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_PERIOD</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">190</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For any country/region, the '.' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_2</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">191</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For the US standard keyboard, the '/?' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_3</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">192</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For the US standard keyboard, the '`~' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">193�215</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Reserved </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">216�218</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Unassigned</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_4</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">219</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For the US standard keyboard, the '[{' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_5</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">220</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For the US standard keyboard, the '\|' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_6</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">221</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For the US standard keyboard, the ']}' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_7</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">222</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      For the US standard keyboard, the 'single-quote/double-quote' key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_8</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">223</font></td>
+    <td> </td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">224</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Reserved</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">225</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">OEM specific</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_102</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">226</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Either the angle bracket key or the backslash key on the RT 102-key keyboard</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">227�228</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">OEM specific</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_PROCESSKEY</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">229</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 95/98, Windows NT 
+      4.0, Windows 2000:</b> IME PROCESS key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">230</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">OEM specific</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_PACKET</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">231</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif"><b>Windows 2000:</b> 
+      Used to pass Unicode characters as if they were keystrokes. The VK_PACKET 
+      key is the low word of a 32-bit Virtual Key value used for non-keyboard 
+      input methods. For more information, see Remark in <b>KEYBDINPUT</b>, <b>SendInput</b>, 
+      <b>WM_KEYDOWN</b>, and <b>WM_KEYUP</b></font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif"> � </font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">232</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Unassigned </font></td>
+  </tr>
+  <tr valign="top">
+    <td width="100">  </td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">233�245</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">OEM specific</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_ATTN</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">246</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Attn key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_CRSEL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">247</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">CrSel key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_EXSEL</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">248</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">ExSel key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_EREOF</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">249</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Erase EOF key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_PLAY</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">250</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Play key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_ZOOM</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">251</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Zoom key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_NONAME</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">252</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Reserved for future 
+      use </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_PA1</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">253</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">PA1 key</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td width="100"><font size="2" face="Arial, Helvetica, sans-serif">VK_OEM_CLEAR</font></td>
+    <td width="50" align="center"><font size="2" face="Arial, Helvetica, sans-serif">254</font></td>
+    <td><font size="2" face="Arial, Helvetica, sans-serif">Clear key</font></td>
+  </tr>
+</tbody></table>
+<font face="Arial, Helvetica, sans-serif"><br>
+</font> 
+</body></html>
\ No newline at end of file
diff --git a/docs/vkeys/virtualkeycodes.html b/docs/vkeys/virtualkeycodes.html
new file mode 100644
index 0000000..72b18da
--- /dev/null
+++ b/docs/vkeys/virtualkeycodes.html
@@ -0,0 +1,456 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html lang="en-us"><head><title>Windows API Guide: Virtual-Key Codes</title>
+
+<meta content="rogue953 at hotmail.com" name="author">
+<meta content="Information about the virtual-key codes in the Windows API, geared towards the Visual Basic user." name="description">
+<meta content="Kuliniewicz,Windows,Windows 95,Windows NT,Windows 98,Windows CE,Windows 2000,API,Application Programming Interface,Programming,Visual Basic,Basic,VB,virtual-key codes" name="keywords">
+<meta content="Omicron HTML Editor" name="generator">
+<meta content="Mon, 06 Sep 1999 17:18:00 GMT" http-equiv="Last-Modified">
+<link href="virtualkeycodes_fichiers/default.html" rel="stylesheet" type="text/css">
+<link href="http://math.msu.su/%7Evfnik/WinApi/index.html" rel="index">
+<link href="http://math.msu.su/%7Evfnik/WinApi/help/index.html" rel="help">
+<link href="http://math.msu.su/%7Evfnik/WinApi/help/glossary.html" rel="glossary">
+<link href="http://math.msu.su/%7Evfnik/WinApi/copyrite.html" rel="copyright"></head>
+
+<body><script language="Javascript">
+<!-- hide
+
+var areaname = 'skyscraper';
+var catshort = 'tech';
+var catagory = 'tech';
+
+var my_date = new Date();
+var my_ord  = my_date.getTime();
+
+
+document.write('<font size=-3><img src="http://www.fortunecity.com/banners/track1.gif?' + my_ord + '" height=1 width=1% border="0" name="FCimg11bnr" hspace=0 vspace=0>');
+document.write('<img src="http://www.fortunecity.com/banners/track2.gif?' + my_ord + '" height=1% width=1 border="0" name="FCimg12bnr" hspace=0 vspace=0><br clear=all></font>');
+if((self.parent==self||((self.length==0)&&(document.images.FCimg11bnr.width>4)&&document.images.FCimg12bnr.height>2)))
+{
+
+ if (parent.TlxPgNm != null || (top.frames[1] != null && top.frames[1].TlxPgNm != null)) 
+ {
+	document.write('<font size=-3><img src="http://www.fortunecity.com/banners/trackt.gif?' + my_ord + '" height=1 width=1% border="0" name="FCimg11bnr" hspace=0 vspace=0>');
+ }
+
+var my_chunk = '<center><table cellspacing="0" cellpadding="0" border="0" width="0" bgcolor="#666666"><tr><td colspan="2"><img src="http://www.fortunecity.com/banners/t.gif?' + my_ord + '" width="566" height="3"></td></tr><tr><td><table cellspacing="0" cellpadding="0" border="0"><tr><td rowspan="2"><img border="0" src="http://www.fortunecity.com/banners/l.gif" width="3" height="77"></td><td><iframe name=fcAdIFrame1 src="http://www.fortunecity.com/ad/adWrapFrame.html?"' + areaname + '+' + [...]
+
+
+document.write(my_chunk);
+ }
+
+
+
+// -->
+</script><font size="-3"><img src="virtualkeycodes_fichiers/track1.gif" height="1" width="1%" border="0" name="FCimg11bnr" hspace="0" vspace="0"><img src="virtualkeycodes_fichiers/track2.gif" height="1%" width="1" border="0" name="FCimg12bnr" hspace="0" vspace="0"><br clear="all"></font><center><table cellspacing="0" cellpadding="0" border="0" width="0" bgcolor="#666666"><tbody><tr><td colspan="2"><img src="virtualkeycodes_fichiers/t.gif" width="566" height="3"></td></tr><tr><td><table c [...]
+
+
+<noscript><center><table cellspacing="0" cellpadding="0" border="0"
+width="0" bgcolor="#666666"><tr><td colspan="2"><img
+src="http://www.fortunecity.com/banners/t.gif" width="566"
+height="3"></td></tr><tr><td><table cellspacing="0" cellpadding="0"
+border="0"><tr><td rowspan="2"><img border="0"
+src="http://www.fortunecity.com/banners/l.gif" width="3"
+height="77"></td><td><iframe
+src="http://ad.doubleclick.net/adi/fc.us468/member/tech;s1=m;s3=tech;pos=1;tag=i;sz=468x60;mtile=1;ord=2001?"
+width="468" height="60" frameborder="no" border="0" marginwidth="0"
+marginheight="0" scrolling="no"><a target="_top"
+href="http://ad.doubleclick.net/jump/fc.us468/member/tech;abr=!ie;s1=m;s3=tech;pos=1;tag=i;sz=468x60;mtile=1;ord=2001?"><img
+src="http://ad.doubleclick.net/ad/fc.us468/member/tech;abr=!ie;s1=m;s3=tech;pos=1;tag=i;sz=468x60;mtile=1;ord=2001?"
+border=0 height="60" width="468"></a></iframe></td><td rowspan="2"
+valign="top"><img border="0"
+src="http://www.fortunecity.com/banners/m.gif" width="3"
+height="77"></td></tr><tr><td valign="top"><img border="0"
+src="http://www.fortunecity.com/banners/main.gif" width="468"
+height="17" usemap="#map"></td></tr></table></td><td><table
+cellspacing="0" cellpadding="0"
+border="0"><tr><td><!--Button1--><IFRAME
+SRC="http://ad.doubleclick.net/adi/fc.us88/member/tech;s1=m;s3=tech;pos=2;tag=i;sz=88x31;mtile=2;
+ord=3100?" width=88 height=31 frameborder=no border=0 MARGINWIDTH=0
+MARGINHEIGHT=0 SCROLLING=no><A
+HREF="http://ad.doubleclick.net/jump/fc.us88/member/tech;abr=!ie;s1=m;s3=tech;pos=2;tag=i;sz=88x31;mtile=2;
+ord=3100?"><IMG
+SRC="http://ad.doubleclick.net/ad/fc.us88/member/tech;abr=!ie;s1=m;s3=tech;pos=2;tag=i;sz=88x31;mtile=2;
+ord=3100?" height=31 width=88 border=0></a></iframe></td><td
+rowspan="4" valign="top"><img border="0" height="77"
+src="http://www.fortunecity.com/banners/r.gif" width="4"
+height="77"></td></tr><tr><td><img border="0"
+src="http://www.fortunecity.com/banners/between.gif" width="88"
+height="4"></td></tr><tr><td><!--Button2--><IFRAME
+SRC="http://ad.doubleclick.net/adi/fc.us88/member/tech;s1=m;s3=tech;pos=3;tag=i;sz=88x31;mtile=3;
+ord=3101?" width=88 height=31 frameborder=no border=0 MARGINWIDTH=0
+MARGINHEIGHT=0 SCROLLING=no><A
+HREF="http://ad.doubleclick.net/jump/fc.us88/member/tech;abr=!ie;s1=m;s3=tech;pos=3;tag=i;sz=88x31;mtile=3;
+ord=3101?"><IMG
+SRC="http://ad.doubleclick.net/ad/fc.us88/member/tech;abr=!ie;s1=m;s3=tech;pos=3;tag=i;sz=88x31;mtile=3;
+ord=3101?" height=31 width=88
+border=0></a></iframe></td></tr><tr><td><img border="0"
+src="http://www.fortunecity.com/banners/below.gif" width="88"
+height="11"></td></tr></table></td></tr></table></center><map
+name="map"><area shape="rect" coords="409,0,467,16"
+href="http://www.fortunecity.com/goto/" target="_top"><area
+shape="rect" coords="366,0,409,16"
+href="http://www.fortunecity.com/shop/" target="_top"><area
+shape="rect" coords="282,0,366,16"
+href="http://www.fortunecity.com/shop/" target="_top"><area
+shape="rect" coords="182,0,281,16"
+href="http://www.fortunecity.com/join/index.html?referer=navbar"
+target="_top"><area shape="rect" coords="97,0,182,16"
+href="http://www.fortunecity.com/explore/area/skyscraper.html"
+target="_top"><area shape="rect" coords="-1,0,96,16"
+href="http://www.fortunecity.com" target="_top"></map><IFRAME
+SRC="http://ad.doubleclick.net/adi/fc.unicast/members/unicast/tech;s1=m;s2=unic;s3=tech;pos=6;tag=i;sz=1x1;mtile=6;
+ord=2001?" width=1 height=1 frameborder=no border=0 MARGINWIDTH=0
+MARGINHEIGHT=0 SCROLLING=no><A
+HREF="http://ad.doubleclick.net/jump/fc.unicast/members/unicast/tech;abr=!ie;s1=m;s2=unic;s3=tech;pos=6;tag=i;sz=1x1;mtile=6;
+ord=2001?"><IMG
+SRC="http://ad.doubleclick.net/ad/fc.unicast/members/unicast/tech;abr=!ie;s1=m;s2=unic;s3=tech;pos=6;tag=i;sz=1x1;mtile=6;
+ord=2001?" height=1 width=1 border=0></a></iframe>
+</noscript>
+
+
+
+<hr>
+
+<h1>Virtual-Key Codes</h1>
+
+<h2>Description & Usage</h2>
+
+<p>The <b>virtual-key codes</b> identify various virtual keys. Virtual
+keys mainly consist of actual keyboard keys, but also include "virtual"
+elements such as the three mouse buttons. The virtual keys also include
+many "keys" which usually do not exist at all! A key's virtual-key code
+does not change when modifier keys (Ctrl, Alt, Shift, etc.) are held --
+e.g., the 1 key has the same virtual-key code whether 1 or ! is
+pressed. However, the numbers in the numeric keypad on the keyboard do
+have two different virtual-key codes: one for when Num Lock is on, and
+another for when Num Lock is off. Note that the virtual-key codes of
+0-9 and A-Z equal their ASCII codes.</p>
+
+<p><b>Note:</b> The actual meanings of some of the key codes may vary
+on keyboards designed for different languages. Most notably, the
+VK_OEM_* that denote punctuation keys may vary between languages,
+relating to a different punctuation key. The meanings listed below are
+for a U.S. English-language keyboard.
+</p><h2>Virtual Key Codes</h2>
+
+<p></p><dl><dt>VK_LBUTTON</dt><dd>The left mouse button
+</dd><dt>VK_RBUTTON</dt><dd>The right mouse button
+</dd><dt>VK_CANCEL</dt><dd>The Cancel virtual key, used for control-break processing
+</dd><dt>VK_MBUTTON</dt><dd>The middle mouse button
+</dd><dt>VK_BACK</dt><dd>Backspace
+</dd><dt>VK_TAB</dt><dd>Tab
+</dd><dt>VK_CLEAR</dt><dd>5 (keypad without Num Lock)
+</dd><dt>VK_RETURN</dt><dd>Enter
+</dd><dt>VK_SHIFT</dt><dd>Shift (either one)
+</dd><dt>VK_CONTROL</dt><dd>Ctrl (either one)
+</dd><dt>VK_MENU</dt><dd>Alt (either one)
+</dd><dt>VK_PAUSE</dt><dd>Pause
+</dd><dt>VK_CAPITAL</dt><dd>Caps Lock
+</dd><dt>VK_ESCAPE</dt><dd>Esc
+</dd><dt>VK_SPACE</dt><dd>Spacebar
+</dd><dt>VK_PRIOR</dt><dd>Page Up
+</dd><dt>VK_NEXT</dt><dd>Page Down
+</dd><dt>VK_END</dt><dd>End
+</dd><dt>VK_HOME</dt><dd>Home
+</dd><dt>VK_LEFT</dt><dd>Left Arrow
+</dd><dt>VK_UP</dt><dd>Up Arrow
+</dd><dt>VK_RIGHT</dt><dd>Right Arrow
+</dd><dt>VK_DOWN</dt><dd>Down Arrow
+</dd><dt>VK_SELECT</dt><dd>Select
+</dd><dt>VK_PRINT</dt><dd>Print (only used by Nokia keyboards)
+</dd><dt>VK_EXECUTE</dt><dd>Execute (not used)
+</dd><dt>VK_SNAPSHOT</dt><dd>Print Screen
+</dd><dt>VK_INSERT</dt><dd>Insert
+</dd><dt>VK_DELETE</dt><dd>Delete
+</dd><dt>VK_HELP</dt><dd>Help
+</dd><dt>VK_0</dt><dd>0
+</dd><dt>VK_1</dt><dd>1
+</dd><dt>VK_2</dt><dd>2
+</dd><dt>VK_3</dt><dd>3
+</dd><dt>VK_4</dt><dd>4
+</dd><dt>VK_5</dt><dd>5
+</dd><dt>VK_6</dt><dd>6
+</dd><dt>VK_7</dt><dd>7
+</dd><dt>VK_8</dt><dd>8
+</dd><dt>VK_9</dt><dd>9
+</dd><dt>VK_A</dt><dd>A
+</dd><dt>VK_B</dt><dd>B
+</dd><dt>VK_C</dt><dd>C
+</dd><dt>VK_D</dt><dd>D
+</dd><dt>VK_E</dt><dd>E
+</dd><dt>VK_F</dt><dd>F
+</dd><dt>VK_G</dt><dd>G
+</dd><dt>VK_H</dt><dd>H
+</dd><dt>VK_I</dt><dd>I
+</dd><dt>VK_J</dt><dd>J
+</dd><dt>VK_K</dt><dd>K
+</dd><dt>VK_L</dt><dd>L
+</dd><dt>VK_M</dt><dd>M
+</dd><dt>VK_N</dt><dd>N
+</dd><dt>VK_O</dt><dd>O
+</dd><dt>VK_P</dt><dd>P
+</dd><dt>VK_Q</dt><dd>Q
+</dd><dt>VK_R</dt><dd>R
+</dd><dt>VK_S</dt><dd>S
+</dd><dt>VK_T</dt><dd>T
+</dd><dt>VK_U</dt><dd>U
+</dd><dt>VK_V</dt><dd>V
+</dd><dt>VK_W</dt><dd>W
+</dd><dt>VK_X</dt><dd>X
+</dd><dt>VK_Y</dt><dd>Y
+</dd><dt>VK_Z</dt><dd>Z
+</dd><dt>VK_STARTKEY</dt><dd>Start Menu key
+</dd><dt>VK_CONTEXTKEY</dt><dd>Context Menu key
+</dd><dt>VK_NUMPAD0</dt><dd>0 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD1</dt><dd>1 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD2</dt><dd>2 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD3</dt><dd>3 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD4</dt><dd>4 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD5</dt><dd>5 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD6</dt><dd>6 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD7</dt><dd>7 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD8</dt><dd>8 (keypad with Num Lock)
+</dd><dt>VK_NUMPAD9</dt><dd>9 (keypad with Num Lock)
+</dd><dt>VK_MULTIPLY</dt><dd>* (keypad)
+</dd><dt>VK_ADD</dt><dd>+ (keypad)
+</dd><dt>VK_SEPARATER</dt><dd>Separator (never generated by the keyboard)
+</dd><dt>VK_DECIMAL</dt><dd>. (keypad with Num Lock)
+</dd><dt>VK_DIVIDE</dt><dd>/ (keypad)
+</dd><dt>VK_F1</dt><dd>F1
+</dd><dt>VK_F2</dt><dd>F2
+</dd><dt>VK_F3</dt><dd>F3
+</dd><dt>VK_F4</dt><dd>F4
+</dd><dt>VK_F5</dt><dd>F5
+</dd><dt>VK_F6</dt><dd>F6
+</dd><dt>VK_F7</dt><dd>F7
+</dd><dt>VK_F8</dt><dd>F8
+</dd><dt>VK_F9</dt><dd>F9
+</dd><dt>VK_F10</dt><dd>F10
+</dd><dt>VK_F11</dt><dd>F11
+</dd><dt>VK_F12</dt><dd>F12
+</dd><dt>VK_F13</dt><dd>F13
+</dd><dt>VK_F14</dt><dd>F14
+</dd><dt>VK_F15</dt><dd>F15
+</dd><dt>VK_F16</dt><dd>F16
+</dd><dt>VK_F17</dt><dd>F17
+</dd><dt>VK_F18</dt><dd>F18
+</dd><dt>VK_F19</dt><dd>F19
+</dd><dt>VK_F20</dt><dd>F20
+</dd><dt>VK_F21</dt><dd>F21
+</dd><dt>VK_F22</dt><dd>F22
+</dd><dt>VK_F23</dt><dd>F23
+</dd><dt>VK_F24</dt><dd>F24
+</dd><dt>VK_NUMLOCK</dt><dd>Num Lock
+</dd><dt>VK_OEM_SCROLL</dt><dd>Scroll Lock
+</dd><dt>VK_OEM_1</dt><dd>;
+</dd><dt>VK_OEM_PLUS</dt><dd>=
+</dd><dt>VK_OEM_COMMA</dt><dd>,
+</dd><dt>VK_OEM_MINUS</dt><dd>-
+</dd><dt>VK_OEM_PERIOD</dt><dd>.
+</dd><dt>VK_OEM_2</dt><dd>/
+</dd><dt>VK_OEM_3</dt><dd>`
+</dd><dt>VK_OEM_4</dt><dd>[
+</dd><dt>VK_OEM_5</dt><dd>\
+</dd><dt>VK_OEM_6</dt><dd>]
+</dd><dt>VK_OEM_7</dt><dd>'
+</dd><dt>VK_OEM_8</dt><dd>(unknown)
+</dd><dt>VK_ICO_F17</dt><dd>F17 on Olivetti extended keyboard (internal use only)
+</dd><dt>VK_ICO_F18</dt><dd>F18 on Olivetti extended keyboard (internal use only)
+</dd><dt>VK_OEM_102</dt><dd>< or | on IBM-compatible 102 enhanced non-U.S. keyboard
+</dd><dt>VK_ICO_HELP</dt><dd>Help on Olivetti extended keyboard (internal use only)
+</dd><dt>VK_ICO_00</dt><dd>00 on Olivetti extended keyboard (internal use only)
+</dd><dt>VK_ICO_CLEAR</dt><dd>Clear on Olivette extended keyboard (internal use only)
+</dd><dt>VK_OEM_RESET</dt><dd>Reset (Nokia keyboards only)
+</dd><dt>VK_OEM_JUMP</dt><dd>Jump (Nokia keyboards only)
+</dd><dt>VK_OEM_PA1</dt><dd>PA1 (Nokia keyboards only)
+</dd><dt>VK_OEM_PA2</dt><dd>PA2 (Nokia keyboards only)
+</dd><dt>VK_OEM_PA3</dt><dd>PA3 (Nokia keyboards only)
+</dd><dt>VK_OEM_WSCTRL</dt><dd>WSCTRL (Nokia keyboards only)
+</dd><dt>VK_OEM_CUSEL</dt><dd>CUSEL (Nokia keyboards only)
+</dd><dt>VK_OEM_ATTN</dt><dd>ATTN (Nokia keyboards only)
+</dd><dt>VK_OEM_FINNISH</dt><dd>FINNISH (Nokia keyboards only)
+</dd><dt>VK_OEM_COPY</dt><dd>COPY (Nokia keyboards only)
+</dd><dt>VK_OEM_AUTO</dt><dd>AUTO (Nokia keyboards only)
+</dd><dt>VK_OEM_ENLW</dt><dd>ENLW (Nokia keyboards only)
+</dd><dt>VK_OEM_BACKTAB</dt><dd>BACKTAB (Nokia keyboards only)
+</dd><dt>VK_ATTN</dt><dd>ATTN
+</dd><dt>VK_CRSEL</dt><dd>CRSEL
+</dd><dt>VK_EXSEL</dt><dd>EXSEL
+</dd><dt>VK_EREOF</dt><dd>EREOF
+</dd><dt>VK_PLAY</dt><dd>PLAY
+</dd><dt>VK_ZOOM</dt><dd>ZOOM
+</dd><dt>VK_NONAME</dt><dd>NONAME
+</dd><dt>VK_PA1</dt><dd>PA1
+</dd><dt>VK_OEM_CLEAR</dt><dd>CLEAR
+</dd></dl>
+
+<h2>Constant Definitions</h2>
+
+<p></p><pre><code class="const">Const VK_LBUTTON = &H1
+Const VK_RBUTTON = &H2
+Const VK_CANCEL = &H3
+Const VK_MBUTTON = &H4
+Const VK_BACK = &H8
+Const VK_TAB = &H9
+Const VK_CLEAR = &HC
+Const VK_RETURN = &HD
+Const VK_SHIFT = &H10
+Const VK_CONTROL = &H11
+Const VK_MENU = &H12
+Const VK_PAUSE = &H13
+Const VK_CAPITAL = &H14
+Const VK_ESCAPE = &H1B
+Const VK_SPACE = &H20
+Const VK_PRIOR = &H21
+Const VK_NEXT = &H22
+Const VK_END = &H23
+Const VK_HOME = &H24
+Const VK_LEFT = &H25
+Const VK_UP = &H26
+Const VK_RIGHT = &H27
+Const VK_DOWN = &H28
+Const VK_SELECT = &H29
+Const VK_PRINT = &H2A
+Const VK_EXECUTE = &H2B
+Const VK_SNAPSHOT = &H2C
+Const VK_INSERT = &H2D
+Const VK_DELETE = &H2E
+Const VK_HELP = &H2F
+Const VK_0 = &H30
+Const VK_1 = &H31
+Const VK_2 = &H32
+Const VK_3 = &H33
+Const VK_4 = &H34
+Const VK_5 = &H35
+Const VK_6 = &H36
+Const VK_7 = &H37
+Const VK_8 = &H38
+Const VK_9 = &H39
+Const VK_A = &H41
+Const VK_B = &H42
+Const VK_C = &H43
+Const VK_D = &H44
+Const VK_E = &H45
+Const VK_F = &H46
+Const VK_G = &H47
+Const VK_H = &H48
+Const VK_I = &H49
+Const VK_J = &H4A
+Const VK_K = &H4B
+Const VK_L = &H4C
+Const VK_M = &H4D
+Const VK_N = &H4E
+Const VK_O = &H4F
+Const VK_P = &H50
+Const VK_Q = &H51
+Const VK_R = &H52
+Const VK_S = &H53
+Const VK_T = &H54
+Const VK_U = &H55
+Const VK_V = &H56
+Const VK_W = &H57
+Const VK_X = &H58
+Const VK_Y = &H59
+Const VK_Z = &H5A
+Const VK_STARTKEY = &H5B
+Const VK_CONTEXTKEY = &H5D
+Const VK_NUMPAD0 = &H60
+Const VK_NUMPAD1 = &H61
+Const VK_NUMPAD2 = &H62
+Const VK_NUMPAD3 = &H63
+Const VK_NUMPAD4 = &H64
+Const VK_NUMPAD5 = &H65
+Const VK_NUMPAD6 = &H66
+Const VK_NUMPAD7 = &H67
+Const VK_NUMPAD8 = &H68
+Const VK_NUMPAD9 = &H69
+Const VK_MULTIPLY = &H6A
+Const VK_ADD = &H6B
+Const VK_SEPARATOR = &H6C
+Const VK_SUBTRACT = &H6D
+Const VK_DECIMAL = &H6E
+Const VK_DIVIDE = &H6F
+Const VK_F1 = &H70
+Const VK_F2 = &H71
+Const VK_F3 = &H72
+Const VK_F4 = &H73
+Const VK_F5 = &H74
+Const VK_F6 = &H75
+Const VK_F7 = &H76
+Const VK_F8 = &H77
+Const VK_F9 = &H78
+Const VK_F10 = &H79
+Const VK_F11 = &H7A
+Const VK_F12 = &H7B
+Const VK_F13 = &H7C
+Const VK_F14 = &H7D
+Const VK_F15 = &H7E
+Const VK_F16 = &H7F
+Const VK_F17 = &H80
+Const VK_F18 = &H81
+Const VK_F19 = &H82
+Const VK_F20 = &H83
+Const VK_F21 = &H84
+Const VK_F22 = &H85
+Const VK_F23 = &H86
+Const VK_F24 = &H87
+Const VK_NUMLOCK = &H90
+Const VK_OEM_SCROLL = &H91
+Const VK_OEM_1 = &HBA
+Const VK_OEM_PLUS = &HBB
+Const VK_OEM_COMMA = &HBC
+Const VK_OEM_MINUS = &HBD
+Const VK_OEM_PERIOD = &HBE
+Const VK_OEM_2 = &HBF
+Const VK_OEM_3 = &HC0
+Const VK_OEM_4 = &HDB
+Const VK_OEM_5 = &HDC
+Const VK_OEM_6 = &HDD
+Const VK_OEM_7 = &HDE
+Const VK_OEM_8 = &HDF
+Const VK_ICO_F17 = &HE0
+Const VK_ICO_F18 = &HE1
+Const VK_OEM102 = &HE2
+Const VK_ICO_HELP = &HE3
+Const VK_ICO_00 = &HE4
+Const VK_ICO_CLEAR = &HE6
+Const VK_OEM_RESET = &HE9
+Const VK_OEM_JUMP = &HEA
+Const VK_OEM_PA1 = &HEB
+Const VK_OEM_PA2 = &HEC
+Const VK_OEM_PA3 = &HED
+Const VK_OEM_WSCTRL = &HEE
+Const VK_OEM_CUSEL = &HEF
+Const VK_OEM_ATTN = &HF0
+Const VK_OEM_FINNISH = &HF1
+Const VK_OEM_COPY = &HF2
+Const VK_OEM_AUTO = &HF3
+Const VK_OEM_ENLW = &HF4
+Const VK_OEM_BACKTAB = &HF5
+Const VK_ATTN = &HF6
+Const VK_CRSEL = &HF7
+Const VK_EXSEL = &HF8
+Const VK_EREOF = &HF9
+Const VK_PLAY = &HFA
+Const VK_ZOOM = &HFB
+Const VK_NONAME = &HFC
+Const VK_PA1 = &HFD
+Const VK_OEM_CLEAR = &HFE</code></pre>
+
+<h2>Used By</h2>
+<p><a href="http://math.msu.su/%7Evfnik/WinApi/g/getasynckeystate.html">GetAsyncKeyState</a>, <a href="http://math.msu.su/%7Evfnik/WinApi/g/getkeyboardstate.html">GetKeyboardState</a>, <a href="http://math.msu.su/%7Evfnik/WinApi/g/getkeystate.html">GetKeyState</a>, <a href="http://math.msu.su/%7Evfnik/WinApi/k/keybd_event.html">keybd_event</a>, <a href="http://math.msu.su/%7Evfnik/WinApi/k/keybdinput.html">KEYBDINPUT</a>, <a href="http://math.msu.su/%7Evfnik/WinApi/s/setkeyboardstate.htm [...]
+
+<p><a href="http://math.msu.su/%7Evfnik/WinApi/index.html" rel="index">Back to the index.</a></p>
+
+<hr>
+
+<p>
+<b>Last Modified:</b> September 6, 1999<br>
+This page is copyright � 1999 Paul Kuliniewicz.  <a href="http://math.msu.su/%7Evfnik/WinApi/copyrite.html" rel="copyright">Copyright Information</a><br>
+</p><address>
+<a href="http://math.msu.su/%7Evfnik/index.html">Go to Paul Kuliniewicz's Home Page.</a><br>
+E-mail: <a href="mailto:rogue953 at hotmail.com">rogue953 at hotmail.com</a><br>
+This page is at <a href="http://skyscraper.fortunecity.com/transmission/45/api/other/virtualkeycodes.html">http://skyscraper.fortunecity.com/transmission/45/api/other/virtualkeycodes.html</a>
+</address>
+</body></html>
\ No newline at end of file
diff --git a/glade/Makefile.am b/glade/Makefile.am
new file mode 100644
index 0000000..c3c25ba
--- /dev/null
+++ b/glade/Makefile.am
@@ -0,0 +1,7 @@
+gladedir = $(pkgdatadir)/glade
+dist_glade_DATA = *-2.glade
+
+EXTRA_DIST = *-2.gladep *-2.str copy.bat
+
+uninstall:
+	rm -f $(pkgdatadir)/glade/*.glade
\ No newline at end of file
diff --git a/glade/Makefile.in b/glade/Makefile.in
new file mode 100644
index 0000000..26085b3
--- /dev/null
+++ b/glade/Makefile.in
@@ -0,0 +1,488 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = glade
+DIST_COMMON = $(dist_glade_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(gladedir)"
+dist_gladeDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_glade_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+gladedir = $(pkgdatadir)/glade
+dist_glade_DATA = *-2.glade
+EXTRA_DIST = *-2.gladep *-2.str copy.bat
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  glade/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  glade/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_gladeDATA: $(dist_glade_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)"
+	@list='$(dist_glade_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(dist_gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \
+	  $(dist_gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \
+	done
+
+uninstall-dist_gladeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_glade_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(gladedir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(gladedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_gladeDATA
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_gladeDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dist_gladeDATA \
+	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 maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-dist_gladeDATA
+
+
+uninstall:
+	rm -f $(pkgdatadir)/glade/*.glade
+# 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/glade/calc-2.glade b/glade/calc-2.glade
new file mode 100644
index 0000000..be2b450
--- /dev/null
+++ b/glade/calc-2.glade
@@ -0,0 +1,44 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="calc_wnd">
+  <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_VISIBILITY_NOTIFY_MASK</property>
+  <property name="title" translatable="yes">TiEmu 3</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">100</property>
+  <property name="default_height">100</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="button_press_event" handler="on_calc_wnd_button_press_event" last_modification_time="Wed, 14 Jul 2004 17:20:38 GMT"/>
+  <signal name="button_release_event" handler="on_calc_wnd_button_release_event" last_modification_time="Wed, 14 Jul 2004 17:20:43 GMT"/>
+  <signal name="key_press_event" handler="on_calc_wnd_key_press_event" last_modification_time="Wed, 14 Jul 2004 17:20:51 GMT"/>
+  <signal name="key_release_event" handler="on_calc_wnd_key_release_event" last_modification_time="Wed, 14 Jul 2004 17:21:00 GMT"/>
+  <signal name="destroy" handler="on_calc_wnd_destroy" last_modification_time="Wed, 14 Jul 2004 20:10:55 GMT"/>
+  <signal name="window_state_event" handler="on_calc_wnd_window_state_event" last_modification_time="Sat, 31 Jul 2004 16:45:27 GMT"/>
+  <signal name="drag_data_received" handler="on_calc_wnd_drag_data_received" last_modification_time="Thu, 07 Dec 2006 15:34:02 GMT"/>
+  <signal name="drag_drop" handler="on_calc_wnd_drag_drop" last_modification_time="Thu, 07 Dec 2006 15:34:07 GMT"/>
+
+  <child>
+    <widget class="GtkDrawingArea" id="drawingarea1">
+      <property name="visible">True</property>
+      <property name="can_default">True</property>
+      <property name="has_default">True</property>
+      <property name="can_focus">True</property>
+      <property name="has_focus">True</property>
+      <signal name="configure_event" handler="on_drawingarea1_configure_event" last_modification_time="Tue, 13 Jul 2004 13:28:21 GMT"/>
+      <signal name="expose_event" handler="on_drawingarea1_expose_event" last_modification_time="Tue, 13 Jul 2004 13:29:02 GMT"/>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/calc-2.gladep b/glade/calc-2.gladep
new file mode 100644
index 0000000..89401cc
--- /dev/null
+++ b/glade/calc-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Calc</name>
+  <program_name>calc</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>calc_if.c</main_source_file>
+  <main_header_file>calc_if.h</main_header_file>
+  <handler_source_file>calc.c</handler_source_file>
+  <handler_header_file>calc.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>calc-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/calc-2.str b/glade/calc-2.str
new file mode 100644
index 0000000..f107728
--- /dev/null
+++ b/glade/calc-2.str
@@ -0,0 +1,8 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("TiEmu 3");
+gchar *s = N_("Use mouse or press a key.");
diff --git a/glade/copy.bat b/glade/copy.bat
new file mode 100644
index 0000000..1ac2721
--- /dev/null
+++ b/glade/copy.bat
@@ -0,0 +1,3 @@
+mkdir c:\lpg\msvc\glade
+copy *.glade c:\lpg\msvc\glade\
+del *.bak
diff --git a/glade/dbg_bits-2.glade b/glade/dbg_bits-2.glade
new file mode 100644
index 0000000..25643de
--- /dev/null
+++ b/glade/dbg_bits-2.glade
@@ -0,0 +1,522 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="dbgbits_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Add Bit Breakpoint</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox5">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area5">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox27">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox7">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label35">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Address:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="entry4">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">8</property>
+		  <property name="text" translatable="yes">0x000000</property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		  <property name="width_chars">8</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox8">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label36">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Checks:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton17">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">7</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton16">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">6</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton15">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">5</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton14">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">4</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton13">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">3</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton12">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">2</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton11">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">1</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton10">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">0</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox9">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label37">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">States:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton27">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">7</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton26">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">6</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton25">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">5</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton24">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">4</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton23">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">3</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton22">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">2</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton21">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">1</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton20">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">0</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_bits-2.gladep b/glade/dbg_bits-2.gladep
new file mode 100644
index 0000000..9e4b3f2
--- /dev/null
+++ b/glade/dbg_bits-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_bits.c</handler_source_file>
+  <handler_header_file>dbg_bits.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_bits-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_bits-2.str b/glade/dbg_bits-2.str
new file mode 100644
index 0000000..7ad1a9e
--- /dev/null
+++ b/glade/dbg_bits-2.str
@@ -0,0 +1,27 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Add Bit Breakpoint");
+gchar *s = N_("Address:");
+gchar *s = N_("0x000000");
+gchar *s = N_("Checks:");
+gchar *s = N_("7");
+gchar *s = N_("6");
+gchar *s = N_("5");
+gchar *s = N_("4");
+gchar *s = N_("3");
+gchar *s = N_("2");
+gchar *s = N_("1");
+gchar *s = N_("0");
+gchar *s = N_("States:");
+gchar *s = N_("7");
+gchar *s = N_("6");
+gchar *s = N_("5");
+gchar *s = N_("4");
+gchar *s = N_("3");
+gchar *s = N_("2");
+gchar *s = N_("1");
+gchar *s = N_("0");
diff --git a/glade/dbg_bkpts-2.glade b/glade/dbg_bkpts-2.glade
new file mode 100644
index 0000000..b1f4f15
--- /dev/null
+++ b/glade/dbg_bkpts-2.glade
@@ -0,0 +1,235 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgbkpts_window">
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Breakpoints</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgbkpts_window_delete_event" last_modification_time="Mon, 07 Jun 2004 08:06:10 GMT"/>
+  <signal name="window_state_event" handler="on_dbgbkpts_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:33:43 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkToolbar" id="toolbar1">
+	  <property name="visible">True</property>
+	  <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+	  <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
+	  <property name="tooltips">True</property>
+	  <property name="show_arrow">True</property>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Add breakpoint</property>
+	      <property name="stock_id">gtk-add</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgbkpts_button1_clicked" object="treeview1" last_modification_time="Fri, 04 Jun 2004 05:57:39 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button2">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Remove breakpoint(s)</property>
+	      <property name="stock_id">gtk-remove</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgbkpts_button2_clicked" object="treeview1" last_modification_time="Fri, 04 Jun 2004 05:57:28 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button3">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Disable breakpoint</property>
+	      <property name="stock_id">gtk-dialog-error</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgbkpts_button3_clicked" object="treeview1" last_modification_time="Fri, 04 Jun 2004 05:57:46 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button4">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Enable breakpoint</property>
+	      <property name="stock_id">gtk-apply</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgbkpts_button4_clicked" object="treeview1" last_modification_time="Fri, 04 Jun 2004 05:57:56 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="toolbutton1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Go to breakpoint location</property>
+	      <property name="stock_id">gtk-jump-to</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgbkpts_button5_clicked" object="treeview1" last_modification_time="Sat, 28 Aug 2004 16:03:00 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="treeview1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Double-click a row to edit breakpoint values.</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">False</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	      <property name="fixed_height_mode">False</property>
+	      <property name="hover_selection">False</property>
+	      <property name="hover_expand">False</property>
+	      <signal name="button_press_event" handler="on_treeview2_button_press_event" object="treeview1" last_modification_time="Mon, 15 Nov 2004 17:58:39 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label1">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Breakpoint context:</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">5</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">5</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkStatusbar" id="statusbar1">
+	  <property name="visible">True</property>
+	  <property name="has_resize_grip">False</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkMenu" id="dbgbkpts_popup">
+
+  <child>
+    <widget class="GtkMenuItem" id="bits1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Bits</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="dbgbkpts_bit_activate" last_modification_time="Thu, 12 Jul 2007 20:46:20 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="data1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Data</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="dbgbkpts_data_activate" last_modification_time="Fri, 04 Jun 2004 12:55:32 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="vector1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Vectors</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="dbgbkpts_vector_activate" last_modification_time="Fri, 04 Jun 2004 12:54:23 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="prgmentry1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Prgm entry</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="dbgbkpts_prgmentry1_activate" last_modification_time="Wed, 23 Feb 2005 09:34:13 GMT"/>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_bkpts-2.gladep b/glade/dbg_bkpts-2.gladep
new file mode 100644
index 0000000..1f04798
--- /dev/null
+++ b/glade/dbg_bkpts-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_bkpts.c</handler_source_file>
+  <handler_header_file>dbg_bkpts.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_bkpts-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_bkpts-2.str b/glade/dbg_bkpts-2.str
new file mode 100644
index 0000000..31b26ef
--- /dev/null
+++ b/glade/dbg_bkpts-2.str
@@ -0,0 +1,18 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Breakpoints");
+gchar *s = N_("Add breakpoint");
+gchar *s = N_("Remove breakpoint(s)");
+gchar *s = N_("Disable breakpoint");
+gchar *s = N_("Enable breakpoint");
+gchar *s = N_("Go to breakpoint location");
+gchar *s = N_("Double-click a row to edit breakpoint values.");
+gchar *s = N_("Breakpoint context:");
+gchar *s = N_("Bits");
+gchar *s = N_("Data");
+gchar *s = N_("Vectors");
+gchar *s = N_("Prgm entry");
diff --git a/glade/dbg_cause-2.glade b/glade/dbg_cause-2.glade
new file mode 100644
index 0000000..bec3008
--- /dev/null
+++ b/glade/dbg_cause-2.glade
@@ -0,0 +1,702 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="dbgcause1_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Breakpoint!</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table2">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">6</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">4</property>
+	  <property name="column_spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label11">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Address:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label12">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Type:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label21">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0x000000</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label22">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">access</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label23">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">byte read</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label13">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Mode:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label10">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">A breakpoint has been encountered...</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label15">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Target:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label25">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0x4c00</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label14">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Id:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">5</property>
+	      <property name="bottom_attach">6</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label24">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">#0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">5</property>
+	      <property name="bottom_attach">6</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="dbgcause2_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Exception!</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="button1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table3">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">5</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">4</property>
+	  <property name="column_spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label31">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Type:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label34">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">PC (pushed):</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label41">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">illegal instr</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label43">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">000000</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label44">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0000</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label33">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">SR (pushed):</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label33">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">An exception has been encountered...</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label32">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Id:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label42">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">#0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_cause-2.gladep b/glade/dbg_cause-2.gladep
new file mode 100644
index 0000000..b7b9d5a
--- /dev/null
+++ b/glade/dbg_cause-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_cause.c</handler_source_file>
+  <handler_header_file>dbg_cause.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_cause-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_cause-2.str b/glade/dbg_cause-2.str
new file mode 100644
index 0000000..fed184e
--- /dev/null
+++ b/glade/dbg_cause-2.str
@@ -0,0 +1,28 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Breakpoint!");
+gchar *s = N_("Address:");
+gchar *s = N_("Type:");
+gchar *s = N_("0x000000");
+gchar *s = N_("access");
+gchar *s = N_("byte read");
+gchar *s = N_("Mode:");
+gchar *s = N_("A breakpoint has been encountered...");
+gchar *s = N_("Target:");
+gchar *s = N_("0x4c00");
+gchar *s = N_("Id:");
+gchar *s = N_("#0");
+gchar *s = N_("Exception!");
+gchar *s = N_("Type:");
+gchar *s = N_("PC (pushed):");
+gchar *s = N_("illegal instr");
+gchar *s = N_("000000");
+gchar *s = N_("0000");
+gchar *s = N_("SR (pushed):");
+gchar *s = N_("An exception has been encountered...");
+gchar *s = N_("Id:");
+gchar *s = N_("#0");
diff --git a/glade/dbg_code-2.glade b/glade/dbg_code-2.glade
new file mode 100644
index 0000000..a4a1e2a
--- /dev/null
+++ b/glade/dbg_code-2.glade
@@ -0,0 +1,1112 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgcode_window">
+  <property name="can_focus">True</property>
+  <property name="has_focus">True</property>
+  <property name="title" translatable="yes">Disassembly</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgcode_window_delete_event" last_modification_time="Mon, 07 Jun 2004 08:07:55 GMT"/>
+  <signal name="window_state_event" handler="on_dbgcode_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:32:40 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkMenuBar" id="menubar1">
+	  <property name="visible">True</property>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="debug1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Debug</property>
+	      <property name="use_underline">True</property>
+
+	      <child>
+		<widget class="GtkMenu" id="debug1_menu">
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="run1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Run</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_run1_activate" last_modification_time="Sat, 12 Jun 2004 20:20:19 GMT"/>
+		      <accelerator key="F5" modifiers="0" signal="activate"/>
+
+		      <child internal-child="image">
+			<widget class="GtkImage" id="image312">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-yes</property>
+			  <property name="icon_size">1</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="step1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Step into (single step)</property>
+		      <property name="label" translatable="yes">Step _in</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_step1_activate" last_modification_time="Sat, 12 Jun 2004 20:22:41 GMT"/>
+		      <accelerator key="F7" modifiers="0" signal="activate"/>
+
+		      <child internal-child="image">
+			<widget class="GtkImage" id="image313">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-jump-to</property>
+			  <property name="icon_size">1</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="step_over1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Step over (skip subroutine)</property>
+		      <property name="label" translatable="yes">Step _over</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_step_over1_activate" last_modification_time="Sat, 12 Jun 2004 20:22:41 GMT"/>
+		      <accelerator key="F8" modifiers="0" signal="activate"/>
+
+		      <child internal-child="image">
+			<widget class="GtkImage" id="image314">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-redo</property>
+			  <property name="icon_size">1</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="step_out1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Step out (return to caller)</property>
+		      <property name="label" translatable="yes">Step ou_t</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_step_out1_activate" last_modification_time="Tue, 20 Jul 2004 13:13:51 GMT"/>
+		      <accelerator key="F9" modifiers="0" signal="activate"/>
+
+		      <child internal-child="image">
+			<widget class="GtkImage" id="image315">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-undo</property>
+			  <property name="icon_size">1</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="run_to_cursor1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Run to _cursor</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_run_to_cursor1_activate" last_modification_time="Sat, 12 Jun 2004 20:22:41 GMT"/>
+		      <accelerator key="F4" modifiers="0" signal="activate"/>
+
+		      <child internal-child="image">
+			<widget class="GtkImage" id="image316">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-goto-last</property>
+			  <property name="icon_size">1</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="break1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Break</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_break1_activate" last_modification_time="Sat, 12 Jun 2004 20:22:41 GMT"/>
+		      <accelerator key="F11" modifiers="0" signal="activate"/>
+
+		      <child internal-child="image">
+			<widget class="GtkImage" id="image317">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-no</property>
+			  <property name="icon_size">1</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="log1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Log</property>
+	      <property name="use_underline">True</property>
+
+	      <child>
+		<widget class="GtkMenu" id="log1_menu">
+
+		  <child>
+		    <widget class="GtkMenuItem" id="linkport1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Linkport</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_linkport1_activate" last_modification_time="Tue, 26 Sep 2006 06:19:32 GMT"/>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="windows1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Windows</property>
+	      <property name="use_underline">True</property>
+
+	      <child>
+		<widget class="GtkMenu" id="windows1_menu">
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="registers1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Registers</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_registers1_activate" last_modification_time="Sat, 12 Jun 2004 20:22:41 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="breakpoints1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Breakpoints</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_breakpoints1_activate" last_modification_time="Sat, 12 Jun 2004 20:22:41 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="memory1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Memory</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_memory1_activate" last_modification_time="Sat, 12 Jun 2004 20:22:41 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="pc_log1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_PC trace</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_pc_log1_activate" last_modification_time="Sun, 13 Jun 2004 16:29:36 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="stack_frame1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Stack frame</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_stack_frame1_activate" last_modification_time="Tue, 03 Aug 2004 17:42:41 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="heap_frame1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Heap (handles)</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_heap_frame1_activate" last_modification_time="Tue, 03 Aug 2004 17:42:41 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="ioports1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_I/O ports</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_ioports_frame1_activate" last_modification_time="Thu, 04 Aug 2005 13:37:42 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSeparatorMenuItem" id="separator2">
+		      <property name="visible">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="dock_mode1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Dock Mode</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">True</property>
+		      <signal name="activate" handler="on_dockmode1_activate" last_modification_time="Thu, 13 Dec 2007 20:42:19 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckMenuItem" id="transient1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Group windows</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">False</property>
+		      <signal name="activate" handler="on_transient1_activate" last_modification_time="Fri, 26 Aug 2005 14:36:19 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSeparatorMenuItem" id="separator4">
+		      <property name="visible">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="show_all1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Show all</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_show_all1_activate" last_modification_time="Sun, 27 Feb 2005 07:58:36 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="hide_all1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Hide all</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_hide_all1_activate" last_modification_time="Sun, 27 Feb 2005 07:58:36 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="minimize_all1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">M_inimize all</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_minimize_all1_activate" last_modification_time="Sat, 03 Jul 2004 20:34:56 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="maximize_all1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">M_aximize all</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_maximize_all1_activate" last_modification_time="Sat, 03 Jul 2004 20:34:56 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="restore_all1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Restore all</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_restore_all1_activate" last_modification_time="Sun, 27 Feb 2005 07:58:36 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSeparatorMenuItem" id="separator3">
+		      <property name="visible">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="quit1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Quit</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_quit1_activate" last_modification_time="Sat, 12 Jun 2004 20:24:01 GMT"/>
+		      <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+		      <child internal-child="image">
+			<widget class="GtkImage" id="image318">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-quit</property>
+			  <property name="icon_size">1</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="item1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Font</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_font_activate" last_modification_time="Sun, 18 Nov 2007 11:09:42 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="state1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_State</property>
+	      <property name="use_underline">True</property>
+
+	      <child>
+		<widget class="GtkMenu" id="state1_menu">
+
+		  <child>
+		    <widget class="GtkMenuItem" id="save1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">S_ave</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_save1_activate" last_modification_time="Mon, 04 May 2009 20:36:01 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="revert1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Revert</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_revert1_activate" last_modification_time="Mon, 04 May 2009 20:36:01 GMT"/>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolbar" id="toolbar1">
+	  <property name="visible">True</property>
+	  <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+	  <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
+	  <property name="tooltips">True</property>
+	  <property name="show_arrow">True</property>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Run (F5)</property>
+	      <property name="stock_id">gtk-yes</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="on_run1_activate" object="treeview1" last_modification_time="Sun, 13 Jun 2004 08:47:18 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button2">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Single step / Step into (F7)</property>
+	      <property name="stock_id">gtk-jump-to</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="on_step1_activate" object="treeview1" last_modification_time="Sun, 13 Jun 2004 08:53:08 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button3">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Step over (F8)</property>
+	      <property name="stock_id">gtk-redo</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="on_step_over1_activate" object="treeview1" last_modification_time="Sun, 13 Jun 2004 08:47:52 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button4">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Step out (F9)</property>
+	      <property name="stock_id">gtk-undo</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="on_step_out1_activate" object="treeview1" last_modification_time="Tue, 20 Jul 2004 12:43:02 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button5">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Run to cursor (F4)</property>
+	      <property name="stock_id">gtk-goto-last</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="on_run_to_cursor1_activate" object="treeview1" last_modification_time="Sun, 13 Jun 2004 08:48:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button6">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Break (F11)</property>
+	      <property name="stock_id">gtk-no</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="on_break1_activate" object="treeview1" last_modification_time="Sun, 13 Jun 2004 08:48:22 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button7">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Toggle breakpoint (F2)</property>
+	      <property name="stock_id">gtk-stop</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgcode_button6_clicked" object="treeview1" last_modification_time="Fri, 04 Jun 2004 06:00:10 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox2">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label2">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Cycle count:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label3">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label4">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">00</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">3</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button8">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Reset</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="dbgcode_button8_clicked" last_modification_time="Mon, 28 Mar 2005 10:13:06 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">True</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="treeview1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">False</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	      <property name="fixed_height_mode">False</property>
+	      <property name="hover_selection">False</property>
+	      <property name="hover_expand">False</property>
+	      <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 13 Jun 2004 09:58:28 GMT"/>
+	      <signal name="key_press_event" handler="on_treeview1_key_press_event" last_modification_time="Fri, 02 Jul 2004 14:35:43 GMT"/>
+	      <signal name="size_allocate" handler="on_treeview1_size_allocate" last_modification_time="Wed, 23 Mar 2005 11:55:31 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Symbol:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkComboBoxEntry" id="comboboxentry1">
+	      <property name="visible">True</property>
+	      <property name="add_tearoffs">False</property>
+	      <property name="has_frame">True</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="changed" handler="on_combo_entry1_changed" last_modification_time="Fri, 02 Jul 2004 14:35:43 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox3">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">by name</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgcode_radiobutton1_toggled" last_modification_time="Tue, 19 Apr 2005 12:24:33 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">by addr</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">radiobutton1</property>
+	      <signal name="toggled" handler="on_dbgcode_radiobutton2_toggled" last_modification_time="Tue, 19 Apr 2005 12:24:42 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton3">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">by id</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">radiobutton1</property>
+	      <signal name="toggled" handler="on_dbgcode_radiobutton3_toggled" last_modification_time="Tue, 19 Apr 2005 12:24:51 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkProgressBar" id="progressbar1">
+	  <property name="visible">True</property>
+	  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	  <property name="fraction">0</property>
+	  <property name="pulse_step">0.10000000149</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkMenu" id="dbgcode_popup">
+
+  <child>
+    <widget class="GtkMenuItem" id="go_to_address1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Go to _address</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_go_to_address1_activate" last_modification_time="Sun, 13 Jun 2004 09:36:25 GMT"/>
+      <accelerator key="G" modifiers="0" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="go_to_pc1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Go to _PC</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_go_to_pc1_activate" last_modification_time="Sun, 13 Jun 2004 09:36:25 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator5">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="set_breakpoint1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Set _breakpoint</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_set_breakpoint1_activate" last_modification_time="Sun, 13 Jun 2004 09:36:25 GMT"/>
+      <accelerator key="F2" modifiers="0" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="set_tmp_bkpt1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Set _one shot bkpt</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_set_tmp_bkpt1_activate" last_modification_time="Sun, 13 Jun 2004 09:36:25 GMT"/>
+      <accelerator key="F3" modifiers="0" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="set_pc_to_selection1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Set PC to _selection</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_set_pc_to_selection1_activate" last_modification_time="Sun, 13 Jun 2004 09:36:25 GMT"/>
+      <accelerator key="F6" modifiers="0" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator6">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="view_memory1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">View _memory</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_view_memory1_activate" last_modification_time="Mon, 02 Aug 2004 14:31:35 GMT"/>
+      <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="dbgcode_font">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Change font</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table1">
+	  <property name="visible">True</property>
+	  <property name="n_rows">3</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">True</property>
+	  <property name="row_spacing">0</property>
+	  <property name="column_spacing">0</property>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton6">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">custom</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="clicked" handler="on_radiobutton6_clicked" object="button9" last_modification_time="Sun, 18 Nov 2007 11:16:11 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button9">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_dbgcode_button9_clicked" last_modification_time="Sun, 18 Nov 2007 11:21:30 GMT"/>
+
+	      <child>
+		<widget class="GtkImage" id="image239">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-select-font</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton4">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">default</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">radiobutton6</property>
+	      <signal name="clicked" handler="on_radiobutton4_clicked" object="button9" last_modification_time="Sun, 18 Nov 2007 11:15:47 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label5">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Font:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_code-2.gladep b/glade/dbg_code-2.gladep
new file mode 100644
index 0000000..296089f
--- /dev/null
+++ b/glade/dbg_code-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_code.c</handler_source_file>
+  <handler_header_file>dbg_code.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_code-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_code-2.str b/glade/dbg_code-2.str
new file mode 100644
index 0000000..b31a6e4
--- /dev/null
+++ b/glade/dbg_code-2.str
@@ -0,0 +1,64 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Disassembly");
+gchar *s = N_("_Debug");
+gchar *s = N_("_Run");
+gchar *s = N_("Step into (single step)");
+gchar *s = N_("Step _in");
+gchar *s = N_("Step over (skip subroutine)");
+gchar *s = N_("Step _over");
+gchar *s = N_("Step out (return to caller)");
+gchar *s = N_("Step ou_t");
+gchar *s = N_("Run to _cursor");
+gchar *s = N_("_Break");
+gchar *s = N_("_Log");
+gchar *s = N_("_Linkport");
+gchar *s = N_("Windows");
+gchar *s = N_("_Registers");
+gchar *s = N_("_Breakpoints");
+gchar *s = N_("_Memory");
+gchar *s = N_("_PC trace");
+gchar *s = N_("_Stack frame");
+gchar *s = N_("_Heap (handles)");
+gchar *s = N_("_I/O ports");
+gchar *s = N_("Dock Mode");
+gchar *s = N_("_Group windows");
+gchar *s = N_("_Show all");
+gchar *s = N_("_Hide all");
+gchar *s = N_("M_inimize all");
+gchar *s = N_("M_aximize all");
+gchar *s = N_("_Restore all");
+gchar *s = N_("_Quit");
+gchar *s = N_("_Font");
+gchar *s = N_("_State");
+gchar *s = N_("S_ave");
+gchar *s = N_("_Revert");
+gchar *s = N_("Run (F5)");
+gchar *s = N_("Single step / Step into (F7)");
+gchar *s = N_("Step over (F8)");
+gchar *s = N_("Step out (F9)");
+gchar *s = N_("Run to cursor (F4)");
+gchar *s = N_("Break (F11)");
+gchar *s = N_("Toggle breakpoint (F2)");
+gchar *s = N_("Cycle count:");
+gchar *s = N_("0");
+gchar *s = N_("00");
+gchar *s = N_("Reset");
+gchar *s = N_("Symbol:");
+gchar *s = N_("by name");
+gchar *s = N_("by addr");
+gchar *s = N_("by id");
+gchar *s = N_("Go to _address");
+gchar *s = N_("Go to _PC");
+gchar *s = N_("Set _breakpoint");
+gchar *s = N_("Set _one shot bkpt");
+gchar *s = N_("Set PC to _selection");
+gchar *s = N_("View _memory");
+gchar *s = N_("Change font");
+gchar *s = N_("custom");
+gchar *s = N_("default");
+gchar *s = N_("Font:");
diff --git a/glade/dbg_data-2.glade b/glade/dbg_data-2.glade
new file mode 100644
index 0000000..3aff9f9
--- /dev/null
+++ b/glade/dbg_data-2.glade
@@ -0,0 +1,430 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="dbgdata_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Add Data Breakpoint</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox26">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame16">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox6">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton10">
+		      <property name="border_width">5</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Read</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton11">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Write</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton12">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Either</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label31">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Mode</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame17">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkTable" id="table3">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">4</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">5</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton20">
+		      <property name="border_width">4</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Single</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_radiobutton20_toggled" last_modification_time="Fri, 04 Jun 2004 14:47:25 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton21">
+		      <property name="border_width">5</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Range</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton20</property>
+		      <signal name="toggled" handler="on_radiobutton21_toggled" last_modification_time="Fri, 04 Jun 2004 14:47:28 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label33">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">to</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label34">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">at</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="entry3">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">8</property>
+		      <property name="text" translatable="yes">0x000000</property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char">*</property>
+		      <property name="activates_default">False</property>
+		      <property name="width_chars">9</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_padding">5</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="entry2">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">8</property>
+		      <property name="text" translatable="yes">0x000000</property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char">*</property>
+		      <property name="activates_default">False</property>
+		      <property name="width_chars">9</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">5</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="entry1">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">8</property>
+		      <property name="text" translatable="yes">0x000000</property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char">*</property>
+		      <property name="activates_default">False</property>
+		      <property name="width_chars">8</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkComboBoxEntry" id="comboboxentry1">
+		      <property name="width_request">75</property>
+		      <property name="visible">True</property>
+		      <property name="items" translatable="yes">Byte
+Word
+Long</property>
+		      <property name="add_tearoffs">False</property>
+		      <property name="has_frame">True</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label32">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Type</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_data-2.gladep b/glade/dbg_data-2.gladep
new file mode 100644
index 0000000..593adcb
--- /dev/null
+++ b/glade/dbg_data-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_data.c</handler_source_file>
+  <handler_header_file>dbg_data.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_data-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_data-2.str b/glade/dbg_data-2.str
new file mode 100644
index 0000000..18cf979
--- /dev/null
+++ b/glade/dbg_data-2.str
@@ -0,0 +1,22 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Add Data Breakpoint");
+gchar *s = N_("_Read");
+gchar *s = N_("_Write");
+gchar *s = N_("_Either");
+gchar *s = N_("Mode");
+gchar *s = N_("_Single");
+gchar *s = N_("_Range");
+gchar *s = N_("to");
+gchar *s = N_("at");
+gchar *s = N_("0x000000");
+gchar *s = N_("0x000000");
+gchar *s = N_("0x000000");
+gchar *s = N_("Byte");
+gchar *s = N_("Word");
+gchar *s = N_("Long");
+gchar *s = N_("Type");
diff --git a/glade/dbg_dock-2.glade b/glade/dbg_dock-2.glade
new file mode 100644
index 0000000..536979d
--- /dev/null
+++ b/glade/dbg_dock-2.glade
@@ -0,0 +1,296 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgdock_window">
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">TiEmu Dock</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgcode_window_delete_event" last_modification_time="Thu, 13 Dec 2007 16:47:04 GMT"/>
+  <signal name="window_state_event" handler="on_dbgcode_window_state_event" last_modification_time="Thu, 13 Dec 2007 16:47:53 GMT"/>
+
+  <child>
+    <widget class="GtkTable" id="table1">
+      <property name="visible">True</property>
+      <property name="n_rows">3</property>
+      <property name="n_columns">4</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame5">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label5">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Memory</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame6">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label6">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Heap</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame3">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label3">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Breakpoints</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame1">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Stack</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">shrink|fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame2">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label2">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Registers</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">shrink|fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame4">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label4">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Disassembly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">2</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_dock-2.gladep b/glade/dbg_dock-2.gladep
new file mode 100644
index 0000000..41b497f
--- /dev/null
+++ b/glade/dbg_dock-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_doc.c</handler_source_file>
+  <handler_header_file>dbg_dock.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_dock-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_dock-2.str b/glade/dbg_dock-2.str
new file mode 100644
index 0000000..c9d9ced
--- /dev/null
+++ b/glade/dbg_dock-2.str
@@ -0,0 +1,13 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("TiEmu Dock");
+gchar *s = N_("Memory");
+gchar *s = N_("Heap");
+gchar *s = N_("Breakpoints");
+gchar *s = N_("Stack");
+gchar *s = N_("Registers");
+gchar *s = N_("Disassembly");
diff --git a/glade/dbg_entry-2.glade b/glade/dbg_entry-2.glade
new file mode 100644
index 0000000..d9f8537
--- /dev/null
+++ b/glade/dbg_entry-2.glade
@@ -0,0 +1,98 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="dbgentry_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Set program entry breakpoint</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">160</property>
+  <property name="default_height">120</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="treeview1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">False</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_entry-2.gladep b/glade/dbg_entry-2.gladep
new file mode 100644
index 0000000..06b5308
--- /dev/null
+++ b/glade/dbg_entry-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_entry.c</handler_source_file>
+  <handler_header_file>dbg_entry.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_entry-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_entry-2.str b/glade/dbg_entry-2.str
new file mode 100644
index 0000000..5ac0912
--- /dev/null
+++ b/glade/dbg_entry-2.str
@@ -0,0 +1,2 @@
+
+gchar *s = N_("Set program entry breakpoint");
diff --git a/glade/dbg_heap-2.glade b/glade/dbg_heap-2.glade
new file mode 100644
index 0000000..4e3ebae
--- /dev/null
+++ b/glade/dbg_heap-2.glade
@@ -0,0 +1,64 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgheap_window">
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Heap</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgheap_window_delete_event" last_modification_time="Wed, 30 Jun 2004 12:57:10 GMT"/>
+  <signal name="window_state_event" handler="on_dbgheap_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:35:05 GMT"/>
+
+  <child>
+    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+      <property name="shadow_type">GTK_SHADOW_NONE</property>
+      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+      <child>
+	<widget class="GtkTreeView" id="treeview1">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Double click rowl to open tab in the memory window at the handle address.</property>
+	  <property name="can_focus">True</property>
+	  <property name="headers_visible">True</property>
+	  <property name="rules_hint">False</property>
+	  <property name="reorderable">False</property>
+	  <property name="enable_search">True</property>
+	  <property name="fixed_height_mode">False</property>
+	  <property name="hover_selection">False</property>
+	  <property name="hover_expand">False</property>
+	  <signal name="button_press_event" handler="on_heap_button_press_event" last_modification_time="Mon, 20 Sep 2004 17:41:32 GMT"/>
+	</widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkMenu" id="dbgheap_popup">
+
+  <child>
+    <widget class="GtkMenuItem" id="view_memory1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">View _memory</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_dbgheap_view_memory1_activate" last_modification_time="Wed, 14 Nov 2007 20:33:18 GMT"/>
+      <accelerator key="G" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_heap-2.gladep b/glade/dbg_heap-2.gladep
new file mode 100644
index 0000000..dee7d63
--- /dev/null
+++ b/glade/dbg_heap-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_heap.c</handler_source_file>
+  <handler_header_file>dbg_heap.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_heap-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_heap-2.str b/glade/dbg_heap-2.str
new file mode 100644
index 0000000..af8082b
--- /dev/null
+++ b/glade/dbg_heap-2.str
@@ -0,0 +1,9 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Heap");
+gchar *s = N_("Double click rowl to open tab in the memory window at the handle address.");
+gchar *s = N_("View _memory");
diff --git a/glade/dbg_ioports-2.glade b/glade/dbg_ioports-2.glade
new file mode 100644
index 0000000..9a0c801
--- /dev/null
+++ b/glade/dbg_ioports-2.glade
@@ -0,0 +1,74 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgioports_window">
+  <property name="tooltip" translatable="yes">Show registers</property>
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">I/O ports</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgioports_window_delete_event" last_modification_time="Mon, 07 Jun 2004 08:11:10 GMT"/>
+  <signal name="window_state_event" handler="on_dbgioports_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:21:51 GMT"/>
+
+  <child>
+    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="shadow_type">GTK_SHADOW_NONE</property>
+      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+      <child>
+	<widget class="GtkTreeView" id="treeview1">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Double-click value or item to edit.</property>
+	  <property name="can_focus">True</property>
+	  <property name="headers_visible">True</property>
+	  <property name="rules_hint">False</property>
+	  <property name="reorderable">False</property>
+	  <property name="enable_search">True</property>
+	  <property name="fixed_height_mode">False</property>
+	  <property name="hover_selection">False</property>
+	  <property name="hover_expand">False</property>
+	</widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkMenu" id="dbgioports_popup">
+
+  <child>
+    <widget class="GtkRadioMenuItem" id="hex1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">_Hex</property>
+      <property name="use_underline">True</property>
+      <property name="active">False</property>
+      <signal name="activate" handler="on_hex1_activate" last_modification_time="Fri, 05 Aug 2005 21:43:00 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkRadioMenuItem" id="dec1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">_Dec</property>
+      <property name="use_underline">True</property>
+      <property name="active">False</property>
+      <signal name="activate" handler="on_dec1_activate" last_modification_time="Fri, 05 Aug 2005 21:42:52 GMT"/>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_ioports-2.gladep b/glade/dbg_ioports-2.gladep
new file mode 100644
index 0000000..c4c4c6f
--- /dev/null
+++ b/glade/dbg_ioports-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_ioports.c</handler_source_file>
+  <handler_header_file>dbg_ioports.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_ioports-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_ioports-2.str b/glade/dbg_ioports-2.str
new file mode 100644
index 0000000..08473eb
--- /dev/null
+++ b/glade/dbg_ioports-2.str
@@ -0,0 +1,11 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Show registers");
+gchar *s = N_("I/O ports");
+gchar *s = N_("Double-click value or item to edit.");
+gchar *s = N_("_Hex");
+gchar *s = N_("_Dec");
diff --git a/glade/dbg_mem-2.glade b/glade/dbg_mem-2.glade
new file mode 100644
index 0000000..b79c0d8
--- /dev/null
+++ b/glade/dbg_mem-2.glade
@@ -0,0 +1,676 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgmem_window">
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Memory</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgmem_window_delete_event" last_modification_time="Mon, 07 Jun 2004 08:10:33 GMT"/>
+  <signal name="window_state_event" handler="on_dbgmem_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:31:10 GMT"/>
+  <signal name="key_press_event" handler="on_dbgmem_key_press_event" last_modification_time="Thu, 15 Nov 2007 14:58:46 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkToolbar" id="toolbar1">
+	  <property name="visible">True</property>
+	  <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+	  <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
+	  <property name="tooltips">True</property>
+	  <property name="show_arrow">True</property>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Add tab (F1)</property>
+	      <property name="stock_id">gtk-add</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgmem_button1_clicked" object="button2" last_modification_time="Thu, 10 Jun 2004 10:32:18 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button2">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Remove tab (F2)</property>
+	      <property name="stock_id">gtk-remove</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgmem_button2_clicked" object="button2" last_modification_time="Thu, 10 Jun 2004 10:32:25 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolItem" id="toolitem1">
+	      <property name="visible">True</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+
+	      <child>
+		<widget class="GtkVSeparator" id="vseparator1">
+		  <property name="visible">True</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button3">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Up (F3)</property>
+	      <property name="stock_id">gtk-go-up</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgmem_button3_clicked" last_modification_time="Thu, 10 Jun 2004 10:32:46 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button4">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Down (F4)</property>
+	      <property name="stock_id">gtk-go-down</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgmem_button4_clicked" last_modification_time="Thu, 10 Jun 2004 10:32:39 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button5">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Refresh tab (F5)</property>
+	      <property name="stock_id">gtk-refresh</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgmem_button5_clicked" last_modification_time="Sat, 07 Aug 2004 17:25:10 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolItem" id="toolitem2">
+	      <property name="visible">True</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+
+	      <child>
+		<widget class="GtkVSeparator" id="vseparator2">
+		  <property name="visible">True</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkToolButton" id="button6">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">View memory map (F6)</property>
+	      <property name="stock_id">gtk-justify-fill</property>
+	      <property name="visible_horizontal">True</property>
+	      <property name="visible_vertical">True</property>
+	      <property name="is_important">False</property>
+	      <signal name="clicked" handler="dbgmem_button6_clicked" last_modification_time="Fri, 06 Apr 2007 16:10:08 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="expand">False</property>
+	      <property name="homogeneous">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="notebook1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
+	  <signal name="switch_page" handler="on_notebook1_switch_page" last_modification_time="Thu, 10 Jun 2004 14:16:46 GMT"/>
+	  <signal name="key_press_event" handler="on_dbgmem_key_press_event" last_modification_time="Thu, 15 Nov 2007 14:55:46 GMT"/>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="dbgmem_address">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Enter Address</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <accelerator key="Return" modifiers="0" signal="clicked"/>
+	      <accelerator key="KP_Enter" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame1">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkEntry" id="entry1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes">000000</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">HEX address</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkMenu" id="dbgmem_popup">
+
+  <child>
+    <widget class="GtkMenuItem" id="find1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Find</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_find1_activate" last_modification_time="Mon, 02 Aug 2004 14:40:43 GMT"/>
+      <accelerator key="F" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="find_next1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Find _next</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_find_next1_activate" last_modification_time="Mon, 02 Aug 2004 14:40:43 GMT"/>
+      <accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator1">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="go_to_address1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Go to _address</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_go_to_address2_activate" last_modification_time="Mon, 02 Aug 2004 14:40:43 GMT"/>
+      <accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator2">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="dissassemble1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">_Dis-assemble</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_dissassemble1_activate" last_modification_time="Mon, 02 Aug 2004 14:40:43 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="dis-assemble_(indirect)1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Dis-assemble (indirect)</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_disassemble_indirect1_activate" last_modification_time="Sat, 20 Aug 2005 13:40:17 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator3">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="view_memory1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">View _memory</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_dbgmem_view_memory1_activate" last_modification_time="Wed, 14 Nov 2007 20:50:09 GMT"/>
+      <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="dbgmem_search">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Search</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="applybutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-10</property>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox1">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image1">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-sort-ascending</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Find _Next</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-find</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <accelerator key="Return" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox2">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox2">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">5</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label3">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Find:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="entry1">
+		  <property name="visible">True</property>
+		  <property name="can_default">True</property>
+		  <property name="has_default">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="has_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label4">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Hexadecimal strings must have 2 chars per byte and can be with or without space: FE ED or FEED.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">5</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_ASCII</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Case sensitive</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_mem-2.gladep b/glade/dbg_mem-2.gladep
new file mode 100644
index 0000000..f271ecd
--- /dev/null
+++ b/glade/dbg_mem-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_mem.c</handler_source_file>
+  <handler_header_file>dbg_mem.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_mem-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_mem-2.str b/glade/dbg_mem-2.str
new file mode 100644
index 0000000..196e25f
--- /dev/null
+++ b/glade/dbg_mem-2.str
@@ -0,0 +1,28 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Memory");
+gchar *s = N_("Add tab (F1)");
+gchar *s = N_("Remove tab (F2)");
+gchar *s = N_("Up (F3)");
+gchar *s = N_("Down (F4)");
+gchar *s = N_("Refresh tab (F5)");
+gchar *s = N_("View memory map (F6)");
+gchar *s = N_("Enter Address");
+gchar *s = N_("000000");
+gchar *s = N_("HEX address");
+gchar *s = N_("Find");
+gchar *s = N_("Find _next");
+gchar *s = N_("Go to _address");
+gchar *s = N_("_Dis-assemble");
+gchar *s = N_("Dis-assemble (indirect)");
+gchar *s = N_("View _memory");
+gchar *s = N_("Search");
+gchar *s = N_("Find _Next");
+gchar *s = N_("Find:");
+gchar *s = N_("Hexadecimal strings must have 2 chars per byte and can be with or without space: FE ED or FEED.");
+gchar *s = N_("_ASCII");
+gchar *s = N_("_Case sensitive");
diff --git a/glade/dbg_pclog-2.glade b/glade/dbg_pclog-2.glade
new file mode 100644
index 0000000..a747b6d
--- /dev/null
+++ b/glade/dbg_pclog-2.glade
@@ -0,0 +1,40 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgpclog_window">
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">PC trace</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgpclog_window_delete_event" last_modification_time="Wed, 30 Jun 2004 12:57:10 GMT"/>
+  <signal name="window_state_event" handler="on_dbgpclog_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:30:16 GMT"/>
+
+  <child>
+    <widget class="GtkTreeView" id="treeview1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Double-click the row to disassemble.</property>
+      <property name="can_focus">True</property>
+      <property name="headers_visible">False</property>
+      <property name="rules_hint">False</property>
+      <property name="reorderable">False</property>
+      <property name="enable_search">True</property>
+      <property name="fixed_height_mode">False</property>
+      <property name="hover_selection">False</property>
+      <property name="hover_expand">False</property>
+      <signal name="button_press_event" handler="on_pclog_button_press_event" last_modification_time="Mon, 20 Sep 2004 17:41:32 GMT"/>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_pclog-2.gladep b/glade/dbg_pclog-2.gladep
new file mode 100644
index 0000000..7849d66
--- /dev/null
+++ b/glade/dbg_pclog-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_pclog.c</handler_source_file>
+  <handler_header_file>dbg_pclog.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_pclog-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_pclog-2.str b/glade/dbg_pclog-2.str
new file mode 100644
index 0000000..202d9d7
--- /dev/null
+++ b/glade/dbg_pclog-2.str
@@ -0,0 +1,8 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("PC trace");
+gchar *s = N_("Double-click the row to disassemble.");
diff --git a/glade/dbg_regs-2.glade b/glade/dbg_regs-2.glade
new file mode 100644
index 0000000..5db5420
--- /dev/null
+++ b/glade/dbg_regs-2.glade
@@ -0,0 +1,2411 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgregs_window">
+  <property name="tooltip" translatable="yes">Show registers</property>
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Registers</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgregs_window_delete_event" last_modification_time="Mon, 07 Jun 2004 08:11:10 GMT"/>
+  <signal name="window_state_event" handler="on_dbgregs_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:21:51 GMT"/>
+
+  <child>
+    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="shadow_type">GTK_SHADOW_NONE</property>
+      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+      <child>
+	<widget class="GtkTreeView" id="treeview1">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Double-click value or item to edit.</property>
+	  <property name="can_focus">True</property>
+	  <property name="headers_visible">True</property>
+	  <property name="rules_hint">False</property>
+	  <property name="reorderable">False</property>
+	  <property name="enable_search">True</property>
+	  <property name="fixed_height_mode">False</property>
+	  <property name="hover_selection">False</property>
+	  <property name="hover_expand">False</property>
+	  <signal name="button_press_event" handler="on_treeview3_button_press_event" last_modification_time="Mon, 02 Aug 2004 17:19:02 GMT"/>
+	</widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkMenu" id="dbgregs_popup">
+
+  <child>
+    <widget class="GtkMenuItem" id="go_to_address1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">View _memory</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_go_to_address4_activate" last_modification_time="Mon, 02 Aug 2004 17:39:14 GMT"/>
+      <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="dbgsr_window">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Status Register</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table1">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">2</property>
+	  <property name="n_columns">17</property>
+	  <property name="homogeneous">True</property>
+	  <property name="row_spacing">0</property>
+	  <property name="column_spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">T</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label2">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label3">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">S</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">2</property>
+	      <property name="right_attach">3</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label4">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">3</property>
+	      <property name="right_attach">4</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label5">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">4</property>
+	      <property name="right_attach">5</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label6">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">I2</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">5</property>
+	      <property name="right_attach">6</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label7">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">I1</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">6</property>
+	      <property name="right_attach">7</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label9">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">9</property>
+	      <property name="right_attach">10</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label10">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">10</property>
+	      <property name="right_attach">11</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label11">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">11</property>
+	      <property name="right_attach">12</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label12">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">X</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">12</property>
+	      <property name="right_attach">13</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label13">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">N</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">13</property>
+	      <property name="right_attach">14</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label14">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Z</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">14</property>
+	      <property name="right_attach">15</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label15">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">V</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">15</property>
+	      <property name="right_attach">16</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label16">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">C</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">16</property>
+	      <property name="right_attach">17</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label8">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">I0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">7</property>
+	      <property name="right_attach">8</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVSeparator" id="vseparator2">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">8</property>
+	      <property name="right_attach">9</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVSeparator" id="vseparator3">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">8</property>
+	      <property name="right_attach">9</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton16">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton15">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton14">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">2</property>
+	      <property name="right_attach">3</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton13">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">3</property>
+	      <property name="right_attach">4</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton12">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">4</property>
+	      <property name="right_attach">5</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton11">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">5</property>
+	      <property name="right_attach">6</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton10">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">6</property>
+	      <property name="right_attach">7</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton9">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">7</property>
+	      <property name="right_attach">8</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton8">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">9</property>
+	      <property name="right_attach">10</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton7">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">10</property>
+	      <property name="right_attach">11</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton6">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">11</property>
+	      <property name="right_attach">12</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton5">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">12</property>
+	      <property name="right_attach">13</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton4">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">13</property>
+	      <property name="right_attach">14</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton3">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">14</property>
+	      <property name="right_attach">15</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">15</property>
+	      <property name="right_attach">16</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_checkbutton1_toggled" last_modification_time="Tue, 03 Aug 2004 20:24:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">16</property>
+	      <property name="right_attach">17</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="dbgregs2_window">
+  <property name="tooltip" translatable="yes">Show registers</property>
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Registers</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgregs_window_delete_event" last_modification_time="Mon, 07 Jun 2004 08:11:10 GMT"/>
+  <signal name="window_state_event" handler="on_dbgregs_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:21:51 GMT"/>
+
+  <child>
+    <widget class="GtkTable" id="table2">
+      <property name="visible">True</property>
+      <property name="n_rows">13</property>
+      <property name="n_columns">5</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">0</property>
+
+      <child>
+	<widget class="GtkHSeparator" id="hseparator1">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">8</property>
+	  <property name="bottom_attach">9</property>
+	  <property name="x_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label11">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D1=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label12">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D2=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label13">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D3=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label14">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D4=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label15">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D5=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label16">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D6=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label17">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D7=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label20">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A0=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label21">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A1=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label22">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A2=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label23">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A3=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label24">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A4=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label25">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A5=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label26">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A6=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label27">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">A7=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry10">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label10" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label10" last_modification_time="Wed, 14 Nov 2007 16:38:36 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry11">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label10" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label11" last_modification_time="Wed, 14 Nov 2007 16:38:36 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry12">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label12" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label12" last_modification_time="Wed, 14 Nov 2007 16:40:15 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry13">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label13" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label13" last_modification_time="Wed, 14 Nov 2007 16:40:27 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry15">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label15" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label15" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry16">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label16" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label16" last_modification_time="Wed, 14 Nov 2007 16:41:05 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry17">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label17" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label17" last_modification_time="Wed, 14 Nov 2007 16:41:14 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry20">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label20" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label20" last_modification_time="Wed, 14 Nov 2007 16:41:49 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry21">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label21" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label21" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry22">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label22" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label22" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry23">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label23" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label23" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry24">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label24" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label24" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry25">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label25" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label25" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry26">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label26" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label26" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry27">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label27" last_modification_time="Thu, 05 Jul 2007 08:10:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label27" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label31">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">USP=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 09:10:43 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">9</property>
+	  <property name="bottom_attach">10</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label32">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">SSP=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 09:10:59 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Wed, 14 Nov 2007 16:40:55 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">9</property>
+	  <property name="bottom_attach">10</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVSeparator" id="vseparator4">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options"></property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label33">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">PC=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 09:11:15 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">10</property>
+	  <property name="bottom_attach">11</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVSeparator" id="vseparator5">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">9</property>
+	  <property name="bottom_attach">11</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label34">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">SR=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">3</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">10</property>
+	  <property name="bottom_attach">11</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry32">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">123456</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">6</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label32" last_modification_time="Thu, 05 Jul 2007 08:38:50 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label32" last_modification_time="Wed, 14 Nov 2007 16:43:27 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">9</property>
+	  <property name="bottom_attach">10</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry31">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">123456</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">6</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label31" last_modification_time="Thu, 05 Jul 2007 08:38:28 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label31" last_modification_time="Wed, 14 Nov 2007 16:41:28 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">9</property>
+	  <property name="bottom_attach">10</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry33">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">123456</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">6</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label33" last_modification_time="Thu, 05 Jul 2007 08:39:03 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label33" last_modification_time="Wed, 14 Nov 2007 16:41:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">10</property>
+	  <property name="bottom_attach">11</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry34">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">1234</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">4</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label34" last_modification_time="Thu, 05 Jul 2007 08:39:18 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label34" last_modification_time="Wed, 14 Nov 2007 16:43:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">4</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">10</property>
+	  <property name="bottom_attach">11</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHSeparator" id="hseparator2">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">11</property>
+	  <property name="bottom_attach">12</property>
+	  <property name="x_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table3">
+	  <property name="visible">True</property>
+	  <property name="n_rows">2</property>
+	  <property name="n_columns">5</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">0</property>
+	  <property name="column_spacing">0</property>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton52">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">N</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Thu, 05 Jul 2007 07:55:04 GMT"/>
+	      <accelerator key="N" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton53">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Z</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Thu, 05 Jul 2007 07:55:16 GMT"/>
+	      <accelerator key="Z" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">2</property>
+	      <property name="right_attach">3</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton54">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">V</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Thu, 05 Jul 2007 07:55:27 GMT"/>
+	      <accelerator key="V" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">3</property>
+	      <property name="right_attach">4</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton55">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">C</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Thu, 05 Jul 2007 07:55:39 GMT"/>
+	      <accelerator key="C" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">4</property>
+	      <property name="right_attach">5</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton41">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">T</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	      <accelerator key="T" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton42">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">S</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	      <accelerator key="S" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton51">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">X</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_dbgregs_checkbutton_toggled" last_modification_time="Wed, 04 Jul 2007 21:14:37 GMT"/>
+	      <accelerator key="X" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label44">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">I=</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">3</property>
+	      <property name="right_attach">4</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="spinbutton44">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">1 0 7 1 0 0</property>
+	      <signal name="changed" handler="on_dbgregs_spinbutton_changed" last_modification_time="Wed, 04 Jul 2007 21:14:53 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">4</property>
+	      <property name="right_attach">5</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">5</property>
+	  <property name="top_attach">12</property>
+	  <property name="bottom_attach">13</property>
+	  <property name="x_options"></property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="entry14">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">12345678</property>
+	  <property name="has_frame">False</property>
+	  <property name="invisible_char">*</property>
+	  <property name="activates_default">False</property>
+	  <property name="width_chars">8</property>
+	  <signal name="key_press_event" handler="on_dbgregs_key_press_event" object="label14" last_modification_time="Thu, 05 Jul 2007 08:35:54 GMT"/>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" object="label14" last_modification_time="Wed, 14 Nov 2007 16:40:42 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label10">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">D0=</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">True</property>
+	  <property name="xalign">1</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	  <signal name="button_press_event" handler="on_dbgregs_button_press_event" last_modification_time="Thu, 05 Jul 2007 08:45:38 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_regs-2.gladep b/glade/dbg_regs-2.gladep
new file mode 100644
index 0000000..2fdf4e4
--- /dev/null
+++ b/glade/dbg_regs-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_regs.c</handler_source_file>
+  <handler_header_file>dbg_regs.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_regs-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_regs-2.str b/glade/dbg_regs-2.str
new file mode 100644
index 0000000..4e4eaec
--- /dev/null
+++ b/glade/dbg_regs-2.str
@@ -0,0 +1,77 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Show registers");
+gchar *s = N_("Registers");
+gchar *s = N_("Double-click value or item to edit.");
+gchar *s = N_("View _memory");
+gchar *s = N_("Status Register");
+gchar *s = N_("T");
+gchar *s = N_("0");
+gchar *s = N_("S");
+gchar *s = N_("0");
+gchar *s = N_("0");
+gchar *s = N_("I2");
+gchar *s = N_("I1");
+gchar *s = N_("0");
+gchar *s = N_("0");
+gchar *s = N_("0");
+gchar *s = N_("X");
+gchar *s = N_("N");
+gchar *s = N_("Z");
+gchar *s = N_("V");
+gchar *s = N_("C");
+gchar *s = N_("I0");
+gchar *s = N_("Show registers");
+gchar *s = N_("Registers");
+gchar *s = N_("D1=");
+gchar *s = N_("D2=");
+gchar *s = N_("D3=");
+gchar *s = N_("D4=");
+gchar *s = N_("D5=");
+gchar *s = N_("D6=");
+gchar *s = N_("D7=");
+gchar *s = N_("A0=");
+gchar *s = N_("A1=");
+gchar *s = N_("A2=");
+gchar *s = N_("A3=");
+gchar *s = N_("A4=");
+gchar *s = N_("A5=");
+gchar *s = N_("A6=");
+gchar *s = N_("A7=");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("12345678");
+gchar *s = N_("USP=");
+gchar *s = N_("SSP=");
+gchar *s = N_("PC=");
+gchar *s = N_("SR=");
+gchar *s = N_("123456");
+gchar *s = N_("123456");
+gchar *s = N_("123456");
+gchar *s = N_("1234");
+gchar *s = N_("N");
+gchar *s = N_("Z");
+gchar *s = N_("V");
+gchar *s = N_("C");
+gchar *s = N_("T");
+gchar *s = N_("S");
+gchar *s = N_("X");
+gchar *s = N_("I=");
+gchar *s = N_("12345678");
+gchar *s = N_("D0=");
diff --git a/glade/dbg_stack-2.glade b/glade/dbg_stack-2.glade
new file mode 100644
index 0000000..d52e1dc
--- /dev/null
+++ b/glade/dbg_stack-2.glade
@@ -0,0 +1,221 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="dbgstack_window">
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Stack</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <signal name="delete_event" handler="on_dbgstack_window_delete_event" last_modification_time="Tue, 03 Aug 2004 17:32:53 GMT"/>
+  <signal name="window_state_event" handler="on_dbgstack_window_state_event" last_modification_time="Sun, 27 Feb 2005 08:34:26 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="hbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">A7 (stack) is:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">5</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label2">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">USP</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="notebook1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="treeview1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">False</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	      <property name="fixed_height_mode">False</property>
+	      <property name="hover_selection">False</property>
+	      <property name="hover_expand">False</property>
+	      <signal name="key_press_event" handler="on_dbgstack_key_press_event" last_modification_time="Thu, 18 Nov 2004 21:52:46 GMT"/>
+	      <signal name="button_press_event" handler="on_dbgstack_button_press_event" last_modification_time="Wed, 14 Nov 2007 20:56:53 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label3">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">A7 (stack)</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_NONE</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkTreeView" id="treeview2">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="headers_visible">True</property>
+		  <property name="rules_hint">False</property>
+		  <property name="reorderable">False</property>
+		  <property name="enable_search">True</property>
+		  <property name="fixed_height_mode">False</property>
+		  <property name="hover_selection">False</property>
+		  <property name="hover_expand">False</property>
+		  <signal name="key_press_event" handler="on_dbgstack_key_press_event" last_modification_time="Thu, 18 Nov 2004 21:52:55 GMT"/>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label4">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">A6 (frame)</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkMenu" id="dbgstack_popup">
+
+  <child>
+    <widget class="GtkMenuItem" id="view_memory1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">View _memory</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_dbgstack_view_memory1_activate" last_modification_time="Wed, 14 Nov 2007 20:56:10 GMT"/>
+      <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_stack-2.gladep b/glade/dbg_stack-2.gladep
new file mode 100644
index 0000000..933f660
--- /dev/null
+++ b/glade/dbg_stack-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_stack.c</handler_source_file>
+  <handler_header_file>dbg_stack.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_stack-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_stack-2.str b/glade/dbg_stack-2.str
new file mode 100644
index 0000000..a15fbcd
--- /dev/null
+++ b/glade/dbg_stack-2.str
@@ -0,0 +1,12 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Stack");
+gchar *s = N_("A7 (stack) is:");
+gchar *s = N_("USP");
+gchar *s = N_("A7 (stack)");
+gchar *s = N_("A6 (frame)");
+gchar *s = N_("View _memory");
diff --git a/glade/dbg_vectors-2.glade b/glade/dbg_vectors-2.glade
new file mode 100644
index 0000000..e5577c2
--- /dev/null
+++ b/glade/dbg_vectors-2.glade
@@ -0,0 +1,102 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="dbgvectors_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Add Vector Breakpoint</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">320</property>
+  <property name="default_height">120</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="treeview1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">False</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	      <property name="fixed_height_mode">False</property>
+	      <property name="hover_selection">False</property>
+	      <property name="hover_expand">False</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dbg_vectors-2.gladep b/glade/dbg_vectors-2.gladep
new file mode 100644
index 0000000..aa22f77
--- /dev/null
+++ b/glade/dbg_vectors-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dbg_vectors.c</handler_source_file>
+  <handler_header_file>dbg_vectors.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dbg_vectors-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dbg_vectors-2.str b/glade/dbg_vectors-2.str
new file mode 100644
index 0000000..fa9915f
--- /dev/null
+++ b/glade/dbg_vectors-2.str
@@ -0,0 +1,7 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Add Vector Breakpoint");
diff --git a/glade/dboxes-2.glade b/glade/dboxes-2.glade
new file mode 100644
index 0000000..7386665
--- /dev/null
+++ b/glade/dboxes-2.glade
@@ -0,0 +1,125 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="entry_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Title</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame1">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox1">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkEntry" id="entry1">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label10">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Name:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/dboxes-2.gladep b/glade/dboxes-2.gladep
new file mode 100644
index 0000000..a0c5da0
--- /dev/null
+++ b/glade/dboxes-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade</name>
+  <program_name>glade</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>dboxes.c</handler_source_file>
+  <handler_header_file>dboxes.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>dboxes-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/dboxes-2.str b/glade/dboxes-2.str
new file mode 100644
index 0000000..6aa5f01
--- /dev/null
+++ b/glade/dboxes-2.str
@@ -0,0 +1,9 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Title");
+gchar *s = N_("*");
+gchar *s = N_("Name:");
diff --git a/glade/device-2.glade b/glade/device-2.glade
new file mode 100644
index 0000000..acdacc7
--- /dev/null
+++ b/glade/device-2.glade
@@ -0,0 +1,325 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="device_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Communication Settings</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <accelerator key="Return" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame14">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkTable" id="table5">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">4</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">5</property>
+	      <property name="column_spacing">10</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label9">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Cable:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label10">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Port:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label12">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Timeout:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label13">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Delay:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="spinbutton_comm_timeout">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">False</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">10 1 600 1 10 10</property>
+		  <signal name="changed" handler="comm_spinbutton_timeout_changed" object="spinbutton_comm_timeout" last_modification_time="Mon, 05 Apr 2004 19:01:19 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="spinbutton_comm_delay">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">False</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">10 1 50 1 10 10</property>
+		  <signal name="changed" handler="comm_spinbutton_delay_changed" object="spinbutton_comm_delay" last_modification_time="Mon, 05 Apr 2004 19:01:42 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkComboBox" id="combobox2">
+		  <property name="visible">True</property>
+		  <property name="items" translatable="yes">None
+#1
+#2
+#3
+#4</property>
+		  <property name="add_tearoffs">True</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="changed" handler="on_device_combobox2_changed" last_modification_time="Fri, 08 May 2009 17:08:34 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkComboBox" id="combobox1">
+		  <property name="visible">True</property>
+		  <property name="items" translatable="yes">None
+GrayLink
+BlackLink
+Parallel
+SilverLink
+DirectLink
+VTi
+TiEmu
+internal</property>
+		  <property name="add_tearoffs">False</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="changed" handler="on_device_combobox1_changed" last_modification_time="Fri, 08 May 2009 17:08:43 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label8">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Settings</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/device-2.gladep b/glade/device-2.gladep
new file mode 100644
index 0000000..2b5124c
--- /dev/null
+++ b/glade/device-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade</name>
+  <program_name>glade</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>comm.c</handler_source_file>
+  <handler_header_file>comm.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>comm-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/device-2.str b/glade/device-2.str
new file mode 100644
index 0000000..e1baa0a
--- /dev/null
+++ b/glade/device-2.str
@@ -0,0 +1,37 @@
+
+
+gchar *s = N_("Communication Settings");
+gchar *s = N_("_Auto-detect");
+gchar *s = N_("Cable:");
+gchar *s = N_("Port:");
+gchar *s = N_("Calc:");
+gchar *s = N_("Timeout:");
+gchar *s = N_("Delay:");
+gchar *s = N_("GrayLink");
+gchar *s = N_("BlackLink");
+gchar *s = N_("SilverLink");
+gchar *s = N_("ParallelLink");
+gchar *s = N_("VTi");
+gchar *s = N_("TiEmu");
+gchar *s = N_("virtual");
+gchar *s = N_("null");
+gchar *s = N_("custom");
+gchar *s = N_("#1");
+gchar *s = N_("#2");
+gchar *s = N_("#3");
+gchar *s = N_("#4");
+gchar *s = N_("null");
+gchar *s = N_("TI73");
+gchar *s = N_("TI82");
+gchar *s = N_("TI83");
+gchar *s = N_("TI83+");
+gchar *s = N_("TI84+");
+gchar *s = N_("TI85");
+gchar *s = N_("TI86");
+gchar *s = N_("TI89");
+gchar *s = N_("TI89 Titanium");
+gchar *s = N_("TI92");
+gchar *s = N_("TI92+");
+gchar *s = N_("V200PLT");
+gchar *s = N_("Settings");
+gchar *s = N_("Have a problem ? Check out the log:");
diff --git a/glade/infos-2.glade b/glade/infos-2.glade
new file mode 100644
index 0000000..70dff8b
--- /dev/null
+++ b/glade/infos-2.glade
@@ -0,0 +1,591 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="infos_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Infos...</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table2">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">10</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">4</property>
+	  <property name="column_spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label10">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Skin version:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label11">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Skin name:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label12">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Skin author:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label14">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Version:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">5</property>
+	      <property name="bottom_attach">6</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label15">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">RAM size:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">6</property>
+	      <property name="bottom_attach">7</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label16">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">ROM size:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">7</property>
+	      <property name="bottom_attach">8</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label17">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">ROM type:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">8</property>
+	      <property name="bottom_attach">9</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label20">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">VTi/TiEmu</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label21">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Default TI-92</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label22">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Julien Blache</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label23">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">TI92</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label24">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">1.11</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">5</property>
+	      <property name="bottom_attach">6</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label25">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">128KB</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">6</property>
+	      <property name="bottom_attach">7</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label26">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">2MB</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">7</property>
+	      <property name="bottom_attach">8</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label27">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">external ROM</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">8</property>
+	      <property name="bottom_attach">9</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label13">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Calc type:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label18">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Hardware:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">9</property>
+	      <property name="bottom_attach">10</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label28">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">HW1</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">9</property>
+	      <property name="bottom_attach">10</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator1">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/infos-2.gladep b/glade/infos-2.gladep
new file mode 100644
index 0000000..df545b9
--- /dev/null
+++ b/glade/infos-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>infos.c</handler_source_file>
+  <handler_header_file>infos.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>infos-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/infos-2.str b/glade/infos-2.str
new file mode 100644
index 0000000..4e41b84
--- /dev/null
+++ b/glade/infos-2.str
@@ -0,0 +1,25 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Infos...");
+gchar *s = N_("Skin version:");
+gchar *s = N_("Skin name:");
+gchar *s = N_("Skin author:");
+gchar *s = N_("Version:");
+gchar *s = N_("RAM size:");
+gchar *s = N_("ROM size:");
+gchar *s = N_("ROM type:");
+gchar *s = N_("VTi/TiEmu");
+gchar *s = N_("Default TI-92");
+gchar *s = N_("Julien Blache");
+gchar *s = N_("TI92");
+gchar *s = N_("1.11");
+gchar *s = N_("128KB");
+gchar *s = N_("2MB");
+gchar *s = N_("external ROM");
+gchar *s = N_("Calc type:");
+gchar *s = N_("Hardware:");
+gchar *s = N_("HW1");
diff --git a/glade/log_link-2.glade b/glade/log_link-2.glade
new file mode 100644
index 0000000..2f73e23
--- /dev/null
+++ b/glade/log_link-2.glade
@@ -0,0 +1,534 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="linklog_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Link Log</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="button9">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="on_button9_clicked" last_modification_time="Sun, 24 Sep 2006 21:28:26 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox6">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image186">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-save</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label8">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Save</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button10">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="on_button10_clicked" object="spinbutton1" last_modification_time="Sun, 24 Sep 2006 21:28:31 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment2">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox7">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image187">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-media-play</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label9">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Start</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button11">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="on_button11_clicked" object="textview1" last_modification_time="Sun, 24 Sep 2006 21:28:35 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment3">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox8">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image188">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-clear</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label10">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Clear</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button12">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="on_button12_clicked" object="linklog_dbox" last_modification_time="Sun, 24 Sep 2006 21:28:40 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment4">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox9">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image189">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-close</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label11">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Close</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox2">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox10">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">5</property>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton1">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Send</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="ll_checkbutton1_toggled" last_modification_time="Sun, 24 Sep 2006 21:31:53 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton2">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Receive</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="ll_checkbutton2_toggled" last_modification_time="Sun, 24 Sep 2006 21:31:58 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox11">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">5</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label12">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Buffer size: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="spinbutton1">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">64 64 4194304 1 16 128</property>
+		      <signal name="changed" handler="ll_spinbutton1_changed" last_modification_time="Tue, 26 Sep 2006 06:15:38 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label13">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">KB</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkTextView" id="textview1">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">False</property>
+		  <property name="overwrite">False</property>
+		  <property name="accepts_tab">True</property>
+		  <property name="justification">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap_mode">GTK_WRAP_NONE</property>
+		  <property name="cursor_visible">False</property>
+		  <property name="pixels_above_lines">0</property>
+		  <property name="pixels_below_lines">0</property>
+		  <property name="pixels_inside_wrap">0</property>
+		  <property name="left_margin">0</property>
+		  <property name="right_margin">0</property>
+		  <property name="indent">0</property>
+		  <property name="text" translatable="yes"></property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/log_link-2.gladep b/glade/log_link-2.gladep
new file mode 100644
index 0000000..f8049c7
--- /dev/null
+++ b/glade/log_link-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>log_link.c</handler_source_file>
+  <handler_header_file>log_link.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>log_link-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/log_link-2.str b/glade/log_link-2.str
new file mode 100644
index 0000000..d2ff618
--- /dev/null
+++ b/glade/log_link-2.str
@@ -0,0 +1,15 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Link Log");
+gchar *s = N_("Save");
+gchar *s = N_("Start");
+gchar *s = N_("Clear");
+gchar *s = N_("Close");
+gchar *s = N_("_Send");
+gchar *s = N_("_Receive");
+gchar *s = N_("Buffer size: ");
+gchar *s = N_("KB");
diff --git a/glade/manpage-2.glade b/glade/manpage-2.glade
new file mode 100644
index 0000000..9ce912b
--- /dev/null
+++ b/glade/manpage-2.glade
@@ -0,0 +1,87 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="manpage_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Page of Manual</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">640</property>
+  <property name="default_height">480</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow1">
+	  <property name="border_width">7</property>
+	  <property name="visible">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_IN</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTextView" id="textview1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">False</property>
+	      <property name="justification">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap_mode">GTK_WRAP_WORD</property>
+	      <property name="cursor_visible">True</property>
+	      <property name="pixels_above_lines">0</property>
+	      <property name="pixels_below_lines">0</property>
+	      <property name="pixels_inside_wrap">0</property>
+	      <property name="left_margin">0</property>
+	      <property name="right_margin">0</property>
+	      <property name="indent">0</property>
+	      <property name="text" translatable="yes">Cannot find the manpage file.</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/manpage-2.gladep b/glade/manpage-2.gladep
new file mode 100644
index 0000000..f3fbf33
--- /dev/null
+++ b/glade/manpage-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade</name>
+  <program_name>glade</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>manpage.c</handler_source_file>
+  <handler_header_file>manpage.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>manpage-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/pbars-2.glade b/glade/pbars-2.glade
new file mode 100644
index 0000000..8c27ca0
--- /dev/null
+++ b/glade/pbars-2.glade
@@ -0,0 +1,863 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="pbar1_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Title 1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox6">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area6">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="pressed" handler="on_pbar_okbutton1_pressed" last_modification_time="Sun, 16 Feb 2003 13:08:26 GMT"/>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label10">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Transfer status:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkProgressBar" id="progressbar10">
+	      <property name="visible">True</property>
+	      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	      <property name="fraction">0</property>
+	      <property name="pulse_step">0.10000000149</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator1">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label11">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Rate: 0.00 Kb/s</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="pbar2_dbox">
+  <property name="width_request">160</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Title 2</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox7">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area7">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="pressed" handler="on_pbar_okbutton1_pressed" last_modification_time="Sun, 16 Feb 2003 13:08:42 GMT"/>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label20">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Message.</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_FILL</property>
+	  <property name="wrap">True</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">5</property>
+	  <property name="ypad">5</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="pbar3_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Title 3</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox8">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area8">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton3">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="pressed" handler="on_pbar_okbutton1_pressed" last_modification_time="Sun, 16 Feb 2003 13:08:54 GMT"/>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox2">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label30">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Total transfer:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkProgressBar" id="progressbar30">
+	      <property name="visible">True</property>
+	      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	      <property name="fraction">0</property>
+	      <property name="pulse_step">0.10000000149</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label31">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Current transfer:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkProgressBar" id="progressbar31">
+	      <property name="visible">True</property>
+	      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	      <property name="fraction">0</property>
+	      <property name="pulse_step">0.10000000149</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator2">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label32">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Rate: 0.0 Kbytes/s</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="pbar4_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Title 4</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox9">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area9">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton4">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="pressed" handler="on_pbar_okbutton1_pressed" last_modification_time="Sun, 16 Feb 2003 13:09:05 GMT"/>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox3">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label40">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Current transfer:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkProgressBar" id="progressbar40">
+	      <property name="visible">True</property>
+	      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	      <property name="fraction">0</property>
+	      <property name="pulse_step">0.10000000149</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox2">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label41">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">1/1: </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label42">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Text</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">5</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator3">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label43">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Rate: 0.0 Kbytes/s</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="pbar5_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Title 5</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox10">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area10">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton5">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="pressed" handler="on_pbar_okbutton1_pressed" last_modification_time="Sun, 16 Feb 2003 13:09:16 GMT"/>
+	      <accelerator key="Escape" modifiers="0" signal="clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox4">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label50">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Total transfer:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkProgressBar" id="progressbar50">
+	      <property name="visible">True</property>
+	      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	      <property name="fraction">0</property>
+	      <property name="pulse_step">0.10000000149</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label51">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Current transfer:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkProgressBar" id="progressbar51">
+	      <property name="visible">True</property>
+	      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	      <property name="fraction">0</property>
+	      <property name="pulse_step">0.10000000149</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox1">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label52">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">1/1: </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label53">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Text</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">5</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator4">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label54">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Rate: 0.0 Kbytes/s</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/pbars-2.gladep b/glade/pbars-2.gladep
new file mode 100644
index 0000000..c9d7b1a
--- /dev/null
+++ b/glade/pbars-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade</name>
+  <program_name>glade</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>pbars.c</handler_source_file>
+  <handler_header_file>pbars.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>pbars-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/pbars-2.str b/glade/pbars-2.str
new file mode 100644
index 0000000..f1b0a03
--- /dev/null
+++ b/glade/pbars-2.str
@@ -0,0 +1,26 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Title 1");
+gchar *s = N_("Transfer status:");
+gchar *s = N_("Rate: 0.00 Kb/s");
+gchar *s = N_("Title 2");
+gchar *s = N_("Message.");
+gchar *s = N_("Title 3");
+gchar *s = N_("Total transfer:");
+gchar *s = N_("Current transfer:");
+gchar *s = N_("Rate: 0.0 Kbytes/s");
+gchar *s = N_("Title 4");
+gchar *s = N_("Current transfer:");
+gchar *s = N_("1/1: ");
+gchar *s = N_("Text");
+gchar *s = N_("Rate: 0.0 Kbytes/s");
+gchar *s = N_("Title 5");
+gchar *s = N_("Total transfer:");
+gchar *s = N_("Current transfer:");
+gchar *s = N_("1/1: ");
+gchar *s = N_("Text");
+gchar *s = N_("Rate: 0.0 Kbytes/s");
diff --git a/glade/popup-2.glade b/glade/popup-2.glade
new file mode 100644
index 0000000..b961399
--- /dev/null
+++ b/glade/popup-2.glade
@@ -0,0 +1,727 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkMenu" id="popup_menu">
+  <property name="visible">True</property>
+  <property name="events">GDK_KEY_PRESS_MASK</property>
+  <accelerator key="Escape" modifiers="0" signal="cancel"/>
+
+  <child>
+    <widget class="GtkCheckMenuItem" id="popup_menu_header">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Welcome to TiEmu 3</property>
+      <property name="label" translatable="yes">TiEmu Menu</property>
+      <property name="use_underline">True</property>
+      <property name="active">False</property>
+      <signal name="activate" handler="on_popup_menu_header"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator10">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="send_file_to_tiemu1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Send the selected file to the emulator. This file can be of any type (single, group, backup, FLASH app or FLASH OS).</property>
+      <property name="label" translatable="yes">_Send file to TiEmu...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_send_file_to_tiemu1_activate" last_modification_time="Sun, 24 Apr 2005 17:00:05 GMT"/>
+      <accelerator key="F10" modifiers="0" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="debug_file_with_tiemu1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">_Debug file with TiEmu...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_debug_file_with_tiemu1_activate" last_modification_time="Thu, 07 Apr 2005 15:54:54 GMT"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="link1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">_Link</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="link1_menu">
+
+	  <child>
+	    <widget class="GtkMenuItem" id="link_cable1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Do the link cable setup.</property>
+	      <property name="label" translatable="yes">_Settings...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_link_cable1_activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="quick_send1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Quick-send...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_quick_send1_activate" last_modification_time="Tue, 05 Dec 2006 21:23:11 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckMenuItem" id="recv_file_from_tiemu1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Listen for files sent from TiEmu. Uncheck it if you are running program which use the linkport for sound.</property>
+	      <property name="label" translatable="yes">_Listen for files</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">True</property>
+	      <signal name="activate" handler="on_recv_file_from_tiemu1_activate" last_modification_time="Sun, 24 Apr 2005 17:00:05 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckMenuItem" id="emulate_sound1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Emulate sound</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <signal name="activate" handler="on_emulate_sound1_activate" last_modification_time="Wed, 20 Jun 2007 05:38:10 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator11">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="config1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Configuration</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="config1_menu">
+
+	  <child>
+	    <widget class="GtkMenuItem" id="save_config1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Save the actual configuration into a text file.</property>
+	      <property name="label" translatable="yes">_Save config...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_save_config1_activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="load_config1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Load the configuration previously saved.</property>
+	      <property name="label" translatable="yes">_Load config...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_load_config1_activate"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="calculator_state1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Calculator state</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="calculator_state1_menu">
+
+	  <child>
+	    <widget class="GtkMenuItem" id="revert_to_saved_state1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Reload the previously saved state.</property>
+	      <property name="label" translatable="yes">_Revert to saved state</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_revert_to_saved_state1_activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="load_state_image1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Load the calculator state from file.</property>
+	      <property name="label" translatable="yes">_Load state image...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_load_state_image1_activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSeparatorMenuItem" id="séparateur1">
+	      <property name="visible">True</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="save_state_image1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Save the calculator state into a file (called state image).</property>
+	      <property name="label" translatable="yes">_Save state image...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_save_state_image1_activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="exit1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Do a 'save state image' and exits.</property>
+	      <property name="label" translatable="yes">_Exit and save state</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_exit_and_save_state1_activate" last_modification_time="Fri, 14 May 2004 15:30:18 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator20">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="enter_debugger1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Go into the debugger.</property>
+      <property name="label" translatable="yes">_Enter debugger...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_enter_debugger1_activate"/>
+      <accelerator key="F11" modifiers="0" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="reset_calc1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Reset the calculator.</property>
+      <property name="label" translatable="yes">_Reset calc</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_reset_calc1_activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator12">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="upgrade_calc1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Load a FLASH upgrade into the FLASH memory of the calculator.</property>
+      <property name="label" translatable="yes">_Upgrade calc</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_upgrade_calc1_activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="set_rom1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Import and/or set an image to emulate.</property>
+      <property name="label" translatable="yes">Set R_OM (image/upgrade)</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_set_rom1_activate"/>
+      <accelerator key="F12" modifiers="0" signal="activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator12">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="emulator_options1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Emulator options</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="emulator_options1_menu">
+
+	  <child>
+	    <widget class="GtkCheckMenuItem" id="restrict1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Run the calculator at its default speed (default) or at the maximum the computer can do.</property>
+	      <property name="label" translatable="yes">_Restrict to actual speed</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">True</property>
+	      <signal name="activate" handler="on_restrict_to_actual_speed1_activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckMenuItem" id="hw_protection1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Enable/disable hardware protection. Please note you will have to restart the emulator or select an image for changes to take effect.</property>
+	      <property name="label" translatable="yes">H_W protection</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <signal name="activate" handler="on_hw_protection1_activate" last_modification_time="Mon, 14 Mar 2005 14:04:45 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSeparatorMenuItem" id="separator22">
+	      <property name="visible">True</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioMenuItem" id="high_lcd_update1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_High LCD update</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <signal name="activate" handler="on_high_lcd_update1_activate" last_modification_time="Wed, 11 May 2005 14:16:04 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioMenuItem" id="med_lcd_update1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Med LCD update</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">True</property>
+	      <property name="group">high_lcd_update1</property>
+	      <signal name="activate" handler="on_med_lcd_update1_activate" last_modification_time="Wed, 11 May 2005 14:21:37 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioMenuItem" id="low_lcd_update1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">L_ow LCD update</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <property name="group">high_lcd_update1</property>
+	      <signal name="activate" handler="on_low_lcd_update1_activate" last_modification_time="Wed, 11 May 2005 14:16:04 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSeparatorMenuItem" id="séparateur2">
+	      <property name="visible">True</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioMenuItem" id="normal_view1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Normal view (x1)</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">True</property>
+	      <signal name="activate" handler="on_normal_view1_activate" last_modification_time="Fri, 14 May 2004 15:28:18 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioMenuItem" id="large_view1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Large view (x2)</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <property name="group">normal_view1</property>
+	      <signal name="activate" handler="on_large_view1_activate" last_modification_time="Fri, 14 May 2004 15:28:18 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioMenuItem" id="full_view1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Full screen</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <property name="group">normal_view1</property>
+	      <signal name="activate" handler="on_full_view1_activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioMenuItem" id="custom_view1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Custom view</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <property name="group">normal_view1</property>
+	      <signal name="activate" handler="on_custom_view1_activate" last_modification_time="Sun, 05 Jun 2005 08:47:19 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="skin_for_current_calc1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Skin for current calc</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="skin_for_current_calc1_menu">
+
+	  <child>
+	    <widget class="GtkMenuItem" id="no_skin1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">No skin (just LCD).</property>
+	      <property name="label" translatable="yes">_None</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_no_skin1_activate" last_modification_time="Fri, 14 May 2004 15:29:13 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="default_skin1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Returns to default skin.</property>
+	      <property name="label" translatable="yes">_Default</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_default_skin1_activate" last_modification_time="Fri, 14 May 2004 15:29:13 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="set_skin1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Choose a skin to use.</property>
+	      <property name="label" translatable="yes">_Other...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_set_skin1_activate"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="screenshot1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Screenshot</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="screenshot1_menu">
+
+	  <child>
+	    <widget class="GtkMenuItem" id="now1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Do a screenshot now!</property>
+	      <property name="label" translatable="yes">_Now!</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_now1_activate" last_modification_time="Fri, 14 May 2004 15:29:13 GMT"/>
+	      <accelerator key="Pause" modifiers="0" signal="activate"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="options1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Set options for screenshot (image, type).</property>
+	      <property name="label" translatable="yes">_Options</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_screen_options1_activate" last_modification_time="Fri, 14 May 2004 15:34:09 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckMenuItem" id="copy_to_clipboard1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Copy to clipboard</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <signal name="activate" handler="on_copy_to_clipboard1_activate" last_modification_time="Sun, 16 Sep 2007 19:16:42 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="key_press1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Key Press</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="key_press1_menu">
+
+	  <child>
+	    <widget class="GtkMenuItem" id="setup_recording1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Setup recording</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_setup_recording1_activate" last_modification_time="Fri, 13 Apr 2007 16:17:39 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckMenuItem" id="start_recording1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Record</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <signal name="activate" handler="on_start_recording1_activate" last_modification_time="Fri, 13 Apr 2007 16:17:39 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSeparatorMenuItem" id="separator23">
+	      <property name="visible">True</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="setup_playing1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Setup playing</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_setup_playing1_activate" last_modification_time="Fri, 13 Apr 2007 16:17:39 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckMenuItem" id="start_playing1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Play</property>
+	      <property name="use_underline">True</property>
+	      <property name="active">False</property>
+	      <signal name="activate" handler="on_start_playing1_activate" last_modification_time="Fri, 13 Apr 2007 16:17:39 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkSeparatorMenuItem" id="separator13">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="misc1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Misc</property>
+      <property name="use_underline">True</property>
+
+      <child>
+	<widget class="GtkMenu" id="misc1_menu">
+
+	  <child>
+	    <widget class="GtkImageMenuItem" id="help1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Open the TiEmu user's manual in a browser.</property>
+	      <property name="label" translatable="yes">_User's Manual</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_help1_activate" last_modification_time="Fri, 14 May 2004 15:30:18 GMT"/>
+	      <accelerator key="H" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+	      <child internal-child="image">
+		<widget class="GtkImage" id="image124">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-help</property>
+		  <property name="icon_size">1</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkImageMenuItem" id="manpage1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Open the Linux manpage (applicable to Windows, too).</property>
+	      <property name="label" translatable="yes">_Manpage</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_manpage1_activate"/>
+	      <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+	      <child internal-child="image">
+		<widget class="GtkImage" id="image125">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-index</property>
+		  <property name="icon_size">1</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSeparatorMenuItem" id="separator15">
+	      <property name="visible">True</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="bookmarks1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Bookmarks</property>
+	      <property name="use_underline">True</property>
+
+	      <child>
+		<widget class="GtkMenu" id="bookmarks1_menu">
+
+		  <child>
+		    <widget class="GtkMenuItem" id="tiemu1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">http://lpg.ticalc.org/prj_tiemu</property>
+		      <property name="label" translatable="yes">TiEmu</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_bookmarks1_activate" last_modification_time="Sun, 20 Feb 2005 18:05:19 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="tigcc1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">http://tigcc.ticalc.org</property>
+		      <property name="label" translatable="yes">TIGCC</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_bookmarks1_activate" last_modification_time="Sun, 20 Feb 2005 18:05:19 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="tilp1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">http://www.tilp.info</property>
+		      <property name="label" translatable="yes">TiLP</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_bookmarks1_activate" last_modification_time="Sun, 20 Feb 2005 18:05:19 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="ti_education1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">http://education.ti.com</property>
+		      <property name="label" translatable="yes">TI Education</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_bookmarks1_activate" last_modification_time="Sun, 20 Feb 2005 18:05:19 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="ticalc1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">http://www.ticalc.org</property>
+		      <property name="label" translatable="yes">ticalc.org</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_bookmarks1_activate" last_modification_time="Sun, 20 Feb 2005 18:05:19 GMT"/>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkImageMenuItem" id="bugreport1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">How to report a bug or a problem.</property>
+	      <property name="label" translatable="yes">Bu_g report</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_bugreport1_activate" last_modification_time="Sun, 20 Feb 2005 17:58:57 GMT"/>
+
+	      <child internal-child="image">
+		<widget class="GtkImage" id="image126">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-execute</property>
+		  <property name="icon_size">1</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSeparatorMenuItem" id="separator14">
+	      <property name="visible">True</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="changelog1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Display the log of all changes.</property>
+	      <property name="label" translatable="yes">_ChangeLog</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_changelog1_activate" last_modification_time="Mon, 21 Feb 2005 07:52:10 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkMenuItem" id="about1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">About TiEmu...</property>
+	      <property name="label" translatable="yes">_About...</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_about1_activate"/>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="infos1">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">_Infos...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_infos1_activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="exit2">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Just exits.</property>
+      <property name="label" translatable="yes">E_xit without saving state</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_exit_without_saving_state1_activate"/>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/popup-2.gladep b/glade/popup-2.gladep
new file mode 100644
index 0000000..3fc5f4e
--- /dev/null
+++ b/glade/popup-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Popup Menu</name>
+  <program_name>popup-menu</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>popup.c</handler_source_file>
+  <handler_header_file>popup.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>popup-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/popup-2.str b/glade/popup-2.str
new file mode 100644
index 0000000..dba2913
--- /dev/null
+++ b/glade/popup-2.str
@@ -0,0 +1,95 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Welcome to TiEmu 3");
+gchar *s = N_("TiEmu Menu");
+gchar *s = N_("Send the selected file to the emulator. This file can be of any type (single, group, backup, FLASH app or FLASH OS).");
+gchar *s = N_("_Send file to TiEmu...");
+gchar *s = N_("_Debug file with TiEmu...");
+gchar *s = N_("_Link");
+gchar *s = N_("Do the link cable setup.");
+gchar *s = N_("_Settings...");
+gchar *s = N_("_Quick-send...");
+gchar *s = N_("Listen for files sent from TiEmu. Uncheck it if you are running program which use the linkport for sound.");
+gchar *s = N_("_Listen for files");
+gchar *s = N_("_Emulate sound");
+gchar *s = N_("Configuration");
+gchar *s = N_("Save the actual configuration into a text file.");
+gchar *s = N_("_Save config...");
+gchar *s = N_("Load the configuration previously saved.");
+gchar *s = N_("_Load config...");
+gchar *s = N_("Calculator state");
+gchar *s = N_("Reload the previously saved state.");
+gchar *s = N_("_Revert to saved state");
+gchar *s = N_("Load the calculator state from file.");
+gchar *s = N_("_Load state image...");
+gchar *s = N_("Save the calculator state into a file (called state image).");
+gchar *s = N_("_Save state image...");
+gchar *s = N_("Do a 'save state image' and exits.");
+gchar *s = N_("_Exit and save state");
+gchar *s = N_("Go into the debugger.");
+gchar *s = N_("_Enter debugger...");
+gchar *s = N_("Reset the calculator.");
+gchar *s = N_("_Reset calc");
+gchar *s = N_("Load a FLASH upgrade into the FLASH memory of the calculator.");
+gchar *s = N_("_Upgrade calc");
+gchar *s = N_("Import and/or set an image to emulate.");
+gchar *s = N_("Set R_OM (image/upgrade)");
+gchar *s = N_("Emulator options");
+gchar *s = N_("Run the calculator at its default speed (default) or at the maximum the computer can do.");
+gchar *s = N_("_Restrict to actual speed");
+gchar *s = N_("Enable/disable hardware protection. Please note you will have to restart the emulator or select an image for changes to take effect.");
+gchar *s = N_("H_W protection");
+gchar *s = N_("_High LCD update");
+gchar *s = N_("_Med LCD update");
+gchar *s = N_("L_ow LCD update");
+gchar *s = N_("_Normal view (x1)");
+gchar *s = N_("_Large view (x2)");
+gchar *s = N_("_Full screen");
+gchar *s = N_("_Custom view");
+gchar *s = N_("Skin for current calc");
+gchar *s = N_("No skin (just LCD).");
+gchar *s = N_("_None");
+gchar *s = N_("Returns to default skin.");
+gchar *s = N_("_Default");
+gchar *s = N_("Choose a skin to use.");
+gchar *s = N_("_Other...");
+gchar *s = N_("Screenshot");
+gchar *s = N_("Do a screenshot now!");
+gchar *s = N_("_Now!");
+gchar *s = N_("Set options for screenshot (image, type).");
+gchar *s = N_("_Options");
+gchar *s = N_("_Copy to clipboard");
+gchar *s = N_("Key Press");
+gchar *s = N_("Setup recording");
+gchar *s = N_("Record");
+gchar *s = N_("Setup playing");
+gchar *s = N_("Play");
+gchar *s = N_("Misc");
+gchar *s = N_("Open the TiEmu user's manual in a browser.");
+gchar *s = N_("_User's Manual");
+gchar *s = N_("Open the Linux manpage (applicable to Windows, too).");
+gchar *s = N_("_Manpage");
+gchar *s = N_("_Bookmarks");
+gchar *s = N_("http://lpg.ticalc.org/prj_tiemu");
+gchar *s = N_("TiEmu");
+gchar *s = N_("http://tigcc.ticalc.org");
+gchar *s = N_("TIGCC");
+gchar *s = N_("http://www.tilp.info");
+gchar *s = N_("TiLP");
+gchar *s = N_("http://education.ti.com");
+gchar *s = N_("TI Education");
+gchar *s = N_("http://www.ticalc.org");
+gchar *s = N_("ticalc.org");
+gchar *s = N_("How to report a bug or a problem.");
+gchar *s = N_("Bu_g report");
+gchar *s = N_("Display the log of all changes.");
+gchar *s = N_("_ChangeLog");
+gchar *s = N_("About TiEmu...");
+gchar *s = N_("_About...");
+gchar *s = N_("_Infos...");
+gchar *s = N_("Just exits.");
+gchar *s = N_("E_xit without saving state");
diff --git a/glade/quicksend-2.glade b/glade/quicksend-2.glade
new file mode 100644
index 0000000..832833a
--- /dev/null
+++ b/glade/quicksend-2.glade
@@ -0,0 +1,121 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="quicksend_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Quick send</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox3">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="checkbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_enable</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="qs_checkbutton1_toggled" last_modification_time="Mon, 04 Dec 2006 10:09:20 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFileChooserButton" id="filechooserbutton1">
+	      <property name="visible">True</property>
+	      <property name="title" translatable="yes">Open file</property>
+	      <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+	      <property name="local_only">False</property>
+	      <property name="show_hidden">False</property>
+	      <property name="width_chars">-1</property>
+	      <signal name="selection_changed" handler="qs_filechooserbutton1_current_folder_changed" last_modification_time="Mon, 04 Dec 2006 10:09:27 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/quicksend-2.gladep b/glade/quicksend-2.gladep
new file mode 100644
index 0000000..1300a66
--- /dev/null
+++ b/glade/quicksend-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>quicksend.c</handler_source_file>
+  <handler_header_file>quicksend.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>quicksend-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/quicksend-2.str b/glade/quicksend-2.str
new file mode 100644
index 0000000..b74fb94
--- /dev/null
+++ b/glade/quicksend-2.str
@@ -0,0 +1,9 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Quick send");
+gchar *s = N_("_enable");
+gchar *s = N_("Open file");
diff --git a/glade/release-2.glade b/glade/release-2.glade
new file mode 100644
index 0000000..24fc6e4
--- /dev/null
+++ b/glade/release-2.glade
@@ -0,0 +1,160 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="release_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Welcome to TiEmu !</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">640</property>
+  <property name="default_height">480</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label2">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">You will find in the box below some news about TiEmu (the RELEASE file):</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkTextView" id="textview1">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">False</property>
+		  <property name="overwrite">False</property>
+		  <property name="accepts_tab">True</property>
+		  <property name="justification">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap_mode">GTK_WRAP_WORD</property>
+		  <property name="cursor_visible">True</property>
+		  <property name="pixels_above_lines">0</property>
+		  <property name="pixels_below_lines">0</property>
+		  <property name="pixels_inside_wrap">0</property>
+		  <property name="left_margin">0</property>
+		  <property name="right_margin">0</property>
+		  <property name="indent">0</property>
+		  <property name="text" translatable="yes">Cannot find the RELEASE file.</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label3">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">The latest version of TiEmu can be found at: <http://lpg.ticalc.org/prj__tiemu>
+Please report any bugs to the TiEmu team: <gtktiemu-users at lists.sf.net>.</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/release-2.gladep b/glade/release-2.gladep
new file mode 100644
index 0000000..5bff667
--- /dev/null
+++ b/glade/release-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade</name>
+  <program_name>glade</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>release.c</handler_source_file>
+  <handler_header_file>release.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>release-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/romversion-2.glade b/glade/romversion-2.glade
new file mode 100644
index 0000000..b2fed23
--- /dev/null
+++ b/glade/romversion-2.glade
@@ -0,0 +1,155 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="romversion_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Set ROM version</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="default_width">400</property>
+  <property name="default_height">240</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox3">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area3">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox5">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkTreeView" id="clist1">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="headers_visible">True</property>
+		  <property name="rules_hint">False</property>
+		  <property name="reorderable">False</property>
+		  <property name="enable_search">True</property>
+		  <property name="fixed_height_mode">False</property>
+		  <property name="hover_selection">False</property>
+		  <property name="hover_expand">False</property>
+		  <signal name="button_press_event" handler="on_romversion_button_press_event" object="romversion_dbox" last_modification_time="Thu, 14 Jul 2005 12:32:55 GMT"/>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHButtonBox" id="hbuttonbox1">
+	      <property name="visible">True</property>
+	      <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkButton" id="button1">
+		  <property name="visible">True</property>
+		  <property name="can_default">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label">gtk-add</property>
+		  <property name="use_stock">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_romversion_add1_clicked" object="clist1" last_modification_time="Sun, 13 Mar 2005 15:31:51 GMT"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="button2">
+		  <property name="visible">True</property>
+		  <property name="can_default">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label">gtk-remove</property>
+		  <property name="use_stock">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_romversion_del1_clicked" object="clist1" last_modification_time="Sun, 13 Mar 2005 15:21:23 GMT"/>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/romversion-2.gladep b/glade/romversion-2.gladep
new file mode 100644
index 0000000..de651c7
--- /dev/null
+++ b/glade/romversion-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>romversion.c</handler_source_file>
+  <handler_header_file>romversion.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>romversion-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/romversion-2.str b/glade/romversion-2.str
new file mode 100644
index 0000000..544f224
--- /dev/null
+++ b/glade/romversion-2.str
@@ -0,0 +1,7 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Set ROM version");
diff --git a/glade/scroptions-2.glade b/glade/scroptions-2.glade
new file mode 100644
index 0000000..aeaa7e1
--- /dev/null
+++ b/glade/scroptions-2.glade
@@ -0,0 +1,726 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="scroptions_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Screen Options</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table1">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">2</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">0</property>
+	  <property name="column_spacing">5</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame3">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkTable" id="table2">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">True</property>
+		  <property name="row_spacing">12</property>
+		  <property name="column_spacing">12</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton30">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_JPEG</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_scopt_radiobutton30_toggled" last_modification_time="Sat, 15 May 2004 12:52:32 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton31">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_PNG</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton30</property>
+		      <signal name="toggled" handler="on_scopt_radiobutton31_toggled" last_modification_time="Sat, 15 May 2004 12:52:36 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton32">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_ICO</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton30</property>
+		      <signal name="toggled" handler="on_scopt_radiobutton32_toggled" last_modification_time="Sat, 15 May 2004 12:52:44 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton33">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_EPS</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton30</property>
+		      <signal name="toggled" handler="on_scopt_radiobutton33_toggled" last_modification_time="Fri, 27 May 2005 08:28:54 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton34">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">PD_F</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton30</property>
+		      <signal name="toggled" handler="on_scopt_radiobutton34_toggled" last_modification_time="Fri, 27 May 2005 08:29:24 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiobutton35">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_BMP</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiobutton30</property>
+		      <signal name="toggled" handler="on_scopt_radiobutton35_toggled" last_modification_time="Thu, 03 Aug 2006 15:24:01 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label5">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Image format:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame5">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox5">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkTable" id="table3">
+		      <property name="visible">True</property>
+		      <property name="n_rows">2</property>
+		      <property name="n_columns">2</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">0</property>
+		      <property name="column_spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label14">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Skips: </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="spinbutton1">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Number of frames to capture</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">False</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">1 1 100 1 10 10</property>
+			  <signal name="changed" handler="on_spinbutton1_changed" last_modification_time="Thu, 03 Aug 2006 15:50:14 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="spinbutton2">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Number of frames to skip between 2 captures. Beware: if you want to capture image every 4 frames, you need to set value to 3.</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">False</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">1 0 127 1 10 10</property>
+			  <signal name="changed" handler="on_spinbutton2_changed" last_modification_time="Thu, 03 Aug 2006 15:50:17 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label13">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Shots: </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options">expand</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label11">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Burst capture:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame4">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox4">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">5</property>
+
+		  <child>
+		    <widget class="GtkFileChooserButton" id="filechooserbutton1">
+		      <property name="visible">True</property>
+		      <property name="title" translatable="yes">Select folder</property>
+		      <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
+		      <property name="local_only">False</property>
+		      <property name="show_hidden">True</property>
+		      <property name="width_chars">-1</property>
+		      <signal name="current_folder_changed" handler="on_filechooserbutton1_current_folder_changed" last_modification_time="Sun, 30 Jul 2006 14:45:48 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox4">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkEntry" id="entry10">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes">screenshot</property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char">*</property>
+			  <property name="activates_default">False</property>
+			  <signal name="changed" handler="on_entry1_changed"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label10">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">-000.jpg</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">5</property>
+			  <property name="ypad">5</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label4">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Folder & Filename:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame2">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox3">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radiobutton10">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Black&_White</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">True</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <signal name="toggled" handler="on_scopt_radiobutton10_toggled" last_modification_time="Sat, 15 May 2004 12:52:08 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radiobutton11">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Colo_r</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">radiobutton10</property>
+			  <signal name="toggled" handler="on_scopt_radiobutton11_toggled" last_modification_time="Sat, 15 May 2004 12:52:13 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHSeparator" id="hseparator1">
+			  <property name="visible">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radiobutton20">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">_LCD only</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">True</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <signal name="toggled" handler="on_scopt_radiobutton20_toggled" last_modification_time="Sat, 15 May 2004 12:52:18 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radiobutton21">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">_Calculator</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">radiobutton20</property>
+			  <signal name="toggled" handler="on_scopt_radiobutton21_toggled" last_modification_time="Sat, 15 May 2004 12:52:23 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label2">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Image type:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/scroptions-2.gladep b/glade/scroptions-2.gladep
new file mode 100644
index 0000000..b20c2ea
--- /dev/null
+++ b/glade/scroptions-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>scroptions.c</handler_source_file>
+  <handler_header_file>scroptions.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>scroptions-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/scroptions-2.str b/glade/scroptions-2.str
new file mode 100644
index 0000000..7f59d04
--- /dev/null
+++ b/glade/scroptions-2.str
@@ -0,0 +1,28 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("Screen Options");
+gchar *s = N_("_JPEG");
+gchar *s = N_("_PNG");
+gchar *s = N_("_ICO");
+gchar *s = N_("_EPS");
+gchar *s = N_("PD_F");
+gchar *s = N_("_BMP");
+gchar *s = N_("Image format:");
+gchar *s = N_("Skips: ");
+gchar *s = N_("Number of frames to capture");
+gchar *s = N_("Number of frames to skip between 2 captures. Beware: if you want to capture image every 4 frames, you need to set value to 3.");
+gchar *s = N_("Shots: ");
+gchar *s = N_("Burst capture:");
+gchar *s = N_("Select folder");
+gchar *s = N_("screenshot");
+gchar *s = N_("-000.jpg");
+gchar *s = N_("Folder & Filename:");
+gchar *s = N_("Black&_White");
+gchar *s = N_("Colo_r");
+gchar *s = N_("_LCD only");
+gchar *s = N_("_Calculator");
+gchar *s = N_("Image type:");
diff --git a/glade/wizard-2.glade b/glade/wizard-2.glade
new file mode 100644
index 0000000..a6de2e6
--- /dev/null
+++ b/glade/wizard-2.glade
@@ -0,0 +1,759 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="step1_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">TiEmu wizard</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="applybutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-10</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox4">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label19">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Welcome to TiEmu 3, the Linux/Win32 TI emulator.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">15</property>
+	      <property name="ypad">5</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator4">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">I want to use PedRom (GPL'ed replacement OS) 
+shipped with TiEmu.</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">True</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="step1_on_radiobutton1_toggled" last_modification_time="Tue, 08 Jul 2003 12:26:04 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton2">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">You have downloaded a FLASH upgrade on the TI
+website.</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">radiobutton1</property>
+	      <signal name="toggled" handler="step1_on_radiobutton2_toggled" last_modification_time="Tue, 08 Jul 2003 12:26:14 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton3">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">You already have a ROM dump.</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">radiobutton1</property>
+	      <signal name="toggled" handler="step1_on_radiobutton3_toggled" last_modification_time="Tue, 08 Jul 2003 12:26:22 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="radiobutton4">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">You want to use TiLP or another dumping program 
+to get a ROM dump of your calculator ROM.</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">radiobutton1</property>
+	      <signal name="toggled" handler="step1_on_radiobutton4_toggled" last_modification_time="Thu, 24 Feb 2005 16:15:33 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator5">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label20">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Remind you that you can not distribute your ROM dump(s). They are copyrighted by Texas Instruments.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">15</property>
+	      <property name="ypad">5</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="step3_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">TiEmu wizard</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox5">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area5">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="applybutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-10</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox5">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label21">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">TiEmu is now set  up and ready for use. Some tips on how to use the emulator:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">15</property>
+	      <property name="ypad">5</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator6">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox6">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label22">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">* You have access to a popup menu by right-clicking in the emulator's window.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_FILL</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label23">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">* To use keys, use mouse or keyboard</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_FILL</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label24">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">* To change to a different calculator or ROM version, use an item of the ROM menu.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_FILL</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label25">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">* You can save the emulator state and config.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_FILL</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label26">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">* If your calculator screen is blank, use 'Ctrl' with '+/-' for adjusting contrast.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_FILL</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator7">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label27">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Click the 'Finish' button to start TiEmu.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">15</property>
+	      <property name="ypad">5</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="msg_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">TiEmu wizard</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox6">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area6">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton3">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label28">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">If you want to get a ROM dump with TiLP, you will have to download it from: <http://tilp.info>Be sure to read the user's manual!</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_FILL</property>
+	  <property name="wrap">True</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">5</property>
+	  <property name="ypad">5</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="wait_dbox">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">TiEmu wizard</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox7">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area7">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton4">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox7">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label29">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">The FLASH upgrade you have selected is being to be converted into a TiEmu image. Please wait...</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator8">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label30">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Note also that the converted image will not have a boot block.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glade/wizard-2.gladep b/glade/wizard-2.gladep
new file mode 100644
index 0000000..b867e77
--- /dev/null
+++ b/glade/wizard-2.gladep
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Glade_projects</name>
+  <program_name>glade_projects</program_name>
+  <gnome_support>FALSE</gnome_support>
+  <use_widget_names>TRUE</use_widget_names>
+  <output_main_file>FALSE</output_main_file>
+  <output_support_files>FALSE</output_support_files>
+  <output_build_files>FALSE</output_build_files>
+  <main_source_file>null</main_source_file>
+  <main_header_file>null</main_header_file>
+  <handler_source_file>wizard.c</handler_source_file>
+  <handler_header_file>wizard.h</handler_header_file>
+  <output_translatable_strings>TRUE</output_translatable_strings>
+  <translatable_strings_file>wizard-2.str</translatable_strings_file>
+</glade-project>
diff --git a/glade/wizard-2.str b/glade/wizard-2.str
new file mode 100644
index 0000000..471cbdd
--- /dev/null
+++ b/glade/wizard-2.str
@@ -0,0 +1,29 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("TiEmu wizard");
+gchar *s = N_("Welcome to TiEmu 3, the Linux/Win32 TI emulator.");
+gchar *s = N_("I want to use PedRom (GPL'ed replacement OS) \n"
+              "shipped with TiEmu.");
+gchar *s = N_("You have downloaded a FLASH upgrade on the TI\n"
+              "website.");
+gchar *s = N_("You already have a ROM dump.");
+gchar *s = N_("You want to use TiLP or another dumping program \n"
+              "to get a ROM dump of your calculator ROM.");
+gchar *s = N_("Remind you that you can not distribute your ROM dump(s). They are copyrighted by Texas Instruments.");
+gchar *s = N_("TiEmu wizard");
+gchar *s = N_("TiEmu is now set  up and ready for use. Some tips on how to use the emulator:");
+gchar *s = N_("* You have access to a popup menu by right-clicking in the emulator's window.");
+gchar *s = N_("* To use keys, use mouse or keyboard");
+gchar *s = N_("* To change to a different calculator or ROM version, use an item of the ROM menu.");
+gchar *s = N_("* You can save the emulator state and config.");
+gchar *s = N_("* If your calculator screen is blank, use 'Ctrl' with '+/-' for adjusting contrast.");
+gchar *s = N_("Click the 'Finish' button to start TiEmu.");
+gchar *s = N_("TiEmu wizard");
+gchar *s = N_("If you want to get a ROM dump with TiLP, you will have to download it from: <http://tilp.info>Be sure to read the user's manual!");
+gchar *s = N_("TiEmu wizard");
+gchar *s = N_("The FLASH upgrade you have selected is being to be converted into a TiEmu image. Please wait...");
+gchar *s = N_("Note also that the converted image will not have a boot block.");
diff --git a/help/FAQ.html b/help/FAQ.html
new file mode 100644
index 0000000..180e8e2
--- /dev/null
+++ b/help/FAQ.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>FAQ</title>
+  <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+  <meta name="author" content="Romain Liévin">
+  <meta name="description" content="Frequently Asked Questions">
+</head>
+<body>
+<div align="center"> <big><big><big><big><u><b>FAQ <br>
+(Frequently Asked Questions)</b></u></big></big></big></big><br>
+</div>
+<pre><br><br><br><br><br><br></pre>
+<div align="center"> <big><big><b><u>General</u></b></big></big><br>
+</div>
+<pre><br><b></b><b>Q:</b> ?<br><b>A:</b> .<br><b></b><br><br></pre>
+<div align="center"> <big><big><b><u>Win32 specific<br>
+</u></b></big></big></div>
+<pre><br>Q: If anyone is getting one of these:<br>- ** WARNING **: Couldn't load font "MS Sans Serif 8" falling back to "Sans 8"<br>- ** ERROR **: file shape.c line 75: assertion failed: (glyphs->num_glyphs > 0) or any other warning or error <br>message regarding fonts/glyphs<br>A: the fix is to open your C:\Program Files\Shared Files\Gtk\2.0\etc\gtk-2.0\gtkrc and to add<br>this:<br></pre>
+<div style="margin-left: 40px;">style "user-font"<br>
+{<br>
+font_name="Arial"<br>
+}<br>
+widget_class "*" style "user-font"<br>
+</div>
+<pre>This forces GTK+ to use a compatible font (Arial) and reportedly fixes both the aforementioned problems, <br>and probably others too...<br><br><br></pre>
+<div align="center"> <big><big><b><u>Linux specific<br>
+</u></b></big></big></div>
+<pre><br>Q: ?<br>A: .<br><br></pre>
+<br>
+</body>
+</html>
diff --git a/help/Makefile.am b/help/Makefile.am
new file mode 100644
index 0000000..d768c03
--- /dev/null
+++ b/help/Makefile.am
@@ -0,0 +1,13 @@
+helpdir = $(pkgdatadir)/help
+dist_help_DATA = *.html *.png *.jpg
+
+uninstall:
+	rm -f $(pkgdatadir)/help/*.html
+	rm -f $(pkgdatadir)/help/*.png
+	rm -f $(pkgdatadir)/help/*.jpg
+
+
+dos2unix:
+	dos2unix
+	lowercase
+	uppercase
diff --git a/help/Makefile.in b/help/Makefile.in
new file mode 100644
index 0000000..a067428
--- /dev/null
+++ b/help/Makefile.in
@@ -0,0 +1,494 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = help
+DIST_COMMON = $(dist_help_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(helpdir)"
+dist_helpDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_help_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+helpdir = $(pkgdatadir)/help
+dist_help_DATA = *.html *.png *.jpg
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  help/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  help/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_helpDATA: $(dist_help_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(helpdir)" || $(MKDIR_P) "$(DESTDIR)$(helpdir)"
+	@list='$(dist_help_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(dist_helpDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(helpdir)/$$f'"; \
+	  $(dist_helpDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(helpdir)/$$f"; \
+	done
+
+uninstall-dist_helpDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_help_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(helpdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(helpdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(helpdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_helpDATA
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_helpDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dist_helpDATA 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 \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am uninstall-dist_helpDATA
+
+
+uninstall:
+	rm -f $(pkgdatadir)/help/*.html
+	rm -f $(pkgdatadir)/help/*.png
+	rm -f $(pkgdatadir)/help/*.jpg
+
+dos2unix:
+	dos2unix
+	lowercase
+	uppercase
+# 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/help/Manual_en.html b/help/Manual_en.html
new file mode 100644
index 0000000..d060802
--- /dev/null
+++ b/help/Manual_en.html
@@ -0,0 +1,159 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu Team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<p> <img alt="" src="logo_tiemu.png"
+ style="width: 180px; height: 90px;"><br>
+</p>
+<p><font size="5"><b><font size="7">User's Manual</font></b></font><br>
+</p>
+ 
+<div style="text-align: left;">
+<hr>
+<p align="center"><font size="3"><b><u><font size="4">Table Of Contents</font></u></b></font>
+</p>
+<br>
+ 
+<a href="chapter01.html"><font size="2"><b>1 Introduction</b></font></a><br>
+ 
+<a href="chapter02.html"><font size="2"><b>2 Images</b></font></a><br>
+ 
+<a href="chapter03.html"><font size="2"><b>3 First run</b></font></a><br>
+ 
+<a href="chapter04.html"><font size="2"><b>4 Overview</b></font></a><br>
+ 
+<font><b><a href="chapter05.html"><font size="2"><b>5 Keyboard
+mapping</b></font></a><br>
+ 
+</b></font><font><b><font><b><a href="chapter06.html"><font size="2"><b>6
+Popup menu</b></font></a><br>
+ 
+</b></font></b></font><font><b><font><b><a href="chapter07.html"><font
+ size="2"><b>7 Debugger</b></font></a><br>
+ 
+</b></font></b></font><font><b><font><b><a href="chapter08.html"><font
+ size="2"><b>8 Screen shots</b></font></a><br>
+  </b></font></b></font><font><b><font><b><a href="chapter09.html"><font
+ size="2"><b>9 Command line</b></font></a><br>
+</b></font></b></font><font><b><font><b>  </b></font></b></font><font><b><font><b><a
+ href="chapter10.html"><font size="2"><b>10 Skins</b></font></a><br>
+</b></font></b></font><font><b><font><b>  </b></font></b></font><font><b><font><b><a
+ href="chapter11.html"><font size="2"><b>11 Link port</b></font></a></b></font></b></font><br>
+<font><b><font><b><br>
+</b></font></b></font><font><b><font><b>
+  </b></font></b></font><font><b><font><b><a href="chapter20.html"><font
+ size="2"><b>20 Problems, Bugs?</b></font></a><br>
+</b></font></b></font><font><b><font><b>  </b></font></b></font><font><b><font><b><a
+ href="chapter21.html"><font size="2"><b>21 Thanks</b></font></a><br>
+</b></font></b></font><font><b><font><b>  </b></font></b></font><font><b><font><b><a
+ href="chapter22.html"><font size="2"><b>22 Copyright notes</b></font></a></b></font></b></font><br>
+<br>
+  <a href="FAQ.html"><font size="2"><b>FAQ: frequently asked
+questions</b></font></a><br>
+<br>
+</div>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: left;"> </div>
+</div>
+<table nosave="" border="1" cellpadding="4" width="63%">
+  <tbody>
+    <tr>
+      <td valign="top" width="23%"><font size="3"><b>Author</b></font></td>
+      <td valign="top" width="28%"><font size="3"><b>Date</b></font></td>
+      <td valign="top" width="5%"><font size="3"><b>Version</b></font> </td>
+      <td valign="top" width="44%"><font size="3"><b>Modifications</b></font></td>
+    </tr>
+    <tr>
+      <td valign="top" width="23%"><font size="3">R. Liévin</font></td>
+      <td valign="top" width="28%"><font size="3">Feb 3<sup>rd</sup>,
+2005</font></td>
+      <td valign="top" width="5%"><font size="3">1.0</font> </td>
+      <td nosave="" valign="top" width="44%"><font size="3">Initial
+release (TiEmu v1.80l).</font></td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">K. Kofler<br>
+      </td>
+      <td style="vertical-align: top;">Aug 25th, 2005<br>
+      </td>
+      <td style="vertical-align: top;">1.1<br>
+      </td>
+      <td style="vertical-align: top;">Insight support.<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">R. Liévin<br>
+      </td>
+      <td style="vertical-align: top;">Sep 10th, 2005<br>
+      </td>
+      <td style="vertical-align: top;">1.2<br>
+      </td>
+      <td style="vertical-align: top;">SilverLink support.<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">R. Liévin<br>
+      </td>
+      <td style="vertical-align: top;">Dec 4th, 2006<br>
+      </td>
+      <td style="vertical-align: top;">1.3<br>
+      </td>
+      <td style="vertical-align: top;">Link, link-log, quick-send, DnD
+and more.<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<p><font size="3">This current release supersedes and cancels any
+previous documents.</font>  <br>
+</p>
+<p>SVN repository : <<a
+ href="http://svn.technologeek.org/cgi-bin/viewcvs.cgi/tiemu/trunk/help/?root=tiemu">http://svn.technologeek.org/cgi-bin/viewcvs.cgi/tiemu/trunk/help/?root=tiemu</a>>.<br>
+Revision : $Id: Manual_en.html 2341 2007-01-31 17:52:33Z roms $<br>
+</p>
+<hr>
+<p><img alt="LPG" src="logo_lpg.png" align="left" height="79" width="74"><b><br>
+TiEmu is the 'Ti Emulator' for Windows, Linux, Mac OS-X and FreeBSD,<br>
+created and maintained by the Linux Programmer Group (aka LPG).</b> </p>
+<p><br>
+</p>
+<p>TiEmu : <a href="http://lpg.ticalc.org/prj_tiemu">http://lpg.ticalc.org/prj_tiemu</a>
+<br>
+LPG : <a href="http://lpg.ticalc.org/">http://lpg.ticalc.org</a> <br>
+ticalc.org : <a href="http://www.ticalc.org/">http://www.ticalc.org</a>
+</p>
+<p>Windows is a registered trademark of Microsoft Corporation. <br>
+Macintosh is a registered trademark of Apple Computer, Incorporated. <br>
+Linux is a registered trademark of Linus Torvalds.<br>
+Texas Instruments and TI are trademarks of  Texas Instruments
+Incorporated.<br>
+For more informations:
+<http://education.ti.com/educationportal/sites/US/nonProductSingle/global_trademarks.html>
+</p>
+<p>© 2005-2006 by the TiEmu team <<a
+ href="mailto:tilps-users at lists.sf.net">tilps-users at lists.sf.net</a>>.
+Released under FDL.<br>
+</p>
+<p>Contributors : </p>
+<ul>
+  <li>Kevin for GDB/Insight integration<br>
+  </li>
+  <li>Lionel and Olivier for their advices<br>
+  </li>
+</ul>
+<p> </p>
+<p>Translators : </p>
+<ul>
+  <li>fire us a mail.</li>
+</ul>
+<hr>
+</body>
+</html>
diff --git a/help/calc_infos.png b/help/calc_infos.png
new file mode 100644
index 0000000..331a617
Binary files /dev/null and b/help/calc_infos.png differ
diff --git a/help/chapter01.html b/help/chapter01.html
new file mode 100644
index 0000000..ceba569
--- /dev/null
+++ b/help/chapter01.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body bgcolor="#ffffff">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="Manual_en.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter02.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Table of content</td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Images</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+</div>
+</div>
+<h1>1. Introduction</h1>
+<h2>1.1 What's TiEmu</h2>
+TiEmu is a program allowing a computer to emulate a hand-held: 
+TI89, TI89 Titanium, TI92, TI92+, V200PLT. <br>
+At the time being, it works on Linux and Windows platforms.<br>
+<br>
+It uses GTK+ (<a href="http://www.gimp.org">The GiMP</a> <a
+ href="http://www.gtk.org">ToolKit</a>) for the GUI and for the
+display. <br>
+<br>
+All link cables supported by the TiLP 2 framework are available: <br>
+- home-made parallel, <br>
+- home-made serial, <br>
+- Black TI Graph Link, <br>
+- Gray TI Graph Link,<br>
+- SilverLink.<br>
+<br>
+TiEmu was based on <a
+ href="http://www.student.nada.kth.se/%7Emd94-jmi/tiger/">XTiger</a>,
+the original TI emulator for Linux which uses the m68k emulation core
+from <a href="http://freiburg.linux.de/%7Euae/">UAE</a> (The Ultimate
+Amiga Emulator).<br>
+It also uses the <a href="http://www.tilp.info">TiLP</a> framework
+(ti* libraries). See the AUTHORS file for more details.<br>
+<br>
+TiEmu is provided with a default and free OS : <a
+ href="http://www.ticalc.org/archives/files/fileinfo/319/31951.html">PedroM</a>.<br>
+<br>
+As of TiEmu 3, it is provided as 2 versions: TiEmu with gdb (+gdb for
+short) and TiEmu without gdb (-gdb for short). Both of them are the
+same except for the debugger.<br>
+<h2>1.2 Features and limitations<br>
+</h2>
+<span style="text-decoration: underline;">Features:</span><br>
+<ul>
+  <li>support TI89, TI89 Titanium, TI92, TI92+ and V200PLT hand-helds<br>
+  </li>
+  <li>nice assembly-level debugger (disassembly, memory, breakpoints,
+traps, vectors,
+stack contents, trace, ...)</li>
+  <li>assembly-level debugger supports: run, step in, step over, step
+out, run to
+cursor</li>
+  <li>nice source-level debugger (source, GDB console, stack backtrace,
+watches, ...)
+based on <a href="http://sources.redhat.com/insight/">Insight</a></li>
+  <li>ability to load/save the emulator state</li>
+  <li>file linkport emulation (direct loading of files)</li>
+  <li>works with 1/2/4 MB ROMs, 128 or 256 KB RAM</li>
+  <li>emulate HW1, HW2, and HW3</li>
+  <li>can run from ROM dumps or FLASH upgrades</li>
+  <li>automatic ROM version/model detection</li>
+  <li>contrast emulated (try [Alt] + [+] & [-])</li>
+  <li>pretty fast emulation code</li>
+  <li>sreenshot of LCD and/or calculator in several images format
+(JPG/PNG/ICO)</li>
+  <li>TI keyboard useable directly from PC kesyboard or with the mouse
+on the skin</li>
+  <li>archive memory support as well as ghost spaces</li>
+  <li>full emulation of HW1/2/3 protection (stealth I/O)</li>
+  <li>full emulation of HW2 & HW3 clock<br>
+  </li>
+  <li>no buggy MC68000 SR & nbcd (TiEmu can't be detected as VTI:
+you have
+true emulation)</li>
+  <li>4-level and 7/8-level grayscale support (thx Kevin !) for both
+HW1 and HW2/3<br>
+  </li>
+  <li>the letter keys are aliased to produce their respective
+letters.  No need to press the Alpha key, just type (TI89).</li>
+  <li>full-featured
+graphical debugger <br>
+  </li>
+  <li>keyboard mapping and menu shortcuts are fully VTI-compatible</li>
+  <li>keyboard mapping can be customized<br>
+  </li>
+</ul>
+<span style="text-decoration: underline;">Limitations:</span><br
+ style="text-decoration: underline;">
+<ul>
+  <li>linkport emulation has not been tested with USB cable yet</li>
+  <li>no DirectLink support<br>
+  </li>
+  <li>no debugger while sending/receiving a file to/from the virtual
+calculator</li>
+</ul>
+<h2>1.3 System requirements</h2>
+<font size="3">In order to run TiEmu, your computer must meet one
+of the following sets of requirements, depending on your operating
+system:<br>
+</font>
+<p> </p>
+<p><font size="3"><u>Linux:</u></font> </p>
+<ul>
+  <li><font size="3">any personal computer (a 386-compatible PC
+(Pentium or higher
+strongly recommended) or a Macintosh (PPC G4 or higher strongly
+recommended)) or
+workstation (Sparc, Alpha, etc.) with any Linux distribution installed</font></li>
+  <li><font size="3">64 MB of RAM (most part is used by GTK and
+GDB/Insight)</font></li>
+  <li><font size="3">an X Window System (X.Org X11 is the most common)</font>
+  </li>
+  <li><font size="3">GTK+ 2.6 libraries</font></li>
+</ul>
+<p><font size="3"><u>Windows:</u></font> </p>
+<ul>
+  <li><font size="3">a Pentium PC @450MHz or better with Microsoft
+Windows
+95/98/Me or NT4/2000/XP</font></li>
+  <li><font size="3">64 MB of RAM (most part is used by GTK and
+GDB/Insight)</font></li>
+  <li><font size="3">GTK+ 2.6 libraries like 2.6.8</font> (it is
+recommended
+to use an NT-based version of Windows: NT4, 2000 or XP)</li>
+</ul>
+<p><font size="3"><u>Mac OS-X:</u></font> </p>
+<ul>
+  <li>to test... <br>
+  </li>
+</ul>
+<p><font size="3"><u>FreeBSD:</u></font> </p>
+<ul>
+  <li><font size="3">same requirements as Linux.<br>
+    <br>
+    </font></li>
+</ul>
+All systems must have an available port that will support your cable
+(see section 3 below).<br>
+<h2>1.4 Installation</h2>
+<font size="3"><u>Linux:</u></font>
+<p> </p>
+<ul>
+  <li><font size="3">install the TiLP 2 <a
+ href="http://www.ticalc.org/archives/files/fileinfo/337/33748.html">framework</a></font>
+  </li>
+  <li><font size="3">install TiEmu either by compiling sources, either
+by installing a package from your favorite distro</font> </li>
+</ul>
+<p><font size="3"><u>Windows:</u></font> </p>
+<ul>
+  <li><font size="3">execute the InnoSetup or NSIS installer.</font></li>
+</ul>
+<h2>1.5 Configuration / Setting-up (Linux)<br>
+</h2>
+<font size="3">A burning issue with TiLP and Linux is good set-up of
+device access. Linux is secure because it heavily relies on permissions.<br>
+You should always run TiLP as root for the first run. By this way, you
+will be almost sure to run TiLP with success.<br>
+<br>
+If you want to run TiLP as a simple user, you must take care of
+permissions. This is explained below.<br>
+<br>
+For BlackLink or home-made serial cable, the node is '/dev/ttySx". You
+must have r/w permissions on this device. This can be done by:<br>
+- giving up r/w permissions to other (chmod ugo+rw /dev/ttyS0) or,
+better,<br>
+- adding your user to the group 'dialout' (edit /etc/group and your
+username after the ':').<br>
+<br>
+Example 1:<br>
+<span style="font-family: courier new;">   
+crw-rw-rw-  1 root dialout 4, 64 2006-02-08 13:40 /dev/ttyS0<br>
+</span></font><font size="3">Example 2:<br>
+<span style="font-family: courier new;">   
+dialout:x:20:romain</span></font><br>
+<font size="3"><span style="font-family: courier new;"></span><br>
+For parallel link cable, the node is '/dev/parportX' and the same rules
+apply.<br>
+<br>
+For SilverLink cable, things are more complicated...<br>
+<br>
+</font>
+<table style="width: 100%; text-align: left;" border="1" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><font size="3">libusb uses a
+pseudo-filesystem known as 'usbdevfs` or 'usbfs` to access the USB
+devices connected to your machine. This filesystem must be mounted<br>
+under /proc/bus/usb for libusb to work.<br>
+      <br>
+It could be done using the following command:<br>
+      <span style="font-family: courier new;">       
+mount -t usbfs none /proc/bus/usb</span><br>
+      <br>
+An alternative and more permanent method would be to add<br>
+      <span style="font-family: courier new;">       
+none /proc/bus/usb usbfs defaults 0 0</span><br>
+to your /etc/fstab file. It will mount the usbfs for you automatically
+at boot time ; only root will be able to access the USB devices with
+this setup.<br>
+      <br>
+Several mount options are available, that allow you to set the
+permissions on the files created under /proc/bus/usb so that non-root
+users can use libusb applications:<br>
+ - devuid=xxx, devgid=xxx, devmode=xxx respectively set the uid,
+the
+gid and the mode of the devices files, ie /proc/bus/usb/BBB/DDD<br>
+ - busuid=xxx, busgid=xxx, devmode=xxx respectively set the uid,
+the gid and the mode of the bus files, ie /proc/bus/usb/BBB<br>
+ - listuid=xxx, listgid=xxx, listmode=xxx respectively set the
+uid, the gid and the mode of /proc/bus/usb/devices<br>
+      <br>
+ -- Aurelien Jarno <aurel32 at debian.org>, Sun, 21 Mar 2004
+01:01:44 +0100</font></td>
+    </tr>
+  </tbody>
+</table>
+<hr>
+</body>
+</html>
diff --git a/help/chapter02.html b/help/chapter02.html
new file mode 100644
index 0000000..6aa7c08
--- /dev/null
+++ b/help/chapter02.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter01.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter03.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Introduction</td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">First run<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>2. TiEmu images</h1>
+Some vocabulary...<br>
+<br>
+To run this emulator you will need an 'TiEmu v2' image. An image is
+converted from :<br>
+- a ROM dump,<br>
+- a FLASH upgrade (not applicable to TI92).<br>
+<br>
+As ROM dumps are copyrighted by Texas Instruments Inc, they will never
+be distributed with the emulator. To get a ROM dump, you can use TiLP
+or any other ROM dumping program. <br>
+<br>
+If you can't get a ROM image (because you don't own the calculator or
+you want to test the emulator), you can download a FLASH upgrade from
+the TI web site (http://education.ti.com) or use PedroM (GPL'ed
+replacement OS shipped with TiEmu).<br>
+<br>
+Please note that images converted from a FLASH upgrade (fake image)
+have
+neither a boot block nor a certificate. They are not as complete as ROM
+dumps.<br>
+<br>
+[If you already have a ROM dump or an upgrade, place it in the 'images'
+directory. Make sure it has the right extension (.rom or .89u). It will
+be
+automatically converted and <span style="font-style: italic;">deleted</span>.]<br>
+<br>
+A TiEmu image is made up of an header and the ROM dump or FLASH
+upgrade. The format is documented in the doc folder of the source
+archive.<span style="text-decoration: underline;"></span><br>
+<br>
+<div style="text-align: center;"><span style="font-weight: bold;">Please
+note that ROM contents is copyrighted by Texas Instruments. You are <span
+ style="text-decoration: underline;">not allowed </span>to
+<span style="text-decoration: underline;">copy </span>and/or <span
+ style="text-decoration: underline;">distribute </span>any ROM image!<br>
+For more informations, see the
+License Agreement provided with any FLASH OS upgrade.</span><span
+ style="font-weight: bold;"></span><br>
+</div>
+<hr>
+</body>
+</html>
diff --git a/help/chapter03.html b/help/chapter03.html
new file mode 100644
index 0000000..ab84ff6
--- /dev/null
+++ b/help/chapter03.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter02.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter04.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Introduction</td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Overview</td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>3. First run</h1>
+The first run appears in the following cases:<br>
+- you run TiEmu for the first time,<br>
+- the tiemu.ini file doesn't exist yet.<br>
+<br>
+At startup, TiEmu will scan the <span style="font-style: italic;">images</span>
+folder to search for various file :<br>
+- FLASH upgrades or ROM dumps: they will be automatically converted
+into an image and <span style="font-style: italic;">deleted</span>,<br>
+- TiEmu images: they will be listed.<br>
+If images are found, this box let you choose the image you want to run :<br>
+<br>
+<div style="text-align: center;"><img alt="" src="romversion.png"
+ style="width: 328px; height: 274px;"><br>
+</div>
+<br>
+Else, you will get the wizard box :<br>
+<div style="text-align: center;"><img alt="" src="wizard.png"
+ style="width: 313px; height: 261px;"><br>
+</div>
+<br>
+You have 4 choices:<br>
+- use PedroM (GPL'ed replacement OS shipped with TiEmu),<br>
+- download a FLASH OS upgrade (AMS) from the <a
+ href="http://education.ti.com/">TI web site</a>. You will enter the
+filename on the next step,<br>
+- you already have a ROM dump and choose it on the next step,<br>
+- get informations on how to get a ROM dump because TiEmu does not have
+a built-in ROM dumper. For instance, you can use TiLP to get one and
+re-run TiEmu later.<br>
+<br>
+<div style="text-align: center;"><span style="font-weight: bold;">Please
+note that redistribution of ROM
+dumps is illegal; they are copyrighted by TI.</span><br>
+</div>
+<hr>
+</body>
+</html>
diff --git a/help/chapter04.html b/help/chapter04.html
new file mode 100644
index 0000000..12a5166
--- /dev/null
+++ b/help/chapter04.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter03.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter05.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">First run</td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Keyboard mapping<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>4. Overview</h1>
+When you launch it, TiEmu take some a while for initializing it. After
+that, you get this:<br>
+<br>
+<div style="text-align: center;"><img alt="" src="tiemu.jpg"
+ style="width: 579px; height: 362px;"><br>
+</div>
+<br>
+The windows is made up of an image called skin that you can change it
+at any time. The skin contains an LCD area and some areas for key
+presses.<br>
+A key can be pressed with the mouse (left button) by clicking onto the
+skin or by using the keyboard (see keyboard mapping topic). This is
+customizable.<br>
+<br>
+Else, the right button of your mouse lets you access a popup menu which
+contains all you need for configuring/using the emulator.<br>
+<br>
+You can resize the window by dragging it and TiEmu will maintain a
+constant aspect ratio. Take in mind that the larger the window is, the
+more CPU is used!<br>
+<span style="font-weight: bold;"></span><br>
+<hr>
+</body>
+</html>
diff --git a/help/chapter05.html b/help/chapter05.html
new file mode 100644
index 0000000..5cc5bad
--- /dev/null
+++ b/help/chapter05.html
@@ -0,0 +1,716 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter04.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter06.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Overview</td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Popup menu<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>5. Keyboard mapping<br>
+</h1>
+<h2>5.1 Default mapping </h2>
+The best way to do keypresses is by using your PC keyboard. The layout
+has been designed for American English (QWERTY) keyboards. Given that
+some TI keys does not exist on a real keyboard, we need to bind them
+on some PC keys. This depends on the calculator model you emulate.<br>
+<br>
+Note that the keyboard mapping is the same as VTI, the well known TI
+emulator for Windows.<br>
+<br>
+<table style="width: 100%; text-align: left;" border="1" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">TI92(+)/V200<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">PC<br>
+      </td>
+      <td colspan="1" rowspan="10"
+ style="vertical-align: top; text-align: center;"><br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">TI92+/V200<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">PC<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">APPS<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">F9<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">sin<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Insert<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">THETA<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">;<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">cos<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Home<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">STO><br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">TAB<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">tan<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Page Up<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">diamond<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">CTRL<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">CLEAR<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Delete<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">2nd<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">ALT<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">ON<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Scroll Lock<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">(<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">[<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">ENTER1<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">ENTER /
+NumPad ENTER<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">)<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">]<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">ENTER2<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">End [Linux]<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">HAND/LOCK<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">CAPS LOCK<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">^<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Page Down<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">LN<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">\<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;"><br>
+      </td>
+      <td style="vertical-align: top; text-align: center;"><br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<table style="width: 100%; text-align: left;" border="1" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">TI89
+(Titanium)<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">PC<br>
+      </td>
+      <td colspan="1" rowspan="7"
+ style="vertical-align: top; text-align: center;"><br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">TI89
+(Titanium)</td>
+      <td style="vertical-align: top; text-align: center;">PC<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">CATALOG<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">F6<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">MODE<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">`<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">APPS<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">F9<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">|<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">\<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">STO><br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">TAB<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">EE<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Insert<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">diamond<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">CTRL<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">CLEAR<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Delete<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">2nd<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">ALT<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">ON<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Scroll Lock<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">alpha<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">CAPS LOCK<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">^<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Page Up<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; text-align: center;">HOME<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Home<br>
+      </td>
+      <td style="vertical-align: top;"><br>
+      </td>
+      <td style="vertical-align: top;"><br>
+      </td>
+      <td style="vertical-align: top;"><br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<h2>5.2 Custom mapping </h2>
+With TiEmu, you can define and use your own mapping. This is done thru
+a 'keyboard mapping file' or 'keymap' for short. Keymaps are located in
+the <span style="font-style: italic;">skins</span> folder and have the
+<span style="font-style: italic;">.map</span> extension. Default
+keymaps are ti89.map (TI89, TI89 Titanium) and ti92.map (TI92, TI92+,
+V200PLT).<br>
+<br>
+Those keymaps are text files with a straightforward syntax :<br>
+<pre style="margin-left: 40px;">Model: TI89t</pre>
+<pre style="margin-left: 40px;">// English mapping (VTi-compatible)</pre>
+<pre style="margin-left: 40px;">// Alphabetical</pre>
+<pre style="margin-left: 40px;">PCKEY_A:TIKEY_EQUALS,TIKEY_ALPHA</pre>
+<pre style="margin-left: 40px;">PCKEY_OEM_SCROLL:TIKEY_ON</pre>
+Model can be 'ti89', 'ti92', 'ti92+', 'v200' or 'ti89t'.<br>
+Comments can be placed in the file:; they have to start with a '//'
+character.<br>
+Next, there are some key pairs: "PCKEY_xxx:TIKEY_xxx,TIKEY_yyy".
+PCKEY_xxx is the input key, TIKEY_xxx, TIKEY_yyy are the output keys.<br>
+<br>
+If you want to write your own keymap, you may need to know which
+scancode to bind to. TiEmu can help you by displaying it if you set the
+'kbd_dbg' variable in the <span style="font-style: italic;">tiemu.ini</span>
+file to 'yes'. Windows users will have to set the 'console' variable to
+'yes', too.<br>
+<br>
+List of TI keys:<br>
+<br>
+<table style="width: 100%; text-align: left;" border="1" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><span
+ style="font-family: courier new;">const KeyTuple tikeys[] = {</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_DOWN,       "TIKEY_DOWN" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_RIGHT,      "TIKEY_RIGHT" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_UP,         "TIKEY_UP" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_LEFT,       "TIKEY_LEFT" },  </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_HAND,       "TIKEY_HAND" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_SHIFT,      "TIKEY_SHIFT" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_DIAMOND,    "TIKEY_DIAMOND" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_2ND,        "TIKEY_2ND" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_3,         
+"TIKEY_3" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_2,         
+"TIKEY_2" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_1,         
+"TIKEY_1" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F8,         "TIKEY_F8" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_W,         
+"TIKEY_W" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_S,         
+"TIKEY_S" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_Z,         
+"TIKEY_Z" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_6,         
+"TIKEY_6" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_5,         
+"TIKEY_5" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_4,         
+"TIKEY_4" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F3,         "TIKEY_F3" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_E,         
+"TIKEY_E" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_D,         
+"TIKEY_D" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_X,         
+"TIKEY_X" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_9,         
+"TIKEY_9" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_8,         
+"TIKEY_8" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_7,         
+"TIKEY_7" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F7,         "TIKEY_F7" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_R,         
+"TIKEY_R" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F,         
+"TIKEY_F" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_C,         
+"TIKEY_C" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_STORE,      "TIKEY_STORE" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_COMMA,      "TIKEY_COMMA" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_PARIGHT,    "TIKEY_PARIGHT" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_PALEFT,     "TIKEY_PALEFT" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F2,         "TIKEY_F2" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_T,         
+"TIKEY_T" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_G,         
+"TIKEY_G"  },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_V,         
+"TIKEY_V" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_SPACE,      "TIKEY_SPACE"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_TAN,        "TIKEY_TAN"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_COS,        "TIKEY_COS" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_SIN,        "TIKEY_SIN" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F6,         "TIKEY_F6" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_Y,         
+"TIKEY_Y" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_H,         
+"TIKEY_H" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_B,         
+"TIKEY_B" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_DIVIDE,     "TIKEY_DIVIDE"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_P,         
+"TIKEY_P"}, </span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_ENTER2,     "TIKEY_ENTER2"}, </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_LN,         "TIKEY_LN" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F1,         "TIKEY_F1" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_U,         
+"TIKEY_U" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_J,         
+"TIKEY_J" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_N,         
+"TIKEY_N" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_POWER,      "TIKEY_POWER"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_MULTIPLY,   "TIKEY_MULTIPLY" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_APPS,       "TIKEY_APPS" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_CLEAR,      "TIKEY_CLEAR" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F5,        
+"TIKEY_F5"  },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_I,         
+"TIKEY_I" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_K,         
+"TIKEY_K" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_M,         
+"TIKEY_M" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_EQUALS,     "TIKEY_EQUALS"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_NU,         "TIKEY_NU"}, </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_ESCAPE,     "TIKEY_ESCAPE"}, </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_MODE,       "TIKEY_MODE"}, </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_PLUS,       "TIKEY_PLUS"}, </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_O,         
+"TIKEY_O" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_L,         
+"TIKEY_L" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_THETA,      "TIKEY_THETA" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_BACKSPACE,  "TIKEY_BACKSPACE" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_NEGATE,     "TIKEY_NEGATE"}, </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_PERIOD,     "TIKEY_PERIOD" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_0,         
+"TIKEY_0" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_F4,         "TIKEY_F4" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_Q,         
+"TIKEY_Q" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_A,         
+"TIKEY_A" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_ENTER1,     "TIKEY_ENTER1"}, </span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_MINUS,      "TIKEY_MINUS"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_ON,         "TIKEY_ON"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_ALPHA,      "TIKEY_ALPHA" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_EE,        
+"TIKEY_EE"  },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_CATALOG,    "TIKEY_CATALOG" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_HOME,       "TIKEY_HOME" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_PIPE,       "TIKEY_PIPE" },</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    {
+TIKEY_VOID,       "TIKEY_VOID"},</span><br
+ style="font-family: courier new;">
+      <span style="font-family: courier new;">    { -1,
+"" },</span><br style="font-family: courier new;">
+      <span style="font-family: courier new;">};</span><br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+List of PC keys:<br>
+<br>
+<table style="width: 100%; text-align: left; font-family: courier new;"
+ border="1" cellpadding="2" cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;">const KeyTuple pckeys[] = {<br>
+    { PCKEY_LBUTTON, "PCKEY_LBUTTON" },<br>
+    { PCKEY_RBUTTON, "PCKEY_RBUTTON" },<br>
+    { PCKEY_CANCEL, "PCKEY_CANCEL" },<br>
+    { PCKEY_MBUTTON, "PCKEY_MBUTTON" },<br>
+    { PCKEY_BACK, "PCKEY_BACK" },<br>
+    { PCKEY_TAB, "PCKEY_TAB" },<br>
+    { PCKEY_CLEAR, "PCKEY_CLEAR" },<br>
+    { PCKEY_RETURN, "PCKEY_RETURN" },<br>
+    { PCKEY_SHIFT, "PCKEY_SHIFT" },<br>
+    { PCKEY_CONTROL, "PCKEY_CONTROL" },<br>
+    { PCKEY_MENU, "PCKEY_MENU" },<br>
+    { PCKEY_PAUSE, "PCKEY_PAUSE" },<br>
+    { PCKEY_CAPITAL, "PCKEY_CAPITAL" },<br>
+    { PCKEY_ESCAPE, "PCKEY_ESCAPE" },<br>
+    { PCKEY_SPACE, "PCKEY_SPACE" },<br>
+    { PCKEY_PRIOR, "PCKEY_PRIOR" },<br>
+    { PCKEY_NEXT, "PCKEY_NEXT" },<br>
+    { PCKEY_END, "PCKEY_END" },<br>
+    { PCKEY_HOME, "PCKEY_HOME" },<br>
+    { PCKEY_LEFT, "PCKEY_LEFT" },<br>
+    { PCKEY_UP, "PCKEY_UP" },<br>
+    { PCKEY_RIGHT, "PCKEY_RIGHT" },<br>
+    { PCKEY_DOWN, "PCKEY_DOWN" },<br>
+    { PCKEY_SELECT, "PCKEY_SELECT" },<br>
+    { PCKEY_PRINT, "PCKEY_PRINT" },<br>
+    { PCKEY_EXECUTE, "PCKEY_EXECUTE" },<br>
+    { PCKEY_SNAPSHOT, "PCKEY_SNAPSHOT" },<br>
+    { PCKEY_INSERT, "PCKEY_INSERT" },<br>
+    { PCKEY_DELETE, "PCKEY_DELETE" },<br>
+    { PCKEY_HELP, "PCKEY_HELP" },<br>
+    { PCKEY_0, "PCKEY_0" },<br>
+    { PCKEY_1, "PCKEY_1" },<br>
+    { PCKEY_2, "PCKEY_2" },<br>
+    { PCKEY_3, "PCKEY_3" },<br>
+    { PCKEY_4, "PCKEY_4" },<br>
+    { PCKEY_5, "PCKEY_5" },<br>
+    { PCKEY_6, "PCKEY_6" },<br>
+    { PCKEY_7, "PCKEY_7" },<br>
+    { PCKEY_8, "PCKEY_8" },<br>
+    { PCKEY_9, "PCKEY_9" },<br>
+    { PCKEY_A, "PCKEY_A" },<br>
+    { PCKEY_B, "PCKEY_B" },<br>
+    { PCKEY_C, "PCKEY_C" },<br>
+    { PCKEY_D, "PCKEY_D" },<br>
+    { PCKEY_E, "PCKEY_E" },<br>
+    { PCKEY_F, "PCKEY_F" },<br>
+    { PCKEY_G, "PCKEY_G" },<br>
+    { PCKEY_H, "PCKEY_H" },<br>
+    { PCKEY_I, "PCKEY_I" },<br>
+    { PCKEY_J, "PCKEY_J" },<br>
+    { PCKEY_K, "PCKEY_K" },<br>
+    { PCKEY_L, "PCKEY_L" },<br>
+    { PCKEY_M, "PCKEY_M" },<br>
+    { PCKEY_N, "PCKEY_N" },<br>
+    { PCKEY_O, "PCKEY_O" },<br>
+    { PCKEY_P, "PCKEY_P" },<br>
+    { PCKEY_Q, "PCKEY_Q" },<br>
+    { PCKEY_R, "PCKEY_R" },<br>
+    { PCKEY_S, "PCKEY_S" },<br>
+    { PCKEY_T, "PCKEY_T" },<br>
+    { PCKEY_U, "PCKEY_U" },<br>
+    { PCKEY_V, "PCKEY_V" },<br>
+    { PCKEY_W, "PCKEY_W" },<br>
+    { PCKEY_X, "PCKEY_X" },<br>
+    { PCKEY_Y, "PCKEY_Y" },<br>
+    { PCKEY_Z, "PCKEY_Z" },<br>
+    { PCKEY_STARTKEY, "PCKEY_STARTKEY" },<br>
+    { PCKEY_CONTEXTKEY, "PCKEY_CONTEXTKEY" },<br>
+    { PCKEY_NUMPAD0, "PCKEY_NUMPAD0" },<br>
+    { PCKEY_NUMPAD1, "PCKEY_NUMPAD1" },<br>
+    { PCKEY_NUMPAD2, "PCKEY_NUMPAD2" },<br>
+    { PCKEY_NUMPAD3, "PCKEY_NUMPAD3" },<br>
+    { PCKEY_NUMPAD4, "PCKEY_NUMPAD4" },<br>
+    { PCKEY_NUMPAD5, "PCKEY_NUMPAD5" },<br>
+    { PCKEY_NUMPAD6, "PCKEY_NUMPAD6" },<br>
+    { PCKEY_NUMPAD7, "PCKEY_NUMPAD7" },<br>
+    { PCKEY_NUMPAD8, "PCKEY_NUMPAD8" },<br>
+    { PCKEY_NUMPAD9, "PCKEY_NUMPAD9" },<br>
+    { PCKEY_MULTIPLY, "PCKEY_MULTIPLY" },<br>
+    { PCKEY_ADD, "PCKEY_ADD" },<br>
+    { PCKEY_SEPARATOR, "PCKEY_SEPARATOR" },<br>
+    { PCKEY_SUBTRACT, "PCKEY_SUBTRACT" },<br>
+    { PCKEY_DECIMAL, "PCKEY_DECIMAL" },<br>
+    { PCKEY_DIVIDE, "PCKEY_DIVIDE" },<br>
+    { PCKEY_F1, "PCKEY_F1" },<br>
+    { PCKEY_F2, "PCKEY_F2" },<br>
+    { PCKEY_F3, "PCKEY_F3" },<br>
+    { PCKEY_F4, "PCKEY_F4" },<br>
+    { PCKEY_F5, "PCKEY_F5" },<br>
+    { PCKEY_F6, "PCKEY_F6" },<br>
+    { PCKEY_F7, "PCKEY_F7" },<br>
+    { PCKEY_F8, "PCKEY_F8" },<br>
+    { PCKEY_F9, "PCKEY_F9" },<br>
+    { PCKEY_F10, "PCKEY_F10" },<br>
+    { PCKEY_F11, "PCKEY_F11" },<br>
+    { PCKEY_F12, "PCKEY_F12" },<br>
+    { PCKEY_F13, "PCKEY_F13" },<br>
+    { PCKEY_F14, "PCKEY_F14" },<br>
+    { PCKEY_F15, "PCKEY_F15" },<br>
+    { PCKEY_F16, "PCKEY_F16" },<br>
+    { PCKEY_F17, "PCKEY_F17" },<br>
+    { PCKEY_F18, "PCKEY_F18" },<br>
+    { PCKEY_F19, "PCKEY_F19" },<br>
+    { PCKEY_F20, "PCKEY_F20" },<br>
+    { PCKEY_F21, "PCKEY_F21" },<br>
+    { PCKEY_F22, "PCKEY_F22" },<br>
+    { PCKEY_F23, "PCKEY_F23" },<br>
+    { PCKEY_F24, "PCKEY_F24" },<br>
+    { PCKEY_NUMLOCK, "PCKEY_NUMLOCK" },<br>
+    { PCKEY_OEM_SCROLL, "PCKEY_OEM_SCROLL" },<br>
+    { PCKEY_OEM_1, "PCKEY_OEM_1" },<br>
+    { PCKEY_OEM_PLUS, "PCKEY_OEM_PLUS" },<br>
+    { PCKEY_OEM_COMMA, "PCKEY_OEM_COMMA" },<br>
+    { PCKEY_OEM_MINUS, "PCKEY_OEM_MINUS" },<br>
+    { PCKEY_OEM_PERIOD, "PCKEY_OEM_PERIOD" },<br>
+    { PCKEY_OEM_2, "PCKEY_OEM_2" },<br>
+    { PCKEY_OEM_3, "PCKEY_OEM_3" },<br>
+    { PCKEY_OEM_4, "PCKEY_OEM_4" },<br>
+    { PCKEY_OEM_5, "PCKEY_OEM_5" },<br>
+    { PCKEY_OEM_6, "PCKEY_OEM_6" },<br>
+    { PCKEY_OEM_7, "PCKEY_OEM_7" },<br>
+    { PCKEY_OEM_8, "PCKEY_OEM_8" },<br>
+    { PCKEY_ICO_F17, "PCKEY_ICO_F17" },<br>
+    { PCKEY_ICO_F18, "PCKEY_ICO_F18" },<br>
+    { PCKEY_OEM102, "PCKEY_OEM102" },<br>
+    { PCKEY_ICO_HELP, "PCKEY_ICO_HELP" },<br>
+    { PCKEY_ICO_00, "PCKEY_ICO_00" },<br>
+    { PCKEY_ICO_CLEAR, "PCKEY_ICO_CLEAR" },<br>
+    { PCKEY_OEM_RESET, "PCKEY_OEM_RESET" },<br>
+    { PCKEY_OEM_JUMP, "PCKEY_OEM_JUMP" },<br>
+    { PCKEY_OEM_PA1, "PCKEY_OEM_PA1" },<br>
+    { PCKEY_OEM_PA2, "PCKEY_OEM_PA2" },<br>
+    { PCKEY_OEM_PA3, "PCKEY_OEM_PA3" },<br>
+    { PCKEY_OEM_WSCTRL, "PCKEY_OEM_WSCTRL" },<br>
+    { PCKEY_OEM_CUSEL, "PCKEY_OEM_CUSEL" },<br>
+    { PCKEY_OEM_ATTN, "PCKEY_OEM_ATTN" },<br>
+    { PCKEY_OEM_FINNISH, "PCKEY_OEM_FINNISH" },<br>
+    { PCKEY_OEM_COPY, "PCKEY_OEM_COPY" },<br>
+    { PCKEY_OEM_AUTO, "PCKEY_OEM_AUTO" },<br>
+    { PCKEY_OEM_ENLW, "PCKEY_OEM_ENLW" },<br>
+    { PCKEY_OEM_BACKTAB, "PCKEY_OEM_BACKTAB" },<br>
+    { PCKEY_ATTN, "PCKEY_ATTN" },<br>
+    { PCKEY_CRSEL, "PCKEY_CRSEL" },<br>
+    { PCKEY_EXSEL, "PCKEY_EXSEL" },<br>
+    { PCKEY_EREOF, "PCKEY_EREOF" },<br>
+    { PCKEY_PLAY, "PCKEY_PLAY" },<br>
+    { PCKEY_ZOOM, "PCKEY_ZOOM" },<br>
+    { PCKEY_NONAME, "PCKEY_NONAME" },<br>
+    { PCKEY_PA1, "PCKEY_PA1" },<br>
+    { PCKEY_OEM_CLEAR, "PCKEY_OEM_CLEAR" },<br>
+    { -1, "" },<br>
+};<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br style="font-family: courier new;">
+<hr style="font-family: courier new;">
+</body>
+</html>
diff --git a/help/chapter06.html b/help/chapter06.html
new file mode 100644
index 0000000..79bff81
--- /dev/null
+++ b/help/chapter06.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter05.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter07.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Keyboard mapping</td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Debugger<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>6. Popup menu</h1>
+By clicking the right button menu anywhere on the main window, you gain
+access to the functionnalities of the emulator. If you let your mouse
+cursor on the item during some while, a tooltip will appear.<br>
+On iPAQ, you have to touch-point on the LCD region.<br>
+<br>
+The menu
+is organized as follow :<br>
+<div style="text-align: center;"><img alt="" src="popup_menu.png"
+ style="width: 191px; height: 323px;"><br>
+</div>
+<br>
+<h2>6.1 Link </h2>
+The <span style="font-style: italic;">Send file to TiEmu</span> item
+will let you choose a file to load into the emulator while being on the
+HOME screen. You can choose
+one or several files at a time. You can drag and drop them from
+anywhere to the  TiEmu main windows, too.<br>
+<br>
+The <span style="font-style: italic;">Debug file with TiEmu</span>
+item
+will let you choose a file to debug using the emulator: First, the file
+(which should be an uncompressed TIGCC program compiled with debugging
+information) will be loaded into the emulator and a program entry
+breakpoint will be set on it. You then need to run the program, passing
+any arguments it requires. TiEmu will then intercept the launch, bypass
+any OS execution protections (so you need not worry about these), open
+the debugger and load the debugging information file (the .dbg file
+corresponding to your program, and looked up in the same folder as your
+program). It will also set a GDB breakpoint on the main function, so if
+you don't need to debug the TIGCC startup code, just click "Continue"
+in the Insight Source Window to get to the beginning of your main
+function. You can choose only one file at a time; any data files
+required by the program need to be sent separately using
+<span style="font-style: italic;">Send file to TiEmu</span>.<br>
+<br>
+The <span style="font-style: italic;">Settings</span> item opens a
+dialog box. This is a large topic which is covered elsewhere. See the
+corresponding
+section...<br>
+<br>
+The <span style="font-style: italic;">Quick send...</span> item
+is a convenient feature when testing program being under development.
+It allows to specify a file to send whenever you press F10 or click the
+<span style="font-style: italic;">Send file to TiEmu</span> item.<br>
+When enabled, the dialog box displayed by <span
+ style="font-style: italic;">Send file</span> is completely by-passed.<br>
+<br>
+The <span style="font-style: italic;">Listen for files</span> item
+lets
+you
+enable (checked) or disable (unchecked) the receiving of variables
+from TiEmu. You should uncheck it if your program accesses the linkport
+for sound.<br>
+<br>
+<span style="font-style: italic;">Emulate Sound</span> enable sound
+emulation to speakers. Check it if your program accesses the linkport
+for sound.<br>
+<h2>6.2 Configuration and State</h2>
+You can save or load a particular configuration. A configuration
+contains the current parameters of the emulator (emulator image to use,
+size of the window, link cable type, ...). It does not contain any
+information on the calculator state. The configuration is saved in the
+<span style="font-style: italic;">tiemu.ini</span> file. This is a text
+file and its format is described in the command line section.<br>
+<br>
+The calculator state can be saved, loaded or reverted (automatically
+load the last previously saved state). <br>
+This can be done at any time. The revert option is useful to reload the
+latest saved state.<br>
+<br>
+The state is
+saved in a file containing an image of the calculator content (UAE
+structures of the m68k engine, I/O ports, RAM, RTC, FLASH, LCD address,
+contrast, HW protection state, archive limit, ...) and of some
+environmental variables (all breakpoints).<br>
+<h2>6.3 Debugger</h2>
+This is a large topic which is covered elsewhere. See the corresponding
+section...<br>
+<br>
+<span style="font-style: italic;">Reset calc</span>: this completely
+resets the calculator by loading the RESET/SSP vectors and issuing a
+reset of the processor. The linkport is reset, too. Other devices
+(ASIC, RAM, FLASH, ...) are left un-touched.<br>
+This is not like you removed batteries
+for a while.<br>
+<br>
+<span style="font-style: italic;">Upgrade calc</span>: allows you to
+load a TI's OS FLASH upgrade into the calculator without needing to
+send it. If you save the calculator state, TiEmu will remind the
+upgrade and load it after image at startup.<br>
+<h2>6.4 Options</h2>
+<span style="font-style: italic;">Set ROM version</span>: lets you
+choose an existing image from a list. If you want to add an image,
+click the <span style="font-style: italic;">Import</span> button to
+convert a ROM dump or a FLASH upgrade into an image. <br>
+You can drag and drop a ROM dump or FLASH upgrade onto the TiEm main
+window. The file will be automatically imported and you will get the
+box below.<br>
+Note: TiEmu scans the <span style="font-style: italic;">images</span>
+folder whenever you run this box.<br>
+<br>
+<div style="text-align: center;"><img alt="" src="romversion.png"
+ style="width: 328px; height: 274px;"><br>
+</div>
+<br>
+<span style="font-style: italic;">Misc options</span>: <br>
+- <span style="font-style: italic;">restrict to actual speed</span>:
+if checked, TiEmu will run the hand-held at its nominal speed. Else, it
+will run it at the maximum the CPU is capable of.<br>
+- <span style="font-style: italic;">HW protection</span>: if checked,
+the HW protection device is enabled and emulated. TiEmu needs to be
+restarted (or an image to be loaded) for changes to take effect.<br>
+<br>
+- <span style="font-style: italic;">normal view</span>: display skin
+and/or lcd with a 1x ratio,<br>
+- [Win32] <span style="font-style: italic;">large view</span>: same
+with 2x
+ratio (note: this mode will use more CPU),<br>
+- [Linux] <span style="font-style: italic;">large view</span>: same
+with 2x
+ratio (note: the skin may not be resized to 2x with some WM, it will be
+resized to fit the screen),<br>
+- <span style="font-style: italic;">full screen</span>: display LCD
+only and make it fits the screen (currently disabled because it is
+excessively CPU intensive under Win32).<br>
+<br>
+<span style="font-style: italic;">Skin for current calc</span>: <span
+ style="font-style: italic;">none</span>, <span
+ style="font-style: italic;">default</span>, <span
+ style="font-style: italic;">other</span>. <br>
+The first option lets you remove the skin to just display the LCD. In
+this mode, you keep access to the right click menu but you have to use
+the keyboard for TI keys:<br>
+<br>
+<div style="text-align: center;"><img alt="" src="no_skin.png"
+ style="width: 248px; height: 162px;"><br>
+</div>
+<br>
+The second option makes TiEmu fall back on the built-in skin. <br>
+The third option lets you choose a skin of your own. You can drag and
+drop a skin file to the  TiEmu main windows, too.<br>
+Note: the skin must be a TiEmu
+compatible skin (see the Skin section) else it will be rejected.<br>
+<h2>6.5 Infos</h2>
+<span style="font-style: italic;">Misc</span>: gives you access to this
+help and ManPage, ChangeLog, About.<br>
+<br>
+<span style="font-style: italic;">Info</span>: enumerates current
+calculator information like this:<br>
+<br>
+<div style="text-align: center;"><img alt="" src="calc_infos.png"
+ style="width: 265px; height: 236px;"><br>
+</div>
+<br>
+<h2>6.6 Exiting</h2>
+<span style="font-style: italic;">Exit and save state</span>: TiEmu
+will save both <span style="font-weight: bold;">state</span> and <span
+ style="font-weight: bold;">configuration</span> before exiting.<br>
+<br>
+<span style="font-style: italic;">Exit without saving state</span>:
+TiEmu will exit <span style="font-weight: bold;">without</span> saving
+state and configuration.<br>
+<br>
+<hr>
+</body>
+</html>
diff --git a/help/chapter07.html b/help/chapter07.html
new file mode 100644
index 0000000..8c99e25
--- /dev/null
+++ b/help/chapter07.html
@@ -0,0 +1,343 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter06.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter08.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Popup menu<br>
+      </td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Screenshots<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>7. Debugger</h1>
+Debugging mode is entered when a breakpoint is encountered or when the
+user launches the debugger by the popup menu or by pressing the F11
+key. This will stop the emulation engine but the LCD is still refreshed.<br>
+<br>
+Note: debugger windows are preloaded at startup in order to display
+them quicker. The source code window may take a while to be displayed
+the first time: this is due to ROM call parsing.<br>
+<br>
+TiEmu shows two debuggers simultaneously: a built-in assembly-level
+debugger, and the GDB/Insight-derived source-level debugger (+gdb
+release). These two
+debuggers have been adapted to interoperate seamlessly.<br>
+<br>
+The assembly-level debugger is made-up of several frames:<br>
+- source code<br>
+- registers<br>
+- memory<br>
+- breakpoints<br>
+- PC trace<br>
+- stack<br>
+- heap (handles)<br>
+<br>
+The source-level debugger is also made-up of several frames:
+<ul>
+  <li><a href="../../insight1.0/help/breakpoint.html">Breakpoint Window</a></li>
+  <li><a href="../../insight1.0/help/console.html">Console Window</a></li>
+  <li><a href="../../insight1.0/help/browser.html">Function Browser</a></li>
+  <li><a href="../../insight1.0/help/locals.html">Locals Window</a></li>
+  <li><a href="../../insight1.0/help/memory.html">Memory Window</a></li>
+  <li><a href="../../insight1.0/help/register.html">Register Window</a></li>
+  <li><a href="../../insight1.0/help/source.html">Source Window</a></li>
+  <li><a href="../../insight1.0/help/stack.html">Stack Window</a></li>
+  <li><a href="../../insight1.0/help/watch.html">Watch Window</a></li>
+</ul>
+These frames can be moved and/or resized (TiEmu saves/restores this
+with
+the configuration).<br>
+Frames are automatically refreshed when a change occurs from another
+frame.<br>
+<br>
+Moreover, these frames can be controlled (maximize/minimize &
+show/hide) from the Windows menu of the source code window (considered
+as the main window).<br>
+You can also change the <span style="font-style: italic;">transient</span>
+mode. When enabled, all of the TiEmu windows are grouped together as
+there was a single window.<br>
+<h2>7.1 Source code<br>
+</h2>
+<div style="text-align: center;">
+<div style="text-align: left;">This frame is the main one:<br>
+</div>
+<img alt="" src="dbg_source.png" style="width: 328px; height: 321px;"><br>
+</div>
+<br>
+You can browse the source code with the arrow and PageUp/Down keys. The
+green bar shows the current PC location. The blue one is the selection.
+The
+red cross is a breakpoint.<br>
+<br>
+By right-clicking, you get the popup menu:<br>
+- <span style="font-style: italic;">go to address</span>: enter the
+address to go,<br>
+- <span style="font-style: italic;">go to PC</span>: jump to PC
+location,<br>
+- <span style="font-style: italic;">set breakpoint (F2)</span>: place
+a breakpoint at the selection. The bkpt frame is updated,<br>
+- <span style="font-style: italic;">set temporary breakpoint (F3)</span>:
+place a breakpoint at the selection. This bkpt will be automatically
+removed when encountered.<br>
+- <span style="font-style: italic;">set PC to selection (F6)</span>:
+load
+PC with the address at the selection,<br>
+- <span style="font-style: italic;">view memory (Ctrl+M)</span>: open
+a tab in
+the memory frame with the address at the selection.<br>
+<br>
+The combo box lets you choose a ROM call by using the arrow. You can
+type it, too. It has automatic completion. Once selected, the view is
+updated to begin on the ROM call's address.<br>
+<br>
+Debugging facilities provided are: <br>
+- <span style="font-style: italic;">run (F5) / break (F11)</span>:
+start/stop
+emulation engine without closing frames, <br>
+- <span style="font-style: italic;">step in/out/over (F7/F8/F9):</span><br>
+    step in equals to step by step<br>
+    step out runs PC until a RTS/RTR/RTD/RTE/STOP
+instruction is reached (go out of the sub-routine)<br>
+    step over runs PC until the instruction after the
+current one is reached (skips all code in a sub-routine for instance),
+except for branches. <br>
+    This works for JSR/BSR/FLINE/DBCC/TRAP, <br>
+- <span style="font-style: italic;">run to cursor (F4)</span>: runs PC
+until the address under the cursor is reached.<br>
+<br>
+Miscellaneous shortcuts:<br>
+- F1: set selection and PC to <span style="font-style: italic;">next</span>
+line<br>
+- 'd': copy source code window content to C:\disasm.txt
+(unofficial
+feature, for various purposes)<br>
+- 'g': go to address (box)<br>
+<h2>7.2 Registers</h2>
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="text-align: center; vertical-align: top;"><img alt=""
+ src="dbg_registers.png" style="width: 183px; height: 260px;"><br>
+      </td>
+      <td style="vertical-align: top;">This frame displays all of the
+registers of the MC68000 processor. Take a look at the m68k
+user's manual if needed.<br>
+      <br>
+USP = User Stack Pointer (A7 in user mode, S=0).<br>
+SSP = System Stack Pointer (A7 is supervisor mode, S=1).<br>
+The active pointer is displayed in the stack frame.<br>
+      <br>
+SR is displayed in 2 modes: hexadecimal and single flags.<br>
+      <br>
+Each field is in-place editable.<br>
+      <br>
+By right-clicking on the address/data registers content, you will open
+a tab in the memory view at the adress contained in the register.
+Useful for browsing pointers and/or arrays.<br>
+      <div style="text-align: center;"><br>
+      </div>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<h2>7.3 Memory</h2>
+<div style="text-align: center;">
+<div style="text-align: left;">
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><img alt="" src="dbg_mem.png"
+ style="width: 534px; height: 274px;"></td>
+      <td style="vertical-align: top;">You can add/remove as many tabs
+as you want by clicking on +/-.<br>
+Use the arrow keys or Page Up/Down keys to browse memory.<br>
+The fifth button allow to refresh the current view.<br>
+The last button (not shown) open a menu with a memory map of the
+calculator. By clicking an item, you automatically create a new
+tab at
+the given address. Very helpful!<br>
+      <br>
+Each value can be edited in-place. Click the cell and you will be able
+to enter an hexadecimal string (like 12, 1234, 567890).<br>
+      <br>
+By right-clicking, you will get the popup menu:<br>
+- <span style="font-style: italic;">find / find next</span>: opens a
+search dialog,<br>
+- <span style="font-style: italic;">go to address</span>: lets you
+enter a hexadecimal address to go to,<br>
+- <span style="font-style: italic;">dis-assemble</span>: updates the
+source frame at the selected address.<br>
+      <br>
+F1 to F6 keys are equivalent to pressing the corresponding toolbar
+button.<br>
+F7 and F8 allow you to move backward/forward into tabs.<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+Note: The memory window may show aliases (ghosts) which does not
+really exist on the real calculator. For instance, RAM on the TI-89
+Titanium exists at 0x00000-0x3ffff only but if you open a tab at
+0x40000, you will see RAM content at 0x000000. So, be careful!<br>
+<br>
+</div>
+</div>
+About the search dialog:<br>
+<br>
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><img alt="" src="dbg_search.png"
+ style="width: 306px; height: 191px;"><br>
+      </td>
+      <td style="vertical-align: top;">You can search for hexadecimal
+values or strings with or without case sensitivity (strings only).<br>
+      <br>
+Click the right button to start a search.<br>
+Click the middle button to find the next occurrence.<br>
+      <br>
+The occurrence is highlighted in green in the memory frame.<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<h2>7.4 Breakpoints</h2>
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><img alt="" src="dbg_bkpts.png"
+ style="width: 351px; height: 210px;"><br>
+      </td>
+      <td style="vertical-align: top;">This frame lets you manage
+several kinds of breakpoints:<br>
+- bit change (*)<br>
+- code (added from the source frame)<br>
+- exception (traps, auto-ints, ...)<br>
+- data access or range (*)<br>
+- program entry (the debugger is raised at the beginning of the program
+you
+have just launched).<br>
+      <br>
+Each breakpoint can be added or removed and enabled or disabled (except
+for prgm entry bkpts). You
+can go to the breakpoint location, too (last toolbar button).<br>
+      <br>
+(*) Warning: those breakpoints occur after instruction execution so the
+PC is pointing the instruction right after.<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<h2>7.5 PC trace</h2>
+This frame shows the 10 latest PC values. Double-clicking the row will
+update the source frame with the address in the row.<br>
+<h2>7.6 Stack frame</h2>
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><img alt="" src="dbg_stack.png"
+ style="width: 168px; height: 284px;"><br>
+      </td>
+      <td style="vertical-align: top;">The 'A7 (stack) is' shows the
+current active stack pointer (user/supervisor).<br>
+      <br>
+The frame displays the stack pointer (A7) and the frame pointer (A6)
+used on the TI for function call and data storage.<br>
+      <br>
+Content is displayed as word values only. You can browse it by using
+the arrow or Page Up/Down keys.<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<h2>7.7 Heap</h2>
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><img alt="" src="dbg_heap.png"
+ style="width: 168px; height: 274px;"><br>
+      </td>
+      <td style="vertical-align: top;">This frame displays all the
+handles the calculator has. It shows: <br>
+- handle number,<br>
+- address in memory,<br>
+- and size.<br>
+      <br>
+Double click the row to open a tab in the memory frame at the address
+pointed by the handle.<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<h2>7.8 Logging</h2>
+At the time being, only link logging is implemented.<br>
+<h3>7.8.1 Link</h3>
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><img src="log_link.png" alt=""
+ style="width: 478px; height: 213px;" hspace="0"></td>
+      <td style="vertical-align: top;">You can:<br>
+-  log data sent and/or received from/to link port,<br>
+- increase/decrease size of buffer.<br>
+      <br>
+To start logging, press <span style="font-style: italic;">Start</span>
+button and close (<span style="font-style: italic;">Close</span> button
+or cross).<br>
+To stop logging, press <span style="font-style: italic;">Stop</span>
+button and close (<span style="font-style: italic;">Close</span> button
+or cross).<br>
+      <br>
+The list contents is updated whenever you launch this box.<br>
+      <br>
+Contents can be saved at any time in text format by pressing the <span
+ style="font-style: italic;">Save</span> button.<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+<h2>7.9 <a href="../../insight1.0/help/index.html">Source-Level
+Debugger</a></h2>
+<hr>
+</body>
+</html>
diff --git a/help/chapter08.html b/help/chapter08.html
new file mode 100644
index 0000000..2ad63a7
--- /dev/null
+++ b/help/chapter08.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter07.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter09.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Debugger</td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Command Line<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>8. Screenshots</h1>
+TiEmu is able to do various screenshots in several formats. This part
+is slightly automated.<br>
+<h2>8.1 Settings </h2>
+From the popup menu, select <span style="font-style: italic;">Screenshot
+> Options</span>:<br>
+<br>
+<div style="text-align: center;"><span
+ style="text-decoration: underline;"></span><img alt=""
+ src="screenshot.png" style="width: 365px; height: 276px;"><br>
+</div>
+<br>
+<br>
+TiEmu currently supports 6 image formats: JPG (jpeg), PNG, ICO (Windows
+Icon), BMP, EPS (Encapsulated PostScript) and PDF (Adobe Portable
+Document
+Format) on both
+platforms. Image can be saved as color or B&W. You can choose to
+save the whole window or just the LCD area.<br>
+<br>
+Unless changed with the drop-down button menu, screenshots are saved in
+the application folder (C:\Program Files\TiEmu).
+<br>
+Filename is built by TiEmu with:<br>
+- a pattern : the base name,<br>
+- a counter which is incremented every time you trigger a snapshot (but
+saved if you save the whole configuration),<br>
+- an extension depending on the image format.<br>
+<br>
+Starting with TiEmu 2.81b (20060804), you can take several (n) screenshots at once
+(burst capture) every (m-1) frames .<br>
+The 'n' value is fixed by the <span style="font-style: italic;">shots</span> button
+while the 'm' value is specified by the <span
+ style="font-style: italic;">skips</span> button.<br>
+The example abolve will trigger 4 captures every 4 LCD frames.<br>
+<h2>8.2 To use it</h2>
+From the popup menu, select <span style="font-style: italic;">Screenshot
+> Now !</span> or simply press F9 for doing a screenshot with the
+current options. <br>
+<br>
+<hr>
+</body>
+</html>
diff --git a/help/chapter09.html b/help/chapter09.html
new file mode 100644
index 0000000..b2d66f1
--- /dev/null
+++ b/help/chapter09.html
@@ -0,0 +1,372 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter08.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter10.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Screenshots<br>
+      </td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Skins<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>9. Command line</h1>
+<p><font color="#000000">TiEmu can accept some arguments on the command
+line for specific purposes. The text below is an excerpt of the Linux
+'manpage' but it is appplicable to Windows, too. <br>
+Under Linux, manpage is accessible by typeing 'man tiemu' in the shell.<br>
+Windows users will open the <span style="font-style: italic;">ManPage.txt</span>
+file in <span style="font-style: italic;">C:\Program Files\TiEmu</span>
+folder.<br>
+</font></p>
+<table style="width: 100%; text-align: left;" border="0" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><font size="-1"><span
+ style="font-family: courier;">TIEMU(1)                                                             
+TIEMU(1)<br>
+      <br>
+      <br>
+      <br>
+NAME<br>
+       tiemu - a TI's hand-helds emulator
+(m68k-based)<br>
+      <br>
+SYNOPSYS<br>
+       tiemu [-h] [-v] [--help]
+[--version] [--import] [-rom=] [-tib=] [-sav=]<br>
+       [image]<br>
+      <br>
+DESCRIPTION<br>
+       The TiEmu program allows you to
+emulate a Texas Instruments  calculator<br>
+       such  as TI89, TI89 Titanium,
+TI92, TI92+ or V200PLT.  The emulator has<br>
+       also a virtual link capability
+which allows to connect  it  to  another<br>
+       program (such as TiLP for
+instance).<br>
+      <br>
+OPTIONS<br>
+       The command line options override
+the default options (startup options)<br>
+       and the config file options
+even.  The TiEmu program accepts  the  fol-<br>
+       lowing options:<br>
+      <br>
+       -h, --help<br>
+             
+Display a list of all command line options.<br>
+      <br>
+       -v, --version<br>
+             
+Output the version info.<br>
+      <br>
+       --import=<br>
+             
+Import ROM or TIB into repository and exit. Can be used for cre-<br>
+             
+ating images (as an example).  This flag must be set before -rom<br>
+             
+or -tib !<br>
+      <br>
+       -rom=  Convert and use the
+specified dump as image. Note that the image<br>
+             
+is added to the image repository.<br>
+      <br>
+       -tib=  Convert and use the
+specified tib/upgrade as image. Idem.<br>
+      <br>
+       -sav=  Load the specified
+state file. Must be a valid state  image  and<br>
+             
+target for emulated calculator.<br>
+      <br>
+      <br>
+CONFIG FILE FORMAT<br>
+       This section describes the format
+of the .tiemu config file which is in<br>
+       the home directory of the user
+(Linux) or in the Program  Files  folder<br>
+       (Win32). A line preceded by the
+'#' symbol is a comment.  Each line has<br>
+       the following  format: 
+key=value.   The  config  file  must 
+have  the<br>
+       'RC_END'  string  at
+end.  Every line can be put in any order.  Take in<br>
+       mind that any comment added in the
+config  file  will  be  overwritten.<br>
+       Below is described each option and
+the possible values:<br>
+      <br>
+       calctype=  Defines the
+calculator type for link parameter. Valid values<br>
+       are: ti89, ti89t, ti92, ti92+,
+v200.  Note: don't need  to  touch  this<br>
+       setting, it's overridden by TiEmu.
+Kept for compatibility.<br>
+      <br>
+       linktype=  Define 
+the  link  cable  type.  Choose one of the following<br>
+       value: none, parallel, serial,
+TIGraphLink, virtual,  TiEmulator,  VTi,<br>
+       UsbGraphLink.<br>
+      <br>
+       port=  Define  a 
+link  port  to use. Can be: null, user, parallel port<br>
+       #1|2|3, serial port #1|2|3|4,
+virtual port #1|2, USB port #1.<br>
+      <br>
+       method= Define an I/O method to
+use. Possible  values  are:  automatic,<br>
+       asm, api, driver, null.<br>
+      <br>
+       adr_port=  places 
+the  I/O  address  of the I/O port to use. It can be<br>
+       0x3F8 for a serial port or 0x378
+for a parallel port for instance.<br>
+      <br>
+       serial_device= places the
+character device name of the serial  port  to<br>
+       use with a Grey TIGL.<br>
+      <br>
+       timeout=  with 
+the  timeout  value to use in tenth of seconds. Default<br>
+       value: 20.<br>
+      <br>
+       delay= with the delay value 
+to  use  in  micro-seconds  for  home-made<br>
+       cables. Default value: 10<br>
+      <br>
+       background= Define whether TiEmu
+display the whole frame (keyboard+LCD)<br>
+       or just the LCD screen. Set to 0
+if you do not want  to  use  the  key-<br>
+       board.<br>
+      <br>
+       skin_file=  Define 
+the  custom  skin  file to use. Must be a full path<br>
+       name.<br>
+      <br>
+       keys_file= Define the keymap to
+use. Must be a full path name.<br>
+      <br>
+       img_file= Define the TiEmu image
+to load at startup.  Must  be  a  full<br>
+       path name.<br>
+      <br>
+       tib_file= Define the FLASH upgrade
+(tib or .9xu/.89u) to load after the<br>
+       image. Must be a full path name.<br>
+      <br>
+       sav_file= Define the calculator
+state image to load at startup.<br>
+      <br>
+       cpu_rate= Give the number of
+instructions executed by  the  M68000  per<br>
+       30ms timeslice. Default value is
+-1 (50000 insts/30ms).<br>
+      <br>
+       hw_rate= Give the OS2/OSC3
+oscillator rate. Default value is -1 (427 on<br>
+       hw1 and 732 on hw2; OSC2 is
+incremented every 6250 OSC1 cycles).<br>
+      <br>
+       lcd_rate= Define the frame rate of
+LCD refresh.  Default  value  is  -1<br>
+       (25ms => 40fps). Don't use a
+value smaller than 10ms.<br>
+      <br>
+       img_format=  Defines 
+the image format of the screenshots. Several for-<br>
+       mats are available: jpg, png and
+ico.<br>
+      <br>
+       img_type= You can do B/W (bw) or
+colored (color) screenshots.<br>
+      <br>
+       img_size= The size of the image
+that is to say you can shots  only  the<br>
+       LCD (lcd) or the entire window
+(skin).<br>
+      <br>
+       screen_file=  Defines 
+the  base  filename where the screenshot will be<br>
+       stored.<br>
+      <br>
+       screen_counter= This allows you to
+save the current screenshot counter.<br>
+       In   fact,  
+the   resulting   filename  
+is   computed   as   'screen-<br>
+       file[screen_counter].[img_format].
+Example: 'screenshot001.png'.<br>
+      <br>
+       console= Available under Windows
+platform only. You can  hide  (no)  or<br>
+       show  (yes)  the 
+DOS console at startup or even display it only during<br>
+       boot (boot).<br>
+      <br>
+       kbd_dbg= Display key bindings in
+the console if  set  (yes).  Else,  do<br>
+       nothing (no).<br>
+      <br>
+       fs_type=  TiEmu supports
+several file selectors for better integration.<br>
+       The following options are
+supported:<br>
+       - native: native one (default):
+Win32 on Windows, KDE if built with KDE<br>
+       support and running under KDE,
+GTK+ 2.x else,<br>
+       - old: GTK 1.2 file selector,<br>
+       - new: GTK 2.x file selector
+(advanced capabilities and can show hidden<br>
+       files),<br>
+       - win32: deprecated (same as
+native),<br>
+       - kde: KDE file selector (only
+available if TiEmu  is  built  with  KDE<br>
+       support).<br>
+      <br>
+       bkpts_wnd=<br>
+       code_wnd=<br>
+       mem_wnd=<br>
+       regs_wnd=<br>
+       pclog_wnd=<br>
+       stack_wnd=<br>
+       heap_wnd= Set geometry hints for
+the different windows of the debugger.<br>
+       The format is (x,y,w,h,m,v) where
+x&y  are  coordinates,  w&h  are  the<br>
+       size,  m  is 
+set  if window is minimized and v is set if the window is<br>
+       open.<br>
+      <br>
+       Think to terminate your config
+script with the 'RC_END' word !!!<br>
+      <br>
+      <br>
+COPYRIGHT<br>
+       Copyright (C) 2000-2001, Romain
+Lievin and Thomas Corvazier.  Copyright<br>
+       (C)  2001-2003, 
+Romain  Lievin Copyright (C) 2003, Julien Blache Copy-<br>
+       right (C) 2004, Romain Lievin
+Copyright (C)  2005-2006,  Romain  Lievin<br>
+       and Kevin Kofler<br>
+      <br>
+       Permission  to  use,
+copy, modify, and distribute this software and its<br>
+       documentation for any purpose and
+without fee is hereby  granted,  pro-<br>
+       vided  that  the 
+above  copyright notice appear in all copies and that<br>
+       both that copyright notice and
+this permission notice  appear  in  sup-<br>
+       porting documentation.<br>
+      <br>
+       This  program and its source
+code is distributed under the terms of the<br>
+       terms of the GNU General Public
+License as published by the Free  Soft-<br>
+       ware  Foundation; 
+either version 2 of the License, or (at your option)<br>
+       any later version.<br>
+      <br>
+       This program is distributed in the
+hope that it  will  be  useful,  but<br>
+       WITHOUT  ANY 
+WARRANTY;  without  even  the  implied 
+warranty  of MER-<br>
+       CHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU  General<br>
+       Public License for more details.<br>
+      <br>
+       You should have received a copy of
+the GNU General Public License along<br>
+       with this program; if not, write
+to the Free Software Foundation, Inc.,<br>
+       59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.<br>
+      <br>
+      <br>
+SUGGESTIONS AND BUG REPORTS<br>
+       The   canonical place to
+find TiEmu and some miscellenaous informations<br>
+       is at
+<http://lpg.ticalc.org/prj_tiemu>.  You can also take
+a  look  at<br>
+      
+<http://lpg.ticalc.org>   and 
+<http://www.ticalc.org>  for  others  TI<br>
+       related programs for Linux.<br>
+      <br>
+      <br>
+SEE ALSO<br>
+       tilp(1) for the use of a linking
+program. TiEmu shares the same  commu-<br>
+       nication box for link settings.<br>
+      <br>
+      <br>
+SPECIAL THANKS<br>
+       - Jonas Minnberg (Sasq) for Tiger<br>
+       - UAE, the Universal Amiga Emulator<br>
+       -  Kevin  Kofler 
+<Kevin at tigcc.ticalc.org>  for  creating  rpm
+packages<br>
+       (Fedora): he is the official
+maintainer of this package.<br>
+       - Julien Blache
+<jb at jblache.org> for creating deb packages (Debian): he<br>
+       is the official maintainer of this
+package.<br>
+      <br>
+      <br>
+AUTHOR<br>
+       Romain Lievin Kevin Kofler<br>
+      <br>
+      <br>
+      <br>
+                              
+January 27,
+2006                      
+TIEMU(1)</span><span style="font-family: courier;"></span></font><br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr>
+</body>
+</html>
diff --git a/help/chapter10.html b/help/chapter10.html
new file mode 100644
index 0000000..5e065fc
--- /dev/null
+++ b/help/chapter10.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter09.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter11.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Command Line<br>
+      </td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Link port<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>10. Skins</h1>
+<p><font color="#000000">Bad news: TiEmu uses its own skins; they are
+not VTI-compatible. <br>
+Why? Because the VTI skin format is somewhat
+limited and doesn't take care of some portability issues. <br>
+</font></p>
+<p><font color="#000000">Good news: You can re-use your VTI skins!<br>
+</font></p>
+<p><font color="#000000">Well, how can I use or develop TiEmu skins?
+Julien Blache has developed a multi-platform skin editor, called <a
+ href="http://lpg.ticalc.org/prj_tiemu/">SkinEdit</a>:<br>
+</font></p>
+<p style="text-align: center;"><font color="#000000"><img alt=""
+ src="skinedit.jpg" style="width: 408px; height: 334px;"><br>
+</font></p>
+<font color="#000000">SkinEdit has all of the basic functions
+of a
+skin editor and some add-ons:<br>
+- import/export of VTI 2.1, VTI 2.5 and TiEmu 2.0 skin format (for all
+calcs: TI82..V200),<br>
+- load any image format (not restricted to JPEG). This feature depends
+on the pixbuf loaders provided by the GTK+ libraries.<br>
+<br>
+Note: the TiEmu v2.0 skin format is documented. See the <span
+ style="font-style: italic;">docs</span> folder of the source archive.<br>
+<br>
+</font>
+<hr>
+</body>
+</html>
diff --git a/help/chapter11.html b/help/chapter11.html
new file mode 100644
index 0000000..98b4636
--- /dev/null
+++ b/help/chapter11.html
@@ -0,0 +1,194 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter10.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter20.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Link port<br>
+      </td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Bugs<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>11. Link port<br>
+</h1>
+The link port can be set-up with the <span style="font-style: italic;">Link
+options</span>
+item:<br>
+<br>
+<div style="text-align: center;"><img alt="" src="linkport.png"
+ style="width: 273px; height: 161px;"><br>
+<br>
+<div style="text-align: left;">Note: no DirectLink support!<br>
+</div>
+</div>
+<h2>11.1 Direct File loading</h2>
+When cable is set to <span style="font-style: italic;">internal,</span>
+TiEmu uses its direct file loading/saving capability. That is to say,
+you can 'send' a file from disk to TiEmu and vice-versa (<span
+ style="font-style: italic;">Send file to TiEmu</span> item of popup
+menu).<br>
+The <span style="font-style: italic;">port</span> and <span
+ style="font-style: italic;">calc</span> settings are not used.<br>
+<br>
+The timeout value can be increased/decreased to adjust timeout of
+direct file loading which is <span style="text-decoration: underline;">not</span>
+the timeout of real cables.<br>
+<br>
+Please note that the calculator must be on the HOME screen while using
+this feature. No need to go into the VAR-LINK menu and set the
+calculator in receive mode; anyways, it will not work!<br>
+<h2>11.2 Virtual cables</h2>
+There are 2 virtual cables: <span style="font-style: italic;">VTi</span>
+& <span style="font-style: italic;">TiEmu</span>.<br>
+<br>
+<div style="margin-left: 40px;">To connect VTI and TiEmu:<br>
+- run VTI; next, run TiEmu<br>
+- choose the <span style="font-style: italic;">VTi</span> cable, <span
+ style="font-style: italic;">port #2</span><br>
+- open the VTI menu, go to <span style="font-style: italic;">Enable
+Cable
+Link</span> and be sure that <span style="font-style: italic;">Virtual
+Link</span> is checked.<br>
+<br>
+To connect TiLP2 and TiEmu3:<br>
+- run TiEmu; next, run TiLP<br>
+- choose the <span style="font-style: italic;">TiEmu</span> cable, <span
+ style="font-style: italic;">port #1</span> in TiEmu<br>
+- choose the <span style="font-style: italic;">TiEmu</span> cable, <span
+ style="font-style: italic;">port #2</span> in TiLP<br>
+<br>
+To connect TiEmu and TiEmu:<br>
+- run 2 instances of TiEmu<br>
+- choose the <span style="font-style: italic;">TiEmu</span> cable on
+both,
+<span style="font-style: italic;">port #1</span> and <span
+ style="font-style: italic;">port #2</span> respectively.<br>
+</div>
+<br>
+
+<span style="font-style: italic;">Note : the VTI logger can not be used with TiEmu.</span>
+
+<h2>11.3 Real cables</h2>
+At the time being, there are 4 link cables useable with TiEmu: <span
+ style="font-style: italic;">GrayLink</span>, <span
+ style="font-style: italic;">BlackLink</span>, <span
+ style="font-style: italic;">ParallelLink</span> and SilverLink
+(Win32/Linux
+only).<br>
+A cable is plugged into a port. There are 3/4 ports depending on the
+cable type:<br>
+<br>
+<table style="width: 100%; text-align: left;" border="1" cellpadding="2"
+ cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><br>
+      </td>
+      <td colspan="2" rowspan="1"
+ style="vertical-align: top; text-align: center;">BlackLink or GrayLink<br>
+      </td>
+      <td colspan="2" rowspan="1"
+ style="vertical-align: top; text-align: center;">ParallelLink<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">SilverLink<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;"><br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Windows<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Linux<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Windows<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Linux<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">Windows<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">port #1</td>
+      <td style="vertical-align: top; text-align: center;">COM1<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">/dev/ttyS0<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">LPT1<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">/dev/tipar0<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">1st cable<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">port #2</td>
+      <td style="vertical-align: top; text-align: center;">COM2<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">/dev/ttyS1</td>
+      <td style="vertical-align: top; text-align: center;">LPT2<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">/dev/tipar1</td>
+      <td style="vertical-align: top; text-align: center;">2nd cable<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">port #3</td>
+      <td style="vertical-align: top; text-align: center;">COM3<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">/dev/ttyS2</td>
+      <td style="vertical-align: top; text-align: center;">LPT3<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">/dev/tipar2</td>
+      <td style="vertical-align: top; text-align: center;">3rd cable<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top;">port #4</td>
+      <td style="vertical-align: top; text-align: center;">COM4<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">/dev/ttyS3</td>
+      <td style="vertical-align: top; text-align: center;">N/A<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">N/A<br>
+      </td>
+      <td style="vertical-align: top; text-align: center;">4th cable<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<br>
+Note: the TiLP 2 framework does not rely on Linux kernel modules any
+longer. But, you have to take care of permissions (user/group, rw) on
+the device node.<br>
+<br>
+<hr>
+</body>
+</html>
diff --git a/help/chapter20.html b/help/chapter20.html
new file mode 100644
index 0000000..498b4ad
--- /dev/null
+++ b/help/chapter20.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter10.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter21.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Skins<br>
+      </td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Thanks<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>20. Problems & Bugs</h1>
+<p><font color="#000000">There are several ways to get in touch if
+you encounter a problem with TiEmu or if you have questions,
+suggestions,
+bug reports, etc. <br>
+<br>
+If you have general questions or problems, please consider the users' </font><a
+ href="mailto:tiemu-users at lists.sf.net"><font color="#000000">mailing
+list</font></a><font color="#000000"> first.<br>
+If you want to discuss TiEmu, you can use the TiLP </font><a
+ href="http://sourceforge.net/forum/forum.php?forum_id=73169"><font
+ color="#000000">forum</font></a><font color="#000000">.<br>
+If you want to contribute to the TiEmu project, there is a developer's </font><a
+ href="mailto:tiemu-devel at lists.sf.net"><font color="#000000">mailing
+list</font></a><font color="#000000">.<br>
+For bug reports, use the </font>'<a
+ href="http://sourceforge.net/tracker/?group_id=23169&atid=377680"><font
+ color="#000000">Bug Tracking System</font></a><font color="#000000">'
+(BTS).<br>
+</font></p>
+<h2>20.1 Questions<br>
+</h2>
+<p><font color="#000000">Please read all documentation
+carefully before sending a post. Most people do not take time enough to
+carefully read the documentation. If you are sure that your question is
+not answered in any of these docs, then post.</font></p>
+<p><font color="#000000">The TiEmu team will not reply to questions
+which
+are already answered in those docs!</font><br>
+</p>
+<h2>20.2 Bugs<br>
+</h2>
+<p><font color="#000000">Most of bug reports I receive do not
+contain enough information (because people do not read the documentation
+before mailing). I often have to ask for subsequent information which
+is not very efficient for me and takes more time for you.</font></p>
+<p><font color="#000000">A bug report should always contain the
+following information:<br>
+- platform type: Windows (which one: 98, NT4, ...), Linux (which
+distribution, which kernel, is devfs/udev running, etc.)<br>
+- calculator type (TI89, HW1, HW2, ...)<br>
+- cable type</font> and port (COM1, LPT1, USB, etc.),<br>
+- TiLP framework version and TiEmu version<br>
+- [Linux]: TiEmu displays much information at startup. You have 2 ways
+for sending them to me. Either launch TiLP by 'tilp >& log' and
+send/post the log file, or send/post the '$HOME/tilp.console' file.<br>
+- [Win32]: you will have to enable the console first. Open the
+'tiemu.ini' file and change 'console=no' to 'console=yes'. Launch TiEmu
+and send/post the 'C:\console.log' file.<br>
+<br>
+If you have more information, you are welcome to send it! You can send
+screen captures, too, just don't exceed 100 Kbytes.
+</p>
+<hr>
+</body>
+</html>
diff --git a/help/chapter21.html b/help/chapter21.html
new file mode 100644
index 0000000..798881c
--- /dev/null
+++ b/help/chapter21.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter20.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="chapter22.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Problems & Bugs<br>
+      </td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Copyright Notes<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>21. Thanks</h1>
+<font color="#000000">The TiEmu team would like to thank some
+people
+:</font><font color="#000000"><br>
+- Jonas Minnberg for making (X)Tiger from which we have developed
+TiEmu,<br>
+- Rusty Wagner for the calculator skins,<br>
+- Julien Blache for SkinEdit (a VTI 2.1, VTI 2.5, TiEmu v2 skin editor),<br>
+- Lionel Debroux, Olivier Armand and Kevin Kofler who answered many
+questions because I'm (was) not a TI hardware expert.</font><br>
+<br>
+<hr>
+</body>
+</html>
diff --git a/help/chapter22.html b/help/chapter22.html
new file mode 100644
index 0000000..b66da74
--- /dev/null
+++ b/help/chapter22.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla 1.1 under Linux">
+  <title>TiEmu User's Manual</title>
+  <meta name="author" content="The TiEmu team">
+  <meta name="description" content="User's Manual">
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<div align="center">
+<div style="text-align: left;">
+<div class="NAVFOOTER">
+<hr align="left" width="100%">
+<table summary="Footer navigation table" border="0" cellpadding="0"
+ cellspacing="0" width="100%">
+  <tbody>
+    <tr>
+      <td align="left" valign="top" width="33%"><a href="chapter21.html"
+ accesskey="P">Prev</a></td>
+      <td align="center" valign="top" width="34%"><a
+ href="Manual_en.html" accesskey="H">Home</a></td>
+      <td align="right" valign="top" width="33%"><a
+ href="Manual_en.html" accesskey="N">Next</a></td>
+    </tr>
+    <tr>
+      <td align="left" valign="top" width="33%">Thanks<br>
+      </td>
+      <td align="center" valign="top" width="34%"> </td>
+      <td align="right" valign="top" width="33%">Table Of Contents<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<hr align="left" width="100%">
+</div>
+</div>
+</div>
+<h1>22. Copyright notes<br>
+</h1>
+TiEmu is based on the Jonas Minnberg's emulator (<a
+ href="http://www.student.nada.kth.se/%7Emd94-jmi/tiger/">XTiger</a>).
+Jonas released its
+emulator under GPL licence.<br>
+The m68k-emulation core is derived from <a
+ href="http://freiburg.linux.de/%7Euae/">UAE</a>, the famous
+Amiga emulator, which is GPL software, too.<br>
+<br>
+TiEmu relies on the <a href="http://tilp.info/">TiLP</a> 2
+framework (ticables2, tifiles2 and ticalcs2 libraries).<br>
+<br>
+For more informations about license, source code and homepage, see the
+LICENSES file provided with TiEmu.<br>
+<br>
+The following people have worked on TiEmu :<br>
+*  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin<br>
+ *  Copyright (c) 2001-2003, Romain Lievin<br>
+ *  Copyright (c) 2003, Julien Blache<br>
+ *  Copyright (c) 2004, Romain Liévin<br>
+ *  Copyright (c) 2005-2007, Romain Liévin, Kevin Kofler.<br>
+<br>
+<hr>
+</body>
+</html>
diff --git a/help/dbg_bkpts.png b/help/dbg_bkpts.png
new file mode 100644
index 0000000..8909db3
Binary files /dev/null and b/help/dbg_bkpts.png differ
diff --git a/help/dbg_heap.png b/help/dbg_heap.png
new file mode 100644
index 0000000..282c92a
Binary files /dev/null and b/help/dbg_heap.png differ
diff --git a/help/dbg_mem.png b/help/dbg_mem.png
new file mode 100644
index 0000000..072a8aa
Binary files /dev/null and b/help/dbg_mem.png differ
diff --git a/help/dbg_registers.png b/help/dbg_registers.png
new file mode 100644
index 0000000..033db5f
Binary files /dev/null and b/help/dbg_registers.png differ
diff --git a/help/dbg_search.png b/help/dbg_search.png
new file mode 100644
index 0000000..fec2197
Binary files /dev/null and b/help/dbg_search.png differ
diff --git a/help/dbg_source.png b/help/dbg_source.png
new file mode 100644
index 0000000..0ebb821
Binary files /dev/null and b/help/dbg_source.png differ
diff --git a/help/dbg_sr.png b/help/dbg_sr.png
new file mode 100644
index 0000000..ab875a0
Binary files /dev/null and b/help/dbg_sr.png differ
diff --git a/help/dbg_stack.png b/help/dbg_stack.png
new file mode 100644
index 0000000..1327a40
Binary files /dev/null and b/help/dbg_stack.png differ
diff --git a/help/linkport.png b/help/linkport.png
new file mode 100644
index 0000000..1d02b58
Binary files /dev/null and b/help/linkport.png differ
diff --git a/help/log_link.png b/help/log_link.png
new file mode 100644
index 0000000..8baf4a4
Binary files /dev/null and b/help/log_link.png differ
diff --git a/help/logo_lpg.png b/help/logo_lpg.png
new file mode 100644
index 0000000..148cb91
Binary files /dev/null and b/help/logo_lpg.png differ
diff --git a/help/logo_tiemu.png b/help/logo_tiemu.png
new file mode 100644
index 0000000..cba26c6
Binary files /dev/null and b/help/logo_tiemu.png differ
diff --git a/help/no_skin.png b/help/no_skin.png
new file mode 100644
index 0000000..4fa93db
Binary files /dev/null and b/help/no_skin.png differ
diff --git a/help/popup_menu.png b/help/popup_menu.png
new file mode 100644
index 0000000..459bdf3
Binary files /dev/null and b/help/popup_menu.png differ
diff --git a/help/romversion.png b/help/romversion.png
new file mode 100644
index 0000000..311559e
Binary files /dev/null and b/help/romversion.png differ
diff --git a/help/screenshot.png b/help/screenshot.png
new file mode 100644
index 0000000..b04b118
Binary files /dev/null and b/help/screenshot.png differ
diff --git a/help/skinedit.jpg b/help/skinedit.jpg
new file mode 100644
index 0000000..48c2649
Binary files /dev/null and b/help/skinedit.jpg differ
diff --git a/help/tiemu.jpg b/help/tiemu.jpg
new file mode 100644
index 0000000..0bbdf27
Binary files /dev/null and b/help/tiemu.jpg differ
diff --git a/help/wizard.png b/help/wizard.png
new file mode 100644
index 0000000..effe985
Binary files /dev/null and b/help/wizard.png differ
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..36f96f3
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,276 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd=$cpprog
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd=$stripprog
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "$0: no input file specified" >&2
+	exit 1
+else
+	:
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+
+	if [ -d "$dst" ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=$mkdirprog
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f "$src" ] || [ -d "$src" ]
+	then
+		:
+	else
+		echo "$0: $src does not exist" >&2
+		exit 1
+	fi
+
+	if [ x"$dst" = x ]
+	then
+		echo "$0: no destination specified" >&2
+		exit 1
+	else
+		:
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d "$dst" ]
+	then
+		dst=$dst/`basename "$src"`
+	else
+		:
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+	'
+IFS="${IFS-$defaultIFS}"
+
+oIFS=$IFS
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp=$pathcomp$1
+	shift
+
+	if [ ! -d "$pathcomp" ] ;
+        then
+		$mkdirprog "$pathcomp"
+	else
+		:
+	fi
+
+	pathcomp=$pathcomp/
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd "$dst" &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ]
+	then
+		dstfile=`basename "$dst"`
+	else
+		dstfile=`basename "$dst" $transformbasename |
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ]
+	then
+		dstfile=`basename "$dst"`
+	else
+		:
+	fi
+
+# Make a couple of temp file names in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+	rmtmp=$dstdir/#rm.$$#
+
+# Trap to clean up temp files at exit.
+
+	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+	trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd "$src" "$dsttmp" &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# 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.
+
+{
+	if [ -f "$dstdir/$dstfile" ]
+	then
+		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+		{
+		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		  (exit 1); exit
+		}
+	else
+		:
+	fi
+} &&
+
+# Now rename the file to the real destination.
+
+	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+
+{
+	(exit 0); exit
+}
diff --git a/install.bat b/install.bat
new file mode 100644
index 0000000..ba4c297
--- /dev/null
+++ b/install.bat
@@ -0,0 +1,21 @@
+mkdir c:\lpg\msvc
+
+cd glade
+call copy.bat
+cd ..
+
+cd misc
+call copy.bat
+cd ..
+
+cd pixmaps
+call copy.bat
+cd ..
+
+cd skins
+call copy.bat
+cd ..
+
+cd pedrom
+call copy.bat
+cd ..
\ No newline at end of file
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644
index 0000000..529c85f
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,6425 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 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 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.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.6
+TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 203 $"
+
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS=" 	
+"}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid () {
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag () {
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $EXIT_SUCCESS
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $EXIT_SUCCESS
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $EXIT_SUCCESS
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag) prevopt="--tag" prev=tag ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case "$arg_mode" in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+      $echo $srcfile > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $srcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	status=$?
+	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      else
+	command="$base_compile $srcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-mingw* | *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # gcc -m* arguments should be passed to the linker via $compiler_flags
+      # in order to pass architecture information to the linker
+      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
+      # but this is not reliable with gcc because gcc may use -mfoo to
+      # select a different linker, different libraries, etc, while
+      # -Wl,-mfoo simply passes -mfoo to the linker.
+      -m*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link)
+	  libs="$deplibs %DEPLIBS%"
+	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+	  ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    if test "$deplibs_check_method" != pass_all; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit $EXIT_FAILURE
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	else
+	  dir="$ladir/$objdir"
+	  absdir="$abs_ladir/$objdir"
+	  # Remove this search path later
+	  notinst_path="$notinst_path $abs_ladir"
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var"; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $dir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case "$libdir" in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case "$libdir" in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    convenience="$convenience $dir/$old_library"
+	    old_convenience="$old_convenience $dir/$old_library"
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$deplibs $path" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  major=`expr $current - $age + 1`
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $LTCC -o conftest conftest.c $deplibs
+	  if test "$?" -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" -ne "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		$LTCC -o conftest conftest.c $i
+		# Did it work?
+		if test "$?" -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    status=$?
+	    if test "$status" -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	    generated="$generated $gentop"
+
+	    for xlib in $convenience; do
+	      # Extract the objects.
+	      case $xlib in
+	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	      *) xabs=`pwd`"/$xlib" ;;
+	      esac
+	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	      xdir="$gentop/$xlib"
+
+	      $show "${rm}r $xdir"
+	      $run ${rm}r "$xdir"
+	      $show "$mkdir $xdir"
+	      $run $mkdir "$xdir"
+	      status=$?
+	      if test "$status" -ne 0 && test ! -d "$xdir"; then
+		exit $status
+	      fi
+	      # We will extract separately just the conflicting names and we will no
+	      # longer touch any unique names. It is faster to leave these extract
+	      # automatically by $AR in one run.
+	      $show "(cd $xdir && $AR x $xabs)"
+	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+	      if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+		:
+	      else
+		$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+		$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+		$AR t "$xabs" | sort | uniq -cd | while read -r count name
+		do
+		  i=1
+		  while test "$i" -le "$count"
+		  do
+		   # Put our $i before any first dot (extension)
+		   # Never overwrite any file
+		   name_to="$name"
+		   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+		   do
+		     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+		   done
+		   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+		   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+		   i=`expr $i + 1`
+		  done
+		done
+	      fi
+
+	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+	    done
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$save_output-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*"` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$save_output-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$save_output-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadale object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  $show "${rm}r $gentop"
+	  $run ${rm}r "$gentop"
+	  $show "$mkdir $gentop"
+	  $run $mkdir "$gentop"
+	  status=$?
+	  if test "$status" -ne 0 && test ! -d "$gentop"; then
+	    exit $status
+	  fi
+	  generated="$generated $gentop"
+
+	  for xlib in $convenience; do
+	    # Extract the objects.
+	    case $xlib in
+	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	    *) xabs=`pwd`"/$xlib" ;;
+	    esac
+	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	    xdir="$gentop/$xlib"
+
+	    $show "${rm}r $xdir"
+	    $run ${rm}r "$xdir"
+	    $show "$mkdir $xdir"
+	    $run $mkdir "$xdir"
+	    status=$?
+	    if test "$status" -ne 0 && test ! -d "$xdir"; then
+	      exit $status
+	    fi
+	    # We will extract separately just the conflicting names and we will no
+	    # longer touch any unique names. It is faster to leave these extract
+	    # automatically by $AR in one run.
+	    $show "(cd $xdir && $AR x $xabs)"
+	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+	    if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+	      :
+	    else
+	      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+	      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+	      $AR t "$xabs" | sort | uniq -cd | while read -r count name
+	      do
+		i=1
+		while test "$i" -le "$count"
+		do
+		 # Put our $i before any first dot (extension)
+		 # Never overwrite any file
+		 name_to="$name"
+		 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+		 do
+		   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+		 done
+		 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+		 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+		 i=`expr $i + 1`
+		done
+	      done
+	    fi
+
+	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+	  done
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $run eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	cmds=$reload_cmds
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$output.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    cwrappersource=`$echo ${objdir}/lt-${output}.c`
+	    cwrapper=`$echo ${output}.exe`
+	    $rm $cwrappersource $cwrapper
+	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+	  # we should really use a build-platform specific compiler
+	  # here, but OTOH, the wrappers (shell script and this C one)
+	  # are only useful if you want to execute the "real" binary.
+	  # Since the "real" binary is built for $host, then this
+	  # wrapper might as well be built for $host, too.
+	  $run $LTCC -s -o $cwrapper $cwrappersource
+	  ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \$progdir/\$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit $EXIT_FAILURE
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	$show "${rm}r $gentop"
+	$run ${rm}r "$gentop"
+	$show "$mkdir $gentop"
+	$run $mkdir "$gentop"
+	status=$?
+	if test "$status" -ne 0 && test ! -d "$gentop"; then
+	  exit $status
+	fi
+	generated="$generated $gentop"
+
+	# Add in members from convenience archives.
+	for xlib in $addlibs; do
+	  # Extract the objects.
+	  case $xlib in
+	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	  *) xabs=`pwd`"/$xlib" ;;
+	  esac
+	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	  xdir="$gentop/$xlib"
+
+	  $show "${rm}r $xdir"
+	  $run ${rm}r "$xdir"
+	  $show "$mkdir $xdir"
+	  $run $mkdir "$xdir"
+	  status=$?
+	  if test "$status" -ne 0 && test ! -d "$xdir"; then
+	    exit $status
+	  fi
+	  # We will extract separately just the conflicting names and we will no
+	  # longer touch any unique names. It is faster to leave these extract
+	  # automatically by $AR in one run.
+	  $show "(cd $xdir && $AR x $xabs)"
+	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+	  if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+	    :
+	  else
+	    $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+	    $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+	    $AR t "$xabs" | sort | uniq -cd | while read -r count name
+	    do
+	      i=1
+	      while test "$i" -le "$count"
+	      do
+	       # Put our $i before any first dot (extension)
+	       # Never overwrite any file
+	       name_to="$name"
+	       while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+	       do
+		 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+	       done
+	       $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+	       $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+	       i=`expr $i + 1`
+	      done
+	    done
+	  fi
+
+	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+	done
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+	  # encoded into archives.  This makes 'ar r' malfunction in
+	  # this piecewise linking case whenever conflicting object
+	  # names appear in distinct ar calls; check, warn and compensate.
+	    if (for obj in $save_oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	    :
+	  else
+	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+	    AR_FLAGS=cq
+	  fi
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*"` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      save_umask=`umask`
+	      umask 0077
+	      if $mkdir "$tmpdir"; then
+	        umask $save_umask
+	      else
+	        umask $save_umask
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyways
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  cmds=$finish_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "----------------------------------------------------------------------"
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+	  if test "$mode" = uninstall; then
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      cmds=$postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      cmds=$old_postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool at gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $EXIT_SUCCESS
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..6f25bcd
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,15 @@
+man_MANS = tiemu.1
+pkgdata_DATA = Manpage.txt
+
+EXTRA_DIST = $(man_MANS) cleaner.c Manpage.txt
+
+all: dist_win
+
+view: $(man_MANS)
+	groff -Tascii -man $(man_MANS) | less
+
+dist_win: $(man_MANS)
+	groff -Tascii -man $(man_MANS) > Manpage
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc cleaner.c -o cleaner
+	./cleaner Manpage
+	rm Manpage cleaner
diff --git a/man/Makefile.in b/man/Makefile.in
new file mode 100644
index 0000000..a7f9572
--- /dev/null
+++ b/man/Makefile.in
@@ -0,0 +1,547 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = man
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdatadir)"
+NROFF = nroff
+MANS = $(man_MANS)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+pkgdataDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgdata_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+man_MANS = tiemu.1
+pkgdata_DATA = Manpage.txt
+EXTRA_DIST = $(man_MANS) cleaner.c Manpage.txt
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  man/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  man/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+	  rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
+	done
+install-pkgdataDATA: $(pkgdata_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+	@list='$(pkgdata_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+	  $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
+	done
+
+uninstall-pkgdataDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgdata_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdatadir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man install-pkgdataDATA
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-pkgdataDATA
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir 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-man1 \
+	install-pdf install-pdf-am install-pkgdataDATA install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 \
+	uninstall-pkgdataDATA
+
+
+all: dist_win
+
+view: $(man_MANS)
+	groff -Tascii -man $(man_MANS) | less
+
+dist_win: $(man_MANS)
+	groff -Tascii -man $(man_MANS) > Manpage
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc cleaner.c -o cleaner
+	./cleaner Manpage
+	rm Manpage cleaner
+# 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/man/Manpage.txt b/man/Manpage.txt
new file mode 100644
index 0000000..7f2d1bf
--- /dev/null
+++ b/man/Manpage.txt
@@ -0,0 +1,229 @@
+TIEMU(1)                                                              TIEMU(1)
+
+
+
+NAME
+       tiemu - a TI's hand-helds emulator (m68k-based)
+
+SYNOPSYS
+       tiemu [-h] [-v] [--help] [--version] [--import] [-rom=] [-tib=] [-sav=]
+       [filename]
+
+DESCRIPTION
+       The TiEmu program allows you to emulate a Texas Instruments  calculator
+       such  as TI89, TI89 Titanium, TI92, TI92+ or V200PLT.  The emulator has
+       also a virtual link capability which allows to connect  it  to  another
+       program (such as TiLP for instance).
+
+OPTIONS
+       The command line options override the default options (startup options)
+       and the config file options even.  The TiEmu program accepts  the  fol-
+       lowing options:
+
+       -h, --help
+              Display a list of all command line options.
+
+       -v, --version
+              Output the version info.
+
+       --import=
+              Import ROM or TIB into repository and exit. Can be used for cre-
+              ating images (as an example).  This flag must be set before -rom
+              or -tib !
+
+       -rom=  Convert and use the specified dump as image. Note that the image
+              is added to the image repository.  Provided for compatibility.
+
+       -tib=  Convert and use the specified tib/upgrade as image. Idem.   Pro-
+              vided for compatibility.
+
+       -sav=  Load  the  specified state file. Must be a valid state image and
+              target for emulated calculator.  Provided for compatibility.
+
+       filename
+              Load a ROM/TIB/SAV file. ROM & TIB files are converted and added
+              to  images  repository. Image corresponding to SAV file is auto-
+              matically loaded and state is load.
+
+
+CONFIG FILE FORMAT
+       This section describes the format of the .tiemu config file which is in
+       the  home  directory of the user (Linux) or in the Program Files folder
+       (Win32). A line preceded by the '#' symbol is a comment.  Each line has
+       the  following  format:  key=value.   The  config  file  must  have the
+       'RC_END' string at end.  Every line can be put in any order.   Take  in
+       mind  that  any  comment  added in the config file will be overwritten.
+       Below is described each option and the possible values:
+
+       calctype= Defines the calculator type for link parameter. Valid  values
+       are:  ti89,  ti89t,  ti92, ti92+, v200.  Note: don't need to touch this
+       setting, it's overridden by TiEmu. Kept for compatibility.
+
+       linktype= Define the link cable  type.  Choose  one  of  the  following
+       value:  none,  parallel, serial, TIGraphLink, virtual, TiEmulator, VTi,
+       UsbGraphLink.
+
+       port= Define a link port to use. Can  be:  null,  user,  parallel  port
+       #1|2|3, serial port #1|2|3|4, virtual port #1|2, USB port #1.
+
+       method=  Define  an  I/O method to use. Possible values are: automatic,
+       asm, api, driver, null.
+
+       adr_port= places the I/O address of the I/O port  to  use.  It  can  be
+       0x3F8 for a serial port or 0x378 for a parallel port for instance.
+
+       serial_device=  places  the character device name of the serial port to
+       use with a Grey TIGL.
+
+       timeout= with the timeout value to use in  tenth  of  seconds.  Default
+       value: 20.
+
+       delay=  with  the  delay  value  to  use in micro-seconds for home-made
+       cables. Default value: 10
+
+       background= Define whether TiEmu display the whole frame (keyboard+LCD)
+       or  just  the  LCD  screen. Set to 0 if you do not want to use the key-
+       board.
+
+       skin_file= Define the custom skin file to use.  Must  be  a  full  path
+       name.
+
+       keys_file= Define the keymap to use. Must be a full path name.
+
+       img_file=  Define  the  TiEmu  image to load at startup. Must be a full
+       path name.
+
+       tib_file= Define the FLASH upgrade (tib or .9xu/.89u) to load after the
+       image. Must be a full path name.
+
+       sav_file= Define the calculator state image to load at startup.
+
+       cpu_rate=  Give  the  number of instructions executed by the M68000 per
+       30ms timeslice. Default value is -1 (50000 insts/30ms).
+
+       hw_rate= Give the OS2/OSC3 oscillator rate. Default value is -1 (427 on
+       hw1 and 732 on hw2; OSC2 is incremented every 6250 OSC1 cycles).
+
+       lcd_rate=  Define  the  frame  rate of LCD refresh. Default value is -1
+       (25ms => 40fps). Don't use a value smaller than 10ms.
+
+       img_format= Defines the image format of the screenshots.  Several  for-
+       mats are available: jpg, png and ico.
+
+       img_type= You can do B/W (bw) or colored (color) screenshots.
+
+       img_size=  The  size of the image that is to say you can shots only the
+       LCD (lcd) or the entire window (skin).
+
+       screen_file= Defines the base filename where  the  screenshot  will  be
+       stored.
+
+       screen_counter= This allows you to save the current screenshot counter.
+       In   fact,   the   resulting   filename   is   computed   as   'screen-
+       file[screen_counter].[img_format]. Example: 'screenshot001.png'.
+
+       screen_shots= Number of frames to capture.
+
+       screen_skips= Number of frame to skip between 2 captures.
+
+       console=  Available  under  Windows platform only. You can hide (no) or
+       show (yes) the DOS console at startup or even display  it  only  during
+       boot (boot).
+
+       kbd_dbg=  Display  key  bindings  in the console if set (yes). Else, do
+       nothing (no).
+
+       fs_type= TiEmu supports several file selectors for better  integration.
+       The following options are supported:
+       - native: native one (default): Win32 on Windows, KDE if built with KDE
+       support and running under KDE, GTK+ 2.x else,
+       - old: GTK 1.2 file selector,
+       - new: GTK 2.x file selector (advanced capabilities and can show hidden
+       files),
+       - win32: deprecated (same as native),
+       -  kde:  KDE  file  selector (only available if TiEmu is built with KDE
+       support).
+
+       bkpts_wnd=
+       code_wnd=
+       mem_wnd=
+       regs_wnd=
+       pclog_wnd=
+       stack_wnd=
+       heap_wnd= Set geometry hints for the different windows of the debugger.
+       The  format  is  (x,y,w,h,m,v)  where  x&y are coordinates, w&h are the
+       size, m is set if window is minimized and v is set  if  the  window  is
+       open.
+       dbg_font_type=  Enable custom font if set to "custom"; use default font
+       if set to "default".
+       dbg_font_name= Name of font to use. It must be a valid  Pango  descrip-
+       tion  font  name:  a  string  representation in the form "[FAMILY-LIST]
+       [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a comma separated list of
+       families  optionally  terminated by a comma, STYLE_OPTIONS is a whites-
+       pace separated list of words where each WORD describes  one  of  style,
+       variant,  weight,  or  stretch,  and SIZE is an decimal number (size in
+       points). Any one of the  options  may  be  absent.  If  FAMILY-LIST  is
+       absent,  then  the  family_name field of the resulting font description
+       will be initialized to NULL. If  STYLE-OPTIONS  is  missing,  then  all
+       style  options  will  be set to the default values. If SIZE is missing,
+       the size in the resulting font description will be set to 0.
+
+
+       Think to terminate your config script with the 'RC_END' word !!!
+
+
+COPYRIGHT
+       Copyright (C) 2000-2001, Romain Lievin and Thomas Corvazier.  Copyright
+       (C)  2001-2003,  Romain  Lievin Copyright (C) 2003, Julien Blache Copy-
+       right (C) 2004, Romain Lievin Copyright (C)  2005-2007,  Romain  Lievin
+       and Kevin Kofler
+
+       Permission  to  use, copy, modify, and distribute this software and its
+       documentation for any purpose and without fee is hereby  granted,  pro-
+       vided  that  the  above  copyright notice appear in all copies and that
+       both that copyright notice and this permission notice  appear  in  sup-
+       porting documentation.
+
+       This  program and its source code is distributed under the terms of the
+       terms of the GNU General Public License as published by the Free  Soft-
+       ware  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 MER-
+       CHANTABILITY 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.
+
+
+SUGGESTIONS AND BUG REPORTS
+       The   canonical place to find TiEmu and some miscellenaous informations
+       is at <http://lpg.ticalc.org/prj_tiemu>.  You can also take a  look  at
+       <http://lpg.ticalc.org>   and  <http://www.ticalc.org>  for  others  TI
+       related programs for Linux.
+
+
+SEE ALSO
+       tilp(1) for the use of a linking program. TiEmu shares the same  commu-
+       nication box for link settings.
+
+
+SPECIAL THANKS
+       - Jonas Minnberg (Sasq) for Tiger
+       - UAE, the Universal Amiga Emulator
+       -  Kevin  Kofler  <Kevin at tigcc.ticalc.org>  for  creating  rpm packages
+       (Fedora): he is the official maintainer of this package.
+       - Julien Blache <jb at jblache.org> for creating deb packages (Debian): he
+       is the official maintainer of this package.
+
+
+AUTHOR
+       Romain Lievin Kevin Kofler
+
+
+
+                                March 28, 2007                        TIEMU(1)
+��
\ No newline at end of file
diff --git a/man/cleaner.c b/man/cleaner.c
new file mode 100644
index 0000000..c495694
--- /dev/null
+++ b/man/cleaner.c
@@ -0,0 +1,127 @@
+/*  manpage_cleaner - remove the repetition of characters
+ *  Copyright (C) 2000  Romain Lievin
+ *
+ *  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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define MAXCHARS 256
+
+int main(int argc, char **argv)
+{
+  char filename[MAXCHARS];
+  char filename2[MAXCHARS];
+  char filename3[MAXCHARS];
+  FILE *in;
+  FILE *tmp;
+  FILE *out;
+  char buffer[3];
+  
+  /* Retrieve the command line argument */
+  if(argc < 2)
+    {
+      fprintf(stderr, "You must give a filename on the command line.\n");
+      exit(1);
+    }
+  strcpy(filename, argv[1]);
+  strcpy(filename2, filename);
+  strcat(filename2, ".tmp");
+  strcpy(filename3, filename);
+  strcat(filename3, ".txt");
+  
+  fprintf(stdout, "Processing file <%s>:\n", filename);
+  fprintf(stdout, "Pass 1... ");
+  
+  /* Open the file for reading */
+  in = fopen(filename, "rb");
+  if(in == NULL)
+    {
+      fprintf(stderr, "Unable to open this file: <%s>\n", filename);
+      exit(1);
+    }
+  
+  /* Open a temporary file fpr writing */
+  out = fopen(filename2, "wb");
+  if(out == NULL)
+    {
+      fprintf(stderr, "Unable to open this file: <%s>\n", filename2);
+      exit(1);
+    }
+  
+  /* Process the file for removing backspace sequences */
+  while(!feof(in))
+    {
+      buffer[0] = fgetc(in);
+      if(feof(in))
+	{
+	  fputc(buffer[0], out);
+	  break;
+	}
+      buffer[1]= fgetc(in);
+  
+      if(buffer[0] == '\b')
+	{
+	  continue; // Skip the char and BS
+	}
+      if(buffer[1] == '\b')
+	{
+	  fputc(fgetc(in), out); // Skip the 2 previous chars
+	  continue;
+	}
+      fputc(buffer[0], out);
+      fputc(buffer[1], out);
+    }
+  fprintf(stdout, "Done.\n");
+  
+  /* Close the files */
+  fclose(in);
+  fclose(out);
+  
+  fprintf(stdout, "Pass 2... ");
+  
+  /* Open the temporary file and another file */
+  in = fopen(filename2, "rb");
+  if(in == NULL)
+    {
+      fprintf(stderr, "Unable to open this file: <%s>\n", filename);
+      exit(1);
+    }
+  
+  out = fopen(filename3, "wb");
+  if(out == NULL)
+    {
+      fprintf(stderr, "Unable to open this file: <%s>\n", filename2);
+      exit(1);
+    }
+  
+  /* Copy the file */
+  while(!feof(in))
+    {
+      if(feof(in)) break;
+      fputc(fgetc(in), out);
+    }
+  
+  /* Close files */
+  fclose(in);
+  fclose(out);
+  unlink(filename2);
+  fprintf(stdout, "Done.\n");
+  
+  return 0;
+}
diff --git a/man/tiemu.1 b/man/tiemu.1
new file mode 100644
index 0000000..7cb1886
--- /dev/null
+++ b/man/tiemu.1
@@ -0,0 +1,206 @@
+.TH TIEMU 1 "March 28, 2007"
+.SH NAME
+tiemu - a TI's hand-helds emulator (m68k-based)
+.SH SYNOPSYS
+\fBtiemu\fP [-h] [-v] [--help] [--version] [--import] [-rom=] [-tib=] [-sav=] [filename] 
+.SH DESCRIPTION
+The \fBTiEmu\fP program allows you to emulate a Texas Instruments calculator such as TI89, TI89 Titanium, TI92, TI92+ or V200PLT.
+The emulator has also a virtual link capability which allows to connect it to another program (such as TiLP for instance).
+.SH OPTIONS
+The command line options override the default options (startup options) and the config file options even.
+The \fBTiEmu\fP program accepts the following options:
+.TP
+\fB-h, --help\fP
+Display a list of all command line options.
+.TP
+\fB-v, --version\fP
+Output the version info.
+.TP
+\fB--import=\fP
+Import ROM or TIB into repository and exit. Can be used for creating images (as an example).
+This flag must be set before -rom or -tib !
+.TP
+\fB-rom=\fP
+Convert and use the specified dump as image. Note that the image is added to the image repository.
+Provided for compatibility.
+.TP
+\fB-tib=\fP
+Convert and use the specified tib/upgrade as image. Idem.
+Provided for compatibility.
+.TP
+\fB-sav=\fP
+Load the specified state file. Must be a valid state image and target for emulated calculator.
+Provided for compatibility.
+.TP
+\fBfilename\fP
+Load a ROM/TIB/SAV file. ROM & TIB files are converted and added to images repository. Image corresponding
+to SAV file is automatically loaded and state is load.
+
+.SH CONFIG FILE FORMAT
+This section describes the format of the .tiemu config file which is in the home directory of the 
+user (Linux) or in the Program Files folder (Win32). A line preceded by the '#' symbol is a comment. 
+Each line has the following format: key=value.
+The config file must have the 'RC_END' string at end.
+Every line can be put in any order.
+Take in mind that any comment added in the config file will be overwritten.
+Below is described each option and the possible values:
+
+\fBcalctype=\fP
+Defines the calculator type for link parameter. Valid values are: ti89, ti89t, ti92, ti92+, v200.
+Note: don't need to touch this setting, it's overridden by TiEmu. Kept for compatibility.
+
+\fBlinktype=\fP
+Define the link cable type. Choose one of the following value: none, parallel, serial, TIGraphLink, virtual, TiEmulator, VTi, UsbGraphLink.
+
+\fBport=\fP
+Define a link port to use. Can be: null, user, parallel port #1|2|3, serial port #1|2|3|4, virtual port #1|2, USB port #1.
+
+\fBmethod=\fP
+Define an I/O method to use. Possible values are: automatic, asm, api, driver, null.
+
+\fBadr_port=\fP
+places the I/O address of the I/O port to use. It can be 0x3F8 for a serial port or 0x378 for a parallel port for instance.
+
+\fBserial_device=\fP
+places the character device name of the serial port to use with a Grey TIGL.
+
+\fBtimeout=\fP
+with the timeout value to use in tenth of seconds. Default value: 20.
+
+\fBdelay=\fP
+with the delay value to use in micro-seconds for home-made cables. Default value: 10
+
+\fBbackground=\fP
+Define whether TiEmu display the whole frame (keyboard+LCD) or just the LCD screen. Set to 0 if you do not want to use the keyboard.
+
+\fBskin_file=\fP
+Define the custom skin file to use. Must be a full path name.
+
+\fBkeys_file=\fP
+Define the keymap to use. Must be a full path name.
+
+\fBimg_file=\fP
+Define the TiEmu image to load at startup. Must be a full path name.
+
+\fBtib_file=\fP
+Define the FLASH upgrade (tib or .9xu/.89u) to load after the image. Must be a full path name.
+
+\fBsav_file=\fP
+Define the calculator state image to load at startup.
+
+\fBcpu_rate=\fP
+Give the number of instructions executed by the M68000 per 30ms timeslice. Default value is -1 (50000 insts/30ms).
+
+\fBhw_rate=\fP
+Give the OS2/OSC3 oscillator rate. Default value is -1 (427 on hw1 and 732 on hw2; OSC2 is incremented every 6250 OSC1 cycles).
+
+\fBlcd_rate=\fP
+Define the frame rate of LCD refresh. Default value is -1 (25ms => 40fps). Don't use a value smaller than 10ms.
+
+\fBimg_format=\fP
+Defines the image format of the screenshots. Several formats are available: jpg, png and ico.
+
+\fBimg_type=\fP
+You can do B/W (bw) or colored (color) screenshots.
+
+\fBimg_size=\fP
+The size of the image that is to say you can shots only the LCD (lcd) or the entire window (skin).
+
+\fBscreen_file=\fP
+Defines the base filename where the screenshot will be stored.
+
+\fBscreen_counter=\fP
+This allows you to save the current screenshot counter. In fact, the resulting filename is computed as 'screenfile[screen_counter].[img_format]. Example: 'screenshot001.png'.
+
+\fBscreen_shots=\fP
+Number of frames to capture.
+
+\fBscreen_skips=\fP
+Number of frame to skip between 2 captures.
+
+\fBconsole=\fP
+Available under Windows platform only. You can hide (no) or show (yes) the DOS console at startup or even display it only during boot (boot).
+
+\fBkbd_dbg=\fP
+Display key bindings in the console if set (yes). Else, do nothing (no).
+
+\fBfs_type=\fP
+TiEmu supports several file selectors for better integration.
+The following options are supported:
+.br
+- native: native one (default): Win32 on Windows, KDE if built with KDE support and running under KDE, GTK+ 2.x else, 
+.br
+- old: GTK 1.2 file selector, 
+.br
+- new: GTK 2.x file selector (advanced capabilities and can show hidden files), 
+.br
+- win32: deprecated (same as native), 
+.br
+- kde: KDE file selector (only available if TiEmu is built with KDE support).
+
+\fBbkpts_wnd=\fP
+.br
+\fBcode_wnd=\fP
+.br
+\fBmem_wnd=\fP
+.br
+\fBregs_wnd=\fP
+.br
+\fBpclog_wnd=\fP
+.br
+\fBstack_wnd=\fP
+.br
+\fBheap_wnd=\fP
+Set geometry hints for the different windows of the debugger. The format is (x,y,w,h,m,v) where 
+x&y are coordinates, w&h are the size, m is set if window is minimized and v is set if the window
+is open.
+.br
+\fBdbg_font_type=\fP
+Enable custom font if set to "custom"; use default font if set to "default".
+.br
+\fBdbg_font_name=\fP
+Name of font to use. It must be a valid Pango description font name: a string representation in the form 
+"[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a comma separated list of families optionally terminated by 
+a comma, STYLE_OPTIONS is a whitespace separated list of words where each WORD describes one of style, variant, weight, or stretch, 
+and SIZE is an decimal number (size in points). Any one of the options may be absent. If FAMILY-LIST is absent, then the 
+family_name field of the resulting font description will be initialized to NULL. If STYLE-OPTIONS is missing, then all style 
+options will be set to the default values. If SIZE is missing, the size in the resulting font description will be set to 0.
+
+
+Think to terminate your config script with the 'RC_END' word !!!
+
+.SH COPYRIGHT
+Copyright (C) 2000-2001, Romain Lievin and Thomas Corvazier. 
+Copyright (C) 2001-2003, Romain Lievin
+Copyright (C) 2003, Julien Blache
+Copyright (C) 2004, Romain Lievin
+Copyright (C) 2005-2007, Romain Lievin and Kevin Kofler
+
+Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.
+
+This program and its source code is distributed under the terms of 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.
+
+.SH SUGGESTIONS AND BUG REPORTS
+The  canonical place to find TiEmu and some miscellenaous informations is at <http://lpg.ticalc.org/prj_tiemu>.
+You can also take a look at <http://lpg.ticalc.org> and <http://www.ticalc.org> for others TI related programs for Linux.
+
+.SH SEE ALSO
+tilp(1) for the use of a linking program. TiEmu shares the same communication box for link settings.
+
+.SH SPECIAL THANKS
+- Jonas Minnberg (Sasq) for Tiger
+.br
+- UAE, the Universal Amiga Emulator
+.br
+- Kevin Kofler <Kevin at tigcc.ticalc.org> for creating rpm packages (Fedora): he is the official maintainer of this package.
+.br
+- Julien Blache <jb at jblache.org> for creating deb packages (Debian): he is the official maintainer of this package.
+
+.SH AUTHOR
+Romain Lievin
+Kevin Kofler
diff --git a/misc/Makefile.am b/misc/Makefile.am
new file mode 100644
index 0000000..c20f843
--- /dev/null
+++ b/misc/Makefile.am
@@ -0,0 +1,7 @@
+miscdir = $(pkgdatadir)/misc
+dist_misc_DATA = *.txt *.lst
+
+EXTRA_DIST = copy.bat
+
+uninstall:
+	rm -f $(pkgdatadir)/misc/*.txt
\ No newline at end of file
diff --git a/misc/Makefile.in b/misc/Makefile.in
new file mode 100644
index 0000000..078266b
--- /dev/null
+++ b/misc/Makefile.in
@@ -0,0 +1,488 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = misc
+DIST_COMMON = $(dist_misc_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(miscdir)"
+dist_miscDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_misc_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+miscdir = $(pkgdatadir)/misc
+dist_misc_DATA = *.txt *.lst
+EXTRA_DIST = copy.bat
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  misc/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  misc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_miscDATA: $(dist_misc_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(miscdir)" || $(MKDIR_P) "$(DESTDIR)$(miscdir)"
+	@list='$(dist_misc_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(dist_miscDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(miscdir)/$$f'"; \
+	  $(dist_miscDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(miscdir)/$$f"; \
+	done
+
+uninstall-dist_miscDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_misc_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(miscdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(miscdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(miscdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_miscDATA
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_miscDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dist_miscDATA 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 \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am uninstall-dist_miscDATA
+
+
+uninstall:
+	rm -f $(pkgdatadir)/misc/*.txt
+# 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/misc/copy.bat b/misc/copy.bat
new file mode 100644
index 0000000..d7e0a03
--- /dev/null
+++ b/misc/copy.bat
@@ -0,0 +1,3 @@
+mkdir c:\lpg\msvc\misc
+copy *.txt c:\lpg\msvc\misc\
+del *.bak
diff --git a/misc/iodefs_ti89_hw1.txt b/misc/iodefs_ti89_hw1.txt
new file mode 100644
index 0000000..4ddc1c1
--- /dev/null
+++ b/misc/iodefs_ti89_hw1.txt
@@ -0,0 +1,46 @@
+; I/O register definitions for TI92 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+; Same file than iodefs_ti92p_hw1.txt but this one is the original.
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2.0>			| Stack overflow	| AI7 enable,Interleave RAM
+$600003	| 1	| wo	| <.654.210>			| Wait-states		| non-RAM,non-RAM,non-RAM,RAM,RAM,RAM
+$600005	| 1	| wo	| <...43210>			| Idle/Wake-up		| Wake on AI5,Wake on AI4,Wake on AI3,Wake on AI2,Wake on AI1
+
+[Link]
+
+$60000c	| 1	| rw	| <765.3210>			| Control			| Autostart Enable,Link Disable,Link TimeOut,Link Error IE,AutoStart IE,TX buf empty IE,RX buf full IE
+$60000d	| 1	| rw	| <765432..>			| Status			| Link Error,TX buf empty, RX buf full,Link interrupt,AutoStart,External activity
+$60000e	| 1	| rw	| <....3210>			| Direct			| D1 in,D0 in,D1 out,D0 out
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600010 | 2	| wo	| <all>					| LCD address
+$600012	| 1	| wo	| <..543210>			| LCD log. width
+$600013	| 1	| wo	| <all>					| LCD log. height
+$60001C	| 1	| wo	| <..5432..>			| LCD Row Sync
+$60001D	| 1	| wo	| <7..43210>			| Contrast			| Voltage mult.,Screen disable,Bit #3,Bit #2,Bit #1,Bit #0
+
+[Timer]
+
+$600015	| 1 | rw	| <7.543210>			| Timer & OSC2/3	| AI1/3/5 disable,Increment rate,Increment rate,Timer enable,Triggers AI3,OSC2 enable,LCD DMA enable
+$600017	| 1	| rw	| <all>					| Prog. Timer
+
+[Keyboard]
+
+$600019	| 1	| rw	| <.6543210>			| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key			| ON key state
+$60001b	| 1	| rw	| <all>					| Col state
+
+[Battery]
+$600000	| 1	| rw	| <.....2..>			| Status			| Battery status 
+$600018	| 1	| rw	| <......10>			| Voltage			| Trigger level,Trigger level
+
diff --git a/misc/iodefs_ti89_hw2.txt b/misc/iodefs_ti89_hw2.txt
new file mode 100644
index 0000000..6e78509
--- /dev/null
+++ b/misc/iodefs_ti89_hw2.txt
@@ -0,0 +1,57 @@
+; I/O register definitions for TI89 HW2 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+; Same file than iodefs_ti92p_hw2.txt but this one is the original.
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2..>			| Stack overflow	| AI7 enable
+$600003	| 1	| wo	| <.654.210>			| Wait-states		| non-RAM,non-RAM,non-RAM,RAM,RAM,RAM
+$600005	| 1	| wo	| <...43210>			| Idle/Wake-up		| Wake on AI5,Wake on AI4,Wake on AI3,Wake on AI2,Wake on AI1
+
+[Link]
+
+$60000c	| 1	| rw	| <765.3210>			| Control			| Autostart Enable,Link Disable,Link TimeOut,Link Error IE,AutoStart IE,TX buf empty IE,RX buf full IE
+$60000d	| 1	| rw	| <765432..>			| Status			| Link Error,TX buf empty, RX buf full,Link interrupt,AutoStart,External activity
+$60000e	| 1	| rw	| <....3210>			| Direct			| D1 in,D0 in,D1 out,D0 out
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600012	| 1	| wo	| <..543210>			| LCD log. width
+$600013	| 1	| wo	| <all>					| LCD log. height
+$60001C	| 1	| wo	| <..5432..>			| LCD Row Sync
+$60001D	| 1	| wo	| <...4....>			| Contrast			| Bit #4
+$700017 | 1 | rw	| <......10>			| Address range		| $4C00-6BFF,$6C00-8BFF
+$700018 | 1 | rw	| <7...3.10>			| Control/Status	| FS toggle,Bat chk #B,Scren enable,Bat chk #A
+
+[Timer]
+
+$600015	| 1 | rw	| <7.543210>			| Timer & OSC2/3	| AI1/3/5 disable,Increment rate,Increment rate,Timer enable,Triggers AI3,OSC2 enable,LCD DMA enable
+$600017	| 1	| rw	| <all>					| Prog. Timer
+
+[RTC]
+$700014 | 2 | rw	| <all>					| Counter
+$70001F | 1	| rw	| <.....210>			| Control			|RTC enable,AI1/2/3/5 disable
+
+[Keyboard]
+
+$600019	| 1	| rw	| <.6543210>			| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key			| ON key state
+$60001b	| 1	| rw	| <all>					| Col state
+
+[Battery]
+$600000	| 1	| rw	| <.....2..>			| Status			| Battery status 
+$600018	| 1	| rw	| <......10>			| Voltage			| Trigger level,Trigger level
+
+[Protections]
+$700000	| 2 | rw	| <all>					| RAM page			| $000000,$001000,$002000,$003000,$004000,$005000,$006000,$007000,$008000,$009000,$00A000,$00B000,$00C000,$00D000,$00E000,$00F000
+$700002	| 2 | rw	| <all>					| RAM page			| $010000,$011000,$012000,$013000,$014000,$015000,$016000,$017000,$018000,$019000,$01A000,$01B000,$01C000,$01D000,$01E000,$01F000
+$700004	| 2 | rw	| <all>					| RAM page			| $020000,$021000,$022000,$023000,$024000,$025000,$026000,$027000,$028000,$029000,$02A000,$02B000,$02C000,$02D000,$02E000,$02F000
+$700006	| 2 | rw	| <all>					| RAM page			| $030000,$031000,$032000,$033000,$034000,$035000,$036000,$037000,$038000,$039000,$03A000,$03B000,$03C000,$03D000,$03E000,$03F000
+$700012 | 1 | rw	| <..543210>			| FLASH execution	| First exec,protected sector,n*$10000,+$210000, , 
diff --git a/misc/iodefs_ti89t_hw3.txt b/misc/iodefs_ti89t_hw3.txt
new file mode 100644
index 0000000..4675342
--- /dev/null
+++ b/misc/iodefs_ti89t_hw3.txt
@@ -0,0 +1,60 @@
+; I/O register definitions for Titanium HW3 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2..>			| Stack overflow	| AI7 enable
+$600003	| 1	| wo	| <.654.210>			| Wait-states		| non-RAM,non-RAM,non-RAM,RAM,RAM,RAM
+$600005	| 1	| wo	| <...43210>			| Idle/Wake-up		| Wake on AI5,Wake on AI4,Wake on AI3,Wake on AI2,Wake on AI1
+
+[Link]
+
+$60000c	| 1	| rw	| <765.3210>			| Control			| Autostart Enable,Link Disable,Link TimeOut,Link Error IE,AutoStart IE,TX buf empty IE,RX buf full IE
+$60000d	| 1	| rw	| <765432..>			| Status			| Link Error,TX buf empty, RX buf full,Link interrupt,AutoStart,External activity
+$60000e	| 1	| rw	| <....3210>			| Direct			| D1 in,D0 in,D1 out,D0 out
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600010 | 2	| wo	| <all>					| LCD address
+$600012	| 1	| wo	| <..543210>			| LCD log. width
+$600013	| 1	| wo	| <all>					| LCD log. height
+$60001C	| 1	| wo	| <..5432..>			| LCD Row Sync
+$60001D	| 1	| wo	| <...4....>			| Contrast			| Bit #4
+$700017 | 1 | rw	| <......10>			| Address range		| $4C00-6BFF,$6C00-8BFF
+$700018 | 1 | rw	| <7...3.10>			| Control/Status	| FS toggle,Bat chk #B,Scren enable,Bat chk #A
+
+[Timer]
+
+$600015	| 1 | rw	| <7.543210>			| Timer & OSC2/3	| AI1/3/5 disable,Increment rate,Increment rate,Timer enable,Triggers AI3,OSC2 enable,LCD DMA enable
+$600017	| 1	| rw	| <all>					| Prog. Timer
+
+[RTC]
+
+$710040 | 4 | rw	| <all>					| Seconds (load)
+$710044 | 1 | rw	| <....3210>			| 1/16 s (load)
+$710045 | 1 | ro	| <....3210>			| 1/16 s (count)
+$710046 | 4 | ro	| <all>					| Seconds (count)
+$71005f | 1 | rw	| <......10>			| Control			|Transfer load reg to cnt reg,Enable RTC
+
+[Keyboard]
+
+$600019	| 1	| rw	| <.6543210>			| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key			| ON key state
+$60001b	| 1	| rw	| <all>					| Col state
+
+[Battery]
+$600000	| 1	| rw	| <.....2..>			| Status			| Battery status 
+$600018	| 1	| rw	| <......10>			| Voltage			| Trigger level,Trigger level
+
+[Protections]
+$700000	| 2 | rw	| <all>					| RAM page			| $000000,$001000,$002000,$003000,$004000,$005000,$006000,$007000,$008000,$009000,$00A000,$00B000,$00C000,$00D000,$00E000,$00F000
+$700002	| 2 | rw	| <all>					| RAM page			| $010000,$011000,$012000,$013000,$014000,$015000,$016000,$017000,$018000,$019000,$01A000,$01B000,$01C000,$01D000,$01E000,$01F000
+$700004	| 2 | rw	| <all>					| RAM page			| $020000,$021000,$022000,$023000,$024000,$025000,$026000,$027000,$028000,$029000,$02A000,$02B000,$02C000,$02D000,$02E000,$02F000
+$700006	| 2 | rw	| <all>					| RAM page			| $030000,$031000,$032000,$033000,$034000,$035000,$036000,$037000,$038000,$039000,$03A000,$03B000,$03C000,$03D000,$03E000,$03F000
+$700012 | 1 | rw	| <..543210>			| FLASH execution	| First exec,protected sector,n*$10000,+$210000, , 
diff --git a/misc/iodefs_ti89t_hw4.txt b/misc/iodefs_ti89t_hw4.txt
new file mode 100644
index 0000000..4675342
--- /dev/null
+++ b/misc/iodefs_ti89t_hw4.txt
@@ -0,0 +1,60 @@
+; I/O register definitions for Titanium HW3 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2..>			| Stack overflow	| AI7 enable
+$600003	| 1	| wo	| <.654.210>			| Wait-states		| non-RAM,non-RAM,non-RAM,RAM,RAM,RAM
+$600005	| 1	| wo	| <...43210>			| Idle/Wake-up		| Wake on AI5,Wake on AI4,Wake on AI3,Wake on AI2,Wake on AI1
+
+[Link]
+
+$60000c	| 1	| rw	| <765.3210>			| Control			| Autostart Enable,Link Disable,Link TimeOut,Link Error IE,AutoStart IE,TX buf empty IE,RX buf full IE
+$60000d	| 1	| rw	| <765432..>			| Status			| Link Error,TX buf empty, RX buf full,Link interrupt,AutoStart,External activity
+$60000e	| 1	| rw	| <....3210>			| Direct			| D1 in,D0 in,D1 out,D0 out
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600010 | 2	| wo	| <all>					| LCD address
+$600012	| 1	| wo	| <..543210>			| LCD log. width
+$600013	| 1	| wo	| <all>					| LCD log. height
+$60001C	| 1	| wo	| <..5432..>			| LCD Row Sync
+$60001D	| 1	| wo	| <...4....>			| Contrast			| Bit #4
+$700017 | 1 | rw	| <......10>			| Address range		| $4C00-6BFF,$6C00-8BFF
+$700018 | 1 | rw	| <7...3.10>			| Control/Status	| FS toggle,Bat chk #B,Scren enable,Bat chk #A
+
+[Timer]
+
+$600015	| 1 | rw	| <7.543210>			| Timer & OSC2/3	| AI1/3/5 disable,Increment rate,Increment rate,Timer enable,Triggers AI3,OSC2 enable,LCD DMA enable
+$600017	| 1	| rw	| <all>					| Prog. Timer
+
+[RTC]
+
+$710040 | 4 | rw	| <all>					| Seconds (load)
+$710044 | 1 | rw	| <....3210>			| 1/16 s (load)
+$710045 | 1 | ro	| <....3210>			| 1/16 s (count)
+$710046 | 4 | ro	| <all>					| Seconds (count)
+$71005f | 1 | rw	| <......10>			| Control			|Transfer load reg to cnt reg,Enable RTC
+
+[Keyboard]
+
+$600019	| 1	| rw	| <.6543210>			| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key			| ON key state
+$60001b	| 1	| rw	| <all>					| Col state
+
+[Battery]
+$600000	| 1	| rw	| <.....2..>			| Status			| Battery status 
+$600018	| 1	| rw	| <......10>			| Voltage			| Trigger level,Trigger level
+
+[Protections]
+$700000	| 2 | rw	| <all>					| RAM page			| $000000,$001000,$002000,$003000,$004000,$005000,$006000,$007000,$008000,$009000,$00A000,$00B000,$00C000,$00D000,$00E000,$00F000
+$700002	| 2 | rw	| <all>					| RAM page			| $010000,$011000,$012000,$013000,$014000,$015000,$016000,$017000,$018000,$019000,$01A000,$01B000,$01C000,$01D000,$01E000,$01F000
+$700004	| 2 | rw	| <all>					| RAM page			| $020000,$021000,$022000,$023000,$024000,$025000,$026000,$027000,$028000,$029000,$02A000,$02B000,$02C000,$02D000,$02E000,$02F000
+$700006	| 2 | rw	| <all>					| RAM page			| $030000,$031000,$032000,$033000,$034000,$035000,$036000,$037000,$038000,$039000,$03A000,$03B000,$03C000,$03D000,$03E000,$03F000
+$700012 | 1 | rw	| <..543210>			| FLASH execution	| First exec,protected sector,n*$10000,+$210000, , 
diff --git a/misc/iodefs_ti92_hw1.txt b/misc/iodefs_ti92_hw1.txt
new file mode 100644
index 0000000..c3d45c9
--- /dev/null
+++ b/misc/iodefs_ti92_hw1.txt
@@ -0,0 +1,39 @@
+; I/O register definitions for TI92 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2.0>			| Stack overflow	| AI7 enable,Interleave RAM
+$600005	| 1	| wo	| <...43.10>			| Idle/Wake-up		| Wake on AI5,Wake on AI4,Wake on AI2,Wake on AI1
+
+[Link]
+
+$60000c	| 1	| rw	| <765.3210>			| Control			| Autostart Enable,Link Disable,Link TimeOut,Link Error IE,AutoStart IE,TX buf empty IE,RX buf full IE
+$60000d	| 1	| rw	| <76543...>			| Status			| Link Error,TX buf empty, RX buf full,Link interrupt,AutoStart
+$60000e	| 1	| rw	| <....3210>			| Direct			| D1 in,D0 in,D1 out,D0 out
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600010 | 2	| wo	| <all>					| LCD address
+$600012	| 1	| wo	| <all>					| LCD width
+$600013	| 1	| wo	| <all>					| LCD height
+$60001C	| 1	| wo	| <all>					| LCD Row Sync
+
+$600000	| 1	| rw	| <..5.....>			| Contrast			| Bit #0
+$60001D	| 1	| wo	| <....3210>			| Contrast			| Bit #4,Bit #3,Bit #2,Bit #1
+
+[Timer]
+
+$600017	| 1	| rw	| <all>					| Prog. Timer
+
+[Keyboard]
+
+$600018	| 2	| rw	| <......1076543210>	| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key			| ON key state
+$60001b	| 1	| rw	| <all>					| Col state
diff --git a/misc/iodefs_ti92p_hw1.txt b/misc/iodefs_ti92p_hw1.txt
new file mode 100644
index 0000000..3fa736b
--- /dev/null
+++ b/misc/iodefs_ti92p_hw1.txt
@@ -0,0 +1,46 @@
+; I/O register definitions for TI92 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+; Same file than iodefs_ti89_hw1.txt but this one is the copy.
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2.0>			| Stack overflow	| AI7 enable,Interleave RAM
+$600003	| 1	| wo	| <.654.210>			| Wait-states		| non-RAM,non-RAM,non-RAM,RAM,RAM,RAM
+$600005	| 1	| wo	| <...43210>			| Idle/Wake-up		| Wake on AI5,Wake on AI4,Wake on AI3,Wake on AI2,Wake on AI1
+
+[Link]
+
+$60000c	| 1	| rw	| <765.3210>			| Control			| Autostart Enable,Link Disable,Link TimeOut,Link Error IE,AutoStart IE,TX buf empty IE,RX buf full IE
+$60000d	| 1	| rw	| <765432..>			| Status			| Link Error,TX buf empty, RX buf full,Link interrupt,AutoStart,External activity
+$60000e	| 1	| rw	| <....3210>			| Direct			| D1 in,D0 in,D1 out,D0 out
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600010 | 2	| wo	| <all>					| LCD address
+$600012	| 1	| wo	| <..543210>			| LCD log. width
+$600013	| 1	| wo	| <all>					| LCD log. height
+$60001C	| 1	| wo	| <..5432..>			| LCD Row Sync
+$60001D	| 1	| wo	| <7..43210>			| Contrast			| Voltage mult.,Screen disable,Bit #3,Bit #2,Bit #1,Bit #0
+
+[Timer]
+
+$600015	| 1 | rw	| <7.543210>			| Timer & OSC2/3	| AI1/3/5 disable,Increment rate,Increment rate,Timer enable,Triggers AI3,OSC2 enable,LCD DMA enable
+$600017	| 1	| rw	| <all>					| Prog. Timer
+
+[Keyboard]
+
+$600019	| 1	| rw	| <.6543210>			| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key			| ON key state
+$60001b	| 1	| rw	| <all>					| Col state
+
+[Battery]
+$600000	| 1	| rw	| <.....2..>			| Status			| Battery status 
+$600018	| 1	| rw	| <......10>			| Voltage			| Trigger level,Trigger level
+
diff --git a/misc/iodefs_ti92p_hw2.txt b/misc/iodefs_ti92p_hw2.txt
new file mode 100644
index 0000000..b04892d
--- /dev/null
+++ b/misc/iodefs_ti92p_hw2.txt
@@ -0,0 +1,57 @@
+; I/O register definitions for TI89 HW2 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+; Same file than iodefs_ti89_hw2.txt but this one is the copy.
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2..>			| Stack overflow	| AI7 enable
+$600003	| 1	| wo	| <.654.210>			| Wait-states		| non-RAM,non-RAM,non-RAM,RAM,RAM,RAM
+$600005	| 1	| wo	| <...43210>			| Idle/Wake-up		| Wake on AI5,Wake on AI4,Wake on AI3,Wake on AI2,Wake on AI1
+
+[Link]
+
+$60000c	| 1	| rw	| <765.3210>			| Control			| Autostart Enable,Link Disable,Link TimeOut,Link Error IE,AutoStart IE,TX buf empty IE,RX buf full IE
+$60000d	| 1	| rw	| <765432..>			| Status			| Link Error,TX buf empty, RX buf full,Link interrupt,AutoStart,External activity
+$60000e	| 1	| rw	| <....3210>			| Direct			| D1 in,D0 in,D1 out,D0 out
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600012	| 1	| wo	| <..543210>			| LCD log. width
+$600013	| 1	| wo	| <all>					| LCD log. height
+$60001C	| 1	| wo	| <..5432..>			| LCD Row Sync
+$60001D	| 1	| wo	| <...4....>			| Contrast			| Bit #4
+$700017 | 1 | rw	| <......10>			| Address range		| $4C00-6BFF,$6C00-8BFF
+$700018 | 1 | rw	| <7...3.10>			| Control/Status	| FS toggle,Bat chk #B,Scren enable,Bat chk #A
+
+[Timer]
+
+$600015	| 1 | rw	| <7.543210>			| Timer & OSC2/3	| AI1/3/5 disable,Increment rate,Increment rate,Timer enable,Triggers AI3,OSC2 enable,LCD DMA enable
+$600017	| 1	| rw	| <all>					| Prog. Timer
+
+[RTC]
+$700014 | 2 | rw	| <all>					| Counter
+$70001F | 1	| rw	| <.....210>			| Control			|RTC enable,AI1/2/3/5 disable
+
+[Keyboard]
+
+$600019	| 1	| rw	| <.6543210>			| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key			| ON key state
+$60001b	| 1	| rw	| <all>					| Col state
+
+[Battery]
+$600000	| 1	| rw	| <.....2..>			| Status			| Battery status 
+$600018	| 1	| rw	| <......10>			| Voltage			| Trigger level,Trigger level
+
+[Protections]
+$700000	| 2 | rw	| <all>					| RAM page			| $000000,$001000,$002000,$003000,$004000,$005000,$006000,$007000,$008000,$009000,$00A000,$00B000,$00C000,$00D000,$00E000,$00F000
+$700002	| 2 | rw	| <all>					| RAM page			| $010000,$011000,$012000,$013000,$014000,$015000,$016000,$017000,$018000,$019000,$01A000,$01B000,$01C000,$01D000,$01E000,$01F000
+$700004	| 2 | rw	| <all>					| RAM page			| $020000,$021000,$022000,$023000,$024000,$025000,$026000,$027000,$028000,$029000,$02A000,$02B000,$02C000,$02D000,$02E000,$02F000
+$700006	| 2 | rw	| <all>					| RAM page			| $030000,$031000,$032000,$033000,$034000,$035000,$036000,$037000,$038000,$039000,$03A000,$03B000,$03C000,$03D000,$03E000,$03F000
+$700012 | 1 | rw	| <..543210>			| FLASH execution	| First exec,protected sector,n*$10000,+$210000, , 
diff --git a/misc/iodefs_v200_hw2.txt b/misc/iodefs_v200_hw2.txt
new file mode 100644
index 0000000..2d2d512
--- /dev/null
+++ b/misc/iodefs_v200_hw2.txt
@@ -0,0 +1,40 @@
+; I/O register definitions for TI92 (c) 2005 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; You should not write more than 16 chars for bit names
+;
+; Same file than iodefs_ti89_hw2.txt but this one is the copy.
+;
+
+[System]
+
+$600001	| 1	| rw	| <.....2.0>			| Stack over
+$600005	| 1	| wo	| <...43210>			| Idle/Wake-up
+
+[Link]
+
+$60000c	| 1	| rw	| <all>					| Control
+$60000d	| 1	| rw	| <76543...>			| Status
+$60000e	| 1	| rw	| <all>					| Direct
+$60000f	| 1	| rw	| <all>					| Rx/Tx buf
+
+[LCD]
+
+$600012	| 1	| wo	| <all>					| LCD width
+$600013	| 1	| wo	| <all>					| LCD height
+$60001C	| 1	| wo	| <all>					| LCD Row Sync
+
+$600000	| 1	| rw	| <..5.....>			| Contrast
+$60001D	| 1	| wo	| <....3210>			| Contrast
+
+[Timer]
+
+$600017	| 1	| rw	| <all>					| Timer
+
+[Keyboard]
+
+$600018	| 2	| rw	| <......1076543210>	| Row mask
+$60001a	| 1	| rw	| <......1.>			| ON key
+$60001b	| 1	| rw	| <all>					| Col state
diff --git a/misc/memmap_ti89_hw1.txt b/misc/memmap_ti89_hw1.txt
new file mode 100644
index 0000000..76d8669
--- /dev/null
+++ b/misc/memmap_ti89_hw1.txt
@@ -0,0 +1,12 @@
+; Memory map definitions for TI89 HW1 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+
+000000-03ffff:RAM (256 KB)
+100000-13ffff:RAM (ghost)
+200000-5fffff:FLASH (2 MB)
+600000-60001f:I/O ports (32 bytes)
+
+
diff --git a/misc/memmap_ti89_hw2.txt b/misc/memmap_ti89_hw2.txt
new file mode 100644
index 0000000..b0a2e2f
--- /dev/null
+++ b/misc/memmap_ti89_hw2.txt
@@ -0,0 +1,11 @@
+; Memory map definitions for TI89 HW2 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+
+000000-03ffff:RAM (256 KB)
+100000-13ffff:RAM (ghost)
+200000-5fffff:FLASH (2 MB)
+600000-60001f:I/O ports (32 bytes)
+700000-70001f:I/O ports (32 bytes)
diff --git a/misc/memmap_ti89t_hw3.txt b/misc/memmap_ti89t_hw3.txt
new file mode 100644
index 0000000..32ae1f9
--- /dev/null
+++ b/misc/memmap_ti89t_hw3.txt
@@ -0,0 +1,15 @@
+; Memory map definitions for Titanium HW3 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; Same file than iodefs_ti89t_hw4.txt but this one is the original.
+;
+
+000000-03ffff:RAM (256 KB)
+200000-2fffff:RAM (mirror)
+400000-4fffff:RAM (mirror)
+600000-60001f:I/O ports (32 bytes)
+700000-7000ff:I/O ports (256 bytes)
+700100-7001ff:I/O ports (256 bytes)
+800000-bfffff:FLASH (4 MB)
diff --git a/misc/memmap_ti89t_hw4.txt b/misc/memmap_ti89t_hw4.txt
new file mode 100644
index 0000000..a93e3d0
--- /dev/null
+++ b/misc/memmap_ti89t_hw4.txt
@@ -0,0 +1,15 @@
+; Memory map definitions for Titanium HW4 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+; Same file than iodefs_ti89t_hw3.txt but this one is the copy.
+;
+
+000000-03ffff:RAM (256 KB)
+200000-2fffff:RAM (mirror)
+400000-4fffff:RAM (mirror)
+600000-60001f:I/O ports (32 bytes)
+700000-7000ff:I/O ports (256 bytes)
+700100-7001ff:I/O ports (256 bytes)
+800000-bfffff:FLASH (4 MB)
diff --git a/misc/memmap_ti92_hw1.txt b/misc/memmap_ti92_hw1.txt
new file mode 100644
index 0000000..68de329
--- /dev/null
+++ b/misc/memmap_ti92_hw1.txt
@@ -0,0 +1,10 @@
+; Memory map definitions for TI92 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+
+000000-01ffff:RAM (128 KB)
+200000-3fffff:internal ROM (TI92 1.x) or unused
+400000-5fffff:external ROM (TI92 2.x) or unused
+600000-60001f:I/O ports
diff --git a/misc/memmap_ti92p_hw1.txt b/misc/memmap_ti92p_hw1.txt
new file mode 100644
index 0000000..45888e7
--- /dev/null
+++ b/misc/memmap_ti92p_hw1.txt
@@ -0,0 +1,9 @@
+; Memory map definitions for TI92+ HW1 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+
+000000-03ffff:RAM (256 KB)
+400000-5fffff:FLASH (2 MB)
+600000-60001f:I/O ports
diff --git a/misc/memmap_ti92p_hw2.txt b/misc/memmap_ti92p_hw2.txt
new file mode 100644
index 0000000..08ce285
--- /dev/null
+++ b/misc/memmap_ti92p_hw2.txt
@@ -0,0 +1,11 @@
+; Memory map definitions for TI92+ HW2 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+
+000000-03ffff:RAM (256 KB)
+200000-3fffff:FLASH (mirror)
+400000-5fffff:FLASH (2 MB)
+600000-60001f:I/O ports
+700000-70001f:I/O ports
diff --git a/misc/memmap_v200_hw2.txt b/misc/memmap_v200_hw2.txt
new file mode 100644
index 0000000..be2a3fa
--- /dev/null
+++ b/misc/memmap_v200_hw2.txt
@@ -0,0 +1,11 @@
+; Memory map definitions for V200 HW2 (c) 2007 Romain Li�vin
+;
+; Beware: _don't_ touch this file unless you know what you are doing !
+; Any modification can result in unpredictable results (or crash even !).
+;
+
+000000-03ffff : RAM (256 KB)
+100000-13ffff : RAM (ghost)
+200000-5fffff : FLASH (4 MB)
+600000-60001f : I/O ports (32 bytes)
+700000-70001f : I/O ports (32 bytes)
diff --git a/misc/romcalls.lst b/misc/romcalls.lst
new file mode 100644
index 0000000..3d8b11d
--- /dev/null
+++ b/misc/romcalls.lst
@@ -0,0 +1,1415 @@
+.set acos, 0xF5
+.set acosh, 0x288
+.set asin, 0xF6
+.set asinh, 0x287
+.set atan, 0xF7
+.set atan2, 0xF8
+.set atanh, 0x289
+.set cacos, 0x13A
+.set cacosh, 0x13D
+.set casin, 0x13B
+.set casinh, 0x13E
+.set catan, 0x13C
+.set catanh, 0x13F
+.set ccos, 0x140
+.set ccosh, 0x143
+.set ceil, 0x105
+.set cexp, 0x149
+.set cln, 0x147
+.set clog10, 0x148
+.set cos, 0xF9
+.set cosh, 0xFC
+.set csin, 0x141
+.set csinh, 0x144
+.set csqrt, 0x146
+.set ctan, 0x142
+.set ctanh, 0x145
+.set exp, 0xFF
+.set fabs, 0x106
+.set fadd, 0xB6
+.set fcmp, 0xBB
+.set fdiv, 0xB9
+.set flt, 0xBD
+.set float_class, 0x2FA
+.set floor, 0x107
+.set fmod, 0x108
+.set fmul, 0xB8
+.set fneg, 0xBA
+.set fpisanint, 0x172
+.set fpisodd, 0x173
+.set frexp10, 0x2FB
+.set fsub, 0xB7
+.set is_float_infinity, 0x2FF
+.set is_float_negative_zero, 0x300
+.set is_float_positive_zero, 0x301
+.set is_float_signed_infinity, 0x302
+.set is_float_transfinite, 0x303
+.set is_float_unsigned_inf_or_nan, 0x304
+.set is_float_unsigned_zero, 0x305
+.set is_inf, 0x2FF
+.set is_nan, 0x306
+.set is_nzero, 0x300
+.set is_pzero, 0x301
+.set is_sinf, 0x302
+.set is_transfinite, 0x303
+.set is_uinf_or_nan, 0x304
+.set is_uzero, 0x305
+.set itrig, 0x28A
+.set log, 0x100
+.set log10, 0x101
+.set modf, 0x102
+.set pow, 0x103
+.set round12, 0x174
+.set round12_err, 0x227
+.set round14, 0x175
+.set sin, 0xFA
+.set sincos, 0x286
+.set sinh, 0xFD
+.set sqrt, 0x104
+.set tan, 0xFB
+.set tanh, 0xFE
+.set trig, 0x28B
+.set trunc, 0xBC
+.set all_tail, 0x3B5
+.set any_tail, 0x3B6
+.set are_expressions_identical, 0x2BF
+.set can_be_approxed, 0x2F5
+.set check_estack_size, 0x2C2
+.set compare_complex_magnitudes, 0x2F6
+.set compare_expressions, 0x2C0
+.set compare_Floats, 0x2F7
+.set deleted_between, 0x2C4
+.set deleted_expression, 0x2C6
+.set delete_between, 0x2C3
+.set delete_expression, 0x2C5
+.set did_push_cnvrt_Float_to_integer, 0x2F8
+.set display_statements, 0x4E
+.set estack_number_to_Float, 0x2F9
+.set estack_to_short, 0x2C7
+.set estack_to_ushort, 0x2C8
+.set factor_base_index, 0x2C9
+.set factor_exponent_index, 0x2CA
+.set gcd_exact_whole_Floats, 0x2FC
+.set GetValue, 0x2CB
+.set get_key_ptr, 0x2B7
+.set HToESI, 0x247
+.set im_index, 0x2CC
+.set index_below_display_expression_aux, 0x2B6
+.set index_main_var, 0x2CF
+.set index_numeric_term, 0x2CD
+.set index_of_lead_base_of_lead_term, 0x2CE
+.set is_advanced_tag, 0x2D0
+.set is_antisymmetric, 0x2D1
+.set is_complex_number, 0x2D2
+.set is_complex0, 0x2D3
+.set is_Float_exact_whole_number, 0x2FE
+.set is_free_of_tag, 0x2D4
+.set is_independent_of, 0x2D5
+.set is_independent_of_de_seq_vars, 0x2D6
+.set is_independent_of_elements, 0x2D8
+.set is_independent_of_tail, 0x2D7
+.set is_matrix, 0x3B7
+.set is_monomial, 0x2D9
+.set is_monomial_in_kernel, 0x2DA
+.set is_narrowly_independent_of, 0x2DB
+.set is_square_matrix, 0x3B8
+.set is_symmetric, 0x2DC
+.set bottom_estack, 0x432
+.set is_valid_smap_aggregate, 0x3B9
+.set last_element_index, 0x3BA
+.set lead_base_index, 0x2DE
+.set lead_exponent_index, 0x2DF
+.set lead_factor_index, 0x2E0
+.set lead_term_index, 0x2E1
+.set likely_approx_to_complex_number, 0x307
+.set likely_approx_to_number, 0x308
+.set main_gen_var_index, 0x2E2
+.set map_tail, 0x3BB
+.set map_tail_Int, 0x3BC
+.set map_unary_over_comparison, 0x2E3
+.set min_quantum, 0x2E4
+.set moved_between_to_top, 0x2E6
+.set move_between_to_top, 0x2E5
+.set next_expression_index, 0x10A
+.set NG_approxESI, 0x25C
+.set NG_execute, 0x25D
+.set NG_graphESI, 0x25E
+.set NG_rationalESI, 0x25F
+.set NG_RPNToText, 0x25B
+.set NG_tokenize, 0x260
+.set norm1_complex_Float, 0x309
+.set numeric_factor_index, 0x2E7
+.set Parms2D, 0x4D
+.set Parse1DExpr, 0x4F
+.set Parse2DExpr, 0x4A
+.set Parse2DMultiExpr, 0x4B
+.set Print2DExpr, 0x4C
+.set push_ANSI_string, 0x48A
+.set push_between, 0x2E8
+.set push_cnvrt_integer_if_whole_nmb, 0x30D
+.set push_END_TAG, 0x263
+.set push_expr2_quantum, 0x2EA
+.set push_expr_quantum, 0x2E9
+.set push_Float, 0x30A
+.set push_Float_to_nonneg_int, 0x30B
+.set push_Float_to_rat, 0x30C
+.set push_internal_simplify, 0x4F8
+.set push_LIST_TAG, 0x264
+.set ARb_real_count, 0x5C2
+.set push_next_arb_int, 0x2EB
+.set push_next_arb_real, 0x2EC
+.set push_next_internal_var, 0x2ED
+.set push_offset_array, 0x3C4
+.set push_overflow_to_infinity, 0x30E
+.set push_parse_text, 0x3CA
+.set push_zstr, 0x48A
+.set push_quantum, 0x2EE
+.set push_quantum_pair, 0x2EF
+.set push_reversed_tail, 0x3BF
+.set push_round_Float, 0x310
+.set reductum_index, 0x2F0
+.set remaining_element_count, 0x3C3
+.set remaining_factors_index, 0x2F1
+.set reset_control_flags, 0x2F4
+.set reset_estack_size, 0x2F3
+.set re_index, 0x2F2
+.set should_and_did_push_approx_arg2, 0x311
+.set signum_Float, 0x312
+.set top_estack, 0x109
+.set is_tail_independent_of, 0x2DD
+.set push_transpose_aux, 0x3C1
+.set TokenizeSymName, 0x80
+.set push_expression, 0x44D
+.set ARb_int_count, 0x5C3
+.set ABT_dialog, 0x10D
+.set CAT_dialog, 0x125
+.set EV_captureEvents, 0xC6
+.set EV_centralDispatcher, 0x156
+.set EV_clearPasteString, 0xC7
+.set EV_defaultHandler, 0x157
+.set EV_eventLoop, 0x158
+.set EV_getc, 0xC8
+.set EV_getSplitRect, 0xC9
+.set EV_hook, 0x2A3
+.set EV_notifySwitchGraph, 0xCA
+.set EV_paintOneWindow, 0xCB
+.set EV_paintWindows, 0xCC
+.set EV_registerMenu, 0x159
+.set EV_restorePainting, 0xCD
+.set EV_sendEvent, 0xCE
+.set EV_sendEventSide, 0xCF
+.set EV_sendString, 0xD0
+.set EV_setCmdCheck, 0xD1
+.set EV_setCmdState, 0xD2
+.set EV_setFKeyState, 0xD3
+.set EV_startApp, 0xD4
+.set EV_startSide, 0xD5
+.set EV_startTask, 0xD6
+.set EV_suspendPainting, 0xD7
+.set EV_switch, 0xD8
+.set MO_currentOptions, 0xD9
+.set MO_defaults, 0xDA
+.set MO_digestOptions, 0xDB
+.set MO_isMultigraphTask, 0xDC
+.set MO_modeDialog, 0xDD
+.set MO_notifyModeChange, 0xDE
+.set MO_sendQuit, 0xDF
+.set handleVarLinkKey, 0x129
+.set handleRclKey, 0x14F
+.set AB_prodid, 0x29D
+.set AB_prodname, 0x29E
+.set AB_serno, 0x29F
+.set CB_fetchTEXT, 0xC2
+.set CB_replaceTEXT, 0xC1
+.set CU_restore, 0xC3
+.set CU_start, 0xC4
+.set CU_stop, 0xC5
+.set EX_patch, 0x15A
+.set HelpKeys, 0x181
+.set idle, 0x29B
+.set NeedStack, 0xA4
+.set off, 0x29A
+.set OSCheckBreak, 0xEC
+.set OSClearBreak, 0xED
+.set OSContrastDn, 0x297
+.set OSContrastUp, 0x296
+.set OSdequeue, 0x3AA
+.set OSDisableBreak, 0xEF
+.set OSEnableBreak, 0xEE
+.set OSenqueue, 0x3A9
+.set OSFreeTimer, 0xF1
+.set OSqclear, 0x3AD
+.set OSqhead, 0x3AC
+.set OSqinquire, 0x3AB
+.set OSRegisterTimer, 0xF0
+.set OSReset, 0x294
+.set OSSetSR, 0x29C
+.set OSTimerCurVal, 0xF2
+.set OSTimerExpired, 0xF3
+.set OSTimerRestart, 0xF4
+.set QModeKey, 0x182
+.set QSysKey, 0x183
+.set SumStoChkMem, 0x295
+.set WordInList, 0x184
+.set XR_stringPtr, 0x293
+.set CU_cursorState, 0x503
+.set FiftyMsecTick, 0x4FC
+.set ReleaseVersion, 0x440
+.set ReleaseDate, 0x43F
+.set AB_getGateArrayVersion, 0x15E
+.set EX_getBasecodeParmBlock, 0x5DA
+.set ST_angle, 0xE0
+.set ST_batt, 0xE1
+.set ST_busy, 0xE2
+.set ST_eraseHelp, 0xE3
+.set ST_folder, 0xE4
+.set ST_graph, 0xE5
+.set ST_helpMsg, 0xE6
+.set ST_modKey, 0xE7
+.set ST_precision, 0xE8
+.set ST_readOnly, 0xE9
+.set ST_refDsp, 0xEB
+.set ST_showHelp, 0xE6
+.set ST_stack, 0xEA
+.set ST_progressIncrement, 0x4DA
+.set ST_progressBar, 0x4D8
+.set ST_progressDismiss, 0x4DB
+.set ST_progressUpdate, 0x4D9
+.set AddSymToFolder, 0x70
+.set DerefSym, 0x79
+.set EM_moveSymFromExtMem, 0x161
+.set EM_moveSymToExtMem, 0x162
+.set EM_twinSymFromExtMem, 0x166
+.set FindSymInFolder, 0x71
+.set FolderAdd, 0x64
+.set FolderAddTemp, 0x73
+.set FolderClear, 0x66
+.set FolderCount, 0x6B
+.set FolderCur, 0x65
+.set FolderCurTemp, 0x72
+.set FolderDel, 0x66
+.set FolderDelAllTemp, 0x75
+.set FolderDelTemp, 0x74
+.set FolderFind, 0x67
+.set FolderGetCur, 0x68
+.set FolderOp, 0x69
+.set FolderRename, 0x6A
+.set HSymDel, 0x5F
+.set HSYMtoName, 0x7A
+.set IsMainFolderStr, 0x77
+.set MakeHSym, 0x282
+.set SymAdd, 0x5C
+.set SymAddMain, 0x5D
+.set SymAddTwin, 0x27F
+.set SymCmp, 0x81
+.set SymCpy, 0x82
+.set SymCpy0, 0x83
+.set SymDel, 0x5E
+.set SymDelTwin, 0x280
+.set SymFind, 0x60
+.set SymFindFirst, 0x6C
+.set SymFindFolderName, 0x6F
+.set SymFindHome, 0x62
+.set SymFindMain, 0x61
+.set SymFindNext, 0x6D
+.set SymFindPrev, 0x6E
+.set SymFindPtr, 0x283
+.set SymMove, 0x63
+.set TempFolderName, 0x76
+.set TokToStrN, 0x7C
+.set StrToTokN, 0x7B
+.set ClearUserDef, 0x7E
+.set CheckLinkLockFlag, 0x7F
+.set VarRecall, 0x85
+.set VarStore, 0x86
+.set QSysProtected, 0x88
+.set SetOK, 0x456
+.set checkCurrent, 0x121
+.set CheckReservedName, 0x8B
+.set CheckSysFunc, 0x89
+.set EX_stoBCD, 0xC0
+.set ValidateSymName, 0x84
+.set SymSysVar, 0x8C
+.set ResetSymFlags, 0x8E
+.set partial_len, 0x11C
+.set GetDataType, 0x435
+.set SmapTypeStrings, 0x436
+.set GetFuncPrgmBodyPtr, 0x43A
+.set free, 0xA3
+.set FreeHandles, 0x23B
+.set HeapAlloc, 0x90
+.set HeapAllocESTACK, 0x91
+.set HeapAllocHigh, 0x92
+.set HeapAllocHighThrow, 0x94
+.set HeapAllocPtr, 0xA2
+.set HeapAllocThrow, 0x93
+.set HeapAvail, 0x8F
+.set HeapCompress, 0x95
+.set HeapDeref, 0x96
+.set HeapEnd, 0xA1
+.set HeapFreeIndir, 0x98
+.set HeapFreePtr, 0xA3
+.set HeapFree, 0x97
+.set HeapGetHandle, 0x239
+.set HeapGetLock, 0x9B
+.set HeapLock, 0x9A
+.set HeapMax, 0x9C
+.set HeapMoveHigh, 0xA0
+.set HeapPtrToHandle, 0x23A
+.set HeapRealloc, 0x9D
+.set HeapSize, 0x9E
+.set HeapUnlock, 0x9F
+.set HLock, 0x99
+.set malloc, 0xA2
+.set HeapWalk, 0x12C
+.set HeapShuffle, 0x474
+.set EX_getArg, 0xBE
+.set EX_getBCD, 0xBF
+.set RemainingArgCnt, 0x3C3
+.set GKeyDown, 0x17F
+.set GKeyFlush, 0x180
+.set GKeyIn, 0x17E
+.set kbhit, 0x52
+.set ngetchx, 0x51
+.set OSGetStatKeys, 0x299
+.set OSInitBetweenKeyDelay, 0x249
+.set pushkey, 0x50
+.set OSInitKeyInitDelay, 0x248
+.set alphaLockOn, 0x481
+.set alphaLockOff, 0x482
+.set SetAlphaStatus, 0x163
+.set GetAlphaStatus, 0x164
+.set KeyYesOrNo, 0x3EB
+.set OSFastArrows, 0x15C
+.set restoreAlphaLock, 0x483
+.set BitmapGet, 0x185
+.set BitmapInit, 0x186
+.set BitmapPut, 0x187
+.set BitmapSize, 0x188
+.set ClrScr, 0x19E
+.set DrawChar, 0x1A4
+.set DrawClipChar, 0x191
+.set DrawClipEllipse, 0x192
+.set DrawClipLine, 0x193
+.set DrawClipPix, 0x194
+.set DrawClipRect, 0x195
+.set DrawFkey, 0x1A5
+.set DrawIcon, 0x1A6
+.set DrawLine, 0x1A7
+.set DrawMultiLines, 0x196
+.set DrawPix, 0x1A8
+.set CalcBitmapSize, 0x3EF
+.set DrawStr, 0x1A9
+.set DrawStrWidth, 0x197
+.set DrawTo, 0x19C
+.set FillLines2, 0x199
+.set FillTriangle, 0x198
+.set FontCharWidth, 0x190
+.set FontGetSys, 0x18E
+.set FontSetSys, 0x18F
+.set GetPix, 0x19F
+.set LineTo, 0x19C
+.set MoveTo, 0x19D
+.set PortRestore, 0x1A3
+.set PortSet, 0x1A2
+.set QScrRectOverlap, 0x18D
+.set RestoreScrState, 0x1A1
+.set SaveScrState, 0x1A0
+.set ScrRect, 0x2F
+.set ScrRectFill, 0x189
+.set ScrRectOverlap, 0x18A
+.set ScrRectScroll, 0x18B
+.set ScrRectShift, 0x18C
+.set ScrToHome, 0x2E
+.set ScrToWin, 0x2D
+.set SetCurAttr, 0x19A
+.set SetCurClip, 0x19B
+.set ClientToScr, 0x42C
+.set DrawStrWidthP, 0x3EE
+.set MakeScrRect, 0x42D
+.set DrawWinBorder, 0x27
+.set FirstWindow, 0x0
+.set MakeWinRect, 0x2C
+.set RectWinToScr, 0x2A
+.set RectWinToWin, 0x29
+.set WinActivate, 0x1
+.set WinAttr, 0x2
+.set WinBackground, 0x4
+.set WinBackupToScr, 0x3
+.set WinBegin, 0x5
+.set WinBitmapGet, 0x6
+.set WinBitmapPut, 0x7
+.set WinBitmapSize, 0x8
+.set WinChar, 0xA
+.set WinCharXY, 0x9
+.set WinClose, 0xB
+.set WinClr, 0xC
+.set WinDeactivate, 0xD
+.set WinDupStat, 0xE
+.set WinEllipse, 0xF
+.set WinFill, 0x10
+.set WinFillLines2, 0x11
+.set WinFillTriangle, 0x12
+.set WinFont, 0x13
+.set WinGetCursor, 0x14
+.set WinHeight, 0x292
+.set WinHide, 0x15
+.set WinHome, 0x16
+.set WinLine, 0x17
+.set WinLineNC, 0x18
+.set WinLineRel, 0x1A
+.set WinLineTo, 0x19
+.set WinMoveCursor, 0x1B
+.set WinMoveRel, 0x1D
+.set WinMoveTo, 0x1C
+.set WinOpen, 0x1E
+.set WinPixGet, 0x1F
+.set WinPixSet, 0x20
+.set WinRect, 0x21
+.set WinReOpen, 0x22
+.set WinScrollH, 0x23
+.set WinScrollV, 0x24
+.set WinStr, 0x25
+.set WinStrXY, 0x26
+.set WinWidth, 0x291
+.set DrawStaticButton, 0x35
+.set SetWinClip, 0x42E
+.set BN_powerMod, 0x123
+.set BN_power17Mod, 0x122
+.set BN_prodMod, 0x124
+.set cdecrypt, 0x127
+.set MD5Done, 0x257
+.set MD5Final, 0x256
+.set MD5Init, 0x254
+.set MD5Update, 0x255
+.set Dialog, 0x30
+.set DialogAdd, 0x33
+.set DialogDo, 0x32
+.set DialogNew, 0x34
+.set DlgMessage, 0x1B4
+.set VarNew, 0x28E
+.set VarOpen, 0x28C
+.set VarSaveAs, 0x28D
+.set ERD_dialog, 0x151
+.set ERD_process, 0x152
+.set ER_catch, 0x154
+.set ER_success, 0x155
+.set ER_throwVar, 0x153
+.set find_error_message, 0x2C1
+.set EM_abandon, 0x15B
+.set EM_findEmptySlot, 0x15F
+.set EM_GC, 0x160
+.set EM_survey, 0x165
+.set EM_write, 0x167
+.set FL_addCert, 0x169
+.set FL_download, 0x16A
+.set FL_getCert, 0x16C
+.set FL_getHardwareParmBlock, 0x16B
+.set FL_getVerNum, 0x16D
+.set FL_write, 0x171
+.set BatTooLowFlash, 0x434
+.set FlashMemoryEnd, 0x43D
+.set EM_blockVerifyErase, 0x15D
+.set flush_link, 0x24D
+.set getcalc, 0x54
+.set LIO_Get, 0x57
+.set LIO_GetMultiple, 0x59
+.set LIO_Receive, 0x58
+.set LIO_RecvData, 0x5B
+.set LIO_Send, 0x56
+.set LIO_SendData, 0x5A
+.set LIO_SendProduct, 0x253
+.set OSCheckSilentLink, 0x24A
+.set OSLinkClose, 0x24E
+.set OSLinkCmd, 0x24B
+.set OSLinkOpen, 0x24D
+.set OSLinkReset, 0x24C
+.set OSLinkTxQueueActive, 0x252
+.set OSLinkTxQueueInquire, 0x251
+.set OSReadLinkBlock, 0x24F
+.set OSWriteLinkBlock, 0x250
+.set receive, 0x24F
+.set reset_link, 0x24C
+.set sendcalc, 0x55
+.set transmit, 0x250
+.set tx_free, 0x252
+.set MenuAddIcon, 0x42
+.set MenuAddText, 0x41
+.set MenuBegin, 0x36
+.set MenuCheck, 0x37
+.set MenuEnd, 0x38
+.set MenuGetTopRedef, 0x40
+.set MenuKey, 0x39
+.set MenuNew, 0x43
+.set MenuOn, 0x3A
+.set MenuPopup, 0x3B
+.set MenuSubStat, 0x3C
+.set MenuTopRedef, 0x3F
+.set MenuTopSelect, 0x3E
+.set MenuTopStat, 0x3D
+.set MenuUpdate, 0x49
+.set PopupAddText, 0x44
+.set PopupClear, 0x46
+.set PopupDo, 0x47
+.set PopupNew, 0x45
+.set PopupText, 0x48
+.set VarCreateFolderPopup, 0x28F
+.set MenuLoad, 0x3F2
+.set MenuFlags, 0x3F4
+.set QMenuTopSelect, 0x41A
+.set DynMenuAdd, 0x3F1
+.set FKeyI_H, 0x592
+.set DynMenuChange, 0x3F0
+.set MenuItemDef, 0x3F3
+.set MenuOff, 0x419
+.set PopupBegin, 0x3F5
+.set PopupBeginDo, 0x3F6
+.set ceof, 0x128
+.set cfindfield, 0x12A
+.set cgetc, 0x12B
+.set cgetcertrevno, 0x2A0
+.set cgetflen, 0x12D
+.set cgetfnl, 0x12E
+.set cgetnl, 0x12F
+.set cgetns, 0x130
+.set cgetsn, 0x2A1
+.set copen, 0x132
+.set copensub, 0x133
+.set cputhdr, 0x134
+.set cputnl, 0x135
+.set cputns, 0x136
+.set cread, 0x137
+.set ctell, 0x138
+.set cwrite, 0x139
+.set CertificateMemory, 0x43E
+.set sprintf, 0x53
+.set cmd_clrdraw, 0x32D
+.set cmd_clrgraph, 0x32F
+.set cmd_clrhome, 0x330
+.set cmd_clrio, 0x331
+.set cmd_clrtable, 0x332
+.set cmd_custmoff, 0x335
+.set cmd_custmon, 0x336
+.set cmd_disp, 0x33D
+.set cmd_dispg, 0x33E
+.set cmd_disphome, 0x33F
+.set cmd_disptbl, 0x340
+.set cmd_fnoff, 0x34D
+.set cmd_fnon, 0x34E
+.set cmd_get, 0x350
+.set cmd_getcalc, 0x351
+.set cmd_graph, 0x353
+.set cmd_input, 0x356
+.set cmd_inputstr, 0x357
+.set cmd_newprob, 0x367
+.set cmd_output, 0x369
+.set cmd_pause, 0x36B
+.set cmd_printobj, 0x370
+.set cmd_prompt, 0x371
+.set cmd_rclgdb, 0x381
+.set cmd_send, 0x387
+.set cmd_sendcalc, 0x388
+.set cmd_sendchat, 0x389
+.set cmd_stogdb, 0x390
+.set cmd_style, 0x392
+.set cmd_table, 0x393
+.set cmd_shade, 0x38A
+.set cmd_newpic, 0x365
+.set cmd_newplot, 0x366
+.set cmd_pxlon, 0x37B
+.set cmd_circle, 0x32C
+.set cmd_cyclepic, 0x339
+.set cmd_randseed, 0x380
+.set cmd_line, 0x358
+.set cmd_andpic, 0x32A
+.set cmd_blddata, 0x32B
+.set cmd_clrerr, 0x32E
+.set cmd_drawparm, 0x343
+.set cmd_exit, 0x34A
+.set cmd_copyvar, 0x333
+.set cmd_cubicreg, 0x334
+.set cmd_custom, 0x337
+.set cmd_cycle, 0x338
+.set cmd_drawpol, 0x344
+.set cmd_delfold, 0x33A
+.set cmd_delvar, 0x33B
+.set cmd_dialog, 0x33C
+.set cmd_drawinv, 0x342
+.set cmd_drawfunc, 0x341
+.set cmd_linehorz, 0x359
+.set cmd_linetan, 0x35A
+.set cmd_else, 0x345
+.set cmd_endfor, 0x346
+.set cmd_for, 0x34F
+.set cmd_if, 0x354
+.set cmd_ifthen, 0x355
+.set cmd_linreg, 0x35C
+.set cmd_expreg, 0x34B
+.set cmd_lnreg, 0x35D
+.set cmd_logistic, 0x360
+.set cmd_sinreg, 0x38C
+.set cmd_twovar, 0x398
+.set cmd_onevar, 0x368
+.set cmd_showstat, 0x38B
+.set cmd_rplcpic, 0x386
+.set cmd_xorpic, 0x39B
+.set cmd_rclpic, 0x382
+.set cmd_pxlcircle, 0x377
+.set cmd_stopic, 0x391
+.set cmd_fill, 0x34C
+.set cmd_goto, 0x352
+.set cmd_popup, 0x36E
+.set cmd_endloop, 0x347
+.set cmd_endwhile, 0x349
+.set cmd_while, 0x39A
+.set cmd_try, 0x397
+.set cmd_endtry, 0x348
+.set cmd_passerr, 0x36A
+.set cmd_linevert, 0x35B
+.set cmd_plotsoff, 0x36C
+.set cmd_plotson, 0x36D
+.set cmd_slpline, 0x38D
+.set cmd_sortd, 0x38F
+.set cmd_sorta, 0x38E
+.set cmd_unlock, 0x399
+.set cmd_lock, 0x35F
+.set cmd_unarchiv, 0x449
+.set cmd_archive, 0x448
+.set cmd_pxlline, 0x379
+.set cmd_pxlhorz, 0x378
+.set cmd_pxlvert, 0x37D
+.set cmd_ptchg, 0x372
+.set cmd_ptoff, 0x373
+.set cmd_pxltext, 0x37C
+.set cmd_pton, 0x374
+.set cmd_pxlchg, 0x376
+.set cmd_pxloff, 0x37A
+.set cmd_text, 0x394
+.set cmd_pttext, 0x375
+.set cmd_local, 0x35E
+.set cmd_movevar, 0x362
+.set cmd_rename, 0x383
+.set cmd_return, 0x385
+.set cmd_trace, 0x396
+.set cmd_toolbar, 0x395
+.set cmd_request, 0x384
+.set cmd_newdata, 0x363
+.set cmd_newfold, 0x364
+.set cmd_zoomin, 0x3A0
+.set cmd_zoomdata, 0x39D
+.set cmd_zoomdec, 0x39E
+.set cmd_zoomfit, 0x39F
+.set cmd_zoomint, 0x3A1
+.set cmd_zoomprev, 0x3A3
+.set cmd_zoombox, 0x39C
+.set cmd_zoomout, 0x3A2
+.set cmd_zoomrcl, 0x3A4
+.set cmd_zoomsqr, 0x3A5
+.set cmd_zoomsto, 0x3A7
+.set cmd_zoomtrig, 0x3A8
+.set cmd_zoomstd, 0x3A6
+.set cmd_medmed, 0x361
+.set cmd_quartreg, 0x37F
+.set cmd_quadreg, 0x37E
+.set cmd_powerreg, 0x36F
+.set TE_checkSlack, 0xA6
+.set TE_close, 0xA5
+.set TE_empty, 0xA7
+.set TE_focus, 0xA8
+.set TE_handleEvent, 0xA9
+.set TE_indicateReadOnly, 0xAA
+.set TE_isBlank, 0xAB
+.set TE_openFixed, 0xAD
+.set TE_open, 0xAC
+.set TE_pasteText, 0xAE
+.set TE_reopenPlain, 0xB0
+.set TE_reopen, 0xAF
+.set TE_select, 0xB1
+.set TE_shrinkWrap, 0xB2
+.set TE_unfocus, 0xB3
+.set TE_updateCommand, 0xB4
+.set longjmp, 0x267
+.set setjmp, 0x266
+.set strcat, 0x26E
+.set strchr, 0x274
+.set strcmp, 0x271
+.set strcpy, 0x26C
+.set strcspn, 0x275
+.set strerror, 0x27D
+.set strlen, 0x27E
+.set strncat, 0x26F
+.set strncmp, 0x272
+.set strncpy, 0x26D
+.set strpbrk, 0x276
+.set strrchr, 0x277
+.set strspn, 0x278
+.set strstr, 0x279
+.set strtok, 0x27A
+.set cmpstri, 0x16F
+.set stricmp, 0x407
+.set memucmp, 0x3CC
+.set memcpy, 0x26A
+.set memchr, 0x273
+.set memcmp, 0x270
+.set _memset, 0x27B
+.set memmove, 0x26B
+.set memset, 0x27C
+.set add1_to_top, 0x51D
+.set push_gcd_then_cofactors, 0x59E
+.set and_onto_top, 0x579
+.set are_units_consistent, 0x40F
+.set assign_between, 0x2AC
+.set push_mrow_aux, 0x31B
+.set CharNumber, 0x113
+.set CheckGraphRef, 0x7D
+.set ST_flags, 0x443
+.set ck_valid_float, 0x1E5
+.set CkValidDelta, 0x1C3
+.set cleanup_de_mem, 0x1EC
+.set cleanup_seq_mem, 0x1D7
+.set clear_error_context, 0x44C
+.set FAccess, 0x3D4
+.set compare_numbers, 0x50D
+.set convert_to_TI_92, 0x258
+.set CountGrFunc, 0x1D5
+.set cpt_gr_fun, 0x1D1
+.set cpt_gr_param, 0x1D2
+.set cpt_gr_polar, 0x1D3
+.set CptDeltax, 0x1C1
+.set CptDeltay, 0x1C2
+.set CptFuncX, 0x1B9
+.set CptIndep, 0x1C9
+.set CptLastIndepDE, 0x1EF
+.set CreateEmptyList, 0x1E6
+.set CTypeTable, 0x442
+.set CustomBegin, 0x14A
+.set CustomEnd, 0x14C
+.set CustomFree, 0x150
+.set CustomMenuItem, 0x14B
+.set DataTypeNames, 0x43B
+.set de_initRes, 0x1F0
+.set de_loop, 0x1EB
+.set de_rng_no_graph, 0x2A2
+.set delete_list_element, 0x2AF
+.set deStepCk, 0x1F9
+.set did_push_divide_units, 0x3AE
+.set did_push_lincf, 0x572
+.set did_push_var_val, 0x2AD
+.set divide_top, 0x527
+.set does_push_fetch, 0x2AE
+.set dv_create_graph_titles, 0x117
+.set dv_findColumn, 0x119
+.set TIOS_EV_getAppID, 0x454
+.set EQU_deStatus, 0x16E
+.set EQU_getNameInfo, 0x120
+.set EQU_select, 0x11E
+.set EQU_setStyle, 0x11F
+.set ER_throwFrame, 0x507
+.set ERD_dismissNotice, 0x476
+.set ERD_notice, 0x475
+.set estack_to_float, 0x469
+.set EV_appA, 0x452
+.set EV_appB, 0x453
+.set EV_appSide, 0x458
+.set EV_currentApp, 0x45C
+.set EV_errorCode, 0x46D
+.set TIOS_strtol, 0x4FF
+.set EV_quit, 0x48E
+.set EV_runningApp, 0x45D
+.set execute_graph_func, 0x1D0
+.set FCreate, 0x3D6
+.set FDelete, 0x3D7
+.set FEof, 0x3D8
+.set FFindNext, 0x3DA
+.set FGetC, 0x3DB
+.set FGetPos, 0x3DC
+.set FPutC, 0x3DF
+.set FindFunc, 0x1C5
+.set FindGrFunc, 0x1C6
+.set FirstNonblank, 0x4DE
+.set FirstSeqPlot, 0x1D6
+.set fix_loop_displacements, 0x170
+.set FLOATTAB, 0x464
+.set ForceFloat, 0x47D
+.set FOpen, 0x3DE
+.set freeIdList, 0x4D6
+.set FSetPos, 0x3E1
+.set FSetVer, 0x3E4
+.set FStatus, 0x3E5
+.set FWrite, 0x3E7
+.set FuncLineFlt, 0x1BF
+.set gdb_len, 0x1E0
+.set gdb_recall, 0x1E2
+.set gdb_store, 0x1E1
+.set gen_version, 0x259
+.set get_lb, 0x516
+.set get_list_indices, 0x2B8
+.set get_matrix_indices, 0x2B9
+.set get_ub, 0x517
+.set GetStatValue, 0x11B
+.set GetSysGraphRef, 0x8A
+.set GetTagStr, 0x46C
+.set GM_Derivative, 0x1B0
+.set GM_DistArc, 0x1B1
+.set GM_Inflection, 0x1AD
+.set GM_Integrate, 0x1AC
+.set GM_Intersect, 0x1AB
+.set GM_Math1, 0x1AF
+.set GM_Shade, 0x1B2
+.set GM_TanLine, 0x1AE
+.set GM_Value, 0x1AA
+.set gr_active, 0x10B
+.set gr_add_fldpic, 0x1F6
+.set gr_ck_solvergraph, 0x1FA
+.set gr_CptIndepInc, 0x1CA
+.set gr_de_axes_lbl, 0x1F2
+.set gr_de_value, 0x1ED
+.set gr_del_locals, 0x1CB
+.set gr_del_vars_in_folder, 0x1F1
+.set gr_delete_fldpic, 0x1F4
+.set gr_DelFolder, 0x1CC
+.set gr_DispLabels, 0x1E3
+.set gr_execute_de, 0x1F3
+.set gr_execute_seq, 0x1D4
+.set gr_find_de_result, 0x1E8
+.set gr_find_el, 0x1F8
+.set gr_find_func_index, 0x1EE
+.set gr_flags, 0x463
+.set gr_initCondName, 0x1C8
+.set gr_openFolder, 0x1CD
+.set gr_other, 0x10C
+.set GR_Pan, 0x1C4
+.set gr_remove_fldpic, 0x1F5
+.set gr_seq_value, 0x1DC
+.set gr_stopic, 0x1F7
+.set gr_xres_pixel, 0x1B8
+.set GR3_addContours, 0x1FB
+.set GR3_freeDB, 0x1FD
+.set GR3_handleEvent, 0x1FE
+.set GR3_paint3d, 0x1FF
+.set GR3_xyToWindow, 0x200
+.set GraphActivate, 0x1FC
+.set GraphOrTableCmd, 0x1E4
+.set GrAxes, 0x1B7
+.set GrClipLine, 0x1C0
+.set grFuncName, 0x1C7
+.set GrLineFlt, 0x1BE
+.set GS_PlotAll, 0x202
+.set GS_PlotTrace, 0x201
+.set GT_BackupToScr, 0x20C
+.set GT_CalcDepVals, 0x20D
+.set GT_CenterGraphCursor, 0x20E
+.set GT_CursorKey, 0x20F
+.set GT_DE_Init_Conds, 0x22A
+.set GT_DspFreeTraceCoords, 0x210
+.set GT_DspMsg, 0x212
+.set GT_DspTraceCoords, 0x211
+.set GT_Error, 0x213
+.set GT_Format, 0x214
+.set GT_FreeTrace, 0x215
+.set GT_IncXY, 0x216
+.set GT_KeyIn, 0x217
+.set GT_Open, 0x21B
+.set GT_PrintCursor, 0x229
+.set GT_QFloatCursorsInRange, 0x218
+.set GT_Regraph, 0x219
+.set GT_Regraph_if_neccy, 0x21A
+.set GT_SaveAs, 0x21C
+.set GT_SelFunc, 0x21D
+.set GT_Set_Graph_Format, 0x228
+.set GT_SetCursorXY, 0x21F
+.set GT_SetGraphRange, 0x21E
+.set GT_ShowMarkers, 0x220
+.set GT_Trace, 0x221
+.set GT_ValidGraphRanges, 0x222
+.set GT_WinBound, 0x223
+.set GT_WinCursor, 0x224
+.set GXcoord, 0x226
+.set GYcoord, 0x225
+.set GZ_Box, 0x22B
+.set GZ_Center, 0x22C
+.set GZ_Decimal, 0x22D
+.set GZ_Fit, 0x22E
+.set GZ_InOut, 0x22F
+.set GZ_Integer, 0x230
+.set GZ_Previous, 0x231
+.set GZ_Recall, 0x232
+.set GZ_SetFactors, 0x233
+.set GZ_Square, 0x234
+.set GZ_Standard, 0x235
+.set GZ_Stat, 0x236
+.set GZ_Store, 0x237
+.set GZ_Trig, 0x238
+.set has_different_variable, 0x5A0
+.set has_unit_base, 0x3AF
+.set hStrAppend, 0x45F
+.set index_after_match_endtag, 0x2B1
+.set index_if_pushed_binomial_info, 0x5A1
+.set index_if_pushed_qquad_info, 0x5A2
+.set index_reductum_with_tag_base, 0x59F
+.set index_rmng_factor, 0x565
+.set index_rmng_fctrs_start_base, 0x564
+.set index_rmng_fctrs_start_base_tag, 0x563
+.set index_rmng_fctrs_start_fctr_tag, 0x562
+.set init_list_indices, 0x2BA
+.set init_matrix_indices, 0x2BB
+.set init_unit_system, 0x3B0
+.set InitDEAxesRng, 0x1E9
+.set InitDEMem, 0x1EA
+.set InitTimeSeq, 0x1D9
+.set integer_non_unknown, 0x50C
+.set is_cFloat_agg, 0x465
+.set is_complex_Float, 0x48B
+.set is_constant, 0x593
+.set is_equivalent_to, 0x578
+.set is_executable, 0x25A
+.set is_minus1, 0x508
+.set is_neg_lead_numr_coef_re_part, 0x56D
+.set is_negative, 0x575
+.set is_never0, 0x577
+.set is_nonnegative, 0x574
+.set is_nonpositive, 0x576
+.set is_pathname, 0x3C6
+.set is_polynomial_in_var_or_kern, 0x56B
+.set is_pos_int_and_eq_quantum, 0x509
+.set is_positive, 0x573
+.set is_reciprocal_of_quantum, 0x50A
+.set is_term_improper, 0x556
+.set is_totally_polynomial, 0x56C
+.set is_units_term, 0x3B1
+.set is_variable, 0x488
+.set is_whole_number, 0x50B
+.set is0, 0x269
+.set lead_conjunct_factor_index, 0x580
+.set lead_disjunct_term_index, 0x57E
+.set linear_degree, 0x571
+.set LIO_SendIdList, 0x3D0
+.set LoadSymFromFindHandle, 0x281
+.set LOC_formatDate, 0x590
+.set LOC_getLocalDateFormat, 0x58F
+.set LOC_localVersionDate, 0x591
+.set MO_option, 0x447
+.set negate_top, 0x525
+.set next_token, 0x3C7
+.set next_var_or_kernel_index, 0x56E
+.set NG_control, 0x466
+.set nonblank, 0x3C8
+.set OO_appGetPublicStorage, 0x425
+.set OO_appIsMarkedDelete, 0x426
+.set OO_appMarkDelete, 0x427
+.set OO_AppNameToACB, 0x406
+.set OO_appSetPublicStorage, 0x429
+.set OO_Deref, 0x3FB
+.set TIOS_ldiv, 0x5BD
+.set OO_CondGetAttr, 0x3FA
+.set OO_Destroy, 0x423
+.set OO_DestroyAll, 0x4F5
+.set OO_firstACB, 0x451
+.set OO_GetAppAttr, 0x3FC
+.set OO_GetAttr, 0x3FD
+.set OO_HasAttr, 0x3FE
+.set OO_InstallAppHook, 0x490
+.set OO_InstallAppHookByName, 0x492
+.set OO_InstallSystemHook, 0x404
+.set OO_New, 0x3FF
+.set OO_NextACB, 0x402
+.set OO_PrevACB, 0x403
+.set OO_SetAppAttr, 0x400
+.set OO_SetAttr, 0x401
+.set OO_SuperFrame, 0x48F
+.set OO_UninstallAppHook, 0x491
+.set OO_UninstallAppHookByName, 0x493
+.set OO_UninstallSystemHook, 0x405
+.set or_onto_top, 0x57B
+.set OSModKeyStatus, 0x431
+.set paint_all_except, 0x11D
+.set ParseSymName, 0x78
+.set PlotDel, 0x203
+.set PlotDup, 0x207
+.set PlotGet, 0x205
+.set PlotInit, 0x206
+.set PlotLookup, 0x209
+.set PlotPut, 0x204
+.set PlotSize, 0x208
+.set primary_tag_list, 0x467
+.set pSymPG, 0x430
+.set push_ans_entry, 0x2B0
+.set push_auto_units_conversion, 0x3B2
+.set push_but_conjunct_factor, 0x582
+.set push_but_factor, 0x561
+.set push_but_term, 0x56A
+.set push_constant_factors, 0x55D
+.set push_constant_terms, 0x566
+.set push_dependent_factors, 0x55F
+.set push_dependent_terms, 0x568
+.set push_div_dif_1c, 0x58D
+.set push_div_dif_1f, 0x58C
+.set push_float_qr_fact, 0x2BC
+.set push_format, 0x315
+.set push_independent_factors, 0x560
+.set push_independent_terms, 0x569
+.set TIOS_abs, 0x5BA
+.set push_long_to_integer, 0x4E3
+.set push_lu_fact, 0x2BD
+.set push_make_proper, 0x557
+.set push_minus_recip_of_quantum, 0x510
+.set push_negate_quantum_as_negint, 0x4F1
+.set push_nonconstant_factors, 0x55E
+.set push_nonconstant_terms, 0x567
+.set push_nonnumeric_factors, 0x55C
+.set push_parse_prgm_or_func_text, 0x3C9
+.set push_pi, 0x512
+.set push_pi_on_quantum, 0x513
+.set push_poly_deg_in_var_or_kernel, 0x570
+.set push_poly_qr, 0x59D
+.set push_quantum_as_nonnegative_int, 0x50E
+.set push_quantum_pair_as_pos_frac, 0x511
+.set push_reciprocal, 0x597
+.set push_reciprocal_of_quantum, 0x50F
+.set push_simplify, 0x44E
+.set push_simplify_statements, 0x44F
+.set push_sq_matrix_to_whole_number, 0x3C0
+.set push_standardize, 0x558
+.set push_symbolic_qr_fact, 0x2BE
+.set push_trig, 0x535
+.set push_ulong_to_integer, 0x4E4
+.set push_unit_system_list, 0x3B3
+.set push_ushort_to_integer, 0x4E5
+.set push_var, 0x3CB
+.set push_var_kern_tail, 0x56F
+.set push_zero_partial_column, 0x3C2
+.set push0, 0x4E7
+.set push1, 0x4E8
+.set QActivePlots, 0x20A
+.set QPlotActive, 0x20B
+.set QSkipGraphErr, 0x1E7
+.set QstatRcl, 0x40B
+.set raise_to_top, 0x529
+.set ReallocExprStruct, 0x14D
+.set recall_data_var, 0x112
+.set Regraph, 0x1B6
+.set remaining_conjuncts_index, 0x581
+.set remaining_disjuncts_index, 0x57F
+.set replace_top_with_reciprocal, 0x52D
+.set replace_top2_with_and, 0x57A
+.set replace_top2_with_difference, 0x51C
+.set replace_top2_with_imre, 0x559
+.set replace_top2_with_or, 0x57C
+.set replace_top2_with_pow, 0x52A
+.set replace_top2_with_prod, 0x523
+.set replace_top2_with_ratio, 0x528
+.set replace_top2_with_sum, 0x519
+.set rngLen, 0x1DF
+.set run_one_seq, 0x1DB
+.set ScrRectDivide, 0x28
+.set SearchExprStruct, 0x14E
+.set seqStepCk, 0x1DE
+.set seqWebInit, 0x1DA
+.set SetGraphMode, 0x1B5
+.set setup_more_graph_fun, 0x1CE
+.set setup_unit_system, 0x3B4
+.set sf_width, 0x4D3
+.set SP_Define, 0x110
+.set spike_chk_gr_dirty, 0x11A
+.set spike_geo_titles, 0x115
+.set spike_in_editor, 0x116
+.set spike_optionD, 0x114
+.set spike_titles_in_editor, 0x118
+.set statEnd, 0x409
+.set statFree, 0x40A
+.set statStart, 0x408
+.set StepCk, 0x1DD
+.set store_data_var, 0x111
+.set store_func_def, 0x2B4
+.set store_to_subscripted_element, 0x2B5
+.set FClose, 0x3D5
+.set subtract_from_top, 0x51B
+.set subtract1_from_top, 0x51E
+.set time_loop, 0x1D8
+.set times_top, 0x522
+.set tokenize_if_TI_92_or_text, 0x265
+.set TokenizeName, 0x3E9
+.set FFindFirst, 0x3D9
+.set unlock_more_graph_fun, 0x1CF
+.set ValidateStore, 0x8D
+.set VarGraphRefBitsClear, 0x268
+.set VarOptList, 0x444
+.set VarSaveTitle, 0x290
+.set VarStoreLink, 0x87
+.set WinBeginPaint, 0x500
+.set WinBitmapSizeExt, 0x411
+.set WinEndPaint, 0x501
+.set WinLineExt, 0x47C
+.set WinRemove, 0x414
+.set XCvtFtoP, 0x1BD
+.set XCvtPtoF, 0x1BA
+.set YCvtFtoP, 0x1BC
+.set YCvtFtoWin, 0x1B3
+.set YCvtPtoF, 0x1BB
+.set did_map_aggregate_arg, 0x5B8
+.set did_push_approx_inflection_point, 0x5B0
+.set errno, 0x5D9
+.set estack_max_index, 0x5BF
+.set EV_flags, 0x5DF
+.set Float0Index, 0x5D0
+.set Float1Index, 0x5D1
+.set FloatExp1Index, 0x5D4
+.set FloatHalfIndex, 0x5E0
+.set FloatMinus1Index, 0x5D2
+.set FloatPiIndex, 0x5D3
+.set IM_re_tol, 0x5C1
+.set index_false, 0x5D6
+.set index_true, 0x5D5
+.set Integer0Index, 0x5CD
+.set Integer1Index, 0x5CE
+.set Integer2Index, 0x5E1
+.set IntegerMinus1Index, 0x5CF
+.set is_real, 0x5A9
+.set is_undefined, 0x5B7
+.set NG_such_that_index, 0x5D7
+.set OSCheckLinkOpen, 0x5E3
+.set add_to_top, 0x518
+.set RM_Type, 0x5DC
+.set TIOS_labs, 0x5BC
+.set RAtionalize_tol, 0x5C0
+.set replace_top_with_post_simplified, 0x5B6
+.set WinStrXYWrap, 0x5DB
+.set TIOS_div, 0x5BB
+.set UpdateWindows, 0x2B
+.set push_user_func, 0x2B3
+.set is1, 0x2FD
+.set FGetSize, 0x3DD
+.set FRead, 0x3E0
+.set FSetBufSize, 0x3E2
+.set FSetSize, 0x3E3
+.set FType, 0x3E6
+.set GD_HVLine, 0x178
+.set GD_Circle, 0x176
+.set GD_Pen, 0x179
+.set GD_Eraser, 0x17A
+.set GD_Text, 0x17B
+.set GD_Select, 0x17C
+.set GD_Contour, 0x17D
+.set GD_Line, 0x177
+.set HomeAlone, 0x506
+.set HS_getAns, 0x241
+.set HomeExecute, 0x10E
+.set HomePushEStack, 0x10F
+.set HS_getEntry, 0x242
+.set HS_countFIFO, 0x23D
+.set HS_freeFIFONode, 0x240
+.set HS_deleteFIFONode, 0x23E
+.set HS_freeAll, 0x23F
+.set HS_chopFIFO, 0x23C
+.set HS_getFIFONode, 0x243
+.set HS_newFIFONode, 0x245
+.set HS_pushFIFONode, 0x246
+.set HS_popEStack, 0x244
+.set push_matrix_product, 0x3C5
+.set push_list_times, 0x3BE
+.set push_list_plus, 0x3BD
+.set push_pow, 0x30F
+.set push_and, 0x5AB
+.set push_arg_plus_1, 0x51F
+.set push_arg_minus_1, 0x520
+.set push_assignment, 0x4DD
+.set push_difference, 0x51A
+.set push_dot_div, 0x4CD
+.set push_dot_add, 0x4A0
+.set push_dot_exponentiate, 0x596
+.set push_dot_mult, 0x4A1
+.set push_dot_sub, 0x4A2
+.set push_equals, 0x5A3
+.set push_exponentiate, 0x595
+.set push_to_sphere, 0x329
+.set push_factorial, 0x540
+.set push_greater_than, 0x5A5
+.set push_greater_than_or_equals, 0x5A7
+.set push_indir_name, 0x2B2
+.set push_degrees, 0x314
+.set push_less_than, 0x5A6
+.set push_less_than_or_equals, 0x5A8
+.set push_negate, 0x524
+.set push_not, 0x5AA
+.set push_not_equals, 0x5A4
+.set push_or, 0x5AC
+.set push_percent, 0x555
+.set push_radians, 0x4B3
+.set push_product, 0x521
+.set push_ratio, 0x526
+.set push_sum, 0x594
+.set push_substitute_simplify, 0x5B9
+.set push_substitute_using_such_that, 0x5BE
+.set push_substitute_no_simplify, 0x489
+.set push_to_cylin, 0x328
+.set did_push_to_polar, 0x313
+.set push_square, 0x52C
+.set push_setgraph, 0x322
+.set push_getmode, 0x318
+.set push_rand, 0x31F
+.set push_getkey, 0x316
+.set push_setmode, 0x323
+.set push_settable, 0x324
+.set push_switch, 0x327
+.set push_acos, 0x537
+.set push_abs, 0x543
+.set push_acosh, 0x53E
+.set push_1st_derivative, 0x5AE
+.set push_approx, 0x4F7
+.set push_asinh, 0x53D
+.set push_asin, 0x536
+.set push_augment, 0x496
+.set push_atanh, 0x53F
+.set push_atan, 0x538
+.set push_char, 0x497
+.set push_ceiling, 0x54B
+.set push_coldim, 0x498
+.set push_colnorm, 0x499
+.set push_comdenom, 0x59B
+.set push_conj, 0x547
+.set push_cosh, 0x53B
+.set push_cos, 0x533
+.set push_cross_product, 0x4CE
+.set push_cumsum, 0x49A
+.set push_csolve, 0x585
+.set push_czeros, 0x587
+.set push_def_int, 0x5B2
+.set push_desolve, 0x58B
+.set push_determinant, 0x49D
+.set push_diag, 0x49E
+.set push_dimension, 0x49F
+.set push_dotproduct, 0x4A3
+.set push_eigvc, 0x4CF
+.set push_eigvl, 0x4D0
+.set push_exp, 0x52E
+.set push_expand, 0x59A
+.set push_factor, 0x59C
+.set push_floor, 0x54A
+.set push_fractional_part, 0x54E
+.set push_gcd_numbers, 0x514
+.set push_randnorm, 0x4B5
+.set push_getfold, 0x317
+.set push_gettype, 0x319
+.set push_identity_mat, 0x4A4
+.set push_im, 0x546
+.set push_re, 0x545
+.set push_comb, 0x542
+.set push_perm, 0x541
+.set push_part, 0x31C
+.set push_instring, 0x31A
+.set push_integer_remainder, 0x550
+.set push_integer_part, 0x54D
+.set push_integer_gcd, 0x551
+.set push_integer_lcm, 0x552
+.set push_integer_quotient, 0x54F
+.set push_is_prime, 0x515
+.set push_left, 0x4A5
+.set did_push_series, 0x588
+.set push_lim, 0x5AD
+.set push_ln, 0x52F
+.set push_list_to_mat, 0x4A6
+.set push_log10, 0x530
+.set push_mat_to_list, 0x4A8
+.set push_matnorm, 0x4A7
+.set push_max, 0x58A
+.set push_median, 0x4AA
+.set push_mean, 0x4A9
+.set push_mid, 0x4AB
+.set push_min, 0x589
+.set push_mod, 0x54C
+.set push_mrow, 0x4AC
+.set did_push_anti_deriv, 0x5B1
+.set push_mrowadd, 0x4AD
+.set push_newmat, 0x4AF
+.set push_newlist, 0x4AE
+.set push_nint, 0x5B3
+.set push_nsolve, 0x583
+.set push_nth_derivative, 0x5AF
+.set push_denominator, 0x55B
+.set push_numerator, 0x55A
+.set push_max2, 0x599
+.set push_max1, 0x554
+.set push_min1, 0x553
+.set push_min2, 0x598
+.set push_ord, 0x4B0
+.set push_r_cis, 0x549
+.set push_pttest, 0x31D
+.set push_pxltest, 0x31E
+.set push_when, 0x57D
+.set push_zeros, 0x586
+.set push_prodlist, 0x4B2
+.set push_randmat, 0x4B4
+.set push_randpoly, 0x320
+.set push_right, 0x4B7
+.set push_rotate, 0x4B8
+.set push_round, 0x4B9
+.set push_row_echelon, 0x4BE
+.set push_red_row_ech, 0x4B6
+.set push_rowdim, 0x4BB
+.set push_rowadd, 0x4BA
+.set push_rowswap, 0x4BD
+.set push_rownorm, 0x4BC
+.set push_sequence, 0x4BF
+.set push_setfold, 0x321
+.set push_shift, 0x4C0
+.set push_sign, 0x544
+.set push_sin2, 0x531
+.set push_sin, 0x532
+.set push_simult, 0x4C1
+.set push_sinh, 0x53A
+.set push_solve, 0x584
+.set push_sqrt, 0x52B
+.set push_string, 0x326
+.set push_stddev, 0x4C3
+.set push_submat, 0x4C4
+.set push_str_to_expr, 0x325
+.set push_sumlist, 0x4C5
+.set push_summation, 0x5B4
+.set push_extended_prod, 0x5B5
+.set push_tan, 0x534
+.set push_tanh, 0x53C
+.set push_unitv, 0x4C8
+.set push_variance, 0x4C9
+.set push_rec_to_angle, 0x539
+.set push_phase, 0x548
+.set NG_setup_graph_fun, 0x261
+.set NG_cleanup_graph_fun, 0x262
+.set OSKeyScan, 0x298
+
+.set ScreenClear, 0x19e
+.set bcdadd, 0xb6
+.set bcdcmp, 0xbb
+.set bcddiv, 0xb9
+.set bcdbcd, 0xbd
+.set bcdmul, 0xb8
+.set bcdneg, 0xba
+.set bcdsub, 0xb7
+.set bcdlong, 0xbc
+
+.set SymFindFoldername, 0x6F
+.set MakeHsym, 0x282
+
+.set _bcd_math, 0xB5
+.set _ds16u16, 0x2A4
+.set _ms16u16, 0x2A5
+.set _du16u16, 0x2A6
+.set _mu16u16, 0x2A7
+.set _ds32s32, 0x2A8
+.set _ms32s32, 0x2A9
+.set _du32u32, 0x2AA
+.set _mu32u32, 0x2AB
+
+.set LCD_MEM, 0x4c00
+.set ACTIVITY_IDLE, 0
+.set ACTIVITY_BUSY, 1
+.set ACTIVITY_PAUSED, 2
+.set ER_STOP, 2
+.set ER_DIMENSION, 230
+.set ER_MEMORY, 670
+.set ER_MEMORY_DML, 810
+.set UNDEFINED_TAG, 0x2a
+.set LIST_TAG, 0xd9
+.set MATRIX_TAG, 0xdb
+.set END_TAG, 0xe5
+.set CALC_TI89, 0
+.set CALC_TI92PLUS, 1
diff --git a/misc/romcalls.txt b/misc/romcalls.txt
new file mode 100644
index 0000000..bbce3a4
--- /dev/null
+++ b/misc/romcalls.txt
@@ -0,0 +1,1558 @@
+
+0:FirstWindow
+1:WinActivate
+2:WinAttr
+3:WinBackupToScr
+4:WinBackground
+5:WinBegin
+6:WinBitmapGet
+7:WinBitmapPut
+8:WinBitmapSize
+9:WinCharXY
+A:WinChar
+B:WinClose
+C:WinClr
+D:WinDeactivate
+E:WinDupStat
+F:WinEllipse
+10:WinFill
+11:WinFillLines2
+12:WinFillTriangle
+13:WinFont
+14:WinGetCursor
+15:WinHide
+16:WinHome
+17:WinLine
+18:WinLineNC
+19:WinLineTo
+1A:WinLineRel
+1B:WinMoveCursor
+1C:WinMoveTo
+1D:WinMoveRel
+1E:WinOpen
+1F:WinPixGet
+20:WinPixSet
+21:WinRect
+22:WinReOpen
+23:WinScrollH
+24:WinScrollV
+25:WinStr
+26:WinStrXY
+27:DrawWinBorder
+28:ScrRectDivide
+29:RectWinToWin
+2A:RectWinToScr
+2B:UpdateWindows
+2C:MakeWinRect
+2D:ScrToWin
+2E:ScrToHome
+2F:ScrRect
+30:Dialog
+31:NoCallBack / ROM_CALL_31
+32:DialogDo
+33:DialogAdd
+34:DialogNew
+35:DrawStaticButton
+36:MenuBegin
+37:MenuCheck
+38:MenuEnd
+39:MenuKey
+3A:MenuOn
+3B:MenuPopup
+3C:MenuSubStat
+3D:MenuTopStat
+3E:MenuTopSelect
+3F:MenuTopRedef
+40:MenuGetTopRedef
+41:MenuAddText
+42:MenuAddIcon
+43:MenuNew
+44:PopupAddText
+45:PopupNew
+46:PopupClear
+47:PopupDo
+48:PopupText
+49:MenuUpdate
+4A:Parse2DExpr
+4B:Parse2DMultiExpr
+4C:Print2DExpr
+4D:Parms2D
+4E:display_statements
+4F:Parse1DExpr
+50:pushkey
+51:ngetchx
+52:kbhit
+53:sprintf
+54:getcalc
+55:sendcalc
+56:LIO_Send
+57:LIO_Get
+58:LIO_Receive
+59:LIO_GetMultiple
+5A:LIO_SendData
+5B:LIO_RecvData
+5C:SymAdd
+5D:SymAddMain
+5E:SymDel
+5F:HSymDel
+60:SymFind
+61:SymFindMain
+62:SymFindHome
+63:SymMove
+64:FolderAdd
+65:FolderCur
+66:FolderDel
+67:FolderFind
+68:FolderGetCur
+69:FolderOp
+6A:FolderRename
+6B:FolderCount
+6C:SymFindFirst
+6D:SymFindNext
+6E:SymFindPrev
+6F:SymFindFoldername
+70:AddSymToFolder
+71:FindSymInFolder
+72:FolderCurTemp
+73:FolderAddTemp
+74:FolderDelTemp
+75:FolderDelAllTemp
+76:TempFolderName
+77:IsMainFolderStr
+78:ParseSymName
+79:DerefSym
+7A:HSYMtoName
+7B:StrToTokN
+7C:TokToStrN
+7D:CheckGraphRef
+7E:ClearUserDef
+7F:CheckLinkLockFlag
+80:TokenizeSymName
+81:SymCmp
+82:SymCpy
+83:SymCpy0
+84:ValidateSymName
+85:VarRecall
+86:VarStore
+87:VarStoreLink
+88:QSysProtected
+89:CheckSysFunc
+8A:GetSysGraphRef
+8B:CheckReservedName
+8C:SymSysVar
+8D:ValidateStore
+8E:ResetSymFlags
+8F:HeapAvail
+90:HeapAlloc
+91:HeapAllocESTACK
+92:HeapAllocHigh
+93:HeapAllocThrow
+94:HeapAllocHighThrow
+95:HeapCompress
+96:HeapDeref
+97:HeapFree
+98:HeapFreeIndir
+99:HLock
+9A:HeapLock
+9B:HeapGetLock
+9C:HeapMax
+9D:HeapRealloc
+9E:HeapSize
+9F:HeapUnlock
+A0:HeapMoveHigh
+A1:HeapEnd
+A2:HeapAllocPtr
+A3:HeapFreePtr
+A4:NeedStack
+A5:TE_close
+A6:TE_checkSlack
+A7:TE_empty
+A8:TE_focus
+A9:TE_handleEvent
+AA:TE_indicateReadOnly
+AB:TE_isBlank
+AC:TE_open
+AD:TE_openFixed
+AE:TE_pasteText
+AF:TE_reopen
+B0:TE_reopenPlain
+B1:TE_select
+B2:TE_shrinkWrap
+B3:TE_unfocus
+B4:TE_updateCommand
+B5:_bcd_math
+B6:bcdadd
+B7:bcdsub
+B8:bcdmul
+B9:bcddiv
+BA:bcdneg
+BB:bcdcmp
+BC:bcdlong
+BD:bcdbcd
+BE:EX_getArg
+BF:EX_getBCD
+C0:EX_stoBCD
+C1:CB_replaceTEXT
+C2:CB_fetchTEXT
+C3:CU_restore
+C4:CU_start
+C5:CU_stop
+C6:EV_captureEvents
+C7:EV_clearPasteString
+C8:EV_getc
+C9:EV_getSplitRect
+CA:EV_notifySwitchGraph
+CB:EV_paintOneWindow
+CC:EV_paintWindows
+CD:EV_restorePainting
+CE:EV_sendEvent
+CF:EV_sendEventSide
+D0:EV_sendString
+D1:EV_setCmdCheck
+D2:EV_setCmdState
+D3:EV_setFKeyState
+D4:EV_startApp
+D5:EV_startSide
+D6:EV_startTask
+D7:EV_suspendPainting
+D8:EV_switch
+D9:MO_currentOptions
+DA:MO_defaults
+DB:MO_digestOptions
+DC:MO_isMultigraphTask
+DD:MO_modeDialog
+DE:MO_notifyModeChange
+DF:MO_sendQuit
+E0:ST_angle
+E1:ST_batt
+E2:ST_busy
+E3:ST_eraseHelp
+E4:ST_folder
+E5:ST_graph
+E6:ST_helpMsg
+E7:ST_modKey
+E8:ST_precision
+E9:ST_readOnly
+EA:ST_stack
+EB:ST_refDsp
+EC:OSCheckBreak
+ED:OSClearBreak
+EE:OSEnableBreak
+EF:OSDisableBreak
+F0:OSRegisterTimer
+F1:OSFreeTimer
+F2:OSTimerCurVal
+F3:OSTimerExpired
+F4:OSTimerRestart
+F5:acos
+F6:asin
+F7:atan
+F8:atan2
+F9:cos
+FA:sin
+FB:tan
+FC:cosh
+FD:sinh
+FE:tanh
+FF:exp
+100:log
+101:log10
+102:modf
+103:pow
+104:sqrt
+105:ceil
+106:fabs
+107:floor
+108:fmod
+109:top_estack
+10A:next_expression_index
+10B:gr_active
+10C:gr_other
+10D:ABT_dialog
+10E:HomeExecute
+10F:HomePushEStack
+110:SP_Define
+111:store_data_var
+112:recall_data_var
+113:CharNumber
+114:spike_optionD
+115:spike_geo_titles
+116:spike_in_editor
+117:dv_create_graph_titles
+118:spike_titles_in_editor
+119:dv_findColumn
+11A:spike_chk_gr_dirty
+11B:GetStatValue
+11C:partial_len
+11D:paint_all_except
+11E:EQU_select
+11F:EQU_setStyle
+120:EQU_getNameInfo
+121:checkCurrent
+122:BN_power17Mod
+123:BN_powerMod
+124:BN_prodMod
+125:CAT_dialog
+126:caddcert / ROM_CALL_126
+127:cdecrypt
+128:ceof
+129:cfindcertfield / handleVarLinkKey
+12A:cfindfield
+12B:cgetc
+12C:cgetcert / HeapWalk
+12D:cgetflen
+12E:cgetfnl
+12F:cgetnl
+130:cgetns
+131:cgetvernum / ROM_CALL_131
+132:copen
+133:copensub
+134:cputhdr
+135:cputnl
+136:cputns
+137:cread
+138:ctell
+139:cwrite
+13A:cacos
+13B:casin
+13C:catan
+13D:cacosh
+13E:casinh
+13F:catanh
+140:ccos
+141:csin
+142:ctan
+143:ccosh
+144:csinh
+145:ctanh
+146:csqrt
+147:cln
+148:clog10
+149:cexp
+14A:CustomBegin
+14B:CustomMenuItem
+14C:CustomEnd
+14D:ReallocExprStruct
+14E:SearchExprStruct
+14F:handleRclKey
+150:CustomFree
+151:ERD_dialog
+152:ERD_process
+153:ER_throwVar
+154:ER_catch
+155:ER_success
+156:EV_centralDispatcher
+157:EV_defaultHandler
+158:EV_eventLoop
+159:EV_registerMenu
+15A:EX_patch
+15B:EM_abandon
+15C:EM_blockErase / OSFastArrows
+15D:EM_blockVerifyErase
+15E:EM_delete / AB_getGateArrayVersion
+15F:EM_findEmptySlot
+160:EM_GC
+161:EM_moveSymFromExtMem
+162:EM_moveSymToExtMem
+163:EM_open / SetAlphaStatus
+164:EM_put / GetAlphaStatus
+165:EM_survey
+166:EM_twinSymFromExtMem
+167:EM_write
+168:EM_writeToExtMem / ROM_CALL_168
+169:FL_addCert
+16A:FL_download
+16B:FL_getHardwareParmBlock
+16C:FL_getCert
+16D:FL_getVerNum
+16E:EQU_deStatus
+16F:cmpstri
+170:fix_loop_displacements
+171:FL_write
+172:fpisanint
+173:fpisodd
+174:round12
+175:round14
+176:GD_Circle
+177:GD_Line
+178:GD_HVLine
+179:GD_Pen
+17A:GD_Eraser
+17B:GD_Text
+17C:GD_Select
+17D:GD_Contour
+17E:GKeyIn
+17F:GKeyDown
+180:GKeyFlush
+181:HelpKeys
+182:QModeKey
+183:QSysKey
+184:WordInList
+185:BitmapGet
+186:BitmapInit
+187:BitmapPut
+188:BitmapSize
+189:ScrRectFill
+18A:ScrRectOverlap
+18B:ScrRectScroll
+18C:ScrRectShift
+18D:QScrRectOverlap
+18E:FontGetSys
+18F:FontSetSys
+190:FontCharWidth
+191:DrawClipChar
+192:DrawClipEllipse
+193:DrawClipLine
+194:DrawClipPix
+195:DrawClipRect
+196:DrawMultiLines
+197:DrawStrWidth
+198:FillTriangle
+199:FillLines2
+19A:SetCurAttr
+19B:SetCurClip
+19C:LineTo
+19D:MoveTo
+19E:ScreenClear
+19F:GetPix
+1A0:SaveScrState
+1A1:RestoreScrState
+1A2:PortSet
+1A3:PortRestore
+1A4:DrawChar
+1A5:DrawFkey
+1A6:DrawIcon
+1A7:DrawLine
+1A8:DrawPix
+1A9:DrawStr
+1AA:GM_Value
+1AB:GM_Intersect
+1AC:GM_Integrate
+1AD:GM_Inflection
+1AE:GM_TanLine
+1AF:GM_Math1
+1B0:GM_Derivative
+1B1:GM_DistArc
+1B2:GM_Shade
+1B3:YCvtFtoWin
+1B4:DlgMessage
+1B5:SetGraphMode
+1B6:Regraph
+1B7:GrAxes
+1B8:gr_xres_pixel
+1B9:CptFuncX
+1BA:XCvtPtoF
+1BB:YCvtPtoF
+1BC:YCvtFtoP
+1BD:XCvtFtoP
+1BE:GrLineFlt
+1BF:FuncLineFlt
+1C0:GrClipLine
+1C1:CptDeltax
+1C2:CptDeltay
+1C3:CkValidDelta
+1C4:GR_Pan
+1C5:FindFunc
+1C6:FindGrFunc
+1C7:grFuncName
+1C8:gr_initCondName
+1C9:CptIndep
+1CA:gr_CptIndepInc
+1CB:gr_del_locals
+1CC:gr_DelFolder
+1CD:gr_openFolder
+1CE:setup_more_graph_fun
+1CF:unlock_more_graph_fun
+1D0:execute_graph_func
+1D1:cpt_gr_fun
+1D2:cpt_gr_param
+1D3:cpt_gr_polar
+1D4:gr_execute_seq
+1D5:CountGrFunc
+1D6:FirstSeqPlot
+1D7:cleanup_seq_mem
+1D8:time_loop
+1D9:InitTimeSeq
+1DA:seqWebInit
+1DB:run_one_seq
+1DC:gr_seq_value
+1DD:StepCk
+1DE:seqStepCk
+1DF:rngLen
+1E0:gdb_len
+1E1:gdb_store
+1E2:gdb_recall
+1E3:gr_DispLabels
+1E4:GraphOrTableCmd
+1E5:ck_valid_float
+1E6:CreateEmptyList
+1E7:QSkipGraphErr
+1E8:gr_find_de_result
+1E9:InitDEAxesRng
+1EA:InitDEMem
+1EB:de_loop
+1EC:cleanup_de_mem
+1ED:gr_de_value
+1EE:gr_find_func_index
+1EF:CptLastIndepDE
+1F0:de_initRes
+1F1:gr_del_vars_in_folder
+1F2:gr_de_axes_lbl
+1F3:gr_execute_de
+1F4:gr_delete_fldpic
+1F5:gr_remove_fldpic
+1F6:gr_add_fldpic
+1F7:gr_stopic
+1F8:gr_find_el
+1F9:deStepCk
+1FA:gr_ck_solvergraph
+1FB:GR3_addContours
+1FC:GraphActivate
+1FD:GR3_freeDB
+1FE:GR3_handleEvent
+1FF:GR3_paint3d
+200:GR3_xyToWindow
+201:GS_PlotTrace
+202:GS_PlotAll
+203:PlotDel
+204:PlotPut
+205:PlotGet
+206:PlotInit
+207:PlotDup
+208:PlotSize
+209:PlotLookup
+20A:QActivePlots
+20B:QPlotActive
+20C:GT_BackupToScr
+20D:GT_CalcDepVals
+20E:GT_CenterGraphCursor
+20F:GT_CursorKey
+210:GT_DspFreeTraceCoords
+211:GT_DspTraceCoords
+212:GT_DspMsg
+213:GT_Error
+214:GT_Format
+215:GT_FreeTrace
+216:GT_IncXY
+217:GT_KeyIn
+218:GT_QFloatCursorsInRange
+219:GT_Regraph
+21A:GT_Regraph_if_neccy
+21B:GT_Open
+21C:GT_SaveAs
+21D:GT_SelFunc
+21E:GT_SetGraphRange
+21F:GT_SetCursorXY
+220:GT_ShowMarkers
+221:GT_Trace
+222:GT_ValidGraphRanges
+223:GT_WinBound
+224:GT_WinCursor
+225:GYcoord
+226:GXcoord
+227:round12_err
+228:GT_Set_Graph_Format
+229:GT_PrintCursor
+22A:GT_DE_Init_Conds
+22B:GZ_Box
+22C:GZ_Center
+22D:GZ_Decimal
+22E:GZ_Fit
+22F:GZ_InOut
+230:GZ_Integer
+231:GZ_Previous
+232:GZ_Recall
+233:GZ_SetFactors
+234:GZ_Square
+235:GZ_Standard
+236:GZ_Stat
+237:GZ_Store
+238:GZ_Trig
+239:HeapGetHandle
+23A:HeapPtrToHandle
+23B:FreeHandles
+23C:HS_chopFIFO
+23D:HS_countFIFO
+23E:HS_deleteFIFONode
+23F:HS_freeAll
+240:HS_freeFIFONode
+241:HS_getAns
+242:HS_getEntry
+243:HS_getFIFONode
+244:HS_popEStack
+245:HS_newFIFONode
+246:HS_pushFIFONode
+247:HToESI
+248:OSInitKeyInitDelay
+249:OSInitBetweenKeyDelay
+24A:OSCheckSilentLink
+24B:OSLinkCmd
+24C:OSLinkReset
+24D:OSLinkOpen
+24E:OSLinkClose
+24F:OSReadLinkBlock
+250:OSWriteLinkBlock
+251:OSLinkTxQueueInquire
+252:OSLinkTxQueueActive
+253:LIO_SendProduct
+254:MD5Init
+255:MD5Update
+256:MD5Final
+257:MD5Done
+258:convert_to_TI_92
+259:gen_version
+25A:is_executable
+25B:NG_RPNToText
+25C:NG_approxESI
+25D:NG_execute
+25E:NG_graphESI
+25F:NG_rationalESI
+260:NG_tokenize
+261:NG_setup_graph_fun
+262:NG_cleanup_graph_fun
+263:push_END_TAG
+264:push_LIST_TAG
+265:tokenize_if_TI_92_or_text
+266:setjmp
+267:longjmp
+268:VarGraphRefBitsClear
+269:VarInit / is0
+26A:memcpy
+26B:memmove
+26C:strcpy
+26D:strncpy
+26E:strcat
+26F:strncat
+270:memcmp
+271:strcmp
+272:strncmp
+273:memchr
+274:strchr
+275:strcspn
+276:strpbrk
+277:strrchr
+278:strspn
+279:strstr
+27A:strtok
+27B:_memset
+27C:memset
+27D:strerror
+27E:strlen
+27F:SymAddTwin
+280:SymDelTwin
+281:LoadSymFromFindHandle
+282:MakeHSym
+283:SymFindPtr
+284:*OSVRegisterTimer*
+285:*OSVFreeTimer*
+286:sincos
+287:asinh
+288:acosh
+289:atanh
+28A:itrig
+28B:trig
+28C:VarOpen
+28D:VarSaveAs
+28E:VarNew
+28F:VarCreateFolderPopup
+290:VarSaveTitle
+291:WinWidth
+292:WinHeight
+293:XR_stringPtr
+294:OSReset
+295:SumStoChkMem
+296:OSContrastUp
+297:OSContrastDn
+298:OSKeyScan
+299:OSGetStatKeys
+29A:off
+29B:idle
+29C:OSSetSR
+29D:AB_prodid
+29E:AB_prodname
+29F:AB_serno
+2A0:cgetcertrevno
+2A1:cgetsn
+2A2:de_rng_no_graph
+2A3:EV_hook
+2A4:_ds16u16
+2A5:_ms16u16
+2A6:_du16u16
+2A7:_mu16u16
+2A8:_ds32s32
+2A9:_ms32s32
+2AA:_du32u32
+2AB:_mu32u32
+
+2AC:assign_between
+2AD:did_push_var_val
+2AE:does_push_fetch
+2AF:delete_list_element
+2B0:push_ans_entry
+2B1:index_after_match_endtag
+2B2:push_indir_name
+2B3:push_user_func
+2B4:store_func_def
+2B5:store_to_subscripted_element
+2B6:index_below_display_expression_aux
+2B7:get_key_ptr
+2B8:get_list_indices
+2B9:get_matrix_indices
+2BA:init_list_indices
+2BB:init_matrix_indices
+2BC:push_float_qr_fact
+2BD:push_lu_fact
+2BE:push_symbolic_qr_fact
+2BF:are_expressions_identical
+2C0:compare_expressions
+2C1:find_error_message
+2C2:check_estack_size
+2C3:delete_between
+2C4:deleted_between
+2C5:delete_expression
+2C6:deleted_expression
+2C7:estack_to_short
+2C8:estack_to_ushort
+2C9:factor_base_index
+2CA:factor_exponent_index
+2CB:GetValue
+2CC:im_index
+2CD:index_numeric_term
+2CE:index_of_lead_base_of_lead_term
+2CF:index_main_var
+2D0:is_advanced_tag
+2D1:is_antisymmetric
+2D2:is_complex_number
+2D3:is_complex0
+2D4:is_free_of_tag
+2D5:is_independent_of
+2D6:is_independent_of_de_seq_vars
+2D7:is_independent_of_tail
+2D8:is_independent_of_elements
+2D9:is_monomial
+2DA:is_monomial_in_kernel
+2DB:is_narrowly_independent_of
+2DC:is_symmetric
+2DD:is_tail_independent_of
+2DE:lead_base_index
+2DF:lead_exponent_index
+2E0:lead_factor_index
+2E1:lead_term_index
+2E2:main_gen_var_index
+2E3:map_unary_over_comparison
+2E4:min_quantum
+2E5:move_between_to_top
+2E6:moved_between_to_top
+2E7:numeric_factor_index
+2E8:push_between
+2E9:push_expr_quantum
+2EA:push_expr2_quantum
+2EB:push_next_arb_int
+2EC:push_next_arb_real
+2ED:push_next_internal_var
+2EE:push_quantum
+2EF:push_quantum_pair
+2F0:reductum_index
+2F1:remaining_factors_index
+2F2:re_index
+2F3:reset_estack_size
+2F4:reset_control_flags
+2F5:can_be_approxed
+2F6:compare_complex_magnitudes
+2F7:compare_Floats
+2F8:did_push_cnvrt_Float_to_integer
+2F9:estack_number_to_Float
+2FA:float_class
+2FB:frexp10
+2FC:gcd_exact_whole_Floats
+2FD:init_float / is1
+2FE:is_Float_exact_whole_number
+2FF:is_float_infinity
+300:is_float_negative_zero
+301:is_float_positive_zero
+302:is_float_signed_infinity
+303:is_float_transfinite
+304:is_float_unsigned_inf_or_nan
+305:is_float_unsigned_zero
+306:is_nan
+307:likely_approx_to_complex_number
+308:likely_approx_to_number
+309:norm1_complex_Float
+30A:push_Float
+30B:push_Float_to_nonneg_int
+30C:push_Float_to_rat
+30D:push_cnvrt_integer_if_whole_nmb
+30E:push_overflow_to_infinity
+30F:push_pow
+310:push_round_Float
+311:should_and_did_push_approx_arg2
+312:signum_Float
+313:did_push_to_polar
+314:push_degrees
+315:push_format
+316:push_getkey
+317:push_getfold
+318:push_getmode
+319:push_gettype
+31A:push_instring
+31B:push_mrow_aux
+31C:push_part
+31D:push_pttest
+31E:push_pxltest
+31F:push_rand
+320:push_randpoly
+321:push_setfold
+322:push_setgraph
+323:push_setmode
+324:push_settable
+325:push_str_to_expr
+326:push_string
+327:push_switch
+328:push_to_cylin
+329:push_to_sphere
+32A:cmd_andpic
+32B:cmd_blddata
+32C:cmd_circle
+32D:cmd_clrdraw
+32E:cmd_clrerr
+32F:cmd_clrgraph
+330:cmd_clrhome
+331:cmd_clrio
+332:cmd_clrtable
+333:cmd_copyvar
+334:cmd_cubicreg
+335:cmd_custmoff
+336:cmd_custmon
+337:cmd_custom
+338:cmd_cycle
+339:cmd_cyclepic
+33A:cmd_delfold
+33B:cmd_delvar
+33C:cmd_dialog
+33D:cmd_disp
+33E:cmd_dispg
+33F:cmd_disphome
+340:cmd_disptbl
+341:cmd_drawfunc
+342:cmd_drawinv
+343:cmd_drawparm
+344:cmd_drawpol
+345:cmd_else
+346:cmd_endfor
+347:cmd_endloop
+348:cmd_endtry
+349:cmd_endwhile
+34A:cmd_exit
+34B:cmd_expreg
+34C:cmd_fill
+34D:cmd_fnoff
+34E:cmd_fnon
+34F:cmd_for
+350:cmd_get
+351:cmd_getcalc
+352:cmd_goto
+353:cmd_graph
+354:cmd_if
+355:cmd_ifthen
+356:cmd_input
+357:cmd_inputstr
+358:cmd_line
+359:cmd_linehorz
+35A:cmd_linetan
+35B:cmd_linevert
+35C:cmd_linreg
+35D:cmd_lnreg
+35E:cmd_local
+35F:cmd_lock
+360:cmd_logistic
+361:cmd_medmed
+362:cmd_movevar
+363:cmd_newdata
+364:cmd_newfold
+365:cmd_newpic
+366:cmd_newplot
+367:cmd_newprob
+368:cmd_onevar
+369:cmd_output
+36A:cmd_passerr
+36B:cmd_pause
+36C:cmd_plotsoff
+36D:cmd_plotson
+36E:cmd_popup
+36F:cmd_powerreg
+370:cmd_printobj
+371:cmd_prompt
+372:cmd_ptchg
+373:cmd_ptoff
+374:cmd_pton
+375:cmd_pttext
+376:cmd_pxlchg
+377:cmd_pxlcircle
+378:cmd_pxlhorz
+379:cmd_pxlline
+37A:cmd_pxloff
+37B:cmd_pxlon
+37C:cmd_pxltext
+37D:cmd_pxlvert
+37E:cmd_quadreg
+37F:cmd_quartreg
+380:cmd_randseed
+381:cmd_rclgdb
+382:cmd_rclpic
+383:cmd_rename
+384:cmd_request
+385:cmd_return
+386:cmd_rplcpic
+387:cmd_send
+388:cmd_sendcalc
+389:cmd_sendchat
+38A:cmd_shade
+38B:cmd_showstat
+38C:cmd_sinreg
+38D:cmd_slpline
+38E:cmd_sorta
+38F:cmd_sortd
+390:cmd_stogdb
+391:cmd_stopic
+392:cmd_style
+393:cmd_table
+394:cmd_text
+395:cmd_toolbar
+396:cmd_trace
+397:cmd_try
+398:cmd_twovar
+399:cmd_unlock
+39A:cmd_while
+39B:cmd_xorpic
+39C:cmd_zoombox
+39D:cmd_zoomdata
+39E:cmd_zoomdec
+39F:cmd_zoomfit
+3A0:cmd_zoomin
+3A1:cmd_zoomint
+3A2:cmd_zoomout
+3A3:cmd_zoomprev
+3A4:cmd_zoomrcl
+3A5:cmd_zoomsqr
+3A6:cmd_zoomstd
+3A7:cmd_zoomsto
+3A8:cmd_zoomtrig
+3A9:OSenqueue
+3AA:OSdequeue
+3AB:OSqinquire
+3AC:OSqhead
+3AD:OSqclear
+3AE:did_push_divide_units
+3AF:has_unit_base
+3B0:init_unit_system
+3B1:is_units_term
+3B2:push_auto_units_conversion
+3B3:push_unit_system_list
+3B4:setup_unit_system
+3B5:all_tail
+3B6:any_tail
+3B7:is_matrix
+3B8:is_square_matrix
+3B9:is_valid_smap_aggregate
+3BA:last_element_index
+3BB:map_tail
+3BC:map_tail_Int
+3BD:push_list_plus
+3BE:push_list_times
+3BF:push_reversed_tail
+3C0:push_sq_matrix_to_whole_number
+3C1:push_transpose_aux
+3C2:push_zero_partial_column
+3C3:remaining_element_count
+3C4:push_offset_array
+3C5:push_matrix_product
+3C6:is_pathname
+3C7:next_token
+3C8:nonblank
+3C9:push_parse_prgm_or_func_text
+3CA:push_parse_text
+3CB:push_var
+
+3CC:memucmp
+3CD:ROM_CALL_3CD
+3CE:ROM_CALL_3CE
+3CF:EM_GetArchiveMemoryBeginning
+3D0:LIO_SendIdList
+3D1:ROM_CALL_3D1
+3D2:OO_GetEndOfAllFlashApps
+3D3:ROM_CALL_3D3
+3D4:FAccess
+3D5:FClose
+3D6:FCreate
+3D7:FDelete
+3D8:FEof
+3D9:FFindFirst
+3DA:FFindNext
+3DB:FGetC
+3DC:FGetPos
+3DD:FGetSize
+3DE:FOpen
+3DF:FPutC
+3E0:FRead
+3E1:FSetPos
+3E2:FSetBufSize
+3E3:FSetSize
+3E4:FSetVer
+3E5:FStatus
+3E6:FType
+3E7:FWrite
+3E8:ROM_CALL_3E8
+3E9:TokenizeName
+3EA:ROM_CALL_3EA
+3EB:KeyYesOrNo
+3EC:ROM_CALL_3EC
+3ED:BitmapSizeExt
+3EE:DrawStrWidthP
+3EF:CalcBitmapSize
+3F0:DynMenuChange
+3F1:DynMenuAdd
+3F2:MenuLoad
+3F3:MenuItemDef
+3F4:MenuFlags
+3F5:PopupBegin
+3F6:PopupBeginDo
+3F7:ROM_CALL_3F7
+3F8:ROM_CALL_3F8
+3F9:init_float
+3FA:OO_CondGetAttr
+3FB:OO_Deref
+3FC:OO_GetAppAttr
+3FD:OO_GetAttr
+3FE:OO_HasAttr
+3FF:OO_New
+400:OO_SetAppAttr
+401:OO_SetAttr
+402:OO_NextACB
+403:OO_PrevACB
+404:OO_InstallSystemHook
+405:OO_UninstallSystemHook
+406:OO_AppNameToACB
+407:stricmp
+408:statStart
+409:statEnd
+40A:statFree
+40B:QstatRcl
+40C:ROM_CALL_40C
+40D:ROM_CALL_40D
+40E:ROM_CALL_40E
+40F:are_units_consistent
+410:ROM_CALL_410
+411:WinBitmapSizeExt
+412:ROM_CALL_412
+413:ROM_CALL_413
+414:WinRemove
+415:RectWinToScrExt
+416:ROM_CALL_416
+417:ROM_CALL_417
+418:ROM_CALL_418
+419:MenuOff
+41A:QMenuTopSelect
+41B:ROM_CALL_41B
+41C:ROM_CALL_41C
+41D:ROM_CALL_41D
+41E:ROM_CALL_41E
+41F:ROM_CALL_41F
+420:ROM_CALL_420
+421:ROM_CALL_421
+422:ROM_CALL_422
+423:OO_Destroy
+424:ROM_CALL_424
+425:OO_appGetPublicStorage
+426:OO_appIsMarkedDelete
+427:OO_appMarkDelete
+428:ROM_CALL_428
+429:OO_appSetPublicStorage
+42A:ROM_CALL_42A
+42B:ROM_CALL_42B
+42C:ClientToScr
+42D:MakeScrRect
+42E:SetWinClip
+42F:WinToScr
+430:pSymPG
+431:OSModKeyStatus
+432:bottom_estack
+433:ROM_CALL_433
+434:BatTooLowFlash
+435:GetDataType
+436:SmapTypeStrings
+437:ROM_CALL_437
+438:ROM_CALL_438
+439:ROM_CALL_439
+43A:GetFuncPrgmBodyPtr
+43B:DataTypeNames
+43C:AM_Beginning_AMS1xx w/o MaxMem
+43D:FlashMemoryEnd
+43E:CertificateMemory
+43F:ReleaseDate
+440:ReleaseVersion
+441:HeapTable
+442:CTypeTable
+443:ST_flags
+444:VarOptList
+445:ROM_CALL_445
+446:ROM_CALL_446
+447:MO_option
+448:cmd_archive
+449:cmd_unarchiv
+44A:ROM_CALL_44A
+44B:ROM_CALL_44B
+44C:clear_error_context
+44D:push_expression
+44E:push_simplify
+44F:push_simplify_statements
+450:push_simplify_expressions
+451:OO_firstACB
+452:EV_appA
+453:EV_appB
+454:EV_getAppID
+455:ROM_CALL_455
+456:SetOK
+457:ROM_CALL_457
+458:EV_appSide
+459:ROM_CALL_459
+45A:ROM_CALL_45A
+45B:ROM_CALL_45B
+45C:EV_currentApp
+45D:EV_runningApp
+45E:ROM_CALL_45E
+45F:hStrAppend
+460:ROM_CALL_460
+461:ROM_CALL_461
+462:ROM_CALL_462
+463:gr_flags
+464:FLOATTAB
+465:is_cFloat_agg
+466:NG_control
+467:primary_tag_list
+468:ROM_CALL_468
+469:estack_to_float
+46A:ROM_CALL_46A
+46B:ROM_CALL_46B
+46C:GetTagStr
+46D:EV_errorCode
+46E:OSOnBreak
+46F:ROM_CALL_46F
+470:ROM_CALL_470
+471:ROM_CALL_471
+472:LCD_MEM
+473:ROM_CALL_473
+474:HeapShuffle
+475:ERD_notice
+476:ERD_dismissNotice
+477:OO_GetFlashAppSize
+478:ROM_CALL_478
+479:ROM_CALL_479
+47A:ROM_CALL_47A
+47B:ROM_CALL_47B
+47C:WinLineExt
+47D:ForceFloat
+47E:ROM_CALL_47E
+47F:ROM_CALL_47F
+480:ROM_CALL_480
+481:alphaLockOn
+482:alphaLockOff
+483:restoreAlphaLock
+484:cmd_lu_fact
+485:cmd_qr_fact
+486:ROM_CALL_486
+487:ROM_CALL_487
+488:is_variable
+489:push_substitute_no_simplify
+48A:push_zstr
+48B:is_complex_Float
+48C:ROM_CALL_48C
+48D:ROM_CALL_48D
+48E:EV_quit
+48F:OO_SuperFrame
+490:OO_InstallAppHook
+491:OO_UninstallAppHook
+492:OO_InstallAppHookByName
+493:OO_UninstallAppHookByName
+494:ROM_CALL_494
+495:ROM_CALL_495
+496:push_augment
+497:push_char
+498:push_coldim
+499:push_colnorm
+49A:push_cumsum
+49B:push_cylin_vector
+49C:push_dense_poly_eval
+49D:push_determinant
+49E:push_diag
+49F:push_dimension
+4A0:push_dot_add
+4A1:push_dot_mult
+4A2:push_dot_sub
+4A3:push_dotproduct
+4A4:push_identity_mat
+4A5:push_left
+4A6:push_list_to_mat
+4A7:push_matnorm
+4A8:push_mat_to_list
+4A9:push_mean
+4AA:push_median
+4AB:push_mid
+4AC:push_mrow
+4AD:push_mrowadd
+4AE:push_newlist
+4AF:push_newmat
+4B0:push_ord
+4B1:push_polar_vector
+4B2:push_prodlist
+4B3:push_radians
+4B4:push_randmat
+4B5:push_randnorm
+4B6:push_red_row_ech
+4B7:push_right
+4B8:push_rotate
+4B9:push_round
+4BA:push_rowadd
+4BB:push_rowdim
+4BC:push_rownorm
+4BD:push_rowswap
+4BE:push_row_echelon
+4BF:push_sequence
+4C0:push_shift
+4C1:push_simult
+4C2:push_sphere_vector
+4C3:push_stddev
+4C4:push_submat
+4C5:push_sumlist
+4C6:push_to_dd
+4C7:push_to_dms
+4C8:push_unitv
+4C9:push_variance
+4CA:ROM_CALL_4CA
+4CB:ROM_CALL_4CB
+4CC:ROM_CALL_4CC
+4CD:push_dot_div
+4CE:push_cross_product
+4CF:push_eigvc
+4D0:push_eigvl
+4D1:ROM_CALL_4D1
+4D2:push_transpose
+4D3:sf_width
+4D4:strtod
+4D5:ROM_CALL_4D5
+4D6:freeIdList
+4D7:ROM_CALL_4D7
+4D8:ST_progressBar
+4D9:ST_progressUpdate
+4DA:ST_progressIncrement
+4DB:ST_progressDismiss
+4DC:ROM_CALL_4DC
+4DD:push_assignment
+4DE:FirstNonblank
+4DF:is_negative_number
+4E0:is_positive_number_or_neg0frac
+4E1:is_negative_number_or_pos0frac_or_pos0int
+4E2:is_positive_number
+4E3:push_long_to_integer
+4E4:push_ulong_to_integer
+4E5:push_ushort_to_integer
+4E6:ROM_CALL_4E6
+4E7:push0
+4E8:push1
+4E9:push0_tag
+4EA:push1_tag
+4EB:push_half
+4EC:push_exact0
+4ED:push_exact_minus1
+4EE:push_minus1
+4EF:push_minus1_tag
+4F0:push_minus_half
+4F1:push_negate_quantum_as_negint
+4F2:push_exact1
+4F3:OO_GetFirstFlashAppSectorAddress
+4F4:ROM_CALL_4F4
+4F5:OO_DestroyAll
+4F6:ROM_CALL_4F6
+4F7:push_approx
+4F8:push_internal_simplify
+4F9:push_polar_to_rect_x
+4FA:push_polar_to_rect_y
+4FB:ROM_CALL_4FB
+4FC:FiftyMsecTick
+4FD:ROM_CALL_4FD
+4FE:ROM_CALL_4FE
+4FF:strtol
+500:WinBeginPaint
+501:WinEndPaint
+502:ROM_CALL_502
+503:CU_cursorState
+504:ROM_CALL_504
+505:ROM_CALL_505
+506:HomeAlone
+507:ER_throwFrame
+
+508:is_minus1
+509:is_pos_int_and_eq_quantum
+50A:is_reciprocal_of_quantum
+50B:is_whole_number
+50C:integer_non_unknown
+50D:compare_numbers
+50E:push_quantum_as_nonnegative_int
+50F:push_reciprocal_of_quantum
+510:push_minus_recip_of_quantum
+511:push_quantum_pair_as_pos_frac
+512:push_pi
+513:push_pi_on_quantum
+514:push_gcd_numbers
+515:push_is_prime
+516:get_lb
+517:get_ub
+518:add_to_top
+519:replace_top2_with_sum
+51A:push_difference
+51B:subtract_from_top
+51C:replace_top2_with_difference
+51D:add1_to_top
+51E:subtract1_from_top
+51F:push_arg_plus_1
+520:push_arg_minus_1
+521:push_product
+522:times_top
+523:replace_top2_with_prod
+524:push_negate
+525:negate_top
+526:push_ratio
+527:divide_top
+528:replace_top2_with_ratio
+529:raise_to_top
+52A:replace_top2_with_pow
+52B:push_sqrt
+52C:push_square
+52D:replace_top_with_reciprocal
+52E:push_exp
+52F:push_ln
+530:push_log10
+531:push_sin2
+532:push_sin
+533:push_cos
+534:push_tan
+535:push_trig
+536:push_asin
+537:push_acos
+538:push_atan
+539:push_rec_to_angle
+53A:push_sinh
+53B:push_cosh
+53C:push_tanh
+53D:push_asinh
+53E:push_acosh
+53F:push_atanh
+540:push_factorial
+541:push_perm
+542:push_comb
+543:push_abs
+544:push_sign
+545:push_re
+546:push_im
+547:push_conj
+548:push_phase
+549:push_r_cis
+54A:push_floor
+54B:push_ceiling
+54C:push_mod
+54D:push_integer_part
+54E:push_fractional_part
+54F:push_integer_quotient
+550:push_integer_remainder
+551:push_integer_gcd
+552:push_integer_lcm
+553:push_min1
+554:push_max1
+555:push_percent
+556:is_term_improper
+557:push_make_proper
+558:push_standardize
+559:replace_top2_with_imre
+55A:push_numerator
+55B:push_denominator
+55C:push_nonnumeric_factors
+55D:push_constant_factors
+55E:push_nonconstant_factors
+55F:push_dependent_factors
+560:push_independent_factors
+561:push_but_factor
+562:index_rmng_fctrs_start_fctr_tag
+563:index_rmng_fctrs_start_base_tag
+564:index_rmng_fctrs_start_base
+565:index_rmng_factor
+566:push_constant_terms
+567:push_nonconstant_terms
+568:push_dependent_terms
+569:push_independent_terms
+56A:push_but_term
+56B:is_polynomial_in_var_or_kern
+56C:is_totally_polynomial
+56D:is_neg_lead_numr_coef_re_part
+56E:next_var_or_kernel_index
+56F:push_var_kern_tail
+570:push_poly_deg_in_var_or_kernel
+571:linear_degree
+572:did_push_lincf
+573:is_positive
+574:is_nonnegative
+575:is_negative
+576:is_nonpositive
+577:is_never0
+578:is_equivalent_to
+579:and_onto_top
+57A:replace_top2_with_and
+57B:or_onto_top
+57C:replace_top2_with_or
+57D:push_when
+57E:lead_disjunct_term_index
+57F:remaining_disjuncts_index
+580:lead_conjunct_factor_index
+581:remaining_conjuncts_index
+582:push_but_conjunct_factor
+583:push_nsolve
+584:push_solve
+585:push_csolve
+586:push_zeros
+587:push_czeros
+588:did_push_series
+589:push_min
+58A:push_max
+58B:push_desolve
+58C:push_div_dif_1f
+58D:push_div_dif_1c
+58E:ROM_CALL_58E
+58F:LOC_getLocalDateFormat
+590:LOC_formatDate
+591:LOC_localVersionDate
+592:FKeyI_H
+593:is_constant
+594:push_sum
+595:push_exponentiate
+596:push_dot_exponentiate
+597:push_reciprocal
+598:push_min2
+599:push_max2
+59A:push_expand
+59B:push_comdenom
+59C:push_factor
+59D:push_poly_qr
+59E:push_gcd_then_cofactors
+59F:index_reductum_with_tag_base
+5A0:has_different_variable
+5A1:index_if_pushed_binomial_info
+5A2:index_if_pushed_qquad_info
+5A3:push_equals
+5A4:push_not_equals
+5A5:push_greater_than
+5A6:push_less_than
+5A7:push_greater_than_or_equals
+5A8:push_less_than_or_equals
+5A9:is_real
+5AA:push_not
+5AB:push_and
+5AC:push_or
+5AD:push_lim
+5AE:push_1st_derivative
+5AF:push_nth_derivative
+5B0:did_push_approx_inflection_point
+5B1:did_push_anti_deriv
+5B2:push_def_int
+5B3:push_nint
+5B4:push_summation
+5B5:push_extended_prod
+5B6:replace_top_with_post_simplified
+
+5B7:is_undefined
+5B8:did_map_aggregate_arg
+5B9:push_substitute_simplify
+5BA:abs
+5BB:div
+5BC:labs
+5BD:ldiv
+5BE:push_substitute_using_such_that
+5BF:estack_max_index
+5C0:RAtionalize_tol
+5C1:IM_re_tol
+5C2:ARb_real_count
+5C3:ARb_int_count
+5C4:ROM_CALL_5C4
+5C5:ROM_CALL_5C5
+5C6:ROM_CALL_5C6
+5C7:ROM_CALL_5C7
+5C8:ROM_CALL_5C8
+5C9:ROM_CALL_5C9
+5CA:ROM_CALL_5CA
+5CB:ROM_CALL_5CB
+5CC:ROM_CALL_5CC
+5CD:Integer0Index
+5CE:Integer1Index
+5CF:IntegerMinus1Index
+5D0:Float0Index
+5D1:Float1Index
+5D2:FloatMinus1Index
+5D3:FloatPiIndex
+5D4:FloatExp1Index
+5D5:index_true
+5D6:index_false
+5D7:NG_such_that_index
+5D8:ROM_CALL_5D8
+5D9:errno
+5DA:EX_getBasecodeParmBlock
+5DB:WinStrXYWrap
+5DC:RM_Type
+5DD:HS_FirstFIFONodeHandle
+5DE:HS_MaxExpressions
+5DF:EV_flags
+5E0:FloatHalfIndex
+5E1:Integer2Index
+
+5E2:ROM_CALL_5E2
+5E3:OSCheckLinkOpen
+5E4:ROM_CALL_5E4
+5E5:ROM_CALL_5E5
+5E6:ROM_CALL_5E6
+5E7:ROM_CALL_5E7
+5E8:ROM_CALL_5E8
+5E9:ROM_CALL_5E9
+5EA:ROM_CALL_5EA
+5EB:ROM_CALL_5EB
+5EC:ROM_CALL_5EC
+5ED:ROM_CALL_5ED
+5EE:ROM_CALL_5EE
+
+5EF:ROM_CALL_5EF
+5F0:ROM_CALL_5F0
+5F1:DateAndTime_SetDlg
+5F2:DateAndTime_Set
+5F3:DateAndTime_Get
+5F4:DayOfTheWeek
+5F5:ClockOn
+5F6:ClockOff
+5F7:IsClockOn
+5F8:Timer_Start
+5F9:Timer_Value
+5FA:TimeZone_Get
+5FB:TimeZone_Set
+5FC:DateFormat_Get
+5FD:DateFormat_Set
+5FE:DateStr
+5FF:TimeFormat_Get
+600:TimeFormat_Set
+601:TimeStr
+602:*readHandshake*
+603:*writeHandshake*
+604:*startBPTimer*
+605:*stopBPTimer*
+606:ROM_CALL_606
+
+607:GetFlashMemoryEnd
+
+608:ROM_CALL_608
+609:ROM_CALL_609
+60A:ROM_CALL_60A
+60B:ROM_CALL_60B
+60C:ROM_CALL_60C
diff --git a/missing b/missing
new file mode 100644
index 0000000..6a37006
--- /dev/null
+++ b/missing
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# 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=:
+
+# 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
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --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'
+  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
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.4 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    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' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755
index 0000000..d2d5f21
--- /dev/null
+++ b/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+  	errstatus=$lasterr
+      else
+  	if test ! -z "$dirmode"; then
+	  echo "chmod $dirmode $pathcomp"
+    	  lasterr=""
+  	  chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+  	  if test ! -z "$lasterr"; then
+  	    errstatus=$lasterr
+  	  fi
+  	fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/pedrom/Makefile.am b/pedrom/Makefile.am
new file mode 100644
index 0000000..afbf3c0
--- /dev/null
+++ b/pedrom/Makefile.am
@@ -0,0 +1,7 @@
+pedromdir = $(pkgdatadir)/pedrom
+dist_pedrom_DATA = pedrom*.tib pedrom.txt
+
+EXTRA_DIST = pedrom-src.tar.bz2
+
+uninstall:
+	rm -f $(pkgdatadir)/pedrom/*.tib
diff --git a/pedrom/Makefile.in b/pedrom/Makefile.in
new file mode 100644
index 0000000..af7fa14
--- /dev/null
+++ b/pedrom/Makefile.in
@@ -0,0 +1,488 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = pedrom
+DIST_COMMON = $(dist_pedrom_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pedromdir)"
+dist_pedromDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_pedrom_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+pedromdir = $(pkgdatadir)/pedrom
+dist_pedrom_DATA = pedrom*.tib pedrom.txt
+EXTRA_DIST = pedrom-src.tar.bz2
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  pedrom/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  pedrom/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_pedromDATA: $(dist_pedrom_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pedromdir)" || $(MKDIR_P) "$(DESTDIR)$(pedromdir)"
+	@list='$(dist_pedrom_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(dist_pedromDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pedromdir)/$$f'"; \
+	  $(dist_pedromDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pedromdir)/$$f"; \
+	done
+
+uninstall-dist_pedromDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pedrom_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pedromdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pedromdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(pedromdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_pedromDATA
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_pedromDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dist_pedromDATA \
+	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 maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-dist_pedromDATA
+
+
+uninstall:
+	rm -f $(pkgdatadir)/pedrom/*.tib
+# 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/pedrom/pedrom-src.tar.bz2 b/pedrom/pedrom-src.tar.bz2
new file mode 100644
index 0000000..c9de0d4
Binary files /dev/null and b/pedrom/pedrom-src.tar.bz2 differ
diff --git a/pedrom/pedrom.txt b/pedrom/pedrom.txt
new file mode 100644
index 0000000..3e6af74
--- /dev/null
+++ b/pedrom/pedrom.txt
@@ -0,0 +1,33 @@
+Copyright information on PedroM:
+
+PedroM is free software and released under "GNU GENERAL PUBLIC LICENSE Version 2, June 1991".
+The source code of PedroM can be found in pedrom-src.tar.bz2.
+
+  PedroM   - Copyright (C) 2003, 2004, 2005 Patrick Pelissier
+  PreOS	   - Copyright (C) 2002, 2003, 2004, 2005 Patrick Pelissier
+  Side     - Copyright (c) 2002, 2005 Clement Vasseur.
+  MD5      - Copyright (C) 1999, 2000, 2002 Aladdin Enterprises.
+  ExtGraph - Copyright (C) 2001-2002 Thomas Nussbaumer
+  TIB Install - Copyright (c) 2000-2004 Julien Muchembled.
+
+  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 
+
+The precompiled TIB is PedRom re-built by Kevin in order to remove non-free parts:
+
+  This is a version of PedroM 0.81 modified for compatibility with ld-tigcc.
+  I also deleted the non-Free files (the builtin ttunpack, the builtin stdlib
+  archive pack and wti.h (not used by PedroM anymore anyway) have been removed),
+  as well as several other junk not needed to build PedroM and built PedroM
+  using the fully GPL option. See pedrom-081-ld-tigcc.diff for my changes.
+
+Get it at: www.tigen.org/kevin.kofler/ti89prog/pedrom-ld-tigcc.zip.
diff --git a/pedrom/pedrom89.tib b/pedrom/pedrom89.tib
new file mode 100644
index 0000000..7e4f078
Binary files /dev/null and b/pedrom/pedrom89.tib differ
diff --git a/pedrom/pedrom89ti.tib b/pedrom/pedrom89ti.tib
new file mode 100644
index 0000000..c4183a7
Binary files /dev/null and b/pedrom/pedrom89ti.tib differ
diff --git a/pedrom/pedrom9x.tib b/pedrom/pedrom9x.tib
new file mode 100644
index 0000000..da99bb0
Binary files /dev/null and b/pedrom/pedrom9x.tib differ
diff --git a/pedrom/pedromv2.tib b/pedrom/pedromv2.tib
new file mode 100644
index 0000000..cac7014
Binary files /dev/null and b/pedrom/pedromv2.tib differ
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
new file mode 100644
index 0000000..afaefc8
--- /dev/null
+++ b/pixmaps/Makefile.am
@@ -0,0 +1,8 @@
+pixmapsdir = $(pkgdatadir)/pixmaps
+dist_pixmaps_DATA = *.xpm *.ico
+
+EXTRA_DIST = copy.bat
+
+uninstall:
+	rm -f $(pkgdatadir)/pixmaps/*.xpm
+	rm -f $(pkgdatadir)/pixmaps/*.ico
diff --git a/pixmaps/Makefile.in b/pixmaps/Makefile.in
new file mode 100644
index 0000000..6f450bc
--- /dev/null
+++ b/pixmaps/Makefile.in
@@ -0,0 +1,489 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = pixmaps
+DIST_COMMON = $(dist_pixmaps_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pixmapsdir)"
+dist_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_pixmaps_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+pixmapsdir = $(pkgdatadir)/pixmaps
+dist_pixmaps_DATA = *.xpm *.ico
+EXTRA_DIST = copy.bat
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  pixmaps/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  pixmaps/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_pixmapsDATA: $(dist_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)"
+	@list='$(dist_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(dist_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapsdir)/$$f'"; \
+	  $(dist_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapsdir)/$$f"; \
+	done
+
+uninstall-dist_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pixmapsdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(pixmapsdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_pixmapsDATA
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_pixmapsDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dist_pixmapsDATA \
+	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 maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-dist_pixmapsDATA
+
+
+uninstall:
+	rm -f $(pkgdatadir)/pixmaps/*.xpm
+	rm -f $(pkgdatadir)/pixmaps/*.ico
+# 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/pixmaps/bkpt.xpm b/pixmaps/bkpt.xpm
new file mode 100644
index 0000000..24bc609
--- /dev/null
+++ b/pixmaps/bkpt.xpm
@@ -0,0 +1,13 @@
+/* XPM */
+static char * bkpt_xpm[] = {
+"8 8 2 1",
+" 	c None",
+".	c #FF0217",
+".      .",
+" .    . ",
+"  ....  ",
+"  ....  ",
+"  ....  ",
+"  ....  ",
+" .    . ",
+".      ."};
diff --git a/pixmaps/copy.bat b/pixmaps/copy.bat
new file mode 100644
index 0000000..1054c58
--- /dev/null
+++ b/pixmaps/copy.bat
@@ -0,0 +1,3 @@
+mkdir c:\lpg\msvc\pixmaps
+copy *.xpm c:\lpg\msvc\pixmaps\
+del *.bak
diff --git a/pixmaps/icon.xpm b/pixmaps/icon.xpm
new file mode 100644
index 0000000..f297911
--- /dev/null
+++ b/pixmaps/icon.xpm
@@ -0,0 +1,83 @@
+/* XPM */
+static char *icon[] = {
+"48 48 31 1",
+"` c None",
+". c #6f686f",
+"# c #302f30",
+"a c #605f60",
+"b c #a09fa0",
+"c c #808080",
+"d c #4f484f",
+"e c #908f90",
+"f c #807080",
+"g c #d0cfd0",
+"h c #2f5fb0",
+"i c #b0a8b0",
+"j c #3f383f",
+"k c #5f775f",
+"l c #405f40",
+"m c #7f707f",
+"n c #3f373f",
+"o c #6f9f6f",
+"p c #709f70",
+"q c #303030",
+"r c #2f282f",
+"s c #706f70",
+"t c #1f181f",
+"u c #3060bf",
+"v c #80b780",
+"w c #3060b0",
+"x c #dfd000",
+"y c #df00df",
+"z c #201f20",
+"A c #8f7f8f",
+"B c #000000",
+"```..#####################################``````",
+"``abbccccccccccccccccccccccccccccccccccccbBB````",
+"``abbccccccccccccccccccccccccccccccccccccbBB````",
+"``deefgggggggggggggggggggggggfhhfiifiifiieBB````",
+"``jccfggkkkkkkkkkkkkkkkkkklggffffffffffffmBB````",
+"``jccfggkkkkkkkkkkkkkkkkkklggffffffffffffmBB````",
+"``nccfggloooooooooooooooool##################BB`",
+"``nccfgglooooooooooooooooo###################BB`",
+"``nccfgglooooooooooooooooo##i################BB`",
+"``nccfgglooooooooooooooooo###kkkkkkkkkkkkkkk#BB`",
+"``jccfgglooooooooooooooooo###loooooooooooooo#BB`",
+"``jccfgglooooooooooooooooo###loooooooooooooo#BB`",
+"``nccfgglooooooooooooooooo###loooooooooooooo#BB`",
+"``nccfggllllllllllllllllll###loooooooooooooo#BB`",
+"``nccfggllllllllllllllllll###loooooooooooooo#BB`",
+"``nccfgggggggggggggggggggg###looooopoooooooo#BB`",
+"``qccfffffffffffffffffffff###loooooooooooooo#BB`",
+"``qccfggfggfggfggfggfggfgg###loooooooooooooo#BB`",
+"``qccfffffffffffffffffffff###lllllllllllllll#BB`",
+"``qccffBfBBfBBfBBfBBfBBfff###################BB`",
+"``qccffifiifiifiifiifiifif###################BB`",
+"``rccfffffffffffffffffffff#cffffffffffffffffsBB`",
+"``tccffqfqqfqqfqqfqqf##fff#cffhhfhhfuufuufuusBB`",
+"``tccffifiifiifiifiifiifif#cffhhfhhfuufuufuusBB`",
+"``Bccfftfttfttfttf##f##fff#cffiifiifiifiifiisBB`",
+"``rccffifiifiifiifiifiifif#cffffffffffffffffmBB`",
+"``rccfffffffffffffffff##ff#cffffffffffffffffmBB`",
+"``tccfggfvvfwwf#####ff##ff#cffxxfggfwwfffgffmBB`",
+"``Bbbfiifiifiifiiiiiffiiff#cffffffffffffgfgfmBB`",
+"``Bbbfffffffffffffffffffff#cffffffffffffgfgfmBB`",
+"```BBecccccccccccccccccccc#cffvvfyyfwwfffgffmBB`",
+"`````BBB###################cffffffffffffffffmBB`",
+"`````BBB###################cffffffffffffffffmBB`",
+"``````````````````````````#cffttfBBfzzfzzfzzmBB`",
+"``````````````````````````#cfffifiifiifiififmBB`",
+"``````````````````````````#cffiifiifiifiifiimBB`",
+"``````````````````````````#cffttfBBfBBfBBfzzmBB`",
+"``````````````````````````#cffiifiifiifiifiimBB`",
+"``````````````````````````#cffiifiifiifiifiimBB`",
+"``````````````````````````#cffttfBBfBBfBBfzzmBB`",
+"``````````````````````````#cffiifiifiifiifiimBB`",
+"``````````````````````````#cfffifiifiifiififmBB`",
+"``````````````````````````#eeAzzfBBfBBfBBhhhABB`",
+"```````````````````````````BBfffffffffcfffffB```",
+"```````````````````````````BBcccccccccccccccB```",
+"`````````````````````````````BBBBBBBBBBBBBBB````",
+"````````````````````````````````````````````````",
+"````````````````````````````````````````````````"
+};
diff --git a/pixmaps/logo.xpm b/pixmaps/logo.xpm
new file mode 100644
index 0000000..4c71e01
--- /dev/null
+++ b/pixmaps/logo.xpm
@@ -0,0 +1,7992 @@
+/* XPM */
+static char * logo_xpm[] = {
+"180 90 7899 2",
+"  	c #FFFFFF",
+". 	c #FEFDFE",
+"+ 	c #FCFBFC",
+"@ 	c #FAF9FB",
+"# 	c #F9F7FA",
+"$ 	c #F8F7F9",
+"% 	c #F9F8FA",
+"& 	c #FBFAFB",
+"* 	c #FBFAFC",
+"= 	c #F9F7F9",
+"- 	c #F8F6F9",
+"; 	c #F7F5F8",
+"> 	c #F6F4F7",
+", 	c #F7F6F9",
+"' 	c #FEFEFF",
+") 	c #FDFDFE",
+"! 	c #FCFBFD",
+"~ 	c #FAF8FA",
+"{ 	c #FAF9FA",
+"] 	c #FDFDFD",
+"^ 	c #FEFEFE",
+"/ 	c #FBFBFC",
+"( 	c #F7F5F9",
+"_ 	c #F6F4F8",
+": 	c #FCFCFD",
+"< 	c #FDFCFD",
+"[ 	c #F0ECF2",
+"} 	c #E9E4EC",
+"| 	c #E5DFE9",
+"1 	c #E4DDE7",
+"2 	c #E4DEE8",
+"3 	c #E6E0EA",
+"4 	c #E8E3EC",
+"5 	c #EAE5ED",
+"6 	c #ECE7EE",
+"7 	c #EDE9F0",
+"8 	c #EDEAF0",
+"9 	c #E6E1EA",
+"0 	c #E4DDE8",
+"a 	c #E1DAE6",
+"b 	c #DFD8E4",
+"c 	c #DED6E2",
+"d 	c #DCD5E2",
+"e 	c #DDD5E2",
+"f 	c #DED6E3",
+"g 	c #E1DAE5",
+"h 	c #E9E4ED",
+"i 	c #EBE7EE",
+"j 	c #EBE6EE",
+"k 	c #E8E2EB",
+"l 	c #E5DEE9",
+"m 	c #E3DDE7",
+"n 	c #F0EDF2",
+"o 	c #F5F3F7",
+"p 	c #E7E1EA",
+"q 	c #E7E2EA",
+"r 	c #E9E3EC",
+"s 	c #EFEBF1",
+"t 	c #F3F0F5",
+"u 	c #F5F2F6",
+"v 	c #EEEAF0",
+"w 	c #E0DAE5",
+"x 	c #DFD7E3",
+"y 	c #E0D8E4",
+"z 	c #F1EEF3",
+"A 	c #F3F1F5",
+"B 	c #E8E3EB",
+"C 	c #DED7E3",
+"D 	c #E2DBE6",
+"E 	c #E7E2EB",
+"F 	c #F6F3F7",
+"G 	c #FBF9FB",
+"H 	c #EAE6ED",
+"I 	c #F2F0F4",
+"J 	c #D2C8D9",
+"K 	c #C4B6CD",
+"L 	c #BBACC5",
+"M 	c #B8A8C2",
+"N 	c #BAA9C4",
+"O 	c #BDADC6",
+"P 	c #C1B2CA",
+"Q 	c #C4B6CC",
+"R 	c #C7BACF",
+"S 	c #C9BDD1",
+"T 	c #CBBFD2",
+"U 	c #CBBFD3",
+"V 	c #CABED2",
+"W 	c #C3B5CB",
+"X 	c #BDAEC7",
+"Y 	c #B9A8C3",
+"Z 	c #B5A3BF",
+"` 	c #B19FBC",
+" .	c #AE9CBA",
+"..	c #AD9AB9",
+"+.	c #B09DBB",
+"@.	c #B5A4C0",
+"#.	c #BCADC6",
+"$.	c #C3B5CC",
+"%.	c #C6B9CF",
+"&.	c #C6BACF",
+"*.	c #C6B8CE",
+"=.	c #C5B7CD",
+"-.	c #C3B6CC",
+";.	c #C2B4CB",
+">.	c #BFB1C9",
+",.	c #BAAAC4",
+"'.	c #B8A7C2",
+").	c #D3C9DA",
+"!.	c #D1C6D8",
+"~.	c #C6B9CE",
+"{.	c #C0B1C9",
+"].	c #BEAEC7",
+"^.	c #BFB0C8",
+"/.	c #C1B3CA",
+"(.	c #CEC2D5",
+"_.	c #D9D0DE",
+":.	c #E5DFE8",
+"<.	c #ECE7EF",
+"[.	c #CEC3D5",
+"}.	c #B8A8C3",
+"|.	c #B3A2BE",
+"1.	c #B19EBC",
+"2.	c #AF9DBB",
+"3.	c #B2A0BD",
+"4.	c #D6CCDC",
+"5.	c #E6E0E9",
+"6.	c #F3F0F4",
+"7.	c #F5F3F6",
+"8.	c #DAD2DF",
+"9.	c #CCC0D3",
+"0.	c #B9A9C3",
+"a.	c #B4A3BF",
+"b.	c #AE9BBA",
+"c.	c #AE9BB9",
+"d.	c #B09EBC",
+"e.	c #B6A5C1",
+"f.	c #D0C5D7",
+"g.	c #F2EFF4",
+"h.	c #ECE8EF",
+"i.	c #E0D9E5",
+"j.	c #D2C7D8",
+"k.	c #B6A5C0",
+"l.	c #B6A4C0",
+"m.	c #BEAFC7",
+"n.	c #D9D0DF",
+"o.	c #F1EDF3",
+"p.	c #DCD5E1",
+"q.	c #A48FB2",
+"r.	c #8F759F",
+"s.	c #846796",
+"t.	c #806292",
+"u.	c #816493",
+"v.	c #846896",
+"w.	c #896D9A",
+"x.	c #8C729D",
+"y.	c #9076A0",
+"z.	c #9279A2",
+"A.	c #947BA4",
+"B.	c #957CA4",
+"C.	c #937AA3",
+"D.	c #8B709C",
+"E.	c #856997",
+"F.	c #806393",
+"G.	c #7C5E8F",
+"H.	c #78598C",
+"I.	c #76568A",
+"J.	c #755489",
+"K.	c #745488",
+"L.	c #755589",
+"M.	c #77588B",
+"N.	c #856896",
+"O.	c #8C719D",
+"P.	c #8F76A0",
+"Q.	c #8F75A0",
+"R.	c #8E749E",
+"S.	c #8D739E",
+"T.	c #8C719C",
+"U.	c #8A6F9B",
+"V.	c #876B99",
+"W.	c #826594",
+"X.	c #7F6292",
+"Y.	c #9077A0",
+"Z.	c #A691B3",
+"`.	c #DCD4E1",
+" +	c #D3C9D9",
+".+	c #A18BAE",
+"++	c #886D9A",
+"@+	c #866A98",
+"#+	c #8A6E9B",
+"$+	c #9A83A9",
+"%+	c #AB98B7",
+"&+	c #C8BCD0",
+"*+	c #9D87AC",
+"=+	c #7B5C8E",
+"-+	c #78588B",
+";+	c #77578B",
+">+	c #7A5B8D",
+",+	c #A995B5",
+"'+	c #F4F1F6",
+")+	c #9981A8",
+"!+	c #7C5D8F",
+"~+	c #755689",
+"{+	c #7E6191",
+"]+	c #A18BAF",
+"^+	c #BCACC5",
+"/+	c #CFC4D6",
+"(+	c #A28CAF",
+"_+	c #7D5F90",
+":+	c #7D5E90",
+"<+	c #876B98",
+"[+	c #977EA6",
+"}+	c #CCC1D4",
+"|+	c #977FA6",
+"1+	c #5F3A76",
+"2+	c #552D6E",
+"3+	c #52296B",
+"4+	c #522A6B",
+"5+	c #552D6D",
+"6+	c #573070",
+"7+	c #5A3472",
+"8+	c #5C3774",
+"9+	c #5E3976",
+"0+	c #603B77",
+"a+	c #5D3774",
+"b+	c #593371",
+"c+	c #552E6E",
+"d+	c #4F2669",
+"e+	c #4D2467",
+"f+	c #4B2265",
+"g+	c #4B2165",
+"h+	c #4C2366",
+"i+	c #502769",
+"j+	c #5C3674",
+"k+	c #5B3573",
+"l+	c #5A3372",
+"m+	c #583170",
+"n+	c #562F6F",
+"o+	c #542D6D",
+"p+	c #532B6C",
+"q+	c #51296B",
+"r+	c #76578A",
+"s+	c #9880A7",
+"t+	c #D2C8D8",
+"u+	c #8B709B",
+"v+	c #6F4D84",
+"w+	c #5F3976",
+"x+	c #562E6E",
+"y+	c #67437D",
+"z+	c #8E739E",
+"A+	c #9D86AB",
+"B+	c #9982A8",
+"C+	c #6C4A82",
+"D+	c #4F2668",
+"E+	c #4D2367",
+"F+	c #4E2568",
+"G+	c #623D78",
+"H+	c #BEAFC8",
+"I+	c #A590B2",
+"J+	c #68447D",
+"K+	c #715085",
+"L+	c #8E749F",
+"M+	c #AB97B7",
+"N+	c #6F4E84",
+"O+	c #4F2769",
+"P+	c #66437C",
+"Q+	c #A793B4",
+"R+	c #9F89AD",
+"S+	c #725187",
+"T+	c #42165E",
+"U+	c #3C0F58",
+"V+	c #3A0C56",
+"W+	c #3A0D57",
+"X+	c #3B0E58",
+"Y+	c #3D115A",
+"Z+	c #3E125A",
+"`+	c #3F135B",
+" @	c #40145C",
+".@	c #40135B",
+"+@	c #3F125A",
+"@@	c #3D1059",
+"#@	c #3A0C57",
+"$@	c #390B56",
+"%@	c #380A55",
+"&@	c #380955",
+"*@	c #370954",
+"=@	c #390C56",
+"-@	c #3C0E58",
+";@	c #3E115A",
+">@	c #43175E",
+",@	c #542C6C",
+"'@	c #735287",
+")@	c #9A82A8",
+"!@	c #AA97B7",
+"~@	c #886D99",
+"{@	c #64407B",
+"]@	c #41155C",
+"^@	c #451A60",
+"/@	c #50286A",
+"(@	c #613C77",
+"_@	c #6D4B82",
+":@	c #6B4880",
+"<@	c #4A2064",
+"[@	c #3B0D57",
+"}@	c #43185E",
+"|@	c #532C6C",
+"1@	c #715086",
+"2@	c #9B84AA",
+"3@	c #C5B8CE",
+"4@	c #D4CBDB",
+"5@	c #471D62",
+"6@	c #886C99",
+"7@	c #795A8C",
+"8@	c #4C2266",
+"9@	c #390B55",
+"0@	c #5D3875",
+"a@	c #B4A2BF",
+"b@	c #F4F2F6",
+"c@	c #836695",
+"d@	c #593271",
+"e@	c #360753",
+"f@	c #330450",
+"g@	c #320350",
+"h@	c #330350",
+"i@	c #340451",
+"j@	c #320250",
+"k@	c #32024F",
+"l@	c #31024F",
+"m@	c #330451",
+"n@	c #360853",
+"o@	c #583271",
+"p@	c #69467F",
+"q@	c #3B0E57",
+"r@	c #350652",
+"s@	c #340551",
+"t@	c #491E63",
+"u@	c #41155D",
+"v@	c #340552",
+"w@	c #7D5E8F",
+"x@	c #AC98B8",
+"y@	c #69477F",
+"z@	c #481D62",
+"A@	c #3C0F59",
+"B@	c #562F6E",
+"C@	c #461B60",
+"D@	c #491F63",
+"E@	c #6A4880",
+"F@	c #9C86AB",
+"G@	c #EFECF2",
+"H@	c #6D4C83",
+"I@	c #491F64",
+"J@	c #5E3A73",
+"K@	c #7F668F",
+"L@	c #6A4B7D",
+"M@	c #58346E",
+"N@	c #492361",
+"O@	c #3C1554",
+"P@	c #380B55",
+"Q@	c #370953",
+"R@	c #360852",
+"S@	c #370A54",
+"T@	c #380A54",
+"U@	c #31014F",
+"V@	c #47215F",
+"W@	c #6C4D80",
+"X@	c #7A608B",
+"Y@	c #8B739A",
+"Z@	c #9884A5",
+"`@	c #A393AE",
+" #	c #AC9BB6",
+".#	c #AE9DB9",
+"+#	c #A898B3",
+"@#	c #9C89A7",
+"##	c #340650",
+"$#	c #390C55",
+"%#	c #3E1755",
+"&#	c #4E2766",
+"*#	c #512B69",
+"=#	c #532C6B",
+"-#	c #522C6A",
+";#	c #512A69",
+">#	c #532D6B",
+",#	c #583270",
+"'#	c #5A3A6E",
+")#	c #654578",
+"!#	c #745587",
+"~#	c #836B92",
+"{#	c #5A3470",
+"]#	c #481E63",
+"^#	c #715186",
+"/#	c #68487B",
+"(#	c #5F4073",
+"_#	c #59376E",
+":#	c #56306E",
+"<#	c #471E60",
+"[#	c #350753",
+"}#	c #715383",
+"|#	c #8F779E",
+"1#	c #9886A3",
+"2#	c #917B9E",
+"3#	c #4E2765",
+"4#	c #461B61",
+"5#	c #67447D",
+"6#	c #967DA5",
+"7#	c #8D729D",
+"8#	c #5E3875",
+"9#	c #340652",
+"0#	c #390B54",
+"a#	c #6D4E81",
+"b#	c #7E658D",
+"c#	c #9179A0",
+"d#	c #9988A4",
+"e#	c #A392AE",
+"f#	c #A796B1",
+"g#	c #A392AD",
+"h#	c #9784A3",
+"i#	c #634177",
+"j#	c #43185F",
+"k#	c #41145C",
+"l#	c #340550",
+"m#	c #5E3B73",
+"n#	c #795F8A",
+"o#	c #866E95",
+"p#	c #887097",
+"q#	c #7E668D",
+"r#	c #7F678D",
+"s#	c #380B53",
+"t#	c #5C3673",
+"u#	c #5D3775",
+"v#	c #CFC7D4",
+"w#	c #F9F9F9",
+"x#	c #F5F5F5",
+"y#	c #F4F4F4",
+"z#	c #F7F7F7",
+"A#	c #FBFBFB",
+"B#	c #D3CED6",
+"C#	c #30004E",
+"D#	c #8C749B",
+"E#	c #633F79",
+"F#	c #380E52",
+"G#	c #EFEFEF",
+"H#	c #FCFCFC",
+"I#	c #B0A2B9",
+"J#	c #3D1159",
+"K#	c #4D2366",
+"L#	c #573170",
+"M#	c #44195F",
+"N#	c #5E3D73",
+"O#	c #E7E3E9",
+"P#	c #3B0F56",
+"Q#	c #F4F3F4",
+"R#	c #EDEBEF",
+"S#	c #AA96B6",
+"T#	c #AC99B8",
+"U#	c #876C99",
+"V#	c #5B3472",
+"W#	c #41185A",
+"X#	c #B3A4BC",
+"Y#	c #502C67",
+"Z#	c #846795",
+"`#	c #7B5D8E",
+" $	c #532E6A",
+".$	c #BAADC2",
+"+$	c #765A87",
+"@$	c #603C77",
+"#$	c #3D1655",
+"$$	c #ECEAED",
+"%$	c #31034E",
+"&$	c #370854",
+"*$	c #42165D",
+"=$	c #866D96",
+"-$	c #5D3B72",
+";$	c #806690",
+">$	c #654678",
+",$	c #A591B2",
+"'$	c #31024E",
+")$	c #FAFAFA",
+"!$	c #C5BDCA",
+"~$	c #66457A",
+"{$	c #6F5083",
+"]$	c #816494",
+"^$	c #6B4981",
+"/$	c #471C62",
+"($	c #9984A5",
+"_$	c #EBE9EC",
+":$	c #C6BCCC",
+"<$	c #B7A6C1",
+"[$	c #C4B8CB",
+"}$	c #8C779A",
+"|$	c #624376",
+"1$	c #5C3873",
+"2$	c #431D5B",
+"3$	c #D4CED7",
+"4$	c #C0B6C6",
+"5$	c #BFB5C5",
+"6$	c #BFB6C5",
+"7$	c #C1B7C7",
+"8$	c #C2B9C8",
+"9$	c #C4BBCA",
+"0$	c #C7BECD",
+"a$	c #C9BFCF",
+"b$	c #CAC0D0",
+"c$	c #D3CCD7",
+"d$	c #56336D",
+"e$	c #AD9EB7",
+"f$	c #A391AE",
+"g$	c #CBC3D0",
+"h$	c #9986A5",
+"i$	c #68457E",
+"j$	c #9E88AC",
+"k$	c #E6E6E6",
+"l$	c #C2B7C9",
+"m$	c #F2F1F2",
+"n$	c #D9D2DD",
+"o$	c #785E89",
+"p$	c #F3F2F3",
+"q$	c #5C3B71",
+"r$	c #542C6D",
+"s$	c #5E3975",
+"t$	c #D8D3DC",
+"u$	c #B6A9BE",
+"v$	c #431C5C",
+"w$	c #3C1355",
+"x$	c #3F1659",
+"y$	c #441B5E",
+"z$	c #431A5D",
+"A$	c #34084F",
+"B$	c #2F0549",
+"C$	c #2F0648",
+"D$	c #30084A",
+"E$	c #C0B6C7",
+"F$	c #56336C",
+"G$	c #542E6B",
+"H$	c #3A1254",
+"I$	c #EDECEE",
+"J$	c #57336D",
+"K$	c #492261",
+"L$	c #705382",
+"M$	c #6D4C81",
+"N$	c #8E759D",
+"O$	c #887197",
+"P$	c #D6D1D9",
+"Q$	c #F1F1F1",
+"R$	c #461E60",
+"S$	c #D1CAD6",
+"T$	c #957DA5",
+"U$	c #DBD4DF",
+"V$	c #55306D",
+"W$	c #C9C3CD",
+"X$	c #E4E4E4",
+"Y$	c #8E779B",
+"Z$	c #E6E5E6",
+"`$	c #745886",
+" %	c #4F2867",
+".%	c #57306F",
+"+%	c #4A2362",
+"@%	c #D5CCDB",
+"#%	c #D5CDD9",
+"$%	c #E7E4E9",
+"%%	c #320450",
+"&%	c #431C5B",
+"*%	c #E5E3E7",
+"=%	c #512D67",
+"-%	c #745786",
+";%	c #C7C0CB",
+">%	c #B7A8C0",
+",%	c #370B53",
+"'%	c #ECEAEE",
+")%	c #8B7599",
+"!%	c #95849F",
+"~%	c #431A5C",
+"{%	c #725186",
+"]%	c #896E9A",
+"^%	c #CDC6D2",
+"/%	c #5C3D6F",
+"(%	c #F3F3F3",
+"_%	c #A491AF",
+":%	c #D0C9D5",
+"<%	c #8A7498",
+"[%	c #3E1757",
+"}%	c #8B719C",
+"|%	c #E9E5ED",
+"1%	c #DAD1DF",
+"2%	c #725287",
+"3%	c #481F63",
+"4%	c #846B93",
+"5%	c #D5CEDA",
+"6%	c #AE9FB8",
+"7%	c #390E54",
+"8%	c #4A2660",
+"9%	c #775A89",
+"0%	c #DCD7DF",
+"a%	c #614075",
+"b%	c #BAAEC1",
+"c%	c #3C1157",
+"d%	c #F1F0F2",
+"e%	c #AD9DB6",
+"f%	c #CAC2D0",
+"g%	c #DBD7DE",
+"h%	c #350951",
+"i%	c #F0EFF1",
+"j%	c #7D618E",
+"k%	c #471C61",
+"l%	c #633E79",
+"m%	c #C3BCC7",
+"n%	c #644578",
+"o%	c #30004D",
+"p%	c #B7ABBE",
+"q%	c #BEB3C6",
+"r%	c #A18FAC",
+"s%	c #F7F6F6",
+"t%	c #D8D8D8",
+"u%	c #BAB9BB",
+"v%	c #9C989F",
+"w%	c #756B7D",
+"x%	c #503A5F",
+"y%	c #39174F",
+"z%	c #32074D",
+"A%	c #30024E",
+"B%	c #C1B5C8",
+"C%	c #E8E6E9",
+"D%	c #CEC7D3",
+"E%	c #C4BDC9",
+"F%	c #DAD6DD",
+"G%	c #795D8A",
+"H%	c #F6F6F6",
+"I%	c #F1EEF2",
+"J%	c #441E5C",
+"K%	c #795C8B",
+"L%	c #D8D1DD",
+"M%	c #F0EEF1",
+"N%	c #C0B4C7",
+"O%	c #BEB0C7",
+"P%	c #C7C0CC",
+"Q%	c #D6CFDB",
+"R%	c #E3E2E4",
+"S%	c #F8F8F8",
+"T%	c #350751",
+"U%	c #917B9F",
+"V%	c #866F94",
+"W%	c #8A7796",
+"X%	c #F1F0F1",
+"Y%	c #360952",
+"Z%	c #41195B",
+"`%	c #937EA0",
+" &	c #6B517B",
+".&	c #AC9DB5",
+"+&	c #BDB2C4",
+"@&	c #6A477F",
+"#&	c #BFB5C6",
+"$&	c #6A4A7D",
+"%&	c #C3B7CA",
+"&&	c #31084A",
+"*&	c #CCC4D1",
+"=&	c #AFA0B8",
+"-&	c #B4A5BD",
+";&	c #EDE8EF",
+">&	c #E9E8EA",
+",&	c #C7C6C8",
+"'&	c #A8A8AA",
+")&	c #87868C",
+"!&	c #616065",
+"~&	c #45434A",
+"{&	c #3F3E44",
+"]&	c #38383D",
+"^&	c #2F2E37",
+"/&	c #2B2436",
+"(&	c #2C193C",
+"_&	c #2E0D45",
+":&	c #2F054A",
+"<&	c #30024D",
+"[&	c #4C2862",
+"}&	c #4F2B66",
+"|&	c #380F53",
+"1&	c #EDEAEE",
+"2&	c #7B638A",
+"3&	c #7B618C",
+"4&	c #9B87A7",
+"5&	c #C4BAC9",
+"6&	c #E4E1E7",
+"7&	c #4B2663",
+"8&	c #32054F",
+"9&	c #42175D",
+"0&	c #7B5E8D",
+"a&	c #D3CCD8",
+"b&	c #8D759C",
+"c&	c #30014D",
+"d&	c #3E1557",
+"e&	c #55326B",
+"f&	c #705282",
+"g&	c #340850",
+"h&	c #C1B8C6",
+"i&	c #7D668B",
+"j&	c #F7F6F8",
+"k&	c #5C3D70",
+"l&	c #735784",
+"m&	c #7F678F",
+"n&	c #664978",
+"o&	c #EFEEEF",
+"p&	c #674A79",
+"q&	c #F6F5F6",
+"r&	c #3D0F59",
+"s&	c #C0B2C9",
+"t&	c #6C4C7F",
+"u&	c #C5B9CC",
+"v&	c #370F51",
+"w&	c #E2DEE5",
+"x&	c #A290AC",
+"y&	c #EDEDED",
+"z&	c #CECECF",
+"A&	c #828087",
+"B&	c #59585E",
+"C&	c #414146",
+"D&	c #393A3F",
+"E&	c #303135",
+"F&	c #2B2D30",
+"G&	c #292B2E",
+"H&	c #2B2B31",
+"I&	c #2B2A30",
+"J&	c #292930",
+"K&	c #2A2333",
+"L&	c #291736",
+"M&	c #2D0F42",
+"N&	c #310A4B",
+"O&	c #30044D",
+"P&	c #32034F",
+"Q&	c #30014E",
+"R&	c #E0DDE1",
+"S&	c #330650",
+"T&	c #31014E",
+"U&	c #30024C",
+"V&	c #E9E9EA",
+"W&	c #2E024A",
+"X&	c #3D1258",
+"Y&	c #57366B",
+"Z&	c #7C5F8E",
+"`&	c #C9C2CE",
+" *	c #9682A3",
+".*	c #340651",
+"+*	c #F1EFF2",
+"@*	c #E5E2E6",
+"#*	c #856D94",
+"$*	c #947FA1",
+"%*	c #BDB3C4",
+"&*	c #BFB4C6",
+"**	c #C4BCCA",
+"=*	c #CEC7D2",
+"-*	c #897397",
+";*	c #705381",
+">*	c #785D8A",
+",*	c #6A4B7E",
+"'*	c #CABED1",
+")*	c #3C1356",
+"!*	c #F2F2F2",
+"~*	c #9984A7",
+"{*	c #CCC5D1",
+"]*	c #E9E6EB",
+"^*	c #623E79",
+"/*	c #CDC1D4",
+"(*	c #ECEBEB",
+"_*	c #C1C0C0",
+":*	c #9A999B",
+"<*	c #6C6B6E",
+"[*	c #48484C",
+"}*	c #3C3D41",
+"|*	c #333438",
+"1*	c #2C2D31",
+"2*	c #2A2C2F",
+"3*	c #282A2C",
+"4*	c #28292B",
+"5*	c #272A2C",
+"6*	c #252A2C",
+"7*	c #272A2D",
+"8*	c #2B2E32",
+"9*	c #2B2C32",
+"0*	c #2A252D",
+"a*	c #29252E",
+"b*	c #29202F",
+"c*	c #271A32",
+"d*	c #311944",
+"e*	c #38154F",
+"f*	c #31094B",
+"g*	c #32064D",
+"h*	c #30034D",
+"i*	c #31034F",
+"j*	c #D6D4D8",
+"k*	c #E4E0E7",
+"l*	c #E9E5EC",
+"m*	c #30044B",
+"n*	c #380D53",
+"o*	c #58396C",
+"p*	c #7D608F",
+"q*	c #D0C5D6",
+"r*	c #7F658F",
+"s*	c #705680",
+"t*	c #6A497F",
+"u*	c #614076",
+"v*	c #68467D",
+"w*	c #755A86",
+"x*	c #8E779C",
+"y*	c #59356F",
+"z*	c #AE9DB8",
+"A*	c #EAE8EB",
+"B*	c #694B7B",
+"C*	c #F9F9FA",
+"D*	c #41195A",
+"E*	c #42195B",
+"F*	c #856D95",
+"G*	c #C9C1CF",
+"H*	c #B5A8BD",
+"I*	c #A08FAB",
+"J*	c #67487A",
+"K*	c #CBC6CE",
+"L*	c #401759",
+"M*	c #8E799C",
+"N*	c #D7D0DB",
+"O*	c #E5E0E8",
+"P*	c #CDC2D3",
+"Q*	c #EAE6EC",
+"R*	c #F3F2F5",
+"S*	c #F6F5F7",
+"T*	c #C2C1C3",
+"U*	c #989699",
+"V*	c #666568",
+"W*	c #424348",
+"X*	c #3B3C40",
+"Y*	c #2F3135",
+"Z*	c #2C2F33",
+"`*	c #2B2E31",
+" =	c #292C2E",
+".=	c #2C2E32",
+"+=	c #282B2D",
+"@=	c #2E3134",
+"#=	c #42454A",
+"$=	c #505156",
+"%=	c #605F66",
+"&=	c #38373D",
+"*=	c #27272C",
+"==	c #27232A",
+"-=	c #29232F",
+";=	c #2D2536",
+">=	c #30203F",
+",=	c #341A46",
+"'=	c #39194F",
+")=	c #3F1A57",
+"!=	c #360F4E",
+"~=	c #2F0749",
+"{=	c #31064D",
+"]=	c #D2CDD5",
+"^=	c #E6E1E9",
+"/=	c #33074E",
+"(=	c #5A3B6D",
+"_=	c #7E6190",
+":=	c #B2A3BB",
+"<=	c #8D769B",
+"[=	c #745986",
+"}=	c #D7D3DA",
+"|=	c #7D658C",
+"1=	c #D7D1DA",
+"2=	c #897098",
+"3=	c #4F2E64",
+"4=	c #FAFAFB",
+"5=	c #F4F3F5",
+"6=	c #624474",
+"7=	c #3E1558",
+"8=	c #614174",
+"9=	c #D5D0D8",
+"0=	c #512C69",
+"a=	c #856F92",
+"b=	c #E0DBE3",
+"c=	c #340950",
+"d=	c #391651",
+"e=	c #3F284F",
+"f=	c #42384B",
+"g=	c #414047",
+"h=	c #434145",
+"i=	c #424344",
+"j=	c #444747",
+"k=	c #48494A",
+"l=	c #4E4F50",
+"m=	c #565859",
+"n=	c #646566",
+"o=	c #707173",
+"p=	c #808081",
+"q=	c #959495",
+"r=	c #A7A6A7",
+"s=	c #B9B8B9",
+"t=	c #D0CFD0",
+"u=	c #454449",
+"v=	c #333439",
+"w=	c #2D3033",
+"x=	c #2C2F32",
+"y=	c #2D2F33",
+"z=	c #2B2D31",
+"A=	c #2A2B2E",
+"B=	c #292B2F",
+"C=	c #292D2F",
+"D=	c #414348",
+"E=	c #494A51",
+"F=	c #5A5960",
+"G=	c #69676F",
+"H=	c #616069",
+"I=	c #6D6C73",
+"J=	c #4F4E56",
+"K=	c #3C3C43",
+"L=	c #35353B",
+"M=	c #313036",
+"N=	c #37353C",
+"O=	c #46444E",
+"P=	c #645F6A",
+"Q=	c #78727D",
+"R=	c #7E7385",
+"S=	c #81708B",
+"T=	c #7E698D",
+"U=	c #7B628B",
+"V=	c #4D305F",
+"W=	c #321247",
+"X=	c #2F0B48",
+"Y=	c #370C51",
+"Z=	c #D4CBDA",
+"`=	c #C8BECF",
+" -	c #E4DFE7",
+".-	c #34094F",
+"+-	c #2F024B",
+"@-	c #5B3C6F",
+"#-	c #7F6291",
+"$-	c #C1B8C7",
+"%-	c #4B2761",
+"&-	c #7F678E",
+"*-	c #EBE9ED",
+"=-	c #F3F2F4",
+"--	c #C1B6C8",
+";-	c #7D648D",
+">-	c #7A5F8B",
+",-	c #DDD8E0",
+"'-	c #836A93",
+")-	c #59396D",
+"!-	c #E1DCE4",
+"~-	c #816792",
+"{-	c #DEDDDE",
+"]-	c #360A51",
+"^-	c #431F59",
+"/-	c #5E476D",
+"(-	c #716576",
+"_-	c #878288",
+":-	c #8B898B",
+"<-	c #8F8D8E",
+"[-	c #8A8789",
+"}-	c #8B898A",
+"|-	c #878587",
+"1-	c #868386",
+"2-	c #828082",
+"3-	c #7C7B7D",
+"4-	c #797A7B",
+"5-	c #747476",
+"6-	c #616263",
+"7-	c #454648",
+"8-	c #484649",
+"9-	c #525053",
+"0-	c #767376",
+"a-	c #565557",
+"b-	c #515359",
+"c-	c #54565D",
+"d-	c #37383D",
+"e-	c #5F6167",
+"f-	c #5A5E63",
+"g-	c #606167",
+"h-	c #636369",
+"i-	c #4E5054",
+"j-	c #4B4D52",
+"k-	c #3F4247",
+"l-	c #323339",
+"m-	c #33313A",
+"n-	c #38363F",
+"o-	c #46454C",
+"p-	c #66636B",
+"q-	c #7A777E",
+"r-	c #858287",
+"s-	c #ACA9AD",
+"t-	c #B2AFB2",
+"u-	c #B1AEB2",
+"v-	c #BDBABF",
+"w-	c #B0ABB4",
+"x-	c #C7BFCB",
+"y-	c #A59AAD",
+"z-	c #A79AB0",
+"A-	c #7B6985",
+"B-	c #392349",
+"C-	c #2C1042",
+"D-	c #360F4F",
+"E-	c #D5CBDB",
+"F-	c #BEB2C6",
+"G-	c #51296A",
+"H-	c #370C52",
+"I-	c #F2EFF3",
+"J-	c #806492",
+"K-	c #7C628C",
+"L-	c #D8D2DC",
+"M-	c #350851",
+"N-	c #F2F1F3",
+"O-	c #D3CED7",
+"P-	c #67497A",
+"Q-	c #6F5380",
+"R-	c #EBEAEC",
+"S-	c #775C88",
+"T-	c #C0B5C6",
+"U-	c #9481A0",
+"V-	c #55306C",
+"W-	c #E1E1E1",
+"X-	c #DAD5DD",
+"Y-	c #380C53",
+"Z-	c #47235D",
+"`-	c #70597E",
+" ;	c #857A8C",
+".;	c #A4A0A7",
+"+;	c #979497",
+"@;	c #A8A7A9",
+"#;	c #A5A4A7",
+"$;	c #A09FA1",
+"%;	c #A7A5A7",
+"&;	c #A19FA2",
+"*;	c #908C8E",
+"=;	c #918D8F",
+"-;	c #928F91",
+";;	c #969496",
+">;	c #989698",
+",;	c #908F91",
+"';	c #57595B",
+");	c #4F4D51",
+"!;	c #757376",
+"~;	c #514F52",
+"{;	c #BEBDBF",
+"];	c #414046",
+"^;	c #75767D",
+"/;	c #A1A1A9",
+"(;	c #3A3C42",
+"_;	c #4B4E52",
+":;	c #3B3E43",
+"<;	c #35353A",
+"[;	c #3A3A3F",
+"};	c #4F4D54",
+"|;	c #878489",
+"1;	c #979599",
+"2;	c #A8A5A9",
+"3;	c #C5C3C6",
+"4;	c #D6D4D6",
+"5;	c #B3B1B5",
+"6;	c #B6B4B7",
+"7;	c #BAB8BB",
+"8;	c #BCBABC",
+"9;	c #CAC8CA",
+"0;	c #B3B0B4",
+"a;	c #C9C6CA",
+"b;	c #D1CFD3",
+"c;	c #CBC6CD",
+"d;	c #CDC7D0",
+"e;	c #B0A7B5",
+"f;	c #493952",
+"g;	c #2C1440",
+"h;	c #310C4A",
+"i;	c #360A52",
+"j;	c #D5CDDA",
+"k;	c #B5A9BD",
+"l;	c #3F125B",
+"m;	c #E6E2E9",
+"n;	c #ECE9ED",
+"o;	c #54306A",
+"p;	c #8A7497",
+"q;	c #957FA2",
+"r;	c #9B86A9",
+"s;	c #9E88AB",
+"t;	c #9B85A9",
+"u;	c #9782A5",
+"v;	c #947EA1",
+"w;	c #907B9E",
+"x;	c #8F7A9C",
+"y;	c #F2F0F3",
+"z;	c #664779",
+"A;	c #5D3C72",
+"B;	c #9C88A8",
+"C;	c #9B88A7",
+"D;	c #9885A5",
+"E;	c #441D5D",
+"F;	c #5E3F72",
+"G;	c #4D2665",
+"H;	c #E1DFE2",
+"I;	c #4D2964",
+"J;	c #431B5D",
+"K;	c #90799E",
+"L;	c #370B52",
+"M;	c #401D57",
+"N;	c #5B4368",
+"O;	c #6F6375",
+"P;	c #7C767D",
+"Q;	c #827F81",
+"R;	c #817E80",
+"S;	c #838082",
+"T;	c #848183",
+"U;	c #868385",
+"V;	c #858284",
+"W;	c #8F8C8E",
+"X;	c #918D90",
+"Y;	c #949093",
+"Z;	c #979496",
+"`;	c #9A999A",
+" >	c #595A5C",
+".>	c #4F4F50",
+"+>	c #8E8C8F",
+"@>	c #48474D",
+"#>	c #2D2E32",
+"$>	c #3B3D42",
+"%>	c #3F4047",
+"&>	c #444448",
+"*>	c #5E5D61",
+"=>	c #7D7C7F",
+"->	c #939194",
+";>	c #A19FA0",
+">>	c #B3B1B3",
+",>	c #BEBCBE",
+"'>	c #BFBDBF",
+")>	c #D7D5D6",
+"!>	c #CDCBCD",
+"~>	c #C4C2C5",
+"{>	c #C2C0C3",
+"]>	c #C6C4C6",
+"^>	c #D4D3D4",
+"/>	c #D1D0D1",
+"(>	c #DAD9DA",
+"_>	c #E9E8E9",
+":>	c #F2F1F1",
+"<>	c #EDEBED",
+"[>	c #D4CED6",
+"}>	c #64566B",
+"|>	c #321B44",
+"1>	c #2E0B46",
+"2>	c #D6D3D7",
+"3>	c #AFA3B7",
+"4>	c #6E4D83",
+"5>	c #3C1057",
+"6>	c #E7E4E8",
+"7>	c #5C3C6F",
+"8>	c #9883A6",
+"9>	c #634377",
+"0>	c #D1CAD5",
+"a>	c #674B79",
+"b>	c #B2A5BB",
+"c>	c #7A5E8B",
+"d>	c #D0CAD4",
+"e>	c #9580A1",
+"f>	c #F0F0F0",
+"g>	c #45225B",
+"h>	c #441B5D",
+"i>	c #E5E5E5",
+"j>	c #DBD6DE",
+"k>	c #5A4368",
+"l>	c #6D6173",
+"m>	c #7A757B",
+"n>	c #807E7F",
+"o>	c #828081",
+"p>	c #858283",
+"q>	c #858384",
+"r>	c #8C898B",
+"s>	c #8D8A8B",
+"t>	c #8F8B8D",
+"u>	c #918E90",
+"v>	c #939093",
+"w>	c #9A989A",
+"x>	c #8F8E91",
+"y>	c #747274",
+"z>	c #4F4F51",
+"A>	c #8C8B8C",
+"B>	c #504D58",
+"C>	c #2E3036",
+"D>	c #48484F",
+"E>	c #CBCACB",
+"F>	c #B7B5B9",
+"G>	c #C6C5C7",
+"H>	c #B5B3B6",
+"I>	c #C9C7C8",
+"J>	c #CBC9C9",
+"K>	c #C0BEC0",
+"L>	c #BBB9BB",
+"M>	c #D6D5D6",
+"N>	c #DCDBDC",
+"O>	c #DBDBDB",
+"P>	c #E9E8E8",
+"Q>	c #F4F3F3",
+"R>	c #F3F2F2",
+"S>	c #F1EFF0",
+"T>	c #E2DDE3",
+"U>	c #86798C",
+"V>	c #3B2249",
+"W>	c #32064E",
+"X>	c #DFDCE0",
+"Y>	c #ACA0B3",
+"Z>	c #6E4C83",
+"`>	c #31034D",
+" ,	c #EAE9EA",
+".,	c #3E1359",
+"+,	c #E3E1E4",
+"@,	c #5B3C6E",
+"#,	c #7F698D",
+"$,	c #A191AB",
+"%,	c #AD9FB6",
+"&,	c #C9C0CE",
+"*,	c #F3F3F4",
+"=,	c #B3A6BB",
+"-,	c #694B7D",
+";,	c #876F96",
+">,	c #DEDAE1",
+",,	c #4A2661",
+"',	c #451C5E",
+"),	c #B8ACC0",
+"!,	c #715483",
+"~,	c #360C51",
+"{,	c #432256",
+"],	c #54425E",
+"^,	c #676166",
+"/,	c #72776C",
+"(,	c #767E6E",
+"_,	c #788170",
+":,	c #7A816F",
+"<,	c #7B8270",
+"[,	c #7B8372",
+"},	c #7B8371",
+"|,	c #7D8673",
+"1,	c #7C8673",
+"2,	c #7D8572",
+"3,	c #7D8574",
+"4,	c #7E8675",
+"5,	c #838A78",
+"6,	c #7B7C7A",
+"7,	c #A7A6A9",
+"8,	c #7A787B",
+"9,	c #4F4E50",
+"0,	c #8A888A",
+"a,	c #57555D",
+"b,	c #313238",
+"c,	c #35363B",
+"d,	c #D8D7D8",
+"e,	c #C4C3C5",
+"f,	c #C7C5C8",
+"g,	c #B4B2B5",
+"h,	c #CECDCD",
+"i,	c #DAD8D9",
+"j,	c #F5F5F4",
+"k,	c #DDDBDC",
+"l,	c #DBDADB",
+"m,	c #DFDAE0",
+"n,	c #A699AD",
+"o,	c #432952",
+"p,	c #2F0A47",
+"q,	c #30044C",
+"r,	c #EAE7EB",
+"s,	c #AB9FB2",
+"t,	c #33054F",
+"u,	c #EEEEEE",
+"v,	c #40155B",
+"w,	c #E1DEE2",
+"x,	c #593A6D",
+"y,	c #826D90",
+"z,	c #A89AB1",
+"A,	c #EEEBF0",
+"B,	c #705283",
+"C,	c #C1B7C8",
+"D,	c #6F5381",
+"E,	c #684B7A",
+"F,	c #421B5A",
+"G,	c #5D4070",
+"H,	c #5B3970",
+"I,	c #40185A",
+"J,	c #56326D",
+"K,	c #CEC5D4",
+"L,	c #6F5281",
+"M,	c #E1DCE3",
+"N,	c #462459",
+"O,	c #53405B",
+"P,	c #736E6F",
+"Q,	c #7C8274",
+"R,	c #777F6B",
+"S,	c #7F8773",
+"T,	c #828975",
+"U,	c #79816E",
+"V,	c #7C8370",
+"W,	c #7B826F",
+"X,	c #747B69",
+"Y,	c #717966",
+"Z,	c #727969",
+"`,	c #979F87",
+" '	c #7B8076",
+".'	c #A9A8AB",
+"+'	c #88878A",
+"@'	c #504E50",
+"#'	c #888789",
+"$'	c #5B595C",
+"%'	c #36373C",
+"&'	c #2F3035",
+"*'	c #ADABAF",
+"='	c #DCDCDC",
+"-'	c #DFDFDF",
+";'	c #EEEDED",
+">'	c #F5F4F4",
+",'	c #F6F6F5",
+"''	c #F1F0F0",
+")'	c #C0BEBF",
+"!'	c #B0AFB0",
+"~'	c #DFDEDF",
+"{'	c #F2F2F1",
+"]'	c #E6E5E5",
+"^'	c #AFACAE",
+"/'	c #B8B5B7",
+"('	c #F0EEEF",
+"_'	c #533862",
+":'	c #320C4A",
+"<'	c #2F034C",
+"['	c #ACA0B4",
+"}'	c #6C4A81",
+"|'	c #350852",
+"1'	c #57386B",
+"2'	c #867194",
+"3'	c #AC9EB5",
+"4'	c #AFA0B9",
+"5'	c #624275",
+"6'	c #897297",
+"7'	c #A898B2",
+"8'	c #DCD8DF",
+"9'	c #A594AF",
+"0'	c #806790",
+"a'	c #A697B0",
+"b'	c #DEDAE0",
+"c'	c #C1B6C7",
+"d'	c #512D68",
+"e'	c #E9E7EB",
+"f'	c #5D3E6F",
+"g'	c #492163",
+"h'	c #E2DFE3",
+"i'	c #6E5180",
+"j'	c #360A50",
+"k'	c #401E54",
+"l'	c #513D5A",
+"m'	c #6E686D",
+"n'	c #676B60",
+"o'	c #707967",
+"p'	c #757C69",
+"q'	c #6D7461",
+"r'	c #727967",
+"s'	c #6E7464",
+"t'	c #606757",
+"u'	c #6E7564",
+"v'	c #666E5D",
+"w'	c #757D6C",
+"x'	c #64695B",
+"y'	c #8A927E",
+"z'	c #879079",
+"A'	c #7F8477",
+"B'	c #A9A7AD",
+"C'	c #8B8A8D",
+"D'	c #858487",
+"E'	c #5D5B5E",
+"F'	c #404145",
+"G'	c #838086",
+"H'	c #F7F7F6",
+"I'	c #F0EFEF",
+"J'	c #D7D6D7",
+"K'	c #D3D2D3",
+"L'	c #A8A6A8",
+"M'	c #BFBEBF",
+"N'	c #A4A2A4",
+"O'	c #A9A6A9",
+"P'	c #AAA7AA",
+"Q'	c #918E91",
+"R'	c #969395",
+"S'	c #B6B3B5",
+"T'	c #F0EEF0",
+"U'	c #E1DBE3",
+"V'	c #BBADC3",
+"W'	c #654975",
+"X'	c #350F4D",
+"Y'	c #B0A4B7",
+"Z'	c #5A3471",
+"`'	c #E1DFE3",
+" )	c #58356D",
+".)	c #8B7699",
+"+)	c #AB9DB4",
+"@)	c #A794B3",
+"#)	c #9581A2",
+"$)	c #522E68",
+"%)	c #E0DCE2",
+"&)	c #4E2A65",
+"*)	c #DFDBE2",
+"=)	c #755B86",
+"-)	c #5C3A71",
+";)	c #CAC2CF",
+">)	c #4A2462",
+",)	c #9680A3",
+"')	c #DFDAE1",
+"))	c #775C87",
+"!)	c #66447B",
+"~)	c #6D4D80",
+"{)	c #F9F8F9",
+"])	c #E7E7E7",
+"^)	c #533F5D",
+"/)	c #666166",
+"()	c #6F7369",
+"_)	c #747D6D",
+":)	c #6C7563",
+"<)	c #747C6A",
+"[)	c #747B6B",
+"})	c #656D5C",
+"|)	c #6C7664",
+"1)	c #6F7668",
+"2)	c #6E7465",
+"3)	c #6D7564",
+"4)	c #747E69",
+"5)	c #949E88",
+"6)	c #83887B",
+"7)	c #A9A8AC",
+"8)	c #919194",
+"9)	c #514F51",
+"0)	c #818082",
+"a)	c #626062",
+"b)	c #48494D",
+"c)	c #58535C",
+"d)	c #EBEBEB",
+"e)	c #F6F7F5",
+"f)	c #F8F9F7",
+"g)	c #F6F5F5",
+"h)	c #B0ADB0",
+"i)	c #A29FA1",
+"j)	c #A29FA2",
+"k)	c #ACAAAC",
+"l)	c #A19FA1",
+"m)	c #BAB8BA",
+"n)	c #BBBABB",
+"o)	c #AAA9AB",
+"p)	c #A5A3A5",
+"q)	c #827F82",
+"r)	c #9E9B9E",
+"s)	c #908D91",
+"t)	c #C5C4C6",
+"u)	c #EFEDEF",
+"v)	c #DFD9E1",
+"w)	c #BAABC2",
+"x)	c #755A87",
+"y)	c #381050",
+"z)	c #30034C",
+"A)	c #42195C",
+"B)	c #B4A8BC",
+"C)	c #39114F",
+"D)	c #3D1950",
+"E)	c #3C1750",
+"F)	c #370D4F",
+"G)	c #32054E",
+"H)	c #3A0E55",
+"I)	c #421E58",
+"J)	c #E4E2E6",
+"K)	c #917C9F",
+"L)	c #A798B0",
+"M)	c #B8ADBF",
+"N)	c #C9BFCE",
+"O)	c #E9E7EA",
+"P)	c #4B2662",
+"Q)	c #B6AABE",
+"R)	c #BEB3C5",
+"S)	c #674A7A",
+"T)	c #C5BFCA",
+"U)	c #4A2461",
+"V)	c #BEB4C4",
+"W)	c #5F3E74",
+"X)	c #634576",
+"Y)	c #613F76",
+"Z)	c #775D88",
+"`)	c #D8D3DB",
+" !	c #755986",
+".!	c #B8ACBF",
+"+!	c #A190AD",
+"@!	c #A291AC",
+"#!	c #EAE8EC",
+"$!	c #6E5280",
+"%!	c #E8E8E8",
+"&!	c #31044D",
+"*!	c #370B51",
+"=!	c #442158",
+"-!	c #5A4663",
+";!	c #726D6F",
+">!	c #818577",
+",!	c #8C9380",
+"'!	c #79826F",
+")!	c #808976",
+"!!	c #727B67",
+"~!	c #88907D",
+"{!	c #86907B",
+"]!	c #858F7A",
+"^!	c #868F7B",
+"/!	c #868E7A",
+"(!	c #8A937D",
+"_!	c #8B957E",
+":!	c #9EA78E",
+"<!	c #848B7A",
+"[!	c #A8A7AB",
+"}!	c #7F7E81",
+"|!	c #6A676A",
+"1!	c #515054",
+"2!	c #2C2E33",
+"3!	c #39373E",
+"4!	c #D5D4D6",
+"5!	c #F7F8F6",
+"6!	c #9D9A9D",
+"7!	c #838083",
+"8!	c #A09EA1",
+"9!	c #B5B3B5",
+"0!	c #A09DA0",
+"a!	c #B4B3B5",
+"b!	c #A2A1A2",
+"c!	c #9F9D9F",
+"d!	c #A09EA2",
+"e!	c #A8A6AA",
+"f!	c #A7A4A8",
+"g!	c #EEECEE",
+"h!	c #DCD6DF",
+"i!	c #B6A6BF",
+"j!	c #7C5F8D",
+"k!	c #3E1656",
+"l!	c #BAAEC2",
+"m!	c #2F004D",
+"n!	c #2E0249",
+"o!	c #2A0443",
+"p!	c #2A073F",
+"q!	c #29053F",
+"r!	c #2C0345",
+"s!	c #2F014B",
+"t!	c #3E1856",
+"u!	c #45215C",
+"v!	c #552F6D",
+"w!	c #9983A7",
+"x!	c #A190AB",
+"y!	c #D6D1DA",
+"z!	c #CBC1D1",
+"A!	c #C3B9C9",
+"B!	c #D0C7D6",
+"C!	c #D6D2D9",
+"D!	c #E2E0E3",
+"E!	c #EFECF0",
+"F!	c #F5F4F5",
+"G!	c #B2A4BB",
+"H!	c #816790",
+"I!	c #846C93",
+"J!	c #775B88",
+"K!	c #B1A4BA",
+"L!	c #401859",
+"M!	c #9480A1",
+"N!	c #6E5080",
+"O!	c #3C1256",
+"P!	c #A595AF",
+"Q!	c #AB9BB5",
+"R!	c #45205D",
+"S!	c #B1A4B9",
+"T!	c #EBEAED",
+"U!	c #4F2A67",
+"V!	c #ECECEC",
+"W!	c #360B51",
+"X!	c #432158",
+"Y!	c #726D70",
+"Z!	c #84887A",
+"`!	c #5D6256",
+" ~	c #7E8772",
+".~	c #86907A",
+"+~	c #88917C",
+"@~	c #878F7C",
+"#~	c #8A947E",
+"$~	c #8C9580",
+"%~	c #8B957F",
+"&~	c #8D967E",
+"*~	c #9EA78F",
+"=~	c #838A79",
+"-~	c #A7A5A9",
+";~	c #9A999E",
+">~	c #787779",
+",~	c #6D6B6D",
+"'~	c #59575B",
+")~	c #313137",
+"!~	c #B1ADB2",
+"~~	c #F3F3F2",
+"{~	c #D8D7D7",
+"]~	c #848182",
+"^~	c #989598",
+"/~	c #99979A",
+"(~	c #9A979A",
+"_~	c #B3B1B2",
+":~	c #B1AFB0",
+"<~	c #AAA9AC",
+"[~	c #CAC9CA",
+"}~	c #EEEBEE",
+"|~	c #B1A1BB",
+"1~	c #795B8B",
+"2~	c #31044E",
+"3~	c #624277",
+"4~	c #C2B6C9",
+"5~	c #360E4E",
+"6~	c #421F58",
+"7~	c #3E1954",
+"8~	c #390F53",
+"9~	c #49255F",
+"0~	c #A08DAC",
+"a~	c #9C87AA",
+"b~	c #EAE9EB",
+"c~	c #59366F",
+"d~	c #B7AABF",
+"e~	c #56326C",
+"f~	c #3C1257",
+"g~	c #F8F7F8",
+"h~	c #3A0F55",
+"i~	c #E2DFE5",
+"j~	c #340750",
+"k~	c #614175",
+"l~	c #E1DEE3",
+"m~	c #A38FAF",
+"n~	c #4B2562",
+"o~	c #6B4C7F",
+"p~	c #C7BECC",
+"q~	c #C5BBCB",
+"r~	c #9D8BA9",
+"s~	c #765E85",
+"t~	c #8D799A",
+"u~	c #A897B2",
+"v~	c #BDB1C5",
+"w~	c #360953",
+"x~	c #432058",
+"y~	c #5A4564",
+"z~	c #736D71",
+"A~	c #7B7D72",
+"B~	c #6F7467",
+"C~	c #707767",
+"D~	c #88917D",
+"E~	c #88917E",
+"F~	c #89907C",
+"G~	c #89907D",
+"H~	c #8A927D",
+"I~	c #8C947D",
+"J~	c #8B957D",
+"K~	c #8C957F",
+"L~	c #8A937C",
+"M~	c #9DA78F",
+"N~	c #828977",
+"O~	c #A6A4A8",
+"P~	c #9E9CA0",
+"Q~	c #6F6E70",
+"R~	c #7F7D7C",
+"S~	c #5D5A5D",
+"T~	c #3E3E41",
+"U~	c #868189",
+"V~	c #F4F4F3",
+"W~	c #F8F8F7",
+"X~	c #E9E9E9",
+"Y~	c #8E8A8D",
+"Z~	c #9E9B9D",
+"`~	c #A6A4A6",
+" {	c #A8A6A9",
+".{	c #A6A4A7",
+"+{	c #BBB8BC",
+"@{	c #C9C7CA",
+"#{	c #EDECEC",
+"${	c #DDDBDD",
+"%{	c #D3D0D4",
+"&{	c #C1B9C5",
+"*{	c #9B88A5",
+"={	c #6F5182",
+"-{	c #492062",
+";{	c #32044F",
+">{	c #765A88",
+",{	c #C9BED0",
+"'{	c #300748",
+"){	c #300B47",
+"!{	c #2F0946",
+"~{	c #30054A",
+"{{	c #552E6D",
+"]{	c #786285",
+"^{	c #31064C",
+"/{	c #4C2664",
+"({	c #A799B0",
+"_{	c #907A9D",
+":{	c #866E96",
+"<{	c #A290AD",
+"[{	c #6A4D7C",
+"}{	c #522D69",
+"|{	c #907A9E",
+"1{	c #664A77",
+"2{	c #877494",
+"3{	c #8D779A",
+"4{	c #E0DDE2",
+"5{	c #390D55",
+"6{	c #442059",
+"7{	c #5C4667",
+"8{	c #6C666C",
+"9{	c #797B72",
+"0{	c #8C9383",
+"a{	c #79806F",
+"b{	c #8C9481",
+"c{	c #8B947F",
+"d{	c #89937F",
+"e{	c #8A9480",
+"f{	c #8D9883",
+"g{	c #8E9781",
+"h{	c #8F9882",
+"i{	c #8C9480",
+"j{	c #9FA68D",
+"k{	c #848D79",
+"l{	c #A5A4A8",
+"m{	c #A2A2A6",
+"n{	c #4F4D50",
+"o{	c #6C6B6D",
+"p{	c #A09E9F",
+"q{	c #646163",
+"r{	c #47454B",
+"s{	c #2B2B30",
+"t{	c #5A525C",
+"u{	c #EFEFEE",
+"v{	c #E0DFE0",
+"w{	c #D1CFD1",
+"x{	c #E2E1E1",
+"y{	c #C2BFC3",
+"z{	c #8C8493",
+"A{	c #5D4A6B",
+"B{	c #3B1B50",
+"C{	c #30064A",
+"D{	c #887296",
+"E{	c #F3F1F4",
+"F{	c #BDB3C3",
+"G{	c #33064F",
+"H{	c #370F50",
+"I{	c #3A1652",
+"J{	c #3A1552",
+"K{	c #350C50",
+"L{	c #B6A7BF",
+"M{	c #705183",
+"N{	c #725386",
+"O{	c #705184",
+"P{	c #654878",
+"Q{	c #604372",
+"R{	c #786088",
+"S{	c #B2A3BA",
+"T{	c #A89BB1",
+"U{	c #D3CBD7",
+"V{	c #533069",
+"W{	c #A999B2",
+"X{	c #D3CDD7",
+"Y{	c #C5BBCC",
+"Z{	c #8B749A",
+"`{	c #9783A4",
+" ]	c #F4F4F5",
+".]	c #3D1754",
+"+]	c #3D1953",
+"@]	c #432B50",
+"#]	c #615961",
+"$]	c #707269",
+"%]	c #757B6D",
+"&]	c #62695A",
+"*]	c #757E6B",
+"=]	c #747D69",
+"-]	c #757F6A",
+";]	c #75806C",
+">]	c #717D69",
+",]	c #747C69",
+"']	c #767E6B",
+")]	c #8A917C",
+"!]	c #A7A5AA",
+"~]	c #ABAAAE",
+"{]	c #4D4B4D",
+"]]	c #656466",
+"^]	c #686668",
+"/]	c #514E54",
+"(]	c #2D2D32",
+"_]	c #3D3841",
+":]	c #D5D3D6",
+"<]	c #ADAAAD",
+"[]	c #BDBBBF",
+"}]	c #B1AFB3",
+"|]	c #8E8D91",
+"1]	c #777679",
+"2]	c #4E4B51",
+"3]	c #2E2A31",
+"4]	c #26212B",
+"5]	c #251B2F",
+"6]	c #271337",
+"7]	c #2A0A41",
+"8]	c #2E0449",
+"9]	c #9F8CAA",
+"0]	c #3A1054",
+"a]	c #3B1554",
+"b]	c #390E53",
+"c]	c #330550",
+"d]	c #441C5D",
+"e]	c #411B59",
+"f]	c #D4CFD7",
+"g]	c #CBC7CE",
+"h]	c #C8C2CC",
+"i]	c #CAC0D1",
+"j]	c #C8C3CB",
+"k]	c #CCC7CF",
+"l]	c #D2CED5",
+"m]	c #E9E8EB",
+"n]	c #AFA1B8",
+"o]	c #EEECF0",
+"p]	c #D0C9D4",
+"q]	c #826893",
+"r]	c #C2B8C9",
+"s]	c #3C1156",
+"t]	c #7C608D",
+"u]	c #C3BAC8",
+"v]	c #BFB7C5",
+"w]	c #604074",
+"x]	c #40165A",
+"y]	c #482360",
+"z]	c #350950",
+"A]	c #3C1853",
+"B]	c #4E375B",
+"C]	c #5D555F",
+"D]	c #676964",
+"E]	c #686D62",
+"F]	c #5E6658",
+"G]	c #838B77",
+"H]	c #8A947D",
+"I]	c #8A927C",
+"J]	c #88927B",
+"K]	c #848E78",
+"L]	c #858E79",
+"M]	c #868F79",
+"N]	c #87907B",
+"O]	c #89917B",
+"P]	c #8B937F",
+"Q]	c #A6A4A9",
+"R]	c #B2B1B5",
+"S]	c #48484A",
+"T]	c #5E5D5F",
+"U]	c #E3E2E3",
+"V]	c #6E6B6E",
+"W]	c #585559",
+"X]	c #2E2F34",
+"Y]	c #ACA8AD",
+"Z]	c #EEEEED",
+"`]	c #DBDADC",
+" ^	c #CECDCF",
+".^	c #909093",
+"+^	c #6D6C6F",
+"@^	c #4F4F53",
+"#^	c #2B2830",
+"$^	c #242029",
+"%^	c #201D26",
+"&^	c #1F1C25",
+"*^	c #1F1B24",
+"=^	c #201B25",
+"-^	c #221928",
+";^	c #26152E",
+">^	c #280F37",
+",^	c #2B0941",
+"'^	c #2E044A",
+")^	c #B5A8BE",
+"!^	c #3B1155",
+"~^	c #3B1154",
+"{^	c #401957",
+"]^	c #411A58",
+"^^	c #3A0F54",
+"/^	c #715285",
+"(^	c #3B1553",
+"_^	c #927D9F",
+":^	c #765B87",
+"<^	c #4D2765",
+"[^	c #7E648E",
+"}^	c #BFB3C6",
+"|^	c #E4E1E5",
+"1^	c #E3DEE6",
+"2^	c #DDD9E0",
+"3^	c #401D56",
+"4^	c #5A4465",
+"5^	c #716C71",
+"6^	c #818578",
+"7^	c #89917D",
+"8^	c #77806E",
+"9^	c #7F8776",
+"0^	c #868F78",
+"a^	c #858F79",
+"b^	c #8C937F",
+"c^	c #A8A6AB",
+"d^	c #B8B8BE",
+"e^	c #47474A",
+"f^	c #565457",
+"g^	c #787677",
+"h^	c #5B595D",
+"i^	c #38383E",
+"j^	c #28292C",
+"k^	c #827D84",
+"l^	c #A9A7AA",
+"m^	c #E3E3E3",
+"n^	c #AFAFAF",
+"o^	c #848487",
+"p^	c #565659",
+"q^	c #313236",
+"r^	c #232529",
+"s^	c #212227",
+"t^	c #201F26",
+"u^	c #231D26",
+"v^	c #1D1B24",
+"w^	c #1C1B24",
+"x^	c #1D1A24",
+"y^	c #1E1C24",
+"z^	c #231F2A",
+"A^	c #241E2D",
+"B^	c #251731",
+"C^	c #281036",
+"D^	c #30114B",
+"E^	c #350E55",
+"F^	c #7B618B",
+"G^	c #AD9CB8",
+"H^	c #AD9DB8",
+"I^	c #34074F",
+"J^	c #391052",
+"K^	c #3E1955",
+"L^	c #380F52",
+"M^	c #9885A3",
+"N^	c #A493AE",
+"O^	c #9681A3",
+"P^	c #6E5081",
+"Q^	c #421C5A",
+"R^	c #B6A6C1",
+"S^	c #694A7D",
+"T^	c #8C749C",
+"U^	c #9785A3",
+"V^	c #A090AB",
+"W^	c #A695B0",
+"X^	c #A695B1",
+"Y^	c #A191AC",
+"Z^	c #9887A3",
+"`^	c #90789F",
+" /	c #502B68",
+"./	c #482061",
+"+/	c #9E8BAA",
+"@/	c #B3A2BD",
+"#/	c #9886A2",
+"$/	c #94829F",
+"%/	c #9F8EA9",
+"&/	c #AE9EB9",
+"*/	c #B4A3BE",
+"=/	c #B09FBB",
+"-/	c #A18EAC",
+";/	c #380C52",
+">/	c #380C54",
+",/	c #9882A4",
+"'/	c #856C94",
+")/	c #350651",
+"!/	c #462559",
+"~/	c #5D4B66",
+"{/	c #736F71",
+"]/	c #84897B",
+"^/	c #8D9581",
+"//	c #7A846F",
+"(/	c #8C967F",
+"_/	c #78826F",
+":/	c #838C77",
+"</	c #848F78",
+"[/	c #87907A",
+"}/	c #868F7A",
+"|/	c #8C927F",
+"1/	c #A8A7AC",
+"2/	c #BDBDC2",
+"3/	c #494A4C",
+"4/	c #535255",
+"5/	c #999798",
+"6/	c #5F5C5F",
+"7/	c #434148",
+"8/	c #272829",
+"9/	c #D7D7D8",
+"0/	c #A9A9AB",
+"a/	c #7B797E",
+"b/	c #5C5A5F",
+"c/	c #39373C",
+"d/	c #28252A",
+"e/	c #272229",
+"f/	c #27202A",
+"g/	c #241F27",
+"h/	c #211E26",
+"i/	c #1E1D25",
+"j/	c #1F1D25",
+"k/	c #1F202A",
+"l/	c #2C2A38",
+"m/	c #221D28",
+"n/	c #231F2F",
+"o/	c #45566F",
+"p/	c #657A91",
+"q/	c #7788A4",
+"r/	c #7179A3",
+"s/	c #2E1D42",
+"t/	c #371D57",
+"u/	c #361359",
+"v/	c #320651",
+"w/	c #3B1055",
+"x/	c #47225C",
+"y/	c #523263",
+"z/	c #48235D",
+"A/	c #30014F",
+"B/	c #30024F",
+"C/	c #380954",
+"D/	c #492C59",
+"E/	c #5C4C60",
+"F/	c #6E6C69",
+"G/	c #7C8070",
+"H/	c #838978",
+"I/	c #707865",
+"J/	c #7D8670",
+"K/	c #7B8472",
+"L/	c #616A5A",
+"M/	c #78826D",
+"N/	c #7A836F",
+"O/	c #7A8571",
+"P/	c #7B8671",
+"Q/	c #9BA58D",
+"R/	c #A9A7AC",
+"S/	c #BBBAC0",
+"T/	c #4E4E50",
+"U/	c #525254",
+"V/	c #DCDBDB",
+"W/	c #B7B6B6",
+"X/	c #656366",
+"Y/	c #4D4A52",
+"Z/	c #27292B",
+"`/	c #27292A",
+" (	c #27282A",
+".(	c #262728",
+"+(	c #242527",
+"@(	c #252629",
+"#(	c #252028",
+"$(	c #261F27",
+"%(	c #261D28",
+"&(	c #241F28",
+"*(	c #24252C",
+"=(	c #24232B",
+"-(	c #2E282F",
+";(	c #363341",
+">(	c #475261",
+",(	c #64798D",
+"'(	c #697C9C",
+")(	c #3B3C53",
+"!(	c #3A4056",
+"~(	c #5F7795",
+"{(	c #6E839E",
+"](	c #63718C",
+"^(	c #4C5276",
+"/(	c #2B1C3D",
+"((	c #280F3B",
+"_(	c #2B0A46",
+":(	c #32044E",
+"<(	c #370A52",
+"[(	c #47215D",
+"}(	c #593A68",
+"|(	c #695173",
+"1(	c #6B5373",
+"2(	c #5D3F6B",
+"3(	c #4B265F",
+"4(	c #3F1557",
+"5(	c #390C54",
+"6(	c #370A53",
+"7(	c #31024D",
+"8(	c #2F004C",
+"9(	c #30034F",
+"0(	c #300351",
+"a(	c #300451",
+"b(	c #2F0451",
+"c(	c #2F0551",
+"d(	c #2F0552",
+"e(	c #300452",
+"f(	c #310552",
+"g(	c #390A55",
+"h(	c #451B5F",
+"i(	c #3D1358",
+"j(	c #370C53",
+"k(	c #340851",
+"l(	c #31054D",
+"m(	c #360C50",
+"n(	c #3A1153",
+"o(	c #421C58",
+"p(	c #4E2F60",
+"q(	c #614C6A",
+"r(	c #6D636D",
+"s(	c #646361",
+"t(	c #74796B",
+"u(	c #73796A",
+"v(	c #7B836F",
+"w(	c #949C86",
+"x(	c #959E8A",
+"y(	c #697361",
+"z(	c #949D88",
+"A(	c #959D86",
+"B(	c #939C86",
+"C(	c #929D86",
+"D(	c #939D86",
+"E(	c #9CA58D",
+"F(	c #8A927F",
+"G(	c #BEBDC3",
+"H(	c #535356",
+"I(	c #CFCFCF",
+"J(	c #6D6A6C",
+"K(	c #535256",
+"L(	c #282B2F",
+"M(	c #252427",
+"N(	c #252428",
+"O(	c #262629",
+"P(	c #202427",
+"Q(	c #232229",
+"R(	c #302A31",
+"S(	c #2E2C30",
+"T(	c #3E4758",
+"U(	c #4D5C72",
+"V(	c #5B6F84",
+"W(	c #3D475A",
+"X(	c #2D303D",
+"Y(	c #607A96",
+"Z(	c #7D92AB",
+"`(	c #8594AD",
+" _	c #65789E",
+"._	c #3E465E",
+"+_	c #1F1D2B",
+"@_	c #262D41",
+"#_	c #1B2134",
+"$_	c #191E2A",
+"%_	c #1E1D2B",
+"&_	c #31283D",
+"*_	c #402D50",
+"=_	c #442E5E",
+"-_	c #42215D",
+";_	c #3B1455",
+">_	c #370E52",
+",_	c #390F54",
+"'_	c #31074B",
+")_	c #2E0448",
+"!_	c #3D1456",
+"~_	c #3E1657",
+"{_	c #421A5A",
+"]_	c #451E5C",
+"^_	c #4C2960",
+"/_	c #5D3F6A",
+"(_	c #725D77",
+"__	c #827481",
+":_	c #827582",
+"<_	c #79667C",
+"[_	c #64496F",
+"}_	c #533264",
+"|_	c #46215C",
+"1_	c #451D5B",
+"2_	c #411859",
+"3_	c #3F1856",
+"4_	c #46205C",
+"5_	c #47215C",
+"6_	c #441E5A",
+"7_	c #461F5C",
+"8_	c #401858",
+"9_	c #42195A",
+"0_	c #411759",
+"a_	c #401758",
+"b_	c #3F1658",
+"c_	c #3F1657",
+"d_	c #3B1253",
+"e_	c #3B1254",
+"f_	c #3B1355",
+"g_	c #2F0649",
+"h_	c #32074C",
+"i_	c #32084C",
+"j_	c #2B0245",
+"k_	c #340B4E",
+"l_	c #3D1556",
+"m_	c #3F1757",
+"n_	c #330B4D",
+"o_	c #2F0951",
+"p_	c #300B57",
+"q_	c #33094E",
+"r_	c #2E074F",
+"s_	c #310C58",
+"t_	c #310D59",
+"u_	c #300E5A",
+"v_	c #2F0F5A",
+"w_	c #2E115B",
+"x_	c #2D105A",
+"y_	c #2D0F59",
+"z_	c #2F0D58",
+"A_	c #310D58",
+"B_	c #320B53",
+"C_	c #370D52",
+"D_	c #340A4E",
+"E_	c #360C4F",
+"F_	c #380E4F",
+"G_	c #613C78",
+"H_	c #4A2165",
+"I_	c #623D79",
+"J_	c #9C85AA",
+"K_	c #9177A1",
+"L_	c #4A2164",
+"M_	c #461F5F",
+"N_	c #431F5C",
+"O_	c #3E1C56",
+"P_	c #37174F",
+"Q_	c #381751",
+"R_	c #371451",
+"S_	c #371251",
+"T_	c #361150",
+"U_	c #3C1754",
+"V_	c #34104C",
+"W_	c #300C47",
+"X_	c #37134E",
+"Y_	c #3E1B52",
+"Z_	c #3F1E53",
+"`_	c #432454",
+" :	c #492E57",
+".:	c #55415E",
+"+:	c #635866",
+"@:	c #73706E",
+"#:	c #7F8375",
+"$:	c #858C78",
+"%:	c #888F7B",
+"&:	c #8B907B",
+"*:	c #878D7A",
+"=:	c #848A79",
+"-:	c #818877",
+";:	c #7A8270",
+">:	c #6F7866",
+",:	c #69705F",
+"':	c #646B5C",
+"):	c #5C6356",
+"!:	c #51554E",
+"~:	c #ACAAB0",
+"{:	c #BDBCC3",
+"]:	c #575759",
+"^:	c #484849",
+"/:	c #C5C4C4",
+"(:	c #726F71",
+"_:	c #59585B",
+"::	c #2A282D",
+"<:	c #322D30",
+"[:	c #23232B",
+"}:	c #282E3C",
+"|:	c #3D4A59",
+"1:	c #3B4454",
+"2:	c #27262E",
+"3:	c #5E7386",
+"4:	c #758DA8",
+"5:	c #98A7BF",
+"6:	c #6C8AAC",
+"7:	c #586888",
+"8:	c #1C1F2B",
+"9:	c #39445D",
+"0:	c #2E364F",
+"a:	c #222337",
+"b:	c #201E2C",
+"c:	c #231E29",
+"d:	c #231A25",
+"e:	c #24202A",
+"f:	c #35343B",
+"g:	c #4A494F",
+"h:	c #5F606D",
+"i:	c #6A7791",
+"j:	c #697393",
+"k:	c #756E94",
+"l:	c #4F487A",
+"m:	c #4E3D75",
+"n:	c #3D1E56",
+"o:	c #3F205A",
+"p:	c #43235B",
+"q:	c #46255B",
+"r:	c #49285E",
+"s:	c #3B194E",
+"t:	c #2B0A3E",
+"u:	c #503462",
+"v:	c #4D315F",
+"w:	c #523662",
+"x:	c #563B65",
+"y:	c #5C4668",
+"z:	c #6A596F",
+"A:	c #837981",
+"B:	c #858280",
+"C:	c #8B8985",
+"D:	c #7C757A",
+"E:	c #7D6F7D",
+"F:	c #6C5873",
+"G:	c #5B4467",
+"H:	c #5A3E66",
+"I:	c #5A3C68",
+"J:	c #5A3C69",
+"K:	c #533562",
+"L:	c #5C416B",
+"M:	c #533962",
+"N:	c #61486D",
+"O:	c #5F476C",
+"P:	c #644C70",
+"Q:	c #644A71",
+"R:	c #583C66",
+"S:	c #5E406B",
+"T:	c #5D3E6B",
+"U:	c #523462",
+"V:	c #553764",
+"W:	c #5B3D69",
+"X:	c #5B3C69",
+"Y:	c #5B3D6A",
+"Z:	c #5C3D6A",
+"`:	c #553663",
+" <	c #553865",
+".<	c #4D2E5E",
+"+<	c #4D3361",
+"@<	c #2D0F41",
+"#<	c #321146",
+"$<	c #321246",
+"%<	c #230437",
+"&<	c #351549",
+"*<	c #290A3C",
+"=<	c #270939",
+"-<	c #260A38",
+";<	c #270B39",
+"><	c #391A4C",
+",<	c #2E1754",
+"'<	c #2C1A62",
+")<	c #2D1961",
+"!<	c #39184E",
+"~<	c #2C1452",
+"{<	c #3C276D",
+"]<	c #4A3477",
+"^<	c #50397B",
+"/<	c #443377",
+"(<	c #352B71",
+"_<	c #2C266D",
+":<	c #2A236A",
+"<<	c #2A2067",
+"[<	c #2B1D64",
+"}<	c #2D1D65",
+"|<	c #2D1757",
+"1<	c #432257",
+"2<	c #3A194D",
+"3<	c #401F51",
+"4<	c #422150",
+"5<	c #947BA3",
+"6<	c #967EA5",
+"7<	c #704F85",
+"8<	c #704E84",
+"9<	c #9278A2",
+"0<	c #B7A6C2",
+"a<	c #6B507E",
+"b<	c #523467",
+"c<	c #3E1F55",
+"d<	c #381950",
+"e<	c #3A1D52",
+"f<	c #3C2352",
+"g<	c #3E2853",
+"h<	c #3F2A53",
+"i<	c #3F2954",
+"j<	c #3F2756",
+"k<	c #40275B",
+"l<	c #3E2556",
+"m<	c #432A59",
+"n<	c #432A52",
+"o<	c #301840",
+"p<	c #3B244B",
+"q<	c #60486F",
+"r<	c #5A4367",
+"s<	c #5B4568",
+"t<	c #5C4868",
+"u<	c #5F4D69",
+"v<	c #64556C",
+"w<	c #675E6C",
+"x<	c #69656B",
+"y<	c #6A696B",
+"z<	c #676768",
+"A<	c #666667",
+"B<	c #666566",
+"C<	c #676767",
+"D<	c #686868",
+"E<	c #6A6B69",
+"F<	c #6C6D6B",
+"G<	c #727373",
+"H<	c #767777",
+"I<	c #7B7B7C",
+"J<	c #848484",
+"K<	c #8B8D89",
+"L<	c #828281",
+"M<	c #AAA9AE",
+"N<	c #5D5D60",
+"O<	c #454445",
+"P<	c #BFBFBF",
+"Q<	c #5E5C5F",
+"R<	c #3E3F43",
+"S<	c #565F6C",
+"T<	c #61768F",
+"U<	c #9AABC5",
+"V<	c #708DAB",
+"W<	c #728AAA",
+"X<	c #1D1F29",
+"Y<	c #454F67",
+"Z<	c #3F4B68",
+"`<	c #323850",
+" [	c #22263B",
+".[	c #25212F",
+"+[	c #211B26",
+"@[	c #1B1C25",
+"#[	c #211B25",
+"$[	c #27202C",
+"%[	c #332E38",
+"&[	c #443D46",
+"*[	c #565058",
+"=[	c #646165",
+"-[	c #69676A",
+";[	c #5E6A81",
+">[	c #6C8FA4",
+",[	c #7D8FA9",
+"'[	c #7C85A4",
+")[	c #626D96",
+"![	c #534E78",
+"~[	c #453966",
+"{[	c #4C4678",
+"][	c #4E4879",
+"^[	c #524368",
+"/[	c #624D6F",
+"([	c #422D4D",
+"_[	c #261230",
+":[	c #6C6073",
+"<[	c #706475",
+"[[	c #847586",
+"}[	c #7F7380",
+"|[	c #766F77",
+"1[	c #8C8787",
+"2[	c #92928A",
+"3[	c #9FA293",
+"4[	c #9FA494",
+"5[	c #95978B",
+"6[	c #97938C",
+"7[	c #8D8688",
+"8[	c #887E87",
+"9[	c #877B87",
+"0[	c #7C6F7E",
+"a[	c #756779",
+"b[	c #7C6E7E",
+"c[	c #766879",
+"d[	c #7C707F",
+"e[	c #675D6B",
+"f[	c #716974",
+"g[	c #79717A",
+"h[	c #7A727B",
+"i[	c #877C87",
+"j[	c #766878",
+"k[	c #837383",
+"l[	c #7E6E80",
+"m[	c #5F5165",
+"n[	c #5F5065",
+"o[	c #7F6F81",
+"p[	c #7E6F80",
+"q[	c #7E6F81",
+"r[	c #7B6D7F",
+"s[	c #736576",
+"t[	c #807081",
+"u[	c #756778",
+"v[	c #665C71",
+"w[	c #2A1B37",
+"x[	c #321D3D",
+"y[	c #301D3B",
+"z[	c #180823",
+"A[	c #3D2A49",
+"B[	c #3B2947",
+"C[	c #3A2843",
+"D[	c #3A2A44",
+"E[	c #3E2E48",
+"F[	c #4A3955",
+"G[	c #44304E",
+"H[	c #573F4E",
+"I[	c #675051",
+"J[	c #503A56",
+"K[	c #2D234F",
+"L[	c #464682",
+"M[	c #736DA2",
+"N[	c #867FAC",
+"O[	c #807BAB",
+"P[	c #59609B",
+"Q[	c #334487",
+"R[	c #293B7E",
+"S[	c #263578",
+"T[	c #273275",
+"U[	c #263174",
+"V[	c #2D2553",
+"W[	c #513C5D",
+"X[	c #45304E",
+"Y[	c #4B3552",
+"Z[	c #4E3852",
+"`[	c #C9BCD1",
+" }	c #A894B5",
+".}	c #A792B4",
+"+}	c #A893B4",
+"@}	c #E3E0E7",
+"#}	c #B8B3BD",
+"$}	c #756F7D",
+"%}	c #534960",
+"&}	c #40334F",
+"*}	c #413152",
+"=}	c #412E54",
+"-}	c #3F2C53",
+";}	c #402D53",
+">}	c #412F54",
+",}	c #433556",
+"'}	c #463A5B",
+")}	c #473C5A",
+"!}	c #483F5E",
+"~}	c #463A5A",
+"{}	c #46395B",
+"]}	c #443958",
+"^}	c #433554",
+"/}	c #5D5269",
+"(}	c #302539",
+"_}	c #41364A",
+":}	c #655A6F",
+"<}	c #675F6E",
+"[}	c #6D6772",
+"}}	c #6D6571",
+"|}	c #786E7E",
+"1}	c #828085",
+"2}	c #939792",
+"3}	c #92998F",
+"4}	c #959992",
+"5}	c #89878C",
+"6}	c #919296",
+"7}	c #989D96",
+"8}	c #98A096",
+"9}	c #848283",
+"0}	c #949B91",
+"a}	c #969E93",
+"b}	c #8F948C",
+"c}	c #848781",
+"d}	c #888686",
+"e}	c #90948D",
+"f}	c #879185",
+"g}	c #989997",
+"h}	c #AAA9AF",
+"i}	c #606063",
+"j}	c #434345",
+"k}	c #BDBCBC",
+"l}	c #AFADAE",
+"m}	c #4A494D",
+"n}	c #282A2D",
+"o}	c #4D5B72",
+"p}	c #50617E",
+"q}	c #4A5570",
+"r}	c #384054",
+"s}	c #333245",
+"t}	c #212127",
+"u}	c #211D28",
+"v}	c #22212A",
+"w}	c #282932",
+"x}	c #322E37",
+"y}	c #3A353F",
+"z}	c #473E49",
+"A}	c #504D52",
+"B}	c #5B565D",
+"C}	c #635C63",
+"D}	c #626064",
+"E}	c #616066",
+"F}	c #67666A",
+"G}	c #636064",
+"H}	c #666772",
+"I}	c #7E879D",
+"J}	c #595D74",
+"K}	c #48526E",
+"L}	c #505F7A",
+"M}	c #525B79",
+"N}	c #4E506B",
+"O}	c #555060",
+"P}	c #4D4E6F",
+"Q}	c #646F90",
+"R}	c #898AA7",
+"S}	c #5E6084",
+"T}	c #716778",
+"U}	c #5E5463",
+"V}	c #211824",
+"W}	c #848683",
+"X}	c #8C8B86",
+"Y}	c #A3A09A",
+"Z}	c #8F8F89",
+"`}	c #9A9B91",
+" |	c #9EA092",
+".|	c #A1A795",
+"+|	c #A9B09A",
+"@|	c #A0A894",
+"#|	c #818A7B",
+"$|	c #808576",
+"%|	c #999C8E",
+"&|	c #9A9B90",
+"*|	c #93928C",
+"=|	c #94938C",
+"-|	c #98948F",
+";|	c #979490",
+">|	c #7A7B77",
+",|	c #747670",
+"'|	c #6E726B",
+")|	c #A2A498",
+"!|	c #A1A397",
+"~|	c #9EA095",
+"{|	c #909189",
+"]|	c #7E7F7A",
+"^|	c #8E8E87",
+"/|	c #757773",
+"(|	c #7C7C78",
+"_|	c #626261",
+":|	c #777673",
+"<|	c #8B8984",
+"[|	c #93918C",
+"}|	c #8E8C89",
+"||	c #9C9B95",
+"1|	c #9F9B95",
+"2|	c #8F8D88",
+"3|	c #7A7777",
+"4|	c #797F7C",
+"5|	c #28262D",
+"6|	c #2C2330",
+"7|	c #2B2430",
+"8|	c #0F0B13",
+"9|	c #453D4B",
+"0|	c #3A3340",
+"a|	c #403945",
+"b|	c #423C47",
+"c|	c #47414C",
+"d|	c #504854",
+"e|	c #454154",
+"f|	c #6E6C6F",
+"g|	c #7F786D",
+"h|	c #544C58",
+"i|	c #383345",
+"j|	c #223767",
+"k|	c #213466",
+"l|	c #2B4076",
+"m|	c #AFB4CF",
+"n|	c #9AA6CC",
+"o|	c #536FAA",
+"p|	c #365896",
+"q|	c #2F4A7D",
+"r|	c #223968",
+"s|	c #213867",
+"t|	c #3D3647",
+"u|	c #584E5C",
+"v|	c #4D414D",
+"w|	c #544853",
+"x|	c #564952",
+"y|	c #DBD2E0",
+"z|	c #D8CFDE",
+"A|	c #DAD2E0",
+"B|	c #E3DCE7",
+"C|	c #E2DDE6",
+"D|	c #B9B6BE",
+"E|	c #89888E",
+"F|	c #64646B",
+"G|	c #484751",
+"H|	c #41414E",
+"I|	c #40454E",
+"J|	c #3D454D",
+"K|	c #423F51",
+"L|	c #453D54",
+"M|	c #463D55",
+"N|	c #453B54",
+"O|	c #453C55",
+"P|	c #484259",
+"Q|	c #5D586A",
+"R|	c #A5A3AC",
+"S|	c #BEBBC2",
+"T|	c #BCB8BF",
+"U|	c #696474",
+"V|	c #484158",
+"W|	c #484159",
+"X|	c #504D5E",
+"Y|	c #3D3B44",
+"Z|	c #635E65",
+"`|	c #59555C",
+" 1	c #4F4B52",
+".1	c #615E62",
+"+1	c #736F74",
+"@1	c #6B6A6B",
+"#1	c #5C5D5E",
+"$1	c #5A5A5B",
+"%1	c #797B77",
+"&1	c #7C7E7B",
+"*1	c #6F6E6E",
+"=1	c #606060",
+"-1	c #61625F",
+";1	c #6A6969",
+">1	c #5A5B5B",
+",1	c #5B5D5C",
+"'1	c #7B797A",
+")1	c #777576",
+"!1	c #69686A",
+"~1	c #666567",
+"{1	c #616062",
+"]1	c #ACABB0",
+"^1	c #BBBAC1",
+"/1	c #626264",
+"(1	c #444345",
+"_1	c #BBBBBB",
+":1	c #CDCCCD",
+"<1	c #6C6A6C",
+"[1	c #535257",
+"}1	c #373739",
+"|1	c #28272E",
+"11	c #2E2A34",
+"21	c #35313C",
+"31	c #3E3E45",
+"41	c #4B464F",
+"51	c #534E57",
+"61	c #58535D",
+"71	c #5C5861",
+"81	c #5D5A62",
+"91	c #5E5B62",
+"01	c #605C63",
+"a1	c #625E62",
+"b1	c #787575",
+"c1	c #827E7A",
+"d1	c #6D7381",
+"e1	c #6D8192",
+"f1	c #747C91",
+"g1	c #636066",
+"h1	c #6F7992",
+"i1	c #94A7CE",
+"j1	c #8A99BA",
+"k1	c #6C7086",
+"l1	c #76716F",
+"m1	c #7E7D76",
+"n1	c #67696D",
+"o1	c #61646A",
+"p1	c #474D65",
+"q1	c #5F7291",
+"r1	c #7482A1",
+"s1	c #617094",
+"t1	c #69656E",
+"u1	c #79747B",
+"v1	c #373436",
+"w1	c #919B8B",
+"x1	c #9DA292",
+"y1	c #B0B3A1",
+"z1	c #A8AE9B",
+"A1	c #9EA691",
+"B1	c #ACB29B",
+"C1	c #ABB09B",
+"D1	c #B4BAA4",
+"E1	c #B4BBA4",
+"F1	c #9AA38B",
+"G1	c #9FA58E",
+"H1	c #ADB39C",
+"I1	c #9EA48F",
+"J1	c #ADB19C",
+"K1	c #A6A997",
+"L1	c #ADB19D",
+"M1	c #AEB3A1",
+"N1	c #989F8D",
+"O1	c #919886",
+"P1	c #747E6D",
+"Q1	c #B0B6A1",
+"R1	c #ADB39E",
+"S1	c #AEB49F",
+"T1	c #B2B8A3",
+"U1	c #999D8C",
+"V1	c #B1B5A1",
+"W1	c #74776C",
+"X1	c #858B7D",
+"Y1	c #878E7C",
+"Z1	c #798073",
+"`1	c #ADB39D",
+" 2	c #969D8A",
+".2	c #AFB2A0",
+"+2	c #9DA28F",
+"@2	c #868B7D",
+"#2	c #839283",
+"$2	c #262B28",
+"%2	c #272528",
+"&2	c #252426",
+"*2	c #080B09",
+"=2	c #3D3B3E",
+"-2	c #434244",
+";2	c #59575A",
+">2	c #676568",
+",2	c #454245",
+"'2	c #2E4467",
+")2	c #3E619C",
+"!2	c #395C9A",
+"~2	c #506B9D",
+"{2	c #56535A",
+"]2	c #273A55",
+"^2	c #2C518A",
+"/2	c #264778",
+"(2	c #B4C2DA",
+"_2	c #B7C7E2",
+":2	c #869FCD",
+"<2	c #587AB0",
+"[2	c #3E6095",
+"}2	c #2D5185",
+"|2	c #27354E",
+"12	c #595459",
+"22	c #504C51",
+"32	c #5E565A",
+"42	c #575153",
+"52	c #5A5151",
+"62	c #E8E6EA",
+"72	c #BDBBC0",
+"82	c #939198",
+"92	c #6B6A73",
+"02	c #464853",
+"a2	c #3B3C49",
+"b2	c #3B3E49",
+"c2	c #40424C",
+"d2	c #3C454A",
+"e2	c #3D444B",
+"f2	c #454552",
+"g2	c #434751",
+"h2	c #484C58",
+"i2	c #505A6B",
+"j2	c #565564",
+"k2	c #494558",
+"l2	c #484355",
+"m2	c #474354",
+"n2	c #494854",
+"o2	c #D0D1D6",
+"p2	c #696774",
+"q2	c #4B4859",
+"r2	c #514E5F",
+"s2	c #4A475A",
+"t2	c #626169",
+"u2	c #4B4D4E",
+"v2	c #6A686C",
+"w2	c #A09FA3",
+"x2	c #626065",
+"y2	c #6F6E6F",
+"z2	c #757372",
+"A2	c #737172",
+"B2	c #908F92",
+"C2	c #666467",
+"D2	c #656463",
+"E2	c #6B6B6A",
+"F2	c #7D7B7D",
+"G2	c #89888A",
+"H2	c #656467",
+"I2	c #60605E",
+"J2	c #8E8C90",
+"K2	c #6A686A",
+"L2	c #696869",
+"M2	c #5C5B5D",
+"N2	c #A5A3A6",
+"O2	c #959396",
+"P2	c #5E5D62",
+"Q2	c #AAA9AD",
+"R2	c #434344",
+"S2	c #B9B9B9",
+"T2	c #727071",
+"U2	c #5B585B",
+"V2	c #59575C",
+"W2	c #5B5860",
+"X2	c #5B5861",
+"Y2	c #5C5961",
+"Z2	c #5D5B5F",
+"`2	c #5D5B61",
+" 3	c #626066",
+".3	c #6C6970",
+"+3	c #67656C",
+"@3	c #656369",
+"#3	c #625F63",
+"$3	c #626977",
+"%3	c #778CA3",
+"&3	c #8C9EB5",
+"*3	c #99A9C0",
+"=3	c #7E96BD",
+"-3	c #6A6B79",
+";3	c #68748E",
+">3	c #AEBEDC",
+",3	c #AAB3CA",
+"'3	c #7887A5",
+")3	c #767372",
+"!3	c #8F8A7B",
+"~3	c #676668",
+"{3	c #6B7076",
+"]3	c #474A53",
+"^3	c #4D5977",
+"/3	c #5C7092",
+"(3	c #5B6A88",
+"_3	c #68696D",
+":3	c #827F84",
+"<3	c #575555",
+"[3	c #9BA591",
+"}3	c #A2AA94",
+"|3	c #B5BCA6",
+"13	c #979D89",
+"23	c #AFB69E",
+"33	c #B8BEA4",
+"43	c #B4B9A1",
+"53	c #B3B8A1",
+"63	c #B3B8A0",
+"73	c #9FA78F",
+"83	c #AEB39A",
+"93	c #B1B69D",
+"03	c #B4B8A2",
+"a3	c #B4B9A2",
+"b3	c #B3B9A2",
+"c3	c #A4AD95",
+"d3	c #B4BAA2",
+"e3	c #AAB29C",
+"f3	c #75816D",
+"g3	c #B2BBA3",
+"h3	c #B0B8A1",
+"i3	c #B5BCA4",
+"j3	c #9EA58F",
+"k3	c #98A18A",
+"l3	c #A7AE97",
+"m3	c #A1A991",
+"n3	c #B2B7A0",
+"o3	c #B5BAA2",
+"p3	c #8B917F",
+"q3	c #869682",
+"r3	c #262D26",
+"s3	c #212121",
+"t3	c #202220",
+"u3	c #060A06",
+"v3	c #3C3A3B",
+"w3	c #333433",
+"x3	c #323232",
+"y3	c #2C2C2C",
+"z3	c #272826",
+"A3	c #434243",
+"B3	c #344867",
+"C3	c #7B94B7",
+"D3	c #728AB0",
+"E3	c #768FB2",
+"F3	c #495265",
+"G3	c #605D63",
+"H3	c #2A4059",
+"I3	c #244A7C",
+"J3	c #5979A6",
+"K3	c #7D97BF",
+"L3	c #6888B8",
+"M3	c #3D669C",
+"N3	c #29538A",
+"O3	c #22374E",
+"P3	c #4F4E4F",
+"Q3	c #5E5C5D",
+"R3	c #4F4D4E",
+"S3	c #605B5B",
+"T3	c #585252",
+"U3	c #57504C",
+"V3	c #CDCDCF",
+"W3	c #A3A3A6",
+"X3	c #78787E",
+"Y3	c #4E4E55",
+"Z3	c #5D5D62",
+"`3	c #78797F",
+" 4	c #5A5D64",
+".4	c #383846",
+"+4	c #3B424B",
+"@4	c #43464F",
+"#4	c #43434F",
+"$4	c #3C424A",
+"%4	c #3E414C",
+"&4	c #3F4650",
+"*4	c #444450",
+"=4	c #71747F",
+"-4	c #B9BBC1",
+";4	c #D6D7DA",
+">4	c #9B99A1",
+",4	c #484555",
+"'4	c #494757",
+")4	c #434251",
+"!4	c #74747B",
+"~4	c #797A7F",
+"{4	c #5C5B63",
+"]4	c #464553",
+"^4	c #4B485B",
+"/4	c #8F8F96",
+"(4	c #BFBFC3",
+"_4	c #666571",
+":4	c #585666",
+"<4	c #5F6162",
+"[4	c #5C5B5F",
+"}4	c #747174",
+"|4	c #605F60",
+"14	c #757474",
+"24	c #838280",
+"34	c #666466",
+"44	c #888689",
+"54	c #6B696C",
+"64	c #7A7978",
+"74	c #757473",
+"84	c #7B797C",
+"94	c #8C898D",
+"04	c #666565",
+"a4	c #858385",
+"b4	c #8A878B",
+"c4	c #6A686B",
+"d4	c #6D6C6E",
+"e4	c #767476",
+"f4	c #ADABB1",
+"g4	c #BCBBC2",
+"h4	c #67686A",
+"i4	c #444344",
+"j4	c #B8B7B8",
+"k4	c #5F5C5E",
+"l4	c #58565A",
+"m4	c #5B585C",
+"n4	c #5D5A5E",
+"o4	c #626265",
+"p4	c #676160",
+"q4	c #6D6861",
+"r4	c #605E61",
+"s4	c #636166",
+"t4	c #7D7B81",
+"u4	c #7B7B81",
+"v4	c #858389",
+"w4	c #626063",
+"x4	c #4F566A",
+"y4	c #667E99",
+"z4	c #7790AA",
+"A4	c #6F7F9C",
+"B4	c #637192",
+"C4	c #5F616E",
+"D4	c #505164",
+"E4	c #8CA1C9",
+"F4	c #96A7CB",
+"G4	c #7D88A7",
+"H4	c #6B696F",
+"I4	c #7F888D",
+"J4	c #6D8194",
+"K4	c #6A869B",
+"L4	c #688699",
+"M4	c #55627A",
+"N4	c #41465D",
+"O4	c #545563",
+"P4	c #7E7B7F",
+"Q4	c #9BA690",
+"R4	c #8B947E",
+"S4	c #97A08A",
+"T4	c #8B927D",
+"U4	c #ACB39A",
+"V4	c #A3AA92",
+"W4	c #A2A991",
+"X4	c #A0A68F",
+"Y4	c #A0A890",
+"Z4	c #8F9982",
+"`4	c #9CA38A",
+" 5	c #969D88",
+".5	c #9FA590",
+"+5	c #9FA68F",
+"@5	c #A0A891",
+"#5	c #9AA08D",
+"$5	c #9FA792",
+"%5	c #B1BBA2",
+"&5	c #B6BDA5",
+"*5	c #9AA28D",
+"=5	c #838977",
+"-5	c #777F70",
+";5	c #556152",
+">5	c #858F7C",
+",5	c #7D8772",
+"'5	c #919A87",
+")5	c #818A78",
+"!5	c #6F7966",
+"~5	c #6A7562",
+"{5	c #8C947E",
+"]5	c #A3A993",
+"^5	c #B6BCA2",
+"/5	c #A4AB93",
+"(5	c #8D9380",
+"_5	c #899A85",
+":5	c #262D27",
+"<5	c #181A18",
+"[5	c #050A05",
+"}5	c #313030",
+"|5	c #2D2D2E",
+"15	c #37352D",
+"25	c #313231",
+"35	c #2A4365",
+"45	c #2F5692",
+"55	c #4C6A9D",
+"65	c #3A5F99",
+"75	c #3E4A5E",
+"85	c #5A585C",
+"95	c #383D46",
+"05	c #152A40",
+"a5	c #142C4B",
+"b5	c #132B49",
+"c5	c #182B3D",
+"d5	c #3D4147",
+"e5	c #585556",
+"f5	c #5D5B5C",
+"g5	c #5A5453",
+"h5	c #58504C",
+"i5	c #D9D9DB",
+"j5	c #ACACB0",
+"k5	c #78777F",
+"l5	c #42424B",
+"m5	c #52545E",
+"n5	c #767B82",
+"o5	c #A0A5A9",
+"p5	c #D5D5D5",
+"q5	c #D9D8D8",
+"r5	c #E8E8E7",
+"s5	c #75757C",
+"t5	c #3A3F49",
+"u5	c #464454",
+"v5	c #3F414B",
+"w5	c #4E5E6F",
+"x5	c #637698",
+"y5	c #7092B5",
+"z5	c #444957",
+"A5	c #66656B",
+"B5	c #E6E6E5",
+"C5	c #E3E5E8",
+"D5	c #DBDCDE",
+"E5	c #4F4D59",
+"F5	c #686777",
+"G5	c #7C7D85",
+"H5	c #4A4857",
+"I5	c #4A4958",
+"J5	c #494657",
+"K5	c #484657",
+"L5	c #7E7E85",
+"M5	c #BCBBBF",
+"N5	c #BBBBC0",
+"O5	c #4D4B60",
+"P5	c #696771",
+"Q5	c #757477",
+"R5	c #5E5E5F",
+"S5	c #68676A",
+"T5	c #747375",
+"U5	c #757476",
+"V5	c #717170",
+"W5	c #797878",
+"X5	c #807F7F",
+"Y5	c #6C6C6C",
+"Z5	c #5F5F60",
+"`5	c #666666",
+" 6	c #7D7B7C",
+".6	c #81807F",
+"+6	c #605E5F",
+"@6	c #6D6C6C",
+"#6	c #787A75",
+"$6	c #7B7B79",
+"%6	c #6F6D6E",
+"&6	c #8C8B8B",
+"*6	c #B0AFB5",
+"=6	c #676769",
+"-6	c #B6B5B6",
+";6	c #A5A2A3",
+">6	c #646264",
+",6	c #585659",
+"'6	c #6A665C",
+")6	c #B1AB74",
+"!6	c #D1CA83",
+"~6	c #EAE28F",
+"{6	c #F0E992",
+"]6	c #868167",
+"^6	c #5F5F63",
+"/6	c #757377",
+"(6	c #7D7B82",
+"_6	c #8C8B90",
+":6	c #79777D",
+"<6	c #58575C",
+"[6	c #525159",
+"}6	c #444B66",
+"|6	c #545761",
+"16	c #7C7666",
+"26	c #7E7A71",
+"36	c #626068",
+"46	c #5B575C",
+"56	c #505A77",
+"66	c #7C8EB2",
+"76	c #677088",
+"86	c #63768A",
+"96	c #658EA1",
+"06	c #91A1B5",
+"a6	c #95A6BB",
+"b6	c #638A9F",
+"c6	c #6B8098",
+"d6	c #565861",
+"e6	c #6C6B6F",
+"f6	c #706E71",
+"g6	c #7A777A",
+"h6	c #9FA896",
+"i6	c #A1A992",
+"j6	c #B8BFA7",
+"k6	c #B5BBA3",
+"l6	c #B1B79F",
+"m6	c #929B84",
+"n6	c #B4BBA3",
+"o6	c #ACB49C",
+"p6	c #B8BFA4",
+"q6	c #BABFA6",
+"r6	c #969D87",
+"s6	c #AFB7A0",
+"t6	c #B2BAA0",
+"u6	c #AAB299",
+"v6	c #A5AD95",
+"w6	c #A0A88F",
+"x6	c #A3AA95",
+"y6	c #A4AB96",
+"z6	c #75816E",
+"A6	c #B4BEA5",
+"B6	c #909A86",
+"C6	c #778270",
+"D6	c #89917F",
+"E6	c #8B9480",
+"F6	c #64705E",
+"G6	c #9AA18C",
+"H6	c #89917A",
+"I6	c #959D89",
+"J6	c #8E9482",
+"K6	c #6D7765",
+"L6	c #828C77",
+"M6	c #7C8672",
+"N6	c #616859",
+"O6	c #888E7B",
+"P6	c #737A69",
+"Q6	c #8E9583",
+"R6	c #889984",
+"S6	c #262C26",
+"T6	c #151715",
+"U6	c #151714",
+"V6	c #060B05",
+"W6	c #4A484A",
+"X6	c #696448",
+"Y6	c #5B5644",
+"Z6	c #404041",
+"`6	c #535152",
+" 7	c #2B4366",
+".7	c #4C6C9F",
+"+7	c #5471A1",
+"@7	c #375D96",
+"#7	c #39475B",
+"$7	c #3C475C",
+"%7	c #4D6D98",
+"&7	c #566070",
+"*7	c #494A4F",
+"=7	c #464546",
+"-7	c #474446",
+";7	c #48494E",
+">7	c #424F65",
+",7	c #3E5F8E",
+"'7	c #5A6574",
+")7	c #5B595B",
+"!7	c #5D5857",
+"~7	c #565150",
+"{7	c #574E4A",
+"]7	c #A5A6A7",
+"^7	c #6A6A71",
+"/7	c #3F4049",
+"(7	c #43454F",
+"_7	c #78787F",
+":7	c #B0B1B4",
+"<7	c #D2D5DB",
+"[7	c #D2D3D5",
+"}7	c #ACAEAF",
+"|7	c #BDBEBE",
+"17	c #B0B0AF",
+"27	c #C8C7C9",
+"37	c #3A3A45",
+"47	c #40414E",
+"57	c #393D46",
+"67	c #4E617C",
+"77	c #6B95BB",
+"87	c #6D95BC",
+"97	c #5F7082",
+"07	c #31353B",
+"a7	c #BCBCBE",
+"b7	c #C5C5C5",
+"c7	c #C7C7C7",
+"d7	c #8E8E95",
+"e7	c #E7E8E7",
+"f7	c #787682",
+"g7	c #4C4A5D",
+"h7	c #4B495B",
+"i7	c #4D4B61",
+"j7	c #4C4D59",
+"k7	c #CCCBCD",
+"l7	c #D2D2D4",
+"m7	c #5A5968",
+"n7	c #545164",
+"o7	c #7B7A7F",
+"p7	c #6F6E71",
+"q7	c #737174",
+"r7	c #747376",
+"s7	c #777677",
+"t7	c #767676",
+"u7	c #787A77",
+"v7	c #7B7A7A",
+"w7	c #7A7B79",
+"x7	c #7B7D79",
+"y7	c #7C7A7B",
+"z7	c #7D7C7C",
+"A7	c #7A7B7A",
+"B7	c #3B3B39",
+"C7	c #3D3C3B",
+"D7	c #515151",
+"E7	c #8D8A8C",
+"F7	c #AFAEB3",
+"G7	c #BDBCC2",
+"H7	c #696A6D",
+"I7	c #464648",
+"J7	c #B3B2B2",
+"K7	c #6C696B",
+"L7	c #58585A",
+"M7	c #5C5A5E",
+"N7	c #8D8764",
+"O7	c #F1EA92",
+"P7	c #F1EA96",
+"Q7	c #9E966C",
+"R7	c #47464C",
+"S7	c #595A5E",
+"T7	c #5B5C60",
+"U7	c #454446",
+"V7	c #585859",
+"W7	c #625C63",
+"X7	c #5F5E67",
+"Y7	c #757580",
+"Z7	c #858C91",
+"`7	c #9499A5",
+" 8	c #828CA6",
+".8	c #64626A",
+"+8	c #5D5A60",
+"@8	c #54525D",
+"#8	c #67646C",
+"$8	c #48536A",
+"%8	c #54768F",
+"&8	c #516D8A",
+"*8	c #4D607C",
+"=8	c #4E5972",
+"-8	c #585863",
+";8	c #6B6A6D",
+">8	c #6D6B6E",
+",8	c #6D6B6F",
+"'8	c #6D6C70",
+")8	c #7F7C80",
+"!8	c #8F958B",
+"~8	c #A0A992",
+"{8	c #B0B7A0",
+"]8	c #AEB49A",
+"^8	c #A4AA92",
+"/8	c #B9BEA5",
+"(8	c #9DA38B",
+"_8	c #A1A891",
+":8	c #A8AE96",
+"<8	c #A2A992",
+"[8	c #B4BBA1",
+"}8	c #A9B198",
+"|8	c #A2AA92",
+"18	c #979F88",
+"28	c #BABFA7",
+"38	c #B2B8A2",
+"48	c #79836F",
+"58	c #B5BDA6",
+"68	c #556153",
+"78	c #737D6C",
+"88	c #788372",
+"98	c #76806E",
+"08	c #85907C",
+"a8	c #87927D",
+"b8	c #919985",
+"c8	c #8F9683",
+"d8	c #6E7967",
+"e8	c #646F5F",
+"f8	c #727B6A",
+"g8	c #536051",
+"h8	c #737C69",
+"i8	c #747D6C",
+"j8	c #8F9583",
+"k8	c #899A87",
+"l8	c #131612",
+"m8	c #111411",
+"n8	c #414041",
+"o8	c #353434",
+"p8	c #504F50",
+"q8	c #585658",
+"r8	c #555255",
+"s8	c #424041",
+"t8	c #2D4467",
+"u8	c #637EAA",
+"v8	c #42649A",
+"w8	c #3A4658",
+"x8	c #384557",
+"y8	c #295593",
+"z8	c #2A5591",
+"A8	c #5579AB",
+"B8	c #4C6C9B",
+"C8	c #4B6D9C",
+"D8	c #486EA5",
+"E8	c #285490",
+"F8	c #2D5692",
+"G8	c #30578A",
+"H8	c #565455",
+"I8	c #5B5656",
+"J8	c #424249",
+"K8	c #7D7D85",
+"L8	c #A1A3A7",
+"M8	c #CACBCF",
+"N8	c #D4D4D6",
+"O8	c #B6B6B7",
+"P8	c #9C9C9D",
+"Q8	c #919294",
+"R8	c #8B8C8B",
+"S8	c #939495",
+"T8	c #D0D1D3",
+"U8	c #B5B6B8",
+"V8	c #89898B",
+"W8	c #CFCFD0",
+"X8	c #E9E9E8",
+"Y8	c #EAECEA",
+"Z8	c #696B70",
+"`8	c #3C3B49",
+" 9	c #3A4147",
+".9	c #2D3542",
+"+9	c #6F8AAD",
+"@9	c #64799A",
+"#9	c #384056",
+"$9	c #3E3E49",
+"%9	c #707177",
+"&9	c #E7E7E6",
+"*9	c #4D4B57",
+"=9	c #818187",
+"-9	c #D2D2D3",
+";9	c #CECED0",
+">9	c #4D4C63",
+",9	c #504E6A",
+"'9	c #4D4D63",
+")9	c #5F636A",
+"!9	c #8E8F96",
+"~9	c #4C4A5E",
+"{9	c #4E4B64",
+"]9	c #676671",
+"^9	c #7F877E",
+"/9	c #7B7E7B",
+"(9	c #767577",
+"_9	c #747574",
+":9	c #787778",
+"<9	c #787A78",
+"[9	c #7A7B78",
+"}9	c #797A79",
+"|9	c #7C7B7C",
+"19	c #80807F",
+"29	c #595859",
+"39	c #706D6F",
+"49	c #505053",
+"59	c #403F3F",
+"69	c #656563",
+"79	c #B0AFB4",
+"89	c #6D6D70",
+"99	c #484749",
+"09	c #AFAEAF",
+"a9	c #E7E6E7",
+"b9	c #716F70",
+"c9	c #5C595C",
+"d9	c #625F4D",
+"e9	c #D0C985",
+"f9	c #C6BE7A",
+"g9	c #A69F69",
+"h9	c #89815A",
+"i9	c #6A645E",
+"j9	c #5E5B61",
+"k9	c #5D5A5F",
+"l9	c #797575",
+"m9	c #8A8582",
+"n9	c #81797C",
+"o9	c #6C616F",
+"p9	c #656167",
+"q9	c #556077",
+"r9	c #8598B0",
+"s9	c #9CA9C0",
+"t9	c #9BABBE",
+"u9	c #90A3C1",
+"v9	c #6A6E81",
+"w9	c #646265",
+"x9	c #636065",
+"y9	c #646065",
+"z9	c #5F5B63",
+"A9	c #52525C",
+"B9	c #595562",
+"C9	c #605D64",
+"D9	c #636266",
+"E9	c #66656A",
+"F9	c #7C797E",
+"G9	c #6E6D70",
+"H9	c #837F84",
+"I9	c #7F807E",
+"J9	c #A0A990",
+"K9	c #B0B8A0",
+"L9	c #B2B9A1",
+"M9	c #B5BAA3",
+"N9	c #B0B69D",
+"O9	c #B1B7A0",
+"P9	c #ACB59D",
+"Q9	c #AEB79F",
+"R9	c #9BA48E",
+"S9	c #ABB39D",
+"T9	c #939D89",
+"U9	c #7A8471",
+"V9	c #848D7C",
+"W9	c #727D6E",
+"X9	c #788272",
+"Y9	c #636F5E",
+"Z9	c #656E5E",
+"`9	c #767F6F",
+" 0	c #747E6B",
+".0	c #86917D",
+"+0	c #7E8975",
+"@0	c #7C8573",
+"#0	c #717B6B",
+"$0	c #556253",
+"%0	c #6F7A68",
+"&0	c #A1A993",
+"*0	c #A4AB92",
+"=0	c #AAAF98",
+"-0	c #8C9281",
+";0	c #879A86",
+">0	c #272D26",
+",0	c #0F110E",
+"'0	c #0E100E",
+")0	c #050A04",
+"!0	c #3B3B3B",
+"~0	c #222323",
+"{0	c #434445",
+"]0	c #575959",
+"^0	c #202121",
+"/0	c #403F40",
+"(0	c #2E476A",
+"_0	c #6480A9",
+":0	c #3F6298",
+"<0	c #3B6196",
+"[0	c #384456",
+"}0	c #364458",
+"|0	c #264E8C",
+"10	c #2A518D",
+"20	c #5A78A4",
+"30	c #54729F",
+"40	c #5A75A1",
+"50	c #28508B",
+"60	c #26508B",
+"70	c #204A80",
+"80	c #4B4A4B",
+"90	c #544F4D",
+"00	c #534A47",
+"a0	c #D7D7D7",
+"b0	c #DEDDDD",
+"c0	c #D9DADC",
+"d0	c #B0B0B1",
+"e0	c #9A9A9C",
+"f0	c #797A7E",
+"g0	c #494A4E",
+"h0	c #1E2023",
+"i0	c #07080C",
+"j0	c #030505",
+"k0	c #3E3F41",
+"l0	c #E1E0E0",
+"m0	c #C1C1C3",
+"n0	c #3C3C48",
+"o0	c #41424E",
+"p0	c #373742",
+"q0	c #292D38",
+"r0	c #333643",
+"s0	c #434351",
+"t0	c #484955",
+"u0	c #3F3E48",
+"v0	c #CFCDCF",
+"w0	c #E6E6E7",
+"x0	c #7C7B84",
+"y0	c #42424A",
+"z0	c #B3B3B5",
+"A0	c #E7E8E8",
+"B0	c #5A5A64",
+"C0	c #504F65",
+"D0	c #504E67",
+"E0	c #525163",
+"F0	c #5F5F6E",
+"G0	c #4F4E67",
+"H0	c #504F62",
+"I0	c #77818F",
+"J0	c #708398",
+"K0	c #6E737B",
+"L0	c #747373",
+"M0	c #727271",
+"N0	c #868C84",
+"O0	c #7C827B",
+"P0	c #767576",
+"Q0	c #82848A",
+"R0	c #898A94",
+"S0	c #848884",
+"T0	c #8C9489",
+"U0	c #878B85",
+"V0	c #7B7D7A",
+"W0	c #5F5F5D",
+"X0	c #76767D",
+"Y0	c #535A5F",
+"Z0	c #656464",
+"`0	c #BCBBC1",
+" a	c #ACACAD",
+".a	c #605D60",
+"+a	c #57575A",
+"@a	c #57555B",
+"#a	c #59554D",
+"$a	c #5A5653",
+"%a	c #5B565B",
+"&a	c #5C5A60",
+"*a	c #5E5E66",
+"=a	c #5E5C64",
+"-a	c #665F6A",
+";a	c #8E8892",
+">a	c #9B96A2",
+",a	c #9793A2",
+"'a	c #847D91",
+")a	c #69636D",
+"!a	c #4C4F61",
+"~a	c #627495",
+"{a	c #59708C",
+"]a	c #566480",
+"^a	c #535B74",
+"/a	c #5D5B63",
+"(a	c #625F62",
+"_a	c #807C79",
+":a	c #716D6C",
+"<a	c #615F64",
+"[a	c #6D6D71",
+"}a	c #706E72",
+"|a	c #525056",
+"1a	c #79777E",
+"2a	c #949298",
+"3a	c #9D9B9F",
+"4a	c #ADABB0",
+"5a	c #6F6E73",
+"6a	c #767378",
+"7a	c #7A777B",
+"8a	c #A0A693",
+"9a	c #ADB49C",
+"0a	c #B0B69F",
+"aa	c #B0B89F",
+"ba	c #979F8A",
+"ca	c #939C87",
+"da	c #818B78",
+"ea	c #929985",
+"fa	c #9CA38E",
+"ga	c #989F8A",
+"ha	c #9BA48D",
+"ia	c #959E88",
+"ja	c #A5AF98",
+"ka	c #828D78",
+"la	c #798470",
+"ma	c #959F8A",
+"na	c #818E7A",
+"oa	c #A5AE96",
+"pa	c #76806F",
+"qa	c #5C6656",
+"ra	c #5F6B5A",
+"sa	c #4F5B4C",
+"ta	c #88927F",
+"ua	c #808874",
+"va	c #89927E",
+"wa	c #86907D",
+"xa	c #919984",
+"ya	c #A1A990",
+"za	c #A8B29A",
+"Aa	c #B5BBA1",
+"Ba	c #8B927F",
+"Ca	c #879984",
+"Da	c #282F28",
+"Ea	c #0C0F0B",
+"Fa	c #0C0F0C",
+"Ga	c #060A05",
+"Ha	c #404040",
+"Ia	c #272728",
+"Ja	c #222125",
+"Ka	c #212223",
+"La	c #26262A",
+"Ma	c #4E4D4E",
+"Na	c #373F4D",
+"Oa	c #2F3C53",
+"Pa	c #2D3C53",
+"Qa	c #2D3C55",
+"Ra	c #464A51",
+"Sa	c #2F3D54",
+"Ta	c #2D3C52",
+"Ua	c #2C3B52",
+"Va	c #2C3A52",
+"Wa	c #2A394E",
+"Xa	c #2A384F",
+"Ya	c #29394F",
+"Za	c #293851",
+"`a	c #2F3B4D",
+" b	c #5A585A",
+".b	c #4C4A4B",
+"+b	c #5B5455",
+"@b	c #55504E",
+"#b	c #544948",
+"$b	c #DADADB",
+"%b	c #D5D6D6",
+"&b	c #B4B6B8",
+"*b	c #85898B",
+"=b	c #55565A",
+"-b	c #26272B",
+";b	c #090B0C",
+">b	c #070A0B",
+",b	c #131515",
+"'b	c #262924",
+")b	c #3D4139",
+"!b	c #292C27",
+"~b	c #0E1112",
+"{b	c #56565F",
+"]b	c #3F434D",
+"^b	c #454652",
+"/b	c #3F464D",
+"(b	c #585665",
+"_b	c #898994",
+":b	c #A4A5AF",
+"<b	c #42414F",
+"[b	c #68696F",
+"}b	c #ABADAE",
+"|b	c #8C8D8E",
+"1b	c #565562",
+"2b	c #494658",
+"3b	c #63636C",
+"4b	c #777884",
+"5b	c #A4A3AA",
+"6b	c #B4B6B7",
+"7b	c #DFDFE1",
+"8b	c #999AA1",
+"9b	c #4C4C5E",
+"0b	c #4F4F65",
+"ab	c #5F606F",
+"bb	c #96ACD0",
+"cb	c #809BC2",
+"db	c #626364",
+"eb	c #8C8B8D",
+"fb	c #7A797B",
+"gb	c #747374",
+"hb	c #3C3A3A",
+"ib	c #58575A",
+"jb	c #4E4E4F",
+"kb	c #6C6B6B",
+"lb	c #575656",
+"mb	c #333130",
+"nb	c #6C6A6A",
+"ob	c #434143",
+"pb	c #54575C",
+"qb	c #6B6B69",
+"rb	c #3C3B3C",
+"sb	c #333231",
+"tb	c #535353",
+"ub	c #B9B8BF",
+"vb	c #6E6D6F",
+"wb	c #ADACAD",
+"xb	c #A2A0A2",
+"yb	c #656265",
+"zb	c #555558",
+"Ab	c #5B5960",
+"Bb	c #585861",
+"Cb	c #60646B",
+"Db	c #606769",
+"Eb	c #575B61",
+"Fb	c #515659",
+"Gb	c #63626A",
+"Hb	c #504855",
+"Ib	c #8B8691",
+"Jb	c #847C8D",
+"Kb	c #6A5F73",
+"Lb	c #5B4F64",
+"Mb	c #5F5264",
+"Nb	c #59555D",
+"Ob	c #4B4956",
+"Pb	c #4C4B5B",
+"Qb	c #585760",
+"Rb	c #61676A",
+"Sb	c #6B6C71",
+"Tb	c #615F65",
+"Ub	c #565658",
+"Vb	c #767477",
+"Wb	c #868587",
+"Xb	c #79767A",
+"Yb	c #68666A",
+"Zb	c #444449",
+"`b	c #6D6B75",
+" c	c #68676D",
+".c	c #515155",
+"+c	c #535258",
+"@c	c #66646A",
+"#c	c #807D81",
+"$c	c #898B81",
+"%c	c #9EA58E",
+"&c	c #9DA58E",
+"*c	c #9BA48C",
+"=c	c #9AA38C",
+"-c	c #99A38C",
+";c	c #9AA48B",
+">c	c #99A48B",
+",c	c #99A48D",
+"'c	c #99A38B",
+")c	c #96A089",
+"!c	c #97A089",
+"~c	c #969F88",
+"{c	c #99A28B",
+"]c	c #959E89",
+"^c	c #929A86",
+"/c	c #A4AD96",
+"(c	c #99A48E",
+"_c	c #9EA791",
+":c	c #959F89",
+"<c	c #9BA58E",
+"[c	c #9AA58E",
+"}c	c #9BA68F",
+"|c	c #909984",
+"1c	c #8F9984",
+"2c	c #929B86",
+"3c	c #959D87",
+"4c	c #ADB69B",
+"5c	c #AFB8A0",
+"6c	c #B1B8A0",
+"7c	c #8E9481",
+"8c	c #839783",
+"9c	c #272E27",
+"0c	c #0A0E09",
+"ac	c #090D08",
+"bc	c #060B06",
+"cc	c #464547",
+"dc	c #4A4A4B",
+"ec	c #908553",
+"fc	c #897F55",
+"gc	c #615B4E",
+"hc	c #555557",
+"ic	c #545155",
+"jc	c #857D57",
+"kc	c #968F59",
+"lc	c #777058",
+"mc	c #575657",
+"nc	c #726D59",
+"oc	c #948C60",
+"pc	c #797158",
+"qc	c #5B5752",
+"rc	c #535254",
+"sc	c #4F4D4D",
+"tc	c #777156",
+"uc	c #6E6955",
+"vc	c #555254",
+"wc	c #4D4B4B",
+"xc	c #5A5455",
+"yc	c #544E4C",
+"zc	c #524947",
+"Ac	c #8F9296",
+"Bc	c #56595C",
+"Cc	c #191B1E",
+"Dc	c #05080A",
+"Ec	c #050709",
+"Fc	c #0C0E0E",
+"Gc	c #1C201D",
+"Hc	c #3B3E37",
+"Ic	c #5C6255",
+"Jc	c #78816F",
+"Kc	c #919983",
+"Lc	c #9FA58B",
+"Mc	c #8B907C",
+"Nc	c #1A1D1A",
+"Oc	c #515253",
+"Pc	c #EDEEEC",
+"Qc	c #EAEAE9",
+"Rc	c #9C9CA0",
+"Sc	c #454452",
+"Tc	c #373947",
+"Uc	c #6C6D79",
+"Vc	c #5E5F67",
+"Wc	c #62656E",
+"Xc	c #424354",
+"Yc	c #464354",
+"Zc	c #474C57",
+"`c	c #607793",
+" d	c #61697D",
+".d	c #4E4D5B",
+"+d	c #4B495A",
+"@d	c #4A4959",
+"#d	c #434250",
+"$d	c #B8B8BC",
+"%d	c #D5D4D4",
+"&d	c #C3C3C5",
+"*d	c #A5A5A9",
+"=d	c #50505D",
+"-d	c #504D69",
+";d	c #504F66",
+">d	c #525069",
+",d	c #514F65",
+"'d	c #787F8E",
+")d	c #62758F",
+"!d	c #646565",
+"~d	c #5F5D61",
+"{d	c #757478",
+"]d	c #727072",
+"^d	c #4B4A4A",
+"/d	c #2F2C2E",
+"(d	c #3D3D3E",
+"_d	c #5F5F5F",
+":d	c #595959",
+"<d	c #9C9A9C",
+"[d	c #3A3738",
+"}d	c #555454",
+"|d	c #595957",
+"1d	c #6E716F",
+"2d	c #605F5F",
+"3d	c #6F6C6F",
+"4d	c #474546",
+"5d	c #494847",
+"6d	c #B2B0B6",
+"7d	c #49484A",
+"8d	c #ACABAC",
+"9d	c #C4C2C3",
+"0d	c #6B686A",
+"ad	c #565558",
+"bd	c #4F5053",
+"cd	c #6A6B6F",
+"dd	c #65676B",
+"ed	c #606668",
+"fd	c #53565C",
+"gd	c #535359",
+"hd	c #4F4953",
+"id	c #4B404C",
+"jd	c #4E4250",
+"kd	c #514753",
+"ld	c #5E5460",
+"md	c #68646A",
+"nd	c #605D62",
+"od	c #696669",
+"pd	c #58545F",
+"qd	c #5F5C64",
+"rd	c #717176",
+"sd	c #656267",
+"td	c #44444C",
+"ud	c #55535B",
+"vd	c #7F7D81",
+"wd	c #5A595E",
+"xd	c #59585C",
+"yd	c #4B494C",
+"zd	c #49494D",
+"Ad	c #5C5A5D",
+"Bd	c #6A696C",
+"Cd	c #717074",
+"Dd	c #858286",
+"Ed	c #82817F",
+"Fd	c #B5BAA0",
+"Gd	c #B4BCA2",
+"Hd	c #B5BDA3",
+"Id	c #B1B99F",
+"Jd	c #B2B9A0",
+"Kd	c #B0B79E",
+"Ld	c #B1B9A0",
+"Md	c #B2BAA1",
+"Nd	c #B2B99F",
+"Od	c #B0B79F",
+"Pd	c #ADB7A0",
+"Qd	c #A6AF99",
+"Rd	c #8E9785",
+"Sd	c #AAB29D",
+"Td	c #ABB49E",
+"Ud	c #A9B39C",
+"Vd	c #ADB59D",
+"Wd	c #ADB59E",
+"Xd	c #AEB79E",
+"Yd	c #AAB39A",
+"Zd	c #A2AD93",
+"`d	c #9DA68E",
+" e	c #B0B9A1",
+".e	c #B2BAA2",
+"+e	c #B3BBA3",
+"@e	c #859783",
+"#e	c #293028",
+"$e	c #080B07",
+"%e	c #0A0C09",
+"&e	c #404042",
+"*e	c #2E2E2F",
+"=e	c #464244",
+"-e	c #444446",
+";e	c #2F2F2F",
+">e	c #464347",
+",e	c #464345",
+"'e	c #494649",
+")e	c #474748",
+"!e	c #343535",
+"~e	c #3E3D3E",
+"{e	c #373637",
+"]e	c #464446",
+"^e	c #434342",
+"/e	c #595758",
+"(e	c #4B4949",
+"_e	c #595454",
+":e	c #54504E",
+"<e	c #504845",
+"[e	c #040707",
+"}e	c #090B0B",
+"|e	c #32342F",
+"1e	c #4E5247",
+"2e	c #6A7060",
+"3e	c #7E8874",
+"4e	c #8E9682",
+"5e	c #9DA48C",
+"6e	c #A2A78D",
+"7e	c #A4A88D",
+"8e	c #A0A68D",
+"9e	c #4A4E45",
+"0e	c #141717",
+"ae	c #BFBFC0",
+"be	c #ECEEEC",
+"ce	c #EBEDEB",
+"de	c #4E4C58",
+"ee	c #423F4F",
+"fe	c #464552",
+"ge	c #2C303C",
+"he	c #373743",
+"ie	c #454350",
+"je	c #484758",
+"ke	c #4A4759",
+"le	c #595768",
+"me	c #B2B7BD",
+"ne	c #D8D9DC",
+"oe	c #C0C0C5",
+"pe	c #4C495E",
+"qe	c #4C4B5E",
+"re	c #3E3F49",
+"se	c #3D3E47",
+"te	c #42414E",
+"ue	c #4C4E5A",
+"ve	c #686A73",
+"we	c #9C9CA5",
+"xe	c #908F99",
+"ye	c #514F66",
+"ze	c #535169",
+"Ae	c #595769",
+"Be	c #7A797D",
+"Ce	c #717171",
+"De	c #6F7073",
+"Ee	c #696A6F",
+"Fe	c #6D6E76",
+"Ge	c #717072",
+"He	c #716F71",
+"Ie	c #60626B",
+"Je	c #5B5C5F",
+"Ke	c #757475",
+"Le	c #4C4A4C",
+"Me	c #767474",
+"Ne	c #58585D",
+"Oe	c #60646A",
+"Pe	c #484648",
+"Qe	c #2E2F30",
+"Re	c #707071",
+"Se	c #706F72",
+"Te	c #49474A",
+"Ue	c #ABA9AA",
+"Ve	c #E8E7E7",
+"We	c #6F6D6F",
+"Xe	c #57555C",
+"Ye	c #46484B",
+"Ze	c #44464A",
+"`e	c #42444A",
+" f	c #404344",
+".f	c #565454",
+"+f	c #696568",
+"@f	c #7A7573",
+"#f	c #5A595D",
+"$f	c #69676B",
+"%f	c #7A777C",
+"&f	c #4B484C",
+"*f	c #807E86",
+"=f	c #8A8990",
+"-f	c #7F7D84",
+";f	c #5A575E",
+">f	c #3D3840",
+",f	c #3E3A43",
+"'f	c #454348",
+")f	c #5A585D",
+"!f	c #737074",
+"~f	c #7E7976",
+"{f	c #646266",
+"]f	c #69666A",
+"^f	c #6E6C70",
+"/f	c #7D797E",
+"(f	c #767377",
+"_f	c #78767B",
+":f	c #787579",
+"<f	c #818A76",
+"[f	c #7B8571",
+"}f	c #9FA690",
+"|f	c #9DA68F",
+"1f	c #9DA48F",
+"2f	c #9CA48E",
+"3f	c #A0A791",
+"4f	c #9FA790",
+"5f	c #929C85",
+"6f	c #838D79",
+"7f	c #808C79",
+"8f	c #8D9985",
+"9f	c #73806D",
+"0f	c #74816D",
+"af	c #74806C",
+"bf	c #727E6A",
+"cf	c #677562",
+"df	c #606E5C",
+"ef	c #74816E",
+"ff	c #73816D",
+"gf	c #737F6C",
+"hf	c #74816C",
+"if	c #73806A",
+"jf	c #737F6B",
+"kf	c #747F6B",
+"lf	c #7E8976",
+"mf	c #070A06",
+"nf	c #080B08",
+"of	c #3A3A3B",
+"pf	c #727171",
+"qf	c #6E7070",
+"rf	c #292A2A",
+"sf	c #3D3E3F",
+"tf	c #212222",
+"uf	c #5D5E5C",
+"vf	c #686967",
+"wf	c #626262",
+"xf	c #38393A",
+"yf	c #2F2F30",
+"zf	c #373737",
+"Af	c #5A5A59",
+"Bf	c #606161",
+"Cf	c #232423",
+"Df	c #3B3B3A",
+"Ef	c #1A1B1B",
+"Ff	c #373837",
+"Gf	c #353635",
+"Hf	c #181918",
+"If	c #575556",
+"Jf	c #4A4847",
+"Kf	c #565251",
+"Lf	c #4F4B49",
+"Mf	c #514845",
+"Nf	c #45463E",
+"Of	c #5D6153",
+"Pf	c #727A69",
+"Qf	c #848872",
+"Rf	c #8A907A",
+"Sf	c #8C937D",
+"Tf	c #8D9681",
+"Uf	c #949C87",
+"Vf	c #9BA28B",
+"Wf	c #9EA58C",
+"Xf	c #A6AB8F",
+"Yf	c #7E8473",
+"Zf	c #151717",
+"`f	c #68686B",
+" g	c #ECEFEC",
+".g	c #F0F3F0",
+"+g	c #909194",
+"@g	c #41444C",
+"#g	c #494656",
+"$g	c #62626C",
+"%g	c #A3A5B2",
+"&g	c #676875",
+"*g	c #464751",
+"=g	c #E7E9E7",
+"-g	c #ECEDEB",
+";g	c #EBECEB",
+">g	c #787780",
+",g	c #4D4C62",
+"'g	c #4D4C5D",
+")g	c #61606C",
+"!g	c #9797A0",
+"~g	c #CACACC",
+"{g	c #C9CBC9",
+"]g	c #DDDDDE",
+"^g	c #5A5A69",
+"/g	c #504F68",
+"(g	c #545268",
+"_g	c #696772",
+":g	c #9D9D9F",
+"<g	c #A2A6A9",
+"[g	c #A3A4A8",
+"}g	c #7E7D80",
+"|g	c #555355",
+"1g	c #5F5E66",
+"2g	c #646369",
+"3g	c #7F7D80",
+"4g	c #908F90",
+"5g	c #676865",
+"6g	c #3D3F46",
+"7g	c #4E4B4F",
+"8g	c #717271",
+"9g	c #868486",
+"0g	c #B1B0B3",
+"ag	c #A9A8A8",
+"bg	c #7F7D7F",
+"cg	c #5F5D60",
+"dg	c #545358",
+"eg	c #5B595F",
+"fg	c #787473",
+"gg	c #77726C",
+"hg	c #75706C",
+"ig	c #6C686A",
+"jg	c #615E65",
+"kg	c #504F53",
+"lg	c #7F7F83",
+"mg	c #9D9C9F",
+"ng	c #646168",
+"og	c #47454A",
+"pg	c #383842",
+"qg	c #393940",
+"rg	c #383A40",
+"sg	c #404148",
+"tg	c #636168",
+"ug	c #635F65",
+"vg	c #777270",
+"wg	c #817D79",
+"xg	c #666366",
+"yg	c #6F6D72",
+"zg	c #716E72",
+"Ag	c #5D5C61",
+"Bg	c #79777A",
+"Cg	c #8A888C",
+"Dg	c #7B777C",
+"Eg	c #726F77",
+"Fg	c #737175",
+"Gg	c #807E83",
+"Hg	c #8C9086",
+"Ig	c #A3AB93",
+"Jg	c #B1B79E",
+"Kg	c #AFB69F",
+"Lg	c #AFB8A1",
+"Mg	c #AEB7A2",
+"Ng	c #ADB5A0",
+"Og	c #AEB7A1",
+"Pg	c #A9B49C",
+"Qg	c #9CA992",
+"Rg	c #A3AD97",
+"Sg	c #97A48E",
+"Tg	c #9DA993",
+"Ug	c #ACB39D",
+"Vg	c #B1B9A2",
+"Wg	c #ADB6A0",
+"Xg	c #ABB69F",
+"Yg	c #AEB6A0",
+"Zg	c #A4AE98",
+"`g	c #9EAA95",
+" h	c #AEB9A2",
+".h	c #B1BAA5",
+"+h	c #ABB8A2",
+"@h	c #B0B9A3",
+"#h	c #B1B9A4",
+"$h	c #B3BCA6",
+"%h	c #B5BEA7",
+"&h	c #B2BAA3",
+"*h	c #B1B9A3",
+"=h	c #AEB9A4",
+"-h	c #B2BCA7",
+";h	c #80927E",
+">h	c #252B24",
+",h	c #0A0B09",
+"'h	c #3C3C3E",
+")h	c #1C1D1B",
+"!h	c #141513",
+"~h	c #131413",
+"{h	c #161816",
+"]h	c #232424",
+"^h	c #131412",
+"/h	c #111310",
+"(h	c #141514",
+"_h	c #3D3C3E",
+":h	c #38383A",
+"<h	c #111211",
+"[h	c #121412",
+"}h	c #2B2B2A",
+"|h	c #414141",
+"1h	c #131613",
+"2h	c #0D0F0D",
+"3h	c #0E0F0E",
+"4h	c #181917",
+"5h	c #585657",
+"6h	c #4A4849",
+"7h	c #555151",
+"8h	c #504B49",
+"9h	c #514645",
+"0h	c #7A8373",
+"ah	c #848876",
+"bh	c #898B75",
+"ch	c #8C8D75",
+"dh	c #8A9179",
+"eh	c #959C88",
+"fh	c #9AA28B",
+"gh	c #A1A78C",
+"hh	c #A3A88D",
+"ih	c #A7AD91",
+"jh	c #A7AC90",
+"kh	c #9CA28A",
+"lh	c #3D403A",
+"mh	c #1E2122",
+"nh	c #F1F3F1",
+"oh	c #E0E0E1",
+"ph	c #4C4B55",
+"qh	c #42434E",
+"rh	c #45464E",
+"sh	c #464856",
+"th	c #75757F",
+"uh	c #7B7C86",
+"vh	c #555763",
+"wh	c #403E4A",
+"xh	c #A8A8AB",
+"yh	c #C7C8C6",
+"zh	c #4B4A59",
+"Ah	c #9C9BA1",
+"Bh	c #EFF2EF",
+"Ch	c #E9EBE9",
+"Dh	c #C5C5C4",
+"Eh	c #D7D7D6",
+"Fh	c #CECFCE",
+"Gh	c #8F8F92",
+"Hh	c #61636A",
+"Ih	c #4E4E62",
+"Jh	c #514F68",
+"Kh	c #525068",
+"Lh	c #565568",
+"Mh	c #7D7C82",
+"Nh	c #AAA8B0",
+"Oh	c #A4A2A8",
+"Ph	c #A3A1A7",
+"Qh	c #A9A8A9",
+"Rh	c #484847",
+"Sh	c #433E44",
+"Th	c #5F5961",
+"Uh	c #555056",
+"Vh	c #656365",
+"Wh	c #767776",
+"Xh	c #777777",
+"Yh	c #7A7A79",
+"Zh	c #636264",
+"`h	c #7F7C7F",
+" i	c #6B696A",
+".i	c #494747",
+"+i	c #747473",
+"@i	c #8B8C88",
+"#i	c #B0AEB4",
+"$i	c #48474A",
+"%i	c #A8A6A7",
+"&i	c #A2A0A1",
+"*i	c #545255",
+"=i	c #5D5C60",
+"-i	c #545258",
+";i	c #7A7A7D",
+">i	c #A3A1A6",
+",i	c #67646B",
+"'i	c #444348",
+")i	c #4D4C51",
+"!i	c #404044",
+"~i	c #3F4044",
+"{i	c #5E5C61",
+"]i	c #646161",
+"^i	c #767371",
+"/i	c #616266",
+"(i	c #69696D",
+"_i	c #656368",
+":i	c #565355",
+"<i	c #575557",
+"[i	c #69666B",
+"}i	c #706D73",
+"|i	c #575559",
+"1i	c #4D4D51",
+"2i	c #4B4B4E",
+"3i	c #66646B",
+"4i	c #828086",
+"5i	c #6F7171",
+"6i	c #485549",
+"7i	c #475348",
+"8i	c #445246",
+"9i	c #445245",
+"0i	c #435246",
+"ai	c #425246",
+"bi	c #445348",
+"ci	c #43534A",
+"di	c #435349",
+"ei	c #45554A",
+"fi	c #435449",
+"gi	c #44554A",
+"hi	c #47574A",
+"ii	c #46574B",
+"ji	c #46564B",
+"ki	c #48574D",
+"li	c #46574C",
+"mi	c #47584D",
+"ni	c #495A4E",
+"oi	c #4A5A50",
+"pi	c #4A5A4F",
+"qi	c #4C5D52",
+"ri	c #4D5D53",
+"si	c #4E5E56",
+"ti	c #4D5E54",
+"ui	c #505F57",
+"vi	c #505F58",
+"wi	c #506059",
+"xi	c #52615B",
+"yi	c #53625C",
+"zi	c #576760",
+"Ai	c #56665E",
+"Bi	c #38473E",
+"Ci	c #090A06",
+"Di	c #0D0D0A",
+"Ei	c #424243",
+"Fi	c #4A4A4C",
+"Gi	c #4C494D",
+"Hi	c #686251",
+"Ii	c #504F52",
+"Ji	c #525154",
+"Ki	c #4F4C4F",
+"Li	c #514E51",
+"Mi	c #696353",
+"Ni	c #585558",
+"Oi	c #555356",
+"Pi	c #6F6857",
+"Qi	c #545154",
+"Ri	c #615D55",
+"Si	c #605D55",
+"Ti	c #5A5758",
+"Ui	c #534D4D",
+"Vi	c #4E4847",
+"Wi	c #4E4440",
+"Xi	c #878B77",
+"Yi	c #8A8B76",
+"Zi	c #8C8F76",
+"`i	c #8B927A",
+" j	c #8B967F",
+".j	c #949C88",
+"+j	c #9AA18B",
+"@j	c #A1A68C",
+"#j	c #A5A98E",
+"$j	c #A9AF92",
+"%j	c #A8AD91",
+"&j	c #727768",
+"*j	c #0F1212",
+"=j	c #868788",
+"-j	c #F2F5F2",
+";j	c #F2F3F1",
+">j	c #86858B",
+",j	c #474653",
+"'j	c #494655",
+")j	c #343640",
+"!j	c #2C303A",
+"~j	c #4A4A5A",
+"{j	c #464655",
+"]j	c #4D4D54",
+"^j	c #E9EAE9",
+"/j	c #63626D",
+"(j	c #4F5157",
+"_j	c #BBBDBC",
+":j	c #A6A7A8",
+"<j	c #85868A",
+"[j	c #65666C",
+"}j	c #474853",
+"|j	c #4B4B5B",
+"1j	c #5C5D6E",
+"2j	c #525167",
+"3j	c #4F4E66",
+"4j	c #4F5063",
+"5j	c #545168",
+"6j	c #5D5B6B",
+"7j	c #8A898F",
+"8j	c #8A888E",
+"9j	c #908F93",
+"0j	c #323031",
+"aj	c #3C3B3D",
+"bj	c #797B79",
+"cj	c #828581",
+"dj	c #4C4C4C",
+"ej	c #464545",
+"fj	c #656465",
+"gj	c #7A7979",
+"hj	c #898788",
+"ij	c #AEACB2",
+"jj	c #C5C4C5",
+"kj	c #575558",
+"lj	c #49484D",
+"mj	c #797980",
+"nj	c #74747A",
+"oj	c #5C5A62",
+"pj	c #4D4D53",
+"qj	c #54515A",
+"rj	c #59585D",
+"sj	c #464448",
+"tj	c #534D54",
+"uj	c #5A585F",
+"vj	c #6D6B70",
+"wj	c #67666C",
+"xj	c #605F65",
+"yj	c #625D62",
+"zj	c #595557",
+"Aj	c #7B7A7D",
+"Bj	c #6E6A70",
+"Cj	c #515056",
+"Dj	c #5E5C62",
+"Ej	c #5B5A60",
+"Fj	c #525157",
+"Gj	c #696668",
+"Hj	c #575358",
+"Ij	c #545256",
+"Jj	c #636265",
+"Kj	c #747177",
+"Lj	c #737176",
+"Mj	c #7A787C",
+"Nj	c #3A3838",
+"Oj	c #2F2D2B",
+"Pj	c #2E2C2A",
+"Qj	c #2D2C2A",
+"Rj	c #2C2C29",
+"Sj	c #2D2A28",
+"Tj	c #292A29",
+"Uj	c #282828",
+"Vj	c #252625",
+"Wj	c #212221",
+"Xj	c #1E1F1E",
+"Yj	c #1B1C1A",
+"Zj	c #171817",
+"`j	c #101211",
+" k	c #101110",
+".k	c #0B0D0C",
+"+k	c #0B0C0B",
+"@k	c #0B0E0B",
+"#k	c #0A0D0A",
+"$k	c #090C0A",
+"%k	c #0B0F0B",
+"&k	c #0A0E0B",
+"*k	c #0B0F0C",
+"=k	c #0A0D0B",
+"-k	c #0F0F0A",
+";k	c #0D0E0B",
+">k	c #2C2D2C",
+",k	c #3A3A3C",
+"'k	c #42413F",
+")k	c #454646",
+"!k	c #464647",
+"~k	c #2E2E2D",
+"{k	c #3F3F41",
+"]k	c #454343",
+"^k	c #434346",
+"/k	c #49494B",
+"(k	c #393939",
+"_k	c #3B3B3C",
+":k	c #44433D",
+"<k	c #424242",
+"[k	c #4A4A4A",
+"}k	c #353534",
+"|k	c #474545",
+"1k	c #534E4E",
+"2k	c #4C4846",
+"3k	c #4D4440",
+"4k	c #8A8D7C",
+"5k	c #878A77",
+"6k	c #898E78",
+"7k	c #8C8E75",
+"8k	c #8E9882",
+"9k	c #A8AE91",
+"0k	c #AAB094",
+"ak	c #AAB194",
+"bk	c #9BA189",
+"ck	c #2B2E2B",
+"dk	c #2D2F2F",
+"ek	c #ECEDEC",
+"fk	c #CDCECF",
+"gk	c #4A4758",
+"hk	c #464651",
+"ik	c #565C69",
+"jk	c #6E6E7D",
+"kk	c #757889",
+"lk	c #3D3C49",
+"mk	c #AFB0B1",
+"nk	c #E9ECE9",
+"ok	c #C8C8C9",
+"pk	c #65656F",
+"qk	c #444354",
+"rk	c #3C3C4A",
+"sk	c #4C4F5C",
+"tk	c #535665",
+"uk	c #514F67",
+"vk	c #524F68",
+"wk	c #524F67",
+"xk	c #7A7A86",
+"yk	c #AEB4C8",
+"zk	c #757381",
+"Ak	c #77777A",
+"Bk	c #6E6F6F",
+"Ck	c #737275",
+"Dk	c #737675",
+"Ek	c #757674",
+"Fk	c #77767A",
+"Gk	c #7B7F82",
+"Hk	c #797978",
+"Ik	c #807E80",
+"Jk	c #918F91",
+"Kk	c #8D8B8E",
+"Lk	c #A9A8AD",
+"Mk	c #A4A4A4",
+"Nk	c #706E70",
+"Ok	c #5B585D",
+"Pk	c #4E4D53",
+"Qk	c #3C3E43",
+"Rk	c #45444A",
+"Sk	c #58575E",
+"Tk	c #68696C",
+"Uk	c #605D61",
+"Vk	c #74716E",
+"Wk	c #686362",
+"Xk	c #616164",
+"Yk	c #68666B",
+"Zk	c #4A484E",
+"`k	c #545158",
+" l	c #605E64",
+".l	c #838286",
+"+l	c #58565C",
+"@l	c #615F62",
+"#l	c #403D45",
+"$l	c #3E3C43",
+"%l	c #4C4A51",
+"&l	c #5E5C60",
+"*l	c #706C6F",
+"=l	c #676569",
+"-l	c #747276",
+";l	c #6E6B6F",
+">l	c #716F74",
+",l	c #7E7B80",
+"'l	c #555154",
+")l	c #393535",
+"!l	c #353333",
+"~l	c #2F2E2E",
+"{l	c #2C2B2B",
+"]l	c #242624",
+"^l	c #1D1E1C",
+"/l	c #191A19",
+"(l	c #181817",
+"_l	c #0F120F",
+":l	c #0D100D",
+"<l	c #0A0D09",
+"[l	c #060907",
+"}l	c #050905",
+"|l	c #060906",
+"1l	c #060905",
+"2l	c #070B07",
+"3l	c #090B0A",
+"4l	c #0B0C0E",
+"5l	c #070A07",
+"6l	c #17130E",
+"7l	c #1D1E1E",
+"8l	c #232524",
+"9l	c #303131",
+"0l	c #252626",
+"al	c #3A3B3B",
+"bl	c #1E201E",
+"cl	c #1F2020",
+"dl	c #343536",
+"el	c #2C2E2D",
+"fl	c #191A1A",
+"gl	c #181A19",
+"hl	c #262726",
+"il	c #3A3B3A",
+"jl	c #474947",
+"kl	c #474847",
+"ll	c #232323",
+"ml	c #514E4F",
+"nl	c #474444",
+"ol	c #514B4C",
+"pl	c #4C4745",
+"ql	c #4B4440",
+"rl	c #868A7A",
+"sl	c #888A76",
+"tl	c #8A8C76",
+"ul	c #8C8F77",
+"vl	c #8B937C",
+"wl	c #939A86",
+"xl	c #99A08A",
+"yl	c #9DA48B",
+"zl	c #A1A78D",
+"Al	c #AAB093",
+"Bl	c #AEB496",
+"Cl	c #A8AF94",
+"Dl	c #65695B",
+"El	c #0D1010",
+"Fl	c #B2B2B3",
+"Gl	c #79797F",
+"Hl	c #484755",
+"Il	c #484756",
+"Jl	c #3D3D4B",
+"Kl	c #5E5D6D",
+"Ll	c #9798A4",
+"Ml	c #9799A2",
+"Nl	c #434352",
+"Ol	c #3B3B45",
+"Pl	c #454457",
+"Ql	c #575669",
+"Rl	c #4F4E61",
+"Sl	c #4F4D61",
+"Tl	c #626779",
+"Ul	c #81828C",
+"Vl	c #A1A1AC",
+"Wl	c #4F4F61",
+"Xl	c #3B3C4C",
+"Yl	c #64656F",
+"Zl	c #6E767E",
+"`l	c #4F5262",
+" m	c #515066",
+".m	c #535168",
+"+m	c #555268",
+"@m	c #575367",
+"#m	c #838287",
+"$m	c #A1A0A2",
+"%m	c #777578",
+"&m	c #9B989B",
+"*m	c #8D8B8D",
+"=m	c #8E8B8D",
+"-m	c #6D6C6D",
+";m	c #6B6B6D",
+">m	c #9E9C9F",
+",m	c #7E7C7F",
+"'m	c #A8A6AC",
+")m	c #BAB9C0",
+"!m	c #67676A",
+"~m	c #9F9F9F",
+"{m	c #555359",
+"]m	c #5C595D",
+"^m	c #787370",
+"/m	c #666164",
+"(m	c #5C5B60",
+"_m	c #504D55",
+":m	c #525256",
+"<m	c #636367",
+"[m	c #666368",
+"}m	c #525054",
+"|m	c #38383C",
+"1m	c #3A3A3E",
+"2m	c #3D3C41",
+"3m	c #47474B",
+"4m	c #6C6A70",
+"5m	c #686569",
+"6m	c #767272",
+"7m	c #6E6B70",
+"8m	c #6A676C",
+"9m	c #939195",
+"0m	c #706F73",
+"am	c #848185",
+"bm	c #646366",
+"cm	c #1E1E1E",
+"dm	c #1B1D1D",
+"em	c #1D201E",
+"fm	c #1A1D1B",
+"gm	c #1D1F1E",
+"hm	c #1A1C1C",
+"im	c #1B1D1B",
+"jm	c #1C1D1C",
+"km	c #1B1C1B",
+"lm	c #1B1C1C",
+"mm	c #1B1D1C",
+"nm	c #191918",
+"om	c #171918",
+"pm	c #171A17",
+"qm	c #161918",
+"rm	c #191B19",
+"sm	c #161916",
+"tm	c #161817",
+"um	c #171A19",
+"vm	c #171917",
+"wm	c #181B18",
+"xm	c #181B19",
+"ym	c #1B1B1C",
+"zm	c #211E1C",
+"Am	c #221F1E",
+"Bm	c #1D1E1D",
+"Cm	c #0D100E",
+"Dm	c #0F1011",
+"Em	c #121312",
+"Fm	c #0D100F",
+"Gm	c #303132",
+"Hm	c #2F302F",
+"Im	c #080A08",
+"Jm	c #121513",
+"Km	c #080B0A",
+"Lm	c #1D1F1D",
+"Mm	c #3C3D3C",
+"Nm	c #101210",
+"Om	c #0A0C0B",
+"Pm	c #0C0D0D",
+"Qm	c #0D0E0D",
+"Rm	c #545253",
+"Sm	c #454342",
+"Tm	c #504B4B",
+"Um	c #4B4645",
+"Vm	c #4B433E",
+"Wm	c #838879",
+"Xm	c #888B77",
+"Ym	c #8D8C75",
+"Zm	c #8B937D",
+"`m	c #929883",
+" n	c #949B88",
+".n	c #A4A98D",
+"+n	c #ABB194",
+"@n	c #959B83",
+"#n	c #1C1E1E",
+"$n	c #4A4B4D",
+"%n	c #F1F1F0",
+"&n	c #F2F4F2",
+"*n	c #BBBDBD",
+"=n	c #454450",
+"-n	c #474755",
+";n	c #252C39",
+">n	c #2B2D38",
+",n	c #373A45",
+"'n	c #4C4B5D",
+")n	c #545467",
+"!n	c #656C7A",
+"~n	c #838692",
+"{n	c #727180",
+"]n	c #393B49",
+"^n	c #4E4E60",
+"/n	c #8C8D95",
+"(n	c #92979F",
+"_n	c #4D4D5B",
+":n	c #403F52",
+"<n	c #363744",
+"[n	c #4B4D59",
+"}n	c #575665",
+"|n	c #525067",
+"1n	c #555368",
+"2n	c #605E6B",
+"3n	c #7D7B80",
+"4n	c #686669",
+"5n	c #7C7B7E",
+"6n	c #706F71",
+"7n	c #5B5B5C",
+"8n	c #696868",
+"9n	c #6A676B",
+"0n	c #6F6F6E",
+"an	c #818180",
+"bn	c #9D9D9E",
+"cn	c #545357",
+"dn	c #524F54",
+"en	c #55545C",
+"fn	c #6F6D75",
+"gn	c #656269",
+"hn	c #48464B",
+"in	c #48494C",
+"jn	c #4A4750",
+"kn	c #3F3E45",
+"ln	c #5F5E61",
+"mn	c #616064",
+"nn	c #59565C",
+"on	c #858386",
+"pn	c #747275",
+"qn	c #6F6B70",
+"rn	c #625E64",
+"sn	c #3B3A41",
+"tn	c #56555B",
+"un	c #47474C",
+"vn	c #434246",
+"wn	c #535156",
+"xn	c #747277",
+"yn	c #7B797D",
+"zn	c #516C6A",
+"An	c #466D6A",
+"Bn	c #476667",
+"Cn	c #474549",
+"Dn	c #464548",
+"En	c #456664",
+"Fn	c #466666",
+"Gn	c #446564",
+"Hn	c #444548",
+"In	c #424145",
+"Jn	c #65614B",
+"Kn	c #425354",
+"Ln	c #416665",
+"Mn	c #44595C",
+"Nn	c #46595A",
+"On	c #454547",
+"Pn	c #474749",
+"Qn	c #4B4A49",
+"Rn	c #625E4D",
+"Sn	c #4A494C",
+"Tn	c #4C4C4E",
+"Un	c #4B4B4D",
+"Vn	c #605E50",
+"Wn	c #4E5657",
+"Xn	c #4F6F6D",
+"Yn	c #4F696B",
+"Zn	c #506262",
+"`n	c #4D4C4F",
+" o	c #444346",
+".o	c #444243",
+"+o	c #545047",
+"@o	c #494849",
+"#o	c #4E4C4E",
+"$o	c #403E41",
+"%o	c #5D5742",
+"&o	c #504F51",
+"*o	c #4D4C4E",
+"=o	c #474647",
+"-o	c #565348",
+";o	c #585449",
+">o	c #525152",
+",o	c #474547",
+"'o	c #666148",
+")o	c #5A5446",
+"!o	c #4B494B",
+"~o	c #474544",
+"{o	c #4E4948",
+"]o	c #4A4543",
+"^o	c #4A433F",
+"/o	c #868977",
+"(o	c #8E8D73",
+"_o	c #8E9077",
+":o	c #909680",
+"<o	c #99A18B",
+"[o	c #9FA68C",
+"}o	c #A7AC8F",
+"|o	c #ADB396",
+"1o	c #AFB497",
+"2o	c #B1B598",
+"3o	c #ABB094",
+"4o	c #54564F",
+"5o	c #141618",
+"6o	c #C1C3C1",
+"7o	c #F1F2F0",
+"8o	c #EEF0EE",
+"9o	c #52525B",
+"0o	c #484654",
+"ao	c #565A68",
+"bo	c #676B79",
+"co	c #787987",
+"do	c #4F4F5D",
+"eo	c #3F3F4F",
+"fo	c #676977",
+"go	c #A4A4AA",
+"ho	c #8A8C97",
+"io	c #464753",
+"jo	c #323442",
+"ko	c #303240",
+"lo	c #41424D",
+"mo	c #535166",
+"no	c #575668",
+"oo	c #8E8D97",
+"po	c #A6A6AD",
+"qo	c #5E5E6C",
+"ro	c #575467",
+"so	c #68656F",
+"to	c #7C7F7C",
+"uo	c #6E7076",
+"vo	c #676967",
+"wo	c #747A72",
+"xo	c #7A7D82",
+"yo	c #74777B",
+"zo	c #7B8178",
+"Ao	c #818780",
+"Bo	c #777A76",
+"Co	c #7D7C7E",
+"Do	c #BAB9BF",
+"Eo	c #9D9C9B",
+"Fo	c #CFCDCE",
+"Go	c #47464A",
+"Ho	c #57555A",
+"Io	c #57565A",
+"Jo	c #4B4B50",
+"Ko	c #53515A",
+"Lo	c #5F5C62",
+"Mo	c #514D57",
+"No	c #5C5960",
+"Oo	c #5D5C62",
+"Po	c #706D72",
+"Qo	c #666168",
+"Ro	c #555458",
+"So	c #46444A",
+"To	c #565559",
+"Uo	c #514F54",
+"Vo	c #4E4851",
+"Wo	c #706C71",
+"Xo	c #625E63",
+"Yo	c #6F6B67",
+"Zo	c #6B6A6E",
+"`o	c #727074",
+" p	c #7C7980",
+".p	c #505456",
+"+p	c #2F3435",
+"@p	c #393D3C",
+"#p	c #3F3C3F",
+"$p	c #2E3536",
+"%p	c #2C3535",
+"&p	c #3F4042",
+"*p	c #2C2C2D",
+"=p	c #333434",
+"-p	c #313737",
+";p	c #3D4948",
+">p	c #3D4243",
+",p	c #353637",
+"'p	c #303032",
+")p	c #313133",
+"!p	c #333335",
+"~p	c #3D3D3F",
+"{p	c #373636",
+"]p	c #45443C",
+"^p	c #3B3C3D",
+"/p	c #424345",
+"(p	c #39393B",
+"_p	c #393A3B",
+":p	c #3A3B3C",
+"<p	c #474438",
+"[p	c #3D4242",
+"}p	c #444547",
+"|p	c #4A4C50",
+"1p	c #4C4B4E",
+"2p	c #68696B",
+"3p	c #807F7D",
+"4p	c #86857E",
+"5p	c #5C5C5C",
+"6p	c #7B7B7B",
+"7p	c #9B957F",
+"8p	c #7E7D7D",
+"9p	c #525252",
+"0p	c #7E7E7E",
+"ap	c #928E83",
+"bp	c #807D80",
+"cp	c #646364",
+"dp	c #4C4D4C",
+"ep	c #3E3F3F",
+"fp	c #55524F",
+"gp	c #4A4949",
+"hp	c #525051",
+"ip	c #474645",
+"jp	c #514A4A",
+"kp	c #494543",
+"lp	c #49423D",
+"mp	c #828877",
+"np	c #8C8B74",
+"op	c #8E8E74",
+"pp	c #8D9178",
+"qp	c #8F957F",
+"rp	c #959C89",
+"sp	c #A9AF93",
+"tp	c #B0B597",
+"up	c #B1B597",
+"vp	c #B1B698",
+"wp	c #8A907C",
+"xp	c #121616",
+"yp	c #747576",
+"zp	c #F0F4F0",
+"Ap	c #A1A1A4",
+"Bp	c #434252",
+"Cp	c #878B93",
+"Dp	c #B6B5BF",
+"Ep	c #666573",
+"Fp	c #393947",
+"Gp	c #30373F",
+"Hp	c #33353E",
+"Ip	c #363746",
+"Jp	c #535167",
+"Kp	c #625F70",
+"Lp	c #7E7C8B",
+"Mp	c #686978",
+"Np	c #4B4C58",
+"Op	c #D0D1D0",
+"Pp	c #D2D3D1",
+"Qp	c #C8C7C8",
+"Rp	c #6E6C77",
+"Sp	c #575567",
+"Tp	c #5A5767",
+"Up	c #727177",
+"Vp	c #6C6C6E",
+"Wp	c #6E6D71",
+"Xp	c #7B797B",
+"Yp	c #6D6D6E",
+"Zp	c #68686A",
+"`p	c #747176",
+" q	c #868487",
+".q	c #858285",
+"+q	c #8E8B8E",
+"@q	c #8A878A",
+"#q	c #A5A3AA",
+"$q	c #5D5F61",
+"%q	c #9B9A9A",
+"&q	c #716E70",
+"*q	c #58565B",
+"=q	c #4E4C51",
+"-q	c #3D3B40",
+";q	c #3E3E42",
+">q	c #48474B",
+",q	c #656164",
+"'q	c #57545B",
+")q	c #57575D",
+"!q	c #69656C",
+"~q	c #4C4A50",
+"{q	c #525155",
+"]q	c #605E63",
+"^q	c #727073",
+"/q	c #545257",
+"(q	c #4B494D",
+"_q	c #434245",
+":q	c #787279",
+"<q	c #7C787E",
+"[q	c #6C6A6D",
+"}q	c #6E6D72",
+"|q	c #838085",
+"1q	c #7A787A",
+"2q	c #4B4B4B",
+"3q	c #272726",
+"4q	c #2C2C2B",
+"5q	c #444645",
+"6q	c #111312",
+"7q	c #242525",
+"8q	c #353536",
+"9q	c #1E1E1D",
+"0q	c #363736",
+"aq	c #323333",
+"bq	c #232425",
+"cq	c #131416",
+"dq	c #4B4D4B",
+"eq	c #121315",
+"fq	c #252727",
+"gq	c #242424",
+"hq	c #242625",
+"iq	c #2D2F2E",
+"jq	c #373839",
+"kq	c #515351",
+"lq	c #151716",
+"mq	c #2A2B2C",
+"nq	c #373838",
+"oq	c #414242",
+"pq	c #3C3C3B",
+"qq	c #222322",
+"rq	c #A09EA4",
+"sq	c #BFBEC5",
+"tq	c #CCCBCF",
+"uq	c #C6C5CC",
+"vq	c #403E3F",
+"wq	c #78777C",
+"xq	c #BCBAC2",
+"yq	c #D7D6DA",
+"zq	c #BFBDC6",
+"Aq	c #6A6A6D",
+"Bq	c #BAB9C2",
+"Cq	c #D4D3D7",
+"Dq	c #BEBDC4",
+"Eq	c #8B898E",
+"Fq	c #474747",
+"Gq	c #2D2D2D",
+"Hq	c #4E4C4D",
+"Iq	c #4E4949",
+"Jq	c #494442",
+"Kq	c #48413C",
+"Lq	c #92927D",
+"Mq	c #8D8C74",
+"Nq	c #8A927A",
+"Oq	c #979E89",
+"Pq	c #A0A68C",
+"Qq	c #A7AB8F",
+"Rq	c #ADB395",
+"Sq	c #B3B698",
+"Tq	c #B5B89A",
+"Uq	c #A7AD93",
+"Vq	c #3A3B39",
+"Wq	c #202324",
+"Xq	c #D6D6D5",
+"Yq	c #F1F4F1",
+"Zq	c #E5E6E5",
+"`q	c #4A4B55",
+" r	c #464453",
+".r	c #2A303F",
+"+r	c #383A45",
+"@r	c #2F323D",
+"#r	c #3C3C4B",
+"$r	c #4B495D",
+"%r	c #4A4859",
+"&r	c #5F5E72",
+"*r	c #706F7F",
+"=r	c #505062",
+"-r	c #414452",
+";r	c #61616E",
+">r	c #ADADBA",
+",r	c #888997",
+"'r	c #464656",
+")r	c #4A4D52",
+"!r	c #535561",
+"~r	c #4B4C57",
+"{r	c #555364",
+"]r	c #545267",
+"^r	c #5B5967",
+"/r	c #666569",
+"(r	c #716F73",
+"_r	c #89878B",
+":r	c #7D7A7C",
+"<r	c #807E81",
+"[r	c #7C797C",
+"}r	c #575758",
+"|r	c #5E5E61",
+"1r	c #646365",
+"2r	c #717070",
+"3r	c #ADACB1",
+"4r	c #B9B8BE",
+"5r	c #5A5C5D",
+"6r	c #979797",
+"7r	c #8A8888",
+"8r	c #575359",
+"9r	c #5C585C",
+"0r	c #6D696B",
+"ar	c #5F5D62",
+"br	c #555358",
+"cr	c #818084",
+"dr	c #36363C",
+"er	c #403E45",
+"fr	c #4B494E",
+"gr	c #6B686D",
+"hr	c #706C72",
+"ir	c #726E6E",
+"jr	c #88868C",
+"kr	c #9D9BA3",
+"lr	c #A8A5AD",
+"mr	c #9A99A1",
+"nr	c #969398",
+"or	c #5A575D",
+"pr	c #8F8D90",
+"qr	c #656367",
+"rr	c #716E74",
+"sr	c #292929",
+"tr	c #353537",
+"ur	c #2E2E2E",
+"vr	c #262626",
+"wr	c #191B1A",
+"xr	c #1F211F",
+"yr	c #1A1C1A",
+"zr	c #262627",
+"Ar	c #343534",
+"Br	c #131414",
+"Cr	c #1E201F",
+"Dr	c #39383A",
+"Er	c #202221",
+"Fr	c #111212",
+"Gr	c #313332",
+"Hr	c #353535",
+"Ir	c #0F110F",
+"Jr	c #918F96",
+"Kr	c #A7A5AD",
+"Lr	c #A8A6AD",
+"Mr	c #3D3C3D",
+"Nr	c #6F6E72",
+"Or	c #A5A2AA",
+"Pr	c #B2B0B5",
+"Qr	c #A19FA8",
+"Rr	c #5C5C5E",
+"Sr	c #737376",
+"Tr	c #1A1C1B",
+"Ur	c #4E4D4D",
+"Vr	c #454443",
+"Wr	c #4C4747",
+"Xr	c #46413F",
+"Yr	c #47413C",
+"Zr	c #909381",
+"`r	c #8B8F77",
+" s	c #8B9078",
+".s	c #909884",
+"+s	c #B2B598",
+"@s	c #B3B79A",
+"#s	c #767C6E",
+"$s	c #0F1214",
+"%s	c #8D8F8F",
+"&s	c #F3F4F2",
+"*s	c #5E5E6E",
+"=s	c #4D4E62",
+"-s	c #514F62",
+";s	c #545365",
+">s	c #878895",
+",s	c #B7B6C3",
+"'s	c #6C6D7A",
+")s	c #323440",
+"!s	c #252E35",
+"~s	c #3C3D4B",
+"{s	c #535365",
+"]s	c #696874",
+"^s	c #97979D",
+"/s	c #B7B9C0",
+"(s	c #908E95",
+"_s	c #565467",
+":s	c #646468",
+"<s	c #58595B",
+"[s	c #606062",
+"}s	c #656565",
+"|s	c #5D5C5F",
+"1s	c #616063",
+"2s	c #616161",
+"3s	c #6F6F70",
+"4s	c #77757A",
+"5s	c #807F80",
+"6s	c #ABA9AF",
+"7s	c #979796",
+"8s	c #B2B1B1",
+"9s	c #676567",
+"0s	c #565357",
+"as	c #59575E",
+"bs	c #4D4E53",
+"cs	c #525257",
+"ds	c #727175",
+"es	c #89888B",
+"fs	c #686769",
+"gs	c #656266",
+"hs	c #464549",
+"is	c #403F44",
+"js	c #3F3E43",
+"ks	c #797576",
+"ls	c #716D70",
+"ms	c #807D83",
+"ns	c #8B898F",
+"os	c #949195",
+"ps	c #87838A",
+"qs	c #A0A3B1",
+"rs	c #AAAAB7",
+"ss	c #C6C5C9",
+"ts	c #9E9CA2",
+"us	c #9A989C",
+"vs	c #3B3B40",
+"ws	c #4B4B4F",
+"xs	c #4A494E",
+"ys	c #767579",
+"zs	c #4C4C4D",
+"As	c #4A4A48",
+"Bs	c #42413E",
+"Cs	c #302F30",
+"Ds	c #313132",
+"Es	c #363637",
+"Fs	c #373638",
+"Gs	c #303031",
+"Hs	c #464544",
+"Is	c #615E4B",
+"Js	c #333332",
+"Ks	c #4A493A",
+"Ls	c #414A49",
+"Ms	c #314342",
+"Ns	c #303232",
+"Os	c #323233",
+"Ps	c #424244",
+"Qs	c #635F4E",
+"Rs	c #313232",
+"Ss	c #2F3030",
+"Ts	c #494949",
+"Us	c #363533",
+"Vs	c #454337",
+"Ws	c #383839",
+"Xs	c #3A3938",
+"Ys	c #423F33",
+"Zs	c #494734",
+"`s	c #454236",
+" t	c #403E38",
+".t	c #504F3A",
+"+t	c #4A483C",
+"@t	c #464445",
+"#t	c #4E4A4B",
+"$t	c #484638",
+"%t	c #454335",
+"&t	c #474538",
+"*t	c #575444",
+"=t	c #535050",
+"-t	c #4C4748",
+";t	c #45413F",
+">t	c #473F3C",
+",t	c #969984",
+"'t	c #8B9077",
+")t	c #ACB295",
+"!t	c #B2B698",
+"~t	c #B6B89A",
+"{t	c #B4B99C",
+"]t	c #A3AC93",
+"^t	c #2B2E2D",
+"/t	c #464551",
+"(t	c #454855",
+"_t	c #5B5A68",
+":t	c #A2A6B5",
+"<t	c #989BA7",
+"[t	c #464556",
+"}t	c #333443",
+"|t	c #40444D",
+"1t	c #363B4A",
+"2t	c #434559",
+"3t	c #4F4D63",
+"4t	c #4B4A5D",
+"5t	c #585769",
+"6t	c #525364",
+"7t	c #47485B",
+"8t	c #4C4C5D",
+"9t	c #7B7B80",
+"0t	c #E0E0E0",
+"at	c #A4A2A9",
+"bt	c #545169",
+"ct	c #565367",
+"dt	c #5A5868",
+"et	c #74757A",
+"ft	c #737372",
+"gt	c #6A6A6B",
+"ht	c #707172",
+"it	c #79797B",
+"jt	c #949194",
+"kt	c #8E8B8F",
+"lt	c #525456",
+"mt	c #474648",
+"nt	c #949494",
+"ot	c #D7D6D6",
+"pt	c #6C6A6B",
+"qt	c #565456",
+"rt	c #56545A",
+"st	c #45464B",
+"tt	c #4D4C55",
+"ut	c #57565E",
+"vt	c #525058",
+"wt	c #4A4A4F",
+"xt	c #5C5962",
+"yt	c #565253",
+"zt	c #504E54",
+"At	c #747278",
+"Bt	c #87848A",
+"Ct	c #706E73",
+"Dt	c #5F5B62",
+"Et	c #A9A7B1",
+"Ft	c #A4A2AC",
+"Gt	c #C7C6CA",
+"Ht	c #99979B",
+"It	c #99969B",
+"Jt	c #5B5A5C",
+"Kt	c #73737C",
+"Lt	c #A8ABBA",
+"Mt	c #A3A0A9",
+"Nt	c #939097",
+"Ot	c #726E75",
+"Pt	c #69676C",
+"Qt	c #666564",
+"Rt	c #787673",
+"St	c #8A8883",
+"Tt	c #7B777D",
+"Ut	c #6F6D71",
+"Vt	c #817E84",
+"Wt	c #3F3F38",
+"Xt	c #3F3D37",
+"Yt	c #39393A",
+"Zt	c #414143",
+"`t	c #333334",
+" u	c #2E2F2F",
+".u	c #343435",
+"+u	c #3B3939",
+"@u	c #504C3A",
+"#u	c #3A393B",
+"$u	c #434139",
+"%u	c #3F3D3D",
+"&u	c #3E5653",
+"*u	c #3F5551",
+"=u	c #3F3E41",
+"-u	c #413F3E",
+";u	c #3F4041",
+">u	c #4A494A",
+",u	c #4C4B4C",
+"'u	c #575655",
+")u	c #666461",
+"!u	c #7D7965",
+"~u	c #5F5D5C",
+"{u	c #545250",
+"]u	c #9B9568",
+"^u	c #8F8A67",
+"/u	c #898564",
+"(u	c #4C494B",
+"_u	c #7C7862",
+":u	c #958E66",
+"<u	c #918B65",
+"[u	c #505050",
+"}u	c #504E4E",
+"|u	c #6A6444",
+"1u	c #69624A",
+"2u	c #706A4D",
+"3u	c #716C4D",
+"4u	c #555251",
+"5u	c #484546",
+"6u	c #4C4646",
+"7u	c #47403B",
+"8u	c #979682",
+"9u	c #8A8F79",
+"0u	c #8C947F",
+"au	c #8E9782",
+"bu	c #9CA38B",
+"cu	c #A0A78D",
+"du	c #A5A98D",
+"eu	c #ABB093",
+"fu	c #B4B799",
+"gu	c #B1B99C",
+"hu	c #63685D",
+"iu	c #323437",
+"ju	c #E3E3E2",
+"ku	c #F3F4F3",
+"lu	c #6E6D74",
+"mu	c #353545",
+"nu	c #4D4D5D",
+"ou	c #565C63",
+"pu	c #50545F",
+"qu	c #484C59",
+"ru	c #434256",
+"su	c #414351",
+"tu	c #535562",
+"uu	c #48485A",
+"vu	c #4E4E61",
+"wu	c #444355",
+"xu	c #737382",
+"yu	c #94939D",
+"zu	c #50525F",
+"Au	c #474659",
+"Bu	c #43424F",
+"Cu	c #65646C",
+"Du	c #545767",
+"Eu	c #5F677D",
+"Fu	c #6C758E",
+"Gu	c #515168",
+"Hu	c #524F6A",
+"Iu	c #535069",
+"Ju	c #63616E",
+"Ku	c #949395",
+"Lu	c #838084",
+"Mu	c #858184",
+"Nu	c #B8B7BD",
+"Ou	c #919192",
+"Pu	c #737072",
+"Qu	c #5C5A5C",
+"Ru	c #525156",
+"Su	c #4C4B4F",
+"Tu	c #3D3B42",
+"Uu	c #3D3C46",
+"Vu	c #43434D",
+"Wu	c #53515D",
+"Xu	c #6B6971",
+"Yu	c #5D5965",
+"Zu	c #9D9BA4",
+"`u	c #A4A2AA",
+" v	c #99979C",
+".v	c #89868C",
+"+v	c #4E4D52",
+"@v	c #9C9AA2",
+"#v	c #A7A5B0",
+"$v	c #B1AFB4",
+"%v	c #9B999E",
+"&v	c #86848A",
+"*v	c #504C50",
+"=v	c #5B5458",
+"-v	c #696364",
+";v	c #5A575A",
+">v	c #747075",
+",v	c #88858B",
+"'v	c #706E6E",
+")v	c #777570",
+"!v	c #848288",
+"~v	c #434443",
+"{v	c #3A3A3A",
+"]v	c #2B2B2B",
+"^v	c #1C1E1D",
+"/v	c #171A18",
+"(v	c #3D3F3E",
+"_v	c #1A1C1D",
+":v	c #2E2E30",
+"<v	c #2B2A2B",
+"[v	c #464646",
+"}v	c #313131",
+"|v	c #2A2B2B",
+"1v	c #414043",
+"2v	c #272929",
+"3v	c #1C1D1E",
+"4v	c #303130",
+"5v	c #2B2C2D",
+"6v	c #3E3E3E",
+"7v	c #292A2B",
+"8v	c #363739",
+"9v	c #494748",
+"0v	c #4B494A",
+"av	c #434242",
+"bv	c #A3A2A9",
+"cv	c #C3C2CB",
+"dv	c #CBCACF",
+"ev	c #C9C8CF",
+"fv	c #3E3D3D",
+"gv	c #7C7A7E",
+"hv	c #BFBEC6",
+"iv	c #D1D1D7",
+"jv	c #C3C1CA",
+"kv	c #676667",
+"lv	c #575658",
+"mv	c #BBBAC3",
+"nv	c #CFCED5",
+"ov	c #BDBCC5",
+"pv	c #8B8A8E",
+"qv	c #3B3C3C",
+"rv	c #28292A",
+"sv	c #464749",
+"tv	c #484748",
+"uv	c #444241",
+"vv	c #46403F",
+"wv	c #9A9985",
+"xv	c #8A927B",
+"yv	c #8E957F",
+"zv	c #909883",
+"Av	c #939B86",
+"Bv	c #A6AA8E",
+"Cv	c #A7AD90",
+"Dv	c #ACB497",
+"Ev	c #ADB498",
+"Fv	c #9DA18A",
+"Gv	c #8E9380",
+"Hv	c #A0A398",
+"Iv	c #ABACAA",
+"Jv	c #D6D6D6",
+"Kv	c #F3F5F3",
+"Lv	c #96969A",
+"Mv	c #454353",
+"Nv	c #2F313E",
+"Ov	c #4D4D5E",
+"Pv	c #4D4C61",
+"Qv	c #44454F",
+"Rv	c #76747C",
+"Sv	c #656570",
+"Tv	c #3D3E53",
+"Uv	c #464658",
+"Vv	c #343740",
+"Wv	c #727178",
+"Xv	c #3D3D4A",
+"Yv	c #3E3F4F",
+"Zv	c #54556B",
+"`v	c #6E849E",
+" w	c #7F97AF",
+".w	c #95A8B9",
+"+w	c #A5ADBA",
+"@w	c #585A67",
+"#w	c #535164",
+"$w	c #76757B",
+"%w	c #686667",
+"&w	c #565656",
+"*w	c #636262",
+"=w	c #6A696A",
+"-w	c #828182",
+";w	c #ACAAAF",
+">w	c #979596",
+",w	c #57565C",
+"'w	c #6E6C6D",
+")w	c #56545B",
+"!w	c #57575F",
+"~w	c #615F66",
+"{w	c #5D595F",
+"]w	c #A8A6B1",
+"^w	c #A2A0A7",
+"/w	c #AFADB3",
+"(w	c #99989F",
+"_w	c #8B8A91",
+":w	c #504E56",
+"<w	c #707076",
+"[w	c #6A676F",
+"}w	c #79767B",
+"|w	c #706C6C",
+"1w	c #94928F",
+"2w	c #A09EA5",
+"3w	c #99969C",
+"4w	c #97959B",
+"5w	c #504D51",
+"6w	c #7E797E",
+"7w	c #5F5D63",
+"8w	c #626166",
+"9w	c #7C7A7F",
+"0w	c #777478",
+"aw	c #323231",
+"bw	c #232322",
+"cw	c #1E1E1F",
+"dw	c #3D3E3D",
+"ew	c #403F42",
+"fw	c #282A29",
+"gw	c #404141",
+"hw	c #0D0E0E",
+"iw	c #363738",
+"jw	c #161819",
+"kw	c #494848",
+"lw	c #484647",
+"mw	c #97969C",
+"nw	c #AFAEB6",
+"ow	c #B7B6BD",
+"pw	c #B0AEB5",
+"qw	c #A8A6AE",
+"rw	c #BAB8BE",
+"sw	c #5D5C5D",
+"tw	c #545353",
+"uw	c #BBB9BE",
+"vw	c #A7A5AC",
+"ww	c #7A797E",
+"xw	c #151616",
+"yw	c #1A1B1A",
+"zw	c #495C59",
+"Aw	c #43403F",
+"Bw	c #484242",
+"Cw	c #473F3D",
+"Dw	c #9B9984",
+"Ew	c #8D8E76",
+"Fw	c #8F8F76",
+"Gw	c #8E9681",
+"Hw	c #A3A98E",
+"Iw	c #A5AA90",
+"Jw	c #9BA289",
+"Kw	c #93978A",
+"Lw	c #999C96",
+"Mw	c #BBBDB9",
+"Nw	c #F0F1F0",
+"Ow	c #EFF0EF",
+"Pw	c #F2F4F1",
+"Qw	c #9B9C9E",
+"Rw	c #4B4C5B",
+"Sw	c #4C4A60",
+"Tw	c #474753",
+"Uw	c #56545F",
+"Vw	c #62626E",
+"Ww	c #373A4C",
+"Xw	c #22242E",
+"Yw	c #77737A",
+"Zw	c #7A7882",
+"`w	c #303241",
+" x	c #4E4C62",
+".x	c #383845",
+"+x	c #383C47",
+"@x	c #565E6F",
+"#x	c #5A5B6B",
+"$x	c #4F5361",
+"%x	c #E0E1E2",
+"&x	c #DEDFDF",
+"*x	c #E1E1E2",
+"=x	c #76777D",
+"-x	c #585864",
+";x	c #4E4F63",
+">x	c #515067",
+",x	c #6D6C74",
+"'x	c #6E6D6E",
+")x	c #565757",
+"!x	c #555656",
+"~x	c #69686B",
+"{x	c #767678",
+"]x	c #7E7B7E",
+"^x	c #8D8D8F",
+"/x	c #BDBCBD",
+"(x	c #676466",
+"_x	c #535355",
+":x	c #56555E",
+"<x	c #504F57",
+"[x	c #46464B",
+"}x	c #8B8990",
+"|x	c #98969C",
+"1x	c #79787D",
+"2x	c #646268",
+"3x	c #6D6A6D",
+"4x	c #88847B",
+"5x	c #94928E",
+"6x	c #85848A",
+"7x	c #8F8E95",
+"8x	c #8C898F",
+"9x	c #8C8B91",
+"0x	c #ABA9B4",
+"ax	c #AAA9B0",
+"bx	c #97949A",
+"cx	c #7F7D83",
+"dx	c #565359",
+"ex	c #49464E",
+"fx	c #47444C",
+"gx	c #626165",
+"hx	c #777C82",
+"ix	c #8C8F9C",
+"jx	c #282928",
+"kx	c #2A2A2B",
+"lx	c #242423",
+"mx	c #242524",
+"nx	c #3A3B38",
+"ox	c #252525",
+"px	c #242523",
+"qx	c #403F41",
+"rx	c #403E3C",
+"sx	c #222321",
+"tx	c #323332",
+"ux	c #4A4647",
+"vx	c #2A2A2A",
+"wx	c #222422",
+"xx	c #292926",
+"yx	c #4D484C",
+"zx	c #4B4A4C",
+"Ax	c #454344",
+"Bx	c #42403F",
+"Cx	c #44423D",
+"Dx	c #413F40",
+"Ex	c #434142",
+"Fx	c #3E3B3A",
+"Gx	c #423F3E",
+"Hx	c #403C3E",
+"Ix	c #3F3E3D",
+"Jx	c #484644",
+"Kx	c #403F3E",
+"Lx	c #494545",
+"Mx	c #4B4A46",
+"Nx	c #484645",
+"Ox	c #4A4745",
+"Px	c #454444",
+"Qx	c #262525",
+"Rx	c #262625",
+"Sx	c #32302F",
+"Tx	c #4E615F",
+"Ux	c #444848",
+"Vx	c #484243",
+"Wx	c #423E3B",
+"Xx	c #463D3A",
+"Yx	c #989784",
+"Zx	c #8E8E75",
+"`x	c #8C917A",
+" y	c #8D9781",
+".y	c #99A18A",
+"+y	c #888D7C",
+"@y	c #83877B",
+"#y	c #838780",
+"$y	c #AEB0AE",
+"%y	c #EDF0ED",
+"&y	c #EEF1EE",
+"*y	c #F0F0EF",
+"=y	c #DBDCDD",
+"-y	c #EBEDEA",
+";y	c #F4F6F3",
+">y	c #77767E",
+",y	c #494756",
+"'y	c #3F404B",
+")y	c #505056",
+"!y	c #85838B",
+"~y	c #424350",
+"{y	c #20212A",
+"]y	c #32333E",
+"^y	c #4F525E",
+"/y	c #565565",
+"(y	c #535360",
+"_y	c #767785",
+":y	c #5E5E6B",
+"<y	c #454658",
+"[y	c #49495A",
+"}y	c #7B7A7C",
+"|y	c #949497",
+"1y	c #69706D",
+"2y	c #5E6169",
+"3y	c #5B5766",
+"4y	c #2B2A28",
+"5y	c #484746",
+"6y	c #292624",
+"7y	c #4D4C4D",
+"8y	c #848284",
+"9y	c #A4A3A7",
+"0y	c #8D8D8E",
+"ay	c #6C696C",
+"by	c #5A595C",
+"cy	c #54525C",
+"dy	c #48464D",
+"ey	c #706F74",
+"fy	c #545458",
+"gy	c #4B4A51",
+"hy	c #514F57",
+"iy	c #6A6970",
+"jy	c #5C595E",
+"ky	c #9B9AA5",
+"ly	c #A3A2AE",
+"my	c #BEBCC0",
+"ny	c #9796A0",
+"oy	c #656469",
+"py	c #AEADB8",
+"qy	c #ACAAB3",
+"ry	c #86848B",
+"sy	c #5A5659",
+"ty	c #6D6967",
+"uy	c #807C78",
+"vy	c #6E6C6E",
+"wy	c #76797E",
+"xy	c #8C8B95",
+"yy	c #3F3F42",
+"zy	c #414042",
+"Ay	c #363633",
+"By	c #323234",
+"Cy	c #333435",
+"Dy	c #3C3C3D",
+"Ey	c #444445",
+"Fy	c #363634",
+"Gy	c #45443A",
+"Hy	c #3E3F40",
+"Iy	c #444239",
+"Jy	c #3E3E3F",
+"Ky	c #67624B",
+"Ly	c #7A6F45",
+"My	c #847D47",
+"Ny	c #5A5440",
+"Oy	c #415455",
+"Py	c #4E5A5C",
+"Qy	c #4C494C",
+"Ry	c #645F40",
+"Sy	c #756E41",
+"Ty	c #484846",
+"Uy	c #686247",
+"Vy	c #7D7441",
+"Wy	c #796F3F",
+"Xy	c #736B43",
+"Yy	c #6D654B",
+"Zy	c #535247",
+"`y	c #797246",
+" z	c #827A46",
+".z	c #786F43",
+"+z	c #77714A",
+"@z	c #5B5643",
+"#z	c #736B46",
+"$z	c #756E49",
+"%z	c #665F42",
+"&z	c #527474",
+"*z	c #446562",
+"=z	c #474142",
+"-z	c #403C3A",
+";z	c #463D3B",
+">z	c #989783",
+",z	c #8D8D75",
+"'z	c #8D927A",
+")z	c #858D7B",
+"!z	c #676C61",
+"~z	c #868983",
+"{z	c #ACAEAC",
+"]z	c #D2D3D2",
+"^z	c #EBEBEA",
+"/z	c #EDEFED",
+"(z	c #D8D8DA",
+"_z	c #EAE9E9",
+":z	c #CCCDCD",
+"<z	c #A8A6AF",
+"[z	c #959698",
+"}z	c #DDDEDD",
+"|z	c #A8A8AC",
+"1z	c #484754",
+"2z	c #444651",
+"3z	c #4F4E5B",
+"4z	c #5F6463",
+"5z	c #52535C",
+"6z	c #1E212B",
+"7z	c #282831",
+"8z	c #2F3239",
+"9z	c #434355",
+"0z	c #535068",
+"az	c #4F4D62",
+"bz	c #626470",
+"cz	c #5C5D67",
+"dz	c #3D404D",
+"ez	c #545262",
+"fz	c #2A2C33",
+"gz	c #898B99",
+"hz	c #8F8E97",
+"iz	c #3E3E4E",
+"jz	c #4D4B5E",
+"kz	c #5A596A",
+"lz	c #676E7F",
+"mz	c #67697B",
+"nz	c #5F606C",
+"oz	c #5A5B64",
+"pz	c #504F67",
+"qz	c #585569",
+"rz	c #5F5E63",
+"sz	c #434343",
+"tz	c #212020",
+"uz	c #2D2A2C",
+"vz	c #4F4E4E",
+"wz	c #232120",
+"xz	c #515152",
+"yz	c #5F6063",
+"zz	c #757578",
+"Az	c #ABAAAF",
+"Bz	c #454546",
+"Cz	c #8C8D8D",
+"Dz	c #7F7D7E",
+"Ez	c #615E60",
+"Fz	c #505154",
+"Gz	c #47474E",
+"Hz	c #393A3E",
+"Iz	c #3F3F43",
+"Jz	c #6D6B73",
+"Kz	c #5D5B64",
+"Lz	c #615F69",
+"Mz	c #95939B",
+"Nz	c #9F9DA6",
+"Oz	c #979499",
+"Pz	c #8E8B92",
+"Qz	c #565458",
+"Rz	c #8A888F",
+"Sz	c #A9A7B2",
+"Tz	c #ABAAB2",
+"Uz	c #A2A0A8",
+"Vz	c #928F95",
+"Wz	c #6A686D",
+"Xz	c #636164",
+"Yz	c #78767A",
+"Zz	c #787474",
+"`z	c #797675",
+" A	c #6F6D70",
+".A	c #6C6A6E",
+"+A	c #817E82",
+"@A	c #49494A",
+"#A	c #2B2B2C",
+"$A	c #1C1D1D",
+"%A	c #343636",
+"&A	c #262929",
+"*A	c #2D2E2D",
+"=A	c #2C2D2E",
+"-A	c #353436",
+";A	c #2A2A2C",
+">A	c #464747",
+",A	c #202020",
+"'A	c #323235",
+")A	c #333436",
+"!A	c #282929",
+"~A	c #2F558E",
+"{A	c #39629E",
+"]A	c #35609A",
+"^A	c #3C6192",
+"/A	c #3E3C3C",
+"(A	c #424141",
+"_A	c #9F9EA3",
+":A	c #C3C2C9",
+"<A	c #C5C3C9",
+"[A	c #C8C7CD",
+"}A	c #7B7C7E",
+"|A	c #C5C5CD",
+"1A	c #CFCFD4",
+"2A	c #C7C7CB",
+"3A	c #595757",
+"4A	c #C6C5CB",
+"5A	c #D0D0D4",
+"6A	c #CCCCD3",
+"7A	c #8A898B",
+"8A	c #3C3B3B",
+"9A	c #3A393A",
+"0A	c #3F4043",
+"aA	c #495050",
+"bA	c #484343",
+"cA	c #423C3B",
+"dA	c #453C3A",
+"eA	c #8E9181",
+"fA	c #656B60",
+"gA	c #9B9D9A",
+"hA	c #BDBDBD",
+"iA	c #E4E5E4",
+"jA	c #E8E9E8",
+"kA	c #AAAAB1",
+"lA	c #B9B7BB",
+"mA	c #A4A3A4",
+"nA	c #AEAFAF",
+"oA	c #B3B3B6",
+"pA	c #7F7E85",
+"qA	c #494859",
+"rA	c #595C69",
+"sA	c #787F8A",
+"tA	c #71747C",
+"uA	c #5C5B66",
+"vA	c #4B495F",
+"wA	c #575864",
+"xA	c #434556",
+"yA	c #4A485C",
+"zA	c #424351",
+"AA	c #52525A",
+"BA	c #928F94",
+"CA	c #585B66",
+"DA	c #454754",
+"EA	c #404051",
+"FA	c #2C2F35",
+"GA	c #3A3E45",
+"HA	c #4A5560",
+"IA	c #636373",
+"JA	c #585667",
+"KA	c #C7C6C9",
+"LA	c #C6C8C9",
+"MA	c #D4D4D4",
+"NA	c #5E5B64",
+"OA	c #4F504E",
+"PA	c #2A2B29",
+"QA	c #353233",
+"RA	c #666668",
+"SA	c #797F89",
+"TA	c #787C84",
+"UA	c #7E818A",
+"VA	c #808083",
+"WA	c #A1A0A5",
+"XA	c #8B8B8C",
+"YA	c #666364",
+"ZA	c #515355",
+"`A	c #58555C",
+" B	c #6C6866",
+".B	c #565459",
+"+B	c #5B595E",
+"@B	c #646368",
+"#B	c #646068",
+"$B	c #55535E",
+"%B	c #A7A7B4",
+"&B	c #A2A2AF",
+"*B	c #C5C3C7",
+"=B	c #98969B",
+"-B	c #7C7A82",
+";B	c #78777E",
+">B	c #68676B",
+",B	c #5B5961",
+"'B	c #7C797F",
+")B	c #878482",
+"!B	c #9E9C9D",
+"~B	c #96939A",
+"{B	c #7C7A80",
+"]B	c #747076",
+"^B	c #9E9DA1",
+"/B	c #646367",
+"(B	c #646267",
+"_B	c #5F5D5F",
+":B	c #1E1F1F",
+"<B	c #1F201F",
+"[B	c #414342",
+"}B	c #111414",
+"|B	c #333235",
+"1B	c #1C1C1C",
+"2B	c #434444",
+"3B	c #404142",
+"4B	c #1F1F1F",
+"5B	c #464847",
+"6B	c #373536",
+"7B	c #295087",
+"8B	c #274F8B",
+"9B	c #24508A",
+"0B	c #3A3839",
+"aB	c #3B3A3A",
+"bB	c #939299",
+"cB	c #AAA8AF",
+"dB	c #BAB9BD",
+"eB	c #AEACB5",
+"fB	c #3A3939",
+"gB	c #545352",
+"hB	c #B6B4B8",
+"iB	c #343735",
+"jB	c #535555",
+"kB	c #454D4C",
+"lB	c #3F3D3C",
+"mB	c #443F3E",
+"nB	c #3F3A38",
+"oB	c #443B39",
+"pB	c #B1B3B1",
+"qB	c #D1D2D3",
+"rB	c #E7E6E6",
+"sB	c #DBDBDC",
+"tB	c #B3B1BA",
+"uB	c #ABABB2",
+"vB	c #AAABAC",
+"wB	c #C7C8CB",
+"xB	c #A9A9AC",
+"yB	c #585862",
+"zB	c #4B4B58",
+"AB	c #5B5966",
+"BB	c #605F6A",
+"CB	c #5A6077",
+"DB	c #A4ADC5",
+"EB	c #8A8890",
+"FB	c #545561",
+"GB	c #4B4B5D",
+"HB	c #3D3F49",
+"IB	c #817C82",
+"JB	c #84838C",
+"KB	c #3A3A4B",
+"LB	c #4A4957",
+"MB	c #292A32",
+"NB	c #44424A",
+"OB	c #313443",
+"PB	c #474B5C",
+"QB	c #5B5B6E",
+"RB	c #696A75",
+"SB	c #656774",
+"TB	c #525165",
+"UB	c #CCCECE",
+"VB	c #87878B",
+"WB	c #545166",
+"XB	c #63606C",
+"YB	c #686869",
+"ZB	c #636871",
+"`B	c #525455",
+" C	c #5E5D5E",
+".C	c #636365",
+"+C	c #868388",
+"@C	c #8C8B8E",
+"#C	c #8F8C90",
+"$C	c #9D9FA0",
+"%C	c #9B9AA0",
+"&C	c #4E4D50",
+"*C	c #898989",
+"=C	c #D2D1D1",
+"-C	c #58565D",
+";C	c #545052",
+">C	c #959398",
+",C	c #69686E",
+"'C	c #6D6A71",
+")C	c #47464F",
+"!C	c #908D95",
+"~C	c #9B99A0",
+"{C	c #89878F",
+"]C	c #68636D",
+"^C	c #676469",
+"/C	c #747175",
+"(C	c #807E82",
+"_C	c #89868B",
+":C	c #75737B",
+"<C	c #AFADB8",
+"[C	c #ABA9B3",
+"}C	c #B4B2B7",
+"|C	c #979498",
+"1C	c #88858D",
+"2C	c #555159",
+"3C	c #6F6C71",
+"4C	c #45454B",
+"5C	c #4C4C52",
+"6C	c #212122",
+"7C	c #222222",
+"8C	c #222221",
+"9C	c #212323",
+"0C	c #3C3C3F",
+"aC	c #191B1C",
+"bC	c #191B1B",
+"cC	c #191A18",
+"dC	c #393736",
+"eC	c #3C5D8D",
+"fC	c #416495",
+"gC	c #476795",
+"hC	c #3D6292",
+"iC	c #403E40",
+"jC	c #515052",
+"kC	c #59595C",
+"lC	c #58575B",
+"mC	c #454345",
+"nC	c #545354",
+"oC	c #525052",
+"pC	c #454242",
+"qC	c #565254",
+"rC	c #555256",
+"sC	c #4D4C4C",
+"tC	c #3D3D3D",
+"uC	c #161815",
+"vC	c #20201F",
+"wC	c #494647",
+"xC	c #3D3B3A",
+"yC	c #423E3D",
+"zC	c #443B38",
+"AC	c #D5D4D8",
+"BC	c #9E9CA3",
+"CC	c #DDDDDD",
+"DC	c #BABABC",
+"EC	c #828389",
+"FC	c #828489",
+"GC	c #9C9F9F",
+"HC	c #E2E3E2",
+"IC	c #BCBDC0",
+"JC	c #949599",
+"KC	c #62666C",
+"LC	c #4B4F5A",
+"MC	c #474D55",
+"NC	c #494C57",
+"OC	c #454753",
+"PC	c #9DA8BE",
+"QC	c #AAAFBD",
+"RC	c #727179",
+"SC	c #4B4957",
+"TC	c #2C313C",
+"UC	c #454954",
+"VC	c #2C313D",
+"WC	c #3A3E4A",
+"XC	c #2B2B36",
+"YC	c #55525A",
+"ZC	c #4E4D57",
+"`C	c #2B2F40",
+" D	c #49475A",
+".D	c #555A6F",
+"+D	c #656977",
+"@D	c #525D69",
+"#D	c #535363",
+"$D	c #484757",
+"%D	c #595A63",
+"&D	c #908E94",
+"*D	c #65666E",
+"=D	c #474657",
+"-D	c #3E414B",
+";D	c #444455",
+">D	c #5E5F6F",
+",D	c #58566A",
+"'D	c #605E6D",
+")D	c #5D5E60",
+"!D	c #2F2F2D",
+"~D	c #292726",
+"{D	c #4C4B4B",
+"]D	c #666367",
+"^D	c #AAACAC",
+"/D	c #959599",
+"(D	c #888788",
+"_D	c #757173",
+":D	c #5C595B",
+"<D	c #48464C",
+"[D	c #4D4A54",
+"}D	c #7D7B84",
+"|D	c #55535C",
+"1D	c #57545E",
+"2D	c #4A454A",
+"3D	c #4F4C53",
+"4D	c #545259",
+"5D	c #78737B",
+"6D	c #7E7D83",
+"7D	c #A5A3AB",
+"8D	c #A19EA2",
+"9D	c #928E92",
+"0D	c #7E7981",
+"aD	c #ABADBB",
+"bD	c #A9A9B6",
+"cD	c #ADACB4",
+"dD	c #97979F",
+"eD	c #4C484C",
+"fD	c #6A6868",
+"gD	c #7C7B80",
+"hD	c #727076",
+"iD	c #3B3B3D",
+"jD	c #3D3E40",
+"kD	c #3F3F40",
+"lD	c #3F3D3E",
+"mD	c #545142",
+"nD	c #404043",
+"oD	c #5F5B48",
+"pD	c #92884E",
+"qD	c #444A45",
+"rD	c #406D6A",
+"sD	c #445250",
+"tD	c #4D6C98",
+"uD	c #4F6B98",
+"vD	c #57739D",
+"wD	c #506D98",
+"xD	c #393738",
+"yD	c #464344",
+"zD	c #464241",
+"AD	c #5E5844",
+"BD	c #444143",
+"CD	c #434241",
+"DD	c #635C46",
+"ED	c #5B5746",
+"FD	c #887F4A",
+"GD	c #897F4D",
+"HD	c #474445",
+"ID	c #756D4C",
+"JD	c #877C4E",
+"KD	c #8D8250",
+"LD	c #756C4B",
+"MD	c #4A4748",
+"ND	c #423D3D",
+"OD	c #3D3937",
+"PD	c #423A37",
+"QD	c #C9C8CA",
+"RD	c #C6C5C8",
+"SD	c #D0D1D4",
+"TD	c #87868F",
+"UD	c #878690",
+"VD	c #7E7D82",
+"WD	c #C3C4C4",
+"XD	c #D1D1D3",
+"YD	c #A3A3A7",
+"ZD	c #626570",
+"`D	c #3F3F4B",
+" E	c #424650",
+".E	c #6C717E",
+"+E	c #8E94A6",
+"@E	c #78777D",
+"#E	c #585965",
+"$E	c #31323E",
+"%E	c #4E525F",
+"&E	c #424551",
+"*E	c #272B34",
+"=E	c #41424F",
+"-E	c #555665",
+";E	c #504F5F",
+">E	c #565465",
+",E	c #4F4D69",
+"'E	c #454B5A",
+")E	c #575E6B",
+"!E	c #4D4B62",
+"~E	c #41434E",
+"{E	c #7E7A80",
+"]E	c #85858F",
+"^E	c #3F4052",
+"/E	c #4E4D61",
+"(E	c #2B2C36",
+"_E	c #5D5D67",
+":E	c #363841",
+"<E	c #3B3D50",
+"[E	c #585566",
+"}E	c #7D8495",
+"|E	c #99A2AA",
+"1E	c #CDCCD0",
+"2E	c #7D7E88",
+"3E	c #555269",
+"4E	c #696979",
+"5E	c #57585B",
+"6E	c #201F1F",
+"7E	c #373635",
+"8E	c #514F50",
+"9E	c #484848",
+"0E	c #6C6F78",
+"aE	c #6A6D72",
+"bE	c #AEB3AE",
+"cE	c #919093",
+"dE	c #4E4C4F",
+"eE	c #818282",
+"fE	c #918F90",
+"gE	c #625E61",
+"hE	c #535155",
+"iE	c #46454B",
+"jE	c #3C3B42",
+"kE	c #3A3B43",
+"lE	c #3A3B42",
+"mE	c #44434A",
+"nE	c #605E67",
+"oE	c #6D696A",
+"pE	c #7A777D",
+"qE	c #8F8C94",
+"rE	c #969297",
+"sE	c #79777F",
+"tE	c #A8A8B3",
+"uE	c #ADABB2",
+"vE	c #969296",
+"wE	c #807D82",
+"xE	c #524F55",
+"yE	c #5D5C63",
+"zE	c #6A696E",
+"AE	c #726F73",
+"BE	c #787574",
+"CE	c #858484",
+"DE	c #81848F",
+"EE	c #798296",
+"FE	c #7088A2",
+"GE	c #7989A0",
+"HE	c #73747E",
+"IE	c #797780",
+"JE	c #414142",
+"KE	c #1C1D1F",
+"LE	c #1C1E1F",
+"ME	c #1F2120",
+"NE	c #1E211F",
+"OE	c #212224",
+"PE	c #2D2E2E",
+"QE	c #212322",
+"RE	c #323131",
+"SE	c #2A4D84",
+"TE	c #254C85",
+"UE	c #254B85",
+"VE	c #254A83",
+"WE	c #393737",
+"XE	c #9F9FA1",
+"YE	c #626263",
+"ZE	c #9F9FA2",
+"`E	c #9B9A9E",
+" F	c #5C5B5C",
+".F	c #4D4D4B",
+"+F	c #A09EA3",
+"@F	c #A1A0A4",
+"#F	c #33537D",
+"$F	c #3F5C89",
+"%F	c #425E8A",
+"&F	c #445C82",
+"*F	c #454243",
+"=F	c #3C3B39",
+"-F	c #433E3D",
+";F	c #3E3A38",
+">F	c #AEADB4",
+",F	c #A7A6AD",
+"'F	c #868488",
+")F	c #D5D4D5",
+"!F	c #C3C4C8",
+"~F	c #ADAEB1",
+"{F	c #7B7F7E",
+"]F	c #626367",
+"^F	c #3F404E",
+"/F	c #4B4D58",
+"(F	c #757788",
+"_F	c #7F7E84",
+":F	c #5F5E6B",
+"<F	c #424755",
+"[F	c #808599",
+"}F	c #424851",
+"|F	c #343743",
+"1F	c #40404C",
+"2F	c #565E5F",
+"3F	c #56575D",
+"4F	c #5C6473",
+"5F	c #949DB5",
+"6F	c #8E8D93",
+"7F	c #4A4A58",
+"8F	c #625F68",
+"9F	c #71707A",
+"0F	c #3D414F",
+"aF	c #49495E",
+"bF	c #2F313C",
+"cF	c #75737A",
+"dF	c #2F303F",
+"eF	c #4C4A5C",
+"fF	c #4F4D5F",
+"gF	c #4C4A5B",
+"hF	c #677281",
+"iF	c #555565",
+"jF	c #525162",
+"kF	c #51505F",
+"lF	c #ADAFB6",
+"mF	c #D1D1D1",
+"nF	c #BCBCBA",
+"oF	c #B5B5B8",
+"pF	c #575565",
+"qF	c #585768",
+"rF	c #5D5C68",
+"sF	c #333333",
+"tF	c #454645",
+"uF	c #5F5E5F",
+"vF	c #636366",
+"wF	c #A4A4A6",
+"xF	c #868589",
+"yF	c #4D4B4E",
+"zF	c #7D7D7E",
+"AF	c #BAB8B9",
+"BF	c #666365",
+"CF	c #535154",
+"DF	c #555158",
+"EF	c #6D6A68",
+"FF	c #676464",
+"GF	c #585660",
+"HF	c #636169",
+"IF	c #605D65",
+"JF	c #A6A4AD",
+"KF	c #A3A1AA",
+"LF	c #B8B6BA",
+"MF	c #969397",
+"NF	c #514F53",
+"OF	c #9998A3",
+"PF	c #8C8A8F",
+"QF	c #736E75",
+"RF	c #686467",
+"SF	c #75706F",
+"TF	c #8B8882",
+"UF	c #88868D",
+"VF	c #918E93",
+"WF	c #817F84",
+"XF	c #6B7D9D",
+"YF	c #879BC1",
+"ZF	c #8C9FBE",
+"`F	c #94A6C2",
+" G	c #97A9C2",
+".G	c #757C8C",
+"+G	c #868287",
+"@G	c #161818",
+"#G	c #161719",
+"$G	c #151617",
+"%G	c #151618",
+"&G	c #343334",
+"*G	c #515251",
+"=G	c #565756",
+"-G	c #292B2A",
+";G	c #575857",
+">G	c #2B4D83",
+",G	c #254A84",
+"'G	c #234A83",
+")G	c #224780",
+"!G	c #908E93",
+"~G	c #B9B7BC",
+"{G	c #C1C0C2",
+"]G	c #B1AFB5",
+"^G	c #6B6A6C",
+"/G	c #A9A8AE",
+"(G	c #B3B2B7",
+"_G	c #636162",
+":G	c #B4B1B5",
+"<G	c #343231",
+"[G	c #4B6D9B",
+"}G	c #5875A1",
+"|G	c #617DA8",
+"1G	c #4E6F9A",
+"2G	c #403E3D",
+"3G	c #423D3C",
+"4G	c #3C3635",
+"5G	c #403935",
+"6G	c #A3A4A7",
+"7G	c #AFAFB1",
+"8G	c #B5B5B9",
+"9G	c #8A8B8E",
+"0G	c #6A6A72",
+"aG	c #47495C",
+"bG	c #4B4F5B",
+"cG	c #6F7175",
+"dG	c #656970",
+"eG	c #414652",
+"fG	c #373949",
+"gG	c #98A1BB",
+"hG	c #86868F",
+"iG	c #454850",
+"jG	c #393B47",
+"kG	c #313947",
+"lG	c #2F333E",
+"mG	c #41414B",
+"nG	c #4D4C5A",
+"oG	c #71788D",
+"pG	c #848792",
+"qG	c #66646F",
+"rG	c #4C4C57",
+"sG	c #32353D",
+"tG	c #777C8E",
+"uG	c #555861",
+"vG	c #353742",
+"wG	c #585960",
+"xG	c #65656B",
+"yG	c #5F6068",
+"zG	c #525360",
+"AG	c #373A4A",
+"BG	c #494A58",
+"CG	c #383848",
+"DG	c #525465",
+"EG	c #535163",
+"FG	c #5A5867",
+"GG	c #464653",
+"HG	c #82838F",
+"IG	c #7C7B86",
+"JG	c #525064",
+"KG	c #52515A",
+"LG	c #E2E2E2",
+"MG	c #96969B",
+"NG	c #5D5C67",
+"OG	c #4C4C58",
+"PG	c #5E5F64",
+"QG	c #646B76",
+"RG	c #575B5E",
+"SG	c #535454",
+"TG	c #7A797C",
+"UG	c #9D9CA1",
+"VG	c #818083",
+"WG	c #4C4A4D",
+"XG	c #7A7B7B",
+"YG	c #DDDCDC",
+"ZG	c #575458",
+"`G	c #5F5A59",
+" H	c #585258",
+".H	c #636165",
+"+H	c #76737A",
+"@H	c #49494E",
+"#H	c #8E8C95",
+"$H	c #98959A",
+"%H	c #817D82",
+"&H	c #5A565B",
+"*H	c #585654",
+"=H	c #4E4D4F",
+"-H	c #726C76",
+";H	c #8F8A92",
+">H	c #6D696F",
+",H	c #666369",
+"'H	c #ACAAB2",
+")H	c #ADACB5",
+"!H	c #98959B",
+"~H	c #5F6D83",
+"{H	c #BBC3D4",
+"]H	c #9EAAC0",
+"^H	c #91A1BD",
+"/H	c #8199B4",
+"(H	c #767F96",
+"_H	c #89858A",
+":H	c #191C1A",
+"<H	c #141616",
+"[H	c #151615",
+"}H	c #141614",
+"|H	c #131513",
+"1H	c #131614",
+"2H	c #111311",
+"3H	c #141715",
+"4H	c #3B3A3C",
+"5H	c #0C0E0C",
+"6H	c #232523",
+"7H	c #393839",
+"8H	c #243B5C",
+"9H	c #1E395D",
+"0H	c #1E385C",
+"aH	c #21395B",
+"bH	c #3E3B3D",
+"cH	c #3C393B",
+"dH	c #636163",
+"eH	c #444242",
+"fH	c #6C6B6C",
+"gH	c #595759",
+"hH	c #333132",
+"iH	c #3A5C8C",
+"jH	c #3C5D8F",
+"kH	c #416292",
+"lH	c #365989",
+"mH	c #3B3A38",
+"nH	c #3F3A3A",
+"oH	c #393432",
+"pH	c #413936",
+"qH	c #888991",
+"rH	c #565867",
+"sH	c #5F6361",
+"tH	c #616566",
+"uH	c #4B4B59",
+"vH	c #30333F",
+"wH	c #838EA2",
+"xH	c #96959F",
+"yH	c #5F5F68",
+"zH	c #2E323E",
+"AH	c #2E3139",
+"BH	c #2A2E3B",
+"CH	c #363A43",
+"DH	c #4C5260",
+"EH	c #677485",
+"FH	c #61616B",
+"GH	c #4D525C",
+"HH	c #2C2F39",
+"IH	c #80889D",
+"JH	c #8B90A0",
+"KH	c #4E5058",
+"LH	c #42454F",
+"MH	c #3D3E49",
+"NH	c #313340",
+"OH	c #403F4D",
+"PH	c #5C6066",
+"QH	c #A3A6A6",
+"RH	c #C2C6C4",
+"SH	c #D9DADA",
+"TH	c #2A2C36",
+"UH	c #33333B",
+"VH	c #383B46",
+"WH	c #4A485E",
+"XH	c #565466",
+"YH	c #545165",
+"ZH	c #5C5A67",
+"`H	c #62616A",
+" I	c #404453",
+".I	c #4C4D5F",
+"+I	c #383A46",
+"@I	c #6D6F7C",
+"#I	c #7E7C84",
+"$I	c #4A485A",
+"%I	c #444454",
+"&I	c #4A4B54",
+"*I	c #484652",
+"=I	c #393C43",
+"-I	c #35383F",
+";I	c #6D6A6E",
+">I	c #2B2827",
+",I	c #292626",
+"'I	c #464644",
+")I	c #282626",
+"!I	c #4F5253",
+"~I	c #585B63",
+"{I	c #55565C",
+"]I	c #6E706D",
+"^I	c #A8A7AA",
+"/I	c #7A7A7B",
+"(I	c #494751",
+"_I	c #77757B",
+":I	c #8A888D",
+"<I	c #817F86",
+"[I	c #626067",
+"}I	c #49494C",
+"|I	c #676669",
+"1I	c #68656C",
+"2I	c #5B575E",
+"3I	c #757178",
+"4I	c #666267",
+"5I	c #96949B",
+"6I	c #9E9CA4",
+"7I	c #9898A0",
+"8I	c #858288",
+"9I	c #A9A8B2",
+"0I	c #BBBBC3",
+"aI	c #A8A7AF",
+"bI	c #A3A1A8",
+"cI	c #97959C",
+"dI	c #4D5062",
+"eI	c #7E90B3",
+"fI	c #768EB7",
+"gI	c #6B7B9E",
+"hI	c #5D6B84",
+"iI	c #696778",
+"jI	c #6F6C72",
+"kI	c #3B3A3B",
+"lI	c #3D3B3D",
+"mI	c #3D3A3B",
+"nI	c #3D3B3C",
+"oI	c #3B393B",
+"pI	c #3E3C3D",
+"qI	c #3F3E3F",
+"rI	c #424042",
+"sI	c #3C3A3C",
+"tI	c #3A383A",
+"uI	c #3B393A",
+"vI	c #3A3638",
+"wI	c #403E3E",
+"xI	c #403D3F",
+"yI	c #423F41",
+"zI	c #3F3C3D",
+"AI	c #3D3B3B",
+"BI	c #403D3E",
+"CI	c #444142",
+"DI	c #424040",
+"EI	c #20344B",
+"FI	c #1B3049",
+"GI	c #22354B",
+"HI	c #3B3A39",
+"II	c #3D3A39",
+"JI	c #3A3634",
+"KI	c #433A37",
+"LI	c #4F515E",
+"MI	c #636B7C",
+"NI	c #7D8A95",
+"OI	c #76767E",
+"PI	c #555561",
+"QI	c #30323C",
+"RI	c #3C434F",
+"SI	c #3D414E",
+"TI	c #2B2B3A",
+"UI	c #343643",
+"VI	c #495364",
+"WI	c #4A4E5D",
+"XI	c #51505E",
+"YI	c #3A3F48",
+"ZI	c #6A7184",
+"`I	c #8D95A7",
+" J	c #83828A",
+".J	c #4B4B57",
+"+J	c #393A43",
+"@J	c #282B38",
+"#J	c #282D36",
+"$J	c #353442",
+"%J	c #474E58",
+"&J	c #5C6171",
+"*J	c #5E5E68",
+"=J	c #575967",
+"-J	c #43464E",
+";J	c #DEE0E1",
+">J	c #E0E3E0",
+",J	c #95949A",
+"'J	c #4E4D60",
+")J	c #5F5F6D",
+"!J	c #494A59",
+"~J	c #454557",
+"{J	c #3F3F4A",
+"]J	c #5C5C69",
+"^J	c #3E3F51",
+"/J	c #504E61",
+"(J	c #272834",
+"_J	c #31333E",
+":J	c #3D3E4D",
+"<J	c #4F4D5E",
+"[J	c #3B3D4B",
+"}J	c #272E31",
+"|J	c #272C2F",
+"1J	c #363842",
+"2J	c #5D5A66",
+"3J	c #383735",
+"4J	c #1F1F1E",
+"5J	c #292729",
+"6J	c #4C4B4D",
+"7J	c #231F1F",
+"8J	c #696C70",
+"9J	c #76787E",
+"0J	c #78757A",
+"aJ	c #7F7E7F",
+"bJ	c #615F61",
+"cJ	c #4F4E54",
+"dJ	c #45434D",
+"eJ	c #4E4C52",
+"fJ	c #3F3F47",
+"gJ	c #3E3E47",
+"hJ	c #4C4B53",
+"iJ	c #6F6A68",
+"jJ	c #79767E",
+"kJ	c #86838A",
+"lJ	c #928E94",
+"mJ	c #AAA9B2",
+"nJ	c #A4A3AC",
+"oJ	c #A5A4AB",
+"pJ	c #908D92",
+"qJ	c #555459",
+"rJ	c #706F75",
+"sJ	c #9A989F",
+"tJ	c #939199",
+"uJ	c #7A7880",
+"vJ	c #636068",
+"wJ	c #4A4F60",
+"xJ	c #535261",
+"yJ	c #8D8A8E",
+"zJ	c #646167",
+"AJ	c #413E40",
+"BJ	c #413F41",
+"CJ	c #424142",
+"DJ	c #414040",
+"EJ	c #434141",
+"FJ	c #424140",
+"GJ	c #383737",
+"HJ	c #393838",
+"IJ	c #353332",
+"JJ	c #2D2C2B",
+"KJ	c #2D2A29",
+"LJ	c #423937",
+"MJ	c #4D4C58",
+"NJ	c #383E4A",
+"OJ	c #646978",
+"PJ	c #393C45",
+"QJ	c #272B38",
+"RJ	c #3A3C48",
+"SJ	c #383A47",
+"TJ	c #434354",
+"UJ	c #3D414C",
+"VJ	c #525867",
+"WJ	c #949AAD",
+"XJ	c #96969E",
+"YJ	c #6C6A76",
+"ZJ	c #3C3E49",
+"`J	c #282A34",
+" K	c #3B3E4B",
+".K	c #25262F",
+"+K	c #333842",
+"@K	c #484C57",
+"#K	c #484A57",
+"$K	c #41414F",
+"%K	c #717A8E",
+"&K	c #A4ACC3",
+"*K	c #8D8B93",
+"=K	c #565661",
+"-K	c #8E9093",
+";K	c #BCBEBB",
+">K	c #C4C3C3",
+",K	c #D8DAD8",
+"'K	c #545363",
+")K	c #2A2C38",
+"!K	c #827E84",
+"~K	c #93929E",
+"{K	c #3B3B4B",
+"]K	c #48485D",
+"^K	c #252630",
+"/K	c #35353C",
+"(K	c #292C35",
+"_K	c #3E3F50",
+":K	c #545361",
+"<K	c #424450",
+"[K	c #273037",
+"}K	c #21292D",
+"|K	c #2D3038",
+"1K	c #363544",
+"2K	c #393746",
+"3K	c #474651",
+"4K	c #21201D",
+"5K	c #21201E",
+"6K	c #272624",
+"7K	c #2C2C2A",
+"8K	c #3C3C3C",
+"9K	c #5A5959",
+"0K	c #A3A1A5",
+"aK	c #A7A6AA",
+"bK	c #838184",
+"cK	c #A2A0A4",
+"dK	c #5B5A5D",
+"eK	c #444447",
+"fK	c #878787",
+"gK	c #646164",
+"hK	c #53515C",
+"iK	c #605E5C",
+"jK	c #5A5861",
+"kK	c #5A575C",
+"lK	c #99979F",
+"mK	c #A2A1A9",
+"nK	c #A19FA3",
+"oK	c #757378",
+"pK	c #504E55",
+"qK	c #A6A4AF",
+"rK	c #908D93",
+"sK	c #6A666D",
+"tK	c #5A595F",
+"uK	c #6B696B",
+"vK	c #7D7A7F",
+"wK	c #3D3C3C",
+"xK	c #3D3A3C",
+"yK	c #383738",
+"zK	c #373535",
+"AK	c #363636",
+"BK	c #363536",
+"CK	c #343333",
+"DK	c #2C2D2D",
+"EK	c #2B2C2C",
+"FK	c #272828",
+"GK	c #262727",
+"HK	c #252526",
+"IK	c #292928",
+"JK	c #2C2A2A",
+"KK	c #302D2B",
+"LK	c #282624",
+"MK	c #373330",
+"NK	c #4C484B",
+"OK	c #2F3241",
+"PK	c #34363F",
+"QK	c #2F323C",
+"RK	c #373848",
+"SK	c #3F414E",
+"TK	c #747484",
+"UK	c #8A8C98",
+"VK	c #646370",
+"WK	c #464A57",
+"XK	c #2D2E39",
+"YK	c #6A6E7F",
+"ZK	c #3F424B",
+"`K	c #262E39",
+" L	c #3C3F49",
+".L	c #3F444B",
+"+L	c #3F454D",
+"@L	c #444550",
+"#L	c #505360",
+"$L	c #9BA1B8",
+"%L	c #ACABB4",
+"&L	c #6C6D7C",
+"*L	c #42414C",
+"=L	c #24293C",
+"-L	c #424657",
+";L	c #2F313B",
+">L	c #434747",
+",L	c #4E4D5C",
+"'L	c #3E4046",
+")L	c #EDF1ED",
+"!L	c #96959D",
+"~L	c #46464F",
+"{L	c #282936",
+"]L	c #49495B",
+"^L	c #504F64",
+"/L	c #4F4C65",
+"(L	c #555266",
+"_L	c #545264",
+":L	c #444453",
+"<L	c #2A333A",
+"[L	c #1D292C",
+"}L	c #262D31",
+"|L	c #32333A",
+"1L	c #33333D",
+"2L	c #323343",
+"3L	c #32323E",
+"4L	c #44454A",
+"5L	c #5F6163",
+"6L	c #747372",
+"7L	c #505151",
+"8L	c #595D60",
+"9L	c #676A72",
+"0L	c #525253",
+"aL	c #5B5C5B",
+"bL	c #716F72",
+"cL	c #959595",
+"dL	c #6D6A6B",
+"eL	c #4F4F54",
+"fL	c #6B6765",
+"gL	c #68635E",
+"hL	c #565358",
+"iL	c #6F6C70",
+"jL	c #AFAEB5",
+"kL	c #A0A0A9",
+"lL	c #949399",
+"mL	c #6C696E",
+"nL	c #514F56",
+"oL	c #5F5E64",
+"pL	c #767177",
+"qL	c #555258",
+"rL	c #4C4847",
+"sL	c #4A4646",
+"tL	c #494443",
+"uL	c #454040",
+"vL	c #443F3F",
+"wL	c #433E3E",
+"xL	c #444040",
+"yL	c #3E3C3B",
+"zL	c #3D3C3A",
+"AL	c #3C3A38",
+"BL	c #3B3938",
+"CL	c #3B3837",
+"DL	c #3A3837",
+"EL	c #3A3836",
+"FL	c #393735",
+"GL	c #383634",
+"HL	c #373534",
+"IL	c #393635",
+"JL	c #3A3937",
+"KL	c #403D3D",
+"LL	c #403D3C",
+"ML	c #464342",
+"NL	c #4E4C4A",
+"OL	c #504E4D",
+"PL	c #4A4846",
+"QL	c #4C4C49",
+"RL	c #413F46",
+"SL	c #49494F",
+"TL	c #575858",
+"UL	c #625E60",
+"VL	c #7D797B",
+"WL	c #808086",
+"XL	c #505158",
+"YL	c #404247",
+"ZL	c #373B46",
+"`L	c #2E2F41",
+" M	c #343441",
+".M	c #494B5A",
+"+M	c #696F7C",
+"@M	c #5C5E6E",
+"#M	c #494D5C",
+"$M	c #2B2D3A",
+"%M	c #7B8193",
+"&M	c #818087",
+"*M	c #45464F",
+"=M	c #3A3F4A",
+"-M	c #2B333D",
+";M	c #393A48",
+">M	c #3E3F4E",
+",M	c #687080",
+"'M	c #7E7F88",
+")M	c #75747E",
+"!M	c #474B53",
+"~M	c #252934",
+"{M	c #76798B",
+"]M	c #31343E",
+"^M	c #424050",
+"/M	c #555E6E",
+"(M	c #5B6172",
+"_M	c #697174",
+":M	c #5F616B",
+"<M	c #A9AAAB",
+"[M	c #EAEBEA",
+"}M	c #6C6B75",
+"|M	c #4B4A5B",
+"1M	c #3B3C48",
+"2M	c #404250",
+"3M	c #4C4E5D",
+"4M	c #504E66",
+"5M	c #424254",
+"6M	c #2E353C",
+"7M	c #232B2E",
+"8M	c #212B2F",
+"9M	c #2A2E32",
+"0M	c #31323A",
+"aM	c #2D2F34",
+"bM	c #434341",
+"cM	c #292826",
+"dM	c #282726",
+"eM	c #292623",
+"fM	c #2A2A29",
+"gM	c #2E2D2D",
+"hM	c #272625",
+"iM	c #434544",
+"jM	c #525153",
+"kM	c #6C6C6F",
+"lM	c #AFAEAE",
+"mM	c #5E5B5E",
+"nM	c #504F54",
+"oM	c #4D4B52",
+"pM	c #4E4B53",
+"qM	c #78767C",
+"rM	c #8D8C90",
+"sM	c #545459",
+"tM	c #696769",
+"uM	c #EDEDEC",
+"vM	c #E5E4E3",
+"wM	c #E5E4E2",
+"xM	c #E3E2E0",
+"yM	c #E0DFDD",
+"zM	c #DCDCDA",
+"AM	c #DADAD8",
+"BM	c #D8D7D6",
+"CM	c #D7D5D4",
+"DM	c #D5D5D3",
+"EM	c #D6D4D3",
+"FM	c #D8D6D4",
+"GM	c #D7D6D5",
+"HM	c #D8D6D5",
+"IM	c #D8D8D7",
+"JM	c #D8D8D6",
+"KM	c #DDDDDB",
+"LM	c #E2E2E0",
+"MM	c #E4E4E3",
+"NM	c #E5E4E4",
+"OM	c #D0CFD1",
+"PM	c #3D3D4F",
+"QM	c #36354A",
+"RM	c #323344",
+"SM	c #30353C",
+"TM	c #43454C",
+"UM	c #303740",
+"VM	c #262E3A",
+"WM	c #3A4247",
+"XM	c #5F675F",
+"YM	c #5F6461",
+"ZM	c #3B3B48",
+"`M	c #2E3141",
+" N	c #716E77",
+".N	c #919099",
+"+N	c #72717E",
+"@N	c #505060",
+"#N	c #252932",
+"$N	c #3D4045",
+"%N	c #31353D",
+"&N	c #252836",
+"*N	c #313247",
+"=N	c #4B515E",
+"-N	c #474858",
+";N	c #484857",
+">N	c #2F3141",
+",N	c #8C8C93",
+"'N	c #434451",
+")N	c #333445",
+"!N	c #262936",
+"~N	c #2F3040",
+"{N	c #474956",
+"]N	c #5F646D",
+"^N	c #525361",
+"/N	c #2A2D3B",
+"(N	c #798092",
+"_N	c #5B5D67",
+":N	c #40414C",
+"<N	c #3C3B47",
+"[N	c #2D313A",
+"}N	c #353B44",
+"|N	c #4C4D55",
+"1N	c #5A5862",
+"2N	c #4D5566",
+"3N	c #A5ADC3",
+"4N	c #90929C",
+"5N	c #66666F",
+"6N	c #3D3D48",
+"7N	c #4A4853",
+"8N	c #434350",
+"9N	c #4C4A5F",
+"0N	c #504F63",
+"aN	c #4E4D63",
+"bN	c #4B4B5F",
+"cN	c #232C31",
+"dN	c #242B31",
+"eN	c #2A3036",
+"fN	c #313239",
+"gN	c #2F3137",
+"hN	c #3C3E40",
+"iN	c #4C4D4F",
+"jN	c #4F4E4B",
+"kN	c #2C2C28",
+"lN	c #252021",
+"mN	c #3B3839",
+"nN	c #23211E",
+"oN	c #393836",
+"pN	c #1D1C1B",
+"qN	c #393537",
+"rN	c #3E3B3C",
+"sN	c #3F4141",
+"tN	c #838484",
+"uN	c #505153",
+"vN	c #474548",
+"wN	c #D0D0D0",
+"xN	c #B0AFAF",
+"yN	c #46454A",
+"zN	c #605E68",
+"AN	c #484851",
+"BN	c #4B4B52",
+"CN	c #4F4E53",
+"DN	c #605E62",
+"EN	c #615F63",
+"FN	c #514E53",
+"GN	c #514E55",
+"HN	c #6D696E",
+"IN	c #EAEAEA",
+"JN	c #373645",
+"KN	c #36374A",
+"LN	c #34334C",
+"MN	c #2E3144",
+"NN	c #2F313D",
+"ON	c #343348",
+"PN	c #323447",
+"QN	c #535864",
+"RN	c #6E7277",
+"SN	c #6D6E77",
+"TN	c #535667",
+"UN	c #282C32",
+"VN	c #4C4F56",
+"WN	c #4B4E56",
+"XN	c #33363F",
+"YN	c #292B3D",
+"ZN	c #353645",
+"`N	c #3B3C4F",
+" O	c #545764",
+".O	c #898993",
+"+O	c #323340",
+"@O	c #282C37",
+"#O	c #222531",
+"$O	c #2E3243",
+"%O	c #3A3F4D",
+"&O	c #4C4A5A",
+"*O	c #363947",
+"=O	c #6A6F82",
+"-O	c #969AA9",
+";O	c #86848C",
+">O	c #4E4E5D",
+",O	c #393943",
+"'O	c #232834",
+")O	c #232732",
+"!O	c #32373E",
+"~O	c #46484F",
+"{O	c #40444E",
+"]O	c #8A90A6",
+"^O	c #9B9FAF",
+"/O	c #504E5C",
+"(O	c #2E2E3B",
+"_O	c #585D70",
+":O	c #414553",
+"<O	c #2D313C",
+"[O	c #464654",
+"}O	c #3F404F",
+"|O	c #313640",
+"1O	c #222B30",
+"2O	c #202B2F",
+"3O	c #2B3038",
+"4O	c #30323B",
+"5O	c #2F3037",
+"6O	c #35373A",
+"7O	c #3E4042",
+"8O	c #565657",
+"9O	c #222120",
+"0O	c #2A2C2B",
+"aO	c #1D1D1B",
+"bO	c #1E1D1C",
+"cO	c #201E1C",
+"dO	c #403F3D",
+"eO	c #242323",
+"fO	c #292828",
+"gO	c #3C3C3A",
+"hO	c #5A5A5E",
+"iO	c #4A474A",
+"jO	c #403D40",
+"kO	c #31302F",
+"lO	c #F5F5F6",
+"mO	c #686567",
+"nO	c #39383E",
+"oO	c #2E2E37",
+"pO	c #373640",
+"qO	c #42404A",
+"rO	c #5D5A61",
+"sO	c #5D5B60",
+"tO	c #635F64",
+"uO	c #5B5A5E",
+"vO	c #504E53",
+"wO	c #504D53",
+"xO	c #79757B",
+"yO	c #B7B4B7",
+"zO	c #42424F",
+"AO	c #33334D",
+"BO	c #31324F",
+"CO	c #363749",
+"DO	c #34334A",
+"EO	c #2B2E36",
+"FO	c #575D66",
+"GO	c #7E7E84",
+"HO	c #63646C",
+"IO	c #363B45",
+"JO	c #252B39",
+"KO	c #2E303C",
+"LO	c #33343F",
+"MO	c #41414C",
+"NO	c #65636D",
+"OO	c #787882",
+"PO	c #60616C",
+"QO	c #363943",
+"RO	c #2E3239",
+"SO	c #3C3F46",
+"TO	c #262A37",
+"UO	c #353544",
+"VO	c #34344B",
+"WO	c #3B3B50",
+"XO	c #535765",
+"YO	c #898D9C",
+"ZO	c #85848C",
+"`O	c #5F5D6C",
+" P	c #353446",
+".P	c #2E3041",
+"+P	c #242934",
+"@P	c #2C303E",
+"#P	c #39414A",
+"$P	c #4F535D",
+"%P	c #62636B",
+"&P	c #737278",
+"*P	c #5A5B67",
+"=P	c #2A3039",
+"-P	c #697182",
+";P	c #717584",
+">P	c #3E3F4A",
+",P	c #393D48",
+"'P	c #474552",
+")P	c #454451",
+"!P	c #454453",
+"~P	c #2B3039",
+"{P	c #202A2E",
+"]P	c #232B2D",
+"^P	c #2E3034",
+"/P	c #30323A",
+"(P	c #2F3138",
+"_P	c #323439",
+":P	c #434144",
+"<P	c #4C4F4E",
+"[P	c #585958",
+"}P	c #595A59",
+"|P	c #616160",
+"1P	c #5D5D5C",
+"2P	c #5C5C5B",
+"3P	c #60605F",
+"4P	c #5C5B5B",
+"5P	c #5B5B5B",
+"6P	c #5A5B5A",
+"7P	c #626162",
+"8P	c #3B383A",
+"9P	c #646363",
+"0P	c #716E6F",
+"aP	c #48474F",
+"bP	c #49474E",
+"cP	c #615D63",
+"dP	c #605F63",
+"eP	c #4D4C52",
+"fP	c #4E4E51",
+"gP	c #716E73",
+"hP	c #928E93",
+"iP	c #DAD9DB",
+"jP	c #61626A",
+"kP	c #32324E",
+"lP	c #32324D",
+"mP	c #34354B",
+"nP	c #33334B",
+"oP	c #343345",
+"pP	c #212731",
+"qP	c #222831",
+"rP	c #2A2D38",
+"sP	c #353547",
+"tP	c #404354",
+"uP	c #575764",
+"vP	c #5E5E6D",
+"wP	c #3A3C4A",
+"xP	c #2F353B",
+"yP	c #777881",
+"zP	c #696A78",
+"AP	c #313540",
+"BP	c #313240",
+"CP	c #2D2E3D",
+"DP	c #343443",
+"EP	c #3E4050",
+"FP	c #606271",
+"GP	c #797A88",
+"HP	c #61616F",
+"IP	c #3E3D4D",
+"JP	c #323544",
+"KP	c #727480",
+"LP	c #4D4F57",
+"MP	c #282E34",
+"NP	c #393B48",
+"OP	c #444750",
+"PP	c #585A63",
+"QP	c #676973",
+"RP	c #696F81",
+"SP	c #6C6F7D",
+"TP	c #696870",
+"UP	c #4A4B57",
+"VP	c #333741",
+"WP	c #41424B",
+"XP	c #2B343E",
+"YP	c #3A3C46",
+"ZP	c #464451",
+"`P	c #484858",
+" Q	c #444253",
+".Q	c #363641",
+"+Q	c #242D33",
+"@Q	c #1F292A",
+"#Q	c #242B2E",
+"$Q	c #2C3033",
+"%Q	c #2E3137",
+"&Q	c #5C5D61",
+"*Q	c #909192",
+"=Q	c #515452",
+"-Q	c #555554",
+";Q	c #565856",
+">Q	c #555755",
+",Q	c #535554",
+"'Q	c #545655",
+")Q	c #525353",
+"!Q	c #525453",
+"~Q	c #515353",
+"{Q	c #535553",
+"]Q	c #555756",
+"^Q	c #545555",
+"/Q	c #3C3D3E",
+"(Q	c #312F30",
+"_Q	c #9F9C9E",
+":Q	c #5F5A5D",
+"<Q	c #4C4C50",
+"[Q	c #4D4A55",
+"}Q	c #4D4A50",
+"|Q	c #4D4B51",
+"1Q	c #515255",
+"2Q	c #C5C3C5",
+"3Q	c #949398",
+"4Q	c #323246",
+"5Q	c #33324D",
+"6Q	c #34354C",
+"7Q	c #34344A",
+"8Q	c #343744",
+"9Q	c #8D8D97",
+"0Q	c #292C34",
+"aQ	c #292B35",
+"bQ	c #272933",
+"cQ	c #31313F",
+"dQ	c #3C3C4C",
+"eQ	c #51515C",
+"fQ	c #30333D",
+"gQ	c #7D808C",
+"hQ	c #818089",
+"iQ	c #4A4A57",
+"jQ	c #343642",
+"kQ	c #323240",
+"lQ	c #2A2C3A",
+"mQ	c #333343",
+"nQ	c #3C404E",
+"oQ	c #51555D",
+"pQ	c #6F6E75",
+"qQ	c #6A6F7F",
+"rQ	c #676873",
+"sQ	c #605E6C",
+"tQ	c #494A55",
+"uQ	c #2F3341",
+"vQ	c #2D313B",
+"wQ	c #353E44",
+"xQ	c #474654",
+"yQ	c #3E474B",
+"zQ	c #484651",
+"AQ	c #464452",
+"BQ	c #3B3A46",
+"CQ	c #2D3139",
+"DQ	c #232A2F",
+"EQ	c #202A2C",
+"FQ	c #252A2D",
+"GQ	c #2C2E34",
+"HQ	c #2D3036",
+"IQ	c #5F6064",
+"JQ	c #B0B1B2",
+"KQ	c #ECECED",
+"LQ	c #393A3A",
+"MQ	c #2E3130",
+"NQ	c #2F3231",
+"OQ	c #313434",
+"PQ	c #2F3233",
+"QQ	c #2E3131",
+"RQ	c #2D3030",
+"SQ	c #2B2E2E",
+"TQ	c #2A2D2C",
+"UQ	c #292C2B",
+"VQ	c #323435",
+"WQ	c #DFDEDE",
+"XQ	c #656264",
+"YQ	c #515254",
+"ZQ	c #43414B",
+"`Q	c #44424C",
+" R	c #59575D",
+".R	c #5C5A61",
+"+R	c #5A5961",
+"@R	c #5D5B62",
+"#R	c #4F4C52",
+"$R	c #4B4950",
+"%R	c #4A474D",
+"&R	c #4B484E",
+"*R	c #524E53",
+"=R	c #757375",
+"-R	c #C5C5C8",
+";R	c #343442",
+">R	c #35344A",
+",R	c #272B32",
+"'R	c #3A404B",
+")R	c #333540",
+"!R	c #272A34",
+"~R	c #4E5566",
+"{R	c #484C5C",
+"]R	c #3D3E4F",
+"^R	c #313440",
+"/R	c #777479",
+"(R	c #8D8C93",
+"_R	c #62616F",
+":R	c #3E424C",
+"<R	c #2C2E39",
+"[R	c #323948",
+"}R	c #3B4150",
+"|R	c #3B3F49",
+"1R	c #424753",
+"2R	c #5F6372",
+"3R	c #6F7079",
+"4R	c #6F7078",
+"5R	c #666570",
+"6R	c #545460",
+"7R	c #3E414E",
+"8R	c #343645",
+"9R	c #2C2F3C",
+"0R	c #363843",
+"aR	c #41414D",
+"bR	c #444751",
+"cR	c #3F3F4C",
+"dR	c #2F373F",
+"eR	c #273036",
+"fR	c #232A2D",
+"gR	c #22292B",
+"hR	c #272B2E",
+"iR	c #262A2D",
+"jR	c #A3A3A5",
+"kR	c #E2E2E3",
+"lR	c #3E3E40",
+"mR	c #252726",
+"nR	c #111412",
+"oR	c #0D110F",
+"pR	c #0C0F0D",
+"qR	c #0B0E0C",
+"rR	c #0B0F0D",
+"sR	c #151817",
+"tR	c #212423",
+"uR	c #323635",
+"vR	c #3B383B",
+"wR	c #2D2C2D",
+"xR	c #B5B5B4",
+"yR	c #FEFFFE",
+"zR	c #9B989A",
+"AR	c #605D5F",
+"BR	c #3B3944",
+"CR	c #3A3743",
+"DR	c #3B3947",
+"ER	c #3D3B48",
+"FR	c #3E3C49",
+"GR	c #3F3D49",
+"HR	c #403D4B",
+"IR	c #423F4C",
+"JR	c #423F4D",
+"KR	c #413F4D",
+"LR	c #413E4B",
+"MR	c #43404C",
+"NR	c #45424D",
+"OR	c #474451",
+"PR	c #48444E",
+"QR	c #4E4B52",
+"RR	c #555257",
+"SR	c #B7B5B6",
+"TR	c #3B3B47",
+"UR	c #313145",
+"VR	c #34334B",
+"WR	c #353548",
+"XR	c #333348",
+"YR	c #5E5E69",
+"ZR	c #7A7C88",
+"`R	c #6A6974",
+" S	c #4B505D",
+".S	c #262B32",
+"+S	c #3D3F4A",
+"@S	c #3F404A",
+"#S	c #292E35",
+"$S	c #2E2F3F",
+"%S	c #36364A",
+"&S	c #3B3F4C",
+"*S	c #64697A",
+"=S	c #6A6A74",
+"-S	c #76747D",
+";S	c #454655",
+">S	c #4A4C53",
+",S	c #3B3F4A",
+"'S	c #2B303B",
+")S	c #2A2E39",
+"!S	c #3D424C",
+"~S	c #40494E",
+"{S	c #3A3947",
+"]S	c #232B33",
+"^S	c #21292B",
+"/S	c #212A2D",
+"(S	c #252C30",
+"_S	c #272A2E",
+":S	c #25262A",
+"<S	c #222428",
+"[S	c #1E2125",
+"}S	c #313335",
+"|S	c #696A6C",
+"1S	c #A4A5A5",
+"2S	c #8B8A8A",
+"3S	c #2E2C2C",
+"4S	c #3E3D3F",
+"5S	c #383838",
+"6S	c #302F32",
+"7S	c #2E2D2F",
+"8S	c #2D2D2F",
+"9S	c #858585",
+"0S	c #878485",
+"aS	c #555456",
+"bS	c #49484C",
+"cS	c #44434B",
+"dS	c #434149",
+"eS	c #454347",
+"fS	c #46464A",
+"gS	c #454548",
+"hS	c #A7A5A6",
+"iS	c #2D3039",
+"jS	c #31314D",
+"kS	c #4A4A5B",
+"lS	c #767580",
+"mS	c #B0B0B5",
+"nS	c #6F7279",
+"oS	c #282C33",
+"pS	c #6E6D76",
+"qS	c #464952",
+"rS	c #2D2F41",
+"sS	c #353445",
+"tS	c #343342",
+"uS	c #383A4E",
+"vS	c #444B64",
+"wS	c #556681",
+"xS	c #424758",
+"yS	c #2F323F",
+"zS	c #9094A3",
+"AS	c #414252",
+"BS	c #363642",
+"CS	c #30353F",
+"DS	c #373A46",
+"ES	c #3A3B48",
+"FS	c #3F464C",
+"GS	c #3D484C",
+"HS	c #3B424A",
+"IS	c #32363F",
+"JS	c #262F34",
+"KS	c #242C30",
+"LS	c #22282B",
+"MS	c #252B2D",
+"NS	c #2A2D30",
+"OS	c #25292C",
+"PS	c #202527",
+"QS	c #1D2225",
+"RS	c #202226",
+"SS	c #373A3B",
+"TS	c #6A6C6E",
+"US	c #B6B7B8",
+"VS	c #919191",
+"WS	c #424143",
+"XS	c #3C3B3E",
+"YS	c #3C3A3D",
+"ZS	c #3F3E40",
+"`S	c #343336",
+" T	c #2C2D2F",
+".T	c #B8B6B7",
+"+T	c #787577",
+"@T	c #656163",
+"#T	c #646062",
+"$T	c #706D70",
+"%T	c #777377",
+"&T	c #868286",
+"*T	c #ABA8AC",
+"=T	c #CDCACD",
+"-T	c #EDECED",
+";T	c #A4A4A8",
+">T	c #33343E",
+",T	c #323247",
+"'T	c #363549",
+")T	c #E4E3E3",
+"!T	c #BDBEBF",
+"~T	c #676B73",
+"{T	c #2F303A",
+"]T	c #212835",
+"^T	c #272A35",
+"/T	c #38384A",
+"(T	c #3C3B4C",
+"_T	c #323443",
+":T	c #758BA9",
+"<T	c #7499BC",
+"[T	c #7199B8",
+"}T	c #546174",
+"|T	c #2C2F3D",
+"1T	c #292E37",
+"2T	c #2A2C39",
+"3T	c #383C46",
+"4T	c #3D494B",
+"5T	c #3F414D",
+"6T	c #383D47",
+"7T	c #333543",
+"8T	c #292F38",
+"9T	c #1E2A2F",
+"0T	c #1A292E",
+"aT	c #212B2E",
+"bT	c #292D30",
+"cT	c #292C2F",
+"dT	c #23252A",
+"eT	c #1C2024",
+"fT	c #202225",
+"gT	c #404144",
+"hT	c #838385",
+"iT	c #D2D3D3",
+"jT	c #D5D5D4",
+"kT	c #737373",
+"lT	c #302D2D",
+"mT	c #312F2F",
+"nT	c #333233",
+"oT	c #2E2C2D",
+"pT	c #2C2B2A",
+"qT	c #818080",
+"rT	c #E1E0E1",
+"sT	c #C1C0C1",
+"tT	c #C1BFC1",
+"uT	c #B6B4B6",
+"vT	c #ABA8AB",
+"wT	c #B4B1B4",
+"xT	c #D2D0D3",
+"yT	c #F0EFF0",
+"zT	c #EDEDEE",
+"AT	c #413F4B",
+"BT	c #333346",
+"CT	c #282D32",
+"DT	c #393E46",
+"ET	c #333D4A",
+"FT	c #343647",
+"GT	c #353449",
+"HT	c #343548",
+"IT	c #646767",
+"JT	c #828C7B",
+"KT	c #9CA68B",
+"LT	c #696E6B",
+"MT	c #36445C",
+"NT	c #42536C",
+"OT	c #2B3646",
+"PT	c #2E313D",
+"QT	c #373D4A",
+"RT	c #363C48",
+"ST	c #373F49",
+"TT	c #3C464A",
+"UT	c #3A4048",
+"VT	c #2E3940",
+"WT	c #28333B",
+"XT	c #222C31",
+"YT	c #23292B",
+"ZT	c #212528",
+"`T	c #2C2F31",
+" U	c #6D7071",
+".U	c #AAAAAC",
+"+U	c #D6D5D5",
+"@U	c #C8C8C8",
+"#U	c #C8C7C7",
+"$U	c #C8C8C7",
+"%U	c #C9C9C9",
+"&U	c #CECECE",
+"*U	c #707075",
+"=U	c #353642",
+"-U	c #343349",
+";U	c #36344A",
+">U	c #333342",
+",U	c #40404F",
+"'U	c #5F5F70",
+")U	c #696D7A",
+"!U	c #636775",
+"~U	c #32333C",
+"{U	c #5F665E",
+"]U	c #8E9884",
+"^U	c #677469",
+"/U	c #3F494E",
+"(U	c #323448",
+"_U	c #2C2F3B",
+":U	c #31343F",
+"<U	c #363948",
+"[U	c #36404A",
+"}U	c #384347",
+"|U	c #313941",
+"1U	c #29303A",
+"2U	c #262C31",
+"3U	c #212A2C",
+"4U	c #252C2F",
+"5U	c #5C5C5F",
+"6U	c #8F8F91",
+"7U	c #C1C2C2",
+"8U	c #BBBBBD",
+"9U	c #3E3D49",
+"0U	c #30313F",
+"aU	c #353448",
+"bU	c #35344B",
+"cU	c #343446",
+"dU	c #53525C",
+"eU	c #737584",
+"fU	c #737786",
+"gU	c #313241",
+"hU	c #252B35",
+"iU	c #262E37",
+"jU	c #272C36",
+"kU	c #333345",
+"lU	c #343549",
+"mU	c #2F343D",
+"nU	c #28303D",
+"oU	c #252B33",
+"pU	c #242A2D",
+"qU	c #2D2F35",
+"rU	c #2D3034",
+"sU	c #4D5052",
+"tU	c #7B7D7E",
+"uU	c #67666D",
+"vU	c #353540",
+"wU	c #343449",
+"xU	c #353647",
+"yU	c #30353B",
+"zU	c #3C3D47",
+"AU	c #212932",
+"BU	c #1C242E",
+"CU	c #343448",
+"DU	c #363547",
+"EU	c #33323D",
+"FU	c #2A2F3B",
+"GU	c #242A30",
+"HU	c #23282A",
+"IU	c #22282A",
+"JU	c #313237",
+"KU	c #44474A",
+"LU	c #707174",
+"MU	c #A4A4A7",
+"NU	c #EAEAEB",
+"                                                    . + @ # $ # % @ & * + + + + + + + + + + + + + + * @ % = - ; > > > > > > , % @ * * * * * & @ @ @ @ @ @ @ @ % # $ $ # @ + .       ' ) ! & @ ~ ~ { @ * + ] ^ ' ^ ] / ~ $ ( ; _ ; $ @ : ^           ^ < / @ = , ; > > > > _ - ~ + ) '   ' . ! & % $ - - - - $ % & < ^                                                   ",
+"                                                ^ * _ [ } | 1 2 3 4 5 6 7 7 8 8 8 8 8 8 8 8 8 8 8 7 6 } 9 0 a b c d d d e f g | h i 6 j j j 5 5 5 5 5 5 5 } k 3 l 1 m | h n ; + . ] @ o [ j k p 9 q r j s t - @ % u v k m w x f y 0 5 z - + ^   ' < # A 7 B 2 g x e d d e C D E s F G ! @ > n H 3 m D D D D m 3 6 I # <                                                 ",
+"                                              ^ @ z m J K L M N O P Q R S T U U U U U U U U U U U V R W X Y Z `  .........+. at .#.$.%.&.*.=.=.K K K K K K -.;.>.O ,.M '.L =.).0 z - ; 7 y !.~.{.].X ^./.~.(._.:.<.h c [./.}.|.1.2.3.N ~.4.5.6.@ ] + 7.} 8.9.P 0.a.1.b.....c.d.e./.f.g v g.h.i.j.*.X '.k. at .@.l.'.m.S n.} F !                                               ",
+"                                            ^ * o.p.P q.r.s.t.u.v.w.x.y.z.A.B.B.B.B.B.B.B.B.B.B.B.C.y.D.E.F.G.H.I.J.K.K.L.M.G.N.O.P.Q.R.S.S.x.x.x.x.x.x.T.U.V.N.W.t.X.s.Y.Z.;.`.5 p  +Y .+Y.++E.E. at +#+y.$+%+^.9.&+ at .*+D.F.=+-+;+>+W.z.,+Q f n - '+2 U +.)+U.u.!+H.~+K.K.L.-+{+O.]+^+J 8./+Y (+Y.E.X._+G.G.:+X.<+[+2.}+5.> <                                             ",
+"                                            < 7.g ^.|+L.1+2+3+4+5+6+7+8+9+0+0+0+0+0+0+0+0+0+0+0+0+1+a+b+c+4+d+e+f+g+g+g+g+h+i+c+7+8+j+k+7+7+l+l+l+l+l+l+b+m+n+o+p+q+q+c+0+r+s+O t+9. .u+v+w+6+c+5+x+m+a+y+M.z+A+B+N.C+k+4+D+E+h+F+o+G+H.)+H+f 7 9 U I+F.J+l+p+D+E+g+g+g+g+E+3+8+K+L+M+a.I+w.N+w+x+q+i+O+d+O+q+m+P+u.Q+[.i % ^                                           ",
+"                                          ^ @ <.}+R+S+4+T+U+V+W+X+U+Y+Z+`+ @ @ @ @ @ @ @ @ @ @ @ @. at +@@@X+#@$@%@%@&@*@*@&@%@=@- at Y+Z+Z+;@;@@@@@@@@@@@@@@@@@@@U+X+W+V+V+U+>@,@'@)@3.!@~@{@h+]@@@X+X+-@@@`+^@/@(@_@:@k+<@`+[@$@%@%@$@U+}@|@1 at 2@3 at e 4 at +.u.j+5@;@[@$@%@&@*@*@&@%@[@]@D+P+X.6 at 7@0+8@]@U+V+=@$@9@=@#@;@5 at 0@s.a at e b@<                                           ",
+"                                          ) F y e.c at d@ @e at f@g at g@h at h@f at i@i at i@i at i@i at i@i at i@i at i@i at i@i at i@i at f@h at g@j at j@k at k@l at l@k at j@g at h@m at i@i at i@f at h@h at h@h at h@h at h@h at h@h at h@g at g@g at f@n@]@o@>+Y.~@p at f+q@r at f@h at h@h at f@s at e@q@}@<@t at u@$@v at h@j at k@j at g@f at n@`+c+w at x@V W )@y at z@$@s at h@j at k@k at k@l at k@j at h@r at A@g+k+0+B at C@#@r at f@g at j@k at k@j at h@s@$@D at E@F@[.v *                                           ",
+"                                          + G at j.]+H at I@%@g at J@K at L@M at N@O at W+P@Q at R@R at R@Q at S@P@=@W+[@[@W+T at U@U at V@W at X@Y at Z@`@ #.#+#@#<@U at U@##$#%#V@&#*#=#=#-#*#;#*#>#,#'#)#!#~#{#h at 9@]#(@^#:@p++ at r@h@/#/#(#_#:#<#k at m@e@%@%@[#f at k@}#~#|#1#2#3#g@*@4#5#6#Y @.7#8# @9#0#a#b#c#d#e#f#g#h#i#j at r@X+j#4#k#9 at m@l#m#n#o#p#~#q#r#s#v@`+t#x.;.4 ~ ^                                         ",
+"                                        ^ % k ;.S.u# @v at k@v#          ] w#x#y#y#y#x#z#w#A#] ] ^ ] B#C#C#D#                  E#C#F#G#H#                                I#U at v@J#K#L#p+M#%@g at N#          O#s at U@k at g@g at k@U at P#Q#        R#$#s@;@d at s.S#T#U#V#;@m at W#                X#U at k@v@*@%@n at m@k at Y#              L at h@X+5+Z#^+| # ^                                         ",
+"                                        ) o f 3.`#/@#@g@ $^                                       .$C#C#+$                  @$C##$                                    $$%$g@&$Z+M#*$V+s at U@=$            -$U at U@U at U@U at U@;$            >$g@$@F+L.A+,$<+k+Z+m@'$)$              !$U at U@k at g@h at j@U at U@~$              {$g at W+p+]$,.2 $ ^                                         ",
+"                                        + n J .+^$/$n at k@($    ^ _$:$<$<$<$<$<$<$<$<$<$<$<$[$      }$C#C#|$        w#        1$C#2$      3$4$5$6$4$7$8$9$:$0$a$b$c$      d$U at h@e@%@*@s at k@U at e$            f$C#C#U at U@C#C#g$            h$k at n@4#i$r.j$@+0 at .@s at U@k$      l$m$    n$C#U at U@U at U@U at U@C#o$    ^ p$      q$g@[@r$s.#.5.# ^                                         ",
+"                                      ^ @ h =.y.s$ @s at U@t$    u$v$w$x$y$z$A$C#B$C$C$C$C$D$E$      F$C#C#G$        H$I$      J$C#K$      L$M$S.S.S.S.S.S.S.S.S.S.N$w#    O$U at U@j at h@g at k@U at U@P$      Q$    O#f at C#C#C#C#R$H#    H#      S$U at s@. at k+u.T$v.w+]@s at U@U$      V$W$    X$C#C#C#U at U@U at C#C#Y$    Z$`$       %h at -@.%U#{.k % '                                         ",
+"                                      ^ ; D <$F.p+[@h at +%]                 @%C##%                $%%%C#C#&%        C#*%      =%C#&#      -%;%                            >%C#U at U@U at U@U at U@,%H#    '%)%      |$C#C#C#C#p#    ^ !%      A#~%h@[@/@{%]%X.s$*$9#U@^%      /%&+    (%C#C#C#C#C#C#C#C#_%    :%<%      [%h@@@b+}%$.|%@ '                                         ",
+"                                      ] b at 1%M+2%3%n at l@4%                  4.C#5%                6%C#C#C#7%^       C#R#      8%C#-#      9%5%                            0%C#C#U at U@U at C#C#a%      b%c%d%    e%C#C#C#C#f%    g%h%i%      j%k@&$k%l%>+r+k+u at r@U at m%      n%[$    ] o%C#C#C#C#C#C#C#p%    q%r%    H#V+m@;@j+r.%.i &                                           ",
+"                                  s%t%u%v%w%x%y%z%A%C#B%    C%D%E%F%^     4.C#5%                G%C#C#C#R at H%      C#I%      J%C#:#      K%L%    M%N%O%^.6$P%Q%R%S%      y#T%C#C#C#C#C#C#U%      V%W%e#    X%Y%C#C#Z%&     `% &.&      +&U at v@`+o+p@@&x+. at v@U@#&      $&%&      &&C#C#C#C#C#C#C#*&    =&-&    y#R at i@`+9+z.S ;&*                                           ",
+"                      ^ >&,&'&)&!&~&{&]&^&/&(&_&:&<&C#[&}&|&U at U@C#C#1&    4.C#5%    ^ 2&3&4&5&6&7&C#C#C#8&G#      C#b@    ^ 9&C#b+      0&a&    b&C#C#C#C#C#C#C#c&d&e&f&)%g&C#C#C#C#C#C#h&      i&j&k&]     l&C#C#m&    ] n&o&p&      q&c%g@$@5 at m+V#e+r&i at U@s&      t&u&      v&C#C#C#C#C#C#C#w&    x&7$    y&8&i@ @0+B.U 8 /                                           ",
+"              Q#z&'&A&B&C&D&E&F&G&H&H&I&J&K&L&M&N&O&P&Q&C#Q&U at U@C#C#R&    4.C#5%    Q$S&C#U at U@T&U at U@U at C#U&V&      W&Q#    A#X&C#Y&      Z&`&     *C#C#C#C#C#C#C#C#C#C#C#C#C#C#C#C#C#C#.*+*    @*#*  $*%*    &*C#C#**    =*-*  ;*$%      >*k at r@@@z at g+}@9 at h@U at P       ,*'*      )*C#C#C#C#C#C###!*    ~*{*    ]*'$s at u@^*|+/*s +                                           ",
+"      (*_*:*<*[*}*|*1*2*3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*U&i*P&k at U@C#j*    4.C#5%    k*C#U at U@U at k@k at U@U at C#C#l*      m*y#    w#n*C#o*      p*&*    q*r*s*t*u*-$N#v*w*x*r at C#C#C#C#C#C#C#C#y*      e$z*  A*B*    C*D*E*H#    F*G*  H*I*      N%U at g@n at -@;@W+r at k@U@#&      J*K*      L*C#C#C#C#C#C#)*^     M*N*    O*U at v@*${@)@P*Q*R*S*z#w#H#^                                 ",
+"T*U*V*W*X*Y*Z*`*2* =.=`*+=3*@=#=$=%=&=*===-=;=>=,='=)=!=~={=##s at l@U@#%    4.C#5%    ]=C#U at k@s at e@e at m@k at U@C#^=      z%H%    H%/=C#(=      _=:=                        J$C#C#C#C#C#C#C#C#<=      [=}=    |=1=    2=<=    A#3=4=  5=6=      )$7=U at g@9#r at s@g at U@U at m%      8=9=      E*C#C#C#C#C#C#0=      a=x     b=C#l at c=d=e=f=g=h=h=i=j=k=l=m=n=o=p=q=r=s=t=k${             ",
+"u=v=w=x=y=z=A=B=C=D=E=F=G=H=I=J=K=L=M=N=O=P=Q=R=S=T=U=V=W=X=Y=R at g@U at Z=    4.C#5%    `=U at k@r at X+]@ @#@s at l@U@ -      .-z#    5=+-C#@-      #-r%                        4&C#C#C#C#C#C#C#C#$-    A#%-]     t$&-    *-=-    --;-      >-,-      '-U at U@k at k@k at U@U at C#{*      )-!-      ~%C#C#C#C#C#C#>$      ~-{-    0%C#l@]-^-/-(-_-:-<-[-}-|-1-2-3-4-5-6-7-8-9-0-a-X$          ",
+"D&Z*b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z-A-B-C-D-Y%m at U@E-    4.C#5%    F-U at f@V+/$p+G-M#%@g at U@k*      H-S%    I-C#C#/%      J-K-c$c$c$c$c$c$c$c$c$L-    $%S&C#C#C#C#C#C#M-N-    O-P-        Q-R-          S-T-      $-U-      ^%Q&U at U@U at U@U at C#C#L%      V-A*      z$C#C#C#C#C#C#>-      _=W-    X-C#P&Y-Z-`- ;.;+;@;#;$;%;&;*;=;-;;;>;,;';);!;~;{;          ",
+"];1*^;/;(;_;:;<;<;[;};G=|;1;2;3;4;5;6;7;8;9;0;a;b;c;d;e;f;g;h;i;s at U@j;    4.C#5%    k;U at s@l;p+{@G+F+- at f@U at m;      7%w#    n;C#C#/%      W.o;p;q;r;s;s;t;u;v;w;x;y;    z;C#C#C#C#C#C#A;      B;C;        **D;        =-E;w#      )$F;^     ] G;C#C#U at C#C#C#C#H;      I;(%      J;C#C#C#C#C#C#K;      K%X$    X-C#P&L;M;N;O;P;Q;R;S;T;Q;U;V;W;X;Y;Z;`;:* >!;.>+>          ",
+"@>#>$>%>&>*>=>->;>>>,>'>)>!>7;~>{>6;]>^>/>(>_>(%:>X%<>[>}>|>1>g&g at U@2>    4.C#5%    3>U at r@*$7+4>:@p+Y+m at U@5       5>)$    6>C#C#7>      c at 8>                          C;C#C#C#C#C#C#v;      9>0>        ] a>)$      b>c>          V%d>      e>C#C#C#C#C#C#C#f>      g>]       h>C#C#C#C#C#C#e#      `$i>    j>C#P&L;^-k>l>m>n>Q;R;S;o>p>q>r>s>t>u>v>w>x>y>z>A>          ",
+"B>C>D>E>9;F>G>H>,>I>8;J>K>L>M>N>O>P>Q>R>:>R>Q>Q>Q>Q>S>T>U>V>1>W>P&U at X>    4.C#5%    Y>U@[#>@8+{%Z>o+;@i@`> ,      .,H#    +,C#C#@,      #,$,                          %,C#C#C#C#C#C#&,    *,2$)$          .&=,      -,N%          0>;,      >,'$C#C#C#C#C#m*^     A#,,        ',C#C#C#C#C#C#),      !,i>    ,-Q&P&~,{,],^,/,(,_,:,<,[,},|,1,2,3,4,5,6,7,8,9,0,          ",
+"a,b,c,d,e,f,f,g,h,i,/>)>_>j,Q>k,l,Q>Q>R>:>R>R>R>Q>Q>S>m,n,o,p,q,l at U@r,    4.C#5%    s,U@[#}@8+{%H at o+;@i at t,u,      v,]     w,C#C#x,      y,z,    A,M+M+M+M+M+M+M+M+M+M+B,C#C#C#C#C#h%S%    C,D,            z#E,^   A*F,S%    ]       G,C*      H,C#C#C#C#C#I,      !*J,        <#C#C#C#C#C#C#K,      L,k$    M,Q&P&Y=N,O,P,Q,R,S,T,U,V,W,X,W,Y,Z,R,`, '.'+'@'#'          ",
+"$'%'&'*'N>='-';'>'j,,'''Q>Q>Q>)'!'~'''{']'G>^'/'R>Q>('M,H*_':'<'T&h*5=    4.C#5%    ['U@[#>@j+K+}'p+@@m@|'(%      }@^     R&C#C#1'      2'3'    4'C#C#C#C#C#C#C#C#C#C#C#C#C#C#C#C#5'      6'7'      8'      }$^%  9'0'      a'b'     *c'      f$C#C#C#C#C#d'      e'f'        g'C#C#C#C#C#C#h'      i'k$    ^=Q&l at j'k'l'm'n'o'p'q'r's't'u'v'w'x'y'z'A'B'C'@'D'          ",
+"E'F'1*G''','H'j,>'>','I't=J'K'L'M'N'O'P'Q':-R'S':>Q>T'U'V'W'X'<'Q&n*w#    4.C#5%    Y'U at r@*$Z'M$v*G-U+f at P@w#      M#      `'C#C# )      .)+)    @)C#C#C#C#C#C#C#C#C#C#C#C#C#C#C#C##)      $)%)    >&&)H#    *)=)  -);)    / >),)    ')))      ]*l at C#C#C#C#!)      >,~)        -#C#C#C#C#C#K${)      i'])    ]*c&'$j'k'^)/)()_):)<)[)})|)1)2)Z,3)4)5)6)7)8)9)0)          ",
+"a)b)y=c)d)e)f)H'>'j,g)h)i)j)k)l)m)n)o)p)q)r)s)t)''R>u)v)w)x)y)z)Q&A)^     4.C#5%    B)C#'$A$C)D)E)F)G)T&H)^       I)      J)C#C#d@      K)L)    M)c&C#C#C#C#C#C#C#C#C#m*/=C#C#C#C#N)    O)P)^     Q)C#R)      S)T)U)H#    V)C#W)      X)i%      Y)C#C#C#C#Z)      `) !        +*.!+!@!I##&#!        $!%!    d)&!l@*!=!-!;!>!,!'!)!!!~!{!]!^!/!(!_!:!<![!1;9,}!          ",
+"|!1!2!3!4!H'5!,'g)>':>6!7!8!9!0!>>a!b!c!d!e!f!(*Q>R>g!h!i!j!k!`>C#Y#      4.C#5%    l!C#m!n!o!p!q!r!s!o%t!        u!      A*C#C#v!      w!x!    ] $$y!z!A!8$0$B!C!D!E!F!w,l at C#C#M-Q#    G!H!      I!C#J!      K!L!M!      N!C#O!A#    P!Q!      f$C#C#C#C#<=      S*R!S!^                 A#T!0>),@!U!V!    Q$S&l at W!X!-!Y!Z!<!`! ~.~.~+~@~#~$~%~&~*~=~-~;~9,>~          ",
+",~'~)~M=!~~~e)H'g),'{~]~^~/~(~p)_~:~m)<~G>[~{-:>Q>R>}~n$|~1~',2~C#3~      4.C#5%    4~T&P&g&5~6~7~8~##T&+%        9~      y;C#C#*#      0~a~                            b~%$C#C#c~      K-d~      e~C#f~g~    =-h~i~    #!j~C#o%6>    *-k~      l~l at C#C#C#m~        g$n~o~p~H#  G#q~r~U=s~|=t~u~v~+&,%Q$    z#w~l@]-x~y~z~A~B~C~D~E~F~G~H~I~J~K~L~M~N~O~P~@'Q~^         ",
+"R~S~T~1*U~V~W~f)H'X~Y~Z~`~ {.{h)>>+{@{#{R>:>Q>''(*${%{&{*{={-{;{C#>{      4.C#5%    ,{C#c&z)'{){!{~{U&C#{{        ]{      x#^{C#/{      ({_{                            p%C#C#C#:{    ] K$$$    y#M-C#C#N%      P%      <{C#C#C#&,      [{L-      }{C#C#C#Q)          ] ;)|{1{2{3{I#9=S%            4{      ] 5{l@]-6{7{8{9{0{a{b{c{d{e{f{g{h{$~i{j{k{l{m{n{o{^         ",
+"p{q{r{s{t{;'f)f)W~u{;'~~V~R>~~>'V~:>R>I'v{w{!>(>k,x{y{z{A{B{C{c&C#D{      E{F{d%    C!Q&'$G{H{I{J{K{;{Q&(=                )$P#C#V@      L{W#k&>$o~M{N{N{O{W at P{Q{R{      N!C#C#C#S{    S%T{      U{C#C#C#L,              V{C#C#C#W{      X{Y{      Z{C#C#C#`{ ]                        ^ j>%&                  .]'$g&+]@]#]$]%]&]*]=]-]4);]>],]*]']j{)]!]~]{]]]H#        ",
+"_*^]/](]_]:]j,f)W~f),'>'>'j,g)P>l,!><][]}]H>|]1]2]3]4]5]6]7]8]c&C#9]                I$;{T&j~0]t!a]b]c]T&z;                  d]C#e]      5=f]g]h]i]j]k]l]F% -m]G#z#    S%R at C#C#C#j>              n]C#C#C#;{o]          p]C#C#C#C#q]                r]C#C#U at U@s]t]u]A#                v]w]'$x]H#                y]l at z]A]B]C]D]E]F]G]H]I]J]K]L]M]N]O]j{P]Q]R]S]T]S%        ",
+"U]V]W]2!X]Y]>'5!H'f)Z]{-l,`]l,W- ^.^+^@^#^$^%^&^*^=^-^;^>^,^'^c&C#)^                ] !^T&##~^{^]^^^##l@/^                  J,C#(^                                    B%C#C#C#n*{)              _^C#C#C#C#g$          :^U at U@U at U@<^^               d%T%U at U@l at k@k at l@x$[^}^Q#      X{w]U at U@U at P&|^H%!*u,d)O)B 1^2^&#'$g&3^4^5^6^7^'!8^9^0^M]0^L]a^+~O]*~b^c^d^e^f^y#        ",
+"A#g^h^i^j^k^''K'L>l^m^d,n^o^p^q^r^s^t^u^=^v^w^x^y^z^A^B^C^D^E^9#l at F^G^z*z*z*H^H^z*z*z*A)l at I^J^7~K^L^j~P&.,>-M^N^x!O^~#P^ )Q^f at Q&]-R^<$<$<$<$<$<$<$<$<$<$<$<$e.R^R^e.e.S^C#C#C#0]T^U^V^W^X^Y^Z^`^ /C#C#Q&C#./+/@/u~#/$/.*l at k@k at l@k@'-%/&/k.<$<$*/=/-/;/k at m@r at e@[#v at f@j at k@>/)#,/'/)/k at k@g at k@k at Q@w~##8&h*c&Q&Q&T&Q&;{b]!/~/{/]/^///(/_/:/</[/}/.~+~J]*~|/1/2/3/4/X~        ",
+"  5/6/7/8//]9/0/a/b/c/d/e/f/g/h/i/j/&^i/k/l/m/n/o/p/q/r/s/t/u/v/A%Q&C#C#Q&Q&C#C#Q&T&l at P&.*w/x/y/y/z/O!T%P&l at l@U at U@l at l@U at l@k at k@l at T&l at T&T&T&T&T&T&T&T&T&T&T&T&C#C#C#C#Q&Q&Q&Q&Q&Q&Q&A/A/C#C#Q&A/A/A/A/A/A/l at B/A/C#C#Q&Q&T&m at v@9#s at h@g at k@k at l@l at l@l at k@g at f@e at q@u@^@M# @X+C/r at m@h at g@g at m@r@*@%@*@e at 9#f at Q&Q&Q&'$;{i*'$8&z](^D/E/F/G/H/I/J/K/L/M/'!N/N/O/P/Q/b^R/S/T/U/V/        ",
+"  W/X/Y/Z/`/ (.(+(@(#($(%(%(&(*(=(-(;(>(,('()(!(~({(](^(/(((_(:&&!:(;{;{f at P&<&c&c]##T%<(w/[(}(|(1(2(3(4(5(Y%T%T%T%T%M-j~<(6(6(M-T%T%.*######l#c]c]##)/)/c]c]c&7('$8(%$<&%$2~:(%$9(0(0('$A%0(a(a(b(c(d(d(d(e(f(9(;{%$:(:(;@u@*$`+U+$@%@&$n at n@n@&$*@g(U+}@/@1+p at i$1+r$<@>@;@W+$@V+@@>@]#h(i(j(g&k(I^l(q,/=^^F#m(n(o(p(q(r(s(t(u(v(w(x(y(z(A(B(C(B(D(E(F(B'G(H(9,I(        ",
+"  J'J(K(L(M(N(O(@(P(Q(R(S(T(U(V(W(X(Y(Z(`( _._+_ at _#_$_%_&_*_=_-_;_L^>_F#,_b]'_)_!_~_{_]_^_/_(___:_<_[_}_|_1_{_2_2_2_{_3_4_5_6_7_8_9_2_2_0_a_a_0_a_b_c_d_e_f_g_h_i_j_i_k_l_m_l_n_o_p_p_q_r_p_s_t_u_v_w_x_y_z_A_B_C_D_E_F_b+G_^*a+c+D+f+I@]#5@]#D at H_e+r$I_M.R.F at J_K_u.{%{@b+4+F+L_M_N_O_P_Q_R_S_T_U_V_W_X_x~Y_Z_`_ :.:+:@:#:$:%:&:*:=:=:-:;:<)>:,:':):!:~:{:]:^:/:        ",
+"  m$(:_:|*::<:[:}:|:1:2:3:4:5:6:7:8:9:0:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z:A:B:C:D:E:F:G:H:I:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:X:Y:Z:`: <.<+<@<#<$<%<&<*<=<-<;<><,<'<)<!<~<{<]<^</<(<_<:<<<[<}<|<1<2<3<4<]%5<6<r.s.=+~+S+7<v+8<^#K.H.u.9<,+{.[./+3 at 0<Q+|#a<b<c<d<e<f<g<h<i<j<k<l<m<n<o<p<q<r<s<t<u<v<w<x<y<^]z<A<B<C<D<E<F<G<H<I<J<K<L<M<{:N<O<P<        ",
+"    r>Q<R<3]S<T<U<V<W<X<Y<Z<`< [.[+[@[#[$[%[&[*[=[=[-[;[>[,['[)[![~[{[][^[/[([_[:[<[[[}[|[1[2[3[4[5[6[7[8[9[0[a[b[c[d[e[f[g[h[i[j[k[l[m[n[o[p[q[r[s[t[u[}>v[w[x[y[z[A[B[C[D[E[F[G[H[I[J[K[L[M[N[O[P[Q[R[S[T[U[V[W[X[Y[Z[{.`[T =.L |.b.!@ }.}+}S#T#d.M 3 at 4.| v @}#}$}%}&}*}=}-};}>},}'})}!}~}{}]}^}/}(}_}:}<}[}}}|}1}2}3}4}5}6}7}8}K<9}0}a}b}c}d}e}f}g}h}{:i}j}k}        ",
+"    l}X/m}n}o}p}q}r}s}t}u}v}w}x}y}z}A}B}C}D}E}F}G}H}I}J}K}L}M}N}O}P}Q}R}S}T}U}V}W}X}Y}Z}`} |.|+|@|#|$|%|&|*|=|-|;|>|,|'|)|!|~|{|]|^|/|(|_|:|<|[|}|||1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|p <.7 5 :.i.e y|n.z|_.A|`.C B|C|D|E|F|G|H|I|J|K|L|M|N|O|M|P|Q|R|S|T|U|V|W|X|Y|];Z|`| 1.1+1 at 1#1$1%1&1*1=1-16,o>;1>1,1'1)1!1~1{1]1^1/1(1_1        ",
+"    :1<1[1}1|111213141516171819101.1a1b1c1d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1S1T1U1V1W1X1Y1Z1`1 2.2.2.2+2 at 2#2$2%2&2*2=2-2;2>2f|,2'2)2!2~2{2]2^2/2(2_2:2<2[2}2|21222324252~ * / @ # ; > o b at b@b at 6272829202a2b2c2d2e2f2g2h2i2j2k2l2m2n2o2-'K'[]p2q2r2s2t2u2v2w2x2y2z2A2B2C2D2E2F2G2H2D2I2v>J2K2L2M2N2O2P2Q2^1]]R2S2        ",
+"    I'T2U2V2V2W2X2Y2Z2Z2b/`2 3.3+3 at 3#3$3%3&3*3=3-3;3>3,3'3)3!3~3{3]3^3/3(3_3:3<3[3}3|31323334353637383936303a3b3c3d3e3f3g3h3b3i3w(j38^k3@~)!l3m3n3n3o3m3p3q3r3s3t3u3v3w3x3y3z3A3B3C3D3E3F3G3H3I3J3K3L3M3N3O3P3Q3R3S3T3U3        ' ^ ^  ]V3W3X3Y3Z3`3 4.4+4 at 4#4$4%4&4*4=4-4;4>4,4'4)4!4~4{4]4^4/4(4_4:4<4[4}4|4142434445464748494+^)104a4b4c4g^d4d4e4A<f4g4h4i4j4        ",
+"      S;k4l4[4m4n4o4p4q4r4s4t4E|u4v4w4x4y4z4A4B4C4D4E4F4G4H4I4J4K4L4M4N4O4+^P4K2Q4R4S4T4U4V4W4X4Y4Z4`4 5.5+5 at 5Y4Q/#5$5f3%5&5*5=5-5;5>5,5'5)5!5~5{5]5^5/5(5_5:5<5<5[5A3}5|515259)3545556575@'859505a5b5c5d59-e5f5R3S3g5h5      S%i5j5k5l5m5n5o5p5q5r5])s5t5u5v5w5x5y5z5A5B5C5D5E5^4F5G5H5I5J5K5L5M5N5O5P5Q5R5S5T5U5V5R5C2W5X5Y5Z5`5 6.6D<+6 at 6#6 at 6$6%6&6*6^1=6R2-6        ",
+"      ;6>6,6h^'6)6!6~6{6]6^6/6(6_6:6<6[6}6|616263646566676869606a6b6c6d6e6<*f6g6h6i6j6I]k6l6m6n6o6p6q6r6s6t6u6v6w6x6y6z6A6B6C6D6E6F6G6H6I6J6K6L6M6N6O6P6Q6R6S6T6U6V6W6A3X6Y6Z6`6 7.7+7 at 7#7$7%7&7*7=7-7;7>7,7'7)7P3!7~7{7m^]7^7/7(7_7:7<7[7}7|717!'_>r5273747576777879707a7b7c7d7'4[!e7f7g7h7i7j7k7l7m7n7o7p7q7r7U5U5s7t7u7v7w7x7y7z7 6z7z7A7B7C7D7o>E7F7G7H7I7J7        ",
+"      /:K7L7M7N7O7P7O7O7Q7R7S7T7U7V7W7#3X7Y7Z7`7 8.8+8 at 8#8$8%8&8*8=8-8;8>8,8'8)8!8~8{8`,]8^8/8(8_8:8<8[8}8|8*~18]528384858;56878889808a8b8c8d8e8f8g8h8i8j8k8r3l8m8[5n8o8p8q8r8s8t8u8v8 at 7w8x8y8z8A8B8C8D8E8F8G8H8{]I8~7{7J8K8L8M8N8O8P8Q8R8S8T8U8V8W8X8Y8Z8`8 9.9+9 at 9#9$9%9&9i>`]*9=9-9;9^4>9,9'9)9!9~9{9]9^9/9q7!;(9_9t7:9<9%1[9}9w76,|9192939495969s>79G7899909        ",
+"      a9b9c9h^d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u9v9w9x9y9z9A9B9C9V*D9E9,8F9G9H9I9J9n3K9L953a3d3M9N953O9P9i6Q9R9K9S9T9U9V9W9X9Y9Z9`9 0.0+0 at 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|01020304020506070a-80I89000a0q5q5b0c0d0n)e0f0g0h0i0j0k0l0r5m0n0o0p0q0r0s0t0u0v0w0k$x0y0z0A0B0C0D0E0F0H5D0G0H0I0J0K0L0M0N0O0P0Q0R0S0T0U0V0;1y2W0X0Y03/@1Z0w2`0+^^: a        ",
+"      ^ R;.a+a at a#a$a%a&a*a=a-a;a>a,a'a)a!a~a{a]a^a/a(a_a:a<a[a}a!1|a1a2a3a4a5a6a7a8ad3M953L99a0aaabacadaeafagahaiajakalamanaiaoapaqarasatauavawaxayazaAaBaCaDaEaFaGaHaIaJaKaLaMaNaOaPaQa*7RaSaTaUaVaWaXaYaZa`a b.b+b at b#bl,$b%b&b*b=b-b;b>b,b'b)b!b~br=X8&9{b]b^b/b(b_b:b<b[b}b|b1b2by03bj74b5b6b7b8b9b0bD0abbbcbdbv2ebfbgba)hbibjbo{kblbmbnbobpbqbrbsbtbubvb^:wb        ",
+"        xbybzbAbBbCbDbEbFbGbHbIbJbKbLbMbNbObPbQbRbSbTb)7UbVbWbXbYbZb`b c.c+c at c}a#c$c%cF1&c*c=c-c-c;c>c,c'c;c)c!c~c{c]c^c/c(c_c:c<c[c}c|c,!1c2c+03c4c5c6c7c8c9c0cacbcccdcecfcgchcicjckclc,6mcncocpcqcrcsctcucvcf5wcxcyczcAcBcCcDcEcFcGcHcIcJcKcLcMcNcOcPcQcRcv5ScTcUcVcWcXcYcZc`c d.d+d at d#d$d%d&d*d=d-d;d>d,d'd)d!d~d{dVb]d^d/dH8(d_d:d<d[d}d|d1d2d3d4d5d6d+^7d8d        ",
+"        9d0dad+8bdcdddedfdgdhdidjdkdldmdndodpdqdrdJ2sdtdudvds4wdxdM7ydzdAdBdF9CdDdEdFdGdHdId[8JdKdLdt6JdMdNdOdK95cPdQdRdSdS9TdUdVdWdK9XdYdZd`dk3 e.e+eE17c at e#e$e%eGa&e*e=e=eW6-e;e>e,e'e)e!e~e-2i4i4O<{eO<]e^e/e(e_e:e<e[e}e<5|e1e2e3e4eba5e6e7e8e9e0eaebecedeeefegeheiejekelemeneoe2bpeqereseteuevewexeyezeAeBeCeDeEeFeGeHe,6IeJeKeU59,LeMeNeOekbPeQeRe`0SeTeUe        ",
+"        VeWel4XeYeZe`e f.f+f.a at f#f~d$f%f 3&f*f=f-f:6;f51>f,f'f)f!f-[~f{f]f^f/f(f_f:f<f[f}f|f_c1f2f3f4f5f6f1c1,7f8f(c}c9f0fafbfcfdf9fefffgfafhfifbfjfkfjflf at eDamfnfmfof^0pfqfrfsftfufvfwfxfyfzfAfBfCfDfEfFfGfHfIfJfKfLfMfNfOfPfQfRfSfTfUfVfWf6eXfXfYfZf`f g.g+g at gf2#g+d$g%g&g*g=g-g;g>g,g'g)g!g2/~g{g]']g^g/g(g_gfb:g<g[g}gvb|g1g2gG<:93g4g5g%f6g7g8g9g0g{:p7Teag        ",
+"        ] bgcgdgego4fggghgigjgkglgmgO~P~ngogpgqgrgsgtgugvgwgxgygzg<*9-AgBgCgDgEgFgGgHgIgJgKgLgMgNgOgOgPgQgRgSgTg/cUgVgWgXgYgYgZg`g h.h+h at h#h$h%h&h5c*h=h-h;h>hGaGa,h'h)h!h~h{h99]h^h/h(h_h:h~h<h[h}h|h1h2h3h4h5h6h7h8h9h0hahbhchdh(/b8ehfhghhhihjhkhlhmhW-nhohphqhrhshthuhvhwhxhI(yhT*zhAhBhChDhEhFhGhHhIhJhKhLhMhNhOhPhQhRhShThUhVhWhXhYhZh`h i.i+i at i#ig4+^$i%i        ",
+"          &iyb*i=i-i 3;i>ie!,i'ixd)i!i~if^{i]i^i/i_3(i_i:i<i[iC'(f}in{7g|i1i2i3iCd4i5i6i7i8i8i9i0iaibicidieifigihiiijikiliminioioipiqirisitiuiviwixiyiziAiBi'0mfCiDiEiFiGiHiIiJiKiLiMiJiNif^OiPi9-H8q8QiRiSiH8TiJfUiViWi=5XiYiZi`i jB(.j+j at j#jih$j%j&j*j=j-j;j>j,j'j)j!jr0~j{j]jChce^j/j(j_j:j<j[j}j|j1j2j3j4j5j6j7j8j9j84a)0j0jajX/s7H<bjcjdjejfjgjhjijg4<*99%i        ",
+"          jjK2kjegljmjnjojpjqjrjsjtjujvjwjxjyjzj_iAjf6Bjg:CjDjEjpjFjGjHjIjJjBdKjLjMj6aNjOjPjQjRjSjTjUjVjCfWjXjYjHfZj~h`j k.k+k at k#k$k%k%k#k&k&k at k*k%k*k%kFaFa=k)0-k;kHa>k,k'k)k!k~k{k]k^k/k(k_k:kof<k[k}k5d5d^dH8|k1k2k3k4k5k6k7kI~8k.jga(86eXf9k0kakbkckdkekV~fk<b#ggkhkikjkkklkmknkokpkqkrksktkukvkwkxkykzkJh5j(g_4AkBkd4GeCkDkEkGeFkGkHk/9s7HeIkJkKkLkS/Bd99Mk        ",
+"          V!NkOkV2PkQk$>RkSkTkUkVkWk_:Xk;8YkZk`k l.lD9+l at l#l$l%l&la/*l}4=lyg-ls4;l>l,l'l)l!lsb~l{lUj]lWjXj^l/l(lU6[h_l:l<l$e[l}l|l1l[5[5bcbcbcbcbcbcbc2l2l3l4l5l6l;kzf7l8l9l0lalbl7lalcldlelfl8lglhlilEfjlklllmlnlolplqlrlsltlulvlwlehxlylzlXf$jAlBlClDlElFlQ>V~GlHlIlJlKlLlMlNlpgOlPlQlRlSlTlUlVlWlXlYlZl`l m.m+m at m#m$m%mBd0,J2&m(9B<*m<-=m-m;m>m&m,m'm)m!m99~m        ",
+"            q>.1{m]m^m/m;f(mJjx2_m:m<m.l;8[m}m|m1m2m3m4m5m6mS~ l cq77ml48m7a9mH2{i0mambmcmdmemfmgmhmimjmkmlmmmnmompmqm<5Hfrm<5om<5smtmumpm<5Hfvmom<5vmomwmxmymzmAmBm~eZjCmDmEm(dcm2hFmm8GmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZiZm`m ngaVf.njh9k+nBlBl at n#n$n%n&n*n=n-nJl;n>n,n'nO5)n!n~n{n]n^n/n(n_n:n<n[n}n m|n(g1n2n3n4n=15nD'D'6n7n/1{18n*1D<9n0nan~:)mH2$ibn        ",
+"            %iw9cnAbdnenfn5nS5gnhninjng=kn`2G3f|cglnmn,8c4nn-iG}onpnqnrnsntnunvnwnxnyn6aznAnBnCnDnEnFnGnHnInJnKnLnMnNnOnI7OnOn-ePn99QnRnSnFiTnTnFiTnUnjbVnWnXnYnZn`n/k o.o+o at o#oPe$o%oA3&o*o=o-o;op8>o,o'o)o!oH8~o{o]o^o/otl(o_o:o`m.j<o[ohh}o$j|o1o2o3o4o5o6o7o8o9o-n#g0oaobocodoeofogohoiojokolomo2jnooopo~gqo(g+mrosoto{duovowo+ixoyozoAoBo6n>~Coa4Q2Doo499Eo        ",
+"            FoK2UbegGoHo 3IoJoKoLoicMoNoOoPoQoE'RoD}vd^f;lcnSoToUo[*VoWoXoYo>8Zo$f{d`o p.p+p at p#p:h$p$p%pT~&p*p=p-p;p>p,p'p)p!p~pj}yf{p]p^p/p:h(p_p:p{080<p'h[p}p|p~;1p2p3p4pgj4d5p6p7p8p}d9p0papbpcpdpepfp7dgphpipjpkplpmpnpopppqp`mrp<oWfhh}osp|otpupvpwpxpypnhzpAp0o#gBp'gCpDpEpFpGpHpIpJh.mJpKpLpMpNpOpPpQpRp1n+mSpTpUpVpWpU5XpYpZp`p qa4Q~4n.q+q at q#q^1$q at o%q        ",
+"            Q$&qM7*q=q-q;q>q at aKj/a,q'q)qv2f|!q~q{q]q^q~d/qV*(q_qK(>2:q<qG9[q^fr7-[$f}q|q1q2q3q=p4q#n5q6q7q8q9qUj0qflaqbqcqdqeqfq(pgqhqiq~0jq8lZfkqlqmqnqgqoqpqqqk0{]A3rqsqtquqvqwqxqyqzqAq29BqCqDqEqil]h:dFqGqHqSmIqJqKqLqMqopNq:owlOqVfPq7eQq$jRq1oSqTqUqVqWqXqYqZq`q2b r.r+r at r#r$r%r9b&r*r=r-r;r>r,r'r)r!r~r{r]r5jSpSp^r/r(r_r:rKe$1q7<r[r[q}r|r1r2r3r4r5rPe6r        ",
+"              7r(a8r9r0r+l*qb/{far2]brarcr54s4)fdrsnerfrgrhrirjrkrlrmrnr-[or:fpr}aqrD})8rrsrYjtrurXjvrglwr8qxromyr:l8qzrHfArBrCrDrWjgmEr(h_p]hFrGrCmclHrBmbl`jIr&edc59JrKr~:LrMrNrOrPrQrRr>orqQ2rqSrFfwrTrblJmUrVrWrXrYrZr`r s`i.s.jba5e at jhhjh$j|o1o+sTq at s#s$s%s&snhu4#ggkScie*s=s-sNl;s>s,s'sTc)s!s~s{s(g]s^s/s(s5j1n_sSp92:s<s[sS5}s|s1s2s3sCk4s5sy76s)m';8-7s        ",
+"              8s9s0sasbscsdsesfsgsSo'ihsisjsM7{fkslsmsnsospsAdqsrssstsus^fvsl4ws&>xs!;!;yszsDrAsBsCs*eyf~pZ6DsyfyfEsEiFsurGs9lHsIsJsyfDsKs6hLsMsNsOsPsQsRsSs;eFfdcTsejo8UsVsWs^dXsYsZs`s at oi4 t.t+t at t#t$t%t&t*t=t]k-t;t>t,tZi't`ih{Ufga5e8e7e}osp)ttp!t~t{t]t^tX*G#&sa0/tJ5gk(t_t:t<t[t}t|t1t2t3t4t5t6t7t8t9t0tz&at]rbt_sctdtetYpftgt;8htitF2-m~32-jtktPh^1ltmtnt        ",
+"              otptqtrtstttutvtwtvtxtytzt 3AtBtCtDtEtFtGtHtItJtKtLtMtNtOtPtbmQtRtStgjTtUtVtb/aqWtXtYtZtdlRs`tdl^p(d u!e.uEsZtEs+u at u#u{kHa$u%u&u*u99nq=u-u;uEi^:=o>u80,u'u)u!u~u at o{u]u^u/u(u(e_u:u<u[u}u|u1u2u3u4u5u6uXr7u8u9uO]0uaub8xlbucu7edujheu)ttpfu{tguhuiujuku~~lus2pemunuoupuqurusutuuuvuwuxuyuzuAuBuCuDuEuFuGuHuIuJhJuKuR;y>T]VbLuMuvbV7>~Q5f|R/NuIiI7Ou        ",
+"              H%PuQuRuSuTuUuVuWuXuYuV]Zu`uij v.v+v at v#v$v%v&v]q*v=v-v;v>v,v'v)vfgJ(=[<a(r!vD}ur~v{v]v{k^v/v(v_v:v u<v[v}v|v1vjmum2v3vaq4v5v6v7v7vI7<5_v8vmqof7d6h9v0vavbvcvdvevfvgvhvivjvkvlvmvnvovpvqvrvZ6svjqtvuv6uvv7uwvZixvyvzvAvgafhPq.nBvCv9kDvEvFvGvHvIvJvKv(%Q>Lv'4gkMvNv,nOvPvwkQvRvSvTvUvVvWvXvYvZv`v w.w+w at w3ti7,g#w$ww4%w&wL7|rZ5fs*wi}=w-w;wNuTnI7,;        ",
+"                >w(akg,w'w)w!woj_i~w{w]w^w/w(w_wxd:w<w(r{i[w}w|w1w&i2w3w4w>l5w6w5n=>7w8w9w0wO<awCfjm_hbwcwklom+(]vlldw8lyrewbl7lxf,bfw utfgwhqgl oYjhwiwjwHm>uTskwlwfvmwnwowpwv3-lqwrwqwswtw#quwvwwwFfxwomywJmzwAwBw;tCwDwEwFwGwb8UfOq<oj{HwIwJw@~KwLwMwNwOwPwku~~&s&sQwH5RwSwTwUwVwWwi7XwYwZw`w x.x+x at x#x]r$x%x&x*x=x-x;x>xKh,x'x)x!xlvV79p~xc4{x]x441/owdccc^x        ",
+"                /x(x_x:x<xrts444~x$f[x}x|x(s1x2xD}3x4x5x6x7x8xD}9x0xg4axbxcxogdxIoexfxgxhxix*ojxUjDs1vkxlllxmxofnxoxllbw}v_q]vlxpxhlqxrxCfsxpxtxuxvxwxwxxxUmyx*ozx4dAxv3BxCxDxExFxGxHxIxJxKxLxMxNxOxPxUjQxRxSxTxUxVxWxXxYxZx`xGw yUfba.y+y at y#y$yZqbe%y&yZ]*y=y[](*-y;y>y,y^4g7'y)y!y47Xl~y{y]y^y/y:4(y_y:y<y[y}y|yB&I51y2y.m5j3y|kgp4ysb5y6y7y{1:-O28y9y*67d=o0y        ",
+"                0taybycydybr)feykgvtfy)igyhyiycx>ljykylymynyNt'8oypyqybvry+3=lsytyuyvyAtwyxy4n/pyy.u)p'pjqzy!pAyUsBy1v{k=p!pCyDyEy0qFyGy!eR2HyHrIyEsJyKyLyMyNyOyPyQy>uqvRySyYtTyUyVyWyXyYyZy`y z.z+z,u at z#z$z%z&z*z=z-z;z>z,z'z`m)z!z~z{z]z^j-y^z;g/z(z`]_z:z<z at v[z}z|z1z2z3z4z5z6z7z8z9z0zazbzczdzezfzgzhziz xjzkzlzmznzozpz(gqzrzsztzuzvzwzz>xzL7yzzz;wAzzxBzCz        ",
+"                  DzEzFzGzvsHzIz)iJzKzLzMzNz!]OzPzQzRzSzTzUzVzWz+v bigXzarYz,~Zz`z AC2D}.A+A`p at A#A$A%A]hSsjq7l&A*A=A-A;Ayf>AGsEs:h,A'A)ASs8q!A}vEsQe!e~e~A{A]A^A/A6h(A_A:A<A[Apq}A|A1A2A`53A4A5A6A7A8A|59A0A_kaA%ubAcAdAeAfA#ygAhAiAP>P>%!e70tjAV!N5kAlAmA^jnAmkoApAI5qArAsAtAuAvA'4wAxAyAzAAABACADAEAFAGAHAIAJA*fKALAMAleIu_s+mNAOAPASsQAMaRASATAUAVAM<WA*o=7XA        ",
+"                  QhYAZA`A B_:.B+B at B#B$B%B&B*B=BOz'~+v-B;B>B,B'BGj)B!B4w~B1;{B0s]B!;^B/B(B}aP4_BGq:B~v<B7lOs<Baq[B}B|B7v/l&w:BCf8q1B2B3BEm8qIa4B5B#nqq6B7B508B9B0B4daBbBcBdBeBfBSeOh{>OhswgB#qhB*61x0q~hiBjBIrkBlBmBnBoBpBqBVeVeVerBrBX8sBtBuB%bOpvB+gApwBxBL5yBzBABBB%rCBDBEBFBGBHBIBJBKBLBMBNBOBPBQB_tRBSBDATBB0UBO~VBWBIuSproXBYBHhZB`B C^].C+C at C#C$C%C&C=7*C        ",
+"                  =Cigzb-C;C)yt4>C,C'C)C!C^w~C{C]C^Cyb+6_B/C(C_C>8:C<C[C}C|C1C{q2C3Cor4C5CWpLu/B*egq6C7Cyf#u8C,A:B9C0C|57l^v7lGs:h<BjmaC<B~pkxYjbCcCHmdCeCfCgChCNjobiCjCkClCJt59mCnCoC`6lwpCqCf^rCsCtCrmuCT6vCwCxCyCnBzCB5Ver5%!ACBCCC:1DCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCWC|jXCYCZC`C DPv.D+D at D#D$D%D&D*D<y=D-D;D>D,D5jro_s'D)D4q!D]k~D{D^dw9Qu]D^D/Dn{]e(D        ",
+"                  Q#_D:D4/<D[D}DZwng|D1D2D3D+v4D5Dm>q{6D7D'm8D9D0D+laDbDcDdDf7>2eD7gfD(:-l/CgDhD)e~piDiD~pjDiD,k,k~pkD~piDiD~pZtj}kDlDmDnDOnoDpDqDrDsDo8tDuDvDwDxDyD at t.ozDADBDlw@tCDDDs8lw9vEDFDGDHD9vIDJDKDLDMDlBNDODPDQDRD='SDTDUDVDWDr5XDYDZD`D E%4.E+E at E#E$E%E&E*E=E-E;E>E,g,EqA<n'E)E!E(g~E{E]E^E/E(E_E:E<E[Ele}E|E1E2EJA3E4E5E6E7E8Es39EH70EaEJ<bEcEdE]eeE        ",
+"                    fEgEhEiEjEkElEmE36nEoEpEqEmrItrEUksEtEuE2;vEwExEyE>lzEDjx<AEBECEDEEEFEGEHEIEJE^vmmTr#nKE3v^vLEgmMENEblCrOEPE0CwrQE.(}vYtVj4Bxr~0REsbSETEUEVEWE4dExGgRcRcXEIxYEZEe0`E F.F^B+F at F5-xC#F$F%F&F*F=F-F;FzC>F,F'F*x)F!F~F{F]F^F/F(F_F:F<n<F[F}F|F1F2F3F,44F5F6F]97F0bD0uu8F9F0FaFbFG3cFdFeFfFgFhFiFjFkFlFmFnFoFpFqFrF}rVj5vsFtFuFvF/61-|-wFxFyFU7zF        ",
+"                    AFBFCFDFEFFF`AGFHFIF/qJFKFLFusMF7mNFOF~CPFQFOtRFSFTFmsUFVFWFV*XFYFZF`F G.G+G4/CrTrgl at GZf#G$G%G at Gglwrglgl:BWj&G^v*G=G/vx3sx-G;G-Gjmsb>G,G'G)GWEAx8A!G~G{G]GC7^G/G(GNh_Gvz'm:G]Gyn<G[G}G|G1G2G=F3G4G5G6G7G8G9G0GaGbGcGdGeGfGgGhGiGjGkGlGmGnGoGpGqGrGsGtGuGvGwGxGyGzA31)8zGAGBGdFCGDGEGFGGGHGIGvhJGKGa9LGMGNGX7OG}rPGQGRGSGlnhcTG+>GeUGVGWG(1XG        ",
+"                    YG0dZG2C`G H.H1aEq+H at H#HKF2w$H%H]q&H*H=H at a-H;H>H,H'H)Haxax!Hmn~H{H]H^H/H(H_HXz:Hrm<5omomtm<H[H[H}HT6Jm|H1H!AWsjm2HJm3H4HVj5HOmCm6H7H8H9H0HaHbHExcHdH6n6nHehbR3,~,~f|HqeH>8fH<1gHhHiHjHkHlH/AmHnHoHpHqHrHsHtHuHvHwHxHyH&EzHAHBHCHDHEHFHGHHHIHJHKHLHMHNHOHPHQHRHSH;rTHUHVHWHXHYHZH`H I.I+I at I#Io0$I%I&I*ImG=I-I;Iej>I,I'I)I9E!I~I{I]I^IyszxZt/I        ",
+"                    H#:rE'Ru(I_I:I<I<I[I+l}I|I1Ior2I3I4I0-5I6I7IMF8IFj9I0IaIbIcI at cdIeIfIgIhIiI_CjIExkIlIv3rbrbmIkIkIkInIoInIpIqxqIkIv38AqIrIsItIuIvIfv~epIwIxIyIExExvqv3zIAIxIvq/AAIbHBICIDIiCwIxIBDxDEIFIFIGIwIHIIIJIKILIMINIOIPIQIRISITIUIVIWIXIYIZI`I J.J+J at J#J$J%J&J*J=J-J;J&y>J,JE0'J)J!J~JO5{J.v]J^J/J(J_J:J>E<J[J}J|J1J2J3Jpq4J5J6J7J>A8J9J0JBge!S5e^JEaJ        ",
+"                      N'bJcJdJeJ<DfJgJhJ{i_GiJjJkJBAlJqrI=mJnJoJ vpJqJrJsJtJuJvJc4+lwJxJqdS5<*yJzJ at tn8AJDx59n8vqDxDx59/0/0BJs8-2CJvqvqDxDxs8ExlDDJs8Dxs8Dxs8Dxs8avavExs8ExBJs8s8EJFJExAx]kAx]kAx(AExpIv3uI0BGJHJIJJJKJLJMJNJOJPJQJRJSJTJUJVJWJXJYJZJ`J K.K+K at K#Kue$K%K&K*K=K#4-K;K>K,K'K)K!K~K{K]K^K/K(K_KJA+m:K<K[K}K|K1K2K3KGo4K^e5K6K7K8K9Kvb0KaKbKcKdKeKqIfK        ",
+"                      E>gKUohK(uiKW2jK,BarkKlKmKF>nKY;oKpKqKR|2wrKsKfsibcntK|I<*K2K2y<uKy<^G6avKs4DJwIlDpIpIpIwKxK8A8AkI8AnIv3nIwKv30B0Bv3hbwKuINj0B0BxDGJyKzK6BAKBKCKJsDs9lSs;e uDKEK]v#A|vUjFKvrGKHKgqlxoxIKJKKKLKMKNKOKPKQKRKSKTKUKVKWKXKYKZK`K L.L+L at L#L$L%L&L*L=L-L;L>L,L'LX$)L&y!L)sGz~L{L]L^L/L(L_L:L<L[L}L|L1L2L3L4L5LU/6L7L8L9Lu20LaLa-/6VbbL+';2Ps_kcL        ",
+"                      :>dLUbeLfLgLhL&l;8iLRuEBR|jLkLlLmLnLpKoLegnnYbK2y<^G^G[q;8^GBdBd[q<*UtpLqL&qrLsLtLzDuLvLwLxLGx2G-uIx2GrxyLlBzLmH=FALBLBLCLDLELELFLGLGLHLILJLALlBKLxCLLMLNLOLPLFJQLeHRLSLTLUL+BJ=FiVLWL(rXLYLZL`L M.M+M at M#M$M%M&M*MTc=M-M;M>M,M'M)M!M~M{Md6]Mc2^M/M(M_M:Mn0<M[MMA}M|M1M2M3M>d4M5M6M7M8M9MZ*0MaMX*Ey{vbMcMdMeM^efMgMSxhMiMtvjM4/8ykMjCqxzflM        ",
+"                        }-mMnMoMpMqMnKrM(rV2sM}xns4sDjarX/=[gs~3tMtM!1K2uK^G[q^GBduKy<<*Zo~d/]jIa9R>%nI'uMr5]'vMwMxMyMzMAMBMCMDMEMFMGMHMIMCMEMJMKMLMMMMMNMrBVe#{''R>OMPMQMRMSMTMUMVMWMXMYMZM`M N.N+N at N#N$N%N&N*N=N-N;N>Nfn,N3b'N)N~M!N~N{N]N:M^N/N(NUK_N:N<N[N}N|N1NI52N3N4N5N#d6N7N8N9N0NaNbNsuUMcNdNeNfNgN8*hNiNGJjNzDkNfMlNmNnNoNpNqNrN7JsN_dZ5C2tNuNvN&eCswN        ",
+"                        xN(aoCyNdyzN1NANBN l at a);CNrj{iDNENx9gsgs~3fstMK2y<uK5454y<54BdarFNGNHN'>                                                                    INJNKNLNMNNNONPNQNRNSNTNUNVNWNXNYN MZN`NJN O*K.OuA+O at OSJ#O$O%OGG&O*O=O-O;O>O,O'O)O!O~O'j{O]O^Oxn/O(O_O:O<O[O+d$r^4K5}O|O1O2O3O0M4O5O6O7O8O:d2savsr9Oaw0OaObOcOdO^veOfOgOlb C{1Q~hOiOjOAJkOlO        ",
+"                        O>mOf^wnnO5OoOpOqOrOar{i=ib/sO~dENtOw9C2fsfs!1c454^G^G54=luOvOwOsOxOyO]                                                                     )$zOAOBOAOCODOEOFOGOHOIO2LJOKOLOMONOOOPOQORO!&SOTOUOVOWOrkXOYOZO`O P.Psh+P at P#Pg2$P%P&P*P=P-P;P>P,P'P)P'j,y$I!Pb2~P{P]P^PfN/P(P_P0A4/:P.u<P[P}P FR5 C_d|P1P2P2P3P4P>12P5P6P7n7PV7U7zyoI8P9P          ",
+"                        A#0PS~CNaPbPKoxtcPENar{ib/&a{idPD}{f~3~3fstMK2BdK2C2&l[1ePfPE'gPhPiP                                                                          jPkPlPkPmPnPoPpPqPrPsPtPuPvPwPxPyPzP=EAPBPCPDPEPFPGPHPIPJPKPLPMPIOCGNPOPPPQPRPSPTPUPVPWPXPYPZP#g#g`P Q.Q+Q at Q#Q$Qb,gN%Q0M&Q*Q(k-2'hYt:h%Aj==Q-QTL=G;Q>Q;G,Q,Q'Q)Q!Q~Q{Q]Q^QUn/Q_h(psI(QlM          ",
+"                          _Q:Q<Q[Qegj9sOsO{iar{i`2{iar]q.HX/~1tMfs34EN'~Uo}Q|Q1QdPf|.q2QA#                                                                            3Q4QAO5QAO6QLN7Q7QLN8QX09QVw-D0QaQbQcQdQeQ/yH|fQgQhQiQjQkQlQmQnQoQ36pQqQrQsQtQuQvQwQxQxQyQzQAQBQCQDQEQFQz=Z*GQHQ2!IQJQKQ  A#Fq,kqx4HLQYtdlMQNQOQOQPQQQMQRQ^tSQ^tTQUQ|vVQ^p7H7HYt(kWEuvz#          ",
+"                          WQXQYQZQ`Q4D R+Bb/.R+R,B at R`2&a;for)wpK#R$R%R&R*R854n=RO2E>H#                                                                                -R;RlPkPkPkP5Q5QlP>R,R'R)R!RnQ~R{R]R^R/R(R_R:R<R<R[R}R%O|R1R2R3R4R5R6R7R8R9R0RaRbR,4s0cRdReRfRgRhR7*iRy=`*6O2pjRkR^       ^ hA*pBJlRof#uDr(kRsmRwrnRoRCmpRqRrRrRsRtRuRDrvR8PuIYt4HwRxRyR          ",
+"                          ^ zRARzxBRCRDRERFRGRHRIRJRKRLRMRNRORPRQRRR)7(x39]~SR~'^                                                                                     d)TRURlPkP5QLNVOkPVR P4QWRXRYRZR`R S.S+S at S#S$S%S&S*S=S-S;S<R>S,SOB'S)SIO!S~SOPOH{SfQ]S^S/S(S_S:S<S[S}S|S1SX~                yR2S3S4S{k4HofYtLQYtof5SBy6S7SursFWsDr9AtItItIvRoItI8S9S^             ",
+"                            q&0SEzaSbSiEcSdSeSDn$i$iGi);Ijl4&lr4fSgSmOhSd,^                                                                                             GbiSjSLN>RQMmPVRkSlSmSnSoS<xpSqSrSsStSuSvSwSxSySzS*KCuASBSCSDSESFSGSHSRJISJSKSLSMSNSOSPSQSRSSSTSUS{)                        ] VS=AdlkDWSkD4SDyiDXS'hYSYSajlIlI_h'hJyZSZS4H`S TJk]               ",
+"                              A#.T+T at Tq{q{@T#Tq{@T at T(x0dK7$T%T&T*T=T-T                                                                                                  ;T>T,TAO'T>R'T~N~4)T!T~T{T]T^TNH/T(T_T:T<T[T}T|TAH1T2T3T,P4T5T6T7T8T9T0TaTbTcTdTeTfT:SgThTiT)$                                  jTkTo8JK3SlTmTREnT&G&G&G.u&GnTDs;eoTJJpTAIqTp5                  ",
+"                                  ] rT:1sTtTg,uT8;vTL>wT9;xTyT                                                                                                          zTAT;LQM'T>RLNBTCTDTETFTGTHTITJTKTLTKOMTNTOTPTQTRTSTTTUTVTWTXTYTYT|J9Mw=8*ZTP(`T U.Um^]                                             w#LG+U at U@U#U$U at Uc7@U at U%U[~&UMAot(>X~]                       ",
+"                                                                                                                                                                          *U=U-U'T;ULNLN>U,U'U)U!U~U{U]U^U/U(U_U:U<U[U}U|U1U2U3U3U4Ux=Z*.=8*NSiu5U6U7U(%                                                                                                                ",
+"                                                                                                                                                                          8U9U0UaUQM>RbUcUdUeU JfUgUhUiUjUkUlU*NmUnUoU6*pU.Sz=y=qUrU2!.=sUtU.UkR^                                                                                                                       ",
+"                                                                                                                                                                          ^ uUvUC>wUbUbUxUyUzUAUBUCUDUEUFUGUHUIU7McT8*JU|KFA`*z=KULUMUNU^                                                                                                                               "};
diff --git a/pixmaps/romdump.ico b/pixmaps/romdump.ico
new file mode 100755
index 0000000..8f94d9a
Binary files /dev/null and b/pixmaps/romdump.ico differ
diff --git a/pixmaps/romdump.xpm b/pixmaps/romdump.xpm
new file mode 100644
index 0000000..076762f
--- /dev/null
+++ b/pixmaps/romdump.xpm
@@ -0,0 +1,191 @@
+/* XPM */
+static char * romdump_xpm[] = {
+"48 48 140 2",
+"  	c None",
+". 	c #010101",
+"+ 	c #000000",
+"@ 	c #040404",
+"# 	c #0F0F0F",
+"$ 	c #1B1B1B",
+"% 	c #212121",
+"& 	c #222222",
+"* 	c #202020",
+"= 	c #1F1F1F",
+"- 	c #3F3F3F",
+"; 	c #6F6F6F",
+"> 	c #898989",
+", 	c #909090",
+"' 	c #8E8E8E",
+") 	c #878787",
+"! 	c #818181",
+"~ 	c #808080",
+"{ 	c #868686",
+"] 	c #8D8D8D",
+"^ 	c #919191",
+"/ 	c #8F8F8F",
+"( 	c #C4C4C4",
+"_ 	c #EFEFEF",
+": 	c #F7F7F7",
+"< 	c #F1F1F1",
+"[ 	c #EEEEEE",
+"} 	c #E8E8E8",
+"| 	c #E1E1E1",
+"1 	c #E7E7E7",
+"2 	c #EDEDED",
+"3 	c #F0F0F0",
+"4 	c #F6F6F6",
+"5 	c #FFFFFF",
+"6 	c #F4F4F4",
+"7 	c #FEFEFE",
+"8 	c #F3F3F3",
+"9 	c #EBEBEB",
+"0 	c #D8D8D8",
+"a 	c #9B9B9B",
+"b 	c #999999",
+"c 	c #CFCFCF",
+"d 	c #D7D7D7",
+"e 	c #A0A0A0",
+"f 	c #A2A2A2",
+"g 	c #E0E0E0",
+"h 	c #949494",
+"i 	c #333333",
+"j 	c #323232",
+"k 	c #929292",
+"l 	c #121212",
+"m 	c #060606",
+"n 	c #404040",
+"o 	c #EAEAEA",
+"p 	c #777777",
+"q 	c #050505",
+"r 	c #787878",
+"s 	c #151515",
+"t 	c #888888",
+"u 	c #141414",
+"v 	c #ECECEC",
+"w 	c #7E7E7E",
+"x 	c #101010",
+"y 	c #131313",
+"z 	c #989898",
+"A 	c #9A9A9A",
+"B 	c #D0D0D0",
+"C 	c #7F7F7F",
+"D 	c #F2F2F2",
+"E 	c #F5F5F5",
+"F 	c #E4E4E4",
+"G 	c #DEDEDE",
+"H 	c #E5E5E5",
+"I 	c #D9D9D9",
+"J 	c #858585",
+"K 	c #717171",
+"L 	c #707070",
+"M 	c #767676",
+"N 	c #7D7D7D",
+"O 	c #7C7C7C",
+"P 	c #A1A1A1",
+"Q 	c #0B0B0B",
+"R 	c #111111",
+"S 	c #0D0D0D",
+"T 	c #090909",
+"U 	c #0C0C0C",
+"V 	c #1E1E1E",
+"W 	c #5C5C5C",
+"X 	c #797979",
+"Y 	c #BFBFBF",
+"Z 	c #E9E9E9",
+"` 	c #CECECE",
+" .	c #848484",
+"..	c #A3A3A3",
+"+.	c #E2E2E2",
+"@.	c #939393",
+"#.	c #8C8C8C",
+"$.	c #313131",
+"%.	c #424242",
+"&.	c #AAAAAA",
+"*.	c #0A0A0A",
+"=.	c #1D1D1D",
+"-.	c #9C9C9C",
+";.	c #343434",
+">.	c #0E0E0E",
+",.	c #727272",
+"'.	c #CCCCCC",
+").	c #D3D3D3",
+"!.	c #2D2D2D",
+"~.	c #242424",
+"{.	c #FBFBFB",
+"].	c #020202",
+"^.	c #E3E3E3",
+"/.	c #656565",
+"(.	c #282828",
+"_.	c #272727",
+":.	c #5F5F5F",
+"<.	c #5E5E5E",
+"[.	c #FDFDFD",
+"}.	c #FAFAFA",
+"|.	c #191919",
+"1.	c #D2D2D2",
+"2.	c #6E6E6E",
+"3.	c #D1D1D1",
+"4.	c #1C1C1C",
+"5.	c #9F9F9F",
+"6.	c #A8A8A8",
+"7.	c #484848",
+"8.	c #757575",
+"9.	c #383838",
+"0.	c #1A1A1A",
+"a.	c #3A3A3A",
+"b.	c #030303",
+"c.	c #252525",
+"d.	c #575757",
+"e.	c #8B8B8B",
+"f.	c #414141",
+"g.	c #181818",
+"h.	c #6A6A6A",
+"i.	c #C0C0C0",
+". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ",
+". . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ",
+"+ + @ # $ % & & % * = = * % & & & % * = = * % & & & % * = = * % % * = = * % & & & & & % $ # @ + ",
+"+ + # - ; > , , ' ) ! ~ { ] ^ ^ ^ ] { ~ ~ { ] ^ ^ ^ ] { ~ ! ) ' ' ) ! ~ { ] ^ ^ ^ / / > ; - # + ",
+"+ + $ ; ( _ : < [ } | | 1 2 3 < 3 2 1 | | 1 2 3 < 3 2 1 | | } [ [ } | | 1 2 3 < 3 3 4 _ ( ; $ + ",
+"+ + % > _ 5 5 6 < 7 5 5 5 8 2 9 2 8 5 5 5 5 8 2 9 2 8 5 5 5 7 < < 7 5 5 5 8 2 9 2 4 5 5 _ > % + ",
+"+ + & / 4 5 0 a b c 5 5 d e ) ~ ) e d 5 5 d e ) ~ ) e d 5 5 c b b c 5 5 d e ) ~ ) f g 5 4 / & + ",
+"+ + & / 3 8 h i j k < 6 e - l m l - e 6 6 e - l m l - e 6 < k j j k < 6 e - l m l n f 4 3 / & + ",
+"+ + & , 3 o p q q r 9 [ > s + + + s > [ [ > s + + + s > [ 9 r q q r 9 [ > s + + + s t 2 3 , & + ",
+"+ + & , 3 o p @ @ r 9 [ t u + + + u t [ [ t u + + + u t [ 9 r @ @ r 9 [ t u + + + u ) 2 3 , & + ",
+"+ + & , _ v w x x w v _ ' = + + + = ' _ _ ' = + + + = ' _ v w x x w v _ ' = + + + = ' _ _ , & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + + + & / _ v ~ y y ~ v _ / & + + + & / _ _ / & + ",
+"+ + & , _ v w x x w v _ ' = + + + = ' _ _ ' = + + + = ' _ v w x x w v _ ' = + + + = ' _ _ , & + ",
+"+ + & , 3 o p @ @ r 9 [ t u + + + u t [ [ t u + + + u t [ 9 r @ @ r 9 [ t u + + + u ) 2 3 , & + ",
+"+ + & , 3 o p q q r 9 [ > s + + + s > [ [ > s + + + s > [ 9 r q q r 9 [ > s + + + s t 2 3 , & + ",
+"+ + % ] 2 < k j j k < 6 e - l m l - e 6 6 e - l m l - e 6 < k j j k < 6 e - l m l - e 8 2 ] % + ",
+"+ + * { 1 5 c z A B 5 5 d e ) C ) e d 5 5 d e ) C ) e d 5 5 c b b c 5 5 d e ) ~ t e d 5 1 { * + ",
+"+ + = ~ | 5 5 D D 5 5 5 5 8 2 9 2 8 5 5 5 5 8 2 9 2 8 5 5 5 7 < < 7 5 5 5 8 2 v [ 6 5 5 | ~ = + ",
+"+ + = ~ | 5 5 E v F G G F o 2 [ 2 o F G G F o 2 [ 2 o F G G H 9 9 H G G F o 2 [ [ 6 5 5 | ~ = + ",
+"+ + * { 1 5 I f J r K L M N ! ! ! N p K K p N ! ! ! N p K K r w w r K L M O ! ! ) P 0 5 1 { * + ",
+"+ + % ] 2 8 P n y Q # # x l y y y l R x x R l y y y l R x x R y y R x x x l l S y n P 8 2 ] % + ",
+"+ + & , 3 2 { y + + T l u y y R x x R l y y y l R x x R l y y y y y y y y l T + + y { 2 3 , & + ",
+"+ + & , 3 v ~ U + V W X ~ ~ w r K K p N ! ! ! N p K K p N ~ ~ ~ ~ ~ ~ C C X W V + U ~ v 3 , & + ",
+"+ + & , _ v ~ l T W Y v 6 [ 9 H G G F o 2 [ 2 o F G G F o 2 2 v v 2 2 2 8 v Y W T l ~ v _ , & + ",
+"+ + & / _ v C l l X v 5 5 6 < 5 5 5 5 3 o Z v 6 5 5 5 5 < o 9 [ _ 2 2 4 5 5 v X l l C v _ / & + ",
+"+ + & / _ v C l y ~ 8 5 0 a b B 5 5 ` ^ p M  ...+.5 5 d @.r w #./ t t f g 5 8 ~ y l C v _ / & + ",
+"+ + & / _ v C y y C 2 8 h i j @.D D z $.@ + # %.&.5 5 e i m *.=.* s s n f 4 2 C y y C v _ / & + ",
+"+ + & ^ D _ ! y y ~ 2 o p q q M Z 8 -.;.+ + + >.,.'.).t !.+ + + + + + s t 2 2 ~ y y ! _ D ^ & + ",
+"+ + ~.z 7 {.t s l ~ 2 o p @ ].; ^.5 I A /.(.+ + _.:.X ~ X <._.+ + + + s t 2 2 ~ l s t {.7 z ~.+ ",
+"+ + ~.z [.}.t s l C v v w x S ; G 5 5 5 ` ,.|.+ + + !.) ).'.,.S + + + * / _ v C l s t }.[.z ~.+ ",
+"+ + V w 1.c 2.# s ! v v ~ y x K G 5 5 5 3.M 4.+ + + j 5.[.5 6.n *.+ + * ' _ v ! s # 2.c 1.w V + ",
+"+ + R 7.r 8.9.].0.) [ v ~ y R p F 5 g 6.M a.*.b.c.d.e.c 5 5 I A /._.+ 0.) [ [ ) 0.].9.8.r 7.R + ",
+"+ + @ R =.0.. + * ' _ v ~ y l N o 6 f f.>.+ + g.h.i._ 5 5 5 5 D i.<.U s ! v _ ' * + . 0.=.R @ + ",
+". . + + + + + + & , _ v ~ y y ~ 2 2 ) u + + + % > [ 5 5 5 5 5 5 9 r l l C v _ , & + + + + + + . "};
diff --git a/pixmaps/run_1.xpm b/pixmaps/run_1.xpm
new file mode 100644
index 0000000..4ac519a
--- /dev/null
+++ b/pixmaps/run_1.xpm
@@ -0,0 +1,17 @@
+/* XPM */
+static char * run_1_xpm[] = {
+"16 12 2 1",
+" 	c None",
+".	c #2EF407",
+"        ..      ",
+"        ...     ",
+"        ....    ",
+"        .....   ",
+"..............  ",
+"............... ",
+"............... ",
+"..............  ",
+"        .....   ",
+"        ....    ",
+"        ...     ",
+"        ..      "};
diff --git a/pixmaps/run_2.xpm b/pixmaps/run_2.xpm
new file mode 100644
index 0000000..14d86e0
--- /dev/null
+++ b/pixmaps/run_2.xpm
@@ -0,0 +1,17 @@
+/* XPM */
+static char * run_2_xpm[] = {
+"16 12 2 1",
+" 	c None",
+".	c #FF0217",
+"        ..      ",
+"        ...     ",
+"        ....    ",
+"        .....   ",
+"..............  ",
+"............... ",
+"............... ",
+"..............  ",
+"        .....   ",
+"        ....    ",
+"        ...     ",
+"        ..      "};
diff --git a/pixmaps/void.xpm b/pixmaps/void.xpm
new file mode 100644
index 0000000..0e749fc
--- /dev/null
+++ b/pixmaps/void.xpm
@@ -0,0 +1,12 @@
+/* XPM */
+static char * void_xpm[] = {
+"8 8 1 1",
+" 	c None",
+"        ",
+"        ",
+"        ",
+"        ",
+"        ",
+"        ",
+"        ",
+"        "};
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..74ed546
--- /dev/null
+++ b/po/ChangeLog
@@ -0,0 +1,11 @@
+2007-07-19  gettextize  <bug-gnu-gettext at gnu.org>
+
+	* Makefile.in.in: New file, from gettext-0.16.1.
+	* boldquot.sed: New file, from gettext-0.16.1.
+	* en at boldquot.header: New file, from gettext-0.16.1.
+	* en at quot.header: New file, from gettext-0.16.1.
+	* insert-header.sin: New file, from gettext-0.16.1.
+	* quot.sed: New file, from gettext-0.16.1.
+	* remove-potcdate.sin: New file, from gettext-0.16.1.
+	* Rules-quot: New file, from gettext-0.16.1.
+
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..b69b6a2
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,3 @@
+# Set of available languages.
+fr
+
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..5022b8b
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,403 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.16
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SHELL = /bin/sh
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+	@echo "$(MSGFMT) -c -o $@ $<"; \
+	$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+	@lang=`echo $* | sed -e 's,.*/,,'`; \
+	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+	cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+	sed -e '/^#/d' $< > t-$@
+	mv t-$@ $@
+
+
+all: all- at USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+	test ! -f $(srcdir)/$(DOMAIN).pot || \
+	  test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+	@test ! -f $(srcdir)/$(DOMAIN).pot || { \
+	  echo "touch stamp-po" && \
+	  echo timestamp > stamp-poT && \
+	  mv stamp-poT stamp-po; \
+	}
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+	if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+	  msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+	else \
+	  msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+	fi; \
+	$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+	  --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+	  --files-from=$(srcdir)/POTFILES.in \
+	  --copyright-holder='$(COPYRIGHT_HOLDER)' \
+	  --msgid-bugs-address="$$msgid_bugs_address"
+	test ! -f $(DOMAIN).po || { \
+	  if test -f $(srcdir)/$(DOMAIN).pot; then \
+	    sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+	    sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+	    if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+	    else \
+	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+	      mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+	    fi; \
+	  else \
+	    mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+	  fi; \
+	}
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+	$(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+	if test -f "$(srcdir)/$${lang}.po"; then \
+	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	  echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+	  cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+	else \
+	  $(MAKE) $${lang}.po-create; \
+	fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data- at USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+	  for file in $(DISTFILES.common) Makevars.template; do \
+	    $(INSTALL_DATA) $(srcdir)/$$file \
+			    $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	  for file in Makevars; do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
+	fi
+install-data-no: all
+install-data-yes: all
+	$(mkdir_p) $(DESTDIR)$(datadir)
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $(DESTDIR)$$dir; \
+	  if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+	  $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+	  echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+	    if test -n "$$lc"; then \
+	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+	         for file in *; do \
+	           if test -f $$file; then \
+	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+	           fi; \
+	         done); \
+	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	      else \
+	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+	          :; \
+	        else \
+	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        fi; \
+	      fi; \
+	      rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	      ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+	      ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+	      cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	      echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+	    fi; \
+	  done; \
+	done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data- at USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+	else \
+	  : ; \
+	fi
+installdirs-data-no:
+installdirs-data-yes:
+	$(mkdir_p) $(DESTDIR)$(datadir)
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $(DESTDIR)$$dir; \
+	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+	    if test -n "$$lc"; then \
+	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+	         for file in *; do \
+	           if test -f $$file; then \
+	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+	           fi; \
+	         done); \
+	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	      else \
+	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+	          :; \
+	        else \
+	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        fi; \
+	      fi; \
+	    fi; \
+	  done; \
+	done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data- at USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  for file in $(DISTFILES.common) Makevars.template; do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
+	fi
+uninstall-data-no:
+uninstall-data-yes:
+	catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+	    rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	  done; \
+	done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+	rm -f remove-potcdate.sed
+	rm -f stamp-poT
+	rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+	rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+	$(MAKE) update-po
+	@$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  dists="$$dists Makevars.template"; \
+	fi; \
+	if test -f $(srcdir)/$(DOMAIN).pot; then \
+	  dists="$$dists $(DOMAIN).pot stamp-po"; \
+	fi; \
+	if test -f $(srcdir)/ChangeLog; then \
+	  dists="$$dists ChangeLog"; \
+	fi; \
+	for i in 0 1 2 3 4 5 6 7 8 9; do \
+	  if test -f $(srcdir)/ChangeLog.$$i; then \
+	    dists="$$dists ChangeLog.$$i"; \
+	  fi; \
+	done; \
+	if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+	for file in $$dists; do \
+	  if test -f $$file; then \
+	    cp -p $$file $(distdir) || exit 1; \
+	  else \
+	    cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+	  fi; \
+	done
+
+update-po: Makefile
+	$(MAKE) $(DOMAIN).pot-update
+	test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+	$(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+	@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+	echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+	exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+	@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+	if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
+	tmpdir=`pwd`; \
+	echo "$$lang:"; \
+	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+	cd $(srcdir); \
+	if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  else \
+	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	      :; \
+	    else \
+	      echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	else \
+	  echo "msgmerge for $$lang.po failed!" 1>&2; \
+	  rm -f $$tmpdir/$$lang.new.po; \
+	fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+	@:
+
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+	cd $(top_builddir) \
+	  && $(SHELL) ./config.status $(subdir)/$@.in po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..32692ab
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..95afc1a
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,127 @@
+# List of source files containing translatable strings.
+
+# TiEmu source code
+src/core/ti_hw/dbus.c
+src/core/ti_hw/flash.c
+src/core/ti_hw/gscales.c
+src/core/ti_hw/hw.c
+src/core/ti_hw/hwprot.c
+src/core/ti_hw/kbd.c
+src/core/ti_hw/m68k.c
+src/core/ti_hw/mem.c
+src/core/ti_hw/mem89.c
+src/core/ti_hw/mem89tm.c
+src/core/ti_hw/mem92.c
+src/core/ti_hw/mem92p.c
+src/core/ti_hw/memv2.c
+src/core/ti_hw/ports.c
+src/core/ti_hw/rtc_hw3.c
+src/core/ti_hw/tichars.c
+
+src/core/ti_sw/er_codes.c
+src/core/ti_sw/handles.c
+src/core/ti_sw/iodefs.c
+src/core/ti_sw/mem_map.c
+src/core/ti_sw/registers.c
+src/core/ti_sw/romcalls.c
+src/core/ti_sw/timem.c
+src/core/ti_sw/vat.c
+
+src/core/error.c
+src/core/engine.c
+src/core/images.c
+src/core/interface.c
+src/core/state.c
+src/core/type2str.c
+src/core/hwpm.c
+
+src/core/dbg/bkpts.c
+src/core/dbg/debug.c
+src/core/dbg/disasm.c
+src/core/dbg/fpudasm.c
+src/core/dbg/gdbcall.c
+
+src/misc/cmdline.c
+src/misc/files.c
+src/misc/paths.c
+src/misc/logging.c
+src/misc/rcfile.c
+src/misc/screenshot.c
+src/misc/tie_error.c
+
+src/gui/calc/calc.c
+src/gui/calc/dnd.c
+src/gui/calc/keymap.c
+src/gui/calc/keyboard.c
+src/gui/calc/keynames.c
+src/gui/calc/keypress.c
+src/gui/calc/popup.c
+src/gui/calc/screen.c
+src/gui/calc/skinkeys.c
+src/gui/calc/skinops.c
+
+src/gui/debugger/dbg_all.c
+src/gui/debugger/dbg_bkpts.c
+src/gui/debugger/dbg_bits.c
+src/gui/debugger/dbg_cause.c
+src/gui/debugger/dbg_code.c
+src/gui/debugger/dbg_data.c
+src/gui/debugger/dbg_entry.c
+src/gui/debugger/dbg_heap.c
+src/gui/debugger/dbg_iop.c
+src/gui/debugger/dbg_mem.c
+src/gui/debugger/dbg_pclog.c
+src/gui/debugger/dbg_regs.c
+src/gui/debugger/dbg_romcall.c
+src/gui/debugger/dbg_stack.c
+src/gui/debugger/dbg_vectors.c
+
+src/gui/logger/log_link.c
+
+src/gui/about.c
+src/gui/device.c
+src/gui/dboxes.c
+src/gui/filesel.c
+src/gui/fs_misc.c
+src/gui/infos.c
+src/gui/main.c
+src/gui/manpage.c
+src/gui/pbars.c
+src/gui/quicksend.c
+src/gui/refresh.c
+src/gui/release.c
+src/gui/romversion.c
+src/gui/scroptions.c
+src/gui/splash.c
+src/gui/support.c
+src/gui/tsource.c
+src/gui/wizard.c
+
+src/sound/audio.c
+src/sound/stream.c
+
+# TiEmu GUI
+glade/calc-2.str
+glade/dbg_bkpts-2.str
+glade/dbg_bits-2.str
+glade/dbg_cause-2.str
+glade/dbg_code-2.str
+glade/dbg_data-2.str
+glade/dbg_entry-2.str
+glade/dbg_heap-2.str
+glade/dbg_ioports-2.str
+glade/dbg_mem-2.str
+glade/dbg_pclog-2.str
+glade/dbg_regs-2.str
+glade/dbg_stack-2.str
+glade/dbg_vectors-2.str
+glade/dboxes-2.str
+glade/device-2.str
+glade/infos-2.str
+glade/log_link-2.str
+glade/pbars-2.str
+glade/popup-2.str
+glade/quicksend-2.str
+glade/romversion-2.str
+glade/scroptions-2.str
+glade/wizard-2.str
\ No newline at end of file
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 0000000..9c2a995
--- /dev/null
+++ b/po/Rules-quot
@@ -0,0 +1,47 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en at quot.header en at boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en at quot.po-create:
+	$(MAKE) en at quot.po-update
+en at boldquot.po-create:
+	$(MAKE) en at boldquot.po-update
+
+en at quot.po-update: en at quot.po-update-en
+en at boldquot.po-update: en at boldquot.po-update-en
+
+.insert-header.po-update-en:
+	@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+	if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+	tmpdir=`pwd`; \
+	echo "$$lang:"; \
+	ll=`echo $$lang | sed -e 's/@.*//'`; \
+	LC_ALL=C; export LC_ALL; \
+	cd $(srcdir); \
+	if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  else \
+	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	      :; \
+	    else \
+	      echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	else \
+	  echo "creation of $$lang.po failed!" 1>&2; \
+	  rm -f $$tmpdir/$$lang.new.po; \
+	fi
+
+en at quot.insert-header: insert-header.sin
+	sed -e '/^#/d' -e 's/HEADER/en at quot.header/g' $(srcdir)/insert-header.sin > en at quot.insert-header
+
+en at boldquot.insert-header: insert-header.sin
+	sed -e '/^#/d' -e 's/HEADER/en at boldquot.header/g' $(srcdir)/insert-header.sin > en at boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+	rm -f *.insert-header
diff --git a/po/TRANSLATORS b/po/TRANSLATORS
new file mode 100644
index 0000000..10a3cc0
--- /dev/null
+++ b/po/TRANSLATORS
@@ -0,0 +1,9 @@
+Internationalization:
+---------------------
+
+- French:
+	Romain Li�vin
+- Deutsch: 
+	Kevin Kofler
+- Italian:
+	Kevin Kofler
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“/g
+s/”/”/g
+s/‘/‘/g
+s/’/’/g
diff --git a/po/copy.bat b/po/copy.bat
new file mode 100644
index 0000000..ed29ee3
--- /dev/null
+++ b/po/copy.bat
@@ -0,0 +1,15 @@
+mkdir c:\lpg\msvc\locale
+mkdir c:\lpg\msvc\locale\fr
+mkdir c:\lpg\msvc\locale\fr\LC_MESSAGES
+
+msgfmt -c -o fr.mo fr.po
+copy fr.mo c:\lpg\msvc\locale\fr\LC_MESSAGES\tiemu3.mo
+
+msgfmt -c -o ../../ticables2/po/fr.mo ../../ticables2/po/fr.po
+copy ..\..\ticables2\po\fr.mo c:\lpg\msvc\locale\fr\LC_MESSAGES\libticables2.mo
+
+msgfmt -c -o ../../tifiles2/po/fr.mo ../../tifiles2/po/fr.po
+copy ..\..\tifiles2\po\fr.mo c:\lpg\msvc\locale\fr\LC_MESSAGES\libtifiles2.mo
+
+msgfmt -c -o ../../ticalcs2/po/fr.mo ../../ticalcs2/po/fr.po
+copy ..\..\ticalcs2\po\fr.mo c:\lpg\msvc\locale\fr\LC_MESSAGES\libticalcs2.mo
diff --git a/po/en at boldquot.header b/po/en at boldquot.header
new file mode 100644
index 0000000..fedb6a0
--- /dev/null
+++ b/po/en at boldquot.header
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en at quot.header b/po/en at quot.header
new file mode 100644
index 0000000..a9647fc
--- /dev/null
+++ b/po/en at quot.header
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/fr.gmo b/po/fr.gmo
new file mode 100644
index 0000000..86057f0
Binary files /dev/null and b/po/fr.gmo differ
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..d823a6b
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,2727 @@
+# French locale for TiEmu
+# Copyright (C) 2007 Romain Liévin
+# This file is distributed under the same license as the libtifiles package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: tiemu\n"
+"Report-Msgid-Bugs-To: tiemu-users at lists.sourceforge.net\n"
+"POT-Creation-Date: 2009-05-30 00:05+0200\n"
+"PO-Revision-Date: 2004-04-13 13:21+0000\n"
+"Last-Translator: Romain Liévin <roms at tilp.info>\n"
+"Language-Team: Français <tiemu-devel at lists.sf.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+# ##, c-format
+# #, c-format
+#: src/core/ti_hw/flash.c:261
+#, c-format
+msgid "found SSP=$%06x and PC=$%06x at offset 0x%x"
+msgstr "trouvé un SSP=$%06x et un PC=$%06x à l'offset 0x%x"
+
+# ##, c-format
+# #, c-format
+#: src/core/ti_sw/iodefs.c:351
+#, c-format
+msgid "loading I/O defs: %s (%i entries)"
+msgstr "chargement des définitions d'E/S: %s (%i entrées)"
+
+# ##, c-format
+# #, c-format
+#: src/core/ti_sw/mem_map.c:163
+#, c-format
+msgid "loading memory map: %s"
+msgstr "chargement carte mémoire: %s"
+
+#: src/core/error.c:49
+msgid "No error."
+msgstr "Pas d'erreur."
+
+#: src/core/error.c:53
+msgid "Can not open file."
+msgstr "Impossible d'ouvrir le fichier."
+
+#: src/core/error.c:57
+msgid "Can not open state image: file is corrupted or missing."
+msgstr ""
+"Ne peut pas ouvrir le fichier d'état: le fichier est corrompu ou introuvable."
+
+#: src/core/error.c:61
+msgid ""
+"Can not open state image: revision changed. You have to recreate the state "
+"image."
+msgstr ""
+"Ne peut pas ouvrir le fichier d'état: la révision a changé. Vous devez "
+"recréer ce fichier."
+
+#: src/core/error.c:65
+msgid ""
+"Can not open state image: state image header does not match ROM image "
+"header: have you changed/updated your ROM image?"
+msgstr ""
+"Ne peut pas ouvrir le fichier d'état: l'en-tête ne correspond pas à celui de "
+"l'image ROM: avez-vous changé/mis-à-jour l'image ROM ?"
+
+#: src/core/error.c:69
+msgid ""
+"Can not open state image: this state image is not targetted for your current "
+"emulator image (calculator model and/or OS version must match!). Choose "
+"another image before."
+msgstr ""
+"Ne peut pas ouvrir le fichier d'état: le fichier d'état ne correspond pas à "
+"l'image ROM actuelle (le modèle de calculatrice et/ou la version d'OS doit "
+"correspondre !). Choisissez une autre image."
+
+#: src/core/error.c:73
+msgid "Invalid emulator image. File is corrupted or revision changed."
+msgstr "Image invalide. Le fichier est corrompu ou la révision a changé."
+
+#: src/core/error.c:77 src/gui/wizard.c:289
+msgid "Invalid FLASH upgrade."
+msgstr "MAJ invalide."
+
+#: src/core/error.c:81 src/gui/wizard.c:253
+msgid "Invalid ROM dump."
+msgstr "ROM invalide."
+
+#: src/core/error.c:85
+msgid "No image."
+msgstr "Pas d'image."
+
+#: src/core/error.c:89
+msgid "ROM dump has a weird size."
+msgstr "Le dump ROM a une taille bizarre."
+
+#: src/core/error.c:93
+msgid "This is not recognized as a TI file."
+msgstr "N'est pas reconnu comme un fichier TI valide."
+
+#: src/core/error.c:97
+msgid "Can't parse folder."
+msgstr "Ne peut pas parcourir le dossier."
+
+#: src/core/error.c:101
+msgid "Can't upgrade calculator."
+msgstr "Ne peut pas mettre à jour la calculatrice."
+
+#: src/core/error.c:105
+msgid ""
+"Error code not found in the list.\n"
+"This is a bug. Please report it."
+msgstr ""
+"Code d'erreur introuvable dans la liste.\n"
+"Ceci est un bogue. Veuillez le reporter."
+
+#: src/core/images.c:121
+msgid "ROM information:"
+msgstr "Informations ROM:"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:122 src/core/images.c:133 src/core/images.c:143
+#, c-format
+msgid "  Calculator  : %s"
+msgstr "  Calculatrice: %s"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:123 src/core/images.c:134 src/core/images.c:144
+#, c-format
+msgid "  Firmware    : %s"
+msgstr "  Progiciel   : %s"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:124 src/core/images.c:135 src/core/images.c:145
+#, c-format
+msgid "  Memory type : %s"
+msgstr "  Type mémoire: %s"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:125 src/core/images.c:136 src/core/images.c:146
+#, c-format
+msgid "  Memory size : %iMB (%i bytes)"
+msgstr "  Taille mém. : %iMo (%i octets)"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:126 src/core/images.c:137 src/core/images.c:147
+#, c-format
+msgid "  ROM base    : %02x"
+msgstr "  Base ROM    : %02x"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:127 src/core/images.c:148
+#, c-format
+msgid "  Hardware    : %i"
+msgstr "  Matériel    : %i"
+
+#: src/core/images.c:132
+msgid "TIB information:"
+msgstr "Informations TIB:"
+
+#: src/core/images.c:142
+msgid "Image information:"
+msgstr "Informations Image:"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:149
+#, c-format
+msgid "  Has boot    : %s"
+msgstr "  A un boot   : %s"
+
+#: src/core/images.c:149 src/core/images.c:1092
+msgid "yes"
+msgstr "oui"
+
+#: src/core/images.c:149 src/core/images.c:1092
+msgid "no"
+msgstr "non"
+
+# #, c-format
+#: src/core/images.c:176 src/core/images.c:1045
+#, c-format
+msgid "Unable to open this file: <%s>"
+msgstr "Impossible d'ouvrir ce fichier: <%s>"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:190
+#, c-format
+msgid "Warning: truncating 8 MB image to 4 MB: <%s>"
+msgstr "Attention: troncature de l'image de 8 Mo à 4 Mo: <%s>"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:203
+#, c-format
+msgid "Failed to read from file: <%s>"
+msgstr "La lecture du fichier <%s> a échoué"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:209
+#, c-format
+msgid "Failed to close file: <%s>"
+msgstr "La fermeture du fichier <%s> a échoué"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:463 src/core/images.c:753 src/core/images.c:767
+#, c-format
+msgid "Unable to get information on ROM dump: %s"
+msgstr "Impossible d'obtenir des informations sur la ROM: %s"
+
+#: src/core/images.c:490
+msgid "Completing image to 4 MB!"
+msgstr "Complétion de l'image à 4Mo !"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:547 src/core/images.c:914
+#, c-format
+msgid "Unable to get information on FLASH upgrade: <%s>"
+msgstr "Impossible d'obtenir des informations sur la MAJ: <%s>"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:838
+#, c-format
+msgid "Unable to get information on image: %s"
+msgstr "Impossible d'obtenir des informations sur cette image: %s"
+
+#: src/core/images.c:973 src/core/images.c:1053 src/core/images.c:1191
+msgid "Opendir error"
+msgstr "Erreur d'ouverture de répertoire"
+
+#: src/core/images.c:1039
+msgid "Scanning images/upgrades... "
+msgstr "Scrutation des images/màj... "
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:1067
+#, c-format
+msgid "Can not stat: <%s>"
+msgstr "Ne peut pas évaluer: <%s>"
+
+# ##, c-format
+# #, c-format
+#: src/core/images.c:1078
+#, c-format
+msgid "Can not get ROM/update info: <%s>"
+msgstr "Ne peut pas obtenir d'informations sur la ROM/MAJ: <%s>"
+
+#: src/core/images.c:1107
+msgid "Done."
+msgstr "Fait."
+
+#: src/core/interface.c:252 src/core/interface.c:263 src/core/interface.c:274
+#: src/core/interface.c:285 src/core/interface.c:296
+msgid "Bad argument!"
+msgstr "Mauvais argument!"
+
+# ##, c-format
+# #, c-format
+#: src/core/state.c:178
+#, c-format
+msgid "loading state image: %s"
+msgstr "chargement de l'image d'état: %s"
+
+# ##, c-format
+# #, c-format
+#: src/core/state.c:353
+#, c-format
+msgid "saving state image (TiEmu v2.00 format): %s"
+msgstr "sauvegarde de l'image d'état (format TiEmu v2.00): %s"
+
+#: src/core/type2str.c:118
+msgid "Initial SSP"
+msgstr "SSP initial"
+
+#: src/core/type2str.c:119
+msgid "Initial PC"
+msgstr "PC initial"
+
+#: src/core/type2str.c:120
+msgid "Bus Error vector"
+msgstr "Vecteur Bus Error"
+
+#: src/core/type2str.c:121
+msgid "Address Error vector"
+msgstr "Vecteur Address Error"
+
+#: src/core/type2str.c:122
+msgid "Illegal Instruction vector"
+msgstr "Vecteur Illegal Instruction"
+
+#: src/core/type2str.c:123
+msgid "Zero Divide vector"
+msgstr "Vecteur Zero Divide"
+
+#: src/core/type2str.c:124
+msgid "CHK Instruction vector"
+msgstr "Vecteur CHK Instruction"
+
+#: src/core/type2str.c:125
+msgid "TRAPV Instruction vector"
+msgstr "Vecteur TRAPV Instruction"
+
+#: src/core/type2str.c:126
+msgid "Privilege Violation vector"
+msgstr "Vecteur Privilege Violation"
+
+#: src/core/type2str.c:127
+msgid "Trace vector"
+msgstr "Vecteur Trace"
+
+#: src/core/type2str.c:128
+msgid "Line 1010 Emulator vectors"
+msgstr "Vecteur Line 1010"
+
+#: src/core/type2str.c:129
+msgid "Line 1111 Emulator vectors"
+msgstr "Vecteur Line 1111"
+
+#: src/core/type2str.c:130 src/core/type2str.c:131 src/core/type2str.c:132
+#: src/core/type2str.c:134 src/core/type2str.c:135 src/core/type2str.c:136
+#: src/core/type2str.c:137 src/core/type2str.c:138 src/core/type2str.c:139
+#: src/core/type2str.c:140 src/core/type2str.c:141 src/core/type2str.c:181
+msgid "Unassigned, reserved"
+msgstr "Non assigné (réservé)"
+
+#: src/core/type2str.c:133
+msgid "Uninitialised Interrupt vector"
+msgstr "Vecteur Uninitialised Interrupt"
+
+#: src/core/type2str.c:142
+msgid "Spurious Interrupt vector"
+msgstr "Vecteur Spurious Interrupt"
+
+#: src/core/type2str.c:143
+msgid "Level 1 Interrupt auto-vectors"
+msgstr "Vecteur automatique Level 1"
+
+#: src/core/type2str.c:144
+msgid "Level 2 Interrupt auto-vectors"
+msgstr "Vecteur automatique Level 2"
+
+#: src/core/type2str.c:145
+msgid "Level 3 Interrupt auto-vectors"
+msgstr "Vecteur automatique Level 3"
+
+#: src/core/type2str.c:146
+msgid "Level 4 Interrupt auto-vectors"
+msgstr "Vecteur automatique Level 4"
+
+#: src/core/type2str.c:147
+msgid "Level 5 Interrupt auto-vectors"
+msgstr "Vecteur automatique Level 5"
+
+#: src/core/type2str.c:148
+msgid "Level 6 Interrupt auto-vectors"
+msgstr "Vecteur automatique Level 6"
+
+#: src/core/type2str.c:149
+msgid "Level 7 Interrupt auto-vectors"
+msgstr "Vecteur automatique Level 7"
+
+#: src/core/type2str.c:150
+msgid "TRAP #0 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #0"
+
+#: src/core/type2str.c:151
+msgid "TRAP #1 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #1"
+
+#: src/core/type2str.c:152
+msgid "TRAP #2 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #2"
+
+#: src/core/type2str.c:153
+msgid "TRAP #3 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #3"
+
+#: src/core/type2str.c:154
+msgid "TRAP #4 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #4"
+
+#: src/core/type2str.c:155
+msgid "TRAP #5 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #5"
+
+#: src/core/type2str.c:156
+msgid "TRAP #6 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #6"
+
+#: src/core/type2str.c:157
+msgid "TRAP #7 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #7"
+
+#: src/core/type2str.c:158
+msgid "TRAP #8 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #8"
+
+#: src/core/type2str.c:159
+msgid "TRAP #9 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #9"
+
+#: src/core/type2str.c:160
+msgid "TRAP #10 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #10"
+
+#: src/core/type2str.c:161
+msgid "TRAP #11 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #11"
+
+#: src/core/type2str.c:162
+msgid "TRAP #12 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #12"
+
+#: src/core/type2str.c:163
+msgid "TRAP #13 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #13"
+
+#: src/core/type2str.c:164
+msgid "TRAP #14 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #14"
+
+#: src/core/type2str.c:165
+msgid "TRAP #15 Instruction vectors"
+msgstr "Vecteur Instruction TRAP #15"
+
+#: src/core/type2str.c:182 src/core/type2str.c:184
+msgid "User Interrupt vectors"
+msgstr "Vecteur User Interrupt"
+
+#: src/core/type2str.c:192 src/core/type2str.c:208 src/core/type2str.c:221
+#: src/gui/debugger/dbg_bkpts.c:296 glade/dbg_cause-2.str:11
+msgid "access"
+msgstr "accès"
+
+#: src/core/type2str.c:193
+msgid "access range"
+msgstr "intervalle d'accès."
+
+#: src/core/type2str.c:194
+msgid "address"
+msgstr "adresse"
+
+#: src/core/type2str.c:195 src/core/type2str.c:211 src/core/type2str.c:227
+msgid "exception"
+msgstr "exception"
+
+#: src/core/type2str.c:196 src/core/type2str.c:212 src/core/type2str.c:229
+msgid "prgm entry"
+msgstr "entrée de programme"
+
+#: src/core/type2str.c:197 src/core/type2str.c:213 src/core/type2str.c:231
+msgid "hw protection"
+msgstr "protection matérielle"
+
+#: src/core/type2str.c:198 src/core/type2str.c:214 src/core/type2str.c:233
+msgid "bit change"
+msgstr "changement bit"
+
+#: src/core/type2str.c:199 src/core/type2str.c:215 src/gui/infos.c:61
+msgid "unknown"
+msgstr "inconnu"
+
+#: src/core/type2str.c:209 src/core/type2str.c:223
+#: src/gui/debugger/dbg_bkpts.c:296
+msgid "range"
+msgstr "intervalle"
+
+#: src/core/type2str.c:210 src/core/type2str.c:225
+msgid "code"
+msgstr "code"
+
+#: src/core/hwpm.c:61
+msgid "Hardware Parameters Block:"
+msgstr "Bloc de paramètres matériels:"
+
+# ##, c-format
+# #, c-format
+#: src/core/hwpm.c:62
+#, c-format
+msgid "  length           : %i"
+msgstr "  longueur         : %i"
+
+#: src/core/hwpm.c:121
+msgid ""
+"Detected V200 patched ROM (ExtendeD): emulated as TI92+ by changing the hwID "
+"from 8 to 1."
+msgstr ""
+"ROM patché pour V200 détectée (ExtendeD): émulée comme TI92+ par changement "
+"du hwID de 8 à 1."
+
+#: src/core/hwpm.c:127
+msgid ""
+"Detected TI89 Titanium patched ROM (ExtendeD): emulated as TI89 by changing "
+"the hwID from 9 to 3."
+msgstr ""
+"ROM patchée pour Titanium détectée (ExtendeD): émulée comme TI89 par "
+"changement du hwID de 9 à 3."
+
+# #, c-format
+#: src/misc/cmdline.c:62
+#, c-format
+msgid "THIS PROGRAM COMES WITH ABSOLUTELY NO WARRANTY\n"
+msgstr "CE PROGRAMME N'EST FOURNI AVEC AUCUNE GARANTIE\n"
+
+# #, c-format
+#: src/misc/cmdline.c:63
+#, c-format
+msgid "PLEASE READ THE DOCUMENTATION FOR DETAILS\n"
+msgstr "VEUILLEZ LIRE LA DOCUMENTATION POUR PLUS DE DETAILS\n"
+
+#: src/misc/files.c:95 src/misc/files.c:107 src/misc/files.c:123
+#: src/gui/calc/keyboard.c:77 src/gui/calc/popup.c:176
+#: src/gui/calc/popup.c:179 src/gui/calc/popup.c:191 src/gui/dboxes.c:42
+#: src/gui/fs_misc.c:155 src/gui/fs_misc.c:158
+msgid "Information"
+msgstr "Information"
+
+#: src/misc/files.c:95
+msgid "Unable to remove the file!"
+msgstr "Impossible de supprimer le fichier !"
+
+#: src/misc/files.c:107
+msgid ""
+"Unable to move file.\n"
+"\n"
+msgstr "Impossible de déplacer le fichier.\n"
+
+#: src/misc/files.c:123
+msgid ""
+"Unable to create the directory.\n"
+"\n"
+msgstr ""
+"Impossible de créer le répertoire.\n"
+"\n"
+
+# ##, c-format
+#: src/misc/files.c:151
+#, c-format
+msgid ""
+"The file %s already exists.\n"
+"Overwrite?"
+msgstr ""
+"Le fichier %s existe déjà.\n"
+"L'écraser ?"
+
+#: src/misc/files.c:153 src/gui/dboxes.c:44 src/gui/fs_misc.c:82
+#: src/gui/fs_misc.c:239
+msgid "Warning"
+msgstr "Avertissement"
+
+#: src/misc/files.c:154
+msgid "Overwrite "
+msgstr "Écraser"
+
+#: src/misc/files.c:154
+msgid "Rename "
+msgstr "Renommer"
+
+#: src/misc/files.c:154
+msgid "Skip "
+msgstr "Sauter"
+
+#: src/misc/files.c:164
+msgid "Rename the file"
+msgstr "Renommer le fichier"
+
+#: src/misc/files.c:165
+msgid "New name: "
+msgstr "Nouveau nom: "
+
+#: src/misc/files.c:209 src/misc/tie_error.c:78 src/gui/calc/popup.c:797
+#: src/gui/calc/popup.c:847 src/gui/dboxes.c:48 src/gui/fs_misc.c:212
+#: src/gui/fs_misc.c:391 src/gui/fs_misc.c:421 src/gui/fs_misc.c:437
+#: src/gui/fs_misc.c:502 src/gui/main.c:218 src/gui/main.c:226
+#: src/gui/main.c:234 src/gui/main.c:242 src/gui/quicksend.c:120
+#: src/gui/wizard.c:253 src/gui/wizard.c:289
+msgid "Error"
+msgstr "Erreur"
+
+#: src/misc/files.c:209
+msgid "Unable to move the temporary file.\n"
+msgstr "Impossible de déplacer le fichier temporaire.\n"
+
+# #, c-format
+#: src/misc/rcfile.c:76
+#, c-format
+msgid "Configuration file error at line %i."
+msgstr "Erreur dans le fichier de configuration à la line %i."
+
+#: src/misc/rcfile.c:181
+msgid ""
+"Configuration file not found, use default values. You can create one by the "
+"'File|Save config' command menu."
+msgstr ""
+"Fichier de configuration introuvable; utilisation des valeurs par défait. "
+"Vous pouvez en créer un par le menu File > Save config."
+
+#: src/misc/screenshot.c:70
+msgid "Couldn't allocate memory!"
+msgstr "Ne peut pas allouer la mémoire demandée !"
+
+#: src/misc/screenshot.c:81
+msgid "zlib init error"
+msgstr "erreur d'initialisation zlib"
+
+#: src/misc/screenshot.c:97
+msgid "zlib deflate error"
+msgstr "erreur de décompression zlib"
+
+#: src/misc/screenshot.c:187 src/misc/screenshot.c:237
+msgid "Couldn't open destination file for writing!"
+msgstr "Ne peut pas ouvrir le fichier de destination en écriture!"
+
+# #, c-format
+#: src/gui/calc/calc.c:234 src/gui/calc/popup.c:655
+#: src/gui/debugger/dbg_bkpts.c:363 src/gui/debugger/dbg_bits.c:50
+#: src/gui/debugger/dbg_cause.c:60 src/gui/debugger/dbg_cause.c:144
+#: src/gui/debugger/dbg_code.c:357 src/gui/debugger/dbg_code.c:698
+#: src/gui/debugger/dbg_code.c:1160 src/gui/debugger/dbg_data.c:56
+#: src/gui/debugger/dbg_entry.c:207 src/gui/debugger/dbg_heap.c:146
+#: src/gui/debugger/dbg_heap.c:267 src/gui/debugger/dbg_iop.c:430
+#: src/gui/debugger/dbg_mem.c:712 src/gui/debugger/dbg_mem.c:1087
+#: src/gui/debugger/dbg_mem.c:1311 src/gui/debugger/dbg_pclog.c:138
+#: src/gui/debugger/dbg_regs.c:194 src/gui/debugger/dbg_regs.c:539
+#: src/gui/debugger/dbg_stack.c:163 src/gui/debugger/dbg_stack.c:417
+#: src/gui/debugger/dbg_vectors.c:145 src/gui/logger/log_link.c:62
+#: src/gui/infos.c:50 src/gui/manpage.c:72 src/gui/pbars.c:63
+#: src/gui/quicksend.c:59 src/gui/release.c:77 src/gui/romversion.c:191
+#: src/gui/scroptions.c:61 src/gui/wizard.c:71
+#, c-format
+msgid "%s: GUI loading failed!\n"
+msgstr "%s: échec de chargement de l'interface graphique !\n"
+
+# ##, c-format
+# #, c-format
+#: src/gui/calc/calc.c:751
+#, c-format
+msgid "screenshot to %s... "
+msgstr "capture écran dans %s..."
+
+#: src/gui/calc/calc.c:770
+msgid "unsupported screenshot options combination, screenshot aborted."
+msgstr ""
+"combinaison d'options de capture écran incompatibles; capture écran avortée."
+
+# ##, c-format
+# #, c-format
+#: src/gui/calc/calc.c:797
+#, c-format
+msgid "failed to save pixbuf file: %s: %s"
+msgstr "n'a pû sauvegarder le fichier pixbuf: %s: %s"
+
+#: src/gui/calc/calc.c:802
+msgid "done!"
+msgstr "fait !"
+
+# ##, c-format
+# #, c-format
+#: src/gui/calc/keymap.c:207
+#, c-format
+msgid "loading keymap: %s (%i keys)"
+msgstr "chargement du clavier: %s (%i touches)"
+
+#: src/gui/calc/keypress.c:58 src/gui/calc/keypress.c:84
+msgid "Can't open file."
+msgstr "Impossible d'ouvrir le fichier."
+
+#: src/gui/calc/popup.c:71
+#, c-format
+msgid "* TiEmu version %s (cables=%s, files=%s, calcs=%s, conv=%s)"
+msgstr "* TiEmu version %s (cables=%s, files=%s, calcs=%s, conv=%s)"
+
+#: src/gui/calc/popup.c:177
+msgid "Configuration file saved (in tiemu.ini)."
+msgstr "Fichier de configuration enregistré (dans tiemu.ini)."
+
+#: src/gui/calc/popup.c:180
+msgid "Configuration file saved (in ~/.tiemu)."
+msgstr "Fichier de configuration enregistré (dans ~/.tiemu)."
+
+#: src/gui/calc/popup.c:191
+msgid "Configuration file loaded."
+msgstr "Fichier de configuration chargé."
+
+#: src/gui/calc/popup.c:267 src/gui/dboxes.c:46
+msgid "Question"
+msgstr "Question"
+
+#: src/gui/calc/popup.c:267
+msgid "Clear RAM?"
+msgstr "Effacer la RAM ?"
+
+#: src/gui/calc/popup.c:512
+msgid "Manual_en.html"
+msgstr "Manual_en.html"
+
+#: src/gui/calc/popup.c:533
+msgid "You're using GTK+ >= 2.12 so bookmark support is currently unavailable."
+msgstr ""
+"Vous utilisez GTK+ >= 2.12: les marques-pages ne sont pas (encore) "
+"disponibles."
+
+#: src/gui/calc/popup.c:553
+msgid ""
+"There are several ways to get in touch if you encounter a problem with TiEmu "
+"or if you have questions, suggestions, bug reports, etc:\n"
+"- if you have general questions or problems, please consider the users' "
+"mailing list first (http://tiemu-users@list.sf.net).\n"
+"- if you want to discuss about TiEmu, you can use the TiEmu forum (http://"
+"sourceforge.net/forum/?group_id=23169).\n"
+"- for bug reports, use the 'Bug Tracking System' (http://sourceforge.net/"
+"tracker/?group_id=23169).\n"
+"\n"
+"Before e-mailing the TiEmu team, make sure you have read the manual and/or "
+"the FAQ...."
+msgstr ""
+
+#: src/gui/calc/popup.c:797
+msgid "Unable to run ShellExecute extension."
+msgstr "Impossible d'exécuter l'extension ShellExecute."
+
+#: src/gui/calc/popup.c:847
+msgid "Spawn error: do you have Firefox installed?"
+msgstr "Erreur de lancement: un navigateur est-il installé ?"
+
+# ##, c-format
+# #, c-format
+#: src/gui/calc/skinops.c:449
+#, c-format
+msgid "loading skin: %s (%d x %d)"
+msgstr "chargement du skin: %s(%d x %d)"
+
+#: src/gui/debugger/dbg_bkpts.c:63
+msgid "Symbol"
+msgstr "Symbole"
+
+#: src/gui/debugger/dbg_bkpts.c:63 src/gui/romversion.c:88
+#: glade/dbg_data-2.str:22
+msgid "Type"
+msgstr "Type"
+
+#: src/gui/debugger/dbg_bkpts.c:63
+msgid "Status"
+msgstr "Statut"
+
+#: src/gui/debugger/dbg_bkpts.c:63 glade/log_link-2.str:9
+msgid "Start"
+msgstr "Début"
+
+#: src/gui/debugger/dbg_bkpts.c:63
+msgid "End"
+msgstr "Fin"
+
+#: src/gui/debugger/dbg_bkpts.c:63 glade/dbg_data-2.str:11
+msgid "Mode"
+msgstr "Mode"
+
+#: src/gui/debugger/dbg_bkpts.c:140 src/gui/debugger/dbg_bkpts.c:167
+#: src/gui/debugger/dbg_bkpts.c:195 src/gui/debugger/dbg_bkpts.c:224
+#: src/gui/debugger/dbg_bkpts.c:251 src/gui/debugger/dbg_bkpts.c:335
+msgid "enabled"
+msgstr "activé"
+
+#: src/gui/debugger/dbg_bkpts.c:140 src/gui/debugger/dbg_bkpts.c:167
+#: src/gui/debugger/dbg_bkpts.c:195 src/gui/debugger/dbg_bkpts.c:224
+#: src/gui/debugger/dbg_bkpts.c:251 src/gui/debugger/dbg_bkpts.c:335
+msgid "disabled"
+msgstr "désactivé"
+
+#: src/gui/debugger/dbg_bkpts.c:143 src/gui/debugger/dbg_bkpts.c:338
+msgid "one-shot"
+msgstr "un coup"
+
+#: src/gui/debugger/dbg_bkpts.c:426
+msgid "dbg_bkpts-2.glade: GUI loading failed !\n"
+msgstr "dbg_bkpts-2.glade: échec du chargement de l'interface graphique !\n"
+
+#: src/gui/debugger/dbg_code.c:75 src/gui/debugger/dbg_heap.c:55
+#: src/gui/debugger/dbg_iop.c:299 src/gui/debugger/dbg_mem.c:185
+#: src/gui/debugger/dbg_pclog.c:54 src/gui/debugger/dbg_stack.c:58
+msgid "Address"
+msgstr "Adresse"
+
+#: src/gui/debugger/dbg_code.c:75
+msgid "Opcode"
+msgstr "Code opératoire"
+
+#: src/gui/debugger/dbg_code.c:75
+msgid "Operand"
+msgstr "Opérande"
+
+#: src/gui/debugger/dbg_code.c:1244
+msgid "Choose font..."
+msgstr "Choisir police..."
+
+#: src/gui/debugger/dbg_entry.c:91 src/gui/debugger/dbg_iop.c:264
+#: src/gui/debugger/dbg_vectors.c:53
+msgid "Name"
+msgstr "Nom"
+
+#: src/gui/debugger/dbg_heap.c:55
+msgid "Id"
+msgstr "Id"
+
+#: src/gui/debugger/dbg_heap.c:55 src/gui/romversion.c:88
+msgid "Size"
+msgstr "Taille"
+
+#: src/gui/debugger/dbg_iop.c:272 src/gui/debugger/dbg_stack.c:58
+msgid "Value"
+msgstr "Valeur"
+
+#: src/gui/debugger/dbg_iop.c:308
+msgid "Mask"
+msgstr "Masque"
+
+#: src/gui/debugger/dbg_vectors.c:53
+msgid "Number"
+msgstr "Numéro"
+
+# #, c-format
+#: src/gui/about.c:97
+#, c-format
+msgid "Framework version (cables=%s, files=%s, calcs=%s, conv=%s)"
+msgstr "Framework version (cables=%s, files=%s, calcs=%s, conv=%s)"
+
+#: src/gui/device.c:59 src/gui/wizard.c:95 src/gui/wizard.c:180
+#: src/gui/wizard.c:219
+msgid "comm.c: GUI loading failed !\n"
+msgstr "comm.c : échec du chargement de l'interface graphique !\n"
+
+#: src/gui/filesel.c:389
+msgid "Save file"
+msgstr "Sauver un fichier"
+
+#: src/gui/filesel.c:392 src/gui/filesel.c:701 glade/quicksend-2.str:9
+msgid "Open file"
+msgstr "Ouvrir un fichier"
+
+#: src/gui/fs_misc.c:83
+msgid ""
+"The state image you are attempting to load does not match the current "
+"running image. Press OK if you want TiEmu to automatically load the "
+"corresponding image or Cancel to abort."
+msgstr ""
+"L'image d'état que vous tentez de charger ne correspond pas à l'image "
+"actuellement en train de tourner. Appuyer sur OK si vous voulez que TiEmu "
+"charge automatiquement l'image correspondante; appuyez sur Annuler sinon."
+
+#: src/gui/fs_misc.c:156
+msgid ""
+"You do not seem to have saved your settings. Configuration file saved (in "
+"tiemu.ini)."
+msgstr ""
+"Il semble que vous n'avez pas sauvegardé votre configuration. Configuration "
+"sauvée (dans tiemu.ini)."
+
+#: src/gui/fs_misc.c:159
+msgid ""
+"You do not seem to have saved your settings. Configuration file saved (in ~/."
+"tiemu)."
+msgstr ""
+"Il semble que vous n'avez pas sauvé votre configuration. Sauvé (dans ~/."
+"tiemu)."
+
+#: src/gui/fs_misc.c:173
+msgid "Sending app(s)"
+msgstr "Envoi d'application(s)"
+
+#: src/gui/fs_misc.c:177 src/gui/fs_misc.c:185
+msgid "Sending var(s)"
+msgstr "Envoi de(s) variable(s)"
+
+#: src/gui/fs_misc.c:181 src/gui/fs_misc.c:189
+msgid "Restoring"
+msgstr "Restaurer"
+
+#: src/gui/fs_misc.c:212 src/gui/fs_misc.c:391 src/gui/quicksend.c:120
+msgid "This file is not a valid TI file."
+msgstr "Ce fichier n'est pas un fichier TI valide."
+
+#: src/gui/fs_misc.c:236
+#, c-format
+msgid ""
+"The current link cable <%s> port <%s> does not allow direct file loading. Do "
+"you let me change link port settings to allow direct file loading?"
+msgstr ""
+"Le cable <%s> port <%s> actuel ne permet pas le chargement direct de "
+"fichier. Voulez-vous laisser TiEmu le changer pour vous ?"
+
+#: src/gui/fs_misc.c:421
+msgid "Does not seem to be an upgrade."
+msgstr "Le fichier ne semble pas etre une mise à jour."
+
+#: src/gui/fs_misc.c:437
+msgid "Cannot load the upgrade."
+msgstr "Impossible de charger la mise à jour."
+
+#: src/gui/fs_misc.c:473 src/gui/fs_misc.c:483
+msgid "HW type"
+msgstr "HW type"
+
+#: src/gui/fs_misc.c:474
+msgid "The FLASH upgrade can be imported as HW1 or HW2. Please choose..."
+msgstr "La MAJ peut être importé comme HW1 ou HW2. Veuillez choisir..."
+
+#: src/gui/fs_misc.c:484
+msgid "The FLASH upgrade can be imported as HW3 or HW4. Please choose..."
+msgstr "La MAJ peut être importé comme HW3 ou HW4. Veuillez choisir..."
+
+#: src/gui/fs_misc.c:502
+msgid "This is not a valid file"
+msgstr "Ce fichier n'est pas un fichier valide."
+
+#: src/gui/main.c:153
+msgid "Unable to initialize audio, sound will not play\n"
+msgstr ""
+"Impossible d'initialiser le périphérique audio, aucun son ne sera joué.\n"
+
+#: src/gui/main.c:187
+msgid "Initializing GTK+..."
+msgstr "Initialisation de GTK+..."
+
+#: src/gui/main.c:191
+msgid "Initializing KDE..."
+msgstr "Initialisation de KDE..."
+
+#: src/gui/main.c:192 glade/device-2.str:15 glade/popup-2.str:78
+msgid "TiEmu"
+msgstr "TiEmu"
+
+#: src/gui/main.c:192
+msgid "TI calculator emulator"
+msgstr "Emulateur de calculatrice TI"
+
+#: src/gui/main.c:198
+msgid "Initializing D-Bus..."
+msgstr "Initialisation de D-Bus..."
+
+#: src/gui/main.c:204
+msgid "Initializing OLE..."
+msgstr "Initialisation de l'OLE..."
+
+#: src/gui/main.c:212
+msgid "Initializing TiLP framework..."
+msgstr "Initialisation du sous-système TiLP..."
+
+# #, c-format
+#: src/gui/main.c:216
+#, c-format
+msgid "libticonv library version <%s> mini required (<%s> found)."
+msgstr ""
+"La version %s au minimum de libticonv est nécessaire (trouvé version %s)."
+
+#: src/gui/main.c:218
+msgid "libticonv: version mismatches."
+msgstr "libticalcss: la version ne correspond pas."
+
+# #, c-format
+#: src/gui/main.c:224
+#, c-format
+msgid "libtifiles library version <%s> mini required (<%s> found)."
+msgstr ""
+"La version %s au minimum de libtifiles est nécessaire (trouvé version %s)."
+
+#: src/gui/main.c:226
+msgid "libtifiles: version mismatches."
+msgstr "libtifiles: la version ne correspond pas."
+
+# #, c-format
+#: src/gui/main.c:232
+#, c-format
+msgid "libticables library version <%s> mini required (<%s> found)."
+msgstr ""
+"La version %s au minimum de libticables est nécessaire (trouvé version %s)."
+
+#: src/gui/main.c:234
+msgid "libticables: version mismatches."
+msgstr "libticables: la version ne correspond pas."
+
+# #, c-format
+#: src/gui/main.c:240
+#, c-format
+msgid "libticalcs library version <%s> mini required (<%s> found)."
+msgstr ""
+"La version %s au minimum de libticalcs est nécessaire (trouvé version %s)."
+
+#: src/gui/main.c:242
+msgid "libticalcs: version mismatches."
+msgstr "libticalcss: la version ne correspond pas."
+
+#: src/gui/main.c:249
+msgid "Searching for ROM dumps..."
+msgstr "Recherche de ROM..."
+
+#: src/gui/main.c:291
+msgid "Loading image..."
+msgstr "Chargement d'une image..."
+
+#: src/gui/main.c:299
+msgid "Initializing m68k emulation engine..."
+msgstr "Initialisation du moteur d'émulation m68k..."
+
+#: src/gui/main.c:331
+msgid "Loading previously saved state..."
+msgstr "Chargment d'un état précédemment sauvegardé..."
+
+#: src/gui/main.c:342
+msgid "Pre-loading debugger..."
+msgstr "Préchargement du debugger..."
+
+#: src/gui/romversion.c:87
+msgid "Filename"
+msgstr "Nom de fichier"
+
+#: src/gui/romversion.c:87
+msgid "Model"
+msgstr "Modèle"
+
+#: src/gui/romversion.c:87
+msgid "Version"
+msgstr "Version"
+
+#: src/gui/romversion.c:88
+msgid "Boot"
+msgstr "Boot"
+
+#: src/gui/romversion.c:88
+msgid "Hardware"
+msgstr "Matériel"
+
+# ##, c-format
+# #, c-format
+#: src/gui/support.c:91 src/gui/support.c:115
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Impossible de trouver le fichier pixmap : %s"
+
+#: src/gui/wizard.c:110
+msgid "Use PedRom"
+msgstr "Utiliser PedRom"
+
+#: src/gui/wizard.c:112
+msgid "Use FLASH OS"
+msgstr "Utiliser un OS FLASH"
+
+#: src/gui/wizard.c:114
+msgid "Use ROM dump"
+msgstr "Utiliser l'extracteur de ROM"
+
+#: src/gui/wizard.c:131
+msgid "Importing TIBs. Please wait..."
+msgstr "Importation des TIB. Veuillez patienter..."
+
+# #, c-format
+#: src/sound/audio.c:36
+msgid "Unable to initialize sound"
+msgstr "Impossible d'initialiser le son"
+
+#: src/sound/audio.c:65
+msgid "Sound Error"
+msgstr "Erreur son"
+
+#: src/sound/audio.c:65
+msgid "Not enough memory"
+msgstr "Pas assez de mémoire"
+
+# #, c-format
+#: src/sound/audio.c:75
+msgid "Unable to open audio device"
+msgstr "Impossible d'ouvrir le périphérique audio"
+
+#: src/sound/stream.c:54
+msgid "sound buffer full, dropping sample(s)"
+msgstr "tampon plein, purge d'échantillon(s)"
+
+#: glade/calc-2.str:7
+msgid "TiEmu 3"
+msgstr "TiEmu 3"
+
+#: glade/calc-2.str:8
+msgid "Use mouse or press a key."
+msgstr "Utiliser la souris ou presser une touche."
+
+#: glade/dbg_bkpts-2.str:7
+msgid "Breakpoints"
+msgstr "Points d'arrêt"
+
+#: glade/dbg_bkpts-2.str:8
+msgid "Add breakpoint"
+msgstr "Ajouter un point d'arrêt"
+
+#: glade/dbg_bkpts-2.str:9
+msgid "Remove breakpoint(s)"
+msgstr "Enlever un point d'arrêt"
+
+#: glade/dbg_bkpts-2.str:10
+msgid "Disable breakpoint"
+msgstr "Désactiver un point d'arrêt"
+
+#: glade/dbg_bkpts-2.str:11
+msgid "Enable breakpoint"
+msgstr "Activer un point d'arrêt"
+
+#: glade/dbg_bkpts-2.str:12
+msgid "Go to breakpoint location"
+msgstr "Aller à l'emplacement du point d'arrêt"
+
+#: glade/dbg_bkpts-2.str:13
+msgid "Double-click a row to edit breakpoint values."
+msgstr "Double-cliquer une ligne pour éditer un point d'arrêt."
+
+#: glade/dbg_bkpts-2.str:14
+msgid "Breakpoint context:"
+msgstr "Contexte du point d'arrêt:"
+
+#: glade/dbg_bkpts-2.str:15
+msgid "Bits"
+msgstr "Bits"
+
+#: glade/dbg_bkpts-2.str:16
+msgid "Data"
+msgstr "Données"
+
+#: glade/dbg_bkpts-2.str:17
+msgid "Vectors"
+msgstr "Vecteurs"
+
+#: glade/dbg_bkpts-2.str:18
+msgid "Prgm entry"
+msgstr "Entrée programme"
+
+#: glade/dbg_bits-2.str:7
+msgid "Add Bit Breakpoint"
+msgstr "Ajouter un point d'arrêt sur bit"
+
+#: glade/dbg_bits-2.str:8 glade/dbg_cause-2.str:8
+msgid "Address:"
+msgstr "Adresse:"
+
+#: glade/dbg_bits-2.str:9 glade/dbg_cause-2.str:10 glade/dbg_data-2.str:16
+#: glade/dbg_data-2.str:17 glade/dbg_data-2.str:18
+msgid "0x000000"
+msgstr "0x000000"
+
+#: glade/dbg_bits-2.str:10
+msgid "Checks:"
+msgstr "Tests:"
+
+#: glade/dbg_bits-2.str:11 glade/dbg_bits-2.str:20
+msgid "7"
+msgstr "7"
+
+#: glade/dbg_bits-2.str:12 glade/dbg_bits-2.str:21
+msgid "6"
+msgstr "6"
+
+#: glade/dbg_bits-2.str:13 glade/dbg_bits-2.str:22
+msgid "5"
+msgstr "5"
+
+#: glade/dbg_bits-2.str:14 glade/dbg_bits-2.str:23
+msgid "4"
+msgstr "4"
+
+#: glade/dbg_bits-2.str:15 glade/dbg_bits-2.str:24
+msgid "3"
+msgstr "3"
+
+#: glade/dbg_bits-2.str:16 glade/dbg_bits-2.str:25
+msgid "2"
+msgstr "2"
+
+#: glade/dbg_bits-2.str:17 glade/dbg_bits-2.str:26
+msgid "1"
+msgstr "1"
+
+#: glade/dbg_bits-2.str:18 glade/dbg_bits-2.str:27 glade/dbg_code-2.str:48
+#: glade/dbg_regs-2.str:13 glade/dbg_regs-2.str:15 glade/dbg_regs-2.str:16
+#: glade/dbg_regs-2.str:19 glade/dbg_regs-2.str:20 glade/dbg_regs-2.str:21
+msgid "0"
+msgstr "0"
+
+#: glade/dbg_bits-2.str:19
+msgid "States:"
+msgstr "États:"
+
+#: glade/dbg_cause-2.str:7
+msgid "Breakpoint!"
+msgstr "Point d'arrêt!"
+
+#: glade/dbg_cause-2.str:9 glade/dbg_cause-2.str:20
+msgid "Type:"
+msgstr "Type:"
+
+#: glade/dbg_cause-2.str:12
+msgid "byte read"
+msgstr "octet lu"
+
+#: glade/dbg_cause-2.str:13
+msgid "Mode:"
+msgstr "Mode:"
+
+#: glade/dbg_cause-2.str:14
+msgid "A breakpoint has been encountered..."
+msgstr "Un point d'arrêt a été rencontré..."
+
+#: glade/dbg_cause-2.str:15
+msgid "Target:"
+msgstr "Cible:"
+
+#: glade/dbg_cause-2.str:16
+msgid "0x4c00"
+msgstr "0x4c00"
+
+#: glade/dbg_cause-2.str:17 glade/dbg_cause-2.str:27
+msgid "Id:"
+msgstr "Id:"
+
+#: glade/dbg_cause-2.str:18 glade/dbg_cause-2.str:28
+msgid "#0"
+msgstr "#0"
+
+#: glade/dbg_cause-2.str:19
+msgid "Exception!"
+msgstr "Exception !"
+
+#: glade/dbg_cause-2.str:21
+msgid "PC (pushed):"
+msgstr "PC (mis en pile):"
+
+#: glade/dbg_cause-2.str:22
+msgid "illegal instr"
+msgstr "instruction illégale"
+
+#: glade/dbg_cause-2.str:23 glade/dbg_mem-2.str:15
+msgid "000000"
+msgstr "000000"
+
+#: glade/dbg_cause-2.str:24
+msgid "0000"
+msgstr "0000"
+
+#: glade/dbg_cause-2.str:25
+msgid "SR (pushed):"
+msgstr "SR (mis en pile)"
+
+#: glade/dbg_cause-2.str:26
+msgid "An exception has been encountered..."
+msgstr "Une exception a été rencontrée..."
+
+#: glade/dbg_code-2.str:7
+msgid "Disassembly"
+msgstr "Désassemblage"
+
+#: glade/dbg_code-2.str:8
+msgid "_Debug"
+msgstr "_Débogage"
+
+#: glade/dbg_code-2.str:9
+msgid "_Run"
+msgstr "Exécuter"
+
+#: glade/dbg_code-2.str:10
+msgid "Step into (single step)"
+msgstr "Un pas dedans (un seul)"
+
+#: glade/dbg_code-2.str:11
+msgid "Step _in"
+msgstr "Un pas de_dans"
+
+#: glade/dbg_code-2.str:12
+msgid "Step over (skip subroutine)"
+msgstr "Un pas par dessus (saute la sous-routine)"
+
+#: glade/dbg_code-2.str:13
+msgid "Step _over"
+msgstr "Un pas _dessus"
+
+#: glade/dbg_code-2.str:14
+msgid "Step out (return to caller)"
+msgstr "Un pas dehors (retourne à l'appelant)"
+
+#: glade/dbg_code-2.str:15
+msgid "Step ou_t"
+msgstr "Un pas de_hors"
+
+#: glade/dbg_code-2.str:16
+msgid "Run to _cursor"
+msgstr "Jusqu'au curseur"
+
+#: glade/dbg_code-2.str:17
+msgid "_Break"
+msgstr "Stop"
+
+#: glade/dbg_code-2.str:18
+msgid "_Log"
+msgstr "_Journal"
+
+#: glade/dbg_code-2.str:19
+msgid "_Linkport"
+msgstr "Câble"
+
+#: glade/dbg_code-2.str:20
+msgid "Windows"
+msgstr "Fenêtres"
+
+#: glade/dbg_code-2.str:21
+msgid "_Registers"
+msgstr "Registres"
+
+#: glade/dbg_code-2.str:22
+msgid "_Breakpoints"
+msgstr "Point d'arrêt"
+
+#: glade/dbg_code-2.str:23
+msgid "_Memory"
+msgstr "Mémoire"
+
+#: glade/dbg_code-2.str:24
+msgid "_PC trace"
+msgstr "Trace PC"
+
+#: glade/dbg_code-2.str:25
+msgid "_Stack frame"
+msgstr "Pile"
+
+#: glade/dbg_code-2.str:26
+msgid "_Heap (handles)"
+msgstr "Tas"
+
+#: glade/dbg_code-2.str:27
+msgid "_I/O ports"
+msgstr "Ports d'E/S"
+
+#: glade/dbg_code-2.str:28
+msgid "Dock Mode"
+msgstr "Mode dock"
+
+#: glade/dbg_code-2.str:29
+msgid "_Group windows"
+msgstr "_Groupe les fenêtres"
+
+#: glade/dbg_code-2.str:30
+msgid "_Show all"
+msgstr "Tout _montrer"
+
+#: glade/dbg_code-2.str:31
+msgid "_Hide all"
+msgstr "Tout _cacher"
+
+#: glade/dbg_code-2.str:32
+msgid "M_inimize all"
+msgstr "Tout minimiser"
+
+#: glade/dbg_code-2.str:33
+msgid "M_aximize all"
+msgstr "Tout maximiser"
+
+#: glade/dbg_code-2.str:34
+msgid "_Restore all"
+msgstr "Tout restaurer"
+
+#: glade/dbg_code-2.str:35
+msgid "_Quit"
+msgstr "Quitter"
+
+#: glade/dbg_code-2.str:36
+msgid "_Font"
+msgstr "_Police"
+
+#: glade/dbg_code-2.str:37
+msgid "_State"
+msgstr "État_s:"
+
+#: glade/dbg_code-2.str:38
+msgid "S_ave"
+msgstr "Enregistrer"
+
+#: glade/dbg_code-2.str:39
+msgid "_Revert"
+msgstr "_Revenir"
+
+#: glade/dbg_code-2.str:40
+msgid "Run (F5)"
+msgstr "Démarrer (F5)"
+
+#: glade/dbg_code-2.str:41
+msgid "Single step / Step into (F7)"
+msgstr "Un seul pas / dedans (F7)"
+
+#: glade/dbg_code-2.str:42
+msgid "Step over (F8)"
+msgstr "Un pas dessus (F8)"
+
+#: glade/dbg_code-2.str:43
+msgid "Step out (F9)"
+msgstr "Un pas dehors (F9)"
+
+#: glade/dbg_code-2.str:44
+msgid "Run to cursor (F4)"
+msgstr "Exécute jusqu'au curseur (F4)"
+
+#: glade/dbg_code-2.str:45
+msgid "Break (F11)"
+msgstr "Stop (F11)"
+
+#: glade/dbg_code-2.str:46
+msgid "Toggle breakpoint (F2)"
+msgstr "Bascule le point d'arrêt (F2)"
+
+#: glade/dbg_code-2.str:47
+msgid "Cycle count:"
+msgstr "Compteur de cycles:"
+
+#: glade/dbg_code-2.str:49
+msgid "00"
+msgstr "00"
+
+#: glade/dbg_code-2.str:50
+msgid "Reset"
+msgstr "Réinitialiser"
+
+#: glade/dbg_code-2.str:51
+msgid "Symbol:"
+msgstr "Symbole:"
+
+#: glade/dbg_code-2.str:52
+msgid "by name"
+msgstr "par nom"
+
+#: glade/dbg_code-2.str:53
+msgid "by addr"
+msgstr "par adresse"
+
+#: glade/dbg_code-2.str:54
+msgid "by id"
+msgstr "par valeur"
+
+#: glade/dbg_code-2.str:55 glade/dbg_mem-2.str:19
+msgid "Go to _address"
+msgstr "Aller à l'_adresse"
+
+#: glade/dbg_code-2.str:56
+msgid "Go to _PC"
+msgstr "Aller au _PC"
+
+#: glade/dbg_code-2.str:57
+msgid "Set _breakpoint"
+msgstr "Mettre un point d'arrêt"
+
+#: glade/dbg_code-2.str:58
+msgid "Set _one shot bkpt"
+msgstr "Mettre un point d'arrêt temporaire"
+
+#: glade/dbg_code-2.str:59
+msgid "Set PC to _selection"
+msgstr "Initialiser le PC sur la sélection"
+
+#: glade/dbg_code-2.str:60 glade/dbg_heap-2.str:9 glade/dbg_mem-2.str:22
+#: glade/dbg_regs-2.str:10 glade/dbg_stack-2.str:12
+msgid "View _memory"
+msgstr "Visualiser la _mémoire"
+
+#: glade/dbg_code-2.str:61
+msgid "Change font"
+msgstr "Changer police"
+
+#: glade/dbg_code-2.str:62 glade/device-2.str:18
+msgid "custom"
+msgstr "personnalisé"
+
+#: glade/dbg_code-2.str:63
+msgid "default"
+msgstr "défaut"
+
+#: glade/dbg_code-2.str:64
+msgid "Font:"
+msgstr "Police:"
+
+#: glade/dbg_data-2.str:7
+msgid "Add Data Breakpoint"
+msgstr "Ajouter un point d'arrêt de donnée"
+
+#: glade/dbg_data-2.str:8
+msgid "_Read"
+msgstr "Lu"
+
+#: glade/dbg_data-2.str:9
+msgid "_Write"
+msgstr "Ecrit"
+
+#: glade/dbg_data-2.str:10
+msgid "_Either"
+msgstr "Peu importe"
+
+#: glade/dbg_data-2.str:12
+msgid "_Single"
+msgstr "Simple"
+
+#: glade/dbg_data-2.str:13
+msgid "_Range"
+msgstr "Intervalle"
+
+#: glade/dbg_data-2.str:14
+msgid "to"
+msgstr "à"
+
+#: glade/dbg_data-2.str:15
+msgid "at"
+msgstr "à"
+
+#: glade/dbg_data-2.str:19
+msgid "Byte"
+msgstr "Octet"
+
+#: glade/dbg_data-2.str:20
+msgid "Word"
+msgstr "Mot"
+
+#: glade/dbg_data-2.str:21
+msgid "Long"
+msgstr "Long"
+
+#: glade/dbg_entry-2.str:2
+msgid "Set program entry breakpoint"
+msgstr "Mettre un point d'arrêt sur programme"
+
+#: glade/dbg_heap-2.str:7
+msgid "Heap"
+msgstr "Tas"
+
+#: glade/dbg_heap-2.str:8
+msgid ""
+"Double click rowl to open tab in the memory window at the handle address."
+msgstr ""
+"Double-cliquer une linge pour ouvrir un onglet à l'adresse pointée par le "
+"descripteur dans la fenêtre de visualisation de la mémoire."
+
+#: glade/dbg_ioports-2.str:7 glade/dbg_regs-2.str:7 glade/dbg_regs-2.str:28
+msgid "Show registers"
+msgstr "Affiche les registres"
+
+#: glade/dbg_ioports-2.str:8
+msgid "I/O ports"
+msgstr "Ports d'E/S"
+
+#: glade/dbg_ioports-2.str:9 glade/dbg_regs-2.str:9
+msgid "Double-click value or item to edit."
+msgstr "Double-cliquer une ligne pour mettre à jour la configuration."
+
+#: glade/dbg_ioports-2.str:10
+msgid "_Hex"
+msgstr "_Hex"
+
+#: glade/dbg_ioports-2.str:11
+msgid "_Dec"
+msgstr "_Déc"
+
+#: glade/dbg_mem-2.str:7
+msgid "Memory"
+msgstr "Mémoire"
+
+#: glade/dbg_mem-2.str:8
+msgid "Add tab (F1)"
+msgstr "Ajouter un onglet (F1)"
+
+#: glade/dbg_mem-2.str:9
+msgid "Remove tab (F2)"
+msgstr "Supprimer un onglet (F2)"
+
+#: glade/dbg_mem-2.str:10
+msgid "Up (F3)"
+msgstr "Haut (F3)"
+
+#: glade/dbg_mem-2.str:11
+msgid "Down (F4)"
+msgstr "Bas (F4)"
+
+#: glade/dbg_mem-2.str:12
+msgid "Refresh tab (F5)"
+msgstr "Rafraîchir (F5)"
+
+#: glade/dbg_mem-2.str:13
+msgid "View memory map (F6)"
+msgstr "Visualiser cartographie mémoire (F6)"
+
+#: glade/dbg_mem-2.str:14
+msgid "Enter Address"
+msgstr "Entrer l'adresse"
+
+#: glade/dbg_mem-2.str:16
+msgid "HEX address"
+msgstr "Adresse hexadécimale"
+
+#: glade/dbg_mem-2.str:17
+msgid "Find"
+msgstr "Chercher"
+
+#: glade/dbg_mem-2.str:18
+msgid "Find _next"
+msgstr "Cherche le _suivant"
+
+#: glade/dbg_mem-2.str:20
+msgid "_Dis-assemble"
+msgstr "Désassembler"
+
+#: glade/dbg_mem-2.str:21
+msgid "Dis-assemble (indirect)"
+msgstr "Désassembler (indirect)"
+
+#: glade/dbg_mem-2.str:23
+msgid "Search"
+msgstr "Chercher"
+
+#: glade/dbg_mem-2.str:24
+msgid "Find _Next"
+msgstr "Chercher le _suivant"
+
+#: glade/dbg_mem-2.str:25
+msgid "Find:"
+msgstr "Recherche:"
+
+#: glade/dbg_mem-2.str:26
+msgid ""
+"Hexadecimal strings must have 2 chars per byte and can be with or without "
+"space: FE ED or FEED."
+msgstr "FE EF or FEED"
+
+#: glade/dbg_mem-2.str:27
+msgid "_ASCII"
+msgstr "_ASCII"
+
+#: glade/dbg_mem-2.str:28
+msgid "_Case sensitive"
+msgstr "Respect majuscules"
+
+#: glade/dbg_pclog-2.str:7
+msgid "PC trace"
+msgstr "Trace PC"
+
+#: glade/dbg_pclog-2.str:8
+msgid "Double-click the row to disassemble."
+msgstr "Double-cliquer une ligne pour mettre à jour la configuration."
+
+#: glade/dbg_regs-2.str:8 glade/dbg_regs-2.str:29
+msgid "Registers"
+msgstr "Registres"
+
+#: glade/dbg_regs-2.str:11
+msgid "Status Register"
+msgstr "Registre d'état"
+
+#: glade/dbg_regs-2.str:12 glade/dbg_regs-2.str:72
+msgid "T"
+msgstr "T"
+
+#: glade/dbg_regs-2.str:14 glade/dbg_regs-2.str:73
+msgid "S"
+msgstr "S"
+
+#: glade/dbg_regs-2.str:17
+msgid "I2"
+msgstr "I2"
+
+#: glade/dbg_regs-2.str:18
+msgid "I1"
+msgstr "I1"
+
+#: glade/dbg_regs-2.str:22 glade/dbg_regs-2.str:74
+msgid "X"
+msgstr "X"
+
+#: glade/dbg_regs-2.str:23 glade/dbg_regs-2.str:68
+msgid "N"
+msgstr "N"
+
+#: glade/dbg_regs-2.str:24 glade/dbg_regs-2.str:69
+msgid "Z"
+msgstr "Z"
+
+#: glade/dbg_regs-2.str:25 glade/dbg_regs-2.str:70
+msgid "V"
+msgstr "V"
+
+#: glade/dbg_regs-2.str:26 glade/dbg_regs-2.str:71
+msgid "C"
+msgstr "C"
+
+#: glade/dbg_regs-2.str:27
+msgid "I0"
+msgstr "I0"
+
+#: glade/dbg_regs-2.str:30
+msgid "D1="
+msgstr "D1="
+
+#: glade/dbg_regs-2.str:31
+msgid "D2="
+msgstr "D2="
+
+#: glade/dbg_regs-2.str:32
+msgid "D3="
+msgstr "D3="
+
+#: glade/dbg_regs-2.str:33
+msgid "D4="
+msgstr "D4="
+
+#: glade/dbg_regs-2.str:34
+msgid "D5="
+msgstr "D5="
+
+#: glade/dbg_regs-2.str:35
+msgid "D6="
+msgstr "D6="
+
+#: glade/dbg_regs-2.str:36
+msgid "D7="
+msgstr "D7="
+
+#: glade/dbg_regs-2.str:37
+msgid "A0="
+msgstr "A0="
+
+#: glade/dbg_regs-2.str:38
+msgid "A1="
+msgstr "A1="
+
+#: glade/dbg_regs-2.str:39
+msgid "A2="
+msgstr "A2="
+
+#: glade/dbg_regs-2.str:40
+msgid "A3="
+msgstr "A3="
+
+#: glade/dbg_regs-2.str:41
+msgid "A4="
+msgstr "A4="
+
+#: glade/dbg_regs-2.str:42
+msgid "A5="
+msgstr "A5="
+
+#: glade/dbg_regs-2.str:43
+msgid "A6="
+msgstr "A6="
+
+#: glade/dbg_regs-2.str:44
+msgid "A7="
+msgstr "A7="
+
+#: glade/dbg_regs-2.str:45 glade/dbg_regs-2.str:46 glade/dbg_regs-2.str:47
+#: glade/dbg_regs-2.str:48 glade/dbg_regs-2.str:49 glade/dbg_regs-2.str:50
+#: glade/dbg_regs-2.str:51 glade/dbg_regs-2.str:52 glade/dbg_regs-2.str:53
+#: glade/dbg_regs-2.str:54 glade/dbg_regs-2.str:55 glade/dbg_regs-2.str:56
+#: glade/dbg_regs-2.str:57 glade/dbg_regs-2.str:58 glade/dbg_regs-2.str:59
+#: glade/dbg_regs-2.str:76
+msgid "12345678"
+msgstr "12345678"
+
+#: glade/dbg_regs-2.str:60
+msgid "USP="
+msgstr "USP="
+
+#: glade/dbg_regs-2.str:61
+msgid "SSP="
+msgstr "SSP="
+
+#: glade/dbg_regs-2.str:62
+msgid "PC="
+msgstr "PC="
+
+#: glade/dbg_regs-2.str:63
+msgid "SR="
+msgstr "SR="
+
+#: glade/dbg_regs-2.str:64 glade/dbg_regs-2.str:65 glade/dbg_regs-2.str:66
+msgid "123456"
+msgstr "123456"
+
+#: glade/dbg_regs-2.str:67
+msgid "1234"
+msgstr "1234"
+
+#: glade/dbg_regs-2.str:75
+msgid "I="
+msgstr "I="
+
+#: glade/dbg_regs-2.str:77
+msgid "D0="
+msgstr "D0="
+
+#: glade/dbg_stack-2.str:7
+msgid "Stack"
+msgstr "Pile"
+
+#: glade/dbg_stack-2.str:8
+msgid "A7 (stack) is:"
+msgstr "A7 (pile) est:"
+
+#: glade/dbg_stack-2.str:9
+msgid "USP"
+msgstr "USP"
+
+#: glade/dbg_stack-2.str:10
+msgid "A7 (stack)"
+msgstr "A7 (pile)"
+
+#: glade/dbg_stack-2.str:11
+msgid "A6 (frame)"
+msgstr "A6 (tas)"
+
+#: glade/dbg_vectors-2.str:7
+msgid "Add Vector Breakpoint"
+msgstr "Ajouter un point d'arrêt"
+
+#: glade/dboxes-2.str:7
+msgid "Title"
+msgstr "Titre"
+
+#: glade/dboxes-2.str:8
+msgid "*"
+msgstr "*"
+
+#: glade/dboxes-2.str:9
+msgid "Name:"
+msgstr "Nom:"
+
+#: glade/device-2.str:3
+msgid "Communication Settings"
+msgstr "Paramètres de connexion"
+
+#: glade/device-2.str:4
+msgid "_Auto-detect"
+msgstr "_Autodétection"
+
+#: glade/device-2.str:5
+msgid "Cable:"
+msgstr "Câble:"
+
+#: glade/device-2.str:6
+msgid "Port:"
+msgstr "Port:"
+
+#: glade/device-2.str:7
+msgid "Calc:"
+msgstr "Calc:"
+
+#: glade/device-2.str:8
+msgid "Timeout:"
+msgstr "Timeout:"
+
+#: glade/device-2.str:9
+msgid "Delay:"
+msgstr "Délai:"
+
+#: glade/device-2.str:10
+msgid "GrayLink"
+msgstr "GrayLink (gris)"
+
+#: glade/device-2.str:11
+msgid "BlackLink"
+msgstr "BlackLink (noir)"
+
+#: glade/device-2.str:12
+msgid "SilverLink"
+msgstr "SilverLink (argent)"
+
+#: glade/device-2.str:13
+msgid "ParallelLink"
+msgstr "Câble parallèle"
+
+#: glade/device-2.str:14
+msgid "VTi"
+msgstr "VTi"
+
+#: glade/device-2.str:16
+msgid "virtual"
+msgstr "virtuel"
+
+#: glade/device-2.str:17 glade/device-2.str:23
+msgid "null"
+msgstr "aucun"
+
+#: glade/device-2.str:19
+msgid "#1"
+msgstr "n°1"
+
+#: glade/device-2.str:20
+msgid "#2"
+msgstr "n°2"
+
+#: glade/device-2.str:21
+msgid "#3"
+msgstr "n°3"
+
+#: glade/device-2.str:22
+msgid "#4"
+msgstr "n°4"
+
+#: glade/device-2.str:24
+msgid "TI73"
+msgstr "TI73"
+
+#: glade/device-2.str:25
+msgid "TI82"
+msgstr "TI82"
+
+#: glade/device-2.str:26
+msgid "TI83"
+msgstr "TI83"
+
+#: glade/device-2.str:27
+msgid "TI83+"
+msgstr "TI83+"
+
+#: glade/device-2.str:28
+msgid "TI84+"
+msgstr "TI84+"
+
+#: glade/device-2.str:29
+msgid "TI85"
+msgstr "TI85"
+
+#: glade/device-2.str:30
+msgid "TI86"
+msgstr "TI86"
+
+#: glade/device-2.str:31
+msgid "TI89"
+msgstr "TI89"
+
+#: glade/device-2.str:32
+msgid "TI89 Titanium"
+msgstr "Titanium"
+
+#: glade/device-2.str:33 glade/infos-2.str:18
+msgid "TI92"
+msgstr "TI92"
+
+#: glade/device-2.str:34
+msgid "TI92+"
+msgstr "TI92+"
+
+#: glade/device-2.str:35
+msgid "V200PLT"
+msgstr "V200PLT"
+
+#: glade/device-2.str:36
+msgid "Settings"
+msgstr "Configuration"
+
+#: glade/device-2.str:37
+msgid "Have a problem ? Check out the log:"
+msgstr "Un problème est apparu ? Vérifiez le fichier journal: "
+
+#: glade/infos-2.str:7
+msgid "Infos..."
+msgstr "_Informations..."
+
+#: glade/infos-2.str:8
+msgid "Skin version:"
+msgstr "Version:"
+
+#: glade/infos-2.str:9
+msgid "Skin name:"
+msgstr "Nom:"
+
+#: glade/infos-2.str:10
+msgid "Skin author:"
+msgstr "Auteur:"
+
+#: glade/infos-2.str:11
+msgid "Version:"
+msgstr "Version:"
+
+#: glade/infos-2.str:12
+msgid "RAM size:"
+msgstr "Taille RAM:"
+
+#: glade/infos-2.str:13
+msgid "ROM size:"
+msgstr "Taille ROM:"
+
+#: glade/infos-2.str:14
+msgid "ROM type:"
+msgstr "Type ROM:"
+
+#: glade/infos-2.str:15
+msgid "VTi/TiEmu"
+msgstr "VTi/TiEmu"
+
+#: glade/infos-2.str:16
+msgid "Default TI-92"
+msgstr "Par défaut"
+
+#: glade/infos-2.str:17
+msgid "Julien Blache"
+msgstr "Julien Blache"
+
+#: glade/infos-2.str:19
+msgid "1.11"
+msgstr "1.11"
+
+#: glade/infos-2.str:20
+msgid "128KB"
+msgstr "128KB"
+
+#: glade/infos-2.str:21
+msgid "2MB"
+msgstr "2Mo"
+
+#: glade/infos-2.str:22
+msgid "external ROM"
+msgstr "ROM externe"
+
+#: glade/infos-2.str:23
+msgid "Calc type:"
+msgstr "Modèle:"
+
+# ##, c-format
+# #, c-format
+#: glade/infos-2.str:24
+msgid "Hardware:"
+msgstr "Matériel:"
+
+#: glade/infos-2.str:25
+msgid "HW1"
+msgstr "HW1"
+
+#: glade/log_link-2.str:7
+msgid "Link Log"
+msgstr "Journal du Link"
+
+#: glade/log_link-2.str:8
+msgid "Save"
+msgstr "Enregistrer"
+
+#: glade/log_link-2.str:10
+msgid "Clear"
+msgstr "Effacer"
+
+#: glade/log_link-2.str:11
+msgid "Close"
+msgstr "Fermer"
+
+#: glade/log_link-2.str:12
+msgid "_Send"
+msgstr "_Envoyer"
+
+#: glade/log_link-2.str:13
+msgid "_Receive"
+msgstr "_Recevoir"
+
+#: glade/log_link-2.str:14
+msgid "Buffer size: "
+msgstr "Taille du tampon:"
+
+#: glade/log_link-2.str:15
+msgid "KB"
+msgstr "Ko"
+
+#: glade/pbars-2.str:7
+msgid "Title 1"
+msgstr "Titre 1"
+
+#: glade/pbars-2.str:8
+msgid "Transfer status:"
+msgstr "État du transfert:"
+
+#: glade/pbars-2.str:9
+msgid "Rate: 0.00 Kb/s"
+msgstr "Vitesse: 0.00 Ko/s"
+
+#: glade/pbars-2.str:10
+msgid "Title 2"
+msgstr "Titre 2"
+
+#: glade/pbars-2.str:11
+msgid "Message."
+msgstr "Message."
+
+#: glade/pbars-2.str:12
+msgid "Title 3"
+msgstr "Titre 3"
+
+#: glade/pbars-2.str:13 glade/pbars-2.str:22
+msgid "Total transfer:"
+msgstr "Transfert total:"
+
+#: glade/pbars-2.str:14 glade/pbars-2.str:17 glade/pbars-2.str:23
+msgid "Current transfer:"
+msgstr "Transfert courant:"
+
+#: glade/pbars-2.str:15 glade/pbars-2.str:20 glade/pbars-2.str:26
+msgid "Rate: 0.0 Kbytes/s"
+msgstr "Vitesse: 0.0 Koctets/s"
+
+#: glade/pbars-2.str:16
+msgid "Title 4"
+msgstr "Titre 4"
+
+#: glade/pbars-2.str:18 glade/pbars-2.str:24
+msgid "1/1: "
+msgstr "1/1: "
+
+#: glade/pbars-2.str:19 glade/pbars-2.str:25
+msgid "Text"
+msgstr "Texte"
+
+#: glade/pbars-2.str:21
+msgid "Title 5"
+msgstr "Titre 5"
+
+#: glade/popup-2.str:7
+msgid "Welcome to TiEmu 3"
+msgstr "Bienvenue sur TiEmu"
+
+#: glade/popup-2.str:8
+msgid "TiEmu Menu"
+msgstr "Menu TiEmu"
+
+#: glade/popup-2.str:9
+msgid ""
+"Send the selected file to the emulator. This file can be of any type "
+"(single, group, backup, FLASH app or FLASH OS)."
+msgstr ""
+"Envoi le fichier sélectionné sur l'émulateur. Ce fichier peut être de "
+"n'importe quel type (unique, groupe, sauvegarde, application ou OS)."
+
+#: glade/popup-2.str:10
+msgid "_Send file to TiEmu..."
+msgstr "_Envoyer un fichier..."
+
+#: glade/popup-2.str:11
+msgid "_Debug file with TiEmu..."
+msgstr "_Debugger avec TiEmu..."
+
+#: glade/popup-2.str:12
+msgid "_Link"
+msgstr "_Câble"
+
+#: glade/popup-2.str:13
+msgid "Do the link cable setup."
+msgstr "Configure le câble."
+
+#: glade/popup-2.str:14
+msgid "_Settings..."
+msgstr "Configuration..."
+
+#: glade/popup-2.str:15
+msgid "_Quick-send..."
+msgstr "Envoi rapide..."
+
+#: glade/popup-2.str:16
+msgid ""
+"Listen for files sent from TiEmu. Uncheck it if you are running program "
+"which use the linkport for sound."
+msgstr ""
+"Écoute le(s) fichier(s) envoyé(s) par TiEmu. Décochez si vous faites tourner "
+"un programme qui utilise le port de communication pour le son."
+
+#: glade/popup-2.str:17
+msgid "_Listen for files"
+msgstr "Écoute les fichiers"
+
+#: glade/popup-2.str:18
+msgid "_Emulate sound"
+msgstr "_Emulation du son"
+
+#: glade/popup-2.str:19
+msgid "Configuration"
+msgstr "Configuration"
+
+#: glade/popup-2.str:20
+msgid "Save the actual configuration into a text file."
+msgstr "Sauve la configuration actuelle dans un fichier."
+
+#: glade/popup-2.str:21
+msgid "_Save config..."
+msgstr "Sauver la config..."
+
+#: glade/popup-2.str:22
+msgid "Load the configuration previously saved."
+msgstr "Charge la configuration précédemment enregistrée."
+
+#: glade/popup-2.str:23
+msgid "_Load config..."
+msgstr "Charger la config..."
+
+#: glade/popup-2.str:24
+msgid "Calculator state"
+msgstr "État de la calculatrice"
+
+#: glade/popup-2.str:25
+msgid "Reload the previously saved state."
+msgstr "Recharge un état précédemment enregistré."
+
+#: glade/popup-2.str:26
+msgid "_Revert to saved state"
+msgstr "Revenir à l'état précédent"
+
+#: glade/popup-2.str:27
+msgid "Load the calculator state from file."
+msgstr "Charger l'état de la calculatrice depuis un fichier."
+
+#: glade/popup-2.str:28
+msgid "_Load state image..."
+msgstr "Charger un état..."
+
+#: glade/popup-2.str:29
+msgid "Save the calculator state into a file (called state image)."
+msgstr "Sauver l'état de la calculatrice dans un fichier (image d'état)."
+
+# ##, c-format
+#: glade/popup-2.str:30
+msgid "_Save state image..."
+msgstr "Sauver un état..."
+
+#: glade/popup-2.str:31
+msgid "Do a 'save state image' and exits."
+msgstr "Sauve l'état et quitte."
+
+#: glade/popup-2.str:32
+msgid "_Exit and save state"
+msgstr "Sauver et quitter"
+
+#: glade/popup-2.str:33
+msgid "Go into the debugger."
+msgstr "Aller dans le debugger"
+
+#: glade/popup-2.str:34
+msgid "_Enter debugger..."
+msgstr "Lancer le debugger..."
+
+#: glade/popup-2.str:35
+msgid "Reset the calculator."
+msgstr "Réinitialise la calculatrice."
+
+#: glade/popup-2.str:36
+msgid "_Reset calc"
+msgstr "Réinitialiser la calculatrice"
+
+#: glade/popup-2.str:37
+msgid "Load a FLASH upgrade into the FLASH memory of the calculator."
+msgstr ""
+"Il ne s'agit pas d'une MAJ ou cette MAJ n'est pas destinée à ce modèle de "
+"calculatrice."
+
+#: glade/popup-2.str:38
+msgid "_Upgrade calc"
+msgstr "_Mettre à jour"
+
+#: glade/popup-2.str:39
+msgid "Import and/or set an image to emulate."
+msgstr "Importe et/ou active une image à émuler"
+
+#: glade/popup-2.str:40
+msgid "Set R_OM (image/upgrade)"
+msgstr "Changer d'image"
+
+#: glade/popup-2.str:41
+msgid "Emulator options"
+msgstr "Options"
+
+#: glade/popup-2.str:42
+msgid ""
+"Run the calculator at its default speed (default) or at the maximum the "
+"computer can do."
+msgstr ""
+"Fait tourner la calculatrice à sa vitesse par défaut (défaut) ou à la "
+"vitesse maximale à laquelle l'ordinateur le peut."
+
+#: glade/popup-2.str:43
+msgid "_Restrict to actual speed"
+msgstr "_Vitesse nominale"
+
+#: glade/popup-2.str:44
+msgid ""
+"Enable/disable hardware protection. Please note you will have to restart the "
+"emulator or select an image for changes to take effect."
+msgstr ""
+"Active/désactive la protection matérielle. Veuillez noter que vous devrez "
+"redémarrer l'émulateur ou sélectionner une image pour que cette modification "
+"prenne effet."
+
+#: glade/popup-2.str:45
+msgid "H_W protection"
+msgstr "Protection matérielle"
+
+#: glade/popup-2.str:46
+msgid "_High LCD update"
+msgstr "Rafraîchissement LCD élevé"
+
+#: glade/popup-2.str:47
+msgid "_Med LCD update"
+msgstr "Rafraîchissement LCD moyen"
+
+#: glade/popup-2.str:48
+msgid "L_ow LCD update"
+msgstr "Rafraîchissement LCD faible"
+
+#: glade/popup-2.str:49
+msgid "_Normal view (x1)"
+msgstr "Vue _normale (x1)"
+
+#: glade/popup-2.str:50
+msgid "_Large view (x2)"
+msgstr "Vue _large (x2)"
+
+#: glade/popup-2.str:51
+msgid "_Full screen"
+msgstr "_Plein écran"
+
+#: glade/popup-2.str:52
+msgid "_Custom view"
+msgstr "Vue personnalisée"
+
+#: glade/popup-2.str:53
+msgid "Skin for current calc"
+msgstr "Skin courant"
+
+#: glade/popup-2.str:54
+msgid "No skin (just LCD)."
+msgstr "Pas de skin."
+
+#: glade/popup-2.str:55
+msgid "_None"
+msgstr "Aucun"
+
+#: glade/popup-2.str:56
+msgid "Returns to default skin."
+msgstr "Retourne au skin par défaut."
+
+#: glade/popup-2.str:57
+msgid "_Default"
+msgstr "_Défaut"
+
+#: glade/popup-2.str:58
+msgid "Choose a skin to use."
+msgstr "Choisir un skin."
+
+#: glade/popup-2.str:59
+msgid "_Other..."
+msgstr "_Autre..."
+
+#: glade/popup-2.str:60
+msgid "Screenshot"
+msgstr "Capture écran"
+
+#: glade/popup-2.str:61
+msgid "Do a screenshot now!"
+msgstr "Capture maintenant !"
+
+#: glade/popup-2.str:62
+msgid "_Now!"
+msgstr "_Maintenant !"
+
+#: glade/popup-2.str:63
+msgid "Set options for screenshot (image, type)."
+msgstr "Configure la capture écran (type & image)."
+
+#: glade/popup-2.str:64
+msgid "_Options"
+msgstr "_Options"
+
+#: glade/popup-2.str:65
+msgid "_Copy to clipboard"
+msgstr "_Copier dans le presse-papier"
+
+#: glade/popup-2.str:66
+msgid "Key Press"
+msgstr "Appui touche"
+
+#: glade/popup-2.str:67
+msgid "Setup recording"
+msgstr "Paramètres enregistrement"
+
+#: glade/popup-2.str:68
+msgid "Record"
+msgstr "Enregistrement"
+
+#: glade/popup-2.str:69
+msgid "Setup playing"
+msgstr "Paramètres lecture"
+
+#: glade/popup-2.str:70
+msgid "Play"
+msgstr "Lecture"
+
+#: glade/popup-2.str:71
+msgid "Misc"
+msgstr "Divers"
+
+#: glade/popup-2.str:72
+msgid "Open the TiEmu user's manual in a browser."
+msgstr "Ouvrir le manuel de l'utilisateur dans un navigateur."
+
+#: glade/popup-2.str:73
+msgid "_User's Manual"
+msgstr "Manuel de l'_utilisateur"
+
+#: glade/popup-2.str:74
+msgid "Open the Linux manpage (applicable to Windows, too)."
+msgstr "Ouvrir la page de manuel (Linux & Windows)."
+
+#: glade/popup-2.str:75
+msgid "_Manpage"
+msgstr "_Page de manuel"
+
+#: glade/popup-2.str:76
+msgid "_Bookmarks"
+msgstr "_Favoris"
+
+#: glade/popup-2.str:77
+msgid "http://lpg.ticalc.org/prj_tiemu"
+msgstr "http://lpg.ticalc.org, le groupe de programmeurs Linux."
+
+#: glade/popup-2.str:79
+msgid "http://tigcc.ticalc.org"
+msgstr "ticalc.org"
+
+#: glade/popup-2.str:80
+msgid "TIGCC"
+msgstr "TIGCC"
+
+#: glade/popup-2.str:81
+msgid "http://www.tilp.info"
+msgstr "http://www.tilp.info"
+
+#: glade/popup-2.str:82
+msgid "TiLP"
+msgstr "TiLP"
+
+#: glade/popup-2.str:83
+msgid "http://education.ti.com"
+msgstr "http://education.ti.com"
+
+#: glade/popup-2.str:84
+msgid "TI Education"
+msgstr "TI Education"
+
+#: glade/popup-2.str:85
+msgid "http://www.ticalc.org"
+msgstr "http://www.ticalc.org"
+
+#: glade/popup-2.str:86
+msgid "ticalc.org"
+msgstr "ticalc.org"
+
+#: glade/popup-2.str:87
+msgid "How to report a bug or a problem."
+msgstr "Comment envoyer un rapport de bogue ou un problème."
+
+#: glade/popup-2.str:88
+msgid "Bu_g report"
+msgstr "Rapport de _bogue"
+
+#: glade/popup-2.str:89
+msgid "Display the log of all changes."
+msgstr "Afficher la liste des changements."
+
+#: glade/popup-2.str:90
+msgid "_ChangeLog"
+msgstr "_Changements"
+
+#: glade/popup-2.str:91
+msgid "About TiEmu..."
+msgstr "A propos de TiEmu..."
+
+#: glade/popup-2.str:92
+msgid "_About..."
+msgstr "A propos..."
+
+#: glade/popup-2.str:93
+msgid "_Infos..."
+msgstr "_Informations..."
+
+#: glade/popup-2.str:94
+msgid "Just exits."
+msgstr "Quitter tout simplement."
+
+#: glade/popup-2.str:95
+msgid "E_xit without saving state"
+msgstr "Quitter sans sauver"
+
+#: glade/quicksend-2.str:7
+msgid "Quick send"
+msgstr "Envoi rapide"
+
+#: glade/quicksend-2.str:8
+msgid "_enable"
+msgstr "_activé"
+
+#: glade/romversion-2.str:7
+msgid "Set ROM version"
+msgstr "Choisir une ROM"
+
+#: glade/scroptions-2.str:7
+msgid "Screen Options"
+msgstr "Options de capture d'écran"
+
+#: glade/scroptions-2.str:8
+msgid "_JPEG"
+msgstr "_JPEG"
+
+#: glade/scroptions-2.str:9
+msgid "_PNG"
+msgstr "_PNG"
+
+#: glade/scroptions-2.str:10
+msgid "_ICO"
+msgstr "_ICO"
+
+#: glade/scroptions-2.str:11
+msgid "_EPS"
+msgstr "_EPS"
+
+#: glade/scroptions-2.str:12
+msgid "PD_F"
+msgstr "PDF"
+
+#: glade/scroptions-2.str:13
+msgid "_BMP"
+msgstr "_BMP"
+
+#: glade/scroptions-2.str:14
+msgid "Image format:"
+msgstr "Format d'image:"
+
+#: glade/scroptions-2.str:15
+msgid "Skips: "
+msgstr "Sauts: "
+
+#: glade/scroptions-2.str:16
+msgid "Number of frames to capture"
+msgstr "Nombre de trames à capturer"
+
+#: glade/scroptions-2.str:17
+msgid ""
+"Number of frames to skip between 2 captures. Beware: if you want to capture "
+"image every 4 frames, you need to set value to 3."
+msgstr ""
+"Nombre de trames à sauter entre 2 captures. Attention: si vous voulez "
+"capturer une image toutes les 4 trames, vous devez mettre la valeur à 3."
+
+#: glade/scroptions-2.str:18
+msgid "Shots: "
+msgstr "Captures: "
+
+#: glade/scroptions-2.str:19
+msgid "Burst capture:"
+msgstr "Capture en rafale:"
+
+#: glade/scroptions-2.str:20
+msgid "Select folder"
+msgstr "Sélectionner un dossier"
+
+#: glade/scroptions-2.str:21
+msgid "screenshot"
+msgstr "capture"
+
+#: glade/scroptions-2.str:22
+msgid "-000.jpg"
+msgstr "-000.jpg"
+
+#: glade/scroptions-2.str:23
+msgid "Folder & Filename:"
+msgstr "Dossier & Fichier:"
+
+#: glade/scroptions-2.str:24
+msgid "Black&_White"
+msgstr "Noir & Blanc"
+
+#: glade/scroptions-2.str:25
+msgid "Colo_r"
+msgstr "Couleur"
+
+#: glade/scroptions-2.str:26
+msgid "_LCD only"
+msgstr "_LCD"
+
+#: glade/scroptions-2.str:27
+msgid "_Calculator"
+msgstr "_Calculatrice"
+
+#: glade/scroptions-2.str:28
+msgid "Image type:"
+msgstr "Type d'image:"
+
+#: glade/wizard-2.str:7 glade/wizard-2.str:17 glade/wizard-2.str:25
+#: glade/wizard-2.str:27
+msgid "TiEmu wizard"
+msgstr "Assistant"
+
+#: glade/wizard-2.str:8
+msgid "Welcome to TiEmu 3, the Linux/Win32 TI emulator."
+msgstr "Bienvenur sur TiEmu, l'émulateur pour Linux/Windows"
+
+#: glade/wizard-2.str:9
+msgid ""
+"I want to use PedRom (GPL'ed replacement OS) \n"
+"shipped with TiEmu."
+msgstr ""
+"Je veux utiliser PedRom (OS de remplacement sous license GPL) \n"
+"qui est fourni avec TiEmu."
+
+#: glade/wizard-2.str:11
+msgid ""
+"You have downloaded a FLASH upgrade on the TI\n"
+"website."
+msgstr ""
+"Vous avez téléchargé une MAJ depuis le site\n"
+"de TI."
+
+#: glade/wizard-2.str:13
+msgid "You already have a ROM dump."
+msgstr "Vous avez déjà une copie de ROM."
+
+#: glade/wizard-2.str:14
+msgid ""
+"You want to use TiLP or another dumping program \n"
+"to get a ROM dump of your calculator ROM."
+msgstr ""
+"Vous voulez utiliser TiLP ou un autre programme de dumping \n"
+"pour obtenir une copie de la ROM de votre calculatrice."
+
+#: glade/wizard-2.str:16
+msgid ""
+"Remind you that you can not distribute your ROM dump(s). They are "
+"copyrighted by Texas Instruments."
+msgstr ""
+"Rappelez-vous que vous ne devez pas distribuez vos copies de ROM. Elles sont "
+"soumises au règles du copyright telles qu'édictées dans la license fournie "
+"par TI."
+
+#: glade/wizard-2.str:18
+msgid ""
+"TiEmu is now set  up and ready for use. Some tips on how to use the emulator:"
+msgstr ""
+"TiEmu est maintenant prêt à être utilisé. Quelques conseils d'utilisation:"
+
+#: glade/wizard-2.str:19
+msgid ""
+"* You have access to a popup menu by right-clicking in the emulator's window."
+msgstr ""
+"* Vous avez accès au menu déroulant par un clic bouton droit dans la fenêtre."
+
+#: glade/wizard-2.str:20
+msgid "* To use keys, use mouse or keyboard"
+msgstr "* Utilisez le clavier ou la souris pour frapper une touche"
+
+#: glade/wizard-2.str:21
+msgid ""
+"* To change to a different calculator or ROM version, use an item of the ROM "
+"menu."
+msgstr ""
+" Pour changer de calculatrice et/ou de ROM, sélectionnez une ROM dans le "
+"menu."
+
+#: glade/wizard-2.str:22
+msgid "* You can save the emulator state and config."
+msgstr "* Vous pouvez sauver l'état de l'émulateur et la configuration."
+
+#: glade/wizard-2.str:23
+msgid ""
+"* If your calculator screen is blank, use 'Ctrl' with '+/-' for adjusting "
+"contrast."
+msgstr ""
+" Si l'écran est blanc, utilisez 'Ctrl' + '+'/'-' pour régler le contraste."
+
+#: glade/wizard-2.str:24
+msgid "Click the 'Finish' button to start TiEmu."
+msgstr "Cliquer le bouton 'Finir' pour démarrer TiEmu."
+
+#: glade/wizard-2.str:26
+msgid ""
+"If you want to get a ROM dump with TiLP, you will have to download it from: "
+"<http://tilp.info>Be sure to read the user's manual!"
+msgstr ""
+"Si vous voulez obtenir une copie de votre ROM avec TiLP, vous devrez le "
+"télécharger depuis: <http://tilp.info>. Soyez sûr d'avoir bien lu le manuel !"
+
+#: glade/wizard-2.str:28
+msgid ""
+"The FLASH upgrade you have selected is being to be converted into a TiEmu "
+"image. Please wait..."
+msgstr ""
+"La MAJ sélectionnée est en train d'être convertie en une image TiEmu."
+"Veuillez patienter..."
+
+#: glade/wizard-2.str:29
+msgid "Note also that the converted image will not have a boot block."
+msgstr "Notez aussi que l'image obtenue n'a pas de bloc de démarrage."
+
+#~ msgid "Heap (handles)"
+#~ msgstr "Tas"
+
+#~ msgid "Up"
+#~ msgstr "Haut"
+
+#~ msgid "PC log"
+#~ msgstr "Journal du PC"
+
+#~ msgid "Trace (PC listing):"
+#~ msgstr "Trace du PC:"
+
+#~ msgid "_Go to address"
+#~ msgstr "_Aller au dossier parent"
+
+#~ msgid "Stack/Frame pointers"
+#~ msgstr "Pointeurs de Pile/Tas"
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 0000000..b26de01
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/stamp-po b/po/stamp-po
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/po/stamp-po
@@ -0,0 +1 @@
+timestamp
diff --git a/po/tiemu.pot b/po/tiemu.pot
new file mode 100644
index 0000000..cecea81
--- /dev/null
+++ b/po/tiemu.pot
@@ -0,0 +1,2572 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: tiemu-users at lists.sourceforge.net\n"
+"POT-Creation-Date: 2009-05-30 00:05+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/core/ti_hw/flash.c:261
+#, c-format
+msgid "found SSP=$%06x and PC=$%06x at offset 0x%x"
+msgstr ""
+
+#: src/core/ti_sw/iodefs.c:351
+#, c-format
+msgid "loading I/O defs: %s (%i entries)"
+msgstr ""
+
+#: src/core/ti_sw/mem_map.c:163
+#, c-format
+msgid "loading memory map: %s"
+msgstr ""
+
+#: src/core/error.c:49
+msgid "No error."
+msgstr ""
+
+#: src/core/error.c:53
+msgid "Can not open file."
+msgstr ""
+
+#: src/core/error.c:57
+msgid "Can not open state image: file is corrupted or missing."
+msgstr ""
+
+#: src/core/error.c:61
+msgid ""
+"Can not open state image: revision changed. You have to recreate the state "
+"image."
+msgstr ""
+
+#: src/core/error.c:65
+msgid ""
+"Can not open state image: state image header does not match ROM image "
+"header: have you changed/updated your ROM image?"
+msgstr ""
+
+#: src/core/error.c:69
+msgid ""
+"Can not open state image: this state image is not targetted for your current "
+"emulator image (calculator model and/or OS version must match!). Choose "
+"another image before."
+msgstr ""
+
+#: src/core/error.c:73
+msgid "Invalid emulator image. File is corrupted or revision changed."
+msgstr ""
+
+#: src/core/error.c:77 src/gui/wizard.c:289
+msgid "Invalid FLASH upgrade."
+msgstr ""
+
+#: src/core/error.c:81 src/gui/wizard.c:253
+msgid "Invalid ROM dump."
+msgstr ""
+
+#: src/core/error.c:85
+msgid "No image."
+msgstr ""
+
+#: src/core/error.c:89
+msgid "ROM dump has a weird size."
+msgstr ""
+
+#: src/core/error.c:93
+msgid "This is not recognized as a TI file."
+msgstr ""
+
+#: src/core/error.c:97
+msgid "Can't parse folder."
+msgstr ""
+
+#: src/core/error.c:101
+msgid "Can't upgrade calculator."
+msgstr ""
+
+#: src/core/error.c:105
+msgid ""
+"Error code not found in the list.\n"
+"This is a bug. Please report it."
+msgstr ""
+
+#: src/core/images.c:121
+msgid "ROM information:"
+msgstr ""
+
+#: src/core/images.c:122 src/core/images.c:133 src/core/images.c:143
+#, c-format
+msgid "  Calculator  : %s"
+msgstr ""
+
+#: src/core/images.c:123 src/core/images.c:134 src/core/images.c:144
+#, c-format
+msgid "  Firmware    : %s"
+msgstr ""
+
+#: src/core/images.c:124 src/core/images.c:135 src/core/images.c:145
+#, c-format
+msgid "  Memory type : %s"
+msgstr ""
+
+#: src/core/images.c:125 src/core/images.c:136 src/core/images.c:146
+#, c-format
+msgid "  Memory size : %iMB (%i bytes)"
+msgstr ""
+
+#: src/core/images.c:126 src/core/images.c:137 src/core/images.c:147
+#, c-format
+msgid "  ROM base    : %02x"
+msgstr ""
+
+#: src/core/images.c:127 src/core/images.c:148
+#, c-format
+msgid "  Hardware    : %i"
+msgstr ""
+
+#: src/core/images.c:132
+msgid "TIB information:"
+msgstr ""
+
+#: src/core/images.c:142
+msgid "Image information:"
+msgstr ""
+
+#: src/core/images.c:149
+#, c-format
+msgid "  Has boot    : %s"
+msgstr ""
+
+#: src/core/images.c:149 src/core/images.c:1092
+msgid "yes"
+msgstr ""
+
+#: src/core/images.c:149 src/core/images.c:1092
+msgid "no"
+msgstr ""
+
+#: src/core/images.c:176 src/core/images.c:1045
+#, c-format
+msgid "Unable to open this file: <%s>"
+msgstr ""
+
+#: src/core/images.c:190
+#, c-format
+msgid "Warning: truncating 8 MB image to 4 MB: <%s>"
+msgstr ""
+
+#: src/core/images.c:203
+#, c-format
+msgid "Failed to read from file: <%s>"
+msgstr ""
+
+#: src/core/images.c:209
+#, c-format
+msgid "Failed to close file: <%s>"
+msgstr ""
+
+#: src/core/images.c:463 src/core/images.c:753 src/core/images.c:767
+#, c-format
+msgid "Unable to get information on ROM dump: %s"
+msgstr ""
+
+#: src/core/images.c:490
+msgid "Completing image to 4 MB!"
+msgstr ""
+
+#: src/core/images.c:547 src/core/images.c:914
+#, c-format
+msgid "Unable to get information on FLASH upgrade: <%s>"
+msgstr ""
+
+#: src/core/images.c:838
+#, c-format
+msgid "Unable to get information on image: %s"
+msgstr ""
+
+#: src/core/images.c:973 src/core/images.c:1053 src/core/images.c:1191
+msgid "Opendir error"
+msgstr ""
+
+#: src/core/images.c:1039
+msgid "Scanning images/upgrades... "
+msgstr ""
+
+#: src/core/images.c:1067
+#, c-format
+msgid "Can not stat: <%s>"
+msgstr ""
+
+#: src/core/images.c:1078
+#, c-format
+msgid "Can not get ROM/update info: <%s>"
+msgstr ""
+
+#: src/core/images.c:1107
+msgid "Done."
+msgstr ""
+
+#: src/core/interface.c:252 src/core/interface.c:263 src/core/interface.c:274
+#: src/core/interface.c:285 src/core/interface.c:296
+msgid "Bad argument!"
+msgstr ""
+
+#: src/core/state.c:178
+#, c-format
+msgid "loading state image: %s"
+msgstr ""
+
+#: src/core/state.c:353
+#, c-format
+msgid "saving state image (TiEmu v2.00 format): %s"
+msgstr ""
+
+#: src/core/type2str.c:118
+msgid "Initial SSP"
+msgstr ""
+
+#: src/core/type2str.c:119
+msgid "Initial PC"
+msgstr ""
+
+#: src/core/type2str.c:120
+msgid "Bus Error vector"
+msgstr ""
+
+#: src/core/type2str.c:121
+msgid "Address Error vector"
+msgstr ""
+
+#: src/core/type2str.c:122
+msgid "Illegal Instruction vector"
+msgstr ""
+
+#: src/core/type2str.c:123
+msgid "Zero Divide vector"
+msgstr ""
+
+#: src/core/type2str.c:124
+msgid "CHK Instruction vector"
+msgstr ""
+
+#: src/core/type2str.c:125
+msgid "TRAPV Instruction vector"
+msgstr ""
+
+#: src/core/type2str.c:126
+msgid "Privilege Violation vector"
+msgstr ""
+
+#: src/core/type2str.c:127
+msgid "Trace vector"
+msgstr ""
+
+#: src/core/type2str.c:128
+msgid "Line 1010 Emulator vectors"
+msgstr ""
+
+#: src/core/type2str.c:129
+msgid "Line 1111 Emulator vectors"
+msgstr ""
+
+#: src/core/type2str.c:130 src/core/type2str.c:131 src/core/type2str.c:132
+#: src/core/type2str.c:134 src/core/type2str.c:135 src/core/type2str.c:136
+#: src/core/type2str.c:137 src/core/type2str.c:138 src/core/type2str.c:139
+#: src/core/type2str.c:140 src/core/type2str.c:141 src/core/type2str.c:181
+msgid "Unassigned, reserved"
+msgstr ""
+
+#: src/core/type2str.c:133
+msgid "Uninitialised Interrupt vector"
+msgstr ""
+
+#: src/core/type2str.c:142
+msgid "Spurious Interrupt vector"
+msgstr ""
+
+#: src/core/type2str.c:143
+msgid "Level 1 Interrupt auto-vectors"
+msgstr ""
+
+#: src/core/type2str.c:144
+msgid "Level 2 Interrupt auto-vectors"
+msgstr ""
+
+#: src/core/type2str.c:145
+msgid "Level 3 Interrupt auto-vectors"
+msgstr ""
+
+#: src/core/type2str.c:146
+msgid "Level 4 Interrupt auto-vectors"
+msgstr ""
+
+#: src/core/type2str.c:147
+msgid "Level 5 Interrupt auto-vectors"
+msgstr ""
+
+#: src/core/type2str.c:148
+msgid "Level 6 Interrupt auto-vectors"
+msgstr ""
+
+#: src/core/type2str.c:149
+msgid "Level 7 Interrupt auto-vectors"
+msgstr ""
+
+#: src/core/type2str.c:150
+msgid "TRAP #0 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:151
+msgid "TRAP #1 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:152
+msgid "TRAP #2 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:153
+msgid "TRAP #3 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:154
+msgid "TRAP #4 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:155
+msgid "TRAP #5 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:156
+msgid "TRAP #6 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:157
+msgid "TRAP #7 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:158
+msgid "TRAP #8 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:159
+msgid "TRAP #9 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:160
+msgid "TRAP #10 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:161
+msgid "TRAP #11 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:162
+msgid "TRAP #12 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:163
+msgid "TRAP #13 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:164
+msgid "TRAP #14 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:165
+msgid "TRAP #15 Instruction vectors"
+msgstr ""
+
+#: src/core/type2str.c:182 src/core/type2str.c:184
+msgid "User Interrupt vectors"
+msgstr ""
+
+#: src/core/type2str.c:192 src/core/type2str.c:208 src/core/type2str.c:221
+#: src/gui/debugger/dbg_bkpts.c:296 glade/dbg_cause-2.str:11
+msgid "access"
+msgstr ""
+
+#: src/core/type2str.c:193
+msgid "access range"
+msgstr ""
+
+#: src/core/type2str.c:194
+msgid "address"
+msgstr ""
+
+#: src/core/type2str.c:195 src/core/type2str.c:211 src/core/type2str.c:227
+msgid "exception"
+msgstr ""
+
+#: src/core/type2str.c:196 src/core/type2str.c:212 src/core/type2str.c:229
+msgid "prgm entry"
+msgstr ""
+
+#: src/core/type2str.c:197 src/core/type2str.c:213 src/core/type2str.c:231
+msgid "hw protection"
+msgstr ""
+
+#: src/core/type2str.c:198 src/core/type2str.c:214 src/core/type2str.c:233
+msgid "bit change"
+msgstr ""
+
+#: src/core/type2str.c:199 src/core/type2str.c:215 src/gui/infos.c:61
+msgid "unknown"
+msgstr ""
+
+#: src/core/type2str.c:209 src/core/type2str.c:223
+#: src/gui/debugger/dbg_bkpts.c:296
+msgid "range"
+msgstr ""
+
+#: src/core/type2str.c:210 src/core/type2str.c:225
+msgid "code"
+msgstr ""
+
+#: src/core/hwpm.c:61
+msgid "Hardware Parameters Block:"
+msgstr ""
+
+#: src/core/hwpm.c:62
+#, c-format
+msgid "  length           : %i"
+msgstr ""
+
+#: src/core/hwpm.c:121
+msgid ""
+"Detected V200 patched ROM (ExtendeD): emulated as TI92+ by changing the hwID "
+"from 8 to 1."
+msgstr ""
+
+#: src/core/hwpm.c:127
+msgid ""
+"Detected TI89 Titanium patched ROM (ExtendeD): emulated as TI89 by changing "
+"the hwID from 9 to 3."
+msgstr ""
+
+#: src/misc/cmdline.c:62
+#, c-format
+msgid "THIS PROGRAM COMES WITH ABSOLUTELY NO WARRANTY\n"
+msgstr ""
+
+#: src/misc/cmdline.c:63
+#, c-format
+msgid "PLEASE READ THE DOCUMENTATION FOR DETAILS\n"
+msgstr ""
+
+#: src/misc/files.c:95 src/misc/files.c:107 src/misc/files.c:123
+#: src/gui/calc/keyboard.c:77 src/gui/calc/popup.c:176
+#: src/gui/calc/popup.c:179 src/gui/calc/popup.c:191 src/gui/dboxes.c:42
+#: src/gui/fs_misc.c:155 src/gui/fs_misc.c:158
+msgid "Information"
+msgstr ""
+
+#: src/misc/files.c:95
+msgid "Unable to remove the file!"
+msgstr ""
+
+#: src/misc/files.c:107
+msgid ""
+"Unable to move file.\n"
+"\n"
+msgstr ""
+
+#: src/misc/files.c:123
+msgid ""
+"Unable to create the directory.\n"
+"\n"
+msgstr ""
+
+#: src/misc/files.c:151
+#, c-format
+msgid ""
+"The file %s already exists.\n"
+"Overwrite?"
+msgstr ""
+
+#: src/misc/files.c:153 src/gui/dboxes.c:44 src/gui/fs_misc.c:82
+#: src/gui/fs_misc.c:239
+msgid "Warning"
+msgstr ""
+
+#: src/misc/files.c:154
+msgid "Overwrite "
+msgstr ""
+
+#: src/misc/files.c:154
+msgid "Rename "
+msgstr ""
+
+#: src/misc/files.c:154
+msgid "Skip "
+msgstr ""
+
+#: src/misc/files.c:164
+msgid "Rename the file"
+msgstr ""
+
+#: src/misc/files.c:165
+msgid "New name: "
+msgstr ""
+
+#: src/misc/files.c:209 src/misc/tie_error.c:78 src/gui/calc/popup.c:797
+#: src/gui/calc/popup.c:847 src/gui/dboxes.c:48 src/gui/fs_misc.c:212
+#: src/gui/fs_misc.c:391 src/gui/fs_misc.c:421 src/gui/fs_misc.c:437
+#: src/gui/fs_misc.c:502 src/gui/main.c:218 src/gui/main.c:226
+#: src/gui/main.c:234 src/gui/main.c:242 src/gui/quicksend.c:120
+#: src/gui/wizard.c:253 src/gui/wizard.c:289
+msgid "Error"
+msgstr ""
+
+#: src/misc/files.c:209
+msgid "Unable to move the temporary file.\n"
+msgstr ""
+
+#: src/misc/rcfile.c:76
+#, c-format
+msgid "Configuration file error at line %i."
+msgstr ""
+
+#: src/misc/rcfile.c:181
+msgid ""
+"Configuration file not found, use default values. You can create one by the "
+"'File|Save config' command menu."
+msgstr ""
+
+#: src/misc/screenshot.c:70
+msgid "Couldn't allocate memory!"
+msgstr ""
+
+#: src/misc/screenshot.c:81
+msgid "zlib init error"
+msgstr ""
+
+#: src/misc/screenshot.c:97
+msgid "zlib deflate error"
+msgstr ""
+
+#: src/misc/screenshot.c:187 src/misc/screenshot.c:237
+msgid "Couldn't open destination file for writing!"
+msgstr ""
+
+#: src/gui/calc/calc.c:234 src/gui/calc/popup.c:655
+#: src/gui/debugger/dbg_bkpts.c:363 src/gui/debugger/dbg_bits.c:50
+#: src/gui/debugger/dbg_cause.c:60 src/gui/debugger/dbg_cause.c:144
+#: src/gui/debugger/dbg_code.c:357 src/gui/debugger/dbg_code.c:698
+#: src/gui/debugger/dbg_code.c:1160 src/gui/debugger/dbg_data.c:56
+#: src/gui/debugger/dbg_entry.c:207 src/gui/debugger/dbg_heap.c:146
+#: src/gui/debugger/dbg_heap.c:267 src/gui/debugger/dbg_iop.c:430
+#: src/gui/debugger/dbg_mem.c:712 src/gui/debugger/dbg_mem.c:1087
+#: src/gui/debugger/dbg_mem.c:1311 src/gui/debugger/dbg_pclog.c:138
+#: src/gui/debugger/dbg_regs.c:194 src/gui/debugger/dbg_regs.c:539
+#: src/gui/debugger/dbg_stack.c:163 src/gui/debugger/dbg_stack.c:417
+#: src/gui/debugger/dbg_vectors.c:145 src/gui/logger/log_link.c:62
+#: src/gui/infos.c:50 src/gui/manpage.c:72 src/gui/pbars.c:63
+#: src/gui/quicksend.c:59 src/gui/release.c:77 src/gui/romversion.c:191
+#: src/gui/scroptions.c:61 src/gui/wizard.c:71
+#, c-format
+msgid "%s: GUI loading failed!\n"
+msgstr ""
+
+#: src/gui/calc/calc.c:751
+#, c-format
+msgid "screenshot to %s... "
+msgstr ""
+
+#: src/gui/calc/calc.c:770
+msgid "unsupported screenshot options combination, screenshot aborted."
+msgstr ""
+
+#: src/gui/calc/calc.c:797
+#, c-format
+msgid "failed to save pixbuf file: %s: %s"
+msgstr ""
+
+#: src/gui/calc/calc.c:802
+msgid "done!"
+msgstr ""
+
+#: src/gui/calc/keymap.c:207
+#, c-format
+msgid "loading keymap: %s (%i keys)"
+msgstr ""
+
+#: src/gui/calc/keypress.c:58 src/gui/calc/keypress.c:84
+msgid "Can't open file."
+msgstr ""
+
+#: src/gui/calc/popup.c:71
+#, c-format
+msgid "* TiEmu version %s (cables=%s, files=%s, calcs=%s, conv=%s)"
+msgstr ""
+
+#: src/gui/calc/popup.c:177
+msgid "Configuration file saved (in tiemu.ini)."
+msgstr ""
+
+#: src/gui/calc/popup.c:180
+msgid "Configuration file saved (in ~/.tiemu)."
+msgstr ""
+
+#: src/gui/calc/popup.c:191
+msgid "Configuration file loaded."
+msgstr ""
+
+#: src/gui/calc/popup.c:267 src/gui/dboxes.c:46
+msgid "Question"
+msgstr ""
+
+#: src/gui/calc/popup.c:267
+msgid "Clear RAM?"
+msgstr ""
+
+#: src/gui/calc/popup.c:512
+msgid "Manual_en.html"
+msgstr ""
+
+#: src/gui/calc/popup.c:533
+msgid "You're using GTK+ >= 2.12 so bookmark support is currently unavailable."
+msgstr ""
+
+#: src/gui/calc/popup.c:553
+msgid ""
+"There are several ways to get in touch if you encounter a problem with TiEmu "
+"or if you have questions, suggestions, bug reports, etc:\n"
+"- if you have general questions or problems, please consider the users' "
+"mailing list first (http://tiemu-users@list.sf.net).\n"
+"- if you want to discuss about TiEmu, you can use the TiEmu forum (http://"
+"sourceforge.net/forum/?group_id=23169).\n"
+"- for bug reports, use the 'Bug Tracking System' (http://sourceforge.net/"
+"tracker/?group_id=23169).\n"
+"\n"
+"Before e-mailing the TiEmu team, make sure you have read the manual and/or "
+"the FAQ...."
+msgstr ""
+
+#: src/gui/calc/popup.c:797
+msgid "Unable to run ShellExecute extension."
+msgstr ""
+
+#: src/gui/calc/popup.c:847
+msgid "Spawn error: do you have Firefox installed?"
+msgstr ""
+
+#: src/gui/calc/skinops.c:449
+#, c-format
+msgid "loading skin: %s (%d x %d)"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:63
+msgid "Symbol"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:63 src/gui/romversion.c:88
+#: glade/dbg_data-2.str:22
+msgid "Type"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:63
+msgid "Status"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:63 glade/log_link-2.str:9
+msgid "Start"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:63
+msgid "End"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:63 glade/dbg_data-2.str:11
+msgid "Mode"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:140 src/gui/debugger/dbg_bkpts.c:167
+#: src/gui/debugger/dbg_bkpts.c:195 src/gui/debugger/dbg_bkpts.c:224
+#: src/gui/debugger/dbg_bkpts.c:251 src/gui/debugger/dbg_bkpts.c:335
+msgid "enabled"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:140 src/gui/debugger/dbg_bkpts.c:167
+#: src/gui/debugger/dbg_bkpts.c:195 src/gui/debugger/dbg_bkpts.c:224
+#: src/gui/debugger/dbg_bkpts.c:251 src/gui/debugger/dbg_bkpts.c:335
+msgid "disabled"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:143 src/gui/debugger/dbg_bkpts.c:338
+msgid "one-shot"
+msgstr ""
+
+#: src/gui/debugger/dbg_bkpts.c:426
+msgid "dbg_bkpts-2.glade: GUI loading failed !\n"
+msgstr ""
+
+#: src/gui/debugger/dbg_code.c:75 src/gui/debugger/dbg_heap.c:55
+#: src/gui/debugger/dbg_iop.c:299 src/gui/debugger/dbg_mem.c:185
+#: src/gui/debugger/dbg_pclog.c:54 src/gui/debugger/dbg_stack.c:58
+msgid "Address"
+msgstr ""
+
+#: src/gui/debugger/dbg_code.c:75
+msgid "Opcode"
+msgstr ""
+
+#: src/gui/debugger/dbg_code.c:75
+msgid "Operand"
+msgstr ""
+
+#: src/gui/debugger/dbg_code.c:1244
+msgid "Choose font..."
+msgstr ""
+
+#: src/gui/debugger/dbg_entry.c:91 src/gui/debugger/dbg_iop.c:264
+#: src/gui/debugger/dbg_vectors.c:53
+msgid "Name"
+msgstr ""
+
+#: src/gui/debugger/dbg_heap.c:55
+msgid "Id"
+msgstr ""
+
+#: src/gui/debugger/dbg_heap.c:55 src/gui/romversion.c:88
+msgid "Size"
+msgstr ""
+
+#: src/gui/debugger/dbg_iop.c:272 src/gui/debugger/dbg_stack.c:58
+msgid "Value"
+msgstr ""
+
+#: src/gui/debugger/dbg_iop.c:308
+msgid "Mask"
+msgstr ""
+
+#: src/gui/debugger/dbg_vectors.c:53
+msgid "Number"
+msgstr ""
+
+#: src/gui/about.c:97
+#, c-format
+msgid "Framework version (cables=%s, files=%s, calcs=%s, conv=%s)"
+msgstr ""
+
+#: src/gui/device.c:59 src/gui/wizard.c:95 src/gui/wizard.c:180
+#: src/gui/wizard.c:219
+msgid "comm.c: GUI loading failed !\n"
+msgstr ""
+
+#: src/gui/filesel.c:389
+msgid "Save file"
+msgstr ""
+
+#: src/gui/filesel.c:392 src/gui/filesel.c:701 glade/quicksend-2.str:9
+msgid "Open file"
+msgstr ""
+
+#: src/gui/fs_misc.c:83
+msgid ""
+"The state image you are attempting to load does not match the current "
+"running image. Press OK if you want TiEmu to automatically load the "
+"corresponding image or Cancel to abort."
+msgstr ""
+
+#: src/gui/fs_misc.c:156
+msgid ""
+"You do not seem to have saved your settings. Configuration file saved (in "
+"tiemu.ini)."
+msgstr ""
+
+#: src/gui/fs_misc.c:159
+msgid ""
+"You do not seem to have saved your settings. Configuration file saved (in ~/."
+"tiemu)."
+msgstr ""
+
+#: src/gui/fs_misc.c:173
+msgid "Sending app(s)"
+msgstr ""
+
+#: src/gui/fs_misc.c:177 src/gui/fs_misc.c:185
+msgid "Sending var(s)"
+msgstr ""
+
+#: src/gui/fs_misc.c:181 src/gui/fs_misc.c:189
+msgid "Restoring"
+msgstr ""
+
+#: src/gui/fs_misc.c:212 src/gui/fs_misc.c:391 src/gui/quicksend.c:120
+msgid "This file is not a valid TI file."
+msgstr ""
+
+#: src/gui/fs_misc.c:236
+#, c-format
+msgid ""
+"The current link cable <%s> port <%s> does not allow direct file loading. Do "
+"you let me change link port settings to allow direct file loading?"
+msgstr ""
+
+#: src/gui/fs_misc.c:421
+msgid "Does not seem to be an upgrade."
+msgstr ""
+
+#: src/gui/fs_misc.c:437
+msgid "Cannot load the upgrade."
+msgstr ""
+
+#: src/gui/fs_misc.c:473 src/gui/fs_misc.c:483
+msgid "HW type"
+msgstr ""
+
+#: src/gui/fs_misc.c:474
+msgid "The FLASH upgrade can be imported as HW1 or HW2. Please choose..."
+msgstr ""
+
+#: src/gui/fs_misc.c:484
+msgid "The FLASH upgrade can be imported as HW3 or HW4. Please choose..."
+msgstr ""
+
+#: src/gui/fs_misc.c:502
+msgid "This is not a valid file"
+msgstr ""
+
+#: src/gui/main.c:153
+msgid "Unable to initialize audio, sound will not play\n"
+msgstr ""
+
+#: src/gui/main.c:187
+msgid "Initializing GTK+..."
+msgstr ""
+
+#: src/gui/main.c:191
+msgid "Initializing KDE..."
+msgstr ""
+
+#: src/gui/main.c:192 glade/device-2.str:15 glade/popup-2.str:78
+msgid "TiEmu"
+msgstr ""
+
+#: src/gui/main.c:192
+msgid "TI calculator emulator"
+msgstr ""
+
+#: src/gui/main.c:198
+msgid "Initializing D-Bus..."
+msgstr ""
+
+#: src/gui/main.c:204
+msgid "Initializing OLE..."
+msgstr ""
+
+#: src/gui/main.c:212
+msgid "Initializing TiLP framework..."
+msgstr ""
+
+#: src/gui/main.c:216
+#, c-format
+msgid "libticonv library version <%s> mini required (<%s> found)."
+msgstr ""
+
+#: src/gui/main.c:218
+msgid "libticonv: version mismatches."
+msgstr ""
+
+#: src/gui/main.c:224
+#, c-format
+msgid "libtifiles library version <%s> mini required (<%s> found)."
+msgstr ""
+
+#: src/gui/main.c:226
+msgid "libtifiles: version mismatches."
+msgstr ""
+
+#: src/gui/main.c:232
+#, c-format
+msgid "libticables library version <%s> mini required (<%s> found)."
+msgstr ""
+
+#: src/gui/main.c:234
+msgid "libticables: version mismatches."
+msgstr ""
+
+#: src/gui/main.c:240
+#, c-format
+msgid "libticalcs library version <%s> mini required (<%s> found)."
+msgstr ""
+
+#: src/gui/main.c:242
+msgid "libticalcs: version mismatches."
+msgstr ""
+
+#: src/gui/main.c:249
+msgid "Searching for ROM dumps..."
+msgstr ""
+
+#: src/gui/main.c:291
+msgid "Loading image..."
+msgstr ""
+
+#: src/gui/main.c:299
+msgid "Initializing m68k emulation engine..."
+msgstr ""
+
+#: src/gui/main.c:331
+msgid "Loading previously saved state..."
+msgstr ""
+
+#: src/gui/main.c:342
+msgid "Pre-loading debugger..."
+msgstr ""
+
+#: src/gui/romversion.c:87
+msgid "Filename"
+msgstr ""
+
+#: src/gui/romversion.c:87
+msgid "Model"
+msgstr ""
+
+#: src/gui/romversion.c:87
+msgid "Version"
+msgstr ""
+
+#: src/gui/romversion.c:88
+msgid "Boot"
+msgstr ""
+
+#: src/gui/romversion.c:88
+msgid "Hardware"
+msgstr ""
+
+#: src/gui/support.c:91 src/gui/support.c:115
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr ""
+
+#: src/gui/wizard.c:110
+msgid "Use PedRom"
+msgstr ""
+
+#: src/gui/wizard.c:112
+msgid "Use FLASH OS"
+msgstr ""
+
+#: src/gui/wizard.c:114
+msgid "Use ROM dump"
+msgstr ""
+
+#: src/gui/wizard.c:131
+msgid "Importing TIBs. Please wait..."
+msgstr ""
+
+#: src/sound/audio.c:36
+msgid "Unable to initialize sound"
+msgstr ""
+
+#: src/sound/audio.c:65
+msgid "Sound Error"
+msgstr ""
+
+#: src/sound/audio.c:65
+msgid "Not enough memory"
+msgstr ""
+
+#: src/sound/audio.c:75
+msgid "Unable to open audio device"
+msgstr ""
+
+#: src/sound/stream.c:54
+msgid "sound buffer full, dropping sample(s)"
+msgstr ""
+
+#: glade/calc-2.str:7
+msgid "TiEmu 3"
+msgstr ""
+
+#: glade/calc-2.str:8
+msgid "Use mouse or press a key."
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:7
+msgid "Breakpoints"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:8
+msgid "Add breakpoint"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:9
+msgid "Remove breakpoint(s)"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:10
+msgid "Disable breakpoint"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:11
+msgid "Enable breakpoint"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:12
+msgid "Go to breakpoint location"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:13
+msgid "Double-click a row to edit breakpoint values."
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:14
+msgid "Breakpoint context:"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:15
+msgid "Bits"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:16
+msgid "Data"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:17
+msgid "Vectors"
+msgstr ""
+
+#: glade/dbg_bkpts-2.str:18
+msgid "Prgm entry"
+msgstr ""
+
+#: glade/dbg_bits-2.str:7
+msgid "Add Bit Breakpoint"
+msgstr ""
+
+#: glade/dbg_bits-2.str:8 glade/dbg_cause-2.str:8
+msgid "Address:"
+msgstr ""
+
+#: glade/dbg_bits-2.str:9 glade/dbg_cause-2.str:10 glade/dbg_data-2.str:16
+#: glade/dbg_data-2.str:17 glade/dbg_data-2.str:18
+msgid "0x000000"
+msgstr ""
+
+#: glade/dbg_bits-2.str:10
+msgid "Checks:"
+msgstr ""
+
+#: glade/dbg_bits-2.str:11 glade/dbg_bits-2.str:20
+msgid "7"
+msgstr ""
+
+#: glade/dbg_bits-2.str:12 glade/dbg_bits-2.str:21
+msgid "6"
+msgstr ""
+
+#: glade/dbg_bits-2.str:13 glade/dbg_bits-2.str:22
+msgid "5"
+msgstr ""
+
+#: glade/dbg_bits-2.str:14 glade/dbg_bits-2.str:23
+msgid "4"
+msgstr ""
+
+#: glade/dbg_bits-2.str:15 glade/dbg_bits-2.str:24
+msgid "3"
+msgstr ""
+
+#: glade/dbg_bits-2.str:16 glade/dbg_bits-2.str:25
+msgid "2"
+msgstr ""
+
+#: glade/dbg_bits-2.str:17 glade/dbg_bits-2.str:26
+msgid "1"
+msgstr ""
+
+#: glade/dbg_bits-2.str:18 glade/dbg_bits-2.str:27 glade/dbg_code-2.str:48
+#: glade/dbg_regs-2.str:13 glade/dbg_regs-2.str:15 glade/dbg_regs-2.str:16
+#: glade/dbg_regs-2.str:19 glade/dbg_regs-2.str:20 glade/dbg_regs-2.str:21
+msgid "0"
+msgstr ""
+
+#: glade/dbg_bits-2.str:19
+msgid "States:"
+msgstr ""
+
+#: glade/dbg_cause-2.str:7
+msgid "Breakpoint!"
+msgstr ""
+
+#: glade/dbg_cause-2.str:9 glade/dbg_cause-2.str:20
+msgid "Type:"
+msgstr ""
+
+#: glade/dbg_cause-2.str:12
+msgid "byte read"
+msgstr ""
+
+#: glade/dbg_cause-2.str:13
+msgid "Mode:"
+msgstr ""
+
+#: glade/dbg_cause-2.str:14
+msgid "A breakpoint has been encountered..."
+msgstr ""
+
+#: glade/dbg_cause-2.str:15
+msgid "Target:"
+msgstr ""
+
+#: glade/dbg_cause-2.str:16
+msgid "0x4c00"
+msgstr ""
+
+#: glade/dbg_cause-2.str:17 glade/dbg_cause-2.str:27
+msgid "Id:"
+msgstr ""
+
+#: glade/dbg_cause-2.str:18 glade/dbg_cause-2.str:28
+msgid "#0"
+msgstr ""
+
+#: glade/dbg_cause-2.str:19
+msgid "Exception!"
+msgstr ""
+
+#: glade/dbg_cause-2.str:21
+msgid "PC (pushed):"
+msgstr ""
+
+#: glade/dbg_cause-2.str:22
+msgid "illegal instr"
+msgstr ""
+
+#: glade/dbg_cause-2.str:23 glade/dbg_mem-2.str:15
+msgid "000000"
+msgstr ""
+
+#: glade/dbg_cause-2.str:24
+msgid "0000"
+msgstr ""
+
+#: glade/dbg_cause-2.str:25
+msgid "SR (pushed):"
+msgstr ""
+
+#: glade/dbg_cause-2.str:26
+msgid "An exception has been encountered..."
+msgstr ""
+
+#: glade/dbg_code-2.str:7
+msgid "Disassembly"
+msgstr ""
+
+#: glade/dbg_code-2.str:8
+msgid "_Debug"
+msgstr ""
+
+#: glade/dbg_code-2.str:9
+msgid "_Run"
+msgstr ""
+
+#: glade/dbg_code-2.str:10
+msgid "Step into (single step)"
+msgstr ""
+
+#: glade/dbg_code-2.str:11
+msgid "Step _in"
+msgstr ""
+
+#: glade/dbg_code-2.str:12
+msgid "Step over (skip subroutine)"
+msgstr ""
+
+#: glade/dbg_code-2.str:13
+msgid "Step _over"
+msgstr ""
+
+#: glade/dbg_code-2.str:14
+msgid "Step out (return to caller)"
+msgstr ""
+
+#: glade/dbg_code-2.str:15
+msgid "Step ou_t"
+msgstr ""
+
+#: glade/dbg_code-2.str:16
+msgid "Run to _cursor"
+msgstr ""
+
+#: glade/dbg_code-2.str:17
+msgid "_Break"
+msgstr ""
+
+#: glade/dbg_code-2.str:18
+msgid "_Log"
+msgstr ""
+
+#: glade/dbg_code-2.str:19
+msgid "_Linkport"
+msgstr ""
+
+#: glade/dbg_code-2.str:20
+msgid "Windows"
+msgstr ""
+
+#: glade/dbg_code-2.str:21
+msgid "_Registers"
+msgstr ""
+
+#: glade/dbg_code-2.str:22
+msgid "_Breakpoints"
+msgstr ""
+
+#: glade/dbg_code-2.str:23
+msgid "_Memory"
+msgstr ""
+
+#: glade/dbg_code-2.str:24
+msgid "_PC trace"
+msgstr ""
+
+#: glade/dbg_code-2.str:25
+msgid "_Stack frame"
+msgstr ""
+
+#: glade/dbg_code-2.str:26
+msgid "_Heap (handles)"
+msgstr ""
+
+#: glade/dbg_code-2.str:27
+msgid "_I/O ports"
+msgstr ""
+
+#: glade/dbg_code-2.str:28
+msgid "Dock Mode"
+msgstr ""
+
+#: glade/dbg_code-2.str:29
+msgid "_Group windows"
+msgstr ""
+
+#: glade/dbg_code-2.str:30
+msgid "_Show all"
+msgstr ""
+
+#: glade/dbg_code-2.str:31
+msgid "_Hide all"
+msgstr ""
+
+#: glade/dbg_code-2.str:32
+msgid "M_inimize all"
+msgstr ""
+
+#: glade/dbg_code-2.str:33
+msgid "M_aximize all"
+msgstr ""
+
+#: glade/dbg_code-2.str:34
+msgid "_Restore all"
+msgstr ""
+
+#: glade/dbg_code-2.str:35
+msgid "_Quit"
+msgstr ""
+
+#: glade/dbg_code-2.str:36
+msgid "_Font"
+msgstr ""
+
+#: glade/dbg_code-2.str:37
+msgid "_State"
+msgstr ""
+
+#: glade/dbg_code-2.str:38
+msgid "S_ave"
+msgstr ""
+
+#: glade/dbg_code-2.str:39
+msgid "_Revert"
+msgstr ""
+
+#: glade/dbg_code-2.str:40
+msgid "Run (F5)"
+msgstr ""
+
+#: glade/dbg_code-2.str:41
+msgid "Single step / Step into (F7)"
+msgstr ""
+
+#: glade/dbg_code-2.str:42
+msgid "Step over (F8)"
+msgstr ""
+
+#: glade/dbg_code-2.str:43
+msgid "Step out (F9)"
+msgstr ""
+
+#: glade/dbg_code-2.str:44
+msgid "Run to cursor (F4)"
+msgstr ""
+
+#: glade/dbg_code-2.str:45
+msgid "Break (F11)"
+msgstr ""
+
+#: glade/dbg_code-2.str:46
+msgid "Toggle breakpoint (F2)"
+msgstr ""
+
+#: glade/dbg_code-2.str:47
+msgid "Cycle count:"
+msgstr ""
+
+#: glade/dbg_code-2.str:49
+msgid "00"
+msgstr ""
+
+#: glade/dbg_code-2.str:50
+msgid "Reset"
+msgstr ""
+
+#: glade/dbg_code-2.str:51
+msgid "Symbol:"
+msgstr ""
+
+#: glade/dbg_code-2.str:52
+msgid "by name"
+msgstr ""
+
+#: glade/dbg_code-2.str:53
+msgid "by addr"
+msgstr ""
+
+#: glade/dbg_code-2.str:54
+msgid "by id"
+msgstr ""
+
+#: glade/dbg_code-2.str:55 glade/dbg_mem-2.str:19
+msgid "Go to _address"
+msgstr ""
+
+#: glade/dbg_code-2.str:56
+msgid "Go to _PC"
+msgstr ""
+
+#: glade/dbg_code-2.str:57
+msgid "Set _breakpoint"
+msgstr ""
+
+#: glade/dbg_code-2.str:58
+msgid "Set _one shot bkpt"
+msgstr ""
+
+#: glade/dbg_code-2.str:59
+msgid "Set PC to _selection"
+msgstr ""
+
+#: glade/dbg_code-2.str:60 glade/dbg_heap-2.str:9 glade/dbg_mem-2.str:22
+#: glade/dbg_regs-2.str:10 glade/dbg_stack-2.str:12
+msgid "View _memory"
+msgstr ""
+
+#: glade/dbg_code-2.str:61
+msgid "Change font"
+msgstr ""
+
+#: glade/dbg_code-2.str:62 glade/device-2.str:18
+msgid "custom"
+msgstr ""
+
+#: glade/dbg_code-2.str:63
+msgid "default"
+msgstr ""
+
+#: glade/dbg_code-2.str:64
+msgid "Font:"
+msgstr ""
+
+#: glade/dbg_data-2.str:7
+msgid "Add Data Breakpoint"
+msgstr ""
+
+#: glade/dbg_data-2.str:8
+msgid "_Read"
+msgstr ""
+
+#: glade/dbg_data-2.str:9
+msgid "_Write"
+msgstr ""
+
+#: glade/dbg_data-2.str:10
+msgid "_Either"
+msgstr ""
+
+#: glade/dbg_data-2.str:12
+msgid "_Single"
+msgstr ""
+
+#: glade/dbg_data-2.str:13
+msgid "_Range"
+msgstr ""
+
+#: glade/dbg_data-2.str:14
+msgid "to"
+msgstr ""
+
+#: glade/dbg_data-2.str:15
+msgid "at"
+msgstr ""
+
+#: glade/dbg_data-2.str:19
+msgid "Byte"
+msgstr ""
+
+#: glade/dbg_data-2.str:20
+msgid "Word"
+msgstr ""
+
+#: glade/dbg_data-2.str:21
+msgid "Long"
+msgstr ""
+
+#: glade/dbg_entry-2.str:2
+msgid "Set program entry breakpoint"
+msgstr ""
+
+#: glade/dbg_heap-2.str:7
+msgid "Heap"
+msgstr ""
+
+#: glade/dbg_heap-2.str:8
+msgid ""
+"Double click rowl to open tab in the memory window at the handle address."
+msgstr ""
+
+#: glade/dbg_ioports-2.str:7 glade/dbg_regs-2.str:7 glade/dbg_regs-2.str:28
+msgid "Show registers"
+msgstr ""
+
+#: glade/dbg_ioports-2.str:8
+msgid "I/O ports"
+msgstr ""
+
+#: glade/dbg_ioports-2.str:9 glade/dbg_regs-2.str:9
+msgid "Double-click value or item to edit."
+msgstr ""
+
+#: glade/dbg_ioports-2.str:10
+msgid "_Hex"
+msgstr ""
+
+#: glade/dbg_ioports-2.str:11
+msgid "_Dec"
+msgstr ""
+
+#: glade/dbg_mem-2.str:7
+msgid "Memory"
+msgstr ""
+
+#: glade/dbg_mem-2.str:8
+msgid "Add tab (F1)"
+msgstr ""
+
+#: glade/dbg_mem-2.str:9
+msgid "Remove tab (F2)"
+msgstr ""
+
+#: glade/dbg_mem-2.str:10
+msgid "Up (F3)"
+msgstr ""
+
+#: glade/dbg_mem-2.str:11
+msgid "Down (F4)"
+msgstr ""
+
+#: glade/dbg_mem-2.str:12
+msgid "Refresh tab (F5)"
+msgstr ""
+
+#: glade/dbg_mem-2.str:13
+msgid "View memory map (F6)"
+msgstr ""
+
+#: glade/dbg_mem-2.str:14
+msgid "Enter Address"
+msgstr ""
+
+#: glade/dbg_mem-2.str:16
+msgid "HEX address"
+msgstr ""
+
+#: glade/dbg_mem-2.str:17
+msgid "Find"
+msgstr ""
+
+#: glade/dbg_mem-2.str:18
+msgid "Find _next"
+msgstr ""
+
+#: glade/dbg_mem-2.str:20
+msgid "_Dis-assemble"
+msgstr ""
+
+#: glade/dbg_mem-2.str:21
+msgid "Dis-assemble (indirect)"
+msgstr ""
+
+#: glade/dbg_mem-2.str:23
+msgid "Search"
+msgstr ""
+
+#: glade/dbg_mem-2.str:24
+msgid "Find _Next"
+msgstr ""
+
+#: glade/dbg_mem-2.str:25
+msgid "Find:"
+msgstr ""
+
+#: glade/dbg_mem-2.str:26
+msgid ""
+"Hexadecimal strings must have 2 chars per byte and can be with or without "
+"space: FE ED or FEED."
+msgstr ""
+
+#: glade/dbg_mem-2.str:27
+msgid "_ASCII"
+msgstr ""
+
+#: glade/dbg_mem-2.str:28
+msgid "_Case sensitive"
+msgstr ""
+
+#: glade/dbg_pclog-2.str:7
+msgid "PC trace"
+msgstr ""
+
+#: glade/dbg_pclog-2.str:8
+msgid "Double-click the row to disassemble."
+msgstr ""
+
+#: glade/dbg_regs-2.str:8 glade/dbg_regs-2.str:29
+msgid "Registers"
+msgstr ""
+
+#: glade/dbg_regs-2.str:11
+msgid "Status Register"
+msgstr ""
+
+#: glade/dbg_regs-2.str:12 glade/dbg_regs-2.str:72
+msgid "T"
+msgstr ""
+
+#: glade/dbg_regs-2.str:14 glade/dbg_regs-2.str:73
+msgid "S"
+msgstr ""
+
+#: glade/dbg_regs-2.str:17
+msgid "I2"
+msgstr ""
+
+#: glade/dbg_regs-2.str:18
+msgid "I1"
+msgstr ""
+
+#: glade/dbg_regs-2.str:22 glade/dbg_regs-2.str:74
+msgid "X"
+msgstr ""
+
+#: glade/dbg_regs-2.str:23 glade/dbg_regs-2.str:68
+msgid "N"
+msgstr ""
+
+#: glade/dbg_regs-2.str:24 glade/dbg_regs-2.str:69
+msgid "Z"
+msgstr ""
+
+#: glade/dbg_regs-2.str:25 glade/dbg_regs-2.str:70
+msgid "V"
+msgstr ""
+
+#: glade/dbg_regs-2.str:26 glade/dbg_regs-2.str:71
+msgid "C"
+msgstr ""
+
+#: glade/dbg_regs-2.str:27
+msgid "I0"
+msgstr ""
+
+#: glade/dbg_regs-2.str:30
+msgid "D1="
+msgstr ""
+
+#: glade/dbg_regs-2.str:31
+msgid "D2="
+msgstr ""
+
+#: glade/dbg_regs-2.str:32
+msgid "D3="
+msgstr ""
+
+#: glade/dbg_regs-2.str:33
+msgid "D4="
+msgstr ""
+
+#: glade/dbg_regs-2.str:34
+msgid "D5="
+msgstr ""
+
+#: glade/dbg_regs-2.str:35
+msgid "D6="
+msgstr ""
+
+#: glade/dbg_regs-2.str:36
+msgid "D7="
+msgstr ""
+
+#: glade/dbg_regs-2.str:37
+msgid "A0="
+msgstr ""
+
+#: glade/dbg_regs-2.str:38
+msgid "A1="
+msgstr ""
+
+#: glade/dbg_regs-2.str:39
+msgid "A2="
+msgstr ""
+
+#: glade/dbg_regs-2.str:40
+msgid "A3="
+msgstr ""
+
+#: glade/dbg_regs-2.str:41
+msgid "A4="
+msgstr ""
+
+#: glade/dbg_regs-2.str:42
+msgid "A5="
+msgstr ""
+
+#: glade/dbg_regs-2.str:43
+msgid "A6="
+msgstr ""
+
+#: glade/dbg_regs-2.str:44
+msgid "A7="
+msgstr ""
+
+#: glade/dbg_regs-2.str:45 glade/dbg_regs-2.str:46 glade/dbg_regs-2.str:47
+#: glade/dbg_regs-2.str:48 glade/dbg_regs-2.str:49 glade/dbg_regs-2.str:50
+#: glade/dbg_regs-2.str:51 glade/dbg_regs-2.str:52 glade/dbg_regs-2.str:53
+#: glade/dbg_regs-2.str:54 glade/dbg_regs-2.str:55 glade/dbg_regs-2.str:56
+#: glade/dbg_regs-2.str:57 glade/dbg_regs-2.str:58 glade/dbg_regs-2.str:59
+#: glade/dbg_regs-2.str:76
+msgid "12345678"
+msgstr ""
+
+#: glade/dbg_regs-2.str:60
+msgid "USP="
+msgstr ""
+
+#: glade/dbg_regs-2.str:61
+msgid "SSP="
+msgstr ""
+
+#: glade/dbg_regs-2.str:62
+msgid "PC="
+msgstr ""
+
+#: glade/dbg_regs-2.str:63
+msgid "SR="
+msgstr ""
+
+#: glade/dbg_regs-2.str:64 glade/dbg_regs-2.str:65 glade/dbg_regs-2.str:66
+msgid "123456"
+msgstr ""
+
+#: glade/dbg_regs-2.str:67
+msgid "1234"
+msgstr ""
+
+#: glade/dbg_regs-2.str:75
+msgid "I="
+msgstr ""
+
+#: glade/dbg_regs-2.str:77
+msgid "D0="
+msgstr ""
+
+#: glade/dbg_stack-2.str:7
+msgid "Stack"
+msgstr ""
+
+#: glade/dbg_stack-2.str:8
+msgid "A7 (stack) is:"
+msgstr ""
+
+#: glade/dbg_stack-2.str:9
+msgid "USP"
+msgstr ""
+
+#: glade/dbg_stack-2.str:10
+msgid "A7 (stack)"
+msgstr ""
+
+#: glade/dbg_stack-2.str:11
+msgid "A6 (frame)"
+msgstr ""
+
+#: glade/dbg_vectors-2.str:7
+msgid "Add Vector Breakpoint"
+msgstr ""
+
+#: glade/dboxes-2.str:7
+msgid "Title"
+msgstr ""
+
+#: glade/dboxes-2.str:8
+msgid "*"
+msgstr ""
+
+#: glade/dboxes-2.str:9
+msgid "Name:"
+msgstr ""
+
+#: glade/device-2.str:3
+msgid "Communication Settings"
+msgstr ""
+
+#: glade/device-2.str:4
+msgid "_Auto-detect"
+msgstr ""
+
+#: glade/device-2.str:5
+msgid "Cable:"
+msgstr ""
+
+#: glade/device-2.str:6
+msgid "Port:"
+msgstr ""
+
+#: glade/device-2.str:7
+msgid "Calc:"
+msgstr ""
+
+#: glade/device-2.str:8
+msgid "Timeout:"
+msgstr ""
+
+#: glade/device-2.str:9
+msgid "Delay:"
+msgstr ""
+
+#: glade/device-2.str:10
+msgid "GrayLink"
+msgstr ""
+
+#: glade/device-2.str:11
+msgid "BlackLink"
+msgstr ""
+
+#: glade/device-2.str:12
+msgid "SilverLink"
+msgstr ""
+
+#: glade/device-2.str:13
+msgid "ParallelLink"
+msgstr ""
+
+#: glade/device-2.str:14
+msgid "VTi"
+msgstr ""
+
+#: glade/device-2.str:16
+msgid "virtual"
+msgstr ""
+
+#: glade/device-2.str:17 glade/device-2.str:23
+msgid "null"
+msgstr ""
+
+#: glade/device-2.str:19
+msgid "#1"
+msgstr ""
+
+#: glade/device-2.str:20
+msgid "#2"
+msgstr ""
+
+#: glade/device-2.str:21
+msgid "#3"
+msgstr ""
+
+#: glade/device-2.str:22
+msgid "#4"
+msgstr ""
+
+#: glade/device-2.str:24
+msgid "TI73"
+msgstr ""
+
+#: glade/device-2.str:25
+msgid "TI82"
+msgstr ""
+
+#: glade/device-2.str:26
+msgid "TI83"
+msgstr ""
+
+#: glade/device-2.str:27
+msgid "TI83+"
+msgstr ""
+
+#: glade/device-2.str:28
+msgid "TI84+"
+msgstr ""
+
+#: glade/device-2.str:29
+msgid "TI85"
+msgstr ""
+
+#: glade/device-2.str:30
+msgid "TI86"
+msgstr ""
+
+#: glade/device-2.str:31
+msgid "TI89"
+msgstr ""
+
+#: glade/device-2.str:32
+msgid "TI89 Titanium"
+msgstr ""
+
+#: glade/device-2.str:33 glade/infos-2.str:18
+msgid "TI92"
+msgstr ""
+
+#: glade/device-2.str:34
+msgid "TI92+"
+msgstr ""
+
+#: glade/device-2.str:35
+msgid "V200PLT"
+msgstr ""
+
+#: glade/device-2.str:36
+msgid "Settings"
+msgstr ""
+
+#: glade/device-2.str:37
+msgid "Have a problem ? Check out the log:"
+msgstr ""
+
+#: glade/infos-2.str:7
+msgid "Infos..."
+msgstr ""
+
+#: glade/infos-2.str:8
+msgid "Skin version:"
+msgstr ""
+
+#: glade/infos-2.str:9
+msgid "Skin name:"
+msgstr ""
+
+#: glade/infos-2.str:10
+msgid "Skin author:"
+msgstr ""
+
+#: glade/infos-2.str:11
+msgid "Version:"
+msgstr ""
+
+#: glade/infos-2.str:12
+msgid "RAM size:"
+msgstr ""
+
+#: glade/infos-2.str:13
+msgid "ROM size:"
+msgstr ""
+
+#: glade/infos-2.str:14
+msgid "ROM type:"
+msgstr ""
+
+#: glade/infos-2.str:15
+msgid "VTi/TiEmu"
+msgstr ""
+
+#: glade/infos-2.str:16
+msgid "Default TI-92"
+msgstr ""
+
+#: glade/infos-2.str:17
+msgid "Julien Blache"
+msgstr ""
+
+#: glade/infos-2.str:19
+msgid "1.11"
+msgstr ""
+
+#: glade/infos-2.str:20
+msgid "128KB"
+msgstr ""
+
+#: glade/infos-2.str:21
+msgid "2MB"
+msgstr ""
+
+#: glade/infos-2.str:22
+msgid "external ROM"
+msgstr ""
+
+#: glade/infos-2.str:23
+msgid "Calc type:"
+msgstr ""
+
+#: glade/infos-2.str:24
+msgid "Hardware:"
+msgstr ""
+
+#: glade/infos-2.str:25
+msgid "HW1"
+msgstr ""
+
+#: glade/log_link-2.str:7
+msgid "Link Log"
+msgstr ""
+
+#: glade/log_link-2.str:8
+msgid "Save"
+msgstr ""
+
+#: glade/log_link-2.str:10
+msgid "Clear"
+msgstr ""
+
+#: glade/log_link-2.str:11
+msgid "Close"
+msgstr ""
+
+#: glade/log_link-2.str:12
+msgid "_Send"
+msgstr ""
+
+#: glade/log_link-2.str:13
+msgid "_Receive"
+msgstr ""
+
+#: glade/log_link-2.str:14
+msgid "Buffer size: "
+msgstr ""
+
+#: glade/log_link-2.str:15
+msgid "KB"
+msgstr ""
+
+#: glade/pbars-2.str:7
+msgid "Title 1"
+msgstr ""
+
+#: glade/pbars-2.str:8
+msgid "Transfer status:"
+msgstr ""
+
+#: glade/pbars-2.str:9
+msgid "Rate: 0.00 Kb/s"
+msgstr ""
+
+#: glade/pbars-2.str:10
+msgid "Title 2"
+msgstr ""
+
+#: glade/pbars-2.str:11
+msgid "Message."
+msgstr ""
+
+#: glade/pbars-2.str:12
+msgid "Title 3"
+msgstr ""
+
+#: glade/pbars-2.str:13 glade/pbars-2.str:22
+msgid "Total transfer:"
+msgstr ""
+
+#: glade/pbars-2.str:14 glade/pbars-2.str:17 glade/pbars-2.str:23
+msgid "Current transfer:"
+msgstr ""
+
+#: glade/pbars-2.str:15 glade/pbars-2.str:20 glade/pbars-2.str:26
+msgid "Rate: 0.0 Kbytes/s"
+msgstr ""
+
+#: glade/pbars-2.str:16
+msgid "Title 4"
+msgstr ""
+
+#: glade/pbars-2.str:18 glade/pbars-2.str:24
+msgid "1/1: "
+msgstr ""
+
+#: glade/pbars-2.str:19 glade/pbars-2.str:25
+msgid "Text"
+msgstr ""
+
+#: glade/pbars-2.str:21
+msgid "Title 5"
+msgstr ""
+
+#: glade/popup-2.str:7
+msgid "Welcome to TiEmu 3"
+msgstr ""
+
+#: glade/popup-2.str:8
+msgid "TiEmu Menu"
+msgstr ""
+
+#: glade/popup-2.str:9
+msgid ""
+"Send the selected file to the emulator. This file can be of any type "
+"(single, group, backup, FLASH app or FLASH OS)."
+msgstr ""
+
+#: glade/popup-2.str:10
+msgid "_Send file to TiEmu..."
+msgstr ""
+
+#: glade/popup-2.str:11
+msgid "_Debug file with TiEmu..."
+msgstr ""
+
+#: glade/popup-2.str:12
+msgid "_Link"
+msgstr ""
+
+#: glade/popup-2.str:13
+msgid "Do the link cable setup."
+msgstr ""
+
+#: glade/popup-2.str:14
+msgid "_Settings..."
+msgstr ""
+
+#: glade/popup-2.str:15
+msgid "_Quick-send..."
+msgstr ""
+
+#: glade/popup-2.str:16
+msgid ""
+"Listen for files sent from TiEmu. Uncheck it if you are running program "
+"which use the linkport for sound."
+msgstr ""
+
+#: glade/popup-2.str:17
+msgid "_Listen for files"
+msgstr ""
+
+#: glade/popup-2.str:18
+msgid "_Emulate sound"
+msgstr ""
+
+#: glade/popup-2.str:19
+msgid "Configuration"
+msgstr ""
+
+#: glade/popup-2.str:20
+msgid "Save the actual configuration into a text file."
+msgstr ""
+
+#: glade/popup-2.str:21
+msgid "_Save config..."
+msgstr ""
+
+#: glade/popup-2.str:22
+msgid "Load the configuration previously saved."
+msgstr ""
+
+#: glade/popup-2.str:23
+msgid "_Load config..."
+msgstr ""
+
+#: glade/popup-2.str:24
+msgid "Calculator state"
+msgstr ""
+
+#: glade/popup-2.str:25
+msgid "Reload the previously saved state."
+msgstr ""
+
+#: glade/popup-2.str:26
+msgid "_Revert to saved state"
+msgstr ""
+
+#: glade/popup-2.str:27
+msgid "Load the calculator state from file."
+msgstr ""
+
+#: glade/popup-2.str:28
+msgid "_Load state image..."
+msgstr ""
+
+#: glade/popup-2.str:29
+msgid "Save the calculator state into a file (called state image)."
+msgstr ""
+
+#: glade/popup-2.str:30
+msgid "_Save state image..."
+msgstr ""
+
+#: glade/popup-2.str:31
+msgid "Do a 'save state image' and exits."
+msgstr ""
+
+#: glade/popup-2.str:32
+msgid "_Exit and save state"
+msgstr ""
+
+#: glade/popup-2.str:33
+msgid "Go into the debugger."
+msgstr ""
+
+#: glade/popup-2.str:34
+msgid "_Enter debugger..."
+msgstr ""
+
+#: glade/popup-2.str:35
+msgid "Reset the calculator."
+msgstr ""
+
+#: glade/popup-2.str:36
+msgid "_Reset calc"
+msgstr ""
+
+#: glade/popup-2.str:37
+msgid "Load a FLASH upgrade into the FLASH memory of the calculator."
+msgstr ""
+
+#: glade/popup-2.str:38
+msgid "_Upgrade calc"
+msgstr ""
+
+#: glade/popup-2.str:39
+msgid "Import and/or set an image to emulate."
+msgstr ""
+
+#: glade/popup-2.str:40
+msgid "Set R_OM (image/upgrade)"
+msgstr ""
+
+#: glade/popup-2.str:41
+msgid "Emulator options"
+msgstr ""
+
+#: glade/popup-2.str:42
+msgid ""
+"Run the calculator at its default speed (default) or at the maximum the "
+"computer can do."
+msgstr ""
+
+#: glade/popup-2.str:43
+msgid "_Restrict to actual speed"
+msgstr ""
+
+#: glade/popup-2.str:44
+msgid ""
+"Enable/disable hardware protection. Please note you will have to restart the "
+"emulator or select an image for changes to take effect."
+msgstr ""
+
+#: glade/popup-2.str:45
+msgid "H_W protection"
+msgstr ""
+
+#: glade/popup-2.str:46
+msgid "_High LCD update"
+msgstr ""
+
+#: glade/popup-2.str:47
+msgid "_Med LCD update"
+msgstr ""
+
+#: glade/popup-2.str:48
+msgid "L_ow LCD update"
+msgstr ""
+
+#: glade/popup-2.str:49
+msgid "_Normal view (x1)"
+msgstr ""
+
+#: glade/popup-2.str:50
+msgid "_Large view (x2)"
+msgstr ""
+
+#: glade/popup-2.str:51
+msgid "_Full screen"
+msgstr ""
+
+#: glade/popup-2.str:52
+msgid "_Custom view"
+msgstr ""
+
+#: glade/popup-2.str:53
+msgid "Skin for current calc"
+msgstr ""
+
+#: glade/popup-2.str:54
+msgid "No skin (just LCD)."
+msgstr ""
+
+#: glade/popup-2.str:55
+msgid "_None"
+msgstr ""
+
+#: glade/popup-2.str:56
+msgid "Returns to default skin."
+msgstr ""
+
+#: glade/popup-2.str:57
+msgid "_Default"
+msgstr ""
+
+#: glade/popup-2.str:58
+msgid "Choose a skin to use."
+msgstr ""
+
+#: glade/popup-2.str:59
+msgid "_Other..."
+msgstr ""
+
+#: glade/popup-2.str:60
+msgid "Screenshot"
+msgstr ""
+
+#: glade/popup-2.str:61
+msgid "Do a screenshot now!"
+msgstr ""
+
+#: glade/popup-2.str:62
+msgid "_Now!"
+msgstr ""
+
+#: glade/popup-2.str:63
+msgid "Set options for screenshot (image, type)."
+msgstr ""
+
+#: glade/popup-2.str:64
+msgid "_Options"
+msgstr ""
+
+#: glade/popup-2.str:65
+msgid "_Copy to clipboard"
+msgstr ""
+
+#: glade/popup-2.str:66
+msgid "Key Press"
+msgstr ""
+
+#: glade/popup-2.str:67
+msgid "Setup recording"
+msgstr ""
+
+#: glade/popup-2.str:68
+msgid "Record"
+msgstr ""
+
+#: glade/popup-2.str:69
+msgid "Setup playing"
+msgstr ""
+
+#: glade/popup-2.str:70
+msgid "Play"
+msgstr ""
+
+#: glade/popup-2.str:71
+msgid "Misc"
+msgstr ""
+
+#: glade/popup-2.str:72
+msgid "Open the TiEmu user's manual in a browser."
+msgstr ""
+
+#: glade/popup-2.str:73
+msgid "_User's Manual"
+msgstr ""
+
+#: glade/popup-2.str:74
+msgid "Open the Linux manpage (applicable to Windows, too)."
+msgstr ""
+
+#: glade/popup-2.str:75
+msgid "_Manpage"
+msgstr ""
+
+#: glade/popup-2.str:76
+msgid "_Bookmarks"
+msgstr ""
+
+#: glade/popup-2.str:77
+msgid "http://lpg.ticalc.org/prj_tiemu"
+msgstr ""
+
+#: glade/popup-2.str:79
+msgid "http://tigcc.ticalc.org"
+msgstr ""
+
+#: glade/popup-2.str:80
+msgid "TIGCC"
+msgstr ""
+
+#: glade/popup-2.str:81
+msgid "http://www.tilp.info"
+msgstr ""
+
+#: glade/popup-2.str:82
+msgid "TiLP"
+msgstr ""
+
+#: glade/popup-2.str:83
+msgid "http://education.ti.com"
+msgstr ""
+
+#: glade/popup-2.str:84
+msgid "TI Education"
+msgstr ""
+
+#: glade/popup-2.str:85
+msgid "http://www.ticalc.org"
+msgstr ""
+
+#: glade/popup-2.str:86
+msgid "ticalc.org"
+msgstr ""
+
+#: glade/popup-2.str:87
+msgid "How to report a bug or a problem."
+msgstr ""
+
+#: glade/popup-2.str:88
+msgid "Bu_g report"
+msgstr ""
+
+#: glade/popup-2.str:89
+msgid "Display the log of all changes."
+msgstr ""
+
+#: glade/popup-2.str:90
+msgid "_ChangeLog"
+msgstr ""
+
+#: glade/popup-2.str:91
+msgid "About TiEmu..."
+msgstr ""
+
+#: glade/popup-2.str:92
+msgid "_About..."
+msgstr ""
+
+#: glade/popup-2.str:93
+msgid "_Infos..."
+msgstr ""
+
+#: glade/popup-2.str:94
+msgid "Just exits."
+msgstr ""
+
+#: glade/popup-2.str:95
+msgid "E_xit without saving state"
+msgstr ""
+
+#: glade/quicksend-2.str:7
+msgid "Quick send"
+msgstr ""
+
+#: glade/quicksend-2.str:8
+msgid "_enable"
+msgstr ""
+
+#: glade/romversion-2.str:7
+msgid "Set ROM version"
+msgstr ""
+
+#: glade/scroptions-2.str:7
+msgid "Screen Options"
+msgstr ""
+
+#: glade/scroptions-2.str:8
+msgid "_JPEG"
+msgstr ""
+
+#: glade/scroptions-2.str:9
+msgid "_PNG"
+msgstr ""
+
+#: glade/scroptions-2.str:10
+msgid "_ICO"
+msgstr ""
+
+#: glade/scroptions-2.str:11
+msgid "_EPS"
+msgstr ""
+
+#: glade/scroptions-2.str:12
+msgid "PD_F"
+msgstr ""
+
+#: glade/scroptions-2.str:13
+msgid "_BMP"
+msgstr ""
+
+#: glade/scroptions-2.str:14
+msgid "Image format:"
+msgstr ""
+
+#: glade/scroptions-2.str:15
+msgid "Skips: "
+msgstr ""
+
+#: glade/scroptions-2.str:16
+msgid "Number of frames to capture"
+msgstr ""
+
+#: glade/scroptions-2.str:17
+msgid ""
+"Number of frames to skip between 2 captures. Beware: if you want to capture "
+"image every 4 frames, you need to set value to 3."
+msgstr ""
+
+#: glade/scroptions-2.str:18
+msgid "Shots: "
+msgstr ""
+
+#: glade/scroptions-2.str:19
+msgid "Burst capture:"
+msgstr ""
+
+#: glade/scroptions-2.str:20
+msgid "Select folder"
+msgstr ""
+
+#: glade/scroptions-2.str:21
+msgid "screenshot"
+msgstr ""
+
+#: glade/scroptions-2.str:22
+msgid "-000.jpg"
+msgstr ""
+
+#: glade/scroptions-2.str:23
+msgid "Folder & Filename:"
+msgstr ""
+
+#: glade/scroptions-2.str:24
+msgid "Black&_White"
+msgstr ""
+
+#: glade/scroptions-2.str:25
+msgid "Colo_r"
+msgstr ""
+
+#: glade/scroptions-2.str:26
+msgid "_LCD only"
+msgstr ""
+
+#: glade/scroptions-2.str:27
+msgid "_Calculator"
+msgstr ""
+
+#: glade/scroptions-2.str:28
+msgid "Image type:"
+msgstr ""
+
+#: glade/wizard-2.str:7 glade/wizard-2.str:17 glade/wizard-2.str:25
+#: glade/wizard-2.str:27
+msgid "TiEmu wizard"
+msgstr ""
+
+#: glade/wizard-2.str:8
+msgid "Welcome to TiEmu 3, the Linux/Win32 TI emulator."
+msgstr ""
+
+#: glade/wizard-2.str:9
+msgid ""
+"I want to use PedRom (GPL'ed replacement OS) \n"
+"shipped with TiEmu."
+msgstr ""
+
+#: glade/wizard-2.str:11
+msgid ""
+"You have downloaded a FLASH upgrade on the TI\n"
+"website."
+msgstr ""
+
+#: glade/wizard-2.str:13
+msgid "You already have a ROM dump."
+msgstr ""
+
+#: glade/wizard-2.str:14
+msgid ""
+"You want to use TiLP or another dumping program \n"
+"to get a ROM dump of your calculator ROM."
+msgstr ""
+
+#: glade/wizard-2.str:16
+msgid ""
+"Remind you that you can not distribute your ROM dump(s). They are "
+"copyrighted by Texas Instruments."
+msgstr ""
+
+#: glade/wizard-2.str:18
+msgid ""
+"TiEmu is now set  up and ready for use. Some tips on how to use the emulator:"
+msgstr ""
+
+#: glade/wizard-2.str:19
+msgid ""
+"* You have access to a popup menu by right-clicking in the emulator's window."
+msgstr ""
+
+#: glade/wizard-2.str:20
+msgid "* To use keys, use mouse or keyboard"
+msgstr ""
+
+#: glade/wizard-2.str:21
+msgid ""
+"* To change to a different calculator or ROM version, use an item of the ROM "
+"menu."
+msgstr ""
+
+#: glade/wizard-2.str:22
+msgid "* You can save the emulator state and config."
+msgstr ""
+
+#: glade/wizard-2.str:23
+msgid ""
+"* If your calculator screen is blank, use 'Ctrl' with '+/-' for adjusting "
+"contrast."
+msgstr ""
+
+#: glade/wizard-2.str:24
+msgid "Click the 'Finish' button to start TiEmu."
+msgstr ""
+
+#: glade/wizard-2.str:26
+msgid ""
+"If you want to get a ROM dump with TiLP, you will have to download it from: "
+"<http://tilp.info>Be sure to read the user's manual!"
+msgstr ""
+
+#: glade/wizard-2.str:28
+msgid ""
+"The FLASH upgrade you have selected is being to be converted into a TiEmu "
+"image. Please wait..."
+msgstr ""
+
+#: glade/wizard-2.str:29
+msgid "Note also that the converted image will not have a boot block."
+msgstr ""
diff --git a/sdk/dcop/build.sh b/sdk/dcop/build.sh
new file mode 100755
index 0000000..b73de63
--- /dev/null
+++ b/sdk/dcop/build.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+g++ -Os -s -fno-exceptions -I$QTDIR/include -I/usr/include/kde dcoptest.cpp tiemu_stub.cpp -L$QTDIR/lib -lqt-mt -L`kde-config --prefix`/lib`kde-config --libsuffix`/kde3 -lkdecore -lkio -o dcoptest
diff --git a/sdk/dcop/dcoptest.cpp b/sdk/dcop/dcoptest.cpp
new file mode 100755
index 0000000..530f610
--- /dev/null
+++ b/sdk/dcop/dcoptest.cpp
@@ -0,0 +1,75 @@
+/* TiEmu DCOP test client
+   Copyright (C) 2003-2006 Kevin Kofler <kevin.kofler at chello.at>
+
+   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  */
+
+#include "tiemu.h"
+#include <qregexp.h>
+#include <kapp.h>
+#include <kcmdlineargs.h>
+#include <dcopclient.h>
+#include <krun.h>
+#include <unistd.h>
+#include <cstdio>
+using namespace std;
+
+int main(int argc, char **argv)
+{
+  KCmdLineArgs::init(argc,argv,"dcoptest","dcoptest","","");
+  KApplication app;
+  DCOPClient &dcopclient=*(app.dcopClient());
+  TiEmuDCOP_stub *tiemuDCOP;
+  if (!dcopclient.attach())
+    {puts("DCOP error (#1).");return 1;}
+  QCStringList applist=dcopclient.registeredApplications();
+  QCString appname;
+  QCStringList::iterator it;
+  for (it = applist.begin(); it != applist.end(); ++it) {
+    if ((*it).contains(QRegExp("^tiemu-"))) {
+      appname = (*it);
+      break;
+    }
+  }
+  if (appname.isNull()) { // TiEmu not running
+    KRun::runCommand("tiemu");
+    do {
+      applist=dcopclient.registeredApplications();
+      for (it = applist.begin(); it != applist.end(); ++it) {
+        if ((*it).contains(QRegExp("^tiemu-"))) {
+          appname = (*it);
+          break;
+        }
+      }
+    } while (appname.isNull());
+  }
+  tiemuDCOP = new TiEmuDCOP_stub(appname,"TiEmuDCOP");
+  bool ready;
+  do {
+    ready=tiemuDCOP->ready_for_transfers();
+    if (!tiemuDCOP->ok())
+      {delete tiemuDCOP;dcopclient.detach();puts("DCOP error (#2).");return 2;}
+  } while (!ready);
+#if 0 // This shouldn't be needed with the new ready_for_transfers().
+  if (!tiemuDCOP->turn_calc_on() || !tiemuDCOP->ok())
+    {delete tiemuDCOP;dcopclient.detach();puts("DCOP error (#3).");return 3;}
+  sleep(3); // give the emulated calculator time to react
+#endif
+  if (!tiemuDCOP->execute_command(QString("2+3")) || !tiemuDCOP->ok())
+    {delete tiemuDCOP;dcopclient.detach();puts("DCOP error (#4).");return 4;}
+  delete tiemuDCOP;
+  if (!dcopclient.detach())
+    {puts("DCOP error (#5).");return 5;}
+  return 0;
+}
diff --git a/sdk/dcop/readme.txt b/sdk/dcop/readme.txt
new file mode 100644
index 0000000..11d16c2
--- /dev/null
+++ b/sdk/dcop/readme.txt
@@ -0,0 +1,18 @@
+This directory contains the stub object allowing you to easily make calls to
+TiEmu through the DCOP IPC interface. The files tiemu_stub.* have been generated
+from src/kde/dcop.h using dcopidl and dcopidl2cpp.
+
+In order to use TiEmu through DCOP:
+* compile and link tiemu_stub.cpp with your project
+* include "tiemu.h" into your C++ files which will be using TiEmu
+* create a TiEmuDCOP_stub object. The app parameter should be "tiemu_PID", where
+  PID is the PID of a running TiEmu process (you can use
+  DCOPClient::registeredApplications() to find it). The id parameter should be
+  "TiEmuDCOP".
+* You can now call any function in the TiEmu DCOP interface through your
+  TiEmuDCOP_stub object.
+
+For your convenience, sample code (dcoptest.cpp) is provided under the GPL.
+
+IMPORTANT: This is for *nix only. For Win32, please look at the OLE Automation
+           interface, as defined in the oleautsdk directory.
diff --git a/sdk/dcop/tiemu.h b/sdk/dcop/tiemu.h
new file mode 100644
index 0000000..37e9fe9
--- /dev/null
+++ b/sdk/dcop/tiemu.h
@@ -0,0 +1,14 @@
+#ifndef TIEMU_H__
+#define TIEMU_H__
+
+#include "tiemu_stub.h"
+
+typedef enum {
+    TIEMU_CALC_TI92 = 1,
+    TIEMU_CALC_TI89 = 2,
+    TIEMU_CALC_TI92p = 4,
+    TIEMU_CALC_V200 = 8,
+    TIEMU_CALC_TI89t = 16
+} TiEmuCalcModels;
+
+#endif
diff --git a/sdk/dcop/tiemu_stub.cpp b/sdk/dcop/tiemu_stub.cpp
new file mode 100644
index 0000000..cf9125e
--- /dev/null
+++ b/sdk/dcop/tiemu_stub.cpp
@@ -0,0 +1,316 @@
+/****************************************************************************
+**
+** DCOP Stub Implementation created by dcopidl2cpp from tiemu.kidl
+**
+** WARNING! All changes made in this file will be lost!
+**
+*****************************************************************************/
+
+#include "tiemu_stub.h"
+#include <dcopclient.h>
+
+#include <kdatastream.h>
+
+
+TiEmuDCOP_stub::TiEmuDCOP_stub( const QCString& app, const QCString& obj )
+  : DCOPStub( app, obj )
+{
+}
+
+TiEmuDCOP_stub::TiEmuDCOP_stub( DCOPClient* client, const QCString& app, const QCString& obj )
+  : DCOPStub( client, app, obj )
+{
+}
+
+TiEmuDCOP_stub::TiEmuDCOP_stub( const DCOPRef& ref )
+  : DCOPStub( ref )
+{
+}
+
+bool TiEmuDCOP_stub::image_loaded()
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    if ( dcopClient()->call( app(), obj(), "image_loaded()", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+int TiEmuDCOP_stub::emulated_calc_type()
+{
+    int result = 0;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    if ( dcopClient()->call( app(), obj(), "emulated_calc_type()", data, replyType, replyData ) ) {
+	if ( replyType == "int" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+int TiEmuDCOP_stub::emulated_hw_version()
+{
+    int result = 0;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    if ( dcopClient()->call( app(), obj(), "emulated_hw_version()", data, replyType, replyData ) ) {
+	if ( replyType == "int" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+QString TiEmuDCOP_stub::emulated_os_version()
+{
+    QString result;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    if ( dcopClient()->call( app(), obj(), "emulated_os_version()", data, replyType, replyData ) ) {
+	if ( replyType == "QString" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::ready_for_transfers()
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    if ( dcopClient()->call( app(), obj(), "ready_for_transfers()", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::send_file( QString arg0 )
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    QDataStream arg( data, IO_WriteOnly );
+    arg << arg0;
+    if ( dcopClient()->call( app(), obj(), "send_file(QString)", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::send_files( QStringList arg0 )
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    QDataStream arg( data, IO_WriteOnly );
+    arg << arg0;
+    if ( dcopClient()->call( app(), obj(), "send_files(QStringList)", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::debug_file( QString arg0 )
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    QDataStream arg( data, IO_WriteOnly );
+    arg << arg0;
+    if ( dcopClient()->call( app(), obj(), "debug_file(QString)", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::reset_calc( bool arg0 )
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    QDataStream arg( data, IO_WriteOnly );
+    arg << arg0;
+    if ( dcopClient()->call( app(), obj(), "reset_calc(bool)", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::execute_command( QString arg0 )
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    QDataStream arg( data, IO_WriteOnly );
+    arg << arg0;
+    if ( dcopClient()->call( app(), obj(), "execute_command(QString)", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::turn_calc_on()
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    if ( dcopClient()->call( app(), obj(), "turn_calc_on()", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+bool TiEmuDCOP_stub::enter_debugger()
+{
+    bool result = false;
+    if ( !dcopClient()  ) {
+	setStatus( CallFailed );
+	return result;
+    }
+    QByteArray data, replyData;
+    QCString replyType;
+    if ( dcopClient()->call( app(), obj(), "enter_debugger()", data, replyType, replyData ) ) {
+	if ( replyType == "bool" ) {
+	    QDataStream _reply_stream( replyData, IO_ReadOnly );
+	    _reply_stream >> result;
+	    setStatus( CallSucceeded );
+	} else {
+	    callFailed();
+	}
+    } else { 
+	callFailed();
+    }
+    return result;
+}
+
+
diff --git a/sdk/dcop/tiemu_stub.h b/sdk/dcop/tiemu_stub.h
new file mode 100644
index 0000000..30e3130
--- /dev/null
+++ b/sdk/dcop/tiemu_stub.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** DCOP Stub Definition created by dcopidl2cpp from tiemu.kidl
+**
+** WARNING! All changes made in this file will be lost!
+**
+*****************************************************************************/
+
+#ifndef __TIEMU_STUB__
+#define __TIEMU_STUB__
+
+#include <dcopstub.h>
+#include <qstringlist.h>
+#include <dcopobject.h>
+#include <qobject.h>
+
+
+class TiEmuDCOP_stub : virtual public DCOPStub
+{
+public:
+    TiEmuDCOP_stub( const QCString& app, const QCString& id );
+    TiEmuDCOP_stub( DCOPClient* client, const QCString& app, const QCString& id );
+    explicit TiEmuDCOP_stub( const DCOPRef& ref );
+    virtual bool image_loaded();
+    virtual int emulated_calc_type();
+    virtual int emulated_hw_version();
+    virtual QString emulated_os_version();
+    virtual bool ready_for_transfers();
+    virtual bool send_file( QString  );
+    virtual bool send_files( QStringList  );
+    virtual bool debug_file( QString  );
+    virtual bool reset_calc( bool  );
+    virtual bool execute_command( QString command );
+    virtual bool turn_calc_on();
+    virtual bool enter_debugger();
+protected:
+    TiEmuDCOP_stub() : DCOPStub( never_use ) {};
+};
+
+
+#endif
diff --git a/sdk/oleaut/build.sh b/sdk/oleaut/build.sh
new file mode 100755
index 0000000..0ba471b
--- /dev/null
+++ b/sdk/oleaut/build.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+i386-mingw32-gcc -Os -s -fno-exceptions oletest.c tiemuole.c -lole32 -loleaut32 -luuid -o oletest.exe
diff --git a/sdk/oleaut/oletest.c b/sdk/oleaut/oletest.c
new file mode 100755
index 0000000..40879e9
--- /dev/null
+++ b/sdk/oleaut/oletest.c
@@ -0,0 +1,94 @@
+/* TiEmu OLE test client
+   Copyright (C) 2003-2006 Kevin Kofler <kevin.kofler at chello.at>
+
+   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  */
+
+#include <stdio.h>
+#include <windows.h>
+#include "tiemuole.h"
+
+int main(void)
+{
+  IUnknown *iunk;
+  ITiEmuOLE *tiemuOLE;
+  VARIANT_BOOL ready;
+  BSTR command;
+
+  fprintf(stdout, "Initializing OLE...\n");
+  if (OleInitialize(0) != S_OK) {puts("OLE error. (#1)");return 1;}
+
+  fprintf(stdout, "Getting object...");
+  if (GetActiveObject(&CLSID_TiEmuOLE,NULL,&iunk) != S_OK || !iunk) 
+  {
+    // TiEmu not running
+    // Figure out the path of TiEmu and run it
+    char buffer[2049];
+    HKEY hKey;
+    DWORD type, size=2048;
+
+    if (RegOpenKeyEx(HKEY_CLASSES_ROOT,"CLSID\\{B2A17B13-9D6F-4DD4-A2A9-6FE06ADC1D33}\\LocalServer32",0, KEY_QUERY_VALUE,&hKey))
+      {OleUninitialize();puts("OLE error (#2).");return 2;}
+
+    if (RegQueryValueEx(hKey,NULL,NULL,&type,buffer,&size) || type != REG_SZ)
+      {RegCloseKey(hKey);OleUninitialize();puts("OLE error (#3).");return 3;}
+    buffer[2048]=0;
+
+    if (RegCloseKey(hKey))
+      {OleUninitialize();puts("OLE error (#4).");return 4;}
+
+    if ((int)ShellExecute(NULL,NULL,buffer,NULL,NULL,SW_SHOW)<=32)
+      {OleUninitialize();puts("OLE error (#5).");return 5;}
+
+    while (GetActiveObject(&CLSID_TiEmuOLE,NULL,&iunk) != S_OK || !iunk); // Wait for the object
+  }
+  fprintf(stdout, "Done !\n");
+
+  fprintf(stdout, "Querying interface...\n");
+  if (iunk->lpVtbl->QueryInterface(iunk,&IID_ITiEmuOLE,(void**)&tiemuOLE) != S_OK || !tiemuOLE)
+    {OleUninitialize();puts("OLE error (#6).");return 6;}
+
+  fprintf(stdout, "Waiting for ready... ");
+  do 
+  {
+    if (tiemuOLE->lpVtbl->ready_for_transfers(tiemuOLE,&ready) != S_OK)
+      {tiemuOLE->lpVtbl->Release(tiemuOLE);OleUninitialize();puts("OLE error (#7).");return 7;}
+  } while (!ready);
+  Sleep(10000); // give the emulated calculator time to react
+  fprintf(stdout, "Done !\n");
+
+  fprintf(stdout, "Turning calc on... ");
+  if (tiemuOLE->lpVtbl->turn_calc_on(tiemuOLE,&ready) != S_OK || !ready)
+    {tiemuOLE->lpVtbl->Release(tiemuOLE);OleUninitialize();puts("OLE error (#8).");return 8;}
+  Sleep(3000); // give the emulated calculator time to react
+  fprintf(stdout, "Done !\n");
+
+  fprintf(stdout, "Sending command... ");
+    command=SysAllocString(L"2+3");
+  if (!command)
+    {tiemuOLE->lpVtbl->Release(tiemuOLE);OleUninitialize();puts("OLE error (#9).");return 9;}
+
+  if (tiemuOLE->lpVtbl->execute_command(tiemuOLE,command,&ready) != S_OK || !ready)
+    {SysFreeString(command);tiemuOLE->lpVtbl->Release(tiemuOLE);
+     OleUninitialize();puts("OLE error (#10).");return 10;}
+  SysFreeString(command);
+  fprintf(stdout, "Done !\n");
+
+  fprintf(stdout, "Releasing...");
+  tiemuOLE->lpVtbl->Release(tiemuOLE);
+  OleUninitialize();
+  fprintf(stdout, "Done !\n");
+
+  return 0;
+}
diff --git a/sdk/oleaut/oletest.dsp b/sdk/oleaut/oletest.dsp
new file mode 100644
index 0000000..469ce7e
--- /dev/null
+++ b/sdk/oleaut/oletest.dsp
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="oletest" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=oletest - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "oletest.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "oletest.mak" CFG="oletest - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "oletest - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "oletest - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "oletest - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF  "$(CFG)" == "oletest - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "oletest - Win32 Release"
+# Name "oletest - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\oletest.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\tiemuole.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\tiemuole.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\readme.txt
+# End Source File
+# End Target
+# End Project
diff --git a/sdk/oleaut/oletest.dsw b/sdk/oleaut/oletest.dsw
new file mode 100644
index 0000000..d38390a
--- /dev/null
+++ b/sdk/oleaut/oletest.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "oletest"=.\oletest.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/sdk/oleaut/readme.txt b/sdk/oleaut/readme.txt
new file mode 100644
index 0000000..5fe1d3c
--- /dev/null
+++ b/sdk/oleaut/readme.txt
@@ -0,0 +1,22 @@
+This directory contains the header file and CLSID declarations allowing you to
+easily make calls to TiEmu through the OLE Automation IPC interface. The files
+tiemuole.c and tiemuole.h are copies of src/com_ole/oleaut.h and
+src/com_ole/oleaut_i.c, respectively, which have been generated from
+src/com_ole/oleaut.idl using widl or midl.
+
+In order to use TiEmu through OLE Automation:
+* compile and link tiemuole.c with your project
+* include "tiemuole.h" into your C or C++ files which will be using TiEmu
+* obtain a "TiEmu.TiEmuOLE" COM object through GetActiveObject. If this fails,
+  you have to run TiEmu manually (e.g. using ShellExecute).
+  WARNING: TiEmu currently does NOT provide a class factory. Therefore, you
+           can't create objects automatically. You have to run TiEmu if it isn't
+           running yet, and then use GetActiveObject.
+  The interface pointer should be an ITiEmuOLE *.
+* You can now call any function in the TiEmu OLE Automation interface through
+  your ITiEmuOLE * interface pointer.
+
+For your convenience, sample code (oletest.c) is provided under the GPL.
+
+IMPORTANT: This is for Win32 only. For *nix, please look at the DCOP interface,
+           as defined in the dcopsdk directory.
diff --git a/sdk/oleaut/test_vba.doc b/sdk/oleaut/test_vba.doc
new file mode 100644
index 0000000..b062e4a
Binary files /dev/null and b/sdk/oleaut/test_vba.doc differ
diff --git a/sdk/oleaut/tiemuole.c b/sdk/oleaut/tiemuole.c
new file mode 100644
index 0000000..47c7a2e
--- /dev/null
+++ b/sdk/oleaut/tiemuole.c
@@ -0,0 +1,19 @@
+/*** Autogenerated by WIDL 0.9.31 from oleaut.idl - Do not edit ***/
+
+#define INITGUID
+#include <rpc.h>
+#include <rpcndr.h>
+
+#include <initguid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DEFINE_GUID(IID_ITiEmuOLE, 0xe9373bd9, 0x7363, 0x427f, 0xa2,0xa6, 0x1e,0x8b,0xa9,0x1f,0xfb,0x3e);
+DEFINE_GUID(LIBID_TiEmuOLELib, 0x6140dc7c, 0x3d74, 0x41f9, 0xa7,0x87, 0x59,0x46,0x99,0x4a,0xa8,0xf2);
+DEFINE_GUID(CLSID_TiEmuOLE, 0xb2a17b13, 0x9d6f, 0x4dd4, 0xa2,0xa9, 0x6f,0xe0,0x6a,0xdc,0x1d,0x33);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/sdk/oleaut/tiemuole.h b/sdk/oleaut/tiemuole.h
new file mode 100644
index 0000000..4415849
--- /dev/null
+++ b/sdk/oleaut/tiemuole.h
@@ -0,0 +1,320 @@
+/*** Autogenerated by WIDL 0.9.31 from oleaut.idl - Do not edit ***/
+#include <rpc.h>
+#include <rpcndr.h>
+
+#ifndef __WIDL_OLEAUT_H
+#define __WIDL_OLEAUT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <oaidl.h>
+#include <ocidl.h>
+typedef enum __WIDL_oleaut_generated_name_00000000 {
+    TIEMU_CALC_TI92 = 1,
+    TIEMU_CALC_TI89 = 2,
+    TIEMU_CALC_TI92p = 4,
+    TIEMU_CALC_V200 = 8,
+    TIEMU_CALC_TI89t = 16
+} TiEmuCalcModels;
+#ifndef __ITiEmuOLE_FWD_DEFINED__
+#define __ITiEmuOLE_FWD_DEFINED__
+typedef interface ITiEmuOLE ITiEmuOLE;
+#endif
+
+/*****************************************************************************
+ * ITiEmuOLE interface
+ */
+#ifndef __ITiEmuOLE_INTERFACE_DEFINED__
+#define __ITiEmuOLE_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_ITiEmuOLE, 0xe9373bd9, 0x7363, 0x427f, 0xa2,0xa6, 0x1e,0x8b,0xa9,0x1f,0xfb,0x3e);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface ITiEmuOLE : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE image_loaded(
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE emulated_calc_type(
+        int* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE emulated_hw_version(
+        int* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE emulated_os_version(
+        BSTR* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE ready_for_transfers(
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE send_file(
+        BSTR filename,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE debug_file(
+        BSTR filename,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE reset_calc(
+        VARIANT_BOOL clearmem,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE execute_command(
+        BSTR command,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE turn_calc_on(
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE enter_debugger(
+        VARIANT_BOOL* ret) = 0;
+
+};
+#else
+typedef struct ITiEmuOLEVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        ITiEmuOLE* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        ITiEmuOLE* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        ITiEmuOLE* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        ITiEmuOLE* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        ITiEmuOLE* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        ITiEmuOLE* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        ITiEmuOLE* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** ITiEmuOLE methods ***/
+    HRESULT (STDMETHODCALLTYPE *image_loaded)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *emulated_calc_type)(
+        ITiEmuOLE* This,
+        int* ret);
+
+    HRESULT (STDMETHODCALLTYPE *emulated_hw_version)(
+        ITiEmuOLE* This,
+        int* ret);
+
+    HRESULT (STDMETHODCALLTYPE *emulated_os_version)(
+        ITiEmuOLE* This,
+        BSTR* ret);
+
+    HRESULT (STDMETHODCALLTYPE *ready_for_transfers)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *send_file)(
+        ITiEmuOLE* This,
+        BSTR filename,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *debug_file)(
+        ITiEmuOLE* This,
+        BSTR filename,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *reset_calc)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL clearmem,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *execute_command)(
+        ITiEmuOLE* This,
+        BSTR command,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *turn_calc_on)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *enter_debugger)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    END_INTERFACE
+} ITiEmuOLEVtbl;
+interface ITiEmuOLE {
+    CONST_VTBL ITiEmuOLEVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define ITiEmuOLE_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define ITiEmuOLE_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define ITiEmuOLE_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define ITiEmuOLE_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define ITiEmuOLE_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define ITiEmuOLE_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define ITiEmuOLE_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** ITiEmuOLE methods ***/
+#define ITiEmuOLE_image_loaded(p,a) (p)->lpVtbl->image_loaded(p,a)
+#define ITiEmuOLE_emulated_calc_type(p,a) (p)->lpVtbl->emulated_calc_type(p,a)
+#define ITiEmuOLE_emulated_hw_version(p,a) (p)->lpVtbl->emulated_hw_version(p,a)
+#define ITiEmuOLE_emulated_os_version(p,a) (p)->lpVtbl->emulated_os_version(p,a)
+#define ITiEmuOLE_ready_for_transfers(p,a) (p)->lpVtbl->ready_for_transfers(p,a)
+#define ITiEmuOLE_send_file(p,a,b) (p)->lpVtbl->send_file(p,a,b)
+#define ITiEmuOLE_debug_file(p,a,b) (p)->lpVtbl->debug_file(p,a,b)
+#define ITiEmuOLE_reset_calc(p,a,b) (p)->lpVtbl->reset_calc(p,a,b)
+#define ITiEmuOLE_execute_command(p,a,b) (p)->lpVtbl->execute_command(p,a,b)
+#define ITiEmuOLE_turn_calc_on(p,a) (p)->lpVtbl->turn_calc_on(p,a)
+#define ITiEmuOLE_enter_debugger(p,a) (p)->lpVtbl->enter_debugger(p,a)
+#endif
+
+#endif
+
+HRESULT CALLBACK ITiEmuOLE_image_loaded_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_image_loaded_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_emulated_calc_type_Proxy(
+    ITiEmuOLE* This,
+    int* ret);
+void __RPC_STUB ITiEmuOLE_emulated_calc_type_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_emulated_hw_version_Proxy(
+    ITiEmuOLE* This,
+    int* ret);
+void __RPC_STUB ITiEmuOLE_emulated_hw_version_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_emulated_os_version_Proxy(
+    ITiEmuOLE* This,
+    BSTR* ret);
+void __RPC_STUB ITiEmuOLE_emulated_os_version_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_ready_for_transfers_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_ready_for_transfers_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_send_file_Proxy(
+    ITiEmuOLE* This,
+    BSTR filename,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_send_file_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_debug_file_Proxy(
+    ITiEmuOLE* This,
+    BSTR filename,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_debug_file_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_reset_calc_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL clearmem,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_reset_calc_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_execute_command_Proxy(
+    ITiEmuOLE* This,
+    BSTR command,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_execute_command_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_turn_calc_on_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_turn_calc_on_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_enter_debugger_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_enter_debugger_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __ITiEmuOLE_INTERFACE_DEFINED__ */
+
+
+DEFINE_GUID(LIBID_TiEmuOLELib, 0x6140dc7c, 0x3d74, 0x41f9, 0xa7,0x87, 0x59,0x46,0x99,0x4a,0xa8,0xf2);
+
+/*****************************************************************************
+ * TiEmuOLE coclass
+ */
+
+DEFINE_GUID(CLSID_TiEmuOLE, 0xb2a17b13, 0x9d6f, 0x4dd4, 0xa2,0xa9, 0x6f,0xe0,0x6a,0xdc,0x1d,0x33);
+
+#ifndef __TiEmuOLE_FWD_DEFINED__
+#define __TiEmuOLE_FWD_DEFINED__
+typedef struct TiEmuOLE TiEmuOLE;
+#endif /* defined __TiEmuOLE_FWD_DEFINED__ */
+
+/* Begin additional prototypes for all interfaces */
+
+ULONG           __RPC_USER BSTR_UserSize     (ULONG *, ULONG, BSTR *);
+unsigned char * __RPC_USER BSTR_UserMarshal  (ULONG *, unsigned char *, BSTR *);
+unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *);
+void            __RPC_USER BSTR_UserFree     (ULONG *, BSTR *);
+
+/* End additional prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __WIDL_OLEAUT_H */
diff --git a/skins/Makefile.am b/skins/Makefile.am
new file mode 100644
index 0000000..7ec4d68
--- /dev/null
+++ b/skins/Makefile.am
@@ -0,0 +1,8 @@
+skinsdir = $(pkgdatadir)/skins
+dist_skins_DATA = *.skn *.map
+
+EXTRA_DIST = copy.bat
+
+uninstall:
+	rm -f $(pkgdatadir)/skins/*.skn
+	rm -f $(pkgdatadir)/skins/*.map
\ No newline at end of file
diff --git a/skins/Makefile.in b/skins/Makefile.in
new file mode 100644
index 0000000..a54be29
--- /dev/null
+++ b/skins/Makefile.in
@@ -0,0 +1,489 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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 = skins
+DIST_COMMON = README $(dist_skins_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(skinsdir)"
+dist_skinsDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_skins_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
+DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLADE_CFLAGS = @GLADE_CFLAGS@
+GLADE_LIBS = @GLADE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GROFF = @GROFF@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INCINTL = @INCINTL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_RPATH = @KDE_RPATH@
+LDFLAGS = @LDFLAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TICABLES_CFLAGS = @TICABLES_CFLAGS@
+TICABLES_LIBS = @TICABLES_LIBS@
+TICALCS_CFLAGS = @TICALCS_CFLAGS@
+TICALCS_LIBS = @TICALCS_LIBS@
+TICONV_CFLAGS = @TICONV_CFLAGS@
+TICONV_LIBS = @TICONV_LIBS@
+TIFILES_CFLAGS = @TIFILES_CFLAGS@
+TIFILES_LIBS = @TIFILES_LIBS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_NLS = @USE_NLS@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+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@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+dbus = @dbus@
+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@
+kde = @kde@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+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@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+skinsdir = $(pkgdatadir)/skins
+dist_skins_DATA = *.skn *.map
+EXTRA_DIST = copy.bat
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  skins/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  skins/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_skinsDATA: $(dist_skins_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(skinsdir)" || $(MKDIR_P) "$(DESTDIR)$(skinsdir)"
+	@list='$(dist_skins_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(dist_skinsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(skinsdir)/$$f'"; \
+	  $(dist_skinsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(skinsdir)/$$f"; \
+	done
+
+uninstall-dist_skinsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_skins_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(skinsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(skinsdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@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 $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(skinsdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_skinsDATA
+
+install-dvi: install-dvi-am
+
+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
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_skinsDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dist_skinsDATA \
+	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 maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-dist_skinsDATA
+
+
+uninstall:
+	rm -f $(pkgdatadir)/skins/*.skn
+	rm -f $(pkgdatadir)/skins/*.map
+# 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/skins/README b/skins/README
new file mode 100644
index 0000000..54b6976
--- /dev/null
+++ b/skins/README
@@ -0,0 +1,13 @@
+Skins (converted) from the Rusty Wagner's TI emulator:
+
+- ti89
+- ti92
+
+Skins (converted) from Jaime Fernando Meza Meza <jaimeza at hotmail.com>:
+
+- emuti89
+- emuti92plus
+
+Skins from Julien Blache:
+
+- v200plt
diff --git a/skins/copy.bat b/skins/copy.bat
new file mode 100644
index 0000000..07341a2
--- /dev/null
+++ b/skins/copy.bat
@@ -0,0 +1,5 @@
+mkdir c:\lpg\msvc\skins
+copy *.skn c:\lpg\msvc\skins\
+copy *.map c:\lpg\msvc\skins\
+
+del *.bak
diff --git a/skins/ipaq_89.skn b/skins/ipaq_89.skn
new file mode 100644
index 0000000..c3b925e
Binary files /dev/null and b/skins/ipaq_89.skn differ
diff --git a/skins/ipaq_92.skn b/skins/ipaq_92.skn
new file mode 100644
index 0000000..608a72f
Binary files /dev/null and b/skins/ipaq_92.skn differ
diff --git a/skins/ipaq_v200plt.skn b/skins/ipaq_v200plt.skn
new file mode 100644
index 0000000..1d4c318
Binary files /dev/null and b/skins/ipaq_v200plt.skn differ
diff --git a/skins/ti89.map b/skins/ti89.map
new file mode 100644
index 0000000..1ae5115
--- /dev/null
+++ b/skins/ti89.map
@@ -0,0 +1,111 @@
+Model: TI89t
+
+// English mapping (VTi-compatible)
+
+// Alphabetical
+PCKEY_A:TIKEY_EQUALS,TIKEY_ALPHA
+PCKEY_B:TIKEY_PALEFT,TIKEY_ALPHA
+PCKEY_C:TIKEY_PARIGHT,TIKEY_ALPHA
+PCKEY_D:TIKEY_COMMA,TIKEY_ALPHA
+PCKEY_E:TIKEY_DIVIDE,TIKEY_ALPHA
+PCKEY_F:TIKEY_PIPE,TIKEY_ALPHA
+PCKEY_G:TIKEY_7,TIKEY_ALPHA
+PCKEY_H:TIKEY_8,TIKEY_ALPHA
+PCKEY_I:TIKEY_9,TIKEY_ALPHA
+PCKEY_J:TIKEY_MULTIPLY,TIKEY_ALPHA
+PCKEY_K:TIKEY_EE,TIKEY_ALPHA
+PCKEY_L:TIKEY_4,TIKEY_ALPHA
+PCKEY_M:TIKEY_5,TIKEY_ALPHA
+PCKEY_N:TIKEY_6,TIKEY_ALPHA
+PCKEY_O:TIKEY_MINUS,TIKEY_ALPHA
+PCKEY_P:TIKEY_STORE,TIKEY_ALPHA
+PCKEY_Q:TIKEY_1,TIKEY_ALPHA
+PCKEY_R:TIKEY_2,TIKEY_ALPHA
+PCKEY_S:TIKEY_3,TIKEY_ALPHA
+PCKEY_T:TIKEY_T
+PCKEY_U:TIKEY_PLUS,TIKEY_ALPHA
+PCKEY_V:TIKEY_0,TIKEY_ALPHA
+PCKEY_W:TIKEY_PERIOD,TIKEY_ALPHA
+PCKEY_X:TIKEY_X
+PCKEY_Y:TIKEY_Y
+PCKEY_Z:TIKEY_Z
+
+// Numerical
+PCKEY_0:TIKEY_0
+PCKEY_1:TIKEY_1
+PCKEY_2:TIKEY_2
+PCKEY_3:TIKEY_3
+PCKEY_4:TIKEY_4
+PCKEY_5:TIKEY_5
+PCKEY_6:TIKEY_6
+PCKEY_7:TIKEY_7
+PCKEY_8:TIKEY_8
+PCKEY_9:TIKEY_9
+
+PCKEY_NUMPAD0:TIKEY_0
+PCKEY_NUMPAD1:TIKEY_1
+PCKEY_NUMPAD2:TIKEY_2
+PCKEY_NUMPAD3:TIKEY_3
+PCKEY_NUMPAD4:TIKEY_4
+PCKEY_NUMPAD5:TIKEY_5
+PCKEY_NUMPAD6:TIKEY_6
+PCKEY_NUMPAD7:TIKEY_7
+PCKEY_NUMPAD8:TIKEY_8
+PCKEY_NUMPAD9:TIKEY_9
+
+// Operations
+PCKEY_ADD:TIKEY_PLUS
+PCKEY_MULTIPLY:TIKEY_MULTIPLY
+PCKEY_DIVIDE:TIKEY_DIVIDE
+PCKEY_SUBTRACT:TIKEY_MINUS
+
+// Arrows
+PCKEY_UP:TIKEY_UP
+PCKEY_DOWN:TIKEY_DOWN
+PCKEY_RIGHT:TIKEY_RIGHT
+PCKEY_LEFT:TIKEY_LEFT
+
+// Functions
+PCKEY_F1:TIKEY_F1
+PCKEY_F2:TIKEY_F2
+PCKEY_F3:TIKEY_F3
+PCKEY_F4:TIKEY_F4
+PCKEY_F5:TIKEY_F5
+PCKEY_F6:TIKEY_CATALOG
+
+// Ctrl keys
+PCKEY_SHIFT_L:TIKEY_SHIFT
+PCKEY_SHIFT_R:TIKEY_SHIFT
+PCKEY_CONTROL_L:TIKEY_DIAMOND
+PCKEY_CONTROL_R:TIKEY_DIAMOND
+PCKEY_MENU:TIKEY_2ND
+PCKEY_CAPITAL:TIKEY_ALPHA
+
+PCKEY_RETURN:TIKEY_ENTER1
+PCKEY_ESCAPE:TIKEY_ESCAPE
+PCKEY_BACK:TIKEY_BACKSPACE
+
+// Others
+PCKEY_OEM_MINUS:TIKEY_NEGATE
+PCKEY_OEM_PLUS:TIKEY_EQUALS
+PCKEY_OEM_4:TIKEY_PALEFT
+PCKEY_OEM_6:TIKEY_PARIGHT
+PCKEY_OEM_COMMA:TIKEY_COMMA
+PCKEY_OEM_PERIOD:TIKEY_PERIOD
+PCKEY_DECIMAL:TIKEY_PERIOD
+PCKEY_OEM_2:TIKEY_DIVIDE
+PCKEY_SPACE:TIKEY_NEGATE,TIKEY_ALPHA
+		
+// Specific
+PCKEY_OEM_3:TIKEY_MODE
+PCKEY_OEM_5:TIKEY_PIPE
+PCKEY_F9:TIKEY_APPS
+PCKEY_TAB:TIKEY_STORE
+PCKEY_DELETE:TIKEY_CLEAR
+PCKEY_OEM_SCROLL:TIKEY_ON
+PCKEY_INSERT:TIKEY_EE
+PCKEY_PRIOR:TIKEY_POWER
+PCKEY_HOME:TIKEY_HOME
+
+// Linux
+PCKEY_SEPARATOR:TIKEY_ENTER1
\ No newline at end of file
diff --git a/skins/ti89.skn b/skins/ti89.skn
new file mode 100644
index 0000000..dafa09b
Binary files /dev/null and b/skins/ti89.skn differ
diff --git a/skins/ti89_fr.map b/skins/ti89_fr.map
new file mode 100644
index 0000000..a187cef
--- /dev/null
+++ b/skins/ti89_fr.map
@@ -0,0 +1,93 @@
+Model: TI92+
+
+// French mapping
+
+// Alphabetical
+PCKEY_A:TIKEY_EQUALS,TIKEY_ALPHA
+PCKEY_B:TIKEY_PALEFT,TIKEY_ALPHA
+PCKEY_C:TIKEY_PARIGHT,TIKEY_ALPHA
+PCKEY_D:TIKEY_COMMA,TIKEY_ALPHA
+PCKEY_E:TIKEY_DIVIDE,TIKEY_ALPHA
+PCKEY_F:TIKEY_PIPE,TIKEY_ALPHA
+PCKEY_G:TIKEY_7,TIKEY_ALPHA
+PCKEY_H:TIKEY_8,TIKEY_ALPHA
+PCKEY_I:TIKEY_9,TIKEY_ALPHA
+PCKEY_J:TIKEY_MULTIPLY,TIKEY_ALPHA
+PCKEY_K:TIKEY_EE,TIKEY_ALPHA
+PCKEY_L:TIKEY_4,TIKEY_ALPHA
+PCKEY_M:TIKEY_5,TIKEY_ALPHA
+PCKEY_N:TIKEY_6,TIKEY_ALPHA
+PCKEY_O:TIKEY_MINUS,TIKEY_ALPHA
+PCKEY_P:TIKEY_STORE,TIKEY_ALPHA
+PCKEY_Q:TIKEY_1,TIKEY_ALPHA
+PCKEY_R:TIKEY_2,TIKEY_ALPHA
+PCKEY_S:TIKEY_3,TIKEY_ALPHA
+PCKEY_T:TIKEY_T
+PCKEY_U:TIKEY_PLUS,TIKEY_ALPHA
+PCKEY_V:TIKEY_0,TIKEY_ALPHA
+PCKEY_W:TIKEY_PERIOD,TIKEY_ALPHA
+PCKEY_X:TIKEY_X
+PCKEY_Y:TIKEY_Y
+PCKEY_Z:TIKEY_Z
+
+// Numerical
+PCKEY_NUMPAD0:TIKEY_0
+PCKEY_NUMPAD1:TIKEY_1
+PCKEY_NUMPAD2:TIKEY_2
+PCKEY_NUMPAD3:TIKEY_3
+PCKEY_NUMPAD4:TIKEY_4
+PCKEY_NUMPAD5:TIKEY_5
+PCKEY_NUMPAD6:TIKEY_6
+PCKEY_NUMPAD7:TIKEY_7
+PCKEY_NUMPAD8:TIKEY_8
+PCKEY_NUMPAD9:TIKEY_9
+
+// Arrows
+PCKEY_UP:TIKEY_UP
+PCKEY_DOWN:TIKEY_DOWN
+PCKEY_RIGHT:TIKEY_RIGHT
+PCKEY_LEFT:TIKEY_LEFT
+
+// Functions
+PCKEY_F1:TIKEY_F1
+PCKEY_F2:TIKEY_F2
+PCKEY_F3:TIKEY_F3
+PCKEY_F4:TIKEY_F4
+PCKEY_F5:TIKEY_F5
+
+// Standard
+PCKEY_RETURN:TIKEY_ENTER1
+PCKEY_SHIFT_L:TIKEY_SHIFT
+PCKEY_SHIFT_R:TIKEY_SHIFT
+PCKEY_CONTROL_L:TIKEY_DIAMOND
+PCKEY_CONTROL_R:TIKEY_DIAMOND
+PCKEY_MENU:TIKEY_2ND
+PCKEY_CAPITAL:TIKEY_ALPHA
+
+PCKEY_SPACE:TIKEY_NEGATE,TIKEY_ALPHA
+PCKEY_ESCAPE:TIKEY_ESCAPE
+PCKEY_BACK:TIKEY_BACKSPACE
+PCKEY_5:TIKEY_PALEFT
+PCKEY_OEM_4:TIKEY_PARIGHT
+PCKEY_OEM_PERIOD:TIKEY_PERIOD
+PCKEY_DECIMAL:TIKEY_PERIOD
+PCKEY_OEM_COMMA:TIKEY_COMMA
+PCKEY_ADD:TIKEY_PLUS
+PCKEY_MULTIPLY:TIKEY_MULTIPLY
+PCKEY_DIVIDE:TIKEY_DIVIDE
+PCKEY_SUBTRACT:TIKEY_MINUS
+PCKEY_6:TIKEY_NEGATE
+PCKEY_8:TIKEY_PIPE
+PCKEY_OEM_PLUS:TIKEY_EQUALS
+		
+// Specific
+PCKEY_F6:TIKEY_CATALOG
+PCKEY_F9:TIKEY_APPS
+PCKEY_TAB:TIKEY_STORE
+PCKEY_NEXT:TIKEY_MODE
+PCKEY_PRIOR:TIKEY_EE
+PCKEY_DELETE:TIKEY_CLEAR
+PCKEY_OEM_SCROLL:TIKEY_ON
+
+// Linux
+PCKEY_SEPARATOR:TIKEY_ENTER1
diff --git a/skins/ti89t.skn b/skins/ti89t.skn
new file mode 100644
index 0000000..ffcf567
Binary files /dev/null and b/skins/ti89t.skn differ
diff --git a/skins/ti92.map b/skins/ti92.map
new file mode 100644
index 0000000..1a0072b
--- /dev/null
+++ b/skins/ti92.map
@@ -0,0 +1,116 @@
+Model: TI92
+
+// English mapping (VTi-compatible)
+
+// Alphabetical
+PCKEY_A:TIKEY_A
+PCKEY_B:TIKEY_B
+PCKEY_C:TIKEY_C
+PCKEY_D:TIKEY_D
+PCKEY_E:TIKEY_E
+PCKEY_F:TIKEY_F
+PCKEY_G:TIKEY_G
+PCKEY_H:TIKEY_H
+PCKEY_I:TIKEY_I
+PCKEY_J:TIKEY_J
+PCKEY_K:TIKEY_K
+PCKEY_L:TIKEY_L
+PCKEY_M:TIKEY_M
+PCKEY_N:TIKEY_N
+PCKEY_O:TIKEY_O
+PCKEY_P:TIKEY_P
+PCKEY_Q:TIKEY_Q
+PCKEY_R:TIKEY_R
+PCKEY_S:TIKEY_S
+PCKEY_T:TIKEY_T
+PCKEY_U:TIKEY_U
+PCKEY_V:TIKEY_V
+PCKEY_W:TIKEY_W
+PCKEY_X:TIKEY_X
+PCKEY_Y:TIKEY_Y
+PCKEY_Z:TIKEY_Z
+
+// Numerical
+PCKEY_0:TIKEY_0
+PCKEY_1:TIKEY_1
+PCKEY_2:TIKEY_2
+PCKEY_3:TIKEY_3
+PCKEY_4:TIKEY_4
+PCKEY_5:TIKEY_5
+PCKEY_6:TIKEY_6
+PCKEY_7:TIKEY_7
+PCKEY_8:TIKEY_8
+PCKEY_9:TIKEY_9
+
+PCKEY_NUMPAD0:TIKEY_0
+PCKEY_NUMPAD1:TIKEY_1
+PCKEY_NUMPAD2:TIKEY_2
+PCKEY_NUMPAD3:TIKEY_3
+PCKEY_NUMPAD4:TIKEY_4
+PCKEY_NUMPAD5:TIKEY_5
+PCKEY_NUMPAD6:TIKEY_6
+PCKEY_NUMPAD7:TIKEY_7
+PCKEY_NUMPAD8:TIKEY_8
+PCKEY_NUMPAD9:TIKEY_9
+
+// Operations
+PCKEY_ADD:TIKEY_PLUS
+PCKEY_MULTIPLY:TIKEY_MULTIPLY
+PCKEY_DIVIDE:TIKEY_DIVIDE
+PCKEY_SUBTRACT:TIKEY_MINUS
+
+// Arrows
+PCKEY_UP:TIKEY_UP
+PCKEY_DOWN:TIKEY_DOWN
+PCKEY_RIGHT:TIKEY_RIGHT
+PCKEY_LEFT:TIKEY_LEFT
+
+// Functions
+PCKEY_F1:TIKEY_F1
+PCKEY_F2:TIKEY_F2
+PCKEY_F3:TIKEY_F3
+PCKEY_F4:TIKEY_F4
+PCKEY_F5:TIKEY_F5
+PCKEY_F6:TIKEY_F6
+PCKEY_F7:TIKEY_F7
+PCKEY_F8:TIKEY_F8
+
+// Ctrl keys
+PCKEY_SHIFT_L:TIKEY_SHIFT
+PCKEY_SHIFT_R:TIKEY_SHIFT
+PCKEY_CONTROL_L:TIKEY_DIAMOND
+PCKEY_CONTROL_R:TIKEY_DIAMOND
+PCKEY_MENU:TIKEY_2ND
+PCKEY_CAPITAL:TIKEY_HAND
+
+PCKEY_RETURN:TIKEY_ENTER1
+PCKEY_ESCAPE:TIKEY_ESCAPE
+PCKEY_BACK:TIKEY_BACKSPACE
+
+// Others
+PCKEY_OEM_MINUS:TIKEY_NEGATE
+PCKEY_OEM_PLUS:TIKEY_EQUALS
+PCKEY_OEM_4:TIKEY_PALEFT
+PCKEY_OEM_6:TIKEY_PARIGHT
+PCKEY_OEM_COMMA:TIKEY_COMMA
+PCKEY_OEM_PERIOD:TIKEY_PERIOD
+PCKEY_DECIMAL:TIKEY_PERIOD
+PCKEY_OEM_2:TIKEY_DIVIDE
+PCKEY_SPACE:TIKEY_SPACE
+		
+// Specific
+PCKEY_OEM_3:TIKEY_MODE
+PCKEY_OEM_5:TIKEY_LN
+PCKEY_OEM_1:TIKEY_THETA
+PCKEY_F9:TIKEY_APPS
+PCKEY_TAB:TIKEY_STORE
+PCKEY_INSERT:TIKEY_SIN
+PCKEY_HOME:TIKEY_COS
+PCKEY_PRIOR:TIKEY_TAN
+PCKEY_DELETE:TIKEY_CLEAR
+PCKEY_OEM_SCROLL:TIKEY_ON
+PCKEY_END:TIKEY_ENTER2
+PCKEY_NEXT:TIKEY_POWER
+
+// Linux
+PCKEY_SEPARATOR:TIKEY_ENTER2
\ No newline at end of file
diff --git a/skins/ti92.skn b/skins/ti92.skn
new file mode 100644
index 0000000..5b55328
Binary files /dev/null and b/skins/ti92.skn differ
diff --git a/skins/ti92_fr.map b/skins/ti92_fr.map
new file mode 100644
index 0000000..dde721d
--- /dev/null
+++ b/skins/ti92_fr.map
@@ -0,0 +1,99 @@
+Model: TI92
+
+// French mapping
+
+// Alphabetical
+PCKEY_A:TIKEY_A
+PCKEY_B:TIKEY_B
+PCKEY_C:TIKEY_C
+PCKEY_D:TIKEY_D
+PCKEY_E:TIKEY_E
+PCKEY_F:TIKEY_F
+PCKEY_G:TIKEY_G
+PCKEY_H:TIKEY_H
+PCKEY_I:TIKEY_I
+PCKEY_J:TIKEY_J
+PCKEY_K:TIKEY_K
+PCKEY_L:TIKEY_L
+PCKEY_M:TIKEY_M
+PCKEY_N:TIKEY_N
+PCKEY_O:TIKEY_O
+PCKEY_P:TIKEY_P
+PCKEY_Q:TIKEY_Q
+PCKEY_R:TIKEY_R
+PCKEY_S:TIKEY_S
+PCKEY_T:TIKEY_T
+PCKEY_U:TIKEY_U
+PCKEY_V:TIKEY_V
+PCKEY_W:TIKEY_W
+PCKEY_X:TIKEY_X
+PCKEY_Y:TIKEY_Y
+PCKEY_Z:TIKEY_Z
+
+// Numerical
+PCKEY_NUMPAD0:TIKEY_0
+PCKEY_NUMPAD1:TIKEY_1
+PCKEY_NUMPAD2:TIKEY_2
+PCKEY_NUMPAD3:TIKEY_3
+PCKEY_NUMPAD4:TIKEY_4
+PCKEY_NUMPAD5:TIKEY_5
+PCKEY_NUMPAD6:TIKEY_6
+PCKEY_NUMPAD7:TIKEY_7
+PCKEY_NUMPAD8:TIKEY_8
+PCKEY_NUMPAD9:TIKEY_9
+
+// Arrows
+PCKEY_UP:TIKEY_UP
+PCKEY_DOWN:TIKEY_DOWN
+PCKEY_RIGHT:TIKEY_RIGHT
+PCKEY_LEFT:TIKEY_LEFT
+
+// Functions
+PCKEY_F1:TIKEY_F1
+PCKEY_F2:TIKEY_F2
+PCKEY_F3:TIKEY_F3
+PCKEY_F4:TIKEY_F4
+PCKEY_F5:TIKEY_F5
+PCKEY_F6:TIKEY_F6
+PCKEY_F7:TIKEY_F7
+PCKEY_F8:TIKEY_F8
+
+// Standard
+PCKEY_RETURN:TIKEY_ENTER1
+PCKEY_SHIFT_L:TIKEY_SHIFT
+PCKEY_SHIFT_R:TIKEY_SHIFT
+PCKEY_CONTROL_L:TIKEY_DIAMOND
+PCKEY_CONTROL_R:TIKEY_DIAMOND
+PCKEY_MENU:TIKEY_2ND
+
+PCKEY_SPACE:TIKEY_SPACE
+PCKEY_ESCAPE:TIKEY_ESCAPE
+PCKEY_BACK:TIKEY_BACKSPACE
+PCKEY_5:TIKEY_PALEFT
+PCKEY_OEM_4:TIKEY_PARIGHT
+PCKEY_DECIMAL:TIKEY_PERIOD
+PCKEY_OEM_COMMA:TIKEY_COMMA
+PCKEY_ADD:TIKEY_PLUS
+PCKEY_MULTIPLY:TIKEY_MULTIPLY
+PCKEY_DIVIDE:TIKEY_DIVIDE
+PCKEY_SUBTRACT:TIKEY_MINUS
+PCKEY_OEM_2:TIKEY_DIVIDE
+PCKEY_6:TIKEY_NEGATE
+PCKEY_OEM_PLUS:TIKEY_EQUALS
+		
+// Specific
+PCKEY_F9:TIKEY_APPS
+PCKEY_OEM_PERIOD:TIKEY_THETA
+PCKEY_TAB:TIKEY_STORE
+PCKEY_CAPITAL:TIKEY_HAND
+PCKEY_NEXT:TIKEY_MODE
+PCKEY_8:TIKEY_LN
+PCKEY_INSERT:TIKEY_SIN
+PCKEY_HOME:TIKEY_COS
+PCKEY_PRIOR:TIKEY_TAN
+PCKEY_DELETE:TIKEY_CLEAR
+PCKEY_OEM_SCROLL:TIKEY_ON
+PCKEY_SEPARATOR:TIKEY_ENTER2
+
+// For fun
+PCKEY_OEM102:TIKEY_0,TIKEY_2ND
\ No newline at end of file
diff --git a/skins/v200plt.skn b/skins/v200plt.skn
new file mode 100644
index 0000000..c295228
Binary files /dev/null and b/skins/v200plt.skn differ
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..c99a71e
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,390 @@
+## Process this file with autoconf to produce Makefile
+
+ at SET_MAKE@
+CC        = @CC@
+CPP       = @CPP@
+CXX       = @CXX@
+CFLAGS    = @CFLAGS@ @TICONV_CFLAGS@ @TICABLES_CFLAGS@ @TIFILES_CFLAGS@ @TICALCS_CFLAGS@ @GLIB_CFLAGS@ @GTK_CFLAGS@ @GLADE_CFLAGS@ @SDL_CFLAGS@ @INCINTL@
+LDFLAGS   = @LDFLAGS@ @TICONV_LIBS@ @TICABLES_LIBS@ @TIFILES_LIBS@ @TICALCS_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @GLADE_LIBS@ @LIBZ@ @SDL_LIBS@ $(extra_ldflags)
+CXXFLAGS  = @CXXFLAGS@ @TICABLES_CFLAGS@ @TIFILES_CFLAGS@ @TICALCS_CFLAGS@ @GLIB_CFLAGS@ @GTK_CFLAGS@ @GLADE_CFLAGS@
+MOC       = @MOC@
+DCOPIDL   = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+RC       ?= windres
+
+kde       = @kde@
+dbus      = @dbus@
+
+#DESTDIR   =
+
+ifneq (,$(findstring NO_GDB,$(CFLAGS)))
+ifneq (,$(findstring __IPAQ__,$(CFLAGS)))
+	LDFLAGS += @LIBINTL@
+else
+	LDFLAGS += @LTLIBINTL@
+endif
+endif
+
+ifneq (,$(findstring __WIN32__,$(CFLAGS)))
+	RESFILE = tiemu-rc.o
+	LDFLAGS += -lcomdlg32 -lole32 -loleaut32 -luuid -lstdc++
+	EXEEXT = .exe
+	win32_OBJ = ipc/com/oleaut.o ipc/com/oleaut_i.o ipc/com/registry.o
+else
+	RESFILE =
+	EXEEXT =
+endif
+
+INSTALL         = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA    = @INSTALL_DATA@
+prefix          = @prefix@
+exec_prefix     = @exec_prefix@
+bindir          = @bindir@
+libdir          = @libdir@
+sysconfdir      = @sysconfdir@
+
+.SUFFIXES: .o .c .cpp .h .m .i .S .rc .res
+.NOTPARALLEL:
+
+ifeq ($(kde), yes)
+kdeincludes = @all_includes@
+kdelibraries = @LIB_KDECORE@ @LIB_KDEUI@ @LIB_KIO@ @LIB_QT@ @KDE_LDFLAGS@ @QT_LDFLAGS@ @X_LDFLAGS@
+kde_OBJ = kde/kde.o kde/kde-private.o   ipc/dcop/dcop.o ipc/dcop/dcop-private.o ipc/dcop/dcop_skel.o
+kdeprivsources = kde/kde-private.cpp ipc/dcop/dcop-private.cpp ipc/dcop/dcop.kidl ipc/dcop/dcop_skel.cpp
+kde/kde-private.cpp: kde/kde-private.h
+	$(MOC) kde/kde-private.h -o kde/kde-private.cpp
+ipc/dcop/dcop-private.cpp: ipc/dcop/dcop.h
+	$(MOC) ipc/dcop/dcop.h -o ipc/dcop/dcop-private.cpp
+ipc/dcop/dcop.kidl: ipc/dcop/dcop.h
+	$(DCOPIDL) ipc/dcop/dcop.h > ipc/dcop/dcop.kidl
+ipc/dcop/dcop_skel.cpp: ipc/dcop/dcop.kidl
+	$(DCOPIDL2CPP) --no-stub ipc/dcop/dcop.kidl
+FINALLINKCC = $(CXX)
+else
+FINALLINKCC = $(CC)
+endif
+
+DEFS=@DEFS@ \
+	-DSHARE_DIR=\"${prefix}/share/tiemu\" \
+	-DLOCALEDIR=\"${prefix}/share/locale\"
+#	-DSHARE_DIR=\"$(pkgdatadir)\" \
+#	-DLOCALEDIR=\"$(datadir)/locale\"
+
+INCLUDES = \
+	-I at top_srcdir@ -I$(includedir) \
+	-DPREFIX=\"${prefix}\" -I. \
+	-I./core -I./core/uae -I./core/ti_hw -I./core/ti_sw -I./core/dbg \
+	-I./sound -I./gui -I./gui/calc -I./gui/debugger \
+	-I./ipc/dcop -I./ipc/dbus -I./ipc/com \
+	-I./kde \
+	-I./misc
+
+ifeq ($(dbus), yes)
+LDFLAGS += @DBUS_GLIB_LIBS@
+dbus_OBJ = ipc/dbus/dbus_ipc.o
+ipc/dbus/dbus_glue.h: ipc/dbus/dbus_ipc.xml
+	dbus-binding-tool --mode=glib-server --output=ipc/dbus/dbus_glue.h --prefix=tiemudbus ipc/dbus/dbus_ipc.xml
+ipc/dbus/dbus_ipc.o: ipc/dbus/dbus_ipc.c ipc/dbus/dbus_ipc.h ipc/dbus/dbus_glue.h
+	$(CC) $(INCLUDES) $(DEFS) -c $(CFLAGS) @DBUS_GLIB_CFLAGS@ ipc/dbus/dbus_ipc.c -o ipc/dbus/dbus_ipc.o
+endif
+
+# source files to build
+core_uae_OBJ = \
+	core/uae/cpuemu1.o core/uae/cpuemu2.o \
+	core/uae/cpuemu3.o core/uae/cpuemu4.o \
+	core/uae/cpuemu5.o core/uae/cpuemu6.o \
+	core/uae/cpuemu7.o core/uae/cpuemu8.o \
+	core/uae/cpudefs.o core/uae/cpustbl.o \
+	core/uae/readcpu.o core/uae/fpp.o \
+	core/uae/missing.o
+
+ifneq (,$(findstring NO_GDB,$(CFLAGS)))
+core_uae_xmalloc_OBJ = core/uae/xmalloc.o
+else
+core_uae_xmalloc_OBJ =
+endif
+
+core_tihw_OBJ = \
+	core/ti_hw/dbus.o	\
+	core/ti_hw/flash.o	\
+	core/ti_hw/gscales.o	\
+	core/ti_hw/hw.o 	\
+	core/ti_hw/hwprot.o	\
+	core/ti_hw/kbd.o 	\
+	core/ti_hw/m68k.o	\
+	core/ti_hw/mem.o 	\
+	core/ti_hw/mem89.o	\
+	core/ti_hw/mem89tm.o	\
+	core/ti_hw/mem92.o	\
+	core/ti_hw/mem92p.o	\
+	core/ti_hw/memv2.o	\
+	core/ti_hw/ports.o	\
+	core/ti_hw/rtc_hw3.o	\
+	core/ti_hw/tichars.o
+
+core_tisw_OBJ = \
+	core/ti_sw/er_codes.o \
+	core/ti_sw/handles.o	\
+	core/ti_sw/iodefs.o	\
+	core/ti_sw/mem_map.o	\
+	core/ti_sw/registers.o	\
+	core/ti_sw/romcalls.o	\
+	core/ti_sw/timem.o	\
+	core/ti_sw/vat.o
+
+core_OBJ = 			\
+	core/error.o 		\
+	core/engine.o		\
+	core/images.o 		\
+	core/interface.o	\
+	core/state.o		\
+	core/type2str.o		\
+	core/hwpm.o
+
+core_dbg_OBJ = \
+	core/dbg/bkpts.o	\
+	core/dbg/debug.o	\
+	core/dbg/disasm.o	\
+	core/dbg/fpudasm.o	\
+	core/dbg/gdbcall.o
+
+ifneq (,$(findstring NO_SOUND,$(CFLAGS)))
+sound_OBJ =
+else
+sound_OBJ = \
+	sound/audio.o \
+	sound/stream.o
+endif
+
+misc_OBJ = \
+	misc/cmdline.o 	\
+	misc/files.o 	\
+	misc/paths.o 	\
+	misc/logging.o	\
+	misc/rcfile.o 	\
+	misc/screenshot.o \
+	misc/tie_error.o 
+
+gui_calc_OBJ = \
+	gui/calc/calc.o		\
+	gui/calc/dnd.o		\
+	gui/calc/keymap.o	\
+	gui/calc/keyboard.o	\
+	gui/calc/keynames.o	\
+	gui/calc/keypress.o	\
+	gui/calc/popup.o	\
+	gui/calc/screen.o	\
+	gui/calc/skinkeys.o	\
+	gui/calc/skinops.o
+
+gui_debugger_OBJ = \
+	gui/debugger/dbg_all.o		\
+	gui/debugger/dbg_wnds.o		\
+	gui/debugger/dbg_dock.o		\
+	gui/debugger/dbg_bkpts.o	\
+	gui/debugger/dbg_bits.o		\
+	gui/debugger/dbg_cause.o	\
+	gui/debugger/dbg_code.o		\
+	gui/debugger/dbg_data.o		\
+	gui/debugger/dbg_entry.o	\
+	gui/debugger/dbg_heap.o		\
+	gui/debugger/dbg_iop.o		\
+	gui/debugger/dbg_mem.o		\
+	gui/debugger/dbg_pclog.o	\
+	gui/debugger/dbg_regs.o		\
+	gui/debugger/dbg_romcall.o	\
+	gui/debugger/dbg_stack.o	\
+	gui/debugger/dbg_vectors.o
+
+gui_logger_OBJ = \
+	gui/logger/log_link.o
+
+gui_OBJ = \
+	gui/about.o							\
+	gui/device.o							\
+	gui/dboxes.o							\
+	gui/filesel.o							\
+	gui/fs_misc.o							\
+	gui/infos.o							\
+	gui/main.o							\
+	gui/manpage.o							\
+	gui/pbars.o							\
+	gui/quicksend.o					\
+	gui/refresh.o							\
+	gui/release.o							\
+	gui/romversion.o						\
+	gui/scroptions.o						\
+	gui/splash.o							\
+	gui/support.o 							\
+	gui/tsource.o 							\
+	gui/wizard.o
+
+core_gdb_DEP = \
+	gdb/gdb/libgdb.ldflags \
+	gdb/sim/m68k/libsim.a \
+	gdb/bfd/libbfd.a \
+	gdb/readline/libreadline.a \
+	gdb/opcodes/libopcodes.a  \
+	gdb/libiberty/libiberty.a
+
+ifneq (,$(findstring NO_GDB,$(CFLAGS)))
+libgdb_A =
+else
+libgdb_A = gdb/gdb/libgdb.a
+endif
+
+tiemu_OBJ = core/uae/newcpu.o \
+	$(core_uae_OBJ) $(core_uae_xmalloc_OBJ) \
+	$(core_OBJ) $(core_tihw_OBJ) $(core_tisw_OBJ) \
+	$(core_dbg_OBJ) \
+	$(sound_OBJ) \
+	$(misc_OBJ) \
+	$(gui_OBJ) $(gui_calc_OBJ) $(gui_debugger_OBJ) $(gui_logger_OBJ) \
+	$(kde_OBJ) $(dbus_OBJ) $(win32_OBJ) \
+	$(libgdb_A)
+
+#rules:
+all: uae gdbtk tiemu$(EXEEXT)
+
+uae:
+	cd core/uae && $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" gen
+	cd core/uae && $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all
+
+gdbtk:
+ifeq (,$(findstring NO_GDB,$(CFLAGS)))
+	cd gdb && $(MAKE)
+endif
+
+ifneq (,$(findstring __WIN32__,$(CFLAGS)))
+ifneq (,$(findstring NO_GDB,$(CFLAGS)))
+tiemu.exe: $(tiemu_OBJ) $(RESFILE)
+else
+tiemu.exe: $(tiemu_OBJ) $(core_gdb_DEP) $(RESFILE)
+endif
+else
+ifneq (,$(findstring NO_GDB,$(CFLAGS)))
+tiemu: $(tiemu_OBJ)
+else
+tiemu: $(tiemu_OBJ) $(core_gdb_DEP)
+endif
+endif
+ifneq (,$(findstring NO_GDB,$(CFLAGS)))
+ifneq (,$(findstring __IPAQ__,$(CFLAGS)))
+	$(FINALLINKCC) $(uae_OBJ) $(tiemu_OBJ) -o tiemu \
+	$(LDFLAGS) $(CFLAGS) $(kdelibraries) \
+	-Wl,--rpath,"$(prefix)/lib"
+else
+	../libtool --mode=link $(FINALLINKCC) $(uae_OBJ) $(tiemu_OBJ) $(RESFILE) \
+	-o tiemu$(EXEEXT) $(LDFLAGS) $(CFLAGS) $(kdelibraries)
+endif
+else
+# Force static linking for TCL-related stuff on OS X.
+ifneq (,$(findstring __MACOSX__,$(CFLAGS)))
+	sed <gdb/gdb/libgdb.ldflags >gdb/gdb/libgdb.ldflags.tmp -e 's,-L\([^ ]*\) -l\(tcl[0-9.]*\),\1/lib\2.a,g' -e 's,-L\([^ ]*\) -l\(tk[0-9.]*\),\1/lib\2.a,g' -e 's,-L\([^ ]*\) -l\(itcl[0-9.]*\),\1/lib\2.a,g' -e 's,-L\([^ ]*\) -l\(itk[0-9.]*\),\1/lib\2.a,g'
+	mv -f gdb/gdb/libgdb.ldflags.tmp gdb/gdb/libgdb.ldflags
+endif
+ifneq (,$(findstring __IPAQ__,$(CFLAGS)))
+	$(FINALLINKCC) $(uae_OBJ) $(tiemu_OBJ) -o tiemu \
+    `sed <gdb/gdb/libgdb.ldflags 's,^\.\./,gdb/,;s, \.\./, gdb/,g;s, \./\.\./, gdb/,g'` \
+	$(LDFLAGS) $(CFLAGS) $(kdelibraries) \
+	-Wl,--rpath,"$(prefix)/lib"
+else
+	../libtool --mode=link $(FINALLINKCC) $(uae_OBJ) $(tiemu_OBJ) $(RESFILE) \
+    `sed <gdb/gdb/libgdb.ldflags 's,^\.\./,gdb/,;s, \.\./, gdb/,g;s, \./\.\./, gdb/,g'` \
+	-o tiemu$(EXEEXT) $(LDFLAGS) $(CFLAGS) $(kdelibraries)
+endif
+endif
+
+.c.o:
+	$(CC) $(INCLUDES) $(DEFS) -c $(CFLAGS) $< -o $@
+	#../libtool --mode=compile $(CC) $(INCLUDES) $(DEFS) \
+	#-c $(CFLAGS) $< -o $@
+
+.cpp.o:
+	$(CXX) $(INCLUDES) $(DEFS) -c $(CXXFLAGS) $(kdeincludes) $< -o $@
+	#../libtool --mode=compile $(CC) $(INCLUDES) $(DEFS) \
+	#-c $(CFLAGS) $< -o $@
+
+tiemu-rc.o: ../build/mingw/tiemu.rc
+	cd ../build/mingw && $(RC) tiemu.rc ../../src/tiemu-rc.o
+
+clean:
+	@cd core/uae && $(MAKE) clean
+ifeq (,$(findstring NO_GDB,$(CFLAGS)))
+	@cd gdb && $(MAKE) -k clean || :
+endif
+	@rm -f $(tiemu_OBJ) tiemu tiemu.exe tiemu-rc.o $(kdeprivsources)
+
+distclean: clean
+	@cd core/uae && $(MAKE) distclean
+ifeq (,$(findstring NO_GDB,$(CFLAGS)))
+	@cd gdb && $(MAKE) -k distclean || :
+endif
+	@rm -Rf .libs
+
+distdir: clean
+ifneq (,$(findstring NO_GDB,$(CFLAGS)))
+	cp -rl core kde ipc gui misc sound ../@PACKAGE at -@VERSION@/src
+else
+	cp -rl core kde ipc gui misc sound \
+	gdb cleangdbsources.sh	../tiemu- at VERSION@/src
+endif
+	find ../tiemu- at VERSION@/src -name .svn -exec rm -rf "{}" \\; 2>/dev/null
+
+dos2unix:
+	dos2unix
+	lowercase
+	uppercase
+
+install: tiemu$(EXEEXT)
+	@$(INSTALL) -d $(DESTDIR)${prefix}/bin
+	$(INSTALL) -m755 tiemu$(EXEEXT) $(DESTDIR)${prefix}/bin/
+ifneq (,$(findstring __WIN32__,$(CFLAGS)))
+	$(INSTALL) -m755 ipc/com/tiemups.dll $(DESTDIR)${prefix}/bin/
+	$(INSTALL) -m755 ipc/com/oleaut.tlb $(DESTDIR)${prefix}/bin/tiemu.tlb
+endif
+ifeq (,$(findstring NO_GDB,$(CFLAGS)))
+	cd gdb/tcl && $(MAKE) install INSTALL_ROOT="$(DESTDIR)"
+	cd gdb/tk && $(MAKE) install INSTALL_ROOT="$(DESTDIR)"
+	cd gdb/itcl && $(MAKE) install DESTDIR="$(DESTDIR)"
+	cd gdb/libgui && $(MAKE) install DESTDIR="$(DESTDIR)"
+	cd gdb/gdb && $(MAKE) install-gdbtk DESTDIR="$(DESTDIR)"
+endif
+
+install-without-tcl-tk: tiemu$(EXEEXT)
+	@$(INSTALL) -d $(DESTDIR)$(prefix)/bin
+	$(INSTALL) -m755 tiemu$(EXEEXT) $(DESTDIR)${prefix}/bin/
+ifneq (,$(findstring __WIN32__,$(CFLAGS)))
+	$(INSTALL) -m755 ipc/com/tiemups.dll $(DESTDIR)${prefix}/bin/
+	$(INSTALL) -m755 ipc/com/oleaut.tlb $(DESTDIR)${prefix}/bin/tiemu.tlb
+endif
+ifeq (,$(findstring NO_GDB,$(CFLAGS)))
+	cd gdb/itcl && $(MAKE) install DESTDIR="$(DESTDIR)"
+	cd gdb/libgui && $(MAKE) install DESTDIR="$(DESTDIR)"
+	cd gdb/gdb && $(MAKE) install-gdbtk DESTDIR="$(DESTDIR)"
+endif
+
+install-without-tcl-tk-itcl: tiemu$(EXEEXT)
+	@$(INSTALL) -d $(DESTDIR)$(prefix)/bin
+	$(INSTALL) -m755 tiemu$(EXEEXT) $(DESTDIR)${prefix}/bin/
+ifneq (,$(findstring __WIN32__,$(CFLAGS)))
+	$(INSTALL) -m755 ipc/com/tiemups.dll $(DESTDIR)${prefix}/bin/
+	$(INSTALL) -m755 ipc/com/oleaut.tlb $(DESTDIR)${prefix}/bin/tiemu.tlb
+endif
+ifeq (,$(findstring NO_GDB,$(CFLAGS)))
+	cd gdb/libgui && $(MAKE) install DESTDIR="$(DESTDIR)"
+	cd gdb/gdb && $(MAKE) install-gdbtk DESTDIR="$(DESTDIR)"
+endif
+
+regsvr:
+ifeq ($(OSTYPE),msys)
+	$(DESTDIR)${prefix}/bin/tiemu -RegServer
+	regsvr32 //s $(DESTDIR)${prefix}/bin/tiemups.dll
+else
+	echo "Error: This target is for native MSYS compilations only!"
+	exit 1
+endif
+
+uninstall:
+	rm -f ${prefix}/bin/tiemu$(EXEEXT)
diff --git a/src/core/dbg/bkpts.c b/src/core/dbg/bkpts.c
new file mode 100644
index 0000000..6d010a3
--- /dev/null
+++ b/src/core/dbg/bkpts.c
@@ -0,0 +1,760 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: bkpts.c 2770 2008-03-16 17:42:13Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Breakpoints management
+	Note: addresses are 24 bits but arguments are 32 bits. The MSB is used to store
+	extra informations and save speed for comparison.
+	Searching does not take into account the MSB (24 bits).
+*/
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#include "intl.h"
+#include "ti68k_int.h"
+#include "ti68k_err.h"
+#include "dbg_bkpts.h"
+#include "handles.h"
+
+/* Add */
+
+int ti68k_bkpt_add_address(uint32_t address)
+{
+    bkpts.code = g_list_append(bkpts.code, GINT_TO_POINTER(address));
+	return g_list_length(bkpts.code) - 1;
+}
+
+int ti68k_bkpt_add_access(uint32_t address, int mode) 
+{
+    if((mode & BK_READ) && (mode & BK_BYTE))
+        bkpts.mem_rb = g_list_append(bkpts.mem_rb, GINT_TO_POINTER(address));
+    else if((mode & BK_READ) && (mode & BK_WORD))
+		bkpts.mem_rw = g_list_append(bkpts.mem_rw, GINT_TO_POINTER(address));
+    else if((mode & BK_READ) && (mode & BK_LONG))
+		bkpts.mem_rl = g_list_append(bkpts.mem_rl, GINT_TO_POINTER(address));
+    
+	if((mode & BK_WRITE) && (mode & BK_BYTE))
+		bkpts.mem_wb = g_list_append(bkpts.mem_wb, GINT_TO_POINTER(address));
+    else if((mode & BK_WRITE) && (mode & BK_WORD))
+		bkpts.mem_ww = g_list_append(bkpts.mem_ww, GINT_TO_POINTER(address));
+    else if((mode & BK_WRITE) && (mode & BK_LONG))
+		bkpts.mem_wl = g_list_append(bkpts.mem_wl, GINT_TO_POINTER(address));
+
+	return -1;
+}
+
+int ti68k_bkpt_add_range(uint32_t addressMin, uint32_t addressMax, int mode) 
+{
+    if(mode & BK_READ) 
+    {
+        ADDR_RANGE *s = g_malloc(sizeof(ADDR_RANGE));
+
+		s->val1 = addressMin;
+		s->val2 = addressMax;
+
+        bkpts.mem_rng_r = g_list_append(bkpts.mem_rng_r, s);
+		//return g_list_length(bkpts.mem_rng_r) - 1;
+    }
+
+    if(mode & BK_WRITE) 
+    {
+        ADDR_RANGE *s = g_malloc(sizeof(ADDR_RANGE));
+
+		s->val1 = addressMin;
+		s->val2 = addressMax;
+
+        bkpts.mem_rng_w = g_list_append(bkpts.mem_rng_w, s);
+		//return g_list_length(bkpts.mem_rng_w) - 1;
+    }
+
+	return g_list_length(bkpts.mem_rng_r) - 1;
+}
+
+int ti68k_bkpt_add_exception(uint32_t number) 
+{
+    bkpts.exception = g_list_append(bkpts.exception, GINT_TO_POINTER(number));
+	return g_list_length(bkpts.exception)-1;
+}
+
+static int ti68k_bkpt_add_pgmentry_offset(uint16_t handle, uint16_t offset)
+{
+    bkpts.pgmentry = g_list_append(bkpts.pgmentry, GINT_TO_POINTER(((uint32_t)handle << 16) + (uint32_t)offset));
+	return g_list_length(bkpts.pgmentry)-1;
+}
+
+static uint16_t compute_pgmentry_offset(uint16_t handle)
+{
+	uint32_t ptr = heap_deref(handle);
+	uint16_t fsize = mem_rd_word(ptr);
+	unsigned char tag = mem_rd_byte(ptr + fsize + 1);
+	switch (tag)
+	{
+		case 0xF3: /* ASM_TAG: nostub or kernel program */
+			if (mem_rd_long(ptr+6) == 0x36386B50) /* kernel program */
+				return mem_rd_word(ptr+14) + 2; /* offset to _main */
+			else /* nostub program (or kernel library, but it makes no sense to
+			        put a program entry breakpoint on a library) */
+				return 2;
+
+		case 0xDC: /* FUNC_TAG: Fargo or TI-BASIC program */
+			if (mem_rd_word(ptr+2) == 0x0032 && mem_rd_long(ptr+4) == 0x45584520
+			    && mem_rd_long(ptr+8) == 0x4150504C) /* Fargo II program */
+			{
+				uint16_t export_table_offset = mem_rd_word(ptr+20);
+				return mem_rd_word(ptr+export_table_offset+2); /* offset to _main */
+			}
+			else if (mem_rd_long(ptr+2) == 0x00503130) /* Fargo I program */
+				return mem_rd_word(ptr+16) + 2; /* offset to _main */
+			else /* Fargo library or TI-BASIC, it makes no sense to put a
+			        program entry breakpoint here... */
+				return 2;
+
+		default: /* unknown file, we should give some kind of error here... */
+			return 2;
+	}
+}
+
+int ti68k_bkpt_add_pgmentry(uint16_t handle) 
+{
+    return ti68k_bkpt_add_pgmentry_offset(handle, compute_pgmentry_offset(handle));
+}
+
+int ti68k_bkpt_add_bits(uint32_t address, uint8_t checks, uint8_t states)
+{
+	ADDR_BIT *s = g_malloc(sizeof(ADDR_BIT));
+
+	s->addr = address;
+	s->checks = checks;
+	s->states = states;
+	bkpts.bits = g_list_append(bkpts.bits, s);
+
+	return g_list_length(bkpts.bits) - 1;
+}
+
+/* Delete */
+
+static gint compare_func(gconstpointer a, gconstpointer b)
+{
+    ADDR_RANGE *sa = (ADDR_RANGE *)a;
+    ADDR_RANGE *sb = (ADDR_RANGE *)b;
+
+    return !((BKPT_ADDR(sa->val1) == BKPT_ADDR(sb->val1)) && 
+			 (BKPT_ADDR(sa->val2) == BKPT_ADDR(sb->val2)));
+}
+
+static gint compare_func2(gconstpointer a, gconstpointer b)
+{
+	uint32_t aa = GPOINTER_TO_INT(a);
+	uint32_t bb = GPOINTER_TO_INT(b);
+
+	return !(BKPT_ADDR(aa) == BKPT_ADDR(bb));
+}
+
+static gint compare_func3(gconstpointer a, gconstpointer b)
+{
+	uint32_t aa = GPOINTER_TO_INT(a);
+	uint32_t bb = GPOINTER_TO_INT(b);
+
+	return !(BKPT_ADDR(aa)>>16 == BKPT_ADDR(bb)>>16);
+}
+
+static gint compare_func4(gconstpointer a, gconstpointer b)
+{
+    ADDR_BIT *sa = (ADDR_BIT *)a;
+    ADDR_BIT *sb = (ADDR_BIT *)b;
+
+    return !(BKPT_ADDR(sa->addr) == BKPT_ADDR(sb->addr));
+}
+
+int ti68k_bkpt_del_address(uint32_t address) 
+{
+	GList *elt = g_list_find_custom(bkpts.code, GINT_TO_POINTER(address), compare_func2);
+
+	if(elt != NULL)
+		bkpts.code = g_list_delete_link(bkpts.code, elt);
+	else
+		return -1;
+
+	return 0;
+}
+
+int ti68k_bkpt_del_access(uint32_t address, int mode) 
+{
+    if((mode & BK_READ) && (mode & BK_BYTE))
+	{
+		GList *elt = g_list_find_custom(bkpts.mem_rb, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			bkpts.mem_rb = g_list_delete_link(bkpts.mem_rb, elt);
+		else
+			return -1;
+	}
+    if((mode & BK_READ) && (mode & BK_WORD))
+    {
+		GList *elt = g_list_find_custom(bkpts.mem_rw, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			bkpts.mem_rw = g_list_delete_link(bkpts.mem_rw, elt);
+		else
+			return -1;
+	}
+    if((mode & BK_READ) && (mode & BK_LONG))
+    {
+		GList *elt = g_list_find_custom(bkpts.mem_rl, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			bkpts.mem_rl = g_list_delete_link(bkpts.mem_rl, elt);
+		else
+			return -1;
+	}
+    if((mode & BK_WRITE) && (mode & BK_BYTE))
+    {
+		GList *elt = g_list_find_custom(bkpts.mem_wb, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			bkpts.mem_wb = g_list_delete_link(bkpts.mem_wb, elt);
+		else
+			return -1;
+	}
+    if((mode & BK_WRITE) && (mode & BK_WORD))
+    {
+		GList *elt = g_list_find_custom(bkpts.mem_ww, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			bkpts.mem_ww = g_list_delete_link(bkpts.mem_ww, elt);
+		else
+			return -1;
+	}
+    if((mode & BK_WRITE) && (mode & BK_LONG))
+    {
+		GList *elt = g_list_find_custom(bkpts.mem_wl, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			bkpts.mem_wl = g_list_delete_link(bkpts.mem_wl, elt);
+		else
+			return -1;
+	}
+
+	return 0;
+}
+
+int ti68k_bkpt_del_range(uint32_t min, uint32_t max, int mode) 
+{
+    ADDR_RANGE s;
+    GList *elt = NULL;
+
+    s.val1 = min;
+    s.val2 = max;
+
+    if (mode & BK_READ) 
+    {       
+        elt = g_list_find_custom(bkpts.mem_rng_r, &s, compare_func);       
+        if(elt != NULL)
+			bkpts.mem_rng_r = g_list_delete_link(bkpts.mem_rng_r, elt);
+		else
+			return -1;
+    }
+    
+	if (mode & BK_WRITE) 
+    {   
+        elt = g_list_find_custom(bkpts.mem_rng_w, &s, compare_func);       
+        if(elt != NULL)
+			bkpts.mem_rng_w = g_list_delete_link(bkpts.mem_rng_w, elt);
+		else
+			return -1;
+    }
+
+	return 0;
+}
+
+int ti68k_bkpt_del_exception(uint32_t number) 
+{
+	GList *elt = g_list_find_custom(bkpts.exception, GINT_TO_POINTER(number), compare_func2);
+    if(elt != NULL)
+		bkpts.exception = g_list_delete_link(bkpts.exception, elt);
+	else
+		return -1;
+
+	return 0;
+}
+
+int ti68k_bkpt_del_pgmentry(uint16_t handle) 
+{
+	GList *elt = g_list_find_custom(bkpts.pgmentry, GINT_TO_POINTER((uint32_t)handle << 16), compare_func3);
+    if(elt != NULL)
+		bkpts.pgmentry = g_list_delete_link(bkpts.pgmentry, elt);
+	else
+		return -1;
+
+	return 0;
+}
+
+int ti68k_bkpt_del_bits(uint32_t address)
+{
+	ADDR_BIT s;
+    GList *elt = NULL;
+
+    s.addr = address;
+	elt = g_list_find_custom(bkpts.bits, &s, compare_func4);       
+    if(elt != NULL)
+		bkpts.bits = g_list_delete_link(bkpts.bits, elt);
+	else
+		return -1;
+
+	return 0;
+}
+
+/* Set */
+
+int ti68k_bkpt_set_address(uint32_t address, uint32_t new_address)
+{
+	GList *elt = g_list_find_custom(bkpts.code, GINT_TO_POINTER(address), compare_func2);
+	if(elt != NULL)
+		elt->data = GINT_TO_POINTER(new_address);
+	else
+		return -1;
+
+	return 0;
+}
+
+int ti68k_bkpt_set_access(uint32_t address, int mode, uint32_t new_address)
+{
+	if((mode & BK_READ) && (mode & BK_BYTE))
+	{
+		GList *elt = g_list_find_custom(bkpts.mem_rb, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			elt->data = GINT_TO_POINTER(new_address);
+		else
+			return -1;
+	}
+    else if((mode & BK_READ) && (mode & BK_WORD))
+	{
+		GList *elt = g_list_find_custom(bkpts.mem_rw, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			elt->data = GINT_TO_POINTER(new_address);
+		else
+			return -1;
+	}
+    else if((mode & BK_READ) && (mode & BK_LONG))
+	{
+		GList *elt = g_list_find_custom(bkpts.mem_rl, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			elt->data = GINT_TO_POINTER(new_address);
+		else
+			return -1;
+	}
+    
+	if((mode & BK_WRITE) && (mode & BK_BYTE))
+	{
+		GList *elt = g_list_find_custom(bkpts.mem_wb, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			elt->data = GINT_TO_POINTER(new_address);
+		else
+			return -1;
+	}
+    else if((mode & BK_WRITE) && (mode & BK_WORD))
+	{
+		GList *elt = g_list_find_custom(bkpts.mem_ww, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			elt->data = GINT_TO_POINTER(new_address);
+		else
+			return -1;
+	}
+    else if((mode & BK_WRITE) && (mode & BK_LONG))
+	{
+		GList *elt = g_list_find_custom(bkpts.mem_wl, GINT_TO_POINTER(address), compare_func2);
+		if(elt != NULL)
+			elt->data = GINT_TO_POINTER(new_address);
+		else
+			return -1;
+	}
+
+	return 0;
+}
+
+int ti68k_bkpt_set_range(uint32_t min, uint32_t max, int mode, uint32_t new_min, uint32_t new_max)
+{
+	ADDR_RANGE s, *p;
+    GList *elt = NULL;
+
+    s.val1 = min;
+    s.val2 = max;
+
+    if (mode & BK_READ) 
+    {       
+        elt = g_list_find_custom(bkpts.mem_rng_r, &s, compare_func);       
+		if(elt == NULL)
+			return -1;
+
+        p = elt->data;
+		p->val1 = new_min;
+		p->val2 = new_max;
+    }
+    
+	if (mode & BK_WRITE) 
+    {   
+        elt = g_list_find_custom(bkpts.mem_rng_w, &s, compare_func);       
+		if(elt == NULL)
+			return -1;
+
+        p = elt->data;
+		p->val1 = new_min;
+		p->val2 = new_max;
+    }
+
+	return 0;
+}
+
+int ti68k_bkpt_set_exception(uint32_t number, uint32_t new_n)
+{
+	GList *elt = g_list_find_custom(bkpts.exception, GINT_TO_POINTER(number), compare_func2);
+	if(elt != NULL)
+		elt->data = GINT_TO_POINTER(new_n);
+	else
+		return -1;
+
+	return 0;
+}
+
+int ti68k_bkpt_set_pgmentry(uint16_t handle, uint16_t new_h)
+{
+	GList *elt = g_list_find_custom(bkpts.pgmentry, 
+					GINT_TO_POINTER((uint32_t)handle << 16), 
+					compare_func2);
+	if(elt != NULL)
+		elt->data = GINT_TO_POINTER(((uint32_t)new_h << 16) + (uint32_t)compute_pgmentry_offset(new_h));
+	else
+		return -1;
+
+	return 0;
+}
+
+int ti68k_bkpt_set_bits(uint32_t old_address, uint32_t address)
+{
+	ADDR_BIT s, *p;
+    GList *elt = NULL;
+
+    s.addr = old_address;
+    elt = g_list_find_custom(bkpts.bits, &s, compare_func4);       
+	if(elt == NULL)
+		return -1;
+
+    p = elt->data;
+	p->addr = address;
+
+	return 0;
+}
+
+/* Get */
+
+int ti68k_bkpt_get_address(unsigned int id, uint32_t *address)
+{
+	if((id+1) > g_list_length(bkpts.code))
+		return -1;
+
+	*address = GPOINTER_TO_INT(g_list_nth(bkpts.code, id)->data);
+	return 0;
+}
+
+int ti68k_bkpt_get_access(unsigned int id, uint32_t *address, int mode)
+{
+	if((mode & BK_READ) && (mode & BK_BYTE))
+	{
+		if((id+1) > g_list_length(bkpts.mem_rb)) return -1;
+		*address = GPOINTER_TO_INT(g_list_nth(bkpts.mem_rb, id)->data);
+	}
+    else if((mode & BK_READ) && (mode & BK_WORD))
+	{
+		if((id+1) > g_list_length(bkpts.mem_rw)) return -1;
+		*address = GPOINTER_TO_INT(g_list_nth(bkpts.mem_rw, id)->data);
+	}
+    else if((mode & BK_READ) && (mode & BK_LONG))
+	{
+		if((id+1) > g_list_length(bkpts.mem_rl)) return -1;
+		*address = GPOINTER_TO_INT(g_list_nth(bkpts.mem_rl, id)->data);
+	}
+    
+	if((mode & BK_WRITE) && (mode & BK_BYTE))
+	{
+		if((id+1) > g_list_length(bkpts.mem_wb)) return -1;
+		*address = GPOINTER_TO_INT(g_list_nth(bkpts.mem_wb, id)->data);
+	}
+    else if((mode & BK_WRITE) && (mode & BK_WORD))
+	{
+		if((id+1) > g_list_length(bkpts.mem_wl)) return -1;
+		*address = GPOINTER_TO_INT(g_list_nth(bkpts.mem_ww, id)->data);
+	}
+    else if((mode & BK_WRITE) && (mode & BK_LONG))
+	{
+		if((id+1) > g_list_length(bkpts.mem_wl)) return -1;
+		*address = GPOINTER_TO_INT(g_list_nth(bkpts.mem_wl, id)->data);
+	}
+
+	return 0;
+}
+
+int ti68k_bkpt_get_range(unsigned int id, uint32_t *min, uint32_t *max, int mode)
+{
+	if(mode & BK_READ) 
+    {
+        ADDR_RANGE *s;
+		
+		if((id+1) > g_list_length(bkpts.mem_rng_r)) return -1;
+		s = g_list_nth(bkpts.mem_rng_r, id)->data;
+
+		*min = s->val1;
+		*max = s->val2;
+    }
+
+    if(mode & BK_WRITE) 
+    {
+        ADDR_RANGE *s;
+		
+		if((id+1) > g_list_length(bkpts.mem_rng_w)) return -1;
+		s = g_list_nth(bkpts.mem_rng_w, id)->data;
+
+		*min = s->val1;
+		*max = s->val2;
+    }
+
+	return 0;
+}
+
+int ti68k_bkpt_get_exception(unsigned int id, uint32_t *number)
+{
+	if((id+1) > g_list_length(bkpts.exception))
+		return -1;
+
+	*number = GPOINTER_TO_INT(g_list_nth(bkpts.exception, id)->data);
+	return 0;
+}
+
+int ti68k_bkpt_get_pgmentry(unsigned int id, uint16_t *handle)
+{
+	if((id+1) > g_list_length(bkpts.pgmentry))
+		return -1;
+	
+	*handle = GPOINTER_TO_INT(g_list_nth(bkpts.pgmentry, id)->data) >> 16;
+	return 0;
+}
+
+int ti68k_bkpt_get_pgmentry_offset(unsigned int id, uint16_t *handle, uint16_t *offset)
+{
+	uint32_t data;
+	
+	if((id+1) > g_list_length(bkpts.pgmentry))
+		return -1;
+	
+	data = GPOINTER_TO_INT(g_list_nth(bkpts.pgmentry, id)->data);
+	*handle = (uint16_t)(data >> 16);
+	*offset = (uint16_t)(data & 0xffff);
+	return 0;
+}
+
+int ti68k_bkpt_get_bits(unsigned int id, uint32_t *address, uint8_t *checks, uint8_t *states)
+{
+	ADDR_BIT *s;
+		
+	if((id+1) > g_list_length(bkpts.bits)) return -1;
+	s = g_list_nth(bkpts.bits, id)->data;
+
+	*address = s->addr;
+	*checks = s->checks;
+	*states = s->states;
+
+	return 0;
+}
+
+/* Clear */
+
+void ti68k_bkpt_clear_address(void)
+{
+	g_list_free(bkpts.code);
+	bkpts.code = NULL;
+}
+
+void ti68k_bkpt_clear_access(void)
+{
+	g_list_free(bkpts.mem_rb);
+	bkpts.mem_rb = NULL;
+	g_list_free(bkpts.mem_rw);
+	bkpts.mem_rw = NULL;
+	g_list_free(bkpts.mem_rl);
+	bkpts.mem_rl = NULL;
+
+	g_list_free(bkpts.mem_wb);
+	bkpts.mem_wb = NULL;
+	g_list_free(bkpts.mem_ww);
+	bkpts.mem_ww = NULL;
+	g_list_free(bkpts.mem_wl);
+	bkpts.mem_wl = NULL;
+}
+
+void ti68k_bkpt_clear_range(void)
+{
+	GList *l;
+
+	l = bkpts.mem_rng_r;
+	while(l != NULL)
+	{
+        g_free(l->data);		
+		l = g_list_next(l);
+	}			
+	g_list_free(bkpts.mem_rng_r);
+	bkpts.mem_rng_r = NULL;
+
+	l = bkpts.mem_rng_w;
+	while(l != NULL)
+	{
+	    g_free(l->data);		
+		l = g_list_next(l);
+	}			
+	g_list_free(bkpts.mem_rng_w);
+	bkpts.mem_rng_w = NULL;
+}
+
+void ti68k_bkpt_clear_exception(void)
+{
+	g_list_free(bkpts.exception);
+	bkpts.exception = NULL;
+}
+
+void ti68k_bkpt_clear_pgmentry(void)
+{
+	g_list_free(bkpts.pgmentry);
+	bkpts.pgmentry = NULL;
+}
+
+void ti68k_bkpt_clear_bits(void)
+{
+	GList *l;
+
+	for(l = bkpts.bits; l; l = g_list_next(l))
+        g_free(l->data);		
+
+	g_list_free(bkpts.bits);
+	bkpts.bits = NULL;
+}
+
+/* Others */
+
+void ti68k_bkpt_set_cause(int type, int mode, int id)
+{
+    bkpts.type = type;
+    bkpts.mode = mode;
+    bkpts.id = id;
+}
+
+void ti68k_bkpt_get_cause(int *type, int *mode, int *id) 
+{
+    *type = bkpts.type;
+    *mode = bkpts.mode;
+    *id   = bkpts.id;
+}
+
+void ti68k_bkpt_clear_all(void)
+{
+    ti68k_bkpt_clear_address();
+	ti68k_bkpt_clear_access();
+	ti68k_bkpt_clear_range();
+    ti68k_bkpt_clear_exception();
+	ti68k_bkpt_clear_pgmentry();
+	ti68k_bkpt_clear_bits();
+
+	ti68k_bkpt_set_cause(0, 0, 0);	
+}
+
+ 
+enum target_hw_bp_type
+{
+  hw_write   = 0, /* Common (write) HW watchpoint */
+  hw_read    = 1, /* Read    HW watchpoint */
+  hw_access  = 2, /* Access (read or write) HW watchpoint */
+};
+
+/* Wrappers for GDB use */
+int ti68k_bkpt_add_watchpoint(uint32_t address, uint32_t len, int type)
+{
+  switch (type)
+  {
+    case hw_write:
+      ti68k_bkpt_add_range(address, address + len - 1, BK_WRITE);
+      dbgbkpts_refresh_window();
+      return 0;
+    case hw_read:
+      ti68k_bkpt_add_range(address, address + len - 1, BK_READ);
+      dbgbkpts_refresh_window();
+      return 0;
+    case hw_access:
+      ti68k_bkpt_add_range(address, address + len - 1, BK_READ | BK_WRITE);
+      dbgbkpts_refresh_window();
+      return 0;
+    default:
+      dbgbkpts_refresh_window();
+      return 1;
+  }
+}
+
+int ti68k_bkpt_del_watchpoint(uint32_t address, uint32_t len, int type)
+{
+  switch (type)
+  {
+    case hw_write:
+      ti68k_bkpt_del_range(address, address + len - 1, BK_WRITE);
+      dbgbkpts_refresh_window();
+      return 0;
+    case hw_read:
+      ti68k_bkpt_del_range(address, address + len - 1, BK_READ);
+      dbgbkpts_refresh_window();
+      return 0;
+    case hw_access:
+      ti68k_bkpt_del_range(address, address + len - 1, BK_READ | BK_WRITE);
+      dbgbkpts_refresh_window();
+      return 0;
+    default:
+      return 1;
+  }
+}
+
+int ti68k_bkpt_stopped_by_watchpoint(void)
+{
+  return (bkpts.type == BK_TYPE_ACCESS) || (bkpts.type == BK_TYPE_RANGE);
+}
+
+int ti68k_bkpt_stopped_data_address(uint32_t *address)
+{
+  uint32_t max;
+
+  switch(bkpts.type)
+  {
+    case BK_TYPE_ACCESS:
+      ti68k_bkpt_get_access(bkpts.id, address, bkpts.mode);
+      return 1;
+    case BK_TYPE_RANGE:
+      ti68k_bkpt_get_range(bkpts.id, address, &max, bkpts.mode);
+      return 1;
+    default:
+      return 0;
+  }
+}
diff --git a/src/core/dbg/bkpts.h b/src/core/dbg/bkpts.h
new file mode 100644
index 0000000..7819727
--- /dev/null
+++ b/src/core/dbg/bkpts.h
@@ -0,0 +1,160 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: bkpts.h 2689 2007-11-30 03:58:24Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  Breakpoint definitions
+*/
+
+#ifndef __TI68K_BKPTS__
+#define __TI68K_BKPTS__
+
+#include <stdint.h>
+
+/* 
+	Macros: addresses are 24-bits. We use the MSB to encode 
+	bkpt state (enabled/disabled or temporary). This is more 
+	efficient than complex structures.
+*/
+
+#define BKPT_MASK			0xc0000000
+
+#define BKPT_ADDR(addr)		((addr) & ~BKPT_MASK)
+#define BKPT_INFO(addr)		((addr) & BKPT_MASK)
+
+#define BKPT_ENABLE_BIT		31
+#define BKPT_TMP_BIT		30
+
+#define BKPT_ENABLE_MASK		(1 << BKPT_ENABLE_BIT)
+#define BKPT_ENABLE(addr)		((addr) &= ~BKPT_ENABLE_MASK)
+#define BKPT_DISABLE(addr)		((addr) |= BKPT_ENABLE_MASK)
+#define BKPT_IS_ENABLED(addr)	(!((addr) & BKPT_ENABLE_MASK))
+
+#define BKPT_TMP_MASK		(1 << BKPT_TMP_BIT)
+#define BKPT_NOTMP(addr)	((addr) &= ~BKPT_TMP_MASK)
+#define BKPT_TMP(addr)		((addr) |= BKPT_TMPSK)
+#define BKPT_IS_TMP(addr)	(((addr) & BKPT_TMP_MASK))
+
+/* Types */
+
+typedef struct
+{
+  uint32_t	 val1;
+  uint32_t 	 val2;
+} ADDR_RANGE;
+
+typedef struct
+{
+	uint32_t	addr;
+	uint8_t		checks;
+	uint8_t		states;
+} ADDR_BIT;
+
+/* Constants */
+
+// Breakpoints mode (ti68k_bkpt_set_[access|access_range])
+#define BK_BYTE     1
+#define BK_WORD     2
+#define BK_LONG     4
+#define BK_READ     16
+#define BK_WRITE    32
+#define BK_RW      (BK_READ | BK_WRITE)
+
+#define BK_READ_BYTE	(BK_READ | BK_BYTE)
+#define BK_READ_WORD 	(BK_READ | BK_WORD)
+#define BK_READ_LONG 	(BK_READ | BK_LONG)
+
+#define BK_WRITE_BYTE 	(BK_WRITE | BK_BYTE)
+#define BK_WRITE_WORD 	(BK_WRITE | BK_WORD)
+#define BK_WRITE_LONG 	(BK_WRITE | BK_LONG)
+
+#define BK_RW_BYTE		(BK_READ_BYTE | BK_WRITE_BYTE)
+#define BK_RW_WORD		(BK_READ_WORD | BK_WRITE_WORD)
+#define BK_RW_LONG		(BK_READ_LONG | BK_WRITE_LONG)
+
+// Breakpoints type 
+typedef enum {
+    BK_TYPE_ACCESS=1, BK_TYPE_RANGE, 
+    BK_TYPE_CODE, BK_TYPE_EXCEPTION,
+    BK_TYPE_PGMENTRY, BK_TYPE_PROTECT,
+	BK_TYPE_BIT,
+} Ti68kBkptType;
+
+// Breakpoints cause (ti68k_bkpt_get_cause())
+typedef enum {
+    BK_CAUSE_ACCESS=1, BK_CAUSE_RANGE, BK_CAUSE_ADDRESS,
+    BK_CAUSE_EXCEPTION, BK_CAUSE_PGMENTRY, BK_CAUSE_PROTECT,
+	BK_CAUSE_BIT,
+} Ti68kBkptCause;
+
+#define DBG_BREAK   1	// user breakpoint
+#define DBG_TRACE   2	// trace (T)
+#define DBG_HWPV	3	// hardware protection violation
+
+/* Functions */
+
+int ti68k_bkpt_add_address(uint32_t address);
+int ti68k_bkpt_add_access(uint32_t address, int mode);
+int ti68k_bkpt_add_range(uint32_t min, uint32_t max, int mode);
+int ti68k_bkpt_add_exception(uint32_t n);
+int ti68k_bkpt_add_pgmentry(uint16_t handle);
+int ti68k_bkpt_add_bits(uint32_t address, uint8_t checks, uint8_t states);
+
+int ti68k_bkpt_del_address(uint32_t address);
+int ti68k_bkpt_del_access(uint32_t address, int mode);
+int ti68k_bkpt_del_range(uint32_t min, uint32_t max, int mode);
+int ti68k_bkpt_del_exception(uint32_t n);
+int ti68k_bkpt_del_pgmentry(uint16_t handle);
+int ti68k_bkpt_del_bits(uint32_t address);
+
+int ti68k_bkpt_set_address(uint32_t address, uint32_t new_address);
+int ti68k_bkpt_set_access(uint32_t address, int mode, uint32_t new_address);
+int ti68k_bkpt_set_range(uint32_t min, uint32_t max, int mode, uint32_t new_min, uint32_t new_max);
+int ti68k_bkpt_set_exception(uint32_t n, uint32_t new_n);
+int ti68k_bkpt_set_pgmentry(uint16_t handle, uint16_t new_handle);
+int ti68k_bkpt_set_bits(uint32_t old_address, uint32_t address);
+int ti68k_bkpt_set_bits_ex(uint32_t old_address, uint32_t address, uint8_t checks, uint8_t states);
+
+int ti68k_bkpt_get_address(unsigned int idx, uint32_t *address);
+int ti68k_bkpt_get_access(unsigned int idx, uint32_t *address, int mode);
+int ti68k_bkpt_get_range(unsigned int idx, uint32_t *min, uint32_t *max, int mode);
+int ti68k_bkpt_get_exception(unsigned int idx, uint32_t *n);
+int ti68k_bkpt_get_pgmentry(unsigned int idx, uint16_t *handle);
+int ti68k_bkpt_get_pgmentry_offset(unsigned int idx, uint16_t *handle, uint16_t *offset);
+int ti68k_bkpt_get_bits(unsigned int idx, uint32_t *address, uint8_t *checks, uint8_t *states);
+
+void ti68k_bkpt_clear_address(void);
+void ti68k_bkpt_clear_access(void);
+void ti68k_bkpt_clear_range(void);
+void ti68k_bkpt_clear_exception(void);
+void ti68k_bkpt_clear_pgmentry(void);
+void ti68k_bkpt_clear_bits(void);
+
+void ti68k_bkpt_set_cause(int type, int mode, int id);
+void ti68k_bkpt_get_cause(int *type, int *id, int *mode);
+
+
+#endif
diff --git a/src/core/dbg/debug.c b/src/core/dbg/debug.c
new file mode 100644
index 0000000..21cd71b
--- /dev/null
+++ b/src/core/dbg/debug.c
@@ -0,0 +1,254 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: debug.c 2792 2008-05-26 16:48:30Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Debug: debugging functions
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "libuae.h"
+#include "m68k.h"
+#include "romcalls.h"
+#include "debug.h"
+#include "ti68k_def.h"
+#include "ti68k_err.h"
+
+/* Flushes GDB's register cache */
+extern void registers_changed(void);
+/* Flushes GDB's frame cache */
+extern void reinit_frame_cache(void);
+/* Refreshes Insight */
+extern void gdbtk_update(void);
+
+int ti68k_debug_get_pc(void)
+{
+	return m68k_getpc();
+}
+
+int ti68k_debug_get_old_pc(void)
+{
+	return logger.pclog_buf[(logger.pclog_ptr + logger.pclog_size-1) % logger.pclog_size];
+}
+
+int ti68k_debug_break(void)
+{
+    regs.spcflags |= SPCFLAG_BRK;
+    return 0;
+}
+
+int ti68k_debug_trace(void)
+{
+    // Set up an internal trap (DBTRACE) which will 
+    // launch/refresh the debugger when encountered
+    regs.spcflags |= SPCFLAG_DBTRACE;
+
+    return 0;
+}
+
+int ti68k_debug_step(void)
+{
+    regs.spcflags |= SPCFLAG_DBSKIP;
+	return ti68k_debug_do_instructions(1);
+}
+
+static const uint16_t rets[] = { 
+	
+	0x4e77,		// RTR
+	0x4e75,		// RTS
+	0x4e74,		// RTD
+	0x4e73,		// RTE
+	0x4e72,		// STOP
+};
+
+static inline int is_ret_inst(uint16_t inst)
+{
+	int i;
+	for(i = 0; i < sizeof(rets) / sizeof(uint16_t); i++)
+		if(curriword() == rets[i])
+			return !0;
+	return 0;
+}
+
+static inline int is_bsr_inst(uint16_t ci)
+{
+	int t1, t2, t3, t4, t5;
+	
+	t1 = ((ci >> 6) == (0x4e80 >> 6));						/* jsr */
+    t2 = ((ci >> 8) == (0x61ff >> 8));						/* bsr */
+    t3 = (ci >= 0xf800 && ci <= 0xffee);						/* fline */
+	t4 = (ci == 0xfff0) || (ci == 0xfff2) ||
+		((ci & 0xf000) == 0x5000) && ((ci & 0x00f8) == 0x00c8);	/* dbcc */
+	t5 = ((ci >> 4) == (0x4e40 >> 4));						/* trap */
+
+	//printf("<%i %i %i %i %i>\n", ret1, ret2, ret3, ret4, ret5);
+
+	return t1 || t2 || t3 || t4 || t5;
+}
+
+int ti68k_step_over_noflush(void)
+{
+    uint32_t curr_pc, next_pc;
+	gchar *output;
+
+	// get current PC and next PC
+	curr_pc = m68k_getpc();	
+	next_pc = curr_pc + ti68k_debug_disassemble(curr_pc, &output);
+	//printf("$%06x => $%06x %04x <%s>\n", curr_pc, next_pc, curriword(), output);
+	g_free(output);	
+
+	// check current instruction
+	if(!is_bsr_inst((uint16_t)curriword()))
+	{
+		ti68k_debug_step();
+		return 0;
+	}
+
+	// run emulation until address after instruction is reached
+	hw_m68k_run(1, 0);
+	// FIXME: While _bcd_math also exists on the TI-92, we can't easily find it.
+	// romcalls_get_symbol_address definitely won't work on the TI-92.
+	if(tihw.calc_type != TI92)
+	{
+		uint32_t bcd_math_pc;
+		// _bcd_math returns to pc + 2 rather than pc
+		// This works only for jsr calls. F-Line calls are handled in the disassembler.
+		romcalls_get_symbol_address(0xb5, &bcd_math_pc);
+		if (m68k_getpc() == bcd_math_pc)
+			next_pc += 2;
+	}
+	while ((next_pc != m68k_getpc()) && !(regs.spcflags & SPCFLAG_BRK))
+	{
+		hw_m68k_run(1, 0);
+
+		// force GUI refresh in order to be able to cancel operation
+		while(gtk_events_pending()) gtk_main_iteration_do(FALSE);
+	}
+
+	if(regs.spcflags & SPCFLAG_BRK)
+		regs.spcflags &= ~SPCFLAG_BRK;
+
+    return 0;
+}
+
+int ti68k_debug_step_over(void)
+{
+	int result = ti68k_step_over_noflush();
+#ifndef NO_GDB
+    registers_changed();
+	reinit_frame_cache();
+	gdbtk_update();
+#endif
+    return result;
+}
+
+int ti68k_debug_step_out(void)
+{
+	uint32_t curr_pc, next_pc;
+	gchar *output;
+	//int i;
+
+	// get current PC and next PC
+	curr_pc = m68k_getpc();	
+	next_pc = curr_pc + ti68k_debug_disassemble(curr_pc, &output);
+	//printf("$%06x => $%06x <%s>\n", curr_pc, next_pc, output);
+	g_free(output);	
+
+	// run emulation until address is reached
+	do
+	{
+		hw_m68k_run(1, 0);
+
+		//printf("$%06x: %06x\n", m68k_getpc(), curriword());
+		if(is_ret_inst((uint16_t)curriword()))
+		{
+			hw_m68k_run(1, 0);
+#ifndef NO_GDB
+			registers_changed();
+			reinit_frame_cache();
+			gdbtk_update();
+#endif
+			return 0;
+		}	
+	}
+	while(1);
+
+    return 0;
+}
+
+int ti68k_debug_skip(uint32_t next_pc)
+{
+	// run emulation until address is reached
+    do 
+    {
+		ti68k_debug_step();
+/*
+		// too far: stop
+		if(m68k_getpc() > next_pc) 
+			break;
+
+		// jump back: stop
+		if(next_pc - m68k_getpc() > 0x80) 
+			break;
+*/
+		// force GUI refresh in order to be able to cancel operation
+		while(gtk_events_pending()) gtk_main_iteration_do(FALSE);
+    } 
+    while ((next_pc != m68k_getpc()) && !(regs.spcflags & SPCFLAG_BRK));
+
+	if(regs.spcflags & SPCFLAG_BRK)
+		regs.spcflags &= ~SPCFLAG_BRK;
+
+    return 0;
+}
+
+int ti68k_debug_do_instructions(int n)
+{
+	int result = hw_m68k_run(n, 0);
+#ifndef NO_GDB
+    registers_changed();
+	reinit_frame_cache();
+	gdbtk_update();
+#endif
+    return result;
+}
+
+// Used to read/modify/write memory directly from debugger
+uint8_t* ti68k_get_real_address(uint32_t addr)
+{
+	return hw_get_real_address(addr);
+}
+
+int ti68k_debug_is_supervisor(void)
+{
+    return regs.s;
+}
diff --git a/src/core/dbg/debug.h b/src/core/dbg/debug.h
new file mode 100644
index 0000000..a913364
--- /dev/null
+++ b/src/core/dbg/debug.h
@@ -0,0 +1,45 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: debug.h 2603 2007-07-14 17:09:56Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_DBG__
+#define __TI68K_DBG__
+
+int ti68k_debug_get_pc(void);
+int ti68k_debug_get_old_pc(void);
+
+uint32_t ti68k_debug_disassemble(uint32_t addr, char **line);
+
+int ti68k_debug_break(void);
+int ti68k_debug_trace(void);
+int ti68k_debug_step(void);
+int ti68k_debug_step_over(void);
+int ti68k_debug_step_out(void);
+int ti68k_debug_skip(uint32_t next_pc);
+int ti68k_debug_do_instructions(int n);
+
+int ti68k_debug_is_supervisor(void);
+
+#endif
diff --git a/src/core/dbg/disasm.c b/src/core/dbg/disasm.c
new file mode 100644
index 0000000..c00218e
--- /dev/null
+++ b/src/core/dbg/disasm.c
@@ -0,0 +1,470 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: disasm.c 2841 2009-05-15 15:26:47Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+
+#include "ti68k_int.h"
+
+/* ti68k_debug_disassemble is a wrapper around the GDB or UAE disassembler, so
+   we can use the GDB disassembler in GDB-enabled builds and the UAE one in
+   non-GDB builds. The abstraction also allows plugging in any other
+   disassembler instead at any moment. */
+
+#ifndef NO_GDB
+
+/* GDB enabled: use the GDB disassembler */
+
+#include "../../gdb/include/dis-asm.h"
+struct gdbarch;
+struct ui_file;
+struct disassemble_info gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file);
+int print_insn_m68k (bfd_vma memaddr, disassemble_info *info);
+
+uint32_t ti68k_debug_disassemble(uint32_t addr, char **line)
+{
+	static struct disassemble_info di;
+	static char *output = NULL;
+	uint32_t offset;
+	gchar **split;
+	gchar *p;
+
+	if (!output)
+	{
+		di = gdb_disassemble_info (NULL, NULL);
+		output = di.stream;
+	}
+
+	*output = 0;
+	offset = print_insn_m68k(addr, &di);
+	split = g_strsplit(output, " ", 2);
+
+	if(split[1])
+		for(p = split[1]; *p == ' '; p++);
+	else
+		p = "";
+
+	*line = g_strdup_printf("%06x: %s %s", addr, split[0] ? split[0] : "", p);
+	g_strfreev(split);
+
+	return offset;
+}
+
+#else
+
+extern int m68k_disasm (char *output, uint32_t addr);
+
+static const char* instr[] = { 
+	"ORSR",			/* ORI  #<data>,SR		*/
+	"ANDSR",		/* ANDI #<data>,SR		*/
+	"EORSR",		/* EORI #<data>,SR		*/
+	"MVSR2",		/* MOVE SR,<ea>			*/
+	"MV2SR",		/* MOVE <ea>,SR			*/
+	"MVR2USP.L",	/* MOVE An,USP			*/
+	"MVUSP2R.L",	/* MOVE USP,An			*/
+	"MVMLE",		/* MOVEM <ea>,<list>  	*/
+	"MVMEL",		/* MOVEM <list>,<ea>	*/
+	"MVPMR",		/* MOVEP <Dx>,<(d16,Ay)>*/
+	"MVPRM",		/* MOVEP <d16,Ay>,<Dx>	*/
+	"TRAP.L",		/* TRAP	#<vector>		*/
+	"RESET.L",
+	"NOP.L",
+	"STOP.L",
+	"RTE.L",
+	"RTS.L",
+	"JMP.L",
+	"LEA.L",
+	"BTST",			/* do nothing			*/
+	"BT",			/* BRA					*/
+
+	NULL
+};
+
+static int match_opcode(const char *opcode)
+{
+	int i;
+
+	if(opcode == NULL)
+		return -1;
+
+	for(i = 0; instr[i] != NULL; i++)
+	{
+		 if(!strncmp(opcode, (char *)instr[i], strlen(instr[i])))
+			return i;
+	}
+
+	return -1;
+}
+
+// testing patterns: 0x55, 0xAA, 0x02, 0xF5, 0x5F, 0xFA, 0xAF
+static gchar* create_reg_list(uint8_t value, char name)
+{
+	gchar *str = g_strdup("");
+	gchar *str2;
+	int i;
+	int pre_bit = 0;
+	int cur_bit;
+	int start = -1;
+	int end = -1;
+
+	for(i = 0; i < 8; i++, value >>= 1)
+	{
+		cur_bit = value & 1;
+
+		if(pre_bit == 0 && cur_bit == 1) start = i;
+		if(pre_bit == 1 && cur_bit == 0) end = i-1;
+
+		if(start == end && start != -1)
+		{
+			str2 = g_strdup_printf("%s%c%i/", str, name, i-1);
+			g_free(str);
+			str = str2;
+			end = start = -1;
+		}
+		else if(end > start)
+		{
+			str2 = g_strdup_printf("%s%c%i-%c%i/", str, name, start, name, end);
+			g_free(str);
+			str = str2;
+			end = start = -1;
+		}
+
+		pre_bit = cur_bit;
+	}
+
+	if((end=i-1) > (start+1) && start != -1)
+	{
+		str2 = g_strdup_printf("%s%c%i-%i", str, name, start, end);
+		g_free(str);
+		str = str2;
+	}
+	else if(start > 0 && end > 0)
+	{
+		str2 = g_strdup_printf("%s%c%i", str, name, start);
+		g_free(str);
+		str = str2;
+	}
+	else
+		str[strlen(str) - 1] = '\0';
+
+	return str;
+}
+
+static gchar* create_rev_reg_list(uint8_t value, char name)
+{
+	gchar *str = g_strdup("");
+	gchar *str2;
+	int i;
+	int pre_bit = 0;
+	int cur_bit;
+	int start = -1;
+	int end = -1;
+
+	for(i = 0; i < 8; i++, value <<= 1)
+	{
+		cur_bit = (value & (1 << 7)) >> 7;
+
+		if(pre_bit == 0 && cur_bit == 1) start = i;
+		if(pre_bit == 1 && cur_bit == 0) end = i-1;
+
+		if(start == end && start != -1)
+		{
+			str2 = g_strdup_printf("%s%c%i/", str, name, i-1);
+			g_free(str);
+			str = str2;
+			end = start = -1;
+		}
+		else if(end > start)
+		{
+			str2 = g_strdup_printf("%s%c%i-%c%i/", str, name, start, name, end);
+			g_free(str);
+			str = str2;
+			end = start = -1;
+		}
+
+		pre_bit = cur_bit;
+	}
+
+	if((end=i-1) > (start+1) && start != -1)
+	{
+		str2 = g_strdup_printf("%s%c%i-%i", str, name, start, end);
+		g_free(str);
+		str = str2;
+	}
+	else if(start > 0 && end > 0)
+	{
+		str2 = g_strdup_printf("%s%c%i", str, name, start);
+		g_free(str);
+		str = str2;
+	}
+	else
+		str[strlen(str) - 1] = '\0';
+
+	return str;
+}
+
+static gchar* create_reg_lists(uint16_t value)
+{
+	gchar *a, *d;
+	gchar *str;
+
+	a = create_reg_list(MSB(value), 'A');
+	d = create_reg_list(LSB(value), 'D');
+
+	return str = g_strconcat(a, "/", d, NULL);
+}
+
+static char* create_rev_reg_lists(uint16_t value)
+{
+	gchar *a, *d;
+	gchar *str;
+
+	d = create_rev_reg_list(MSB(value), 'D');
+	a = create_rev_reg_list(LSB(value), 'A');
+
+	return str = g_strconcat(d, "/", a, NULL);
+}
+
+// do the same work as m68k_disasm but some instructions dis-assembled by the
+// UAE engine use a weird/wrong naming scheme so we remap them here rather than
+// touching the newcpu.c & table68k files because this file may be updated when 
+// upgrading the UAE engine.
+int m68k_dasm(char **line, uint32_t addr)
+{
+	char output[1024];
+	int offset;
+	gchar** split;
+	int idx;
+
+	// get UAE disassembly
+	offset = m68k_disasm(output, addr);
+
+	// split string into address, opcode and operand
+	split = g_strsplit(output, " ", 3);
+
+	// search for opcode to rewrite
+	idx = match_opcode(split[1]);
+	if(idx != -1)
+	{
+		gchar *tmp;
+		
+		switch(idx)
+		{
+		case 0:		/* ORI to SR #<data>,SR		*/
+			{
+				char c = split[1][5];
+
+				g_free(split[1]);
+				split[1] = g_strdup_printf("ORI.%c", c);
+			
+				tmp = g_strconcat(split[2], ",SR", NULL);
+				g_free(split[2]);
+				split[2] = tmp;
+			}
+			break;
+		case 1:		/* ANDI to SR #<data>,SR	*/
+			{
+				char c = split[1][6];
+			
+				g_free(split[1]);
+				split[1] = g_strdup_printf("ANDI.%c", c);
+			
+				tmp = g_strconcat(split[2], ",SR", NULL);
+				g_free(split[2]);
+				split[2] = tmp;
+			}
+			break;
+		case 2:		/* EORI to SR #<data>,SR	*/
+			{
+				char c = split[1][6]; 
+			
+				g_free(split[1]);
+				split[1] = g_strdup_printf("EORI.%c", c);
+			
+				tmp = g_strconcat(split[2], ",SR", NULL);
+				g_free(split[2]);
+				split[2] = tmp;
+			}
+			break;
+		case 3:		/* MOVE from SR: SR,<ea>		*/
+			{
+				char c = split[1][6];
+
+				g_free(split[1]);
+				split[1] = g_strdup_printf("MOVE.%c", c);
+			
+				tmp = g_strconcat("SR,", split[2], NULL);
+				g_free(split[2]);
+				split[2] = tmp;
+			}
+			break;
+		case 4:		/* MOVE to SR: <ea>,SR		*/
+			{
+				char c = split[1][6];
+			
+				g_free(split[1]);
+				split[1] = g_strdup_printf("MOVE.%c", c);
+			
+				tmp = g_strconcat(split[2], ",SR", NULL);
+				g_free(split[2]);
+				split[2] = tmp;
+			}
+			break;
+		case 5:	/* MOVE An,USP	*/
+			g_free(split[1]);
+			split[1] = g_strdup("MOVE");
+			
+			tmp = g_strconcat(split[2], ",USP", NULL);
+			g_free(split[2]);
+			split[2] = tmp;
+			break;
+		case 6:	/* MOVE USP,An	*/
+			g_free(split[1]);
+			split[1] = g_strdup("MOVE");
+			
+			tmp = g_strconcat("USP,", split[2], NULL);
+			g_free(split[2]);
+			split[2] = tmp;
+			break;
+		case 7:		/* MOVEM <ea>,<list>	*/
+			{
+				char c = split[1][6];
+				char *p, *q;
+				gchar *tmp;
+				uint16_t mask;
+
+				g_free(split[1]);
+				split[1] = g_strdup_printf("MOVEM.%c", c);
+
+				p = split[2];
+				q = strchr(split[2], ',');
+				q++;
+
+				sscanf(p, "#$%" SCNx16, &mask);
+				if(q[0] != '-')
+					tmp = g_strdup_printf("%s,%s", q, create_reg_lists(mask));
+				else
+					tmp = g_strdup_printf("%s,%s", q, create_rev_reg_lists(mask));
+
+				g_free(split[2]);
+				split[2] = tmp;
+			}
+			break;
+		case 8:		/* MOVEM <list>, <ea>	*/
+			{
+				char c = split[1][6];
+				char *p, *q;
+				gchar *tmp;
+				uint16_t mask;
+
+				g_free(split[1]);
+				split[1] = g_strdup_printf("MOVEM.%c", c);
+
+				p = split[2];
+				q = strchr(split[2], ',');
+				q++;
+
+				sscanf(p, "#$%" SCNx16, &mask);
+				if(q[0] != '-')
+					tmp = g_strdup_printf("%s,%s", create_reg_lists(mask), q);
+				else
+					tmp = g_strdup_printf("%s,%s", q, create_rev_reg_lists(mask));
+
+				g_free(split[2]);
+				split[2] = tmp;
+			}
+			break;
+		case 9:		/* MOVEP <Dx>,<(d16,Ay)> */
+		case 10:	/* MOVEP <(d16,Ay)>,<Dx> */
+			{
+				char c = split[1][6];
+
+				g_free(split[1]);
+				split[1] = g_strdup_printf("MOVEP.%c", c);
+			}
+			break;
+		case 11:	/* TRAP #<vector>	*/
+		case 12:	/* RESET.L			*/
+		case 13:	/* NOP.L			*/
+		case 14:	/* STOP.L			*/
+		case 15:	/* RTE.L			*/
+		case 16:	/* RTS.L			*/
+		case 17:	/* JMP.L			*/
+		case 18:	/* LEA.L			*/
+			{
+				char *p = strchr(split[1], '.');
+				if(p) *p = '\0';
+			}
+			break;
+		case 20:	/* BRA				*/
+			g_free(split[1]);
+			split[1] = g_strdup("BRA");
+		break;
+
+		case 19:	/* BTST				*/
+		default:
+			break;
+		}
+	}
+
+	// search for [value] and reject it at end of line
+	if(strchr(split[2], '['))
+	{
+		char *p = strchr(split[2], '[');
+		char *q = strrchr(split[2], ']');
+		char tmp[256];
+
+		p--;
+		q++;
+		strncpy(tmp, p, q - p);
+		tmp[q-p] = '\0';
+		strcpy(p, q);
+		strcat(split[2], tmp);
+	}
+	
+	*line = g_strdup_printf("%s %s %s", 
+			split[0] ? split[0] : "", 
+			split[1] ? split[1] : "",
+			split[2] ? split[2] : "");
+	g_strfreev(split);
+
+	return offset;
+}
+
+uint32_t ti68k_debug_disassemble(uint32_t addr, char **line)
+{
+	uint32_t offset;
+
+	offset = m68k_dasm(line, addr);
+
+	return offset;
+}
+#endif
diff --git a/src/core/dbg/fpudasm.c b/src/core/dbg/fpudasm.c
new file mode 100644
index 0000000..a50b0a6
--- /dev/null
+++ b/src/core/dbg/fpudasm.c
@@ -0,0 +1,245 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: fpudasm.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    A pseudo-FPU disassembler.
+	Many informations comes from the TI's BCD artihmetic package:
+	<ftp://ftp.ti.com/pub/graph-ti/calc-apps/89/asm/exec.inc>
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+
+typedef struct
+{
+	uint16_t	code;
+	char*		name;
+} TUPLE;
+
+// 6 chars max
+TUPLE operators[9] = {
+	{ 0x0000, "FCMP" }, { 0x1000, "FADD" }, { 0x2000, "FDIV" }, { 0x3000, "FMUL" }, 
+	{ 0x4000, "FSUB" }, { 0x5000, "FINTRZ" }, { 0x6000, "FMOVE" }, { 0x7000, "FNEG" },
+	{ 0x8000, "FTST" },
+};
+
+// 7 chars max
+TUPLE sizes[6] = {
+	{ 0x0000, "BYTE"}, { 0x0200, "WORD"}, { 0x0400, "LONG"},
+	{ 0x0600, "SINGLE"}, { 0x0800, "DOUBLE"}, { 0x0a00, "UNSGNED"}, 
+};
+
+// 11 chars max
+TUPLE srcs[21] = {
+	{ 0x0000, "FP0"}, { 0x0010, "FP1"}, { 0x0020, "FP2"}, { 0x0030, "FP3"}, 
+	{ 0x0040, "FP4"}, { 0x0050, "FP5"}, { 0x0060, "FP6"}, { 0x0070, "FP7"}, 
+	{ 0x0080, "D0"}, { 0x0090, "D1"}, { 0x00a0, "D2"}, { 0x00b0, "D3"}, 
+	{ 0x00c0, "D4"}, { 0x00d0, "D5"}, { 0x00e0, "D6"}, { 0x00f0, "D7"}, 
+	{ 0x0100, "IMMED_LONG"}, { 0x0110, "IMMED_SHORT"}, { 0x0120, "FRAME_OFF"},
+	{ 0x0130, "EFFECT_ADDR"}, { 0x0140, "IMMED_ZERO"},
+};
+
+// 11 chars max
+TUPLE dsts[11] = {
+	{ 0x0000, "R0"}, { 0x0001, "R1"}, { 0x0002, "R2"}, { 0x0003, "R3"}, 
+	{ 0x0004, "R4"}, { 0x0005, "R5"}, { 0x0006, "R6"}, { 0x0007, "R7"}, 
+	{ 0x0008, "FRAME_OFF"}, { 0x0009, "EFFECT_ADDR"}, { 0x000a, "RETURN_REG"}, 
+};
+
+#define GET_OPERATOR(x)		((x) & 0xf000)
+#define GET_SIZE(x)			((x) & 0x0e00)
+#define GET_SRC(x)			((x) & 0x01f0)
+#define GET_DST(x)			((x) & 0x000f)
+
+/*
+; BCD arithmetic package
+
+***************************************************************************
+*                        OPERATOR / OPERAND WORD                          *
+*                                                                         *
+*    | 15| 14| 13| 12| 11| 10| 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |    *
+*    +---------------+-----------+-------------------+---------------+    *
+*    |   OPERATOR    |   SIZE    |    SRC OPERAND    |  DEST OPERAND |    *
+*    +---------------+-----------+-------------------+---------------+    *
+*        FCMP   0      BYTE    0     FP0          0    R0 (FP or D) 0     *
+*        FADD   1      WORD    1      |                 |                 *
+*        FDIV   2      LONG    2     FP7          7    R7 (FP or D) 7     *
+*        FMUL   3      SINGLE  3     D0           8    FRAME_OFF    8     *
+*        FSUB   4      DOUBLE  4      |                EFFECT_ADDR  9     *
+*        FINTRZ 5      UNSGNED 5     D7          15    RETURN_REG  10     *
+*        FMOVE  6                    IMMED_LONG  16                       *
+*        FNEG   7                    IMMED_SHORT 17                       *
+*        FTST   8                    FRAME_OFF   18                       *
+*                                    EFFECT_ADDR 19                       *
+*                                    IMMED_ZERO  20                       *
+***************************************************************************
+bcdCmp          = 0x0000
+bcdAdd          = 0x1000
+bcdDiv          = 0x2000
+bcdMul          = 0x3000
+bcdSub          = 0x4000
+bcdIntz         = 0x5000
+bcdMove         = 0x6000
+bcdNeg          = 0x7000
+bcdTst          = 0x8000
+
+bcdByte         = 0x0000
+bcdWord         = 0x0200
+bcdLong         = 0x0400
+bcdSingle       = 0x0600
+bcdDouble       = 0x0800
+bcdUnsigned     = 0x0A00
+
+; Source operand
+bcdFP0          = 0x0000
+bcdFP1          = 0x0010
+bcdFP2          = 0x0020
+bcdFP3          = 0x0030
+bcdFP4          = 0x0040
+bcdFP5          = 0x0050
+bcdFP6          = 0x0060
+bcdFP7          = 0x0070
+bcdD0           = 0x0080
+bcdD1           = 0x0090
+bcdD2           = 0x00A0
+bcdD3           = 0x00B0
+bcdD4           = 0x00C0
+bcdD5           = 0x00D0
+bcdD6           = 0x00E0
+bcdD7           = 0x00F0
+bcdLongImm      = 0x0100
+bcdShortImm     = 0x0110
+bcdFrameSrc     = 0x0120
+bcdAbsSrc       = 0x0130
+bcdZeroImm      = 0x0140
+
+; Destination operand
+bcdR0           = 0x0000
+bcdR1           = 0x0001
+bcdR2           = 0x0002
+bcdR3           = 0x0003
+bcdR4           = 0x0004
+bcdR5           = 0x0005
+bcdR6           = 0x0006
+bcdR7           = 0x0007
+bcdFrameDest    = 0x0008
+bcdAbsDest      = 0x0009
+bcdRetReg       = 0x000A
+*/
+
+/*
+	Input: FPU opcode in 'code'
+	Output: FPU disassembled in 'buf'. sizeof(buf) >= 6+1+7+1+11+1+11 = 38
+*/
+int DasmFPU(uint16_t code, char *buf)
+{
+	int	operator = GET_OPERATOR(code);
+	int size = GET_SIZE(code);
+	int src = GET_SRC(code);
+	int dst = GET_DST(code);
+	int idx[4] = { 0 };
+	int i;
+	int j = 0;
+
+	for(i = 0; i < sizeof(operators) / sizeof(TUPLE); i++)
+	{
+		if(operators[i].code == operator)
+		{
+			idx[j++] = i;
+			break;
+		}
+	}
+
+	for(i = 0; i < sizeof(sizes) / sizeof(TUPLE); i++)
+	{
+		if(sizes[i].code == size)
+		{
+			idx[j++] = i;
+			break;
+		}
+	}
+	
+	for(i = 0; i < sizeof(srcs) / sizeof(TUPLE); i++)
+	{
+		if(srcs[i].code == src)
+		{
+			idx[j++] = i;
+			break;
+		}
+	}
+
+	for(i = 0; i < sizeof(dsts) / sizeof(TUPLE); i++)
+	{
+		if(dsts[i].code == dst)
+		{
+			idx[j++] = i;
+			break;
+		}
+	}
+
+	sprintf(buf, "%s.%s %s,%s", 
+		operators[idx[0]].name, sizes[idx[1]].name,
+		srcs[idx[2]].name, dsts[idx[3]].name);
+
+	return 0;
+}
+
+/*
+
+Et sinon, il y a un autre cas particulier bizarre, je ne sais pas 
+s'il vaut le coup de le tra�ter, mais _bcd_math est un ROM_CALL qui s'appelle comme �a:
+- n'importe quelle m�thode d'appel d'un ROM_CALL (jsr, F-Line etc.)
+- 2 octets: opcode FPU
+et le ROM_CALL saute ces 2 octets en retournant, donc retourne � next_pc+2. Si tu veux 
+g�rer �a, tu devrais regarder le target du jsr ou F-Line et comparer avec l'adresse de 
+_bcd_math.
+Pr�cisions:
+- la "FPU" est purement �mul�e en logiciel par _bcd_math, et les opcodes ne correspondent 
+� aucune FPU r�elle
+- Pour le F-Line, tu peux comparer l'opcode avec 0xF8B5, mais pour les appels par jsr, 
+tu n'as pas d'autre choix que de tester le target du saut pour savoir si on saute vers 
+_bcd_math ou aillers
+
+Il y en a un dans TIGCCLIB:
+
+__floatunssibf:
+ link.w %a6,#-36
+ pea.l 8(%a6)
+ move.l 0xC8,%a0
+ move.l 0xB5*4(%a0),%a0 // _bcd_math
+ jsr (%a0)
+ .word 0x6B30 // bcdMove | bcdUnsigned | bcdAbsSrc | bcdR0
+ move.l -10(%a6),%d0
+ move.l -6(%a6),%d1
+ move.w -2(%a6),%d2
+ unlk %a6
+ rts
+
+Le .word 0x6B30 est le code de la pseudo-FPU dont je parle. Et ce n'est pas
+ex�cut� par le processeur, _bcd_math rajoute 2 octets � l'adresse de retour.
+
+*/
diff --git a/src/core/dbg/gdbcall.c b/src/core/dbg/gdbcall.c
new file mode 100644
index 0000000..890104e
--- /dev/null
+++ b/src/core/dbg/gdbcall.c
@@ -0,0 +1,86 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: gdbcall.c 2211 2006-08-16 20:02:42Z kevinkofler $ */
+
+/*  TiEmu - a TI emulator
+ *
+ *  This file Copyright (c) 2005, Kevin Kofler
+ *
+ *  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.
+ */
+
+/*
+    Gdbcall: GDB interfacing functions
+*/
+
+#ifndef NO_GDB
+
+#include "gdbcall.h"
+
+#include <stdio.h>
+#include <string.h>
+
+/* These come from GDB's exceptions.h, which I don't want to include, because it
+   pulls in ui-out.h, which in turn won't compile without many other headers
+   from directories not even in our include path. */
+#define RETURN_MASK_ALL -2
+typedef int return_mask;
+typedef void (catch_command_errors_ftype) (char *, int);
+extern int catch_command_errors (catch_command_errors_ftype *func, char *command, int from_tty, return_mask);
+struct ui_file;
+struct cmd_list_element;
+#include "../gdb/gdb/top.h"
+
+/* This is for Insight. */
+extern int No_Update;
+
+static void gdbcall_exec_command(char *command_str)
+{
+  No_Update = 0; /* Tell Insight to refresh itself. */
+  catch_command_errors (execute_command, command_str, 0, RETURN_MASK_ALL); 
+}
+
+void gdbcall_run(void)
+{
+  char command[4]="run";
+  gdbcall_exec_command(command);
+}
+
+void gdbcall_continue(void)
+{
+  char command[2]="c";
+  gdbcall_exec_command(command);
+}
+
+void gdb_add_symbol_file(const char *filename, unsigned address)
+{
+  char command[(strlen(filename) << 1) + 28], *p=command+17;
+  const char *q=filename;
+  strcpy(command, "add-symbol-file \"");
+  while (*q) {
+    if (*q == '\\' || *q == '\'' || *q == '\"') *(p++)='\\';
+    *(p++)=*(q++);
+  }
+  sprintf(p, "\" %u", address);
+  gdbcall_exec_command(command);
+}
+
+void gdb_hbreak(const char *funcname)
+{
+  char command[strlen(funcname) + 8];
+  sprintf(command, "hbreak %s", funcname);
+  gdbcall_exec_command(command);
+}
+
+#endif
diff --git a/src/core/dbg/gdbcall.h b/src/core/dbg/gdbcall.h
new file mode 100644
index 0000000..da7a599
--- /dev/null
+++ b/src/core/dbg/gdbcall.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: gdbcall.h 2155 2006-07-20 19:53:06Z kevinkofler $ */
+
+/*  TiEmu - a TI emulator
+ *
+ *  This file Copyright (c) 2005-2006, Kevin Kofler
+ *
+ *  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.
+ */
+
+/*
+    Gdbcall: GDB interfacing functions
+*/
+
+void gdbcall_run(void);
+void gdbcall_continue(void);
+void gdb_add_symbol_file(const char *filename, unsigned address);
+void gdb_hbreak(const char *funcname);
diff --git a/src/core/engine.c b/src/core/engine.c
new file mode 100644
index 0000000..98dd44d
--- /dev/null
+++ b/src/core/engine.c
@@ -0,0 +1,142 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: engine.c 2686 2007-11-30 01:24:44Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Run engine from GTK main loop at regular interval.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <signal.h>
+
+#include "intl.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "m68k.h"
+#include "engine.h"
+#include "dbg_all.h"
+#include "logging.h"
+#include "tsource.h"
+
+void sim_exception(int which);
+#ifndef SIGTRAP
+/* WARNING: This MUST match the definitions in GDB and sim. */
+#define SIGTRAP 5
+#endif
+
+/* 
+   The TI92/89 should approximately execute NUM_CYCLES_PER_LOOP_HW[12] in 
+   ENGINE_TIME_LIMIT milliseconds (10.000.000 or 12.000.000 cycles/s).
+   If you think this values are a bit too big, you can slow down 
+   the emulator by changing them 
+*/
+#define NUM_CYCLES_PER_LOOP_HW1 300000	// 300000 cycles in 30ms
+#define NUM_CYCLES_PER_LOOP_HW2 360000	// 360000 cycles in 30ms
+#define NUM_CYCLES_PER_LOOP_HW4 480000	// 480000 cycles in 30ms
+#define MIN_INSTRUCTIONS_PER_CYCLE   4	// instructions take at least 4 cycles
+
+static int cpu_cycles = NUM_CYCLES_PER_LOOP_HW2;
+
+static guint tid = 0;
+
+// returns the instruction rate (default or custom value)
+int engine_num_cycles_per_loop(void)
+{
+	if(params.cpu_rate != -1)
+		return params.cpu_rate;
+	else if (tihw.hw_type == HW1)
+		return NUM_CYCLES_PER_LOOP_HW1;
+	else if (tihw.hw_type <= HW3)
+		return NUM_CYCLES_PER_LOOP_HW2;
+	else
+		return NUM_CYCLES_PER_LOOP_HW4;
+}
+
+// function called by g_timeout_add_full/g_idle_add_full
+static gboolean engine_func(gint *data)
+{
+	gint    res;
+	
+	// set instruction rate
+	cpu_cycles = engine_num_cycles_per_loop();
+
+	// run emulation core
+	res = hw_m68k_run(cpu_cycles / MIN_INSTRUCTIONS_PER_CYCLE, cpu_cycles);
+
+	// a bkpt has been encountered ? If yes, stop engine
+	if(res)
+	{
+		if (!dbg_on)
+			gtk_debugger_enter(GPOINTER_TO_INT(res));
+#ifndef NO_GDB
+		sim_exception(bkpts.type ?
+		              ((bkpts.type == BK_CAUSE_EXCEPTION || bkpts.type == BK_CAUSE_PROTECT) ? SIGSEGV
+		                                                                                    : SIGTRAP)
+		              : SIGINT);
+#endif
+		tid = 0;	// reset source id, we're stopping the engine
+		return FALSE;	// stop engine !
+	}
+
+	return TRUE;
+}
+
+// start emulation engine
+void engine_start(void) 
+{
+	if(params.restricted)
+		tid = g_timeout2_add_full(G_PRIORITY_DEFAULT_IDLE, ENGINE_TIME_LIMIT, 
+				(GSourceFunc)engine_func, NULL, NULL);
+	else
+		tid = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, 
+				(GSourceFunc)engine_func, NULL, NULL);
+}
+
+// stop it
+void engine_stop(void) 
+{
+	if(tid)
+	{
+		g_source_remove(tid);
+		// and reset source id
+		tid = 0;
+	}
+}
+
+// state of engine
+int engine_is_stopped() 
+{
+	return !tid;
+}
+
+// state of engine
+int engine_is_running(void)
+{
+	return tid;
+}
diff --git a/src/core/engine.h b/src/core/engine.h
new file mode 100644
index 0000000..897c701
--- /dev/null
+++ b/src/core/engine.h
@@ -0,0 +1,49 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: engine.h 2556 2007-06-24 05:05:05Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006-2007 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __ENGINE_H__
+#define __ENGINE_H__
+
+#define ENGINE_TIME_LIMIT 30 // 30 ms
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+int engine_num_cycles_per_loop(void);
+
+void engine_calibrate(void);
+
+void engine_start(void); 
+void engine_stop(void);
+
+int engine_is_stopped(void);
+int engine_is_running(void);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/core/error.c b/src/core/error.c
new file mode 100644
index 0000000..185618b
--- /dev/null
+++ b/src/core/error.c
@@ -0,0 +1,111 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: error.c 2378 2007-02-26 18:07:09Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Transcoding of error codes into message strings
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <glib.h>
+
+#include "intl.h"
+#include "ti68k_err.h"
+
+/* 
+   This function put in err_msg the error message corresponding to the 
+   error code.
+   If the error code has been handled, the function returns 0 else it 
+   propagates the error code by returning it.
+*/
+int ti68k_error_get(int err_num, char **error_msg)
+{
+	switch(err_num)
+    {
+    case ERR_NONE:
+		*error_msg = g_strdup(_("No error."));
+		break;
+
+	case ERR_CANT_OPEN:
+		*error_msg = g_strdup(_("Can not open file."));
+		break;
+
+	case ERR_CANT_OPEN_STATE:
+		*error_msg = g_strdup(_("Can not open state image: file is corrupted or missing."));
+		break;
+
+	case ERR_REVISION_MATCH:
+		*error_msg = g_strdup(_("Can not open state image: revision changed. You have to recreate the state image."));
+		break;
+
+	case ERR_HEADER_MATCH:
+		*error_msg = g_strdup(_("Can not open state image: state image header does not match ROM image header: have you changed/updated your ROM image?"));
+		break;
+
+	case ERR_STATE_MATCH:
+		*error_msg = g_strdup(_("Can not open state image: this state image is not targetted for your current emulator image (calculator model and/or OS version must match!). Choose another image before."));
+		break;
+
+	case ERR_INVALID_IMAGE:
+		*error_msg = g_strdup(_("Invalid emulator image. File is corrupted or revision changed."));
+		break;
+
+	case ERR_INVALID_UPGRADE:
+		*error_msg = g_strdup(_("Invalid FLASH upgrade."));
+		break;
+
+	case ERR_INVALID_ROM:
+		*error_msg = g_strdup(_("Invalid ROM dump."));
+		break;
+
+	case ERR_NO_IMAGE:
+		*error_msg = g_strdup(_("No image."));
+		break;
+
+	case ERR_INVALID_ROM_SIZE:
+		*error_msg = g_strdup(_("ROM dump has a weird size."));
+		break;
+
+	case ERR_NOT_TI_FILE:
+		*error_msg = g_strdup(_("This is not recognized as a TI file."));
+		break;
+
+	case ERR_CANT_OPEN_DIR:
+		*error_msg = g_strdup(_("Can't parse folder."));
+		break;
+
+	case ERR_CANT_UPGRADE:
+		*error_msg = g_strdup(_("Can't upgrade calculator."));
+		break;		
+
+    default:
+      *error_msg = g_strdup(_("Error code not found in the list.\nThis is a bug. Please report it."));
+      return err_num;
+    }
+  
+  return 0;
+}
+
diff --git a/src/core/hwpm.c b/src/core/hwpm.c
new file mode 100644
index 0000000..aaad0c4
--- /dev/null
+++ b/src/core/hwpm.c
@@ -0,0 +1,167 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hwpm.c 2752 2007-12-30 22:23:54Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+	This module manages Hardware Parameter Block. This is a 'C' structure like this:
+
+	typedef struct {
+	unsigned short len;					// length of parameter block
+	unsigned long hardwareID;			// 1 = TI-92 Plus, 3 = TI-89
+	unsigned long hardwareRevision;		// hardware revision number
+	unsigned long bootMajor;			// boot code version number
+	unsigned long bootRevision;			// boot code revision number
+	unsigned long bootBuild;			// boot code build number
+	unsigned long gateArray;			// gate array version number
+	unsigned long physDisplayBitsWide;	// display width
+	unsigned long physDisplayBitsTall;	// display height
+	unsigned long LCDBitsWide;			// visible display width
+	unsigned long LCDBitsTall;			// visible display height
+	} HARDWARE_PARM_BLOCK;
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h> //memset
+
+#include "intl.h"
+#include "hwpm.h"
+#include "timem.h"
+#include "ti68k_def.h"
+#include "logging.h"
+
+/* -- */
+
+void ti68k_display_hw_param_block(HW_PARM_BLOCK *s)
+{
+    int i = 0;
+
+    tiemu_info(_("Hardware Parameters Block:"));
+    tiemu_info(_("  length           : %i"), s->len);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  hardwareID       : %i", s->hardwareID);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  hardwareRevision : %i", s->hardwareRevision);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  bootMajor        : %i", s->bootMajor);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  bootRevision     : %i", s->bootRevision);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  bootBuild        : %i", s->bootBuild);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  gateArray        : %i", s->gateArray);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  physDisplayBitsWide : %i", s->physDisplayBitsWide & 0xff);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  physDisplayBitsTall : %i", s->physDisplayBitsTall & 0xff);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  LCDBitsWide         : %i", s->LCDBitsWide & 0xff);
+    if(s->len > 2+(4*i++))
+        tiemu_info("  LCDBitsTall         : %i", s->LCDBitsTall & 0xff);
+}
+
+/*
+    Read hardware parameter block from image.
+*/
+int ti68k_get_hw_param_block(uint8_t *rom_data, uint8_t rom_base, HW_PARM_BLOCK *s)
+{
+	int i = 0;
+    uint32_t addr;
+
+    addr = rd_long(&rom_data[0x104]);
+    addr &= 0x000fffff;
+
+    memset(s, 0, sizeof(HW_PARM_BLOCK));
+    s->len = rd_word(&(rom_data[addr+0]));
+	if(s->len > 2+(4*i++))
+		s->hardwareID = rd_long(&(rom_data[addr+2]));
+	if(s->len > 2+(4*i++))
+		s->hardwareRevision = rd_long(&(rom_data[addr+6]));
+	if(s->len > 2+(4*i++))
+		s->bootMajor = rd_long(&(rom_data[addr+10]));
+	if(s->len > 2+(4*i++))
+		s->bootRevision = rd_long(&(rom_data[addr+14]));
+	if(s->len > 2+(4*i++))
+		s->bootBuild = rd_long(&(rom_data[addr+18]));
+	if(s->len > 2+(4*i++))
+		s->gateArray = rd_long(&(rom_data[addr+22]));
+	if(s->len > 2+(4*i++))
+		s->physDisplayBitsWide = rd_long(&(rom_data[addr+26]));
+	if(s->len > 2+(4*i++))
+		s->physDisplayBitsTall = rd_long(&(rom_data[addr+30]));
+	if(s->len > 2+(4*i++))
+		s->LCDBitsWide = rd_long(&(rom_data[addr+34]));
+	if(s->len > 2+(4*i++))
+		s->LCDBitsTall = rd_long(&(rom_data[addr+38]));
+
+    if((s->hardwareID == HWID_V200) && (rom_base == 0x40))
+    {
+        tiemu_info(_("Detected V200 patched ROM (ExtendeD): emulated as TI92+ by changing the hwID from 8 to 1."));
+        s->hardwareID = HWID_TI92P;
+    }
+
+	if((s->hardwareID == HWID_TI89T) && (rom_base == 0x20))
+    {
+        tiemu_info(_("Detected TI89 Titanium patched ROM (ExtendeD): emulated as TI89 by changing the hwID from 9 to 3."));
+        s->hardwareID = HWID_TI89;
+    }
+
+    return 0;
+}
+
+/*
+    Write hardware parameter block into image.
+*/
+int ti68k_put_hw_param_block(uint8_t *rom_data, uint8_t rom_base, const HW_PARM_BLOCK *s)
+{
+	int i = 0;
+    uint32_t addr = 0x108;
+
+	wr_long(&rom_data[0x104], (rom_base << 16) || addr);
+	wr_word(&(rom_data[addr+0]), s->len);
+
+	if(s->len > 2+(4*i++))
+	    wr_long(&(rom_data[addr+2]), s->hardwareID);
+	if(s->len > 2+(4*i++))
+		wr_long(&(rom_data[addr+6]), s->hardwareRevision);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+10]), s->bootMajor);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+14]), s->bootRevision);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+18]), s->bootBuild);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+22]), s->gateArray);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+26]), s->physDisplayBitsWide);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+30]), s->physDisplayBitsTall);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+34]), s->LCDBitsWide);
+	if(s->len > 2+(4*i++))
+		 wr_long(&(rom_data[addr+38]), s->LCDBitsTall);
+
+    return 0;
+}
diff --git a/src/core/hwpm.h b/src/core/hwpm.h
new file mode 100644
index 0000000..758a6e1
--- /dev/null
+++ b/src/core/hwpm.h
@@ -0,0 +1,66 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hwpm.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_HWPM__
+#define __TI68K_HWPM__
+
+#include <stdint.h>
+
+/*
+  Definitions
+*/
+
+// Hardware parameter block from TIGCC documentation
+// Exists only on FLASH calculators
+typedef struct {
+	uint16_t  len;                 /* length of parameter block    */
+    uint32_t  hardwareID;          /* 1 = TI-92 Plus, 3 = TI-89    */
+    uint32_t  hardwareRevision;    /* hardware revision number     */
+    uint32_t  bootMajor;           /* boot code version number     */
+    uint32_t  bootRevision;        /* boot code revision number    */
+    uint32_t  bootBuild;           /* boot code build number       */
+    uint32_t  gateArray;           /* gate array version number    */
+    uint32_t  physDisplayBitsWide; /* display width                */
+    uint32_t  physDisplayBitsTall; /* display height               */
+    uint32_t  LCDBitsWide;         /* visible display width        */
+    uint32_t  LCDBitsTall;         /* visible display height       */
+} HW_PARM_BLOCK;
+
+// Possible values if hardwareID field
+#define HWID_TI92P  1
+#define HWID_TI89   3
+#define HWID_V200   8
+#define HWID_TI89T  9
+
+/*
+	Functions
+*/
+
+void ti68k_display_hw_param_block(HW_PARM_BLOCK *s);
+int ti68k_get_hw_param_block(uint8_t *rom_data, uint8_t rom_base, HW_PARM_BLOCK *block);
+int ti68k_put_hw_param_block(uint8_t *rom_data, uint8_t rom_base, const HW_PARM_BLOCK *s);
+
+#endif
diff --git a/src/core/images.c b/src/core/images.c
new file mode 100644
index 0000000..1d8a4b2
--- /dev/null
+++ b/src/core/images.c
@@ -0,0 +1,1216 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: images.c 2821 2009-05-04 20:06:12Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+	This module handles loading of images or upgrades.
+	Images can be:
+	- ROM dump
+	- FLASH upgrade as a ROM dump
+	
+  	Note:0x12000 is the beginning of the system privileged part.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <glib.h>
+
+#include "libuae.h"
+
+#include "intl.h"
+#include "ti68k_int.h"
+#include "ti68k_err.h"
+#include "ti68k_def.h"
+#include "images.h"
+#include "hwpm.h"
+#include "logging.h"
+
+#define is_num(c)   isdigit(c)
+#define is_alnum(c) isalnum(c)
+
+#define SPP	0x12000		// system privileged part
+#define BO  0x88        // offset from SPP to boot
+
+IMG_INFO	img_infos;
+int			img_loaded = 0;
+int			img_changed = 0;
+
+static int get_rom_version(char *ptr, int size, char *version);
+
+/*
+	Utility functions
+*/
+int ti68k_is_a_rom_file(const char *filename)
+{
+	char *ext;
+
+	ext = strrchr(filename, '.');
+	if(ext == NULL)
+		return 0;
+	else if(!strcasecmp(ext, ".rom"))
+		return !0;
+
+	return 0;
+}
+
+int ti68k_is_a_tib_file(const char *filename)
+{
+	return tifiles_file_is_os(filename);
+}
+
+int ti68k_is_a_img_file(const char *filename)
+{
+	char *ext;
+
+	ext = strrchr(filename, '.');
+	if(ext == NULL)
+		return 0;
+	else if(!strcasecmp(ext, ".img"))
+		return !0;
+
+	return 0;
+}
+
+int ti68k_is_a_sav_file(const char *filename)
+{
+	char *ext;
+
+	ext = strrchr(filename, '.');
+	if(ext == NULL)
+		return 0;
+	else if(!strcasecmp(ext, ".sav"))
+		return !0;
+
+	return 0;
+}
+
+/*
+	Display information
+*/
+void ti68k_display_rom_infos(IMG_INFO *s)
+{
+	tiemu_info(_("ROM information:"));
+  	tiemu_info(_("  Calculator  : %s"), ti68k_calctype_to_string(s->calc_type));
+  	tiemu_info(_("  Firmware    : %s"), s->version);
+  	tiemu_info(_("  Memory type : %s"), ti68k_romtype_to_string(s->flash));
+  	tiemu_info(_("  Memory size : %iMB (%i bytes)"), s->size >> 20, s->size);
+    tiemu_info(_("  ROM base    : %02x"), s->rom_base & 0xff);
+	tiemu_info(_("  Hardware    : %i"), s->hw_type);
+}
+
+void ti68k_display_tib_infos(IMG_INFO *s)
+{
+	tiemu_info(_("TIB information:"));
+  	tiemu_info(_("  Calculator  : %s"), ti68k_calctype_to_string(s->calc_type));
+  	tiemu_info(_("  Firmware    : %s"), s->version);
+  	tiemu_info(_("  Memory type : %s"), ti68k_romtype_to_string(s->flash));
+  	tiemu_info(_("  Memory size : %iMB (%i bytes)"), s->size >> 20, s->size);
+    tiemu_info(_("  ROM base    : %02x"), s->rom_base & 0xff);
+}
+
+void ti68k_display_img_infos(IMG_INFO *s)
+{
+	tiemu_info(_("Image information:"));
+  	tiemu_info(_("  Calculator  : %s"), ti68k_calctype_to_string(s->calc_type));
+  	tiemu_info(_("  Firmware    : %s"), s->version);
+  	tiemu_info(_("  Memory type : %s"), ti68k_romtype_to_string(s->flash));
+  	tiemu_info(_("  Memory size : %iMB (%i bytes)"), s->size >> 20, s->size);
+    tiemu_info(_("  ROM base    : %02x"), s->rom_base & 0xff);
+    tiemu_info(_("  Hardware    : %i"), s->hw_type);
+	tiemu_info(_("  Has boot    : %s"), s->has_boot ? _("yes") : _("no"));	
+}
+
+/*
+	Get some information on the ROM dump:
+	- size
+	- ROM base address
+	- FLASH/EPROM
+	- os version
+	- calc type
+	Note: if the data field is NULL, memory is allocated. 
+	Otherwise, data is overwritten.
+	Thanks to Kevin for HW2 detection code.
+*/
+int ti68k_get_rom_infos(const char *filename, IMG_INFO *rom, int preload)
+{
+  	FILE *file;
+    HW_PARM_BLOCK hwblock;
+
+	// No filename, exits
+    if(!strcmp(g_basename(filename), ""))
+	    return ERR_CANT_OPEN;
+
+	// Open file
+  	file = fopen(filename, "rb");
+  	if(file == NULL)
+    {
+      tiemu_info(_("Unable to open this file: <%s>"), filename);
+      return ERR_CANT_OPEN;
+    }
+
+  	// Retrieve ROM size
+  	fseek(file, 0, SEEK_END);
+  	rom->size = ftell(file);
+  	fseek(file, 0, SEEK_SET);
+
+  	if(rom->size < 256) 
+    	return ERR_INVALID_ROM_SIZE;
+	if (rom->size == 8*MB)
+	{
+	  // TiLP used to dump 8 MB images for HW4, try to load them anyway.
+	  tiemu_info(_("Warning: truncating 8 MB image to 4 MB: <%s>"), filename);
+	  rom->size = 4*MB;
+	}
+  	if (rom->size > 4*MB)
+    	return ERR_INVALID_ROM_SIZE;
+  
+	if(rom->data == NULL)
+  		rom->data = malloc(rom->size + 4);
+	if(rom->data == NULL)
+		return ERR_MALLOC;
+	memset(rom->data, 0xff, rom->size);
+	if (fread(rom->data, 1, rom->size, file) < (size_t)rom->size)
+	{
+	  tiemu_info(_("Failed to read from file: <%s>"), filename);
+	  fclose(file);
+	  return ERR_CANT_OPEN;
+	}
+	if (fclose(file))
+	{
+	  tiemu_info(_("Failed to close file: <%s>"), filename);
+	  return ERR_CANT_OPEN;
+	}
+
+    rom->has_boot = 1;
+    rom->rom_base = rom->data[0x05] & 0xf0;
+  	rom->flash = (rom->data[0x65] & 0x0f) ? 0 : FLASH_ROM;
+
+    get_rom_version(rom->data, rom->size, rom->version);
+
+    if(!rom->flash)
+    {
+        rom->calc_type = TI92;
+        rom->hw_type = HW1;
+    }
+    else
+    {
+        // Get hw param block to determine calc type & hw type
+        if(ti68k_get_hw_param_block((uint8_t*)rom->data, rom->rom_base, 
+				    &hwblock) == -1)
+	    return ERR_INVALID_ROM;
+        ti68k_display_hw_param_block(&hwblock);
+
+        switch(hwblock.hardwareID)
+        {
+        case HWID_TI92P: rom->calc_type = TI92p; break;
+        case HWID_TI89: rom->calc_type = TI89;  break;
+        case HWID_V200: rom->calc_type = V200;  break;
+        case HWID_TI89T: rom->calc_type = TI89t; break;
+        default: break;
+        }
+
+        if(rom->flash)
+        {
+            if(hwblock.len < 24)
+                rom->hw_type = HW1;
+            else
+                rom->hw_type = (char)hwblock.gateArray;
+        }
+    }
+
+	if(!preload)
+		free(rom->data);
+
+	return 0;
+}
+
+
+/*
+  Get some information on the FLASH upgrade:
+  - size
+  - ROM base address
+  - os version
+  - calc type
+*/
+int ti68k_get_tib_infos(const char *filename, IMG_INFO *tib, int preload)
+{
+	FlashContent *content;
+	FlashContent *ptr;
+	int nheaders = 0;
+	int i;
+
+	// No filename, exits
+	if(!strcmp(g_basename(filename), ""))
+	   return ERR_CANT_OPEN;
+
+	// Check valid file
+	if(!tifiles_file_is_ti(filename))
+		return ERR_NOT_TI_FILE;
+		
+	if(!tifiles_file_is_os(filename))
+		return ERR_INVALID_UPGRADE;
+
+	// Load file
+	content = tifiles_content_create_flash(CALC_TI89);
+	if(tifiles_file_read_flash(filename, content) != 0)
+        return ERR_INVALID_UPGRADE;
+	
+	// count headers
+  	for (ptr = content; ptr != NULL; ptr = ptr->next)
+    	nheaders++;
+  	
+  	// keep the last one (data)
+  	for (i = 0, ptr = content; i < nheaders - 1; i++)
+    	ptr = ptr->next;
+    	
+  	// Load TIB into memory and relocate at SPP
+	if(tib->data == NULL)
+  		tib->data = malloc(SPP + ptr->data_length + 4);
+	if(tib->data == NULL)
+		return ERR_MALLOC;
+
+    memset(tib->data + SPP, 0xff, ptr->data_length);
+  	memcpy(tib->data + SPP, ptr->data_part, ptr->data_length);
+  	
+  	// Update current rom infos
+    tib->rom_base = tib->data[BO+5 + SPP] & 0xf0;
+
+	// libtifiles can't distinguish TI89/TI89t and 92+/V200. We need to look.
+	switch(ptr->device_type & 0xff)
+	{
+		case DEVICE_TYPE_89:    // can be a Titanium, too
+            switch(tib->rom_base & 0xff)
+            {
+            case 0x20: tib->calc_type = TI89;  break;
+            case 0x80: tib->calc_type = TI89t; break;
+            default: return ERR_INVALID_UPGRADE;
+            }
+		break;
+		case DEVICE_TYPE_92P:
+            switch(tib->rom_base & 0xff)
+            {
+            case 0x20: tib->calc_type = V200;  break;
+            case 0x40: tib->calc_type = TI92p; break;
+            default: return ERR_INVALID_UPGRADE;
+            }
+		break;
+		default:
+			tiemu_info("TIB problem: %02x!\n", 0xff & ptr->device_type);
+			return ERR_INVALID_UPGRADE;
+		break;
+	}
+    
+  	tib->flash = FLASH_ROM;
+  	tib->has_boot = 0;
+  	tib->size = ptr->data_length + SPP;
+
+  	get_rom_version(tib->data, tib->size, tib->version);
+  	
+  	tifiles_content_delete_flash(content);
+	if(!preload)
+		free(tib->data);
+
+  	return 0;
+}
+
+/*
+	Try to get some information on the ROM dump:
+	- size
+	- ROM base address
+	- FLASH/EPROM
+	- soft version
+	- calc type
+*/
+int ti68k_get_img_infos(const char *filename, IMG_INFO *ri)
+{
+	FILE *f;
+	IMG_INFO32 ri32;
+	IMG_INFO64 ri64;
+
+	// No filename, exits
+	if(!strcmp(g_basename(filename), ""))
+	   return ERR_CANT_OPEN;
+
+	// Check file
+	if(!ti68k_is_a_img_file(filename))
+	{
+		tiemu_warning("Images must have '.img' extension (%s).\n",
+			filename);
+		return ERR_CANT_OPEN;
+	}
+	
+	// Open dest file
+  	f = fopen(filename, "rb");
+  	if(f == NULL)
+    {
+      	tiemu_warning("Unable to open this file: <%s>\n", filename);
+      	return ERR_CANT_OPEN;
+    }
+    
+    // Read header
+    if (fread(&ri32, sizeof(IMG_INFO32), 1, f) < 1)
+    {
+      tiemu_warning("Failed to read from file: <%s>\n", filename);
+      fclose(f);
+      return ERR_CANT_OPEN;
+    }
+    *ri = ri32;
+
+	// below is patch from Lionel
+    if(strcmp(ri->signature, IMG_SIGN) || ri->size > 4*MB || ri->calc_type > CALC_MAX
+       || ri->header_size == 0 || ri->hw_type > 4 || ri->rom_base == 0)
+    {
+      // In addition to plain invalid files, this may happen if the image was
+      // created on a 64-bit platform with TIEmu <= 3.03.
+      // Try to read an IMG_INFO structure as it used to be written by those
+      // 64-bit platforms.
+      fseek(f, 0, SEEK_SET);
+      if (fread(&ri64, sizeof(IMG_INFO64), 1, f) < 1)
+      {
+        tiemu_warning("Failed to read from file: <%s>\n", filename);
+        fclose(f);
+        return ERR_CANT_OPEN;
+      }
+      else {
+        memcpy(ri->signature, &(ri64.signature), sizeof(ri64.signature));
+        ri->revision = (int32_t)(ri64.revision);
+        ri->header_size = (int32_t)(ri64.header_size);
+
+        ri->calc_type = ri64.calc_type;
+        memcpy(ri->version, &(ri64.version), sizeof(ri64.version));
+        ri->flash = ri64.flash;
+        ri->has_boot = ri64.has_boot;
+        ri->size = (int32_t)(ri64.size);
+        ri->hw_type = ri64.hw_type;
+        ri->rom_base = ri64.rom_base;
+          
+        if(strcmp(ri->signature, IMG_SIGN) || ri->size > 4*MB || ri->calc_type > CALC_MAX
+           || ri->header_size == 0 || ri->hw_type > 4 || ri->rom_base == 0)
+        {
+          // Nope, it still doesn't seem to be a TIEmu image.
+          tiemu_warning("Bad image: <%s>\n", filename);
+          return ERR_INVALID_UPGRADE;
+        }
+        else {
+          tiemu_info("Found a reasonably valid 64-bit IMG_INFO in <%s>\n", filename);
+        }
+      }
+    }
+
+    // Close file
+    if (fclose(f))
+    {
+      tiemu_warning("Failed to close file: <%s>\n", filename);
+      return ERR_CANT_OPEN;
+    }
+    
+    return 0;
+}
+
+/*
+  	Convert a romdump into an image.
+	This kind of image is complete (boot & certificate).
+*/
+int ti68k_convert_rom_to_image(const char *srcname, const char *dirname, char **dstname)
+{
+  	FILE *f; 
+  	int err;
+	IMG_INFO img;
+	char *ext;
+	gchar *basename;
+
+	*dstname = NULL;
+
+	// No filename, exits
+	if(!strcmp(g_basename(srcname), ""))
+	   return ERR_CANT_OPEN;
+
+	// Preload romdump
+	memset(&img, 0, sizeof(IMG_INFO));
+	err = ti68k_get_rom_infos(srcname, &img, !0);
+	if(err)
+    {
+	    free(img.data);
+      	tiemu_info(_("Unable to get information on ROM dump: %s"), srcname);
+      	return err;
+    }
+	ti68k_display_rom_infos(&img);
+
+	// Create destination file
+	basename = g_path_get_basename(srcname);
+	ext = strrchr(basename, '.');
+  	*ext='\0';
+	strcat(basename, ".img");
+
+	*dstname = g_strconcat(dirname, basename, NULL);
+	g_free(basename);
+
+	// Open dest file
+  	f = fopen(*dstname, "wb");
+  	if(f == NULL)
+    {
+      	tiemu_warning("Unable to open this file: <%s>\n", *dstname);
+      	return ERR_CANT_OPEN;
+    }
+
+	// Some V200 and TI89 Titanium ROMs are half the size
+	if((img.size < 4*MB) && (img.calc_type == V200 || img.calc_type == TI89t))
+	{
+		img.size = 4*MB;
+		img.data = realloc(img.data, 4*MB + 4);
+		tiemu_info(_("Completing image to 4 MB!"));
+		memset(img.data + 2*MB, 0xff, 2*MB);
+	}
+
+	// Fill header
+	strcpy(img.signature, IMG_SIGN);
+	img.header_size = sizeof(IMG_INFO);
+    img.revision = IMG_REV;
+
+	// Write file
+	if (fwrite(&img, 1, sizeof(IMG_INFO), f) < (size_t)sizeof(IMG_INFO)
+	    || fwrite(img.data, sizeof(char), img.size, f) < (size_t)img.size)
+	{
+	  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+	  fclose(f);
+	  return ERR_CANT_OPEN;
+	}
+
+	// Close file
+	if (fclose(f))
+	{
+	  tiemu_warning("Failed to close file: <%s>\n", *dstname);
+	  return ERR_CANT_OPEN;
+	}
+
+	return 0;
+}
+
+/*
+	Convert an upgrade into an image.
+  	The image has neither boot block nor certificate.
+*/
+int ti68k_convert_tib_to_image(const char *srcname, const char *dirname, char **dstname,
+							   int hw_type)
+{
+	FILE *f; 
+  	int err;
+	IMG_INFO img;
+	char *ext;
+	gchar *basename;
+	int i, j;
+	int num_blocks, last_block;
+    int real_size;
+	HW_PARM_BLOCK hwpb;
+
+	*dstname = NULL;
+
+	// No filename, exits
+	if(!strcmp(g_basename(srcname), ""))
+	   return ERR_CANT_OPEN;
+
+	// Preload upgrade
+	memset(&img, 0, sizeof(IMG_INFO));
+	err = ti68k_get_tib_infos(srcname, &img, !0);
+	if(err)
+    {
+	    free(img.data);
+      	tiemu_info(_("Unable to get information on FLASH upgrade: <%s>"), srcname);
+      	return err;
+    }
+	ti68k_display_tib_infos(&img);
+
+	// Create destination file
+	basename = g_path_get_basename(srcname);
+	ext = strrchr(basename, '.');
+  	*ext='\0';
+	strcat(basename, ".img");
+
+	*dstname = g_strconcat(dirname, basename, NULL);
+	g_free(basename);
+
+	// Open dest file
+  	f = fopen(*dstname, "wb");
+  	if(f == NULL)
+    {
+      	tiemu_warning("Unable to open this file: <%s>\n", *dstname);
+      	return ERR_CANT_OPEN;
+    }
+
+	// Fill header
+	strcpy(img.signature, IMG_SIGN);
+	img.header_size = sizeof(IMG_INFO);
+	img.revision = IMG_REV;
+    real_size = img.size - SPP;
+    img.size = ti68k_get_rom_size(img.calc_type);
+
+    img.hw_type = hw_type;
+	if(hw_type == -1)
+	{
+		if(img.calc_type == TI89t)
+			img.hw_type = HW3;  //default
+		else if(img.calc_type == TI89 || img.calc_type == TI92p || img.calc_type == V200)
+			img.hw_type = HW2;	// default
+	}
+	
+	// Write header
+	if (fwrite(&img, 1, sizeof(IMG_INFO), f) < sizeof(IMG_INFO))
+	{
+	  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+	  fclose(f);
+	  return ERR_CANT_OPEN;
+	}
+ 
+	// Write boot block
+	memcpy(img.data, &img.data[SPP + BO], 256);
+	if (fwrite(img.data, 1, 256, f) < 256)
+	{
+	  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+	  fclose(f);
+	  return ERR_CANT_OPEN;
+	}
+
+    // Write hardware param block
+
+	// fill structure
+	hwpb.len = 24;
+	switch(img.calc_type)
+	{
+		case TI89:
+			hwpb.hardwareID = HWID_TI89;
+			hwpb.hardwareRevision = img.hw_type - 1;
+			break;
+		case TI92p:
+			hwpb.hardwareID = HWID_TI92P;
+			hwpb.hardwareRevision = img.hw_type - 1;
+			break;
+		case V200:
+			hwpb.hardwareID = HWID_V200;
+			hwpb.hardwareRevision = 2;
+			break;
+		case TI89t:
+			hwpb.hardwareID = HWID_TI89T;
+			hwpb.hardwareRevision = 2;
+			break;
+	}
+	hwpb.bootMajor = hwpb.bootRevision = hwpb.bootBuild = 1;
+	hwpb.gateArray = img.hw_type;
+	ti68k_put_hw_param_block((uint8_t *)img.data, img.rom_base, &hwpb);
+
+	// write filler
+	if (fputc(0xfe, f) < 0 || fputc(0xed, f) < 0 || fputc(0xba, f) < 0 || fputc(0xbe, f) < 0
+	//fwrite(&hwpb, 1hwpb.len+2, f);
+
+	// write address (pointer)
+	|| fputc(0x00, f) < 0
+	|| fputc(img.rom_base, f) < 0
+	|| fputc(0x01, f) < 0
+	|| fputc(0x08, f) < 0
+
+	// write structure
+	|| fputc(MSB(hwpb.len), f) < 0
+	|| fputc(LSB(hwpb.len), f) < 0
+	|| fputc(MSB(MSW(hwpb.hardwareID)), f) < 0
+	|| fputc(LSB(MSW(hwpb.hardwareID)), f) < 0
+	|| fputc(MSB(LSW(hwpb.hardwareID)), f) < 0
+	|| fputc(LSB(LSW(hwpb.hardwareID)), f) < 0
+	|| fputc(MSB(MSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(LSB(MSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(MSB(LSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(LSB(LSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(MSB(MSW(hwpb.bootMajor)), f) < 0
+	|| fputc(LSB(MSW(hwpb.bootMajor)), f) < 0
+	|| fputc(MSB(LSW(hwpb.bootMajor)), f) < 0
+	|| fputc(LSB(LSW(hwpb.bootMajor)), f) < 0
+	|| fputc(MSB(MSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(LSB(MSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(MSB(LSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(LSB(LSW(hwpb.hardwareRevision)), f) < 0
+	|| fputc(MSB(MSW(hwpb.bootBuild)), f) < 0
+	|| fputc(LSB(MSW(hwpb.bootBuild)), f) < 0
+	|| fputc(MSB(LSW(hwpb.bootBuild)), f) < 0
+	|| fputc(LSB(LSW(hwpb.bootBuild)), f) < 0
+	|| fputc(MSB(MSW(hwpb.gateArray)), f) < 0
+	|| fputc(LSB(MSW(hwpb.gateArray)), f) < 0
+	|| fputc(MSB(LSW(hwpb.gateArray)), f) < 0
+	|| fputc(LSB(LSW(hwpb.gateArray)), f) < 0)
+	{
+	  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+	  fclose(f);
+	  return ERR_CANT_OPEN;
+	}
+
+	// Fill with 0xff up-to System Part
+	for(i = 0x108 + hwpb.len+2; i < SPP; i++)
+		if (fputc(0xff, f) < 0)
+		{
+		  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+		  fclose(f);
+		  return ERR_CANT_OPEN;
+		}
+ 
+	// Copy FLASH upgrade at 0x12000 (SPP)
+	num_blocks = real_size / 65536;
+	for(i = 0; i < num_blocks; i++ )
+	{
+		tiemu_info(".");
+		fflush(stdout);
+
+		if (fwrite(&img.data[65536 * i + SPP], sizeof(char), 65536, f) < 65536)
+		{
+		  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+		  fclose(f);
+		  return ERR_CANT_OPEN;
+		}
+	}
+
+	last_block = real_size % 65536;
+	if (fwrite(&img.data[65536 * i + SPP], sizeof(char), last_block, f) < (size_t)last_block)
+	{
+	  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+	  fclose(f);
+	  return ERR_CANT_OPEN;
+	}
+ 
+	tiemu_info("");
+	tiemu_info("Completing to %iMB size\n", img.size >> 20);
+	for(j = SPP + real_size; j < img.size; j++)
+		if (fputc(0xff, f) < 0)
+		{
+		  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+		  fclose(f);
+		  return ERR_CANT_OPEN;
+		}
+ 
+	// Close file
+	if (fclose(f))
+	{
+	  tiemu_warning("Failed to close file: <%s>\n", *dstname);
+	  return ERR_CANT_OPEN;
+	}
+
+	return 0;
+}
+
+/*
+    Convert an romdump into image and replace SPP by upgrade.
+    The resulting image has boot block.
+*/
+int ti68k_merge_rom_and_tib_to_image(const char *srcname1, const char *srcname2, 
+                                     const char *dirname, char **dstname)
+{
+    FILE *f; 
+  	int err;
+	IMG_INFO img;
+	char *ext;
+	gchar *basename;
+    int real_size;
+
+    *dstname = NULL;
+
+	// No filename, exits
+	if(!strcmp(g_basename(srcname1), ""))
+		return ERR_CANT_OPEN;
+
+	if(!strcmp(g_basename(srcname2), ""))
+		return ERR_CANT_OPEN;
+
+	// Preload romdump
+    memset(&img, 0, sizeof(IMG_INFO));
+	err = ti68k_get_rom_infos(srcname1, &img, !0);
+	if(err)
+    {
+	    free(img.data);
+      	tiemu_info(_("Unable to get information on ROM dump: %s"), srcname1);
+      	return err;
+    }
+	ti68k_display_rom_infos(&img);
+
+    // Save size
+    real_size = img.size;
+
+    // Load upgrade
+
+    err = ti68k_get_tib_infos(srcname2, &img, !0);
+	if(err)
+    {
+	    free(img.data);
+      	tiemu_info(_("Unable to get information on ROM dump: %s"), srcname2);
+      	return err;
+    }
+	ti68k_display_tib_infos(&img);
+
+	// Create destination file
+	basename = g_path_get_basename(srcname1);
+	ext = strrchr(basename, '.');
+  	*ext='\0';
+	strcat(basename, ".img");
+
+	*dstname = g_strconcat(dirname, basename, NULL);
+	g_free(basename);
+
+    // Restore size
+    img.size = real_size;
+
+	// Open dest file
+	f = fopen(*dstname, "wb");
+	if(f == NULL)
+	{
+		tiemu_warning("Unable to open this file: <%s>\n", *dstname);
+		return ERR_CANT_OPEN;
+	}
+
+	// Fill header
+	strcpy(img.signature, IMG_SIGN);
+	img.header_size = sizeof(IMG_INFO);
+	img.revision = IMG_REV;
+	img.has_boot = 1;
+
+	// Write file
+	if (fwrite(&img, 1, sizeof(IMG_INFO), f) < sizeof(IMG_INFO)
+	    || fwrite(img.data, sizeof(char), img.size, f) < (size_t)img.size)
+	{
+	  tiemu_warning("Failed to write to file: <%s>\n", *dstname);
+	  fclose(f);
+	  return ERR_CANT_OPEN;
+	}
+
+	// Close file
+	if (fclose(f))
+	{
+	  tiemu_warning("Failed to close file: <%s>\n", *dstname);
+	  return ERR_CANT_OPEN;
+	}
+
+	return 0;
+}
+
+
+/*
+  	This function loads an image.
+*/
+int ti68k_load_image(const char *filename)
+{
+	IMG_INFO *img = &img_infos;
+  	FILE *f;  	
+  	int err;
+
+	// Clear infos
+	memset(img, 0, sizeof(IMG_INFO));
+
+	// No filename, exits
+	if(!strcmp(g_basename(filename), ""))
+	   return ERR_CANT_OPEN;
+
+	// Load infos
+	err = ti68k_get_img_infos(filename, img);
+  	if(err)
+    {
+      	tiemu_info(_("Unable to get information on image: %s"), filename);
+      	return err;
+    }
+	ti68k_display_img_infos(img);
+	
+	// Open file
+	f = fopen(filename, "rb");
+	if(f == NULL)
+	{
+		tiemu_warning("Unable to open this file: <%s>\n", filename);
+		return ERR_CANT_OPEN;
+	}
+
+	// Read pure data
+	if (fseek(f, img->header_size, SEEK_SET))
+	{
+		tiemu_warning("Failed to read from file: <%s>\n", filename);
+		fclose(f);
+		return ERR_CANT_OPEN;
+	}
+
+	img->data = malloc(img->size + 4);
+	if(img->data == NULL)
+		return ERR_MALLOC;
+	if (fread(img->data, 1, img->size, f) < (size_t)img->size)
+	{
+		tiemu_warning("Failed to read from file: <%s>\n", filename);
+		fclose(f);
+		return ERR_CANT_OPEN;
+	}
+
+#if 1
+	{
+		HW_PARM_BLOCK hwblock;
+
+		ti68k_get_hw_param_block((uint8_t *)img->data, img->rom_base, 
+					 &hwblock);
+		ti68k_display_hw_param_block(&hwblock);
+	}
+#endif
+
+	if (fclose(f))
+	{
+		tiemu_warning("Failed to close file: <%s>\n", filename);
+		return ERR_CANT_OPEN;
+	}
+
+	img_loaded = 1;
+	img_changed = 1;
+
+	return 0;
+}
+
+/*
+  	Load a FLASH upgrade (.tib/.9xu/.89u).
+  	Note: an image must have been loaded before 
+  	calling this function.
+*/
+int ti68k_load_upgrade(const char *filename)
+{
+	IMG_INFO tib;
+  	int err;
+    IMG_INFO *img = &img_infos;
+
+	if(!img_loaded)
+		return -1;
+
+	// No filename, exits
+	if(!strcmp(g_basename(filename), ""))
+		return 0;	//ERR_CANT_OPEN;
+
+	memset(&tib, 0, sizeof(IMG_INFO));
+	err = ti68k_get_tib_infos(filename, &tib, !0);
+	if(err)
+    {
+		free(img->data);
+      	tiemu_info(_("Unable to get information on FLASH upgrade: <%s>"), filename);
+      	return err;
+    }
+	ti68k_display_tib_infos(&tib);
+
+    // Allow upgrade ?
+    if(tib.calc_type != img->calc_type)
+    {
+        free(tib.data);
+        return ERR_CANT_UPGRADE;
+    }
+
+	tib.has_boot = 1;	// still bootable
+	memset(tihw.rom+SPP, 0xff, tihw.rom_size-SPP);	// clear FLASH
+	memcpy(tihw.rom+SPP, tib.data+SPP, tib.size-SPP);
+    free(tib.data);
+
+	strcpy(tihw.rom_version, tib.version);
+
+  	img_loaded = 2;
+	img_changed = 2;
+
+	return 0;
+}
+
+/*
+  	Unload an image (free memory).
+*/
+int ti68k_unload_image_or_upgrade(void)
+{
+	IMG_INFO *img = &img_infos;
+
+	if(!img_loaded)
+		return -1;
+
+	img->data = NULL;
+	img_loaded = 0;
+
+	return 0;
+}
+
+
+/*
+    Search for ROM dumps or FLASH upgrades in a given directory 
+	and converts them into images (note: original file is deleted !).
+*/
+int ti68k_scan_files(const char *src_dir, const char *dst_dir, int erase)
+{
+    GDir *dir;
+	GError *error = NULL;
+	G_CONST_RETURN gchar *dirent;
+    gchar *path;
+    int ret;
+    gchar *dstname;
+
+    // Search for  files and convert them
+	dir = g_dir_open(src_dir, 0, &error);
+	if (dir == NULL) 
+	{
+		tiemu_warning(_("Opendir error"));
+      	return ERR_CANT_OPEN_DIR;
+	}
+
+    while ((dirent = g_dir_read_name(dir)) != NULL) 
+	{
+  		if (dirent[0] == '.') 
+  			continue;
+
+        path = g_strconcat(src_dir, dirent, NULL);
+
+        if(ti68k_is_a_rom_file(path))
+        {
+            ret = ti68k_convert_rom_to_image(path, dst_dir, &dstname);
+			if(ret)
+				{
+					g_free(dstname);
+					g_free(path);
+					return ret;
+						}
+
+            if(erase)
+                unlink(path);
+
+            g_free(dstname);
+        }
+
+		if(ti68k_is_a_tib_file(path))
+        {
+            ret = ti68k_convert_tib_to_image(path, dst_dir, &dstname, -1);
+			if(ret)
+				{
+					g_free(dstname);
+					g_free(path);
+				return ret;
+					}
+
+            if(erase)
+                unlink(path);
+
+            g_free(dstname);
+        }
+
+        g_free(path);
+    }
+
+    g_dir_close(dir);
+
+    return 0;
+}
+
+/*
+  	Scan images in a given directory and write list into img_list.txt.
+*/
+int ti68k_scan_images(const char *dirname, const char *filename)
+{
+	FILE *file;
+	IMG_INFO img;
+	GDir *dir;
+	GError *error = NULL;
+	G_CONST_RETURN gchar *dirent;
+	gchar *path, *str;
+	int ret;
+	struct stat f_info;
+  	char *line[7];
+
+  	tiemu_info(_("Scanning images/upgrades... "));
+
+	// Create file (and overwrite)
+	file = fopen(filename, "wt");
+    if(file == NULL)
+	{
+	  	tiemu_warning(_("Unable to open this file: <%s>"), filename);
+	  	return ERR_CANT_OPEN;
+	} 	
+
+  	// List all files available in the directory
+	dir = g_dir_open(dirname, 0, &error);
+	if (dir == NULL) 
+	{
+		tiemu_warning(_("Opendir error"));
+      	return ERR_CANT_OPEN_DIR;
+	}
+  
+	while ((dirent = g_dir_read_name(dir)) != NULL) 
+	{
+  		if (dirent[0] == '.') 
+  			continue;
+   
+	  	path = g_strconcat(dirname, dirent, NULL);
+	  	
+		ret = stat(path, &f_info);
+		if(ret == -1)
+		{
+			tiemu_warning(_("Can not stat: <%s>"), dirent);
+	      	perror("stat: ");
+		}
+		else
+		{
+			if(ti68k_is_a_img_file(path))
+			{
+				memset(&img, 0, sizeof(IMG_INFO));
+				ret = ti68k_get_img_infos(path, &img);
+				if(ret)
+				{
+					tiemu_warning(_("Can not get ROM/update info: <%s>"), path);
+					break;
+				}
+			}
+            else
+				continue;
+
+			str = g_strdup_printf("%iKB", (int)(img.size >> 10));
+
+		  	line[0] = (char *)dirent;
+		  	line[1] = (char *)ti68k_calctype_to_string(img.calc_type);
+	  		line[2] = img.version;
+	  		line[3] = (char *)ti68k_romtype_to_string(img.flash);
+	  		line[4] = str;
+			line[5] = img.has_boot ? _("yes") : _("no");
+			line[6] = (char *)ti68k_hwtype_to_string(img.hw_type);
+	  
+		  	fprintf(file, "%s,%s,%s,%s,%s,%s,%s\n", 
+		  			line[0], line[1], line[2], 
+		  			line[3], line[4], line[5], line[6]);
+			g_free(str);
+		}
+	  	g_free(path);
+    }      
+
+	// Close
+	g_dir_close(dir);
+  
+  	fclose(file);
+  	tiemu_info(_("Done."));
+  
+  	return 0;
+}
+
+
+/*
+  	Search the version string in the ROM
+	Arguments:
+  	- ptr: a ROM or update image
+  	- size: the size of the buffer
+  	- version: the returned string version
+*/
+static int get_rom_version(char *ptr, int size, char *version)
+{
+  	int i;
+
+  	strcpy(version, "?.??");
+
+  	for (i = SPP; i < size-16; i += 2)
+    {
+      if (is_num(ptr[i])&&(ptr[i+1]=='.') && is_num(ptr[i+2]) &&
+	  (ptr[i+3]==0)&&is_alnum(ptr[i+4]) && is_alnum(ptr[i+5]) &&
+	  (ptr[i+6]=='/')&&is_alnum(ptr[i+7]) && is_alnum(ptr[i+8]) &&
+	  (ptr[i+9]=='/')&&is_alnum(ptr[i+10]) && is_alnum(ptr[i+11]))
+	  	break;
+
+      if (is_num(ptr[i]) && (ptr[i+1]=='.') && is_num(ptr[i+2]) && 
+	  is_num(ptr[i+3]) && (ptr[i+4]==0) && is_alnum(ptr[i+5]) && 
+	  is_alnum(ptr[i+6]) && (ptr[i+7]=='/') && is_alnum(ptr[i+8]) && 
+	  is_alnum(ptr[i+9]) && (ptr[i+10]=='/') && is_alnum(ptr[i+11]) && 
+	  is_alnum(ptr[i+12]))
+		break;
+	
+	  if (is_num(ptr[i]) && (ptr[i+1]=='.') && is_num(ptr[i+2]) && 
+	  (ptr[i+3]==0) && is_alnum(ptr[i+4]) && is_alnum(ptr[i+5]) && 
+	  is_alnum(ptr[i+6]) && is_alnum(ptr[i+7]) && is_alnum(ptr[i+8]) && 
+	  is_alnum(ptr[i+9]) && is_alnum(ptr[i+10]) && is_alnum(ptr[i+11]))
+	  	break;
+
+      if (is_num(ptr[i]) && (ptr[i+1]=='.') && is_num(ptr[i+2]) && 
+	  is_alnum(ptr[i+3]) && (ptr[i+4]==0) && is_alnum(ptr[i+5]) && 
+	  is_alnum(ptr[i+6]) && is_alnum(ptr[i+7]) && is_alnum(ptr[i+8]) && 
+	  is_alnum(ptr[i+9]) && is_alnum(ptr[i+10]) && is_alnum(ptr[i+11]))
+	  	break;
+    }
+  
+  	if (i < size-16) 
+    {
+      	int n;
+      
+      	for(n = i; n < i+16; n++) 
+		{
+	  		if (ptr[n]==0) 
+	    	{
+	      		strcpy(version, ptr+i);
+	      		(version)[n-i]=0;
+
+	      		return 0;
+	    	}
+		}
+    }
+    
+  	return 0;
+}
+
+/*
+    Returns the first found image
+*/
+int ti68k_find_image(const char *dirname, char **dst_name)
+{
+    GDir *dir;
+	GError *error = NULL;
+	G_CONST_RETURN gchar *dirent;
+    int ret = 0;
+    char *filename;
+    
+    if(dst_name != NULL)
+	    *dst_name = NULL;
+
+    // Search for *.img files and convert them
+	dir = g_dir_open(dirname, 0, &error);
+	if (dir == NULL) 
+	{
+		tiemu_warning(_("Opendir error"));
+      	return ERR_CANT_OPEN_DIR;
+	}
+
+    filename = NULL;
+
+    while ((dirent = g_dir_read_name(dir)) != NULL) 
+	{
+  		if (dirent[0] == '.') 
+  			continue;
+
+        if(!ti68k_is_a_img_file(dirent))
+            continue;
+
+        filename = g_strconcat(dirname, dirent, NULL);
+        ret = !0;
+        break;
+    }
+
+    g_dir_close(dir);
+
+    if(dst_name != NULL)
+        *dst_name = filename;
+
+    return ret;
+}
diff --git a/src/core/images.h b/src/core/images.h
new file mode 100644
index 0000000..723fa62
--- /dev/null
+++ b/src/core/images.h
@@ -0,0 +1,118 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: images.h 2821 2009-05-04 20:06:12Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_IMAGES__
+#define __TI68K_IMAGES__
+
+#include <stdint.h>
+
+/*
+  Definitions
+*/
+
+#define IMG_SIGN	"TiEmu img v2.00"
+#define IMG_REV		2	// increase this number when changing the structure below
+
+// Please update the docs/TiEmu_img_format.txt documentation when making changes
+// on the structure below
+
+// If this structure is modified, the SAV_REVISION number (state.c)
+// has to be incremented.
+
+typedef struct
+{
+	char	signature[16];	// "TiEmu img v2.00" (dc)
+	int32_t	revision;       // structure revision (compatibility)
+	int32_t	header_size;	// size of this structure and offset to pure data (dc)
+
+	char	calc_type;		// calculator type
+	char	version[5];		// firmware revision
+	char	flash;			// EPROM or FLASH
+	char	has_boot;		// FLASH upgrade does not have boot
+	int32_t	size;			// size of pure data
+	char	hw_type;		// hw1 or hw2
+	uint8_t	rom_base;       // ROM base address (MSB)
+
+	char	fill[0x40-42];  // round up struct to 0x40 bytes
+	char*	data;			// pure data (temporary use, 8 bytes)
+} IMG_INFO32;
+// dc = don't care for rom/tib
+
+typedef struct
+{
+	char	signature[16];	// "TiEmu img v2.00" (dc)
+	int64_t	revision;       // structure revision (compatibility)
+	int64_t	header_size;	// size of this structure and offset to pure data (dc)
+
+	char	calc_type;		// calculator type
+	char	version[5];		// firmware revision
+	char	flash;			// EPROM or FLASH
+	char	has_boot;		// FLASH upgrade does not have boot
+	int64_t	size;			// size of pure data
+	char	hw_type;		// hw1 or hw2
+	uint8_t	rom_base;       // ROM base address (MSB)
+
+	char	fill[0x40-42];  // round up struct to 0x40 bytes
+	char*	data;			// pure data (temporary use, 8 bytes)
+} IMG_INFO64;
+// dc = don't care for rom/tib
+
+#define IMG_INFO IMG_INFO32
+
+extern int		img_loaded;
+extern IMG_INFO img_infos;
+
+/*
+	Functions
+*/
+
+int ti68k_is_a_rom_file(const char *filename);
+int ti68k_is_a_tib_file(const char *filename);
+int ti68k_is_a_img_file(const char *filename);
+
+void ti68k_display_rom_infos(IMG_INFO *rom);
+void ti68k_display_tib_infos(IMG_INFO *tib);
+void ti68k_display_img_infos(IMG_INFO *img);
+
+int ti68k_get_rom_infos(const char *filename, IMG_INFO *rom, int preload);
+int ti68k_get_tib_infos(const char *filename, IMG_INFO *tib, int preload);
+int ti68k_get_img_infos(const char *filename, IMG_INFO *img);
+
+int ti68k_convert_rom_to_image(const char *src, const char *dirname, char **dst);
+int ti68k_convert_tib_to_image(const char *src, const char *dirname, char **dst, int hw_type);
+int ti68k_merge_rom_and_tib_to_image(const char *srcname1, const char *srcname2, 
+                                     const char *dirname, char **dstname);
+
+int ti68k_load_image(const char *filename);
+int ti68k_load_upgrade(const char *filename);
+int ti68k_unload_image_or_upgrade(void);
+
+int ti68k_scan_files(const char *src_dir, const char *dst_dir, int erase);
+int ti68k_scan_images(const char *dirname, const char *filename);
+
+int ti68k_find_image(const char *dirname, char **filename);
+
+#endif
diff --git a/src/core/interface.c b/src/core/interface.c
new file mode 100644
index 0000000..6d69b6c
--- /dev/null
+++ b/src/core/interface.c
@@ -0,0 +1,337 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: interface.c 2792 2008-05-26 16:48:30Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Interface: exported & misc routines
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
+
+#include "libuae.h"
+#include "hw.h"
+#include "m68k.h"
+#include "dbus.h"
+#include "logging.h"
+#ifndef NO_SOUND
+#include "audio.h"
+#endif
+
+#include "ti68k_int.h"
+#include "ti68k_err.h"
+#include "mem_size.h"
+#include "romcalls.h"
+#include "iodefs.h"
+#include "mem_map.h"
+
+/**********************/
+/* Internal variables */
+/**********************/
+
+
+Ti68kParameters     params = { 0 };
+Ti68kHardware       tihw   = { 0 };
+Ti68kLinkPort	    linkp  = { 0 };
+Ti68kBreakpoints	bkpts  = { 0 };
+Ti68kLogging		logger = { 0 };
+
+/***********************************/
+/* Entry points for initialization */
+/***********************************/
+
+
+/*
+  Initialization order (checked by the runlevel):
+  - load the default config
+  - load a ROM (init ROM)
+  - init the lib (init HW, UAE, HID)
+  - reset the lib
+*/
+
+static int is_win_9x(void)
+{
+#ifdef __WIN32__
+	OSVERSIONINFO os;
+
+	memset(&os, 0, sizeof(OSVERSIONINFO));
+	os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+  	GetVersionEx(&os);
+
+	return (os.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
+#else
+	return 0;
+#endif
+}
+
+/*
+  This should be the FIRST function to call (unless the 'params' 
+  structure has been properly initialized.
+ */
+int ti68k_config_load_default(void)
+{
+	params.restricted = 1;
+	params.cpu_rate = -1;
+	params.hw_rate = -1;
+	params.lcd_rate = -1;
+	params.hw_protect = 1;
+	params.recv_file = 1;
+#ifndef NO_SOUND
+	audio_disable();
+#endif
+
+	linkp.cable_delay = DFLT_DELAY;
+	linkp.cable_timeout = is_win_9x() ? 600 : DFLT_TIMEOUT;
+	linkp.cable_port = PORT_1;
+	linkp.cable_model = CABLE_ILP;
+	linkp.calc_model = ti68k_calc_to_libti_calc();
+
+    return 0;
+}
+
+/*
+  This should be the SECOND function to call. 
+  Load a ROM image (images.c).
+*/
+int ti68k_load_image(const char *filename);
+
+/*
+  This is the THIRD function to call for completely initializing the
+  emulation engine.
+*/
+int ti68k_init(void)
+{
+	// init libs
+    ticables_library_init();
+	tifiles_library_init();
+	ticalcs_library_init();
+
+	// check if image has been loaded
+	if(img_loaded == 0)
+		return ERR_NO_IMAGE;
+
+	// set calc type and init hardware
+	memset(&tihw, 0, sizeof(Ti68kHardware));
+    tihw.calc_type = img_infos.calc_type;
+	TRY(hw_init());
+
+	return 0;
+}
+
+/*
+  This should be the FOURTH function to call.
+  It simply resets the hardware engine.
+*/
+int ti68k_reset(void)
+{
+	hw_reset();
+
+	return 0;
+}
+
+/*
+  Close the library by exiting the emulation engine
+  (free ressources).
+*/
+int ti68k_exit(void)
+{
+    TRY(hw_exit());
+
+    ticables_library_exit();
+	tifiles_library_exit();
+	ticalcs_library_exit();
+
+	return 0;
+}
+
+unsigned int ti68k_get_cycle_count(int reset, unsigned int *diff)
+{
+	static unsigned int old_cnt = 0;
+	unsigned int new_cnt;
+
+	new_cnt = hw_m68k_get_cycle_count(reset);
+
+	if(diff != NULL)
+		*diff = new_cnt - old_cnt;
+	old_cnt = new_cnt;
+
+	return new_cnt;
+}
+
+/******************/
+/* Link functions */
+/******************/
+
+int ti68k_linkport_send_file(const char *filename)
+{
+    return send_ti_file(filename);
+}
+
+int ti68k_linkport_unconfigure(void)
+{
+	return hw_dbus_exit();
+}
+
+int ti68k_linkport_reconfigure(void)
+{
+	return hw_dbus_init();
+}
+
+int ti68k_calc_to_libti_calc()
+{
+	switch(tihw.calc_type)
+	{
+    case TI89:  return CALC_TI89;  break;
+	case TI89t: return CALC_TI89T; break;
+	case TI92:  return CALC_TI92;  break;
+	case TI92p: return CALC_TI92P; break;
+	case V200:  return CALC_V200;  break;
+	default: return CALC_NONE; break;
+	}
+
+	return CALC_NONE;
+}
+
+/******************/
+/* Misc functions */
+/******************/
+
+const int ti_rom_base[]  = { ROM_BASE_TI92_I, ROM_BASE_TI89, ROM_BASE_TI92P, ROM_BASE_V200, ROM_BASE_TI89T };
+const int ti_rom_sizes[] = { ROM_SIZE_TI92_I, ROM_SIZE_TI89, ROM_SIZE_TI92P, ROM_SIZE_V200, ROM_SIZE_TI89T };
+const int ti_ram_sizes[] = {RAM_SIZE_TI92_II, RAM_SIZE_TI89, RAM_SIZE_TI92P, RAM_SIZE_V200, RAM_SIZE_TI89T };
+
+const int ti_io_sizes[]  = { IO1_SIZE_TI92_I, IO1_SIZE_TI89, IO1_SIZE_TI92P, IO1_SIZE_V200, IO1_SIZE_TI89T };
+const int ti_io2_sizes[] = { IO2_SIZE_TI92_I, IO2_SIZE_TI89, IO2_SIZE_TI92P, IO2_SIZE_V200, IO2_SIZE_TI89T };
+const int ti_io3_sizes[] = { IO3_SIZE_TI92_I, IO3_SIZE_TI89, IO3_SIZE_TI92P, IO3_SIZE_V200, IO3_SIZE_TI89T };
+
+static int log_b2(int i)
+{
+    int j, v;
+
+    for(j = 0, v = i; v != 0; v >>= 1, j++);
+
+    return j-1;
+}
+
+int ti68k_get_rom_size(int calc_type)
+{
+    if(calc_type > CALC_MAX)
+    {
+        tiemu_error(_("Bad argument!"));
+        exit(0);
+    }
+
+    return ti_rom_sizes[log_b2(calc_type)];
+}
+
+int ti68k_get_ram_size(int calc_type)
+{
+    if(calc_type > CALC_MAX)
+    {
+        tiemu_error(_("Bad argument!"));
+        exit(0);
+    }
+
+    return ti_ram_sizes[log_b2(calc_type)];
+}
+
+int ti68k_get_io_size(int calc_type)
+{
+	if(calc_type > CALC_MAX)
+    {
+        tiemu_error(_("Bad argument!"));
+        exit(0);
+    }
+
+    return ti_io_sizes[log_b2(calc_type)];
+}
+
+int ti68k_get_io2_size(int calc_type)
+{
+	if(calc_type > CALC_MAX)
+    {
+        tiemu_error(_("Bad argument!"));
+        exit(0);
+    }
+
+    return ti_io2_sizes[log_b2(calc_type)];
+}
+
+int ti68k_get_io3_size(int calc_type)
+{
+	if(calc_type > CALC_MAX)
+    {
+        tiemu_error(_("Bad argument!"));
+        exit(0);
+    }
+
+    return ti_io3_sizes[log_b2(calc_type)];
+}
+
+/********/
+/* Misc */
+/********/
+
+void ti68k_unprotect_64KB_range(uint32_t addr)
+{
+    unsigned blockid = addr >> 12, i;
+
+    for (i = blockid; i <= blockid + 16 && i < 64; i++)
+        tihw.ram_exec[i] = 0;
+}
+
+int ti68k_debug_load_symbols(const char *path)
+{
+	if(!strcmp(path, ""))
+		return 0;
+
+	return romcalls_load(path);
+}
+
+int ti68k_debug_load_iodefs(const char *path)
+{
+	if(!strcmp(path, ""))
+		return 0;
+
+	return iodefs_load(path);
+}
+
+int ti68k_debug_load_memmap(const char *path)
+{
+	if(!strcmp(path, ""))
+		return 0;
+
+	return memmap_load(path);
+}
diff --git a/src/core/mem_size.h b/src/core/mem_size.h
new file mode 100644
index 0000000..5d0e634
--- /dev/null
+++ b/src/core/mem_size.h
@@ -0,0 +1,77 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: mem_size.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __TI68K_MEMSIZE__
+#define __TI68K_MEMSIZE__
+
+/*
+	Size of some common memory devices.
+	0 means not supported & used by the hand-held.
+*/
+
+#define RAM_SIZE_TI92_I		(128*KB)
+#define RAM_SIZE_TI92_II	(256*KB)
+#define RAM_SIZE_TI89		(256*KB)
+#define RAM_SIZE_TI92P		(256*KB)
+#define RAM_SIZE_V200		(256*KB)
+#define RAM_SIZE_TI89T		(256*KB)
+
+#define ROM_SIZE_TI92_I		(1*MB)
+#define ROM_SIZE_TI92_II	(2*MB)
+#define ROM_SIZE_TI89		(2*MB)
+#define ROM_SIZE_TI92P		(2*MB)
+#define ROM_SIZE_V200		(4*MB)
+#define ROM_SIZE_TI89T		(4*MB)
+
+#define ROM_BASE_TI92_I		(0)	// 0x200000 or 0x400000
+#define ROM_BASE_TI92_II	0x400000
+#define ROM_BASE_TI89		0x200000
+#define ROM_BASE_TI92P		0x400000
+#define ROM_BASE_V200		0x200000
+#define ROM_BASE_TI89T		0x800000
+
+#define IO1_SIZE_TI92_I		32
+#define IO1_SIZE_TI92_II	32
+#define IO1_SIZE_TI89		32
+#define IO1_SIZE_TI92P		32
+#define IO1_SIZE_V200		32
+#define IO1_SIZE_TI89T		32
+
+#define IO2_SIZE_TI92_I		0
+#define IO2_SIZE_TI92_II	0
+#define IO2_SIZE_TI89		32
+#define IO2_SIZE_TI92P		32
+#define IO2_SIZE_V200		32
+#define IO2_SIZE_TI89T		256	// seems to be 128 instead of 64 ?!
+
+#define IO3_SIZE_TI92_I		0
+#define IO3_SIZE_TI92_II	0
+#define IO3_SIZE_TI89		0
+#define IO3_SIZE_TI92P		0
+#define IO3_SIZE_V200		0
+#define IO3_SIZE_TI89T		256
+
+#endif
diff --git a/src/core/state.c b/src/core/state.c
new file mode 100644
index 0000000..b57bff6
--- /dev/null
+++ b/src/core/state.c
@@ -0,0 +1,447 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: state.c 2601 2007-07-14 08:49:30Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  	State images
+*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <string.h>
+
+#include "libuae.h"
+#include "ti68k_int.h"
+#include "ti68k_err.h"
+#include "flash.h"
+#include "logging.h"
+#include "rtc_hw3.h"
+
+#define SAV_REVISION	21	// Current revision
+#define SAV_MINI		20	// Minimum supported revision
+
+int ti68k_state_parse(const char *filename, char **rom_file, char **tib_file)
+{
+	FILE *f;
+  	IMG_INFO img;
+  	SAV_INFO sav;
+	long pos, len;
+	int ret = 0;
+
+	// No filename, exits
+	if(!strcmp(filename, ""))
+		return 0;
+  
+  	// Open file
+  	f = fopen(filename, "rb");
+  	if(f == NULL)
+  		return ERR_CANT_OPEN_STATE;
+  	
+  	// Load ROM image header
+	fread(&img, 1, sizeof(IMG_INFO), f);
+
+    // Determine state image revision for backwards compatibility and load
+	pos = ftell(f);
+	fread(&sav.revision, sizeof(sav.revision), 1, f);
+	fread(&sav.size, sizeof(sav.revision), 1, f);
+	fseek(f, pos, SEEK_SET);
+	fread(&sav, 1, sav.size, f);
+
+	if(sav.revision < SAV_MINI)
+	{
+		ret = -2;
+		goto ti68k_state_parse_exit;
+	}
+
+	ret = fseek(f, sav.str_offset, SEEK_SET);
+
+	fread(&len, 1, sizeof(long), f);
+	*rom_file = (char *)g_malloc(len);
+	fread(*rom_file, 1, len, f);
+
+	fread(&len, 1, sizeof(long), f);
+	*tib_file = (char *)g_malloc(len);
+	fread(*tib_file, 1, len, f);
+
+	if(strcmp(params.rom_file, *rom_file) || strcmp(params.tib_file, *tib_file))
+	{
+		ret = -2;
+		goto ti68k_state_parse_exit;
+	}
+
+ti68k_state_parse_exit:
+	fclose(f);
+	return ret;
+}
+
+static int load_bkpt(FILE *f, GList **l)
+{
+    int ret;
+    int i;
+    long n, v;
+
+    ret = fread(&n, sizeof(n), 1, f);
+    for(i = 0; i < n; i++)
+    {
+        ret = fread(&v, sizeof(v), 1, f);
+        *l = g_list_append(*l, GINT_TO_POINTER(v));
+    }
+
+    return ret;
+}
+
+static int load_bkpt2(FILE *f, GList **l)
+{
+    int ret;
+    int i;
+    long n;
+
+    ret = fread(&n, sizeof(n), 1, f);
+    for(i = 0; i < n; i++)
+    {
+        ADDR_RANGE *s = g_malloc(sizeof(ADDR_RANGE));
+
+        ret = fread(s, sizeof(ADDR_RANGE), 1, f);
+        *l = g_list_append(*l, s);
+    }
+
+    return ret;
+}
+
+static int load_bkpt3(FILE *f, GList **l)
+{
+    int ret;
+    int i;
+    long n;
+
+    ret = fread(&n, sizeof(n), 1, f);
+    for(i = 0; i < n; i++)
+    {
+        ADDR_BIT *s = g_malloc(sizeof(ADDR_BIT));
+
+        ret = fread(s, sizeof(ADDR_BIT), 1, f);
+        *l = g_list_append(*l, s);
+    }
+
+    return ret;
+}
+
+/*
+  Must be done between init_hardware and M68000_run.
+  Typically called after initLib68k.
+  This function (re)load the state of the calculator.
+  It automagically determine the state file format.
+
+  Return an error code if an error occured, 0 otherwise
+*/
+int ti68k_state_load(const char *filename)
+{
+	FILE *f;
+  	IMG_INFO img;
+  	SAV_INFO sav;
+	Ti68kHardware thw;
+    int ret;
+	long pos;
+	int i;
+	gchar *rf=NULL, *tf=NULL;
+  
+  	// No filename, exits
+	if(!strcmp(filename, ""))
+		return 0;
+  
+  	// Open file
+  	tiemu_info(_("loading state image: %s"), g_basename(filename));
+  	f = fopen(filename, "rb");
+  	if(f == NULL)
+  		return ERR_CANT_OPEN_STATE;
+  	
+  	// Load ROM image header
+	fread(&img, 1, sizeof(IMG_INFO), f);
+
+    // Determine state image revision and load state image header
+	pos = ftell(f);
+	fread(&sav.revision, sizeof(sav.revision), 1, f);
+	fread(&sav.size, sizeof(sav.revision), 1, f);
+	fseek(f, pos, SEEK_SET);
+	fread(&sav, 1, sav.size, f);
+
+	if(sav.revision < SAV_MINI)
+	{
+		fclose(f);
+		return ERR_REVISION_MATCH;
+	}
+
+	// Does not accept state image different of emulator image
+	if(ti68k_state_parse(filename, &rf, &tf) < 0)
+	{
+		if (rf) g_free(rf);
+		if (tf) g_free(tf);
+		return ERR_STATE_MATCH;
+	}
+	if (rf) g_free(rf);
+	if (tf) g_free(tf);
+
+	// Compare image infos with current image
+	if(memcmp(&img, &img_infos, sizeof(IMG_INFO) - sizeof(char *)))
+		return ERR_HEADER_MATCH;
+	
+	// Load internal hardware (registers and special flags)
+    ret = fseek(f, sav.regs_offset, SEEK_SET);
+    fread(&regs, sizeof(regs), 1, f);
+    
+    // Load I/O ports state
+    ret = fseek(f, sav.io_offset, SEEK_SET);
+    fread(tihw.io , tihw.io_size, 1, f);
+    fread(tihw.io2, tihw.io2_size, 1, f);
+	fread(tihw.io3, tihw.io3_size, 1, f);
+    
+    // Load RAM content
+    ret = fseek(f, sav.ram_offset, SEEK_SET);
+    fread(tihw.ram, tihw.ram_size, 1, f);
+
+	// Load extra infos
+	ret = fseek(f, sav.misc_offset, SEEK_SET);
+	fread(&thw, sizeof(Ti68kHardware), 1, f);
+	tihw.on_off = thw.on_off;
+	tihw.lcd_adr = thw.lcd_adr;
+	tihw.contrast = thw.contrast;
+	tihw.protect = thw.protect;
+	tihw.archive_limit = thw.archive_limit;
+	memcpy(tihw.ram_exec, thw.ram_exec, sizeof(tihw.ram_exec));
+
+	tihw.rtc3_beg = thw.rtc3_beg;
+	tihw.rtc3_load = thw.rtc3_load;
+	rtc3_state_load();
+
+	// Load modified FLASH segments
+	ret = fseek(f, sav.rom_offset, SEEK_SET);
+	for(i=0; i<wsm.nblocks; i++)
+    {
+		fread(&wsm.changed[i], sizeof(int), 1, f);
+		if(wsm.changed[i])
+			fread(&tihw.rom[i<<16], 1, 65536, f);
+    }
+
+    // Load bkpts
+    ti68k_bkpt_clear_access();
+	ti68k_bkpt_clear_range();
+    ti68k_bkpt_clear_address();
+	ti68k_bkpt_clear_exception();
+	ti68k_bkpt_clear_pgmentry();
+
+    ret = fseek(f, sav.bkpts_offset, SEEK_SET);
+    load_bkpt(f, &bkpts.code);
+    load_bkpt(f, &bkpts.exception);
+	load_bkpt(f, &bkpts.pgmentry);
+
+    load_bkpt(f, &bkpts.mem_rb);
+	load_bkpt(f, &bkpts.mem_rw);
+	load_bkpt(f, &bkpts.mem_rl);
+	load_bkpt(f, &bkpts.mem_wb);
+	load_bkpt(f, &bkpts.mem_ww);
+	load_bkpt(f, &bkpts.mem_wl);
+
+    load_bkpt2(f, &bkpts.mem_rng_r);
+	load_bkpt2(f, &bkpts.mem_rng_w);
+
+	if(sav.revision >= 21)
+		load_bkpt3(f, &bkpts.bits);
+    
+	// Update UAE structures
+	m68k_setpc(m68k_getpc());
+    MakeFromSR();
+
+	fclose(f);
+
+	// Update SAV file to latest revision
+	if(sav.revision < SAV_REVISION)
+	{
+		ti68k_state_save(filename);
+	}
+
+  	return 0;
+}
+
+static void save_bkpt(FILE *f, GList *l)
+{
+    int i;
+    long n, v;
+
+    n = g_list_length(l);
+    fwrite(&n, sizeof(n), 1, f);
+    for(i = 0; i < n; i++)
+    {
+        v = GPOINTER_TO_INT(g_list_nth(l, i)->data);
+        fwrite(&v, sizeof(v), 1, f);
+    }
+}
+
+static void save_bkpt2(FILE *f, GList *l)
+{
+    int i;
+    long n;
+
+    n = g_list_length(l);
+    fwrite(&n, sizeof(n), 1, f);
+    for(i = 0; i < n; i++)
+    {
+        ADDR_RANGE *s = g_list_nth(l, i)->data;
+
+        fwrite(s, sizeof(ADDR_RANGE), 1, f);
+    }
+}
+
+static void save_bkpt3(FILE *f, GList *l)
+{
+	int i;
+    long n;
+
+    n = g_list_length(l);
+    fwrite(&n, sizeof(n), 1, f);
+    for(i = 0; i < n; i++)
+    {
+        ADDR_BIT *s = g_list_nth(l, i)->data;
+
+        fwrite(s, sizeof(ADDR_BIT), 1, f);
+    }
+}
+
+/*
+  	This function saves the state of the calculator.
+  	Can be called at any time.
+
+  	Return an error code if an error occured, 0 otherwise
+*/
+int ti68k_state_save(const char *filename)
+{
+  	FILE *f;
+  	IMG_INFO *img = &img_infos;
+    SAV_INFO sav;
+	int i;
+	long len;
+	long bkpts_size;
+  
+  	if(!strlen(filename))
+  		return ERR_CANT_OPEN_STATE;
+  
+  	// Open file
+  	tiemu_info(_("saving state image (TiEmu v2.00 format): %s"), filename);
+  	f = fopen(filename, "wb");
+  	if(f == NULL)
+  		return ERR_CANT_OPEN_STATE;
+  	
+  	// Save current image infos
+	fwrite(img, 1, sizeof(IMG_INFO), f);
+
+    // Fill state image infos
+	sav.revision = SAV_REVISION;
+	sav.size = sizeof(SAV_INFO);
+
+    sav.regs_offset = sizeof(IMG_INFO) + sizeof(SAV_INFO);
+    sav.io_offset = sav.regs_offset + sizeof(regs);
+    sav.ram_offset = sav.io_offset + tihw.io_size + tihw.io2_size + tihw.io3_size;
+	sav.misc_offset = sav.ram_offset + tihw.ram_size;
+	sav.rom_offset = sav.misc_offset + sizeof(Ti68kHardware);
+    sav.bkpts_offset = sav.rom_offset + wsm.nblocks*sizeof(int) + hw_flash_nblocks()*65536;
+
+	bkpts_size = 
+		g_list_length(bkpts.code) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.exception) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.pgmentry) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.mem_rb) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.mem_rw) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.mem_rl) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.mem_wb) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.mem_ww) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.mem_wl) * sizeof(long) + sizeof(long) +
+		g_list_length(bkpts.mem_rng_r) * sizeof(ADDR_RANGE) + sizeof(long) +
+		g_list_length(bkpts.mem_rng_w) * sizeof(ADDR_RANGE) + sizeof(long) +
+		g_list_length(bkpts.bits) * sizeof(ADDR_BIT) + sizeof(long)
+		;
+
+	sav.str_offset = sav.bkpts_offset + bkpts_size;
+
+    fwrite(&sav, 1, sizeof(SAV_INFO), f);
+	
+	// Update UAE structures
+    MakeSR();
+    m68k_setpc(m68k_getpc());
+    
+    // Save registers and special flags
+    fwrite(&regs, sizeof(regs), 1, f);
+    
+    // Save I/O ports state
+    fwrite(tihw.io , tihw.io_size, 1, f);
+    fwrite(tihw.io2, tihw.io2_size, 1, f);
+	fwrite(tihw.io3, tihw.io3_size, 1, f);	
+    
+    // Save RAM content
+    fwrite(tihw.ram, tihw.ram_size, 1, f);
+
+	// Save misc informations
+	rtc3_state_save();
+	fwrite(&tihw, sizeof(Ti68kHardware), 1, f);
+
+	// Save modified FLASH segments
+	for(i=0; i<wsm.nblocks; i++)
+    {
+		fwrite(&wsm.changed[i], sizeof(int), 1, f);
+		if(wsm.changed[i])
+			fwrite(&tihw.rom[i<<16], 1, 65536, f);
+    }
+
+    // Save breakpoints
+    save_bkpt(f, bkpts.code);
+    save_bkpt(f, bkpts.exception);
+	save_bkpt(f, bkpts.pgmentry);
+
+    save_bkpt(f, bkpts.mem_rb);
+	save_bkpt(f, bkpts.mem_rw);
+	save_bkpt(f, bkpts.mem_rl);
+	save_bkpt(f, bkpts.mem_wb);
+	save_bkpt(f, bkpts.mem_ww);
+	save_bkpt(f, bkpts.mem_wl);
+
+    save_bkpt2(f, bkpts.mem_rng_r);
+	save_bkpt2(f, bkpts.mem_rng_w);
+
+	save_bkpt3(f, bkpts.bits);
+
+	// Save image location associated with this state image
+	len = strlen(params.rom_file) + 1;
+	fwrite(&len, 1, sizeof(len), f);
+	fwrite(params.rom_file, len, 1, f);
+	
+	len = strlen(params.tib_file) + 1;
+	fwrite(&len, 1, sizeof(len), f);
+	fwrite(params.tib_file, len, 1, f);
+    
+    fclose(f);
+
+  	return 0;
+}
diff --git a/src/core/state.h b/src/core/state.h
new file mode 100644
index 0000000..26ee461
--- /dev/null
+++ b/src/core/state.h
@@ -0,0 +1,54 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: state.h 2601 2007-07-14 08:49:30Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_STATE__
+#define __TI68K_STATE__
+
+// Please update the docs/TiEmu_img_format.txt documentation when making changes
+// on the structure below
+
+// If this structure is modified, the SAV_REVISION number (state.c)
+// has to be incremented.
+typedef struct
+{
+	long	revision;		// structure revision
+	long	size;			// and size (backwards compatibility)
+	long    regs_offset;    // offset to M68K area
+    long    io_offset;      // offset to IO area
+    long    ram_offset;     // offset to RAM area
+	long	misc_offset;	// offset to extra informations
+    long    bkpts_offset;   // offset to bkpts area
+	long	rom_offset;		// offset to FLASH changes
+	long	str_offset;		// offset to image location (string)
+} SAV_INFO;
+
+int ti68k_state_load(const char *filename);
+int ti68k_state_save(const char *filename);
+
+int ti68k_state_parse(const char *filename, char **rom_file, char **tib_file);
+
+int ti68k_is_a_sav_file(const char *filename);
+
+#endif
diff --git a/src/core/ti68k_def.h b/src/core/ti68k_def.h
new file mode 100644
index 0000000..c1081af
--- /dev/null
+++ b/src/core/ti68k_def.h
@@ -0,0 +1,231 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: ti68k_def.h 2819 2009-05-02 19:51:29Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __TI68K_DEFS__
+#define __TI68K_DEFS__
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <glib.h>
+#include <stdint.h>
+
+#include "tilibs.h"
+#include "mem_size.h"
+#include "rtc_hw3.h"
+#include "macros.h"
+
+/* Equivalences */
+
+#ifdef __WIN32__
+# define strcasecmp _stricmp
+#endif
+
+/* Constants */
+
+#define MAXCHARS	256
+
+#define TI92 		(1 << 0)
+#define TI89 		(1 << 1)
+#define TI92p	 	(1 << 2)
+#define V200		(1 << 3)
+#define TI89t		(1 << 4)
+#define CALC_MAX    TI89t
+  
+#define EXTERNAL	0
+#define INTERNAL 	1
+
+#define EPROM_ROM	0
+#define FLASH_ROM 	2
+
+#define KB			(1024)
+#define MB			(1024*KB)
+
+#define HW1			1
+#define HW2			2
+#define HW3         3
+#define HW4         4
+
+#define LCDMEM_W	240		// LCD _memory_ width
+#define LCDMEM_H	128		// LCD _memory_ height
+
+/* Structures */
+
+typedef struct 
+{
+    char *rom_file;
+    char *tib_file;
+    char *sav_file;
+
+    int restricted;     // CPU rate of a real calc
+    int cpu_rate;       // OSC1
+    int hw_rate;        // OSC2
+    int lcd_rate;       // synched OSC2 (hw1) or OSC3 (hw2)
+    int hw_protect;     // HW protection
+    int recv_file;      // receive file enabled/disabled
+} Ti68kParameters;
+
+// If this structure is modified, the SAV_REVISION number (state.c)
+// has to be incremented.
+typedef struct
+{
+    // misc (non hardware pseudo-constants)
+    int			calc_type;
+
+    int			ram_size;	// RAM size
+    int			rom_size;	// ROM size
+	int			io_size;	// HWx io size
+	int			io2_size;	// HW2 io size
+	int			io3_size;	// HW3 io size
+
+	uint32_t	rom_base;	// ROM base address
+    int			rom_flash;	// ROM type
+    char		rom_version[5];	// ROM/AMS version 
+
+	int			hw_type;	// HW1/2/3/4
+
+	int			ti92v1;		// ROM v1.x(y)
+	int			ti92v2;		// ROM v2.x
+
+	int			lcd_w;		// LCD physical width
+	int			lcd_h;		// LCD physical height
+
+    // keyboard
+    int			on_key;
+
+    // lcd
+	uint32_t	lcd_adr;	// LCD address (as $4c00)
+	char*		lcd_ptr;	// direct pointer to LCD in PC RAM
+    int			contrast;
+	int			log_w;		// LCD logical width
+	int			log_h;		// LCD logical height
+	int			on_off;
+	unsigned long	lcd_tick;// used by grayscales
+
+    // memory
+    uint8_t*	rom;		// ROM
+    uint8_t*	ram;		// RAM
+    uint8_t*	io;			// HW1/2/3 i/o ports
+    uint8_t*	io2;		// HW2/3   i/o ports
+	uint8_t*	io3;		// HW3	   i/o ports
+    uint8_t*	unused;		// unused
+
+	uint32_t	initial_ssp;// SSP at vector #0
+    uint32_t	initial_pc;	// PC  at vector #1
+
+    // timer
+    uint8_t     timer_value;// Current timer value
+    uint8_t     timer_init;	// Value to reload
+
+	// rtc (hw2)
+	uint8_t		rtc_value;	// RTC value
+
+	// rtc (hw3)
+	TTIME		rtc3_ref;	// time reference
+	TTIME		rtc3_beg;	// time value when
+	TTIME		rtc3_load;	// clock is load
+
+	// protection
+	int			protect;		// hw protection state
+	uint32_t	archive_limit;	// archive memory limit
+	int			ram_exec[64];	// RAM page execution protection bitmask
+
+} Ti68kHardware;
+
+typedef struct
+{
+	// Memory
+	GList *mem_rb;		// read byte
+	GList *mem_rw;
+	GList *mem_rl;
+
+	GList *mem_wb;		// write byte	
+	GList *mem_ww;	
+	GList *mem_wl;
+
+	GList *mem_rng_r;	// mem range
+	GList *mem_rng_w;
+
+	// Code
+	GList *code;
+
+	// Exceptions
+	GList *exception;
+
+	// Program entry
+	GList *pgmentry;
+
+	// Bits
+	GList *bits;
+
+	// Breakpoint cause
+	int type;       // Ti68kBkptType
+    int mode;       // Ti68kBkptMode
+	int id;
+} Ti68kBreakpoints;
+
+typedef DeviceOptions	Ti68kLinkPort;
+
+typedef struct
+{
+	// PC
+	int         pclog_size;
+    uint32_t*   pclog_buf;
+    int         pclog_ptr;
+
+	// Link
+	int			link_size;	// buffer size
+	uint16_t*	link_buf;	// buffer (LSB is data, MSB is S/R action)
+	int			link_ptr;	// buffer index
+	int			link_mask;	// actions (1: S, 2: R)
+
+} Ti68kLogging;
+
+/* Externs */
+
+extern Ti68kParameters 	params;
+extern Ti68kHardware 	tihw;
+extern Ti68kLinkPort	linkp;
+extern Ti68kBreakpoints	bkpts;
+extern Ti68kLogging		logger;
+
+/* Misc */
+
+#ifndef TRY
+#define TRY(x) { int aaa_; if((aaa_ = (x))) return aaa_; }
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/core/ti68k_err.h b/src/core/ti68k_err.h
new file mode 100644
index 0000000..1230ea2
--- /dev/null
+++ b/src/core/ti68k_err.h
@@ -0,0 +1,50 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: ti68k_err.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_ERRCODES__
+#define __TI68K_ERRCODES__
+
+/* Error codes ERR_...  */
+/* Error codes must begin at 768 up to 1023 */
+
+// New codes
+#define ERR_NONE				0
+#define ERR_CANT_OPEN			768
+#define ERR_INVALID_IMAGE		770
+#define ERR_INVALID_UPGRADE		771
+#define ERR_NO_IMAGE			772
+#define ERR_INVALID_ROM_SIZE	774
+#define ERR_NOT_TI_FILE			775
+#define ERR_MALLOC				776
+#define ERR_CANT_OPEN_DIR		777
+#define ERR_CANT_UPGRADE		778
+#define	ERR_INVALID_ROM			779
+
+#define ERR_CANT_OPEN_STATE		780
+#define ERR_REVISION_MATCH		781
+#define ERR_HEADER_MATCH		782
+#define ERR_STATE_MATCH			783
+
+#endif
diff --git a/src/core/ti68k_int.h b/src/core/ti68k_int.h
new file mode 100644
index 0000000..170b273
--- /dev/null
+++ b/src/core/ti68k_int.h
@@ -0,0 +1,94 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: ti68k_int.h 2433 2007-04-13 19:03:45Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_INTF__
+#define __TI68K_INTF__
+
+#include "ti68k_def.h"
+
+G_BEGIN_DECLS
+#include "tilibs.h"
+ 
+/*************/
+/* Functions */
+/*************/
+
+//Note: [ti68k]_[group]_[short_or_long_name]
+
+// Initialization
+int ti68k_config_load_default(void);
+
+int ti68k_init(void);
+int ti68k_reset(void);
+int ti68k_exit(void);
+
+unsigned int ti68k_get_cycle_count(int reset, unsigned int *diff);
+
+// Link
+int ti68k_linkport_ready(void);
+int ti68k_linkport_send_file(const char *filename);
+int ti68k_linkport_unconfigure(void);
+int ti68k_linkport_reconfigure(void);
+int ti68k_calc_to_libti_calc(void);
+
+// Keyboard
+void ti68k_kbd_set_key(int key, int active);
+int ti68k_kbd_is_key_pressed(int key);
+int ti68k_kbd_push_chars(const char *chars);
+
+// Misc
+int ti68k_get_rom_size(int calc_type);
+int ti68k_get_ram_size(int calc_type);
+int ti68k_get_io_size(int calc_type);
+int ti68k_get_io2_size(int calc_type);
+int ti68k_get_io3_size(int calc_type);
+
+uint8_t* ti68k_get_real_address(uint32_t addr);
+
+// HW protection for the debugger
+void ti68k_unprotect_64KB_range(uint32_t addr);
+
+// Others
+#include "bkpts.h"
+#include "images.h"
+#include "registers.h"
+#include "state.h"
+#include "type2str.h"
+#include "debug.h"
+#include "timem.h"
+#include "vat.h"
+
+// Errors
+int ti68k_error_get(int err_num, char **error_msg);
+
+// Misc
+int ti68k_debug_load_symbols(const char *path);
+int ti68k_debug_load_iodefs(const char *path);
+int ti68k_debug_load_memmap(const char *path);
+G_END_DECLS
+
+#endif
diff --git a/src/core/ti_hw/bits.h b/src/core/ti_hw/bits.h
new file mode 100644
index 0000000..fad07f0
--- /dev/null
+++ b/src/core/ti_hw/bits.h
@@ -0,0 +1,42 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __BITS__
+#define __BITS__
+
+#define bit_get(v,b)	(((v) & (1 << (b))) >> (b))
+#define bit_set(v,b)	v |=  (1 << (b));
+#define bit_clr(v,b)	v &= ~(1 << (b));
+
+#define bit_tst(v,b)    ((v) &  (1 << b))
+#define bit_chg(v,b,s)	{                           \
+                            if(s)                   \
+                                { bit_set(v,b); }   \
+                            else                    \
+                                { bit_clr(v,b); }   \
+                        }
+
+#endif
diff --git a/src/core/ti_hw/dbus.c b/src/core/ti_hw/dbus.c
new file mode 100644
index 0000000..6bbdacf
--- /dev/null
+++ b/src/core/ti_hw/dbus.c
@@ -0,0 +1,689 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbus.c 2839 2009-05-08 19:50:07Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Linkport management (D-bus serial input/output)
+*/
+
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <string.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "dbus.h"
+#include "m68k.h"
+#include "engine.h"
+#include "gettimeofday.h"
+
+#include "tilibs.h"
+#include "ti68k_err.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "tie_error.h"
+
+CableHandle* cable_handle = NULL;
+CalcHandle*  calc_handle  = NULL;
+
+/*
+	Linkport (lp) / directfile (df) / void (vd) mappers
+*/
+
+void	(*hw_dbus_reinit)		(void);
+void	(*hw_dbus_putbyte)		(uint8_t arg);	// TI -> outside
+uint8_t (*hw_dbus_getbyte)		(void);			// outside -> TI
+int		(*hw_dbus_checkread)	(void);
+
+static void		lp_reinit	(void);
+static void		lp_putbyte	(uint8_t arg);
+static uint8_t	lp_getbyte	(void);
+static int		lp_checkread(void);
+
+static void		df_reinit	(void);
+static void		df_putbyte	(uint8_t arg);
+static uint8_t	df_getbyte	(void);
+static int		df_checkread(void);
+
+static void		vd_reinit	(void);
+static void		vd_putbyte	(uint8_t arg);
+static uint8_t	vd_getbyte	(void);
+static int		vd_checkread(void);
+
+static void map_dbus_to_cable(void)
+{
+	hw_dbus_reinit = lp_reinit;
+    hw_dbus_putbyte = lp_putbyte;
+    hw_dbus_getbyte = lp_getbyte;
+    hw_dbus_checkread = lp_checkread;
+}
+
+static void map_dbus_to_file(void)
+{
+	hw_dbus_reinit = df_reinit;
+    hw_dbus_putbyte = df_putbyte;
+    hw_dbus_getbyte = df_getbyte;
+    hw_dbus_checkread = df_checkread;
+}
+
+static void map_dbus_to_void(void)
+{
+	hw_dbus_reinit = vd_reinit;
+    hw_dbus_putbyte = vd_putbyte;
+    hw_dbus_getbyte = vd_getbyte;
+    hw_dbus_checkread = vd_checkread;
+}
+
+/*
+    D-bus management (HW linkport)
+*/
+
+static int dbus_set = 0;
+
+int ilp_reset(CableHandle *h);
+int ilp_send(CableHandle *h, uint8_t *data, uint32_t len);
+int ilp_recv(CableHandle *h, uint8_t *data, uint32_t len);
+
+int hw_dbus_init(void)
+{
+	int err;
+
+	// exit has to be called before init
+	if(dbus_set)
+		return 0;
+
+	// don't let linkport function pointers uninitialized
+	map_dbus_to_void();
+
+	// set cable
+	cable_handle = ticables_handle_new(linkp.cable_model, linkp.cable_port);
+	if(cable_handle == NULL)
+	{
+		tiemu_err(0, "Can't set cable");
+		return -1;
+	}
+
+	ticables_options_set_timeout(cable_handle, linkp.cable_timeout);
+	ticables_options_set_delay(cable_handle, linkp.cable_delay);
+
+	// set calc
+	linkp.calc_model = ti68k_calc_to_libti_calc();
+	calc_handle = ticalcs_handle_new(linkp.calc_model);
+	if(calc_handle == NULL)
+	{
+		tiemu_err(0, "Can't set cable");
+		return -1;
+	}
+	
+	// attach cable to calc (open cable)
+	err = ticalcs_cable_attach(calc_handle, cable_handle);
+	if(err)
+	{
+		ticalcs_handle_del(calc_handle);
+		ticables_handle_del(cable_handle);
+		tiemu_err(err, NULL);
+		return -1;
+	}
+
+	// customize cable by overriding some methods
+	if(linkp.cable_model == CABLE_ILP)
+	{
+		cable_handle->cable->reset = ilp_reset;
+		cable_handle->cable->send  = ilp_send;
+		cable_handle->cable->recv  = ilp_recv;
+	}
+
+	// and set pointers
+	if(linkp.cable_model == CABLE_ILP)
+		map_dbus_to_file();		// set mappers to internal file loader
+	else
+		map_dbus_to_cable();	// set mappers to external link cable
+
+	dbus_set = !0;
+
+    return 0;
+}
+
+int hw_dbus_reset(void)
+{
+	// has to be init'ed first
+	if(!dbus_set)
+		return 0;
+
+	hw_dbus_reinit();
+
+	return 0;
+}
+
+int hw_dbus_exit(void)
+{
+	int err;
+
+	// init has to be called before exit
+	if(!dbus_set)
+		return 0;
+
+	// don't let linkport function pointers uninitialized
+	map_dbus_to_void();
+
+	// detach cable from calc (close cable)
+	err = (calc_handle ? ticalcs_cable_detach(calc_handle) : 0);
+	if(err)
+	{
+		tiemu_err(err, NULL);
+		return -1;
+	}
+
+	// delete calc & cable handles
+	if (calc_handle) ticalcs_handle_del(calc_handle);
+	if (cable_handle) ticables_handle_del(cable_handle);
+
+	dbus_set = 0;
+
+	return 0;
+}
+
+/*
+	Void cable access
+*/
+
+static void		vd_reinit	(void) {};
+static void		vd_putbyte	(uint8_t arg) {};
+static uint8_t	vd_getbyte	(void) { return 0; };
+static int		vd_checkread(void) { return 0; };
+
+/*
+	Link cable access
+*/
+
+static int avail = 0;
+
+static void lp_reinit(void)
+{
+	int err;
+
+	avail = 0;
+	err = ticables_cable_reset(cable_handle);
+	if(err)
+		tiemu_err(err, NULL);
+}
+
+static void lp_putbyte(uint8_t arg)
+{
+	int err;
+  
+	err = ticables_cable_put(cable_handle, arg);
+	if(err)
+	{
+		io_bit_set(0x0d,7);	// error
+		printf("lp_putbyte error !\n");
+		return;
+	}
+
+	io_bit_set(0x0d,6);		// tx reg empty
+	io_bit_set(0x0d,2);		// link activity
+}
+
+static uint8_t lp_getbyte(void)
+{
+	int err;
+	uint8_t arg;
+
+	if(!avail)
+	{
+		io_bit_set(0x0d,7);
+		printf("lp_getbyte (byte lost) !\n");
+	}
+
+	err = ticables_cable_get(cable_handle, &arg);
+	if(err)
+    {
+		io_bit_set(0x0d,7);	// error
+		printf("lp_getbyte error !\n");
+		return 0x00;
+    }
+
+	avail = 0;
+	return arg;
+}
+
+static int lp_checkread(void)
+{
+	int err = 0;
+	CableStatus status = 0;
+
+	if(avail)
+	    return 0;
+
+	err = ticables_cable_check(cable_handle, &status);
+	if(err)
+	{
+	    io_bit_set(0x0d,7);		// error
+		printf("lp_checkread error !\n");
+		return 0x00;
+	}
+  
+	if(status & STATUS_RX)
+	{
+		io_bit_set(0x0d,5);		// rx reg full
+		io_bit_set(0x0d,2);		// link activity
+		avail = !0;
+    }
+  
+	return avail;
+}
+
+
+/*
+	Link file access
+*/
+
+static int sip = 0;	// sending in progress
+static int rip = 0;	// receive in progress
+ 
+int t2f_data;   // ti => file data
+int t2f_flag;   // data available
+
+int f2t_data;   // file => ti data
+int f2t_flag;   // data available
+
+int recfile_flag; // receive file at end of instruction
+
+void df_reinit(void)
+{
+	t2f_flag = f2t_flag = 0;
+}
+
+void df_putbyte(uint8_t arg)
+{
+	t2f_data = arg;
+	t2f_flag = 1;
+
+	if(!sip)
+	{
+		if(params.recv_file)
+			recfile_flag = 1;
+		else
+			io_bit_set(0x0d,7);	// SLE=1: error
+	}
+}
+
+uint8_t df_getbyte(void)
+{
+	f2t_flag = 0;
+    return f2t_data;
+}
+
+int df_checkread(void)
+{
+	if(f2t_flag)
+	{
+		io_bit_set(0x0d,5);		// rx reg full
+	}
+
+    return f2t_flag;
+}
+
+
+/*
+    Internal link port emulation for direct sending/receiving files.
+    The code below is not very obvious at first glance. This is the
+    reason why I am explaining the idea and mechanisms.
+
+    The idea is to use TiLP's libticalcs since libticalcs contains all the code
+    needed for communicating with a TI (software protocol, file handling). 
+    The libticalcs is built on libticables, a library which handles link cables
+    (hardware protocol).
+    In fact, I simply reimplement the basic functions of libticables usually 
+    used by libticalcs for sending/receiving data. These functions exchange
+    bytes with the linkport at HW level (ports.c).
+    The libticalcs provides the abstraction we need for this.
+
+	Wonderful, isn't it ?! Take a look at the 'TiLP framework' power ;-)
+*/
+
+/* libticables functions (link API) */
+
+int ilp_reset(CableHandle *h)
+{
+	return t2f_flag = f2t_flag = 0;
+}
+
+int ilp_send(CableHandle *h, uint8_t *data, uint32_t len)
+{
+	unsigned int i;
+	tiTIME clk;
+
+	for(i = 0; i < len; i++)
+	{
+  		f2t_data = data[i]; 
+  		f2t_flag = 1;
+
+		io_bit_set(0x0d,5);	// SRX=1 (rx reg is full)
+		hw_m68k_irq(4);		// this turbo-boost transfer !
+
+		TO_START(clk);
+  		while(f2t_flag) 
+		{ 
+			hw_m68k_run(1, 0);
+			if(TO_ELAPSED(clk, linkp.cable_timeout))
+				return ERROR_WRITE_TIMEOUT;
+		};
+	}
+
+  	return 0;
+}
+
+int ilp_recv(CableHandle *h, uint8_t *data, uint32_t len)
+{
+	unsigned int i;
+	tiTIME clk;
+
+	for(i = 0; i < len; i++)
+	{
+		TO_START(clk);
+  		while(!t2f_flag) 
+		{ 
+      		hw_m68k_run(1, 0);
+			if(TO_ELAPSED(clk, linkp.cable_timeout))
+				return ERROR_WRITE_TIMEOUT;
+		};
+    
+  		data[i] = t2f_data;
+  		t2f_flag = 0;
+
+		io_bit_set(0x0d,6);	// STX=1 (tx reg is empty)
+		hw_m68k_irq(4);		// this turbo-boost transfer (30% faster)
+	}
+
+	return 0;
+}
+
+static int do_cpu(int duration)	// thenth of seconds
+{
+	tiTIME clk;
+	TO_START(clk);
+  	while(1) 
+	{ 
+      	hw_m68k_run(1, 0);
+		if(TO_ELAPSED(clk, duration))
+			return !0;;
+	};
+	return 0;
+}
+
+int send_ti_file(const char *filename)
+{
+    gint ok = 0;
+	int ret;
+	struct timeval start, finish;
+	double duration;
+
+    // Check for TI file
+    if(!tifiles_file_is_ti(filename))
+        return ERR_NOT_TI_FILE;
+
+	if(((tifiles_file_get_model(filename) == CALC_TI92)) ||
+		(tifiles_file_get_model(filename) == CALC_TI89)  ||
+		(tifiles_file_get_model(filename) == CALC_TI89T) ||
+		(tifiles_file_get_model(filename) == CALC_TI92P) ||
+		(tifiles_file_get_model(filename) == CALC_V200)  ||
+		(tifiles_file_is_tigroup(filename))
+	  )
+    {
+        ok = 1;
+    } 
+	else
+        return ERR_NOT_TI_FILE;
+
+	// Use direct file loading
+	gettimeofday(&start, NULL);
+	sip = 1;
+
+	// Check whether calc is ready... Otherwise, goes to HOME.
+	ret = ticalcs_calc_isready(calc_handle);
+
+	if(ret == 257)	/* ERR_NOT_READY = 257 */
+	{
+		switch(tihw.calc_type)
+		{
+		case TI89:
+		case TI89t:
+			ret = ticalcs_calc_send_key(calc_handle, 277);
+			break;
+		case TI92:
+		case TI92p:
+		case V200:
+			ret = ticalcs_calc_send_key(calc_handle, 8273);
+			break;
+
+		default: break;
+		}
+
+		do_cpu(5);
+
+		if(ret)
+		{
+			sip = 0;
+			goto send_ti_file_exit;
+		}
+	}
+
+    // FLASH APP file ?
+    if(tifiles_file_is_app(filename))
+    {   
+		// increase timeout due to excessive time for last ACK
+		linkp.cable_timeout *= 10;
+		ret = ticalcs_calc_send_app2(calc_handle, filename);
+		linkp.cable_timeout /= 10;
+    }
+
+    // FLASH OS file ?
+    if(tifiles_file_test(filename, TIFILE_OS, calc_handle->model))
+    {
+		ret = ticalcs_calc_send_app2(calc_handle, filename);
+    }
+
+    // Group file ?
+    else if(tifiles_file_is_group(filename))
+    {
+		ret = ticalcs_calc_send_var2(calc_handle, MODE_NORMAL, filename);
+    }
+
+	// Backup file ?
+    else if(tifiles_file_is_backup(filename))
+    {
+		ret = ticalcs_calc_send_backup2(calc_handle, filename);
+    }
+
+    // Single file
+    else if(tifiles_file_is_single(filename))
+    {
+		ret = ticalcs_calc_send_var2(calc_handle, MODE_NORMAL, filename);
+    }
+
+	// TiGroup file
+	else if(tifiles_file_is_tigroup(filename))
+	{
+		// increase timeout due to excessive time for last ACK (file may contains apps)
+		linkp.cable_timeout *= 10;
+		ret = ticalcs_calc_send_tigroup2(calc_handle, filename, TIG_ALL);
+		linkp.cable_timeout /= 10;
+	}
+
+	// Restore link cable use
+	sip = 0;
+	gettimeofday(&finish, NULL);
+	duration = (double)(finish.tv_sec - start.tv_sec)
+	           + (double)(finish.tv_usec - start.tv_usec) / 1000000.;
+	printf("Duration: %2.1lf seconds.\n", duration);
+
+	// Transfer aborted ? Set hw link error
+send_ti_file_exit:
+	if(ret)
+	{
+		tiemu_err(ret, NULL);
+		io_bit_set(0x0d,7);	// SLE=1
+		df_reinit();
+	}
+
+	return 0;
+}
+
+int ti68k_linkport_ready(void)
+{
+	int ret;
+	int pedrom;
+
+	// Some OS versions lock up if they get a readiness probe too early in the boot cycle.
+	hw_m68k_run(1250000,5000000);
+
+	// Hack: PedroM doesn't like resetting the link flag here, so handle it specially.
+	//       Test this now because this might not be set yet if the OS hasn't booted up yet.
+	pedrom = (mem_rd_word(0x32) == (('R'<<8)+'O'));
+
+	// Block sending and receiving.
+	if (sip || rip)
+		return 0;
+	sip = 1;
+	ret = ticalcs_calc_isready(calc_handle);
+
+	if(ret)
+	{
+		if (!pedrom)
+			io_bit_set(0x0d,7);	// SLE=1
+		df_reinit();
+
+		// Try getting the calculator ready.
+		// FIXME: This won't work immediately, it will at first return FALSE a few times and you'll have to retry.
+		// However, it should be enough for KTIGCC to work.
+		engine_stop();
+		hw_m68k_irq(6);
+		while (ti68k_debug_is_supervisor())
+			hw_m68k_run(1,0);
+		engine_start();
+
+		ti68k_kbd_push_chars("\f");
+
+		hw_m68k_run(1250000,5000000);
+
+		ret = ticalcs_calc_isready(calc_handle);
+	}
+
+	if(ret)
+	{
+		if (!pedrom)
+			io_bit_set(0x0d,7);	// SLE=1
+		df_reinit();
+	}
+
+	sip = 0;
+	return !ret;
+}
+
+
+int display_recv_files_dbox(const char *src, const char *dst);
+
+int recfile(void)
+{
+	int ret;
+	char src_fn[1024];
+	char dst_fn[1024];
+	VarEntry *ve;
+
+	recfile_flag = 0;
+
+	// Make this function not re-entrant
+	if(rip)
+		return 0;
+	else
+		rip = 1;
+
+	// Some models and AMS versions send an RDY packet when entering in
+	// the VAR-Link menu or just before sending variable. We skip it !
+	if(t2f_data == 0x89 && tihw.calc_type != TI92)
+	{
+		uint8_t arg[4];
+		int i;
+
+		ilp_recv(cable_handle, arg, 4);
+		for(i = 0; i < 4; i++)
+			printf("purging <%02x>\n", arg[i]);
+
+		if(tihw.calc_type != TI89t)
+			goto recfile_end;
+	}
+
+	// Receive variable in non-silent mode
+	strcpy(src_fn, g_get_tmp_dir());
+	strcat(src_fn, G_DIR_SEPARATOR_S);
+	strcat(src_fn, "file.rec");
+
+	ret = ticalcs_calc_recv_var_ns2(calc_handle, MODE_NORMAL, src_fn, &ve);
+
+	// Check for error
+	if(ret)
+	{
+		io_bit_set(0x0d,7);	// SLE=1
+		t2f_flag = f2t_flag = 0;
+
+		tiemu_err(ret, NULL);
+		goto recfile_end;
+	}
+
+	// Construct filename
+	strcpy(dst_fn, g_get_tmp_dir());
+	strcat(dst_fn, G_DIR_SEPARATOR_S);
+
+	if(ve)
+	{
+		char *basename;
+
+		//single
+		basename = ticonv_varname_to_filename(calc_handle->model, ve->name, ve->type);
+		strcat(dst_fn, basename);
+		strcat(dst_fn, ".");
+		strcat(dst_fn, tifiles_vartype2fext(calc_handle->model, ve->type));
+
+		tifiles_ve_delete(ve);
+	}
+	else
+	{
+		// group
+		strcat(dst_fn, "group.");
+		strcat(dst_fn, tifiles_fext_of_group(linkp.calc_model));
+	}
+
+	// Open a box
+	display_recv_files_dbox(src_fn, dst_fn);
+
+	// end
+recfile_end:
+	rip = 0;
+
+	return 0;	
+}
diff --git a/src/core/ti_hw/dbus.h b/src/core/ti_hw/dbus.h
new file mode 100644
index 0000000..9877179
--- /dev/null
+++ b/src/core/ti_hw/dbus.h
@@ -0,0 +1,53 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_DBUS__
+#define __TI68K_DBUS__
+
+#include "tilibs.h"
+
+int hw_dbus_init(void);
+int hw_dbus_reset(void);
+int hw_dbus_exit(void);
+
+extern void    (*hw_dbus_reinit)	(void);
+extern void    (*hw_dbus_putbyte)	(uint8_t arg);
+extern uint8_t (*hw_dbus_getbyte)	(void);
+extern int     (*hw_dbus_checkread)	(void);
+
+int send_ti_file(const char *filename);
+
+int recfile(void);
+
+/* Variables */
+
+extern CableHandle* cable_handle;
+extern CalcHandle*  calc_handle;
+
+extern int recfile_flag;
+
+#endif
+
diff --git a/src/core/ti_hw/flash.c b/src/core/ti_hw/flash.c
new file mode 100644
index 0000000..5bf0411
--- /dev/null
+++ b/src/core/ti_hw/flash.c
@@ -0,0 +1,344 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: flash.c 2372 2007-02-25 21:43:23Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    FLASH algorithm management:
+	- Sharp's LH28F160S3T: TI89/TI92+
+	- Sharp's LH28F320BF: V200/TI89 Titanium
+*/
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h> //memset
+
+#include "mem.h"
+#include "ti68k_def.h"
+#include "flash.h"
+#include "logging.h"
+
+FLASH_WSM   wsm;
+
+int hw_flash_init(void)
+{
+	memset(&wsm, 0, sizeof(FLASH_WSM));
+	wsm.nblocks = tihw.rom_size >> 16;
+	wsm.changed = calloc(wsm.nblocks, sizeof(int));
+	wsm.write_phase = 0x50;
+	return 0;
+}
+
+int hw_flash_reset(void)
+{
+	return 0;
+}
+
+int hw_flash_exit(void)
+{
+	if(wsm.changed != NULL)
+		free(wsm.changed);
+
+	wsm.changed = NULL;
+	return 0;
+}
+
+int hw_flash_nblocks(void)
+{
+	int i, n = 0;
+
+	for(i = 0; i < wsm.nblocks; i++)
+		if(wsm.changed[i])
+			n++;
+
+	return n;
+}
+
+/*
+	Read a byte from a Sharp FLASH memory.
+*/
+uint8_t FlashReadByte(uint32_t addr)
+{
+	if (wsm.write_phase == 0x90)
+	{
+		switch(addr & 0xffff)
+		{
+		case 0:	return (tihw.calc_type == V200 || tihw.calc_type == TI89t) ? 0xb0 : 0x89; // manufacturer code
+		case 1:	return 0x00;
+		case 2: return 0xb5;	// device code
+		case 3: return 0x00;
+		default: return 0xff;
+		}
+	}
+	
+	return get_b(tihw.rom, addr, tihw.rom_size - 1) | wsm.ret_or;
+}
+
+uint16_t FlashReadWord(uint32_t addr)
+{
+	if (wsm.write_phase == 0x90)
+	{
+		switch(addr & 0xffff)
+		{
+		case 0:	return (tihw.calc_type == V200 || tihw.calc_type == TI89t) ? 0xb0 : 0x89; // manufacturer code
+		case 2: return 0x00b5;	// device code
+		default: return 0xffff;
+		}
+	}
+
+	return get_w(tihw.rom, addr, tihw.rom_size - 1) | wsm.ret_or;
+}
+
+uint32_t FlashReadLong(uint32_t addr)
+{
+	return (FlashReadWord(addr) << 16) | FlashReadWord(addr+2);
+}
+
+/*
+	Write a byte to a Sharp FLASH memory
+*/
+void FlashWriteByte(uint32_t addr, uint8_t v)
+{
+	//int i;
+    uint8_t *rom = tihw.rom;
+  
+	if(tihw.calc_type == TI92)
+        return;
+
+    if(tihw.protect) 
+        return;
+
+	addr -= tihw.rom_base;
+	addr &= tihw.rom_size - 1;
+
+    // Write State Machine (WSM, Sharp's data sheet)
+    if (wsm.write_ready)
+    {
+		if(rom[addr] != v)
+			wsm.changed[addr>>16] = !0;
+		rom[addr] &= v; /* can't set bits from 0 to 1 with a write! */
+            
+		wsm.write_ready--;
+        wsm.ret_or = 0xffffffff;
+    }
+    else if (v == 0x50)
+	{
+		// clear status register
+        wsm.write_phase = 0x50;
+	}
+    else if (v == 0x10)
+    {
+		//byte write setup/confirm
+        if (wsm.write_phase == 0x50)
+		{
+	        wsm.write_phase = 0x51;
+		}
+        else if (wsm.write_phase == 0x51)
+        {
+	        wsm.write_ready = 2;
+	        wsm.write_phase = 0x50;
+        }
+    }
+    else if (v == 0x20)
+    {
+		// block erase setup/confirm
+        if (wsm.write_phase == 0x50)
+		{
+	        wsm.write_phase = 0x20;
+		}
+    }
+    else if (v == 0xd0)
+    {
+		// confirm and block erase
+        if (wsm.write_phase == 0x20)
+        {
+	        wsm.write_phase = 0xd0;
+	        wsm.ret_or = 0xffffffff;
+	        wsm.erase = 0xffffffff;
+	        wsm.erase_phase = 0;
+
+			memset(&rom[addr & 0xff0000], 0xff, 64*KB);
+			wsm.changed[addr>>16] = !0;
+			//printf("%i erased\n", addr>>16);
+        } 
+    }
+    else if (v == 0xff)
+    {
+		// read array/reset
+        if (wsm.write_phase == 0x50)
+        {
+	        wsm.write_ready = 0;
+	        wsm.ret_or = 0;
+        }
+    }
+	else if (v == 0x90)
+	{
+		// read identifier codes
+		wsm.write_phase = 0x90;
+	}
+}
+
+void FlashWriteWord(uint32_t addr, uint16_t data)
+{
+	// roms: fix me...
+	FlashWriteByte(addr+0,MSB(data));
+	FlashWriteByte(addr+1,LSB(data));
+}
+
+void FlashWriteLong(uint32_t addr, uint32_t data)
+{
+	FlashWriteWord(addr+0,(uint16_t)((data>>16)&0xffff));
+	FlashWriteWord(addr+2,(uint16_t)((data>> 0)&0xffff));
+}
+
+/*
+	Search for a vector table and get SSP & PC values.
+	This is needed by m68k_reset() for booting.
+*/
+void find_ssp_and_pc(uint32_t *ssp, uint32_t *pc)
+{
+    int vt = 0x000000; // vector table
+
+    // find PC reset vector
+    if(tihw.rom_flash)
+    { 
+        // FLASH (TI89, TI92+, V200, ...)
+        for (vt = 0x12000; vt < tihw.rom_size; vt++)
+	    {
+			uint8_t *rom = tihw.rom + vt;
+
+			if(rom[0] == 0xcc && rom[1] == 0xcc && rom[2] == 0xcc && rom[3] == 0xcc)
+            {
+	            vt += 4;
+	            break;
+	        }
+        }
+
+		*ssp = tihw.rom[vt+3] | (tihw.rom[vt+2]<<8) |
+            (tihw.rom[vt+1]<<16) | (tihw.rom[vt]<<24);
+    
+        vt += 4; // skip SP
+   
+        *pc = tihw.rom[vt+3] | (tihw.rom[vt+2]<<8) |
+            (tihw.rom[vt+1]<<16) | (tihw.rom[vt]<<24);
+    }
+	else
+    { 
+		// EPROM (TI92)
+		vt = 0;
+
+		*ssp = tihw.rom[vt+3] | (tihw.rom[vt+2]<<8) |
+            (tihw.rom[vt+1]<<16) | (tihw.rom[vt]<<24);
+
+		vt += 4; // skip SP
+      
+		*pc = tihw.rom[vt+3] | (tihw.rom[vt+2]<<8) |
+			(tihw.rom[vt+1]<<16) | (tihw.rom[vt]<<24);
+    }
+
+	tiemu_info(_("found SSP=$%06x and PC=$%06x at offset 0x%x"), *ssp, *pc, vt - 0x12000);
+}
+
+/*
+#if 0
+#define	printd	printf
+#else
+#define printd	
+#endif
+
+void FlashWriteWord(uint32_t addr, uint16_t data)
+{
+	uint8_t *rom = tihw.rom;
+  
+	if(tihw.calc_type == TI92)
+        return;
+
+    if(tihw.protect) 
+        return;
+
+	addr -= tihw.rom_base;
+	addr &= tihw.rom_size - 1;
+
+	if((addr & 0x1fff) == 0x1000)
+		printf("WW: $%06x: %04x ($%06x)\n", addr+ti_rom_base[log_b2(tihw.calc_type)], data, m68k_getpc());
+
+    // Write State Machine (WSM, Sharp's data sheet)
+	switch(data & 0xff)
+	{
+	case FCD_SETUP_BYTE_WRITE:	//0x10: byte write setup/confirm
+		printd("FCD_SETUP_BYTE_WRITE: $%06x\n", m68k_getpc());
+		wsm.cmd = 0x10;
+		wsm.write = 1;
+		break;
+	default:
+		printd("FCD_BYTE_WRITE: %04x at $%06x\n", data, m68k_getpc());
+		if(wsm.write)
+		{
+			wsm.cmd = 0xff;
+			rom[addr+0] = MSB(data);
+			rom[addr+1] = LSB(data);
+			wsm.write = 0;
+			wsm.ret_or = 0xffffffff;
+		}
+		break;
+	case FCD_SETUP_BLCK_ERASE:	//0x20: block erase setup/confirm
+		printd("FCD_SETUP_BLCK_ERASE: $%06x\n", m68k_getpc());
+		wsm.cmd = 0x20;
+		wsm.erase = 1;
+		break;
+	case FCD_CONFIRM_BLK_ERASE:	//0xd0: confirm and block erase
+		if(wsm.cmd == 0x20)
+		{
+			printd("FCD_CONFIRM_BLK_ERASE: $%06x\n", m68k_getpc());
+			wsm.cmd = 0xd0;
+			memset(&rom[addr & 0xff0000], 0xff, 64*KB);
+	        wsm.erase = 0;			
+			wsm.ret_or = 0xffffffff;
+		}
+		break;
+	case FCD_CLEAR_STATUS:		//0x50: clear status register
+		printd("FCD_CLEAR_STATUS: $%06x\n", m68k_getpc());
+		wsm.cmd = 0x50;
+		wsm.write = 0;
+		wsm.erase = 0;
+		wsm.ret_or = 0;
+		break;
+	case FCD_READ_ID_CODES:		//0x90: read identifier codes
+		printd("FCD_READ_ID_CODES: $%06x\n", m68k_getpc());
+		wsm.cmd = 0x90;
+		break;
+	case FCD_READ_OR_RESET:		//0xff: read array/reset
+		printd("FCD_READ_OR_RESET: $%06x\n", m68k_getpc());
+		if(wsm.erase || wsm.write)
+			break;
+
+		wsm.cmd = 0xff;
+		wsm.write = 0;
+		wsm.erase = 0;
+		wsm.ret_or = 0;
+		break;
+	}
+}
+  */
diff --git a/src/core/ti_hw/flash.h b/src/core/ti_hw/flash.h
new file mode 100644
index 0000000..1b228e2
--- /dev/null
+++ b/src/core/ti_hw/flash.h
@@ -0,0 +1,76 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_FLASH__
+#define __TI68K_FLASH__
+
+#include "stdint.h"
+
+/* Types */
+
+typedef struct
+{
+	int	cmd;			// FLASH command (CUI)
+    int ret_or;			// status flag
+    int write;			// write in progress
+    int erase;			// erase in progress
+	int	*changed;		// 64KB blocks changed
+	int	nblocks;		// number of blocks
+
+    int write_ready;	// will be removed later
+    int write_phase;
+    int erase_phase;
+} FLASH_WSM;
+
+extern FLASH_WSM   wsm;
+
+/* Functions */
+
+int hw_flash_init(void);
+int hw_flash_reset(void);
+int hw_flash_exit(void);
+
+int hw_flash_nblocks(void);
+
+uint8_t  FlashReadByte(uint32_t addr);
+uint16_t FlashReadWord(uint32_t addr);
+uint32_t FlashReadLong(uint32_t addr);
+
+void FlashWriteByte(uint32_t addr, uint8_t  v);
+void FlashWriteWord(uint32_t addr, uint16_t v);
+void FlashWriteLong(uint32_t addr, uint32_t v);
+
+void find_ssp_and_pc(uint32_t *ssp, uint32_t *pc);
+
+/* Command definitions */
+#define FCD_SETUP_BYTE_WRITE	0x10
+#define FCD_SETUP_BLCK_ERASE	0x20
+#define FCD_CONFIRM_BLK_ERASE	0xd0
+#define FCD_CLEAR_STATUS		0x50
+#define FCD_READ_ID_CODES		0x90
+#define FCD_READ_OR_RESET		0xff
+
+#endif
diff --git a/src/core/ti_hw/gscales.c b/src/core/ti_hw/gscales.c
new file mode 100644
index 0000000..815b519
--- /dev/null
+++ b/src/core/ti_hw/gscales.c
@@ -0,0 +1,469 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: gscales.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Gray-scale detection and management.
+	Rewritten by K. Kofler.
+*/
+
+
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <math.h>
+
+#include "libuae.h"
+#include "mem.h"
+#include "ports.h"
+#include "dbus.h"
+#include "kbd.h"
+#include "m68k.h"
+#include "images.h"
+#include "ti68k_def.h"
+
+#define BUFSIZE			16	// store 16 plane addresses
+#define UPDATE_PLANES	16	// must be a multiple of BUFSIZE
+
+uint32_t lcd_planes[5];
+uint8_t *lcd_planebufs[3];
+int lcd_changed = 0;
+int ngc = 1;
+
+/*
+	Grayscale management (common)
+*/
+static void process_address(uint32_t plane_addr)
+{
+	static uint32_t lcd_addrs[BUFSIZE];
+	static uint8_t lcd_buffers[BUFSIZE*3][3840];
+	static int lcd_cumulative_tickcounts[BUFSIZE];
+    static int lcd_last_plane_count;
+	static uint32_t lcd_last_planes[3];
+	int lcd_exptime[3] = {0, 0, 0};
+	int lcd_apparitions[3] = {0, 0, 0};
+	int lcd_first_apparition[3] = {0, 0, 0};
+	int cycle_start = 0, cycle_end; // cycle = [cycle_start, cycle_end[ (semi-open interval)
+	static int cnt;
+	static int already_reset;
+	uint32_t tmp;
+
+	// Detect plane switches and sync on them
+	if (!already_reset)
+	{
+		switch (lcd_last_plane_count)
+		{
+			case 2:
+				if (plane_addr == lcd_last_planes[1]) break;
+				// We have a third plane we haven't had before. Try resetting.
+				if (ngc <= 4)
+				{
+					cnt += BUFSIZE - (cnt % BUFSIZE);
+					already_reset = 1;
+					break;
+				}
+			case 1:
+				if (plane_addr == lcd_last_planes[0]) break;
+			case 0:
+				lcd_last_planes[lcd_last_plane_count++] = plane_addr;
+				break;
+			default:
+				if (plane_addr == lcd_last_planes[0] || plane_addr == lcd_last_planes[1] || plane_addr == lcd_last_planes[2]) break;
+				// We have a 4th plane, reset the buffer.
+				cnt += BUFSIZE - (cnt % BUFSIZE);
+				already_reset = 1;
+		}
+	}
+
+	lcd_addrs[cnt % BUFSIZE] = plane_addr;
+	memcpy(lcd_buffers[cnt % (BUFSIZE * 3)], &tihw.ram[plane_addr], 3840);
+	if (plane_addr == lcd_planes[0])
+	{
+		lcd_planebufs[0] = lcd_buffers[cnt % (BUFSIZE * 3)];
+		lcd_changed = 1;
+	}
+	else if (ngc > 1 && plane_addr == lcd_planes[1])
+	{
+		lcd_planebufs[1] = lcd_buffers[cnt % (BUFSIZE * 3)];
+		lcd_changed = 1;
+	}
+	else if (ngc > 4 && plane_addr == lcd_planes[2])
+	{
+		lcd_planebufs[2] = lcd_buffers[cnt % (BUFSIZE * 3)];
+		lcd_changed = 1;
+	}
+	lcd_cumulative_tickcounts[cnt++ % BUFSIZE] = tihw.lcd_tick;
+
+	if(!(cnt % UPDATE_PLANES))
+	{
+		int np, i, buffer_offset, ngp=1;
+#if 0
+		static int old_ngp=1;
+#endif /* 0 */
+
+		already_reset = 0;
+		lcd_last_plane_count = 0;
+
+		cycle_end = BUFSIZE - 1; // -1 because we'll need to read
+		                         // up to cycle_end for the
+		                         // exposition times
+
+		// get address of plane #0
+		np = 1;
+		lcd_planes[0] = lcd_planes[1] = lcd_planes[2] = lcd_planes[3] = lcd_planes[4] = lcd_addrs[0];		
+
+		// get address of plane #1
+		for(i = 1; i < BUFSIZE; i++)
+		{
+			if(lcd_addrs[i] != lcd_planes[0])
+			{
+				lcd_planes[1] = lcd_addrs[i];
+				np++;
+				break;
+			}
+		}
+
+		// get address of plane #2
+		for(i = 1; i < BUFSIZE; i++)
+		{
+			if((lcd_addrs[i] != lcd_planes[0]) && (lcd_addrs[i] != lcd_planes[1]))
+			{
+				lcd_planes[2] = lcd_addrs[i];
+				np++;
+				break;
+			}
+		}
+
+		// get address of plane #3 (plane-switching)
+		for(i = 1; i < BUFSIZE; i++)
+		{
+			if((lcd_addrs[i] != lcd_planes[0]) && (lcd_addrs[i] != lcd_planes[1]) && (lcd_addrs[i] != lcd_planes[2]))
+			{
+				// plane-switching: set plane switch as last possible end of cycle
+				cycle_end = i;
+				lcd_planes[3] = lcd_addrs[i];
+				np++;
+				break;
+			}
+		}
+
+		// get address of plane #4 (plane-switching)
+		for(i = 1; i < BUFSIZE; i++)
+		{
+			if((lcd_addrs[i] != lcd_planes[0]) && (lcd_addrs[i] != lcd_planes[1]) && (lcd_addrs[i] != lcd_planes[2]) && (lcd_addrs[i] != lcd_planes[3]))
+			{
+				lcd_planes[4] = lcd_addrs[i];
+				np++;
+				break;
+			}
+		}
+
+		// ignore plane #5 (can be produced by plane-switching, but we don't need it)
+
+		if (np < 4)
+			ngp = np;
+		else if (np == 4)
+		{
+			ngp = 2;
+			// plane-switching: set plane switch as last possible end of cycle
+			for(i = 1; i < BUFSIZE; i++)
+			{
+				if(lcd_addrs[i] == lcd_planes[2])
+				{
+					cycle_end = i;
+					break;
+				}
+			}
+			// reset plane 2
+			lcd_planes[2] = lcd_planes[0];
+		}
+		else
+			ngp = 3;
+
+		// search for a full cycle
+		// Use the fact that if there are only 2 planes, plane 2 is the same as plane 0.
+		if (ngp >= 2)
+		{
+			// skip the first plane (not a complete exposition)
+			for (i = 0; lcd_addrs[i] == lcd_addrs[0]; i++);
+			for (; i <= cycle_end; i++)
+			{
+				// only count an apparition if the plane has actually changed
+				if (lcd_addrs[i] == lcd_planes[0]
+				    && lcd_addrs[i-1] != lcd_planes[0])
+					if (!(lcd_apparitions[0]++))
+						lcd_first_apparition[0] = i;
+
+				if (lcd_addrs[i] == lcd_planes[1]
+				    && lcd_addrs[i-1] != lcd_planes[1])
+					if (!(lcd_apparitions[1]++))
+						lcd_first_apparition[1] = i;
+
+				if (lcd_addrs[i] == lcd_planes[2]
+				    && lcd_addrs[i-1] != lcd_planes[2])
+					if (!(lcd_apparitions[2]++))
+						lcd_first_apparition[2] = i;
+
+				// stop (WITHOUT incrementing i) if all planes appeared at least twice
+				if (lcd_apparitions[0] >= 2
+				    && lcd_apparitions[1] >= 2
+				    && lcd_apparitions[2] >= 2)
+					break;
+			}
+			if (i > cycle_end)
+			{
+//				printf("Warning: no full grayscale cycle found (BUFSIZE too small?)\n");
+				cycle_start = 0;
+			}
+			else
+			{
+				if (lcd_addrs[i] == lcd_planes[0])
+					cycle_start = lcd_first_apparition[0];
+				else if (lcd_addrs[i] == lcd_planes[1])
+					cycle_start = lcd_first_apparition[1];
+				else if (lcd_addrs[i] == lcd_planes[2])
+					cycle_start = lcd_first_apparition[2];
+				cycle_end = i;
+			}
+
+
+			// compute exposure time of plane #0 within the cycle
+			for(i = cycle_start; i < cycle_end; i++)
+			{
+				if(lcd_addrs[i] == lcd_planes[0])
+					lcd_exptime[0] += (lcd_cumulative_tickcounts[i+1]
+					                   - lcd_cumulative_tickcounts[i]);
+			}
+
+			// compute exposure time of plane #1 within the cycle
+			for(i = cycle_start; i < cycle_end; i++)
+			{
+				if(lcd_addrs[i] == lcd_planes[1])
+					lcd_exptime[1] += (lcd_cumulative_tickcounts[i+1]
+					                   - lcd_cumulative_tickcounts[i]);
+			}
+
+			// compute exposure time of plane #2 within the cycle
+			for(i = cycle_start; i < cycle_end; i++)
+			{
+				if(lcd_addrs[i] == lcd_planes[2])
+					lcd_exptime[2] += (lcd_cumulative_tickcounts[i+1]
+					                   - lcd_cumulative_tickcounts[i]);
+			}
+
+			// sort plane addresses by exposition times
+			if(lcd_exptime[0] < lcd_exptime[1])
+			{
+				tmp = lcd_planes[0];
+				lcd_planes[0] = lcd_planes[1];
+				lcd_planes[1] = tmp;
+				tmp = lcd_exptime[0];
+				lcd_exptime[0] = lcd_exptime[1];
+				lcd_exptime[1] = tmp;
+			}
+			if((ngp >= 3) && (lcd_exptime[0] < lcd_exptime[2]))
+			{
+				tmp = lcd_planes[0];
+				lcd_planes[0] = lcd_planes[2];
+				lcd_planes[2] = tmp;
+				tmp = lcd_exptime[0];
+				lcd_exptime[0] = lcd_exptime[2];
+				lcd_exptime[2] = tmp;
+			}
+			if((ngp >= 3) && (lcd_exptime[1] < lcd_exptime[2]))
+			{
+				tmp = lcd_planes[1];
+				lcd_planes[1] = lcd_planes[2];
+				lcd_planes[2] = tmp;
+				tmp = lcd_exptime[1];
+				lcd_exptime[1] = lcd_exptime[2];
+				lcd_exptime[2] = tmp;
+			}
+		}
+
+#if 0
+		if(old_ngp != ngp)
+			printf("Detected %i planes !\n", ngp);
+		old_ngp = ngp;
+#endif /* 0 */
+
+		// now, determine number of grayscales (kevin)
+		if(ngp == 1)
+			ngc = 1;
+		else if(ngp == 2)
+			ngc = 3;
+		else if(ngp == 3)
+		{
+			// check using fast integer computation and no possible divisions by 0
+			// whether lcd_exptime[0] / lcd_exptime[2] > 3.5 = 7/2
+			if (lcd_exptime[0] * 2 > lcd_exptime[2] * 7)
+				ngc = 8;
+			else
+				ngc = 7;
+		}
+
+		// set the pointers to the plane buffers
+		switch ((cnt / BUFSIZE) % 3)
+		{
+			case 1:
+				buffer_offset = 0;
+				break;
+			case 2:
+				buffer_offset = BUFSIZE;
+				break;
+			default:
+				buffer_offset = 2 * BUFSIZE;
+				break;
+		}
+		for (i = BUFSIZE - 1; i >= 0; i--)
+		{
+			if (lcd_addrs[i] == lcd_planes[0])
+			{
+				lcd_planebufs[0] = lcd_buffers[i + buffer_offset];
+				break;
+			}
+		}
+		if (ngp >= 2)
+		{
+			for (i = BUFSIZE - 1; i >= 0; i--)
+			{
+				if (lcd_addrs[i] == lcd_planes[1])
+				{
+					lcd_planebufs[1] = lcd_buffers[i + buffer_offset];
+					break;
+				}
+			}
+		}
+		if (ngp >= 3)
+		{
+			for (i = BUFSIZE - 1; i >= 0; i--)
+			{
+				if (lcd_addrs[i] == lcd_planes[2])
+				{
+					lcd_planebufs[2] = lcd_buffers[i + buffer_offset];
+					break;
+				}
+			}
+		}
+
+		lcd_changed = 1;
+
+#if 0
+		for (i=cycle_start; i<cycle_end; i++)
+				printf("%05x ", lcd_addrs[i]);
+		printf("\n");
+		for (i=cycle_start; i<cycle_end; i++)
+				printf("%05x ", lcd_cumulative_tickcounts[i]>>8);
+		printf("\n");
+		printf("%i (%i): %06x-%06x-%06x (%i-%i-%i)\n", ngp, ngc,
+				lcd_planes[0], lcd_planes[1], lcd_planes[2],
+				lcd_exptime[0]>>4, lcd_exptime[1]>>4, lcd_exptime[2]>>4
+				);
+#endif
+	}
+}
+
+/*
+	HW1 grayscale management
+*/
+void lcd_hook_hw1(void)
+{
+	process_address(tihw.lcd_adr);
+}
+
+/*
+	HW2 grayscale management
+*/
+void lcd_hook_hw2(int refresh)
+{
+	static int dead_cnt = 0;
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4305 )
+#endif
+	static const char d0d7a2a6_moveml_d0d7a2a6_a1[6] = {0x7c,0xff,0x48,0xd1,0x7c,0xff};
+	static const char d1d7a2a6_moveml_d1d7a2a6_a1[6] = {0x7c,0xfe,0x48,0xd1,0x7c,0xfe};
+	static const char d0d7a2a7_moveml_d0d7a2a7_a1[6] = {0xfc,0xff,0x48,0xd1,0xfc,0xff};
+#ifdef _MSC_VER
+#pragma warning( pop ) 
+#endif
+
+	// if refresh from GTK (calc.c), set 1 plane, read directly from LCD_MEM
+	if(refresh)
+	{
+		if(++dead_cnt < 5)
+			return;
+
+		lcd_planes[0] = tihw.lcd_adr;
+		lcd_planebufs[0] = &tihw.ram[tihw.lcd_adr];
+		ngc = 1;
+		lcd_changed = 1;
+	}	
+
+	// if refresh from CPU loop (m68k.c), search for opcode signature:
+	else
+	{
+		unsigned char *pc_p = regs.pc_p;
+		if (*(pc_p++) == 0x4c && *(pc_p++) == 0xd8) // search for the movem (%a0)+,... instruction
+		{
+			if(!memcmp(pc_p, d0d7a2a6_moveml_d0d7a2a6_a1, 6)
+			   || !memcmp(pc_p, d0d7a2a7_moveml_d0d7a2a7_a1, 6))
+			{
+				uint32_t a0 = m68k_areg(regs,0)-0xa00;
+				uint32_t a1 = m68k_areg(regs,1)-0xa00;
+
+				if(a1 == 0x4c0c)
+					a0 -= 12;
+				else if(a1 != 0x4c00)
+					return;
+
+				process_address(a0);
+
+				dead_cnt = 0;
+			}
+			else if (!memcmp(pc_p, d1d7a2a6_moveml_d1d7a2a6_a1, 6))
+			{
+				uint32_t a0 = m68k_areg(regs,0);
+				uint32_t a1 = m68k_areg(regs,1);
+
+				if(a1 != 0x4c00)
+					return;
+
+				process_address(a0);
+
+				dead_cnt = 0;
+			}
+		}
+	}
+}
+
+// opcode signature:
+	// TIGCC grayscale lib and most others:
+	//		movem.l  (%a0)+,%d0-%d7/%a2-%a6 ; (%a1)==0x4c00+0xa00 => plane:=-0xa00(%a0)
+	// graphlib-titanik and graphlib-iceberg:
+	//		movem.l  (%a0)+,%d0-%d7/%a2-%a6 ; (%a1)==0x4c00+0xa00+12 => plane:=-0xa00-12(%a0)
+	// Patrick Davidson's gray.asm:
+	//		movem.l  (%a0)+,%d1-%d7/%a2-%a6 ; (%a1)==0x4c00 => plane:=(%a0)
+	// Grib:
+	//		movem.l  (%a0)+,%d0-%d7/%a2-%a7 ; (%a1)==0x4c00+0xa00 => plane:=-0xa00(%a0)
diff --git a/src/core/ti_hw/gscales.h b/src/core/ti_hw/gscales.h
new file mode 100644
index 0000000..7671e0b
--- /dev/null
+++ b/src/core/ti_hw/gscales.h
@@ -0,0 +1,34 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hw.h 1455 2005-05-31 18:38:03Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2005, Romain Lievin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_GSCALES__
+#define __TI68K_GSCALES__
+
+void lcd_hook_hw1(void);
+void lcd_hook_hw2(int refresh);
+
+extern uint32_t lcd_planes[];
+extern uint8_t *lcd_planebufs[];
+extern int lcd_changed;
+extern int ngc;
+
+#endif
diff --git a/src/core/ti_hw/hw.c b/src/core/ti_hw/hw.c
new file mode 100644
index 0000000..44db563
--- /dev/null
+++ b/src/core/ti_hw/hw.c
@@ -0,0 +1,302 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hw.c 2749 2007-12-30 17:55:13Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    TI's ASIC management: glue logic for screen, keyboard, linkport, timers.
+*/
+
+
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#include "libuae.h"
+#include "mem.h"
+#include "ports.h"
+#include "dbus.h"
+#include "kbd.h"
+#include "hwprot.h"
+#include "flash.h"
+#include "m68k.h"
+#include "images.h"
+#include "ti68k_def.h"
+#include "gettimeofday.h"
+#include "gscales.h"
+
+// This is the ratio OSC1/(OSC2/2^5). We express everything else in fractions of OSC2/2^5.
+// On HW1, AI3 is triggered every ~10/7 of a second.
+#define HW1_RATE    427    // 10MHz / (2^19*(10/7)/2^5)
+#define HW2_RATE    732    // 12MHz / (2^19/2^5)
+#define HW4_RATE    977    // 16MHz / (2^19/2^5)
+
+// Timer masks at 2^5, 2^9, 2^12, 2^18 (port $600015)
+const unsigned int timer_masks[4] = {0, 15, 127, 8191};
+unsigned int timer_mask = 15;
+
+unsigned int cycle_instr = HW1_RATE;
+unsigned int cycle_count = 0;
+
+void set_prescaler(int i)
+{
+	timer_mask = timer_masks[i];
+}
+
+/*
+	Init hardware...
+	A ROM image must have been loaded before calling this function.
+*/
+int hw_init(void)
+{
+    IMG_INFO *img = &img_infos;
+
+    // Get infos from image
+	tihw.calc_type = img_infos.calc_type;
+	tihw.rom_base = img->rom_base << 16;
+	tihw.rom_flash = img->flash;
+	strcpy(tihw.rom_version, img->version);
+	tihw.hw_type = img->hw_type;
+	
+	tihw.ti92v1 = (tihw.calc_type == TI92) && (strcmp(tihw.rom_version, "2.0") < 0);
+	tihw.ti92v2 = (tihw.calc_type == TI92) && (strcmp(tihw.rom_version, "2.0") >= 0);
+
+    switch(tihw.calc_type)
+    {
+    case TI89:
+    case TI89t:
+		tihw.log_w = tihw.lcd_w = 160;
+		tihw.log_h = tihw.lcd_h = 100;	
+        break;
+    case TI92:
+    case TI92p:
+    case V200:
+		tihw.log_w = tihw.lcd_w = 240;
+		tihw.log_h = tihw.lcd_h = 128;
+        break;
+    default:
+        return -1;
+        break;
+    }
+
+    // Do sub-initializations.
+	TRY(hw_mem_init());
+	TRY(hw_flash_init());
+	TRY(hw_io_init());
+	TRY(hw_hwp_init());
+	TRY(hw_dbus_init());
+	TRY(hw_kbd_init());
+	TRY(hw_m68k_init());
+
+    // Set hardware update rate (dependant from io[0x15])
+    if(params.hw_rate != -1)
+        cycle_instr = params.hw_rate;
+    else if(tihw.hw_type == HW1)
+        cycle_instr = HW1_RATE;
+    else if(tihw.hw_type <= HW3)
+        cycle_instr = HW2_RATE;
+    else
+        cycle_instr = HW4_RATE;
+
+    return 0;
+}
+
+int hw_reset(void)
+{
+	TRY(hw_mem_reset());
+	TRY(hw_flash_reset());
+	TRY(hw_io_reset());
+	TRY(hw_hwp_reset());
+	TRY(hw_kbd_reset());
+	TRY(hw_dbus_reset());
+	TRY(hw_m68k_reset());
+
+    return 0;
+}
+
+int hw_exit(void)
+{
+	TRY(hw_m68k_exit());
+	TRY(hw_dbus_exit());
+	TRY(hw_kbd_exit());
+	TRY(hw_io_exit());
+	TRY(hw_flash_exit());
+	TRY(hw_mem_exit());
+	TRY(hw_hwp_exit());
+
+    return 0;
+}
+
+G_LOCK_DEFINE(lcd_flag);
+volatile int lcd_flag = !0;
+
+/*
+    This function is called by do_cycles to regularly updates the hardware.
+    Rate is the same as the timer tick rate.
+*/
+void hw_update(void)
+{
+	static unsigned int timer;
+	//time_t curr_clock;
+
+	// OSC2 enable (bit clear means oscillator stopped!)
+	int osc2_enabled = io_bit_tst(0x15,1);
+
+	timer++;
+	if (osc2_enabled)
+	{
+		// Increment timer
+		if(!(timer & timer_mask) && io_bit_tst(0x15,3))
+		{
+			if (tihw.timer_value == 0x00) 
+				tihw.timer_value = tihw.io[0x17];
+			else 
+				tihw.timer_value++;
+		}
+	}
+
+	// Increment HW2 RTC timer every 8192 seconds
+	if ((tihw.hw_type >= HW2) && io2_bit_tst(0x1f, 2) && io2_bit_tst(0x1f, 1))
+	{
+		static struct timeval ref = {0, 0};
+		struct timeval tmp = {0, 0};
+		gettimeofday(&tmp, NULL);
+
+		// Check if 8192 seconds elapsed, avoiding 32-bit overflow
+		if((unsigned)(tmp.tv_sec-ref.tv_sec)*500000u
+		   + ((unsigned)(tmp.tv_usec-ref.tv_usec)>>1u) >= 4096000000u)
+		{
+			gettimeofday(&ref, NULL);
+			tihw.rtc_value++;
+		}
+	}
+
+	// Toggles every FS (every time the LCD restarts at line 0) -> 90 Hz ~ timer/192
+	// Don't use the actual LCD count (and use 192 rather than 182) to keep exposure
+	// times consistent
+	if(!(timer % 192) && tihw.hw_type >= HW2) 
+		tihw.io2[0x1d] ^= 0x80;
+
+	/* Auto-int management */
+
+	if (osc2_enabled)
+	{
+		// Auto-int 1: 1/2^6 of timer rate
+		// Triggered at a fixed rate: OSC2/2^11 = (OSC2/2^5)/2^6
+		if(!(timer & 63)) 
+		{
+			if(!io_bit_tst(0x15,7))
+				if((tihw.hw_type == HW1) || !(io2_bit_tst(0x1f, 2) && !io2_bit_tst(0x1f, 1)))
+					hw_m68k_irq(1);
+		}
+
+		// Auto-int 2: keyboard scan
+		// see keyboard.c
+	}
+
+	if(osc2_enabled || tihw.hw_type == HW2)
+	{
+		// Auto-int 3: disabled by default by AMS
+		// When enabled, it is triggered at a fixed rate: OSC2/2^19 = 1/16384 of timer rate = 1Hz
+		if(!(timer & 16383))
+		{
+			if(!io_bit_tst(0x15,7) && io_bit_tst(0x15,2))
+				if((tihw.hw_type == HW1) || !(io2_bit_tst(0x1f, 2) && !io2_bit_tst(0x1f, 1)))
+					hw_m68k_irq(3);
+		}
+	}
+
+	// DBus: External link activity ?
+	/*
+	if(!ticables_cable_get_d0(cable_handle) || !ticables_cable_get_d1(cable_handle))
+	{
+		io_bit_set(0x0d,3);	//SA
+		io_bit_set(0x0d,2);	//EA
+	}
+	*/
+
+	// DBUS enabled ?
+	if(!io_bit_tst(0x0c,6))
+	{
+		// Check for data arrival (link cable)
+		hw_dbus_checkread();
+
+		// Auto-int 4: triggered by linkport (error, link act, txbuf empty or rxbuf full)
+		if((io_bit_tst(0x0c,3) && io_bit_tst(0x0d,7))  ||
+			(io_bit_tst(0x0c,2) && io_bit_tst(0x0d,3)) ||
+			(io_bit_tst(0x0c,1) && io_bit_tst(0x0d,6)) ||
+			(io_bit_tst(0x0c,0) && io_bit_tst(0x0d,5)))
+		{
+			hw_m68k_irq(4);
+		}
+	}
+
+	if (osc2_enabled)
+	{
+		// Auto-int 5: triggered by the programmable timer.
+		// The default rate is OSC2/(K*2^9), where K=79 for HW1 and K=53 for HW2
+		// Make sure AI5 is triggered only if the timer was actually incremented.
+		if(!(timer & timer_mask) && io_bit_tst(0x15,3) && tihw.timer_value == 0)
+		{
+			if(!io_bit_tst(0x15,7))	
+				if((tihw.hw_type == HW1) || !(io2_bit_tst(0x1f, 2) && !io2_bit_tst(0x1f, 1)))
+					hw_m68k_irq(5);
+		}
+	}
+
+	// Auto-int 6: triggered when [ON] is pressed.
+	// see keyboard.c
+
+	// Auto-int 7: "vector table write protection" & "stack overflow"
+	// see memory.c
+
+	/* Hardware refresh */
+  
+	// Update keyboard (~600Hz). Not related to timer but as a convenience
+	if(!(timer & 127))	// 31 and 63 don't work, 127 and 255 are ok
+		hw_kbd_update();
+
+	// Update LCD (HW1: every 256th timer tick, HW2: unrelated)
+	if((tihw.hw_type == HW1) && !(timer & 255))
+	{
+		G_LOCK(lcd_flag);
+		lcd_flag = !0;
+		G_UNLOCK(lcd_flag);
+		lcd_hook_hw1();
+	}
+}
+
+/*
+    This function is used to regularly update the hardware from CPU loop. 
+    Note that CPU is running against OSC1 (HW1 @10Mhz, HW2 @12MHz)
+    while hardware is synched against OSC2 (HW1 @700kHz,  HW2 @~520 kHz).
+    OSC2 is the timing base for the timers, the link I/O hardware and 
+    (HW1 only) the LCD controller.
+    These 2 oscillators are independants.
+
+    See hw.h for inline definition.
+*/
+/*
+static void INLINE do_cycles(void);
+*/
+
diff --git a/src/core/ti_hw/hw.h b/src/core/ti_hw/hw.h
new file mode 100644
index 0000000..f555b11
--- /dev/null
+++ b/src/core/ti_hw/hw.h
@@ -0,0 +1,55 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2005, Christian Walther (patches for Mac OS-X port)
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_HARDWARE__
+#define __TI68K_HARDWARE__
+
+int hw_init(void);
+int hw_reset(void);
+int hw_exit(void);
+
+int hw_update(void);
+
+extern unsigned int cycle_instr;
+extern unsigned int cycle_count;
+
+#ifdef __WIN32__
+#define INLINE __inline
+#else
+#define INLINE __inline
+#endif
+
+static void INLINE do_cycles(void)
+{
+    if(cycle_count >= cycle_instr)
+    {
+        hw_update();
+        cycle_count -= cycle_instr;
+    }
+}
+
+#endif
diff --git a/src/core/ti_hw/hwprot.c b/src/core/ti_hw/hwprot.c
new file mode 100644
index 0000000..3a590ad
--- /dev/null
+++ b/src/core/ti_hw/hwprot.c
@@ -0,0 +1,421 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hwprot.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory management: TI89/92+/V200/Titanium FLASH with Hardware Protection
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "mem.h"
+#include "mem89.h"
+#include "hwprot.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+
+static uint32_t ba;			// FLASH ROM base address (shortcut)
+
+static int access1;			// protection access authorization (hw1)
+static int access2;			// protection access authorization (hw2)
+static int crash;			// access counter before crashing
+static int arch_mem_crash;	// same
+
+#define IN_BOUNDS2(a,v,b)	(((v) >= ((a)+ba)) && ((v) <= ((b)+ba)))
+#define HWP
+
+int hw_hwp_init(void)
+{
+	tihw.protect = 0;
+	ba = tihw.rom_base - 0x200000;
+	access1 = access2 = crash = arch_mem_crash = 0;
+	if (tihw.hw_type >= HW2) tihw.io2[0x13] = 0x18;
+
+	return 0;
+}
+
+int hw_hwp_reset(void)
+{
+	return 0;
+}
+
+int hw_hwp_exit(void)
+{
+	return 0;
+}
+
+static void freeze_calc(void)
+{
+	access1 = access2 = crash = 0;
+	m68k_setstopped(1);		
+}
+
+// note: "if(!(adr & 1))" is used to avoid multiple increment when reading/writing words.
+// This don't work for longs but I don't think protection is accessed by longs.
+
+/*
+	Check whether instruction fetch is allowed at adr.
+	The returned value can be used by breakpoints to determine the
+	origin of violation.
+*/
+int hwp_fetch(uint32_t adr)
+{
+	// protections (hw1)
+	if(tihw.hw_type == HW1)
+	{
+		if(IN_BOUNDS2(0x390000+tihw.archive_limit*0x10000, 
+								adr, 0x3fffff))				// archive memory limit (hw1)
+		{
+			// three consecutive access to any adress >=$390000+limit*$10000 and <$400000 crashes the calc
+			if(!(adr & 1)) arch_mem_crash++;
+			if((tihw.hw_type == HW1) && (arch_mem_crash >= 4))
+			{
+				freeze_calc();
+				return 1;
+			}
+		}
+	}
+
+	// protections (hw2)
+	else
+	{
+		if(IN_BOUNDS(0x000000, adr, 0x03ffff))				// RAM page execution protection
+		{
+			if(tihw.ram_exec[adr >> 12]) 
+			{
+				freeze_calc();
+				return 2;
+			}
+		}
+		else if(IN_BOUNDS(0x040000, adr, 0x1fffff))			// RAM page execution protection
+		{
+			if(io2_bit_tst(6, 7)) 
+			{
+				freeze_calc();
+				return 2;
+			}
+		}
+		else if(IN_BOUNDS2(0x210000, adr, 0x1fffff + tihw.rom_size))	// FLASH page execution protection
+		{
+			if(adr >= (0x210000+ba + (uint32_t)tihw.io2[0x13]*0x10000)) 
+			{
+				//printf(">> $%06x-%06x ", adr, 0x210000+ba + (uint32_t)tihw.io2[0x13]*0x10000);
+				freeze_calc();
+				return 3;
+			}
+		}
+	}
+
+	return 0;
+}
+
+uint8_t hwp_get_byte(uint32_t adr) 
+{
+#ifdef HWP
+	// stealth I/O
+	if(IN_BOUNDS(0x040000, adr, 0x07ffff))				// archive memory limit bit 0 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_clr(tihw.archive_limit, 0);
+	}
+	else if(IN_BOUNDS(0x080000, adr, 0x0bffff))			// archive memory limit bit 1 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_clr(tihw.archive_limit, 1);
+	}
+	else if(IN_BOUNDS(0x0c0000, adr, 0x0fffff))			// archive memory limit bit 2 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_clr(tihw.archive_limit, 2);
+	}
+	else if(IN_BOUNDS(0x180000, adr, 0x1bffff))			// screen power control
+	{
+		//tihw.on_off = 0;
+	}
+	else if(IN_BOUNDS(0x1c0000, adr, 0x1fffff))			// protection enable
+	{
+		// FIXME: >=7 is probably too lax, but the actual number can vary a lot due to the prefetch.
+		// I guess we should check instructions rather than access counts on HW2.
+		if((access1 >= 3) || (++access2 >= 7)) 
+		{
+			tihw.protect = !0;
+			access1 = access2 = 0;
+		}
+		else if(tihw.hw_type == HW1)
+		{
+			// any four consecutive access to $1c0000-1fffff crashes a HW1 calc
+			if(!(adr & 1)) crash++;
+			if(crash >= 4)
+			{
+				freeze_calc();
+			}
+		}
+	}
+	else if(IN_BOUNDS2(0x200000, adr, 0x20ffff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			if(!(adr & 1)) 
+				access1++;
+		if(tihw.hw_type != HW1)
+			if(!(adr & 1)) 
+				access2++;
+	}
+	else if(IN_BOUNDS2(0x210000, adr, 0x211fff))			// certificate (read protected)
+	{
+		if(tihw.protect)
+			return 0x14;
+	}
+	else if(IN_BOUNDS2(0x212000, adr, 0x217fff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			if(!(adr & 1)) 
+				access1++;
+		if(tihw.hw_type != HW1)
+			if(!(adr & 1)) 
+				access2++;
+	}
+	else if(IN_BOUNDS2(0x218000, adr, 0x219fff))			// read protected
+	{
+		if(tihw.protect)
+			return 0x14;
+	}
+	else if(IN_BOUNDS2(0x21a000, adr, 0x21ffff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			if(!(adr & 1)) 
+				access1++;
+		if(tihw.hw_type != HW1)
+			if(!(adr & 1)) 
+				access2++;
+	}
+	else
+	{
+		access1 = access2 = 0;
+		crash = arch_mem_crash = 0;
+	}
+#endif
+
+    // memory
+	return mem_get_byte_ptr(adr);
+}
+
+uint16_t hwp_get_word(uint32_t adr) 
+{
+// We can't implement this in terms of hwp_get_byte, because the FlashROM
+// hardware behaves differently for byte and word reads (see flash.c).
+#ifdef HWP
+	// stealth I/O
+	if(IN_BOUNDS(0x040000, adr, 0x07ffff))				// archive memory limit bit 0 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_clr(tihw.archive_limit, 0);
+	}
+	else if(IN_BOUNDS(0x080000, adr, 0x0bffff))			// archive memory limit bit 1 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_clr(tihw.archive_limit, 1);
+	}
+	else if(IN_BOUNDS(0x0c0000, adr, 0x0fffff))			// archive memory limit bit 2 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_clr(tihw.archive_limit, 2);
+	}
+	else if(IN_BOUNDS(0x180000, adr, 0x1bffff))			// screen power control
+	{
+		//tihw.on_off = 0;
+	}
+	else if(IN_BOUNDS(0x1c0000, adr, 0x1fffff))			// protection enable
+	{
+		access2 += 2;
+		// FIXME: >=7 is probably too lax, but the actual number can vary a lot due to the prefetch.
+		// I guess we should check instructions rather than access counts on HW2.
+		if((access1 >= 3) || (access2 >= 7)) 
+		{
+			tihw.protect = !0;
+			access1 = access2 = 0;
+		}
+		else if(tihw.hw_type == HW1)
+		{
+			// any four consecutive access to $1c0000-1fffff crashes a HW1 calc
+			crash++;
+			if(crash >= 4)
+			{
+				freeze_calc();
+			}
+		}
+	}
+	else if(IN_BOUNDS2(0x200000, adr, 0x20ffff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			access1++;
+		else
+			access2++;
+	}
+	else if(IN_BOUNDS2(0x210000, adr, 0x211fff))			// certificate (read protected)
+	{
+		if(tihw.protect)
+			return 0x1414;
+	}
+	else if(IN_BOUNDS2(0x212000, adr, 0x217fff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			access1++;
+		else
+			access2++;
+	}
+	else if(IN_BOUNDS2(0x218000, adr, 0x219fff))			// read protected
+	{
+		if(tihw.protect)
+			return 0x1414;
+	}
+	else if(IN_BOUNDS2(0x21a000, adr, 0x21ffff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			access1++;
+		else
+			access2++;
+	}
+	else
+	{
+		access1 = access2 = 0;
+		crash = arch_mem_crash = 0;
+	}
+#endif
+
+    // memory
+	return mem_get_word_ptr(adr);
+}
+
+uint32_t hwp_get_long(uint32_t adr) 
+{
+	return (hwp_get_word(adr+0) << 16) | hwp_get_word(adr+2);
+}
+
+void hwp_put_byte(uint32_t adr, uint8_t arg) 
+{
+#ifdef HWP
+    // stealth I/O
+	if(IN_BOUNDS(0x040000, adr, 0x07ffff))				// archive memory limit bit 0 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_set(tihw.archive_limit, 0);
+	}
+	else if(IN_BOUNDS(0x080000, adr, 0x0bffff))			// archive memory limit bit 1 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_set(tihw.archive_limit, 1);
+	}
+	else if(IN_BOUNDS(0x0c0000, adr, 0x0fffff))			// archive memory limit bit 2 (hw1)
+	{
+		if(!tihw.protect && (tihw.hw_type == HW1))
+			bit_set(tihw.archive_limit, 2);
+	}
+	else if(IN_BOUNDS(0x180000, adr, 0x1bffff))			// screen power control
+	{
+		//tihw.on_off = !0;
+	}
+	else if(IN_BOUNDS(0x1c0000, adr, 0x1fffff))			// protection disable
+	{
+		// FIXME: >=7 is probably too lax, but the actual number can vary a lot due to the prefetch.
+		// I guess we should check instructions rather than access counts on HW2.
+		if((access1 >= 3) || (++access2 >= 7)) 
+		{
+			tihw.protect = 0;
+			access1 = access2 = 0;
+		}
+		else if(tihw.hw_type == HW1)
+		{
+			// any four consecutive accesses to $1c0000-1fffff crash an HW1 calc
+			if(!(adr & 1)) crash++;
+			if(crash >= 4)
+			{
+				freeze_calc();
+			}
+		}
+	}
+	else if(IN_BOUNDS2(0x200000, adr, 0x20ffff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			if(!(adr & 1)) 
+				access1++;
+		if(tihw.hw_type != HW1)
+			if(!(adr & 1)) 
+				access2++;
+
+		// don't write on boot code
+		return;		
+	}
+	else if(IN_BOUNDS2(0x210000, adr, 0x211fff))			// certificate (read protected)
+	{
+	}
+	else if(IN_BOUNDS2(0x212000, adr, 0x217fff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			if(!(adr & 1)) 
+				access1++;
+		if(tihw.hw_type != HW1)
+			if(!(adr & 1)) 
+				access2++;
+	}
+	else if(IN_BOUNDS2(0x218000, adr, 0x219fff))			// read protected
+	{
+	}
+	else if(IN_BOUNDS2(0x21a000, adr, 0x21ffff))			// protection access authorization
+	{
+		if(tihw.hw_type == HW1)
+			if(!(adr & 1)) 
+				access1++;
+		if(tihw.hw_type != HW1)
+			if(!(adr & 1)) 
+				access2++;
+	}
+	else
+	{
+		access1= access2 = 0;
+		crash = arch_mem_crash = 0;
+	}
+#endif
+
+    // memory
+    mem_put_byte_ptr(adr, arg);
+
+    return;
+}
+
+void hwp_put_word(uint32_t adr, uint16_t arg) 
+{
+	hwp_put_byte(adr+0, MSB(arg));
+	hwp_put_byte(adr+1, LSB(arg));
+}
+
+void hwp_put_long(uint32_t adr, uint32_t arg) 
+{
+	hwp_put_word(adr+0, MSW(arg));
+	hwp_put_word(adr+2, LSW(arg));
+}
diff --git a/src/core/ti_hw/hwprot.h b/src/core/ti_hw/hwprot.h
new file mode 100644
index 0000000..8955be7
--- /dev/null
+++ b/src/core/ti_hw/hwprot.h
@@ -0,0 +1,48 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_HWPROTECT__
+#define __TI68K_HWPROTECT__
+
+#include "stdint.h"
+
+/* Functions */
+
+int hw_hwp_init(void);
+int hw_hwp_reset(void);
+int hw_hwp_exit(void);
+
+int hwp_fetch(uint32_t adr);
+
+uint8_t  hwp_get_byte(uint32_t addr);
+uint16_t hwp_get_word(uint32_t addr);
+uint32_t hwp_get_long(uint32_t addr);
+
+void hwp_put_long(uint32_t addr, uint32_t arg);
+void hwp_put_word(uint32_t addr, uint16_t arg);
+void hwp_put_byte(uint32_t addr, uint8_t  arg);
+
+#endif
diff --git a/src/core/ti_hw/kbd.c b/src/core/ti_hw/kbd.c
new file mode 100644
index 0000000..9681d4b
--- /dev/null
+++ b/src/core/ti_hw/kbd.c
@@ -0,0 +1,270 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: kbd.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Keyboard management
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "libuae.h"
+#include "keydefs.h"
+#include "ti68k_def.h"
+#include "m68k.h"
+#include "bits.h"
+#include "ports.h"
+#include "tichars.h"
+
+static TiKey key_states[NB_MAX_KEYS];
+static int  *key_row;
+static int   key_change;
+static int	 on_change;
+static int *key_buffer;
+static int *key_buffer_ptr;
+static int key_buffer_state;
+
+int keyRow92[10][8] =
+{
+  {TIKEY_DOWN, TIKEY_RIGHT, TIKEY_UP, TIKEY_LEFT, TIKEY_HAND, TIKEY_SHIFT, TIKEY_DIAMOND, TIKEY_2ND},
+  {TIKEY_3, TIKEY_2, TIKEY_1, TIKEY_F8, TIKEY_W, TIKEY_S, TIKEY_Z, TIKEY_VOID},
+  {TIKEY_6, TIKEY_5, TIKEY_4, TIKEY_F3, TIKEY_E, TIKEY_D, TIKEY_X, TIKEY_VOID},
+  {TIKEY_9, TIKEY_8, TIKEY_7, TIKEY_F7, TIKEY_R, TIKEY_F, TIKEY_C, TIKEY_STORE},
+  {TIKEY_COMMA, TIKEY_PARIGHT, TIKEY_PALEFT, TIKEY_F2, TIKEY_T, TIKEY_G, TIKEY_V, TIKEY_SPACE},
+  {TIKEY_TAN, TIKEY_COS, TIKEY_SIN, TIKEY_F6, TIKEY_Y, TIKEY_H, TIKEY_B, TIKEY_DIVIDE},
+  {TIKEY_P, TIKEY_ENTER2, TIKEY_LN, TIKEY_F1, TIKEY_U, TIKEY_J, TIKEY_N, TIKEY_POWER},
+  {TIKEY_MULTIPLY, TIKEY_APPS, TIKEY_CLEAR, TIKEY_F5, TIKEY_I, TIKEY_K, TIKEY_M, TIKEY_EQUALS},
+  {TIKEY_NU, TIKEY_ESCAPE, TIKEY_MODE, TIKEY_PLUS, TIKEY_O, TIKEY_L, TIKEY_THETA, TIKEY_BACKSPACE},
+  {TIKEY_NEGATE, TIKEY_PERIOD, TIKEY_0, TIKEY_F4, TIKEY_Q, TIKEY_A, TIKEY_ENTER1, TIKEY_MINUS}
+};
+
+int keyRow89[10][8] =
+{
+  {TIKEY_ALPHA, TIKEY_DIAMOND, TIKEY_SHIFT, TIKEY_2ND, TIKEY_RIGHT, TIKEY_DOWN, TIKEY_LEFT, TIKEY_UP},
+  {TIKEY_F5, TIKEY_CLEAR, TIKEY_POWER, TIKEY_DIVIDE, TIKEY_MULTIPLY, TIKEY_MINUS, TIKEY_PLUS, TIKEY_ENTER1},
+  {TIKEY_F4, TIKEY_BACKSPACE, TIKEY_T, TIKEY_COMMA, TIKEY_9, TIKEY_6, TIKEY_3, TIKEY_NEGATE},
+  {TIKEY_F3, TIKEY_CATALOG, TIKEY_Z, TIKEY_PARIGHT, TIKEY_8, TIKEY_5, TIKEY_2, TIKEY_PERIOD},
+  {TIKEY_F2, TIKEY_MODE, TIKEY_Y, TIKEY_PALEFT, TIKEY_7, TIKEY_4, TIKEY_1, TIKEY_0},
+  {TIKEY_F1, TIKEY_HOME, TIKEY_X, TIKEY_EQUALS, TIKEY_PIPE, TIKEY_EE, TIKEY_STORE, TIKEY_APPS},
+  {TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_ESCAPE},
+  {TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID},
+  {TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID},
+  {TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID, TIKEY_VOID}
+};
+
+int keyRowV200[10][8] =
+{
+  {TIKEY_DOWN, TIKEY_RIGHT, TIKEY_UP, TIKEY_LEFT, TIKEY_HAND, TIKEY_SHIFT, TIKEY_DIAMOND, TIKEY_2ND},
+  {TIKEY_3, TIKEY_2, TIKEY_1, TIKEY_F8, TIKEY_W, TIKEY_S, TIKEY_Z, TIKEY_NU},
+  {TIKEY_6, TIKEY_5, TIKEY_4, TIKEY_F3, TIKEY_E, TIKEY_D, TIKEY_X, TIKEY_NU},
+  {TIKEY_9, TIKEY_8, TIKEY_7, TIKEY_F7, TIKEY_R, TIKEY_F, TIKEY_C, TIKEY_STORE},
+  {TIKEY_COMMA, TIKEY_PARIGHT, TIKEY_PALEFT, TIKEY_F2, TIKEY_T, TIKEY_G, TIKEY_V, TIKEY_SPACE},
+  {TIKEY_TAN, TIKEY_COS, TIKEY_SIN, TIKEY_F6, TIKEY_Y, TIKEY_H, TIKEY_B, TIKEY_DIVIDE},  
+  {TIKEY_P, TIKEY_ENTER2, TIKEY_LN, TIKEY_F1, TIKEY_U, TIKEY_J, TIKEY_N, TIKEY_POWER},
+  {TIKEY_MULTIPLY, TIKEY_APPS, TIKEY_CLEAR, TIKEY_F5, TIKEY_I, TIKEY_K, TIKEY_M, TIKEY_EQUALS},
+  {TIKEY_NU, TIKEY_ESCAPE, TIKEY_MODE, TIKEY_PLUS, TIKEY_O, TIKEY_L, TIKEY_THETA, TIKEY_BACKSPACE},
+  {TIKEY_NEGATE, TIKEY_PERIOD, TIKEY_0, TIKEY_F4, TIKEY_Q, TIKEY_A, TIKEY_ENTER1, TIKEY_MINUS}
+};
+
+int hw_kbd_init(void)
+{
+	int i;
+
+	key_change = 0;
+	on_change = 0;
+    tihw.on_key = 0;
+
+    switch(tihw.calc_type)
+    {
+    case TI89:
+    case TI89t:
+        key_row = (int*)keyRow89;
+        break;
+    case TI92:
+    case TI92p:
+        key_row = (int*)keyRow92;
+        break;
+    case V200:
+        key_row = (int*)keyRowV200;
+    default:
+        break;
+    }
+
+	for(i = 0; i < MAX_TIKEYS; i++)
+		key_states[i] = 0;
+
+    return 0;
+}
+
+int hw_kbd_reset(void)
+{
+    return 0;
+}
+
+int hw_kbd_exit(void)
+{
+    key_row = NULL;
+
+    return 0;
+}
+
+void ti68k_kbd_set_key(int key, int active)
+{
+	if(key == TIKEY_ALPHA)
+	{
+		if(active)
+		{
+			key_states[key]++;
+			key_change = !0;
+		}
+		else
+			key_states[key]--;
+	}
+	else if(key == TIKEY_ON)
+	{
+		tihw.on_key = active;
+		if(active)
+			on_change = !0;
+	}
+	else
+	{
+		key_states[key] = active;
+		if(active)
+			key_change = !0;	
+	}
+}
+
+int ti68k_kbd_is_key_pressed(int key)
+{
+    return key_states[key];
+}
+
+int hw_kbd_update(void)		// ~600Hz
+{
+	// Push the keys we have been asked to push by ti68k_kbd_push_chars.
+	if (key_buffer)
+	{
+		int key = *key_buffer_ptr;
+		if (key == -1)
+		{
+			free(key_buffer);
+			key_buffer = NULL;
+			key_buffer_ptr = NULL;
+			key_buffer_state = 0;
+		}
+		else if (key == TIKEY_VOID) // give the calculator some time to react
+		{
+			if (++key_buffer_state == 30)
+			{
+				key_buffer_state = 0;
+				key_buffer_ptr++;
+			}
+		}
+		else
+		{
+			switch (key_buffer_state++)
+			{
+			  case 0:
+				ti68k_kbd_set_key(key,TRUE);
+				break;
+			  case 7:
+				ti68k_kbd_set_key(key,FALSE);
+				break;
+			  case 16:
+				key_buffer_state = 0;
+				key_buffer_ptr++;
+				break;
+			  default:
+				break;
+			}
+		}
+	}
+	
+	if(key_change)
+	{
+		// Auto-Int 2 is triggered when the first unmasked key is pressed. Keeping the key
+		// pressed, or pressing another one without releasing the first key, will not generate
+		// additional interrupts.
+		if((tihw.hw_type == HW1) || !(io2_bit_tst(0x1f, 2) && !io2_bit_tst(0x1f, 1)))
+			hw_m68k_irq(2);
+		key_change = 0;
+	}
+	
+	if((on_change == 1) && tihw.on_key) 
+	{
+		// Auto-Int 6 triggered when [ON] is pressed.
+		hw_m68k_irq(6);
+		on_change = 0;
+	}
+	
+	return 0;
+}
+
+static uint8_t get_rowmask(uint8_t r) 
+{
+    uint8_t rc = 0;
+    int i;
+    int *row = key_row + (r << 3);
+  
+    for(i=0; i<8; i++)
+    {
+        rc |= (key_states[row[i]] & 1) << (7-i);
+    }
+
+    return rc;
+}
+
+uint8_t hw_kbd_read_cols(void)
+{
+    static uint8_t i;
+    static uint8_t arg;
+    static uint16_t mask;
+
+    mask = (((uint16_t)tihw.io[0x18]) << 8) | tihw.io[0x19];
+    for(i = 0, arg = 0; i < 10; i++)
+    {
+        if(!(mask & (1<<i)))
+            arg |= get_rowmask(i);
+    }
+
+    return ~arg;
+}
+
+// "chars" is expected to be in the TI calculator charset.
+// Only works (and returns TRUE) if the internal keyboard buffer was empty,
+// otherwise returns FALSE.
+int ti68k_kbd_push_chars(const char *chars)
+{
+    if (key_buffer)
+        return FALSE;
+
+    key_buffer = chars_to_keys(chars,
+                   tihw.calc_type==TI89 || tihw.calc_type==TI89t);
+    key_buffer_ptr = key_buffer;
+    return TRUE;
+}
diff --git a/src/core/ti_hw/kbd.h b/src/core/ti_hw/kbd.h
new file mode 100644
index 0000000..31fe736
--- /dev/null
+++ b/src/core/ti_hw/kbd.h
@@ -0,0 +1,43 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_KBD__
+#define __TI68K_KBD__
+
+#include "keydefs.h"
+
+int hw_kbd_init(void);
+int hw_kbd_reset(void);
+int hw_kbd_exit(void);
+
+int hw_kbd_update(void);
+
+void ti68k_kbd_set_key(int key, int active);
+int ti68k_kbd_is_key_pressed(int key);
+
+uint8_t hw_kbd_read_cols(void);
+
+#endif
diff --git a/src/core/ti_hw/keydefs.h b/src/core/ti_hw/keydefs.h
new file mode 100644
index 0000000..e8171a8
--- /dev/null
+++ b/src/core/ti_hw/keydefs.h
@@ -0,0 +1,63 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_KEYDEFS__
+#define __TI68K_KEYDEFS__
+
+#define NB_MAX_KEYS 120
+
+typedef enum {	
+  TIKEY_DOWN, TIKEY_RIGHT, TIKEY_UP, TIKEY_LEFT, TIKEY_HAND, TIKEY_SHIFT, 
+  TIKEY_DIAMOND, TIKEY_2ND,
+  TIKEY_3, TIKEY_2, TIKEY_1, TIKEY_F8, TIKEY_W, TIKEY_S, TIKEY_Z,
+  TIKEY_6, TIKEY_5, TIKEY_4, TIKEY_F3, TIKEY_E, TIKEY_D, TIKEY_X,
+  TIKEY_9, TIKEY_8, TIKEY_7, TIKEY_F7, TIKEY_R, TIKEY_F, TIKEY_C, TIKEY_STORE,
+  TIKEY_COMMA, TIKEY_PARIGHT, TIKEY_PALEFT, TIKEY_F2, TIKEY_T, TIKEY_G, 
+  TIKEY_V, TIKEY_SPACE,
+  TIKEY_TAN, TIKEY_COS, TIKEY_SIN, TIKEY_F6, TIKEY_Y, TIKEY_H, TIKEY_B, 
+  TIKEY_DIVIDE,
+  TIKEY_P, TIKEY_ENTER2, TIKEY_LN, TIKEY_F1, TIKEY_U, TIKEY_J, TIKEY_N, 
+  TIKEY_POWER,
+  TIKEY_MULTIPLY, TIKEY_APPS, TIKEY_CLEAR, TIKEY_F5, TIKEY_I, TIKEY_K, 
+  TIKEY_M, TIKEY_EQUALS,
+  TIKEY_NU, TIKEY_ESCAPE, TIKEY_MODE, TIKEY_PLUS, TIKEY_O, TIKEY_L, 
+  TIKEY_THETA, TIKEY_BACKSPACE,
+  TIKEY_NEGATE, TIKEY_PERIOD, TIKEY_0, TIKEY_F4, TIKEY_Q, TIKEY_A, 
+  TIKEY_ENTER1, TIKEY_MINUS, TIKEY_ON,
+  TIKEY_ALPHA, TIKEY_EE, TIKEY_CATALOG, TIKEY_HOME, TIKEY_PIPE, 
+  TIKEY_VOID,
+  MAX_TIKEYS
+} TiKey;
+
+typedef struct {
+   int x1;
+   int x2;
+   int y1;
+   int y2;
+   int code;
+} KeyArea;
+
+#endif
diff --git a/src/core/ti_hw/m68k.c b/src/core/ti_hw/m68k.c
new file mode 100644
index 0000000..079f634
--- /dev/null
+++ b/src/core/ti_hw/m68k.c
@@ -0,0 +1,380 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: m68k.c 2733 2007-12-21 05:33:19Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    M68K management (wrapper for the UAE engine)
+*/
+
+#include <stdlib.h>
+
+#include "libuae.h"
+#include "ti68k_def.h"
+#include "ti68k_err.h"
+#include "mem.h"
+#include "hw.h"
+#include "hwprot.h"
+#include "bkpts.h"
+#include "images.h"
+#include "handles.h"
+#include "flash.h"
+#include "dbus.h"
+#include "gscales.h"
+#ifndef NO_SOUND
+#include "ports.h"
+#include "stream.h"
+#include "engine.h"
+#include "gettimeofday.h"
+#endif
+
+int pending_ints;
+
+int hw_m68k_init(void)
+{
+    // init breakpoints
+    ti68k_bkpt_clear_address();
+	ti68k_bkpt_clear_exception();
+	ti68k_bkpt_clear_pgmentry();
+    bkpts.mode = bkpts.type = bkpts.id = 0;
+
+    // set trap on illegal instruction
+    ti68k_bkpt_add_exception(4);
+
+    // init instruction logging
+    logger.pclog_size = 11;
+    logger.pclog_buf = (uint32_t *)malloc(logger.pclog_size * sizeof(uint32_t));
+    if(logger.pclog_buf == NULL)
+        return ERR_MALLOC;
+    logger.pclog_ptr = 0;
+
+    init_m68k();
+
+    return 0;
+}
+
+int hw_m68k_reset(void)
+{
+	// retrieve SSP & PC values for boot
+	find_ssp_and_pc(&tihw.initial_ssp, &tihw.initial_pc);
+
+	// and reset
+    m68k_reset();
+
+	pending_ints = 0;
+
+    return 0;
+}
+
+int hw_m68k_exit(void)
+{
+    ti68k_bkpt_clear_address();
+	ti68k_bkpt_clear_exception();
+
+    free(logger.pclog_buf);
+
+    return 0;
+}
+
+// UAE does not implement interrupt priority and pending interrupts
+// I re-implement it as replacement of Interrupt()
+void Interrupt2(int nr)
+{
+	if((nr > regs.intmask) || (nr == 7))
+	{
+		Interrupt(nr);
+		pending_ints &= ~(1 << nr);	// clr pending int
+	}
+}
+
+void hw_m68k_irq(int n)
+{
+	set_special(SPCFLAG_INT);
+    currIntLev = n;				// unused, used for compat with old Interrupt()
+
+	pending_ints |= (1 << n);	// set pending int
+}
+
+// parse pending ints for one to raise (up to low prority order)
+#define GET_INT_LVL(level)	\
+	{ \
+		int mask = 0x80;	\
+			for (level = 7; level; level--, mask >>= 1)	\
+				if (pending_ints & mask)	\
+					break;	\
+	}
+
+/* Replace UAE's M68000_run() */
+
+/*
+	Returns cycle count.
+*/
+static unsigned int cycles = 0;
+unsigned int hw_m68k_get_cycle_count(int reset)
+{
+	if(reset) cycles = 0;
+	return cycles;
+}
+
+/*
+  Do 'n' instructions (up to 'maxcycles', unless set to 0). 
+  Returned value:
+  - 1 if breakpoint has been encountered,
+  - 2 if trace,
+  - 0 otherwise.
+*/
+int hw_m68k_run(int n, unsigned maxcycles)
+{
+    int i=n;
+    GList *l = NULL;
+    unsigned int cycles_at_start = cycles;
+#ifndef NO_SOUND
+    static unsigned int cycles_sound_441 = 0;
+    static struct timeval last_sound_event = {0, 0};
+    static unsigned int usecs_sound_441 = 0;
+#endif
+
+	for(i = 0; i < n && (!maxcycles || cycles - cycles_at_start < maxcycles); i++)
+	{
+		uae_u32 opcode;
+		unsigned int insn_cycles;
+#ifndef NO_SOUND
+		unsigned cutoff;
+		int low_power_mode = 0;
+#endif
+
+		// refresh hardware
+		do_cycles();
+
+		// OSC1 stopped ? Refresh hardware and wake-up on interrupt. No opcode execution.
+		if ((regs.spcflags & SPCFLAG_STOP))
+	    {
+			if(pending_ints)
+			{
+				int level;
+				GET_INT_LVL(level);
+
+				// wake-up on int level 6 (ON key) or level 1..5
+				if ((pending_ints & (tihw.io[5] << 1)) || (level == 6))
+				{
+					Interrupt2(level);
+					regs.stopped = 0;
+					regs.spcflags &= ~SPCFLAG_STOP;
+				}
+			}
+
+			cycles += 4; // cycle count for hw_m68k_run loop
+			cycle_count += 4; // cycle count for hw.c timers
+			tihw.lcd_tick += 4; // used by grayscale for time plane exposure
+
+#ifdef NO_SOUND
+			continue;
+#else
+			low_power_mode = 1;
+			insn_cycles = 4;
+			goto check_sound;
+#endif
+	    }		
+
+		// search for code breakpoint
+        if(((l = bkpts.code) != NULL) && !(regs.spcflags & SPCFLAG_DBSKIP)
+           && !(regs.spcflags & SPCFLAG_BRK))
+        {
+            bkpts.id = 0;
+            while(l)
+            {
+                if(BKPT_ADDR(GPOINTER_TO_INT(l->data)) == (int)m68k_getpc())
+                {
+					if(BKPT_IS_TMP(GPOINTER_TO_INT(l->data)))
+						bkpts.code = g_list_remove(bkpts.code, l->data);
+
+                    bkpts.type = BK_TYPE_CODE;
+		            //regs.spcflags |= SPCFLAG_BRK;
+                    return 1;
+                }
+
+                bkpts.id++;
+                l = g_list_next(l);
+            }
+        }
+
+		// search for pgrm entry breakpoint
+		if((bkpts.pgmentry != NULL) && !(regs.spcflags & SPCFLAG_DBSKIP)
+		   && !(regs.spcflags & SPCFLAG_BRK))
+		{
+			uint16_t handle = GPOINTER_TO_INT(bkpts.pgmentry->data) >> 16;
+			uint16_t offset = GPOINTER_TO_INT(bkpts.pgmentry->data) & 0xffff;
+			bkpts.id = 0;
+
+			if(heap_deref(handle)+offset == (int)m68k_getpc())
+			{
+				bkpts.type = BK_TYPE_PGMENTRY;
+				return DBG_BREAK;
+			}
+		}
+
+        // store PC in the log buffer
+        if(logger.pclog_size > 1)
+        {
+            logger.pclog_buf[logger.pclog_ptr++] = m68k_getpc();
+            if (logger.pclog_ptr >= logger.pclog_size) logger.pclog_ptr = 0;
+        }
+
+		// hardware protection
+		if(params.hw_protect)
+		{
+			if((bkpts.id = hwp_fetch(m68k_getpc())))
+			{
+				bkpts.type = BK_TYPE_PROTECT;
+				return DBG_HWPV;
+			}
+		}
+
+		// search for next opcode and execute it
+		opcode = get_iword_prefetch (0);
+		insn_cycles = (*cpufunctbl[opcode])(opcode) * 2; // increments PC automatically now
+		cycles += insn_cycles; // cycle count for hw_m68k_run loop
+		cycle_count += insn_cycles; // cycle count for hw.c timers
+		tihw.lcd_tick += insn_cycles; // used by grayscale for time plane exposure
+
+		// HW2/3 grayscales management
+		lcd_hook_hw2(0);
+
+#ifndef NO_SOUND
+		// Sound emulation
+		check_sound:
+		if (audio_isactive)
+		{
+			cycles_sound_441 += insn_cycles * 441;
+			cutoff = params.restricted
+			         // num_cycles_per_loop / (ENGINE_TIME_LIMIT * (44100/441) / 1000)
+			         ? (unsigned) engine_num_cycles_per_loop()
+			            / ((unsigned) ENGINE_TIME_LIMIT / 10u)
+			         // check every 100 cycles
+			         : 44100u;
+			if (cycles_sound_441 >= cutoff)
+			{
+				// keep excess cycles so we don't accumulate delays
+				cycles_sound_441 -= cutoff;
+				if (params.restricted || !last_sound_event.tv_sec)
+				{
+					// for seamless switching to !params.restricted
+					// or when we don't have a last_sound_event yet
+					gettimeofday(&last_sound_event, NULL);
+					usecs_sound_441 = 0u;
+				}
+				else
+				{
+					static struct timeval this_sound_event = {0, 0};
+					gettimeofday(&this_sound_event, NULL);
+					usecs_sound_441 += (this_sound_event.tv_sec - last_sound_event.tv_sec) * 441000000u
+					                   + (this_sound_event.tv_usec - last_sound_event.tv_usec) * 441u;
+					last_sound_event = this_sound_event;
+					if (usecs_sound_441 < 10000u)
+						goto skip_sound_processing;
+					// keep excess usecs so we don't accumulate delays
+					usecs_sound_441 -= 10000u;
+				}
+				// push amplitudes now
+				// We should do this only if(io_bit_tst(0x0c,6))
+				// (direct access), but unfortunately Nebulus
+				// doesn't bother setting that mode.
+				// bit 1 = left channel, bit 0 = right channel
+				// value 1 = low, value 0 = high
+				stream_push_amplitudes((char)(io_bit_tst(0x0e,1) ? 0 : 127),
+				                (char)(io_bit_tst(0x0e,0) ? 0 : 127));
+			}
+			skip_sound_processing: ;
+		}
+		else
+		{
+			cycles_sound_441 = 0u;
+			last_sound_event.tv_sec = last_sound_event.tv_usec = 0;
+			usecs_sound_441 = 0u;
+		}
+		if (low_power_mode)
+			continue;
+#endif
+
+#ifndef NO_GDB
+		extern void sim_trace_one(int);
+		if (trace)
+			sim_trace_one(m68k_getpc());
+#endif
+
+		if (recfile_flag)
+			recfile();
+
+		// process (pending) interrupts
+		if(pending_ints)
+		{
+			int level;
+			GET_INT_LVL(level);
+
+			Interrupt2 (level);
+			regs.stopped = 0;
+			//regs.spcflags &= ~SPCFLAG_STOP;
+		}
+
+		// management of special flags
+        if(regs.spcflags) 
+	    {
+    	    if(regs.spcflags & SPCFLAG_ADRERR) 
+	        {
+	            Exception(3,0);
+				unset_special(SPCFLAG_ADRERR);
+	        }
+	  
+	        if (regs.spcflags & SPCFLAG_DOTRACE) 
+	        {
+	            Exception(9,0);
+	        }
+	      
+	        if (regs.spcflags & SPCFLAG_TRACE) 
+	        {
+				unset_special(SPCFLAG_TRACE);
+			}
+
+	        if (regs.spcflags & SPCFLAG_BRK) 
+	        {		
+				unset_special(SPCFLAG_BRK);
+				return DBG_BREAK;
+	        }
+
+	        if(regs.spcflags & SPCFLAG_DBTRACE) 
+	        {
+				unset_special(SPCFLAG_DBTRACE);
+				return DBG_TRACE;
+	        }
+
+            if(regs.spcflags & SPCFLAG_DBSKIP)
+			{
+                unset_special(SPCFLAG_DBSKIP);
+			}
+	    }
+	}
+
+	return 0;
+}
diff --git a/src/core/ti_hw/m68k.h b/src/core/ti_hw/m68k.h
new file mode 100644
index 0000000..1369b6a
--- /dev/null
+++ b/src/core/ti_hw/m68k.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_M68K__
+#define __TI68K_M68K__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+int hw_m68k_init(void);
+int hw_m68k_reset(void);
+int hw_m68k_exit(void);
+
+int hw_m68k_run(int ninsts, unsigned int maxcycles);
+unsigned int hw_m68k_get_cycle_count(int);
+
+void hw_m68k_irq(int n);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/core/ti_hw/macros.h b/src/core/ti_hw/macros.h
new file mode 100644
index 0000000..ed04ab2
--- /dev/null
+++ b/src/core/ti_hw/macros.h
@@ -0,0 +1,42 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: macros.h 2450 2006-06-07 20:03:00Z roms $ */
+
+/*  libtifiles - Ti File Format library, a part of the TiLP project
+ *  Copyright (C) 1999-2006  Romain Lievin
+ *
+ *  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.
+ */
+
+#ifndef __TIEMU_MACROS__
+#define __TIEMU_MACROS__
+
+#include <stdint.h>
+
+// extract a word from a longword
+# define LSW(l) (uint16_t) ((l) & 0x0000FFFF)
+# define MSW(l) (uint16_t)(((l) & 0xFFFF0000) >> 16)
+
+// extract a byte from a word
+# define LSB(w) (uint8_t) ((w) & 0x00FF)
+# define MSB(w) (uint8_t)(((w) & 0xFF00) >> 8)
+
+// extract a nibble from a byte
+# define LSN(b)  ((b) & 0x0F)
+# define MSN(b) (((b) & 0xF0) >> 4)
+
+// convert 2 nibbles into a BCD byte
+# define BCD(b) (10*MSN(b)+LSN(b))
+
+#endif
diff --git a/src/core/ti_hw/mem.c b/src/core/ti_hw/mem.c
new file mode 100644
index 0000000..0952564
--- /dev/null
+++ b/src/core/ti_hw/mem.c
@@ -0,0 +1,515 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: mem.c 2601 2007-07-14 08:49:30Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory management: RAM, PROM/FLASH, I/O ports and bkpts
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "hw.h"
+#include "mem.h"
+#include "images.h"
+#include "bkpts.h"
+#include "m68k.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "mem89.h"
+#include "mem92.h"
+#include "mem92p.h"
+#include "mem89tm.h"
+#include "memv2.h"
+#include "hwprot.h"
+
+static IMG_INFO *img = &img_infos;
+
+// 000000-0fffff : RAM (128 or 256 KB)
+// 100000-1fffff : 
+// 200000-2fffff : internal ROM (TI92, TI89, V200) or unused
+// 300000-3fffff : idem
+// 400000-4fffff : external ROM (TI92, TI92-II, TI92+) or unused
+// 500000-5fffff : idem
+// 600000-6fffff : memory mapped I/O (all HW)
+// 700000-7fffff : memory mapped I/O (HW2, HW3)
+// 800000-8fffff : ROM (TI89 Titanium) or unused
+// 900000-9fffff : idem
+// a00000-afffff : idem
+// b00000-bfffff : idem
+// c00000-cfffff : unused
+// d00000-dfffff :	 ...
+// e00000-efffff :   ...
+// d00000-ffffff : unused
+
+static GETBYTE_FUNC	get_byte_ptr;	// set on memXX.c or hwprot.c
+static GETWORD_FUNC	get_word_ptr;
+static GETLONG_FUNC	get_long_ptr;
+
+static PUTBYTE_FUNC	put_byte_ptr;
+static PUTWORD_FUNC	put_word_ptr;
+static PUTLONG_FUNC	put_long_ptr;
+
+GETBYTE_FUNC	mem_get_byte_ptr;	// set by memXX.c:tiXX_mem_init
+GETWORD_FUNC	mem_get_word_ptr;
+GETLONG_FUNC	mem_get_long_ptr;
+
+PUTBYTE_FUNC	mem_put_byte_ptr;
+PUTWORD_FUNC	mem_put_word_ptr;
+PUTLONG_FUNC	mem_put_long_ptr;
+
+REALADR_FUNC	mem_get_real_addr_ptr;
+
+/* Mem init/exit */
+
+int hw_mem_init(void)
+{
+    // get memory sizes
+	if(tihw.ti92v2)
+	{
+		// TI92 II is same as TI92+ in memory size
+		tihw.rom_size = ti68k_get_rom_size(TI92p);
+		tihw.ram_size = ti68k_get_ram_size(TI92p);
+		tihw.io_size  = ti68k_get_io_size(TI92p);
+	}
+	else
+	{
+		tihw.rom_size = ti68k_get_rom_size(tihw.calc_type);
+		tihw.ram_size = ti68k_get_ram_size(tihw.calc_type);
+		tihw.io_size  = ti68k_get_io_size(tihw.calc_type);
+		tihw.io2_size = ti68k_get_io2_size(tihw.calc_type);
+		tihw.io3_size = ti68k_get_io3_size(tihw.calc_type);
+	}
+
+    // clear breakpoints
+	ti68k_bkpt_clear_access();
+	ti68k_bkpt_clear_range();
+
+    // allocate mem
+    tihw.ram = malloc(tihw.ram_size);
+    tihw.rom = malloc(tihw.rom_size);
+    tihw.io  = malloc(tihw.io_size);
+    tihw.io2 = malloc(tihw.io2_size);
+	tihw.io3 = malloc(tihw.io3_size);
+    tihw.unused = malloc(16);
+
+    // clear RAM/ROM/IO
+    memset(tihw.ram, 0x00, tihw.ram_size);
+    memset(tihw.io , 0x00, tihw.io_size);  
+	memset(tihw.io2, 0x00, tihw.io2_size);
+	memset(tihw.io2, 0x00, tihw.io3_size);
+    memset(tihw.rom, 0xff, tihw.rom_size);
+    memset(tihw.unused, 0x14, 16);
+
+    // set banks and mappers on per calc basis
+    switch(tihw.calc_type)
+    {
+    case TI92:  ti92_mem_init();  break;
+    case TI92p: ti92p_mem_init(); break;
+    case TI89:  ti89_mem_init();  break;
+    case V200:  v200_mem_init();  break;
+    case TI89t: ti89t_mem_init(); break;
+    default: break;
+    }
+  
+    // blit ROM
+    memcpy(tihw.rom, img->data, img->size);
+    free(img->data);
+
+    if(!tihw.ram || !tihw.rom || !tihw.io || !tihw.io2)
+        return -1;
+
+	// set memory mappers for hw protection
+	if(params.hw_protect && (tihw.calc_type != TI92))
+	{
+		get_byte_ptr = hwp_get_byte;
+		get_word_ptr = hwp_get_word;
+		get_long_ptr = hwp_get_long;
+		put_byte_ptr = hwp_put_byte;
+		put_word_ptr = hwp_put_word;
+		put_long_ptr = hwp_put_long;
+	}
+	else
+	{
+		get_byte_ptr = mem_get_byte_ptr;
+		get_word_ptr = mem_get_word_ptr;
+		get_long_ptr = mem_get_long_ptr;
+		put_byte_ptr = mem_put_byte_ptr;
+		put_word_ptr = mem_put_word_ptr;
+		put_long_ptr = mem_put_long_ptr;
+	}
+
+    return 0;
+}
+
+int hw_mem_reset(void)
+{
+    return 0;
+}
+
+int hw_mem_exit(void)
+{
+	// free memory
+    if(tihw.ram)
+        free(tihw.ram); 
+    tihw.ram=NULL;
+  
+    if(tihw.rom)
+	    free(tihw.rom);
+    tihw.rom = NULL;
+ 
+    if(tihw.io)  
+        free(tihw.io);  
+    tihw.io = NULL;
+
+    if(tihw.io2)
+        free(tihw.io2);
+    tihw.io2 = NULL;
+
+	if(tihw.io3)
+        free(tihw.io3);
+    tihw.io3 = NULL;
+
+	// clear breakpoints
+	ti68k_bkpt_clear_access();
+	ti68k_bkpt_clear_range();
+
+    return 0;
+}
+
+uint8_t* hw_get_real_address(uint32_t adr)
+{
+	return mem_get_real_addr_ptr(adr);
+}
+
+uint32_t hw_get_long(uint32_t adr) 
+{
+    GList* l;
+  
+    adr &= 0xFFFFFF;
+
+    if (bkpts.mem_rl && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_rl, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+	        if ((uint32_t)GPOINTER_TO_INT(l->data) == adr) 
+	        {
+				bkpts.type = BK_TYPE_ACCESS;
+	            bkpts.mode = BK_READ_LONG; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+  
+    if (bkpts.mem_rng_r && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_rng_r, bkpts.id = 0; l; l = l->next, bkpts.id++)
+		{
+            ADDR_RANGE *r = l->data;
+
+			if (((adr+3) >= r->val1) && (adr <= r->val2))
+	        {
+				bkpts.type = BK_TYPE_RANGE;
+	            bkpts.mode = BK_READ_LONG; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+  
+    // Odd address: exception !
+    if(adr & 1) 
+    {
+        regs.spcflags |= SPCFLAG_ADRERR;
+        return 0;
+    }
+
+	return get_long_ptr(adr);
+}
+
+uint16_t hw_get_word(uint32_t adr) 
+{
+    GList* l;
+	
+    adr &= 0xFFFFFF;
+
+    if (bkpts.mem_rw && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_rw, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+	        if ((uint32_t)GPOINTER_TO_INT(l->data) == adr) 
+	        {
+				bkpts.type = BK_TYPE_ACCESS;
+	            bkpts.mode = BK_READ_WORD;
+	            regs.spcflags |= SPCFLAG_BRK;
+	            break;
+	        }
+	    }
+    }
+  
+    if (bkpts.mem_rng_r && !(regs.spcflags & SPCFLAG_BRK))
+    {
+		for(l = bkpts.mem_rng_r, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+            ADDR_RANGE *r = l->data;
+
+			if (((adr+1) >= r->val1) && (adr <= r->val2))
+	        {
+				bkpts.type = BK_TYPE_RANGE;
+	            bkpts.mode = BK_READ_WORD; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+  
+    // Odd address: exception !
+    if(adr & 1) 
+    {
+        regs.spcflags |= SPCFLAG_ADRERR;
+        return 0;
+    }
+
+	return get_word_ptr(adr);
+}
+
+uint8_t hw_get_byte(uint32_t adr) 
+{
+    GList* l;
+  
+    adr &= 0xFFFFFF;
+
+    if (bkpts.mem_rb && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_rb, bkpts.id = 0; l; l = l->next, bkpts.id++)
+		{
+	        if ((uint32_t)GPOINTER_TO_INT(l->data) == adr) 
+	        {
+				bkpts.type = BK_TYPE_ACCESS;
+	            bkpts.mode = BK_READ_BYTE;
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+		}
+    }
+
+    if (bkpts.mem_rng_r && !(regs.spcflags & SPCFLAG_BRK))
+    {
+		for(l = bkpts.mem_rng_r, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+            ADDR_RANGE *r = l->data;
+
+			if ((adr >= r->val1) && (adr <= r->val2))
+	        {
+				bkpts.type = BK_TYPE_RANGE;
+	            bkpts.mode = BK_READ_BYTE; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }	  
+ 	    }
+    }
+  
+	return get_byte_ptr(adr);
+}
+
+uint8_t hw_get_byte_noexcept(uint32_t adr) 
+{
+    adr &= 0xFFFFFF;
+	return get_byte_ptr(adr);
+}
+
+void hw_put_long(uint32_t adr, uint32_t arg) 
+{
+    GList* l;
+
+    adr &= 0xFFFFFF;
+
+    if (bkpts.mem_wl && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_wl, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+	        if ((uint32_t)GPOINTER_TO_INT(l->data) == adr) 
+	        {
+				bkpts.type = BK_TYPE_ACCESS;
+	            bkpts.mode = BK_WRITE_LONG;
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+  
+    if (bkpts.mem_rng_w && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_rng_w, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+	        ADDR_RANGE *r = l->data;
+
+			if (((adr+3) >= r->val1) && (adr <= r->val2))
+	        {
+				bkpts.type = BK_TYPE_RANGE;
+	            bkpts.mode = BK_WRITE_LONG; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+
+    // Odd address: exception !
+    if(adr & 1)
+    {
+        regs.spcflags |= SPCFLAG_ADRERR;
+        return;
+    }
+    
+    // Protected memory violation. Triggered when memory below [$000120] is
+	// written while bit 2 of [$600001] is set
+	if((adr < 0x120) && io_bit_tst(0x01,2))
+		hw_m68k_irq(7);
+	else
+		put_long_ptr(adr, arg);
+}
+
+void hw_put_word(uint32_t adr, uint16_t arg) 
+{
+    GList* l;
+	
+    adr &= 0xFFFFFF;
+
+    if (bkpts.mem_ww && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_ww, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+	        if ((uint32_t)GPOINTER_TO_INT(l->data) == adr) 
+	        {
+				bkpts.type = BK_TYPE_ACCESS;
+	            bkpts.mode = BK_WRITE_WORD;
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+  
+    if (bkpts.mem_rng_w && !(regs.spcflags & SPCFLAG_BRK))
+    {
+		for(l = bkpts.mem_rng_w, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+            ADDR_RANGE *r = l->data;
+
+			if (((adr+1) >= r->val1) && (adr <= r->val2))
+	        {
+				bkpts.type = BK_TYPE_RANGE;
+	            bkpts.mode = BK_WRITE_WORD; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+  
+    // Odd address: exception !
+    if(adr & 1)
+	{
+        regs.spcflags |= SPCFLAG_ADRERR;
+		return;
+	}
+
+    // Protected memory violation. Triggered when memory below [$000120] is
+	// written while bit 2 of [$600001] is set
+    if((adr < 0x120) && io_bit_tst(0x01,2))
+		hw_m68k_irq(7);
+	else
+		put_word_ptr(adr, arg);
+}
+
+void hw_put_byte(uint32_t adr, uint8_t arg) 
+{
+    GList* l;
+	
+    adr &= 0xFFFFFF;
+  
+    if (bkpts.mem_wb && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_wb, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+	        if ((uint32_t)GPOINTER_TO_INT(l->data) == adr) 
+	        {
+				bkpts.type = BK_TYPE_ACCESS;
+	            bkpts.mode = BK_WRITE_BYTE;
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	    }
+    }
+
+    if (bkpts.mem_rng_w && !(regs.spcflags & SPCFLAG_BRK)) 
+    {
+		for(l = bkpts.mem_rng_w, bkpts.id = 0; l; l = l->next, bkpts.id++)
+	    {
+            ADDR_RANGE *r = l->data;
+
+			if ((adr >= r->val1) && (adr <= r->val2))
+	        {
+				bkpts.type = BK_TYPE_RANGE;
+	            bkpts.mode = BK_WRITE_BYTE; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+		}
+    }
+
+	if (bkpts.bits && !(regs.spcflags & SPCFLAG_BRK))
+	{
+		for(l = bkpts.bits, bkpts.id = 0; l != NULL; l = l->next, bkpts.id++)
+		{
+			ADDR_BIT *s = l->data;
+
+			if((adr == s->addr) & ((arg & s->checks) == (s->states & s->checks)))
+	        {
+				bkpts.type = BK_TYPE_BIT;
+	            bkpts.mode = BK_WRITE_BYTE; 
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+		}
+	}
+
+    // Protected memory violation. Triggered when memory below [$000120] is
+	// written while bit 2 of [$600001] is set
+    if((adr < 0x120) && io_bit_tst(0x01,2))
+		hw_m68k_irq(7);
+	else
+		put_byte_ptr(adr, arg);
+}
+
+void hw_put_byte_noexcept(uint32_t adr, uint8_t arg) 
+{
+    adr &= 0xFFFFFF;  
+    put_byte_ptr(adr, arg);
+}
diff --git a/src/core/ti_hw/mem.h b/src/core/ti_hw/mem.h
new file mode 100644
index 0000000..a8eb557
--- /dev/null
+++ b/src/core/ti_hw/mem.h
@@ -0,0 +1,88 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_MEMORY__
+#define __TI68K_MEMORY__
+
+#include "stdint.h"
+
+/* Typedefs */
+
+typedef uint8_t  (*GETBYTE_FUNC) (uint32_t);
+typedef uint16_t (*GETWORD_FUNC) (uint32_t);
+typedef uint32_t (*GETLONG_FUNC) (uint32_t);
+
+typedef void	 (*PUTBYTE_FUNC) (uint32_t, uint8_t );
+typedef void	 (*PUTWORD_FUNC) (uint32_t, uint16_t);
+typedef void	 (*PUTLONG_FUNC) (uint32_t, uint32_t);
+
+typedef uint8_t* (*REALADR_FUNC) (uint32_t addr);
+
+extern GETBYTE_FUNC	mem_get_byte_ptr;
+extern GETWORD_FUNC	mem_get_word_ptr;
+extern GETLONG_FUNC	mem_get_long_ptr;
+
+extern PUTBYTE_FUNC	mem_put_byte_ptr;
+extern PUTWORD_FUNC	mem_put_word_ptr;
+extern PUTLONG_FUNC	mem_put_long_ptr;
+
+extern REALADR_FUNC mem_get_real_addr_ptr;
+
+/* Functions */
+
+int hw_mem_init(void);
+int hw_mem_reset(void);
+int hw_mem_exit(void);
+
+// defs similar to UAE's memory.h (interface)
+extern uint8_t  hw_get_byte_noexcept(uint32_t addr);
+extern uint8_t  hw_get_byte(uint32_t addr);
+extern uint16_t hw_get_word(uint32_t addr);
+extern uint32_t hw_get_long(uint32_t addr);
+
+extern void hw_put_byte_noexcept(uint32_t addr, uint8_t  arg);
+extern void hw_put_byte(uint32_t addr, uint8_t  arg);
+extern void hw_put_word(uint32_t addr, uint16_t arg);
+extern void hw_put_long(uint32_t addr, uint32_t arg);
+
+extern uint8_t* hw_get_real_address(uint32_t addr);
+
+/* Useful macros for memory access */
+
+#define IN_BOUNDS(a,v,b)	(((v) >= (a)) && ((v) <= (b)))
+#define IN_RANGE(v,b,r)		(((v) >= (b)) && ((v) <= ((b) + ((r)-1))))
+
+#define put_b(ptr,adr,mask,arg)	{ ptr[(adr) & (mask)] = (arg); }
+#define put_w(ptr,adr,mask,arg)	{ put_b(ptr,adr,mask,(uint8_t )((arg) >>  8)); put_b(ptr,(adr)+1,mask,(uint8_t )((arg) & 0x00ff)); }
+#define put_l(ptr,adr,mask,arg)	{ put_w(ptr,adr,mask,(uint16_t)((arg) >> 16)); put_w(ptr,(adr)+2,mask,(uint16_t)((arg) & 0xffff)); }
+
+#define get_b(ptr,adr,mask)	(ptr[(adr) & (mask)])
+#define get_w(ptr,adr,mask)	((uint16_t) ((get_b(ptr,adr,mask) <<  8) | get_b(ptr,(adr)+1,mask)))
+#define get_l(ptr,adr,mask)	((uint32_t)	((get_w(ptr,adr,mask) << 16) | get_w(ptr,(adr)+2,mask)))
+
+#define get_p(ptr,adr,mask)  ((ptr) + ((adr) & (mask)))
+
+#endif
diff --git a/src/core/ti_hw/mem89.c b/src/core/ti_hw/mem89.c
new file mode 100644
index 0000000..dccadd5
--- /dev/null
+++ b/src/core/ti_hw/mem89.c
@@ -0,0 +1,280 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: mem89.c 2428 2007-04-04 17:05:38Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory management: TI89 FLASH without Hardware Protection.
+	Some values may be hard-coded for performance reasons !
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "hw.h"
+#include "mem.h"
+#include "mem89.h"
+#include "images.h"
+#include "bkpts.h"
+#include "m68k.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "flash.h"
+
+// 000000-0fffff : RAM (256 KB)
+// 100000-1fffff :
+// 200000-2fffff : internal FLASH (2 MB)
+// 300000-3fffff : 
+// 400000-4fffff :
+// 500000-5fffff : 
+// 600000-6fffff : memory mapped I/O (all HW)
+// 700000-7fffff : memory mapped I/O (HW2, HW3)
+// 800000-8fffff : unused
+// 900000-9fffff :	 ... 
+// a00000-afffff : 
+// b00000-bfffff : 
+// c00000-cfffff : 
+// d00000-dfffff :
+// e00000-efffff :   ...
+// d00000-ffffff : unused
+
+int ti89_mem_init(void)
+{
+	// set mappers
+	mem_get_byte_ptr = ti89_get_byte;
+	mem_get_word_ptr = ti89_get_word;
+	mem_get_long_ptr = ti89_get_long;
+	mem_put_byte_ptr = ti89_put_byte;
+	mem_put_word_ptr = ti89_put_word;
+	mem_put_long_ptr = ti89_put_long;
+
+	mem_get_real_addr_ptr = ti89_get_real_addr;
+
+    return 0;
+}
+
+uint8_t* ti89_get_real_addr(uint32_t adr)
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_p(tihw.ram, adr, RAM_SIZE_TI89 - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_p(tihw.rom, adr, ROM_SIZE_TI89 - 1);
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		return get_p(tihw.io, adr, IO1_SIZE_TI89 - 1);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
+	{
+		return get_p(tihw.io2, adr, IO2_SIZE_TI89 - 1);
+	}
+
+	return tihw.unused;
+}
+
+uint32_t ti89_get_long(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_l(tihw.ram, adr, RAM_SIZE_TI89 - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_l(tihw.rom, adr, ROM_SIZE_TI89 - 1) | wsm.ret_or;
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_long(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
+	{
+		return io2_get_long(adr);
+	}
+
+    return 0x14141414;
+}
+
+uint16_t ti89_get_word(uint32_t adr) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_w(tihw.ram, adr, RAM_SIZE_TI89 - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_w(tihw.rom, adr, ROM_SIZE_TI89 - 1) | wsm.ret_or;
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_word(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
+	{
+		return io2_get_word(adr);
+	}
+
+    return 0x1414;
+}
+
+uint8_t ti89_get_byte(uint32_t adr) 
+{    
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_b(tihw.ram, adr, RAM_SIZE_TI89 - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_b(tihw.rom, adr, ROM_SIZE_TI89 - 1) | wsm.ret_or;
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_byte(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
+	{
+		return io2_get_byte(adr);
+	}
+
+    return 0x14;
+}
+
+void ti89_put_long(uint32_t adr, uint32_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_l(tihw.ram, adr, RAM_SIZE_TI89 - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteLong(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_long(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
+	{
+		io2_put_long(adr, arg);
+	}
+
+    return;
+}
+
+void ti89_put_word(uint32_t adr, uint16_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_w(tihw.ram, adr, RAM_SIZE_TI89 - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteWord(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_word(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
+	{
+		io2_put_word(adr, arg);
+	}
+
+    return;
+}
+
+void ti89_put_byte(uint32_t adr, uint8_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_b(tihw.ram, adr, RAM_SIZE_TI89 - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteByte(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_byte(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
+	{
+		io2_put_byte(adr, arg);
+	}
+
+    return;
+}
diff --git a/src/core/ti_hw/mem89.h b/src/core/ti_hw/mem89.h
new file mode 100644
index 0000000..018ef93
--- /dev/null
+++ b/src/core/ti_hw/mem89.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_MEM89__
+#define __TI68K_MEM89__
+
+#include "stdint.h"
+
+/* Functions */
+
+int ti89_mem_init(void);
+
+uint8_t  ti89_get_byte(uint32_t addr);
+uint16_t ti89_get_word(uint32_t addr);
+uint32_t ti89_get_long(uint32_t addr);
+
+void ti89_put_long(uint32_t addr, uint32_t arg);
+void ti89_put_word(uint32_t addr, uint16_t arg);
+void ti89_put_byte(uint32_t addr, uint8_t  arg);
+
+uint8_t* ti89_get_real_addr(uint32_t addr);
+
+#endif
diff --git a/src/core/ti_hw/mem89tm.c b/src/core/ti_hw/mem89tm.c
new file mode 100644
index 0000000..182786d
--- /dev/null
+++ b/src/core/ti_hw/mem89tm.c
@@ -0,0 +1,338 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: mem89tm.c 2428 2007-04-04 17:05:38Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory management: TI89 Titanium without any HW protection
+	Some values may be hard-coded for performance reasons !
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "hw.h"
+#include "mem.h"
+#include "mem89tm.h"
+#include "images.h"
+#include "bkpts.h"
+#include "m68k.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "flash.h"
+
+// 000000-03ffff : RAM (256 KB)
+// 100000-1fffff : unused
+// 200000-2fffff : mirror of 0x000000
+// 300000-3fffff : unused
+// 400000-4fffff : mirror of 0x000000
+// 500000-5fffff : unused
+// 600000-6fffff : memory mapped I/O (all HW)
+// 700000-7fffff : memory mapped I/O (HW2, HW3), non ghost'ed
+// 800000-8fffff : FLASH (4 MB)
+// 900000-9fffff :
+// a00000-afffff :
+// b00000-bfffff :
+// c00000-cfffff : unused
+// d00000-dfffff :	 ...
+// e00000-efffff :   ...
+// d00000-ffffff : unused
+
+int ti89t_mem_init(void)
+{
+	// set mappers
+	mem_get_byte_ptr = ti89t_get_byte;
+	mem_get_word_ptr = ti89t_get_word;
+	mem_get_long_ptr = ti89t_get_long;
+	mem_put_byte_ptr = ti89t_put_byte;
+	mem_put_word_ptr = ti89t_put_word;
+	mem_put_long_ptr = ti89t_put_long;
+
+	mem_get_real_addr_ptr = ti89t_get_real_addr;
+
+    return 0;
+}
+
+uint8_t* ti89t_get_real_addr(uint32_t adr)
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
+	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
+	   IN_BOUNDS(0x400000, adr, 0x43ffff))
+	{
+		return get_p(tihw.ram, adr, 0x03ffff);
+	}
+
+	// FLASH access
+    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))			
+	{
+		return get_p(tihw.rom, adr, ROM_SIZE_TI89T - 1);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		return get_p(tihw.io, adr, IO1_SIZE_TI89T - 1);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
+	{
+		return get_p(tihw.io2, adr, IO2_SIZE_TI89T - 1);
+	}
+
+	// memory-mapped I/O (hw3)
+	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
+	{
+		return get_p(tihw.io3, adr, IO3_SIZE_TI89T - 1);
+	}
+
+	return tihw.unused;
+}
+
+uint32_t ti89t_get_long(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
+	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
+	   IN_BOUNDS(0x400000, adr, 0x43ffff))
+	{
+		return get_l(tihw.ram, adr, 0x03ffff);
+	}
+
+	// FLASH access
+    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))			
+	{
+		// use FlashReadLong due to Epson Device ID
+		return FlashReadLong(adr);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_long(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
+	{
+		return io2_get_long(adr);
+	}
+
+	// memory-mapped I/O (hw3)
+	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
+	{
+		return io3_get_long(adr);
+	}
+
+    return 0x14141414;
+}
+
+uint16_t ti89t_get_word(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
+	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
+	   IN_BOUNDS(0x400000, adr, 0x43ffff))
+	{
+		return get_w(tihw.ram, adr, 0x03ffff);
+	}
+
+	// FLASH access
+    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))			
+	{
+		return FlashReadWord(adr);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_word(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
+	{
+		return io2_get_word(adr);
+	}
+
+	// memory-mapped I/O (hw3)
+	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
+	{
+		return io3_get_word(adr);
+	}
+
+    return 0x1414;
+}
+
+uint8_t ti89t_get_byte(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
+	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
+	   IN_BOUNDS(0x400000, adr, 0x43ffff))
+	{
+		return get_b(tihw.ram, adr, 0x03ffff);
+	}
+
+	// FLASH access
+    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))			
+	{
+		return FlashReadByte(adr);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_byte(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
+	{
+		return io2_get_byte(adr);
+	}
+
+	// memory-mapped I/O (hw3)
+	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
+	{
+		return io3_get_byte(adr);
+	}
+
+    return 0x14;
+}
+
+void ti89t_put_long(uint32_t adr, uint32_t arg) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
+	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
+	   IN_BOUNDS(0x400000, adr, 0x43ffff))
+	{
+		put_l(tihw.ram, adr, 0x03ffff, arg);
+	}
+
+	// FLASH access
+    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))
+	{
+		FlashWriteLong(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))			
+	{
+		io_put_long(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
+	{
+		io2_put_long(adr, arg);
+	}
+
+	// memory-mapped I/O (hw3)
+	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
+	{
+		io3_put_long(adr, arg);
+	}
+
+    return;
+}
+
+void ti89t_put_word(uint32_t adr, uint16_t arg) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
+	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
+	   IN_BOUNDS(0x400000, adr, 0x43ffff))
+	{
+		put_w(tihw.ram, adr, 0x03ffff, arg);
+	}
+
+	// FLASH access
+    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))
+	{
+		FlashWriteWord(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))			
+	{
+		io_put_word(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
+	{
+		io2_put_word(adr, arg);
+	}
+
+	// memory-mapped I/O (hw3)
+	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
+	{
+		io3_put_word(adr, arg);
+	}
+
+    return;
+}
+
+void ti89t_put_byte(uint32_t adr, uint8_t arg) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
+	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
+	   IN_BOUNDS(0x400000, adr, 0x43ffff))
+	{
+		put_b(tihw.ram, adr, 0x03ffff, arg);
+	}
+
+	// FLASH access
+    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))
+	{
+		FlashWriteByte(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))			
+	{
+		io_put_byte(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
+	{
+		io2_put_byte(adr, arg);
+	}
+
+	// memory-mapped I/O (hw3)
+	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
+	{
+		io3_put_byte(adr, arg);
+	}
+
+    return;
+}
diff --git a/src/core/ti_hw/mem89tm.h b/src/core/ti_hw/mem89tm.h
new file mode 100644
index 0000000..f213187
--- /dev/null
+++ b/src/core/ti_hw/mem89tm.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_MEM89T__
+#define __TI68K_MEM89T__
+
+#include "stdint.h"
+
+/* Functions */
+
+int ti89t_mem_init(void);
+
+uint8_t  ti89t_get_byte(uint32_t addr);
+uint16_t ti89t_get_word(uint32_t addr);
+uint32_t ti89t_get_long(uint32_t addr);
+
+void ti89t_put_long(uint32_t addr, uint32_t arg);
+void ti89t_put_word(uint32_t addr, uint16_t arg);
+void ti89t_put_byte(uint32_t addr, uint8_t  arg);
+
+uint8_t* ti89t_get_real_addr(uint32_t addr);
+
+#endif
diff --git a/src/core/ti_hw/mem92.c b/src/core/ti_hw/mem92.c
new file mode 100644
index 0000000..35a4338
--- /dev/null
+++ b/src/core/ti_hw/mem92.c
@@ -0,0 +1,222 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: mem92.c 2428 2007-04-04 17:05:38Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory management: TI92 ROM v1.x & v2.x
+	Some values may be hard-coded for performance reasons !
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "hw.h"
+#include "mem.h"
+#include "mem92.h"
+#include "flash.h"
+#include "images.h"
+#include "bkpts.h"
+#include "m68k.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+
+// 000000-1fffff : RAM (128 or 256 KB)
+// 200000-3fffff : internal ROM or unused (1.x: 1 MB)
+// 400000-5fffff : external ROM or unused (1.x: 1 MB or 2.x: 2 MB)
+// 600000-6fffff : memory mapped I/O
+// 700000-ffffff : unused
+
+int ti92_mem_init(void)
+{
+	// set mappers
+	mem_get_byte_ptr = ti92_get_byte;
+	mem_get_word_ptr = ti92_get_word;
+	mem_get_long_ptr = ti92_get_long;
+	mem_put_byte_ptr = ti92_put_byte;
+	mem_put_word_ptr = ti92_put_word;
+	mem_put_long_ptr = ti92_put_long;
+
+	mem_get_real_addr_ptr = ti92_get_real_addr;
+
+    return 0;
+}
+
+uint8_t* ti92_get_real_addr(uint32_t adr)
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_p(tihw.ram, adr, tihw.ram_size - 1);
+	}
+
+    // PROM access
+	else if(IN_RANGE(adr, tihw.rom_base, 2*MB))
+	{
+		return get_p(tihw.rom, adr, tihw.rom_size - 1);
+	}
+
+    // memory-mapped I/O
+	else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+        return get_p(tihw.io, adr, 32 - 1);
+	}
+
+    return tihw.unused;
+}
+
+uint32_t ti92_get_long(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_l(tihw.ram, adr, tihw.ram_size - 1);
+	}
+
+    // PROM access
+	else if(IN_RANGE(adr, tihw.rom_base, 2*MB))
+	{
+		return get_l(tihw.rom, adr, tihw.rom_size - 1);
+	}
+
+    // memory-mapped I/O
+	else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+        return io_get_long(adr);
+	}
+
+    return 0x14141414;
+}
+
+uint16_t ti92_get_word(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_w(tihw.ram, adr, tihw.ram_size - 1);
+	}
+
+    // PROM access
+	else if(IN_RANGE(adr, tihw.rom_base, 2*MB))
+	{
+		return get_w(tihw.rom, adr, tihw.rom_size - 1);
+	}
+
+    // memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+        return io_get_word(adr);
+	}
+
+    return 0x1414;
+}
+
+uint8_t ti92_get_byte(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_b(tihw.ram, adr, tihw.ram_size - 1);
+	}
+
+    // PROM access
+	else if(IN_RANGE(adr, tihw.rom_base, 2*MB))
+	{
+		return get_b(tihw.rom, adr, tihw.rom_size - 1);
+	}
+
+    // memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+        return io_get_byte(adr);
+	}
+
+    return 0x14;
+}
+
+void ti92_put_long(uint32_t adr, uint32_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_l(tihw.ram, adr, tihw.ram_size - 1, arg);
+	}
+
+    // PROM access
+	else if(IN_RANGE(adr, tihw.rom_base, 2*MB))
+	{
+		put_l(tihw.rom, adr, tihw.rom_size - 1, arg);
+	}
+
+    // memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+        io_put_long(adr, arg);
+	}
+}
+
+void ti92_put_word(uint32_t adr, uint16_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_w(tihw.ram, adr, tihw.ram_size - 1, arg);
+	}
+
+    // PROM access
+	else if(IN_RANGE(adr, tihw.rom_base, 2*MB))
+	{
+		put_w(tihw.rom, adr, tihw.rom_size - 1, arg);
+	}
+
+    // memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+        io_put_word(adr, arg);
+	}
+}
+
+void ti92_put_byte(uint32_t adr, uint8_t arg) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_b(tihw.ram, adr, tihw.ram_size - 1, arg);
+	}
+
+    // PROM access
+	else if(IN_RANGE(adr, tihw.rom_base, 2*MB))
+	{
+		put_b(tihw.rom, adr, tihw.rom_size - 1, arg);
+	}
+
+    // memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+        io_put_byte(adr, arg);
+	}
+}
diff --git a/src/core/ti_hw/mem92.h b/src/core/ti_hw/mem92.h
new file mode 100644
index 0000000..58b4428
--- /dev/null
+++ b/src/core/ti_hw/mem92.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_MEM92__
+#define __TI68K_MEM92__
+
+#include "stdint.h"
+
+/* Functions */
+
+int ti92_mem_init(void);
+
+uint8_t  ti92_get_byte(uint32_t addr);
+uint16_t ti92_get_word(uint32_t addr);
+uint32_t ti92_get_long(uint32_t addr);
+
+void ti92_put_long(uint32_t addr, uint32_t arg);
+void ti92_put_word(uint32_t addr, uint16_t arg);
+void ti92_put_byte(uint32_t addr, uint8_t  arg);
+
+uint8_t* ti92_get_real_addr(uint32_t addr);
+
+#endif
diff --git a/src/core/ti_hw/mem92p.c b/src/core/ti_hw/mem92p.c
new file mode 100644
index 0000000..636e463
--- /dev/null
+++ b/src/core/ti_hw/mem92p.c
@@ -0,0 +1,282 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: mem92p.c 2428 2007-04-04 17:05:38Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory management: TI92+ FLASH without Hardware Protection
+	Some values may be hard-coded for performance reasons !
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "hw.h"
+#include "mem.h"
+#include "mem92p.h"
+#include "images.h"
+#include "bkpts.h"
+#include "m68k.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "flash.h"
+
+// 000000-0fffff : RAM (256 KB)
+// 100000-1fffff :
+// 200000-2fffff : mirror of FLASH (HW2)
+// 300000-3fffff : 
+// 400000-4fffff : external FLASH (2 MB)
+// 500000-5fffff :
+// 600000-6fffff : memory mapped I/O (all HW)
+// 700000-7fffff : memory mapped I/O (HW2)
+// 800000-8fffff : unused
+// 900000-9fffff :	 ... 
+// a00000-afffff : 
+// b00000-bfffff : 
+// c00000-cfffff : 
+// d00000-dfffff :
+// e00000-efffff :   ...
+// d00000-ffffff : unused
+
+int ti92p_mem_init(void)
+{
+	// set mappers
+	mem_get_byte_ptr = ti92p_get_byte;
+	mem_get_word_ptr = ti92p_get_word;
+	mem_get_long_ptr = ti92p_get_long;
+	mem_put_byte_ptr = ti92p_put_byte;
+	mem_put_word_ptr = ti92p_put_word;
+	mem_put_long_ptr = ti92p_put_long;
+
+	mem_get_real_addr_ptr = ti92p_get_real_addr;
+  
+    return 0;
+}
+
+uint8_t* ti92p_get_real_addr(uint32_t adr)
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_p(tihw.ram, adr, RAM_SIZE_TI92P - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_p(tihw.rom, adr, ROM_SIZE_TI92P - 1);
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		return get_p(tihw.io, adr, IO1_SIZE_TI92P - 1);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI92P))
+	{
+		return get_p(tihw.io2, adr, IO2_SIZE_TI92P - 1);
+	}
+
+	return tihw.unused;
+}
+
+uint32_t ti92p_get_long(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_l(tihw.ram, adr, RAM_SIZE_TI92P - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_l(tihw.rom, adr, ROM_SIZE_TI92P - 1) | wsm.ret_or;
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_long(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI92P))
+	{
+		return io2_get_long(adr);
+	}
+
+    return 0x14141414;
+}
+
+uint16_t ti92p_get_word(uint32_t adr) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_w(tihw.ram, adr, RAM_SIZE_TI92P - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_w(tihw.rom, adr, ROM_SIZE_TI92P - 1) | wsm.ret_or;
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_word(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI92P))
+	{
+		return io2_get_word(adr);
+	}
+
+    return 0x1414;
+}
+
+uint8_t ti92p_get_byte(uint32_t adr) 
+{    
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_b(tihw.ram, adr, RAM_SIZE_TI92P - 1);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_b(tihw.rom, adr, ROM_SIZE_TI92P - 1) | wsm.ret_or;
+	}
+	
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_byte(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI92P))
+	{
+		return io2_get_byte(adr);
+	}
+
+    return 0x14;
+}
+
+void ti92p_put_long(uint32_t adr, uint32_t arg) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_l(tihw.ram, adr, RAM_SIZE_TI92P - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteLong(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_long(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI92P))
+	{
+		io2_put_long(adr, arg);
+	}
+
+    return;
+}
+
+void ti92p_put_word(uint32_t adr, uint16_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_w(tihw.ram, adr, RAM_SIZE_TI92P - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteWord(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_word(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI92P))
+	{
+		io2_put_word(adr, arg);
+	}
+
+    return;
+}
+
+void ti92p_put_byte(uint32_t adr, uint8_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_b(tihw.ram, adr, RAM_SIZE_TI92P - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteByte(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_byte(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI92P))
+	{
+		io2_put_byte(adr, arg);
+	}
+
+    return;
+}
+
diff --git a/src/core/ti_hw/mem92p.h b/src/core/ti_hw/mem92p.h
new file mode 100644
index 0000000..c2be945
--- /dev/null
+++ b/src/core/ti_hw/mem92p.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_MEM92p__
+#define __TI68K_MEM92p__
+
+#include "stdint.h"
+
+/* Functions */
+
+int ti92p_mem_init(void);
+
+uint8_t  ti92p_get_byte(uint32_t addr);
+uint16_t ti92p_get_word(uint32_t addr);
+uint32_t ti92p_get_long(uint32_t addr);
+
+void ti92p_put_long(uint32_t addr, uint32_t arg);
+void ti92p_put_word(uint32_t addr, uint16_t arg);
+void ti92p_put_byte(uint32_t addr, uint8_t  arg);
+
+uint8_t* ti92p_get_real_addr(uint32_t addr);
+
+#endif
diff --git a/src/core/ti_hw/memv2.c b/src/core/ti_hw/memv2.c
new file mode 100644
index 0000000..4ce6078
--- /dev/null
+++ b/src/core/ti_hw/memv2.c
@@ -0,0 +1,280 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: memv2.c 2428 2007-04-04 17:05:38Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory management: V200 FLASH without Hardware Protection
+	Some values may be hard-coded for performance reasons !
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "libuae.h"
+#include "ports.h"
+#include "hw.h"
+#include "mem.h"
+#include "memv2.h"
+#include "images.h"
+#include "bkpts.h"
+#include "m68k.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "flash.h"
+
+// 000000-0fffff : RAM (256 KB)
+// 100000-1fffff :
+// 200000-2fffff : internal FLASH (4 MB)
+// 300000-3fffff : 
+// 400000-4fffff :
+// 500000-5fffff : 
+// 600000-6fffff : memory mapped I/O (all HW)
+// 700000-7fffff : memory mapped I/O (HW2, HW3)
+// 800000-8fffff : unused
+// 900000-9fffff :	 ... 
+// a00000-afffff : 
+// b00000-bfffff : 
+// c00000-cfffff : 
+// d00000-dfffff :
+// e00000-efffff :   ...
+// d00000-ffffff : unused
+
+int v200_mem_init(void)
+{
+	// set mappers
+	mem_get_byte_ptr = v200_get_byte;
+	mem_get_word_ptr = v200_get_word;
+	mem_get_long_ptr = v200_get_long;
+	mem_put_byte_ptr = v200_put_byte;
+	mem_put_word_ptr = v200_put_word;
+	mem_put_long_ptr = v200_put_long;
+
+	mem_get_real_addr_ptr = v200_get_real_addr;
+
+    return 0;
+}
+
+uint8_t* v200_get_real_addr(uint32_t adr)
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_p(tihw.ram, adr, RAM_SIZE_V200 - 1);
+	}
+
+	// FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_p(tihw.rom, adr-0x200000, ROM_SIZE_V200 - 1);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		return get_p(tihw.io, adr, IO1_SIZE_V200 - 1);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_V200))
+	{
+		return get_p(tihw.io2, adr, IO2_SIZE_V200 - 1);
+	}
+
+	return tihw.unused;
+}
+
+uint32_t v200_get_long(uint32_t adr) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_l(tihw.ram, adr, RAM_SIZE_V200 - 1);
+	}
+
+	// FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_l(tihw.rom, adr-0x200000, ROM_SIZE_V200 - 1) | wsm.ret_or;
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_long(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_V200))
+	{
+		return io2_get_long(adr);
+	}
+
+    return 0x14141414;
+}
+
+uint16_t v200_get_word(uint32_t adr) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_w(tihw.ram, adr, RAM_SIZE_V200 - 1);
+	}
+
+	// FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_w(tihw.rom, adr-0x200000, ROM_SIZE_V200 - 1) | wsm.ret_or;
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_word(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_V200))
+	{
+		return io2_get_word(adr);
+	}
+
+    return 0x1414;
+}
+
+uint8_t v200_get_byte(uint32_t adr) 
+{    
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		return get_b(tihw.ram, adr, RAM_SIZE_V200 - 1);
+	}
+
+	// FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		return get_b(tihw.rom, adr-0x200000, ROM_SIZE_V200 - 1) | wsm.ret_or;
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+       return io_get_byte(adr);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_V200))
+	{
+		return io2_get_byte(adr);
+	}
+
+    return 0x14;
+}
+
+void v200_put_long(uint32_t adr, uint32_t arg) 
+{
+	// RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_l(tihw.ram, adr, RAM_SIZE_V200 - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteLong(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_long(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_V200))
+	{
+		io2_put_long(adr, arg);
+	}
+
+    return;
+}
+
+void v200_put_word(uint32_t adr, uint16_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_w(tihw.ram, adr, RAM_SIZE_V200 - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteWord(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_word(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_V200))
+	{
+		io2_put_word(adr, arg);
+	}
+
+    return;
+}
+
+void v200_put_byte(uint32_t adr, uint8_t arg) 
+{
+    // RAM access
+	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
+	{
+		put_b(tihw.ram, adr, RAM_SIZE_V200 - 1, arg);
+	}
+
+    // FLASH access
+	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
+	{
+		FlashWriteByte(adr, arg);
+	}
+
+	// memory-mapped I/O
+    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
+	{
+		io_put_byte(adr, arg);
+	}
+
+	// memory-mapped I/O (hw2)
+	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_V200))
+	{
+		io2_put_byte(adr, arg);
+	}
+
+    return;
+}
diff --git a/src/core/ti_hw/memv2.h b/src/core/ti_hw/memv2.h
new file mode 100644
index 0000000..e1dcfc6
--- /dev/null
+++ b/src/core/ti_hw/memv2.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_MEMv2__
+#define __TI68K_MEMv2__
+
+#include "stdint.h"
+
+/* Functions */
+
+int v200_mem_init(void);
+
+uint8_t  v200_get_byte(uint32_t addr);
+uint16_t v200_get_word(uint32_t addr);
+uint32_t v200_get_long(uint32_t addr);
+
+void v200_put_long(uint32_t addr, uint32_t arg);
+void v200_put_word(uint32_t addr, uint16_t arg);
+void v200_put_byte(uint32_t addr, uint8_t  arg);
+
+uint8_t* v200_get_real_addr(uint32_t addr);
+
+#endif
diff --git a/src/core/ti_hw/ports.c b/src/core/ti_hw/ports.c
new file mode 100644
index 0000000..7a9c49c
--- /dev/null
+++ b/src/core/ti_hw/ports.c
@@ -0,0 +1,673 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: ports.c 2781 2008-05-25 12:38:25Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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 WARRAN7TY; 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.
+ */
+
+/*
+    TI's ASIC management: memory mapped I/O ports
+*/
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <signal.h>
+
+#include "libuae.h"
+#include "mem.h"
+#include "kbd.h"
+#include "dbus.h"
+#include "ports.h"
+#include "m68k.h"
+#include "ti68k_def.h"
+#include "rtc_hw3.h"
+
+int hw_io_init(void)
+{
+	// clear hw registers
+	memset(tihw.io, 0x00, tihw.io_size);
+	memset(tihw.io2, 0x00, tihw.io2_size);
+	memset(tihw.io3, 0x00, tihw.io3_size);
+
+	// set LCD base address
+	if(tihw.hw_type > HW1)
+		tihw.lcd_adr = 0x4c00;
+
+	// set LCD on
+	if(tihw.hw_type > HW1)
+	  tihw.io2[0x1d] = 2;
+
+	// computes reference
+	rtc3_init();
+
+	return 0;
+}
+
+int hw_io_reset(void)
+{
+    return 0;
+}
+
+int hw_io_exit(void)
+{
+    return 0;
+}
+
+void set_prescaler(int);
+
+void io_put_byte(uint32_t addr, uint8_t arg)
+{
+	addr &= 31;	//tihw.io_size-1;
+
+    switch(addr) 
+    {
+        case 0x00:	// rw <76...2..>
+			// %5: bit 0 of contrast (TI92)
+			if(tihw.calc_type == TI92)
+                bit_chg(tihw.contrast,0,bit_get(arg,5));
+        break;
+        case 0x01:	// rw <.....2.0>
+			// %0 clr: interleave RAM (allows use of 256K of RAM)
+            if(tihw.hw_type == 1)
+				tihw.ram_size = bit_tst(arg, 0) ? 128*KB : 256*KB;
+
+			// %2 set: protected memory violation triggered when memory below [$000120] is written
+	    break;
+	    case 0x02:	// ??
+	    break;
+		case 0x03:	// -w <.654.210>
+			// Bus waitstates
+			break;
+        case 0x04:
+        break;
+        case 0x05:	// -w <...43210>
+			// turn off OSC1 (CPU), wake on int level 6 (ON key) and int level [5..1]
+			m68k_setstopped(1);
+        break;
+        case 0x06: 
+		case 0x07: 
+		case 0x08: 
+		case 0x09: 
+		case 0x0a: 
+		case 0x0b:
+        break;
+        case 0x0c:	// rw <765.3210>
+        	// %[3:0]: Trigger interrupt level 4 on error, activity, tx empty, rx full
+        	// see hardware.c
+			// %6: link disable (usually reset link port or direct access to wires)
+			if(bit_tst(arg,6) && bit_tst(arg,5))
+			{
+				hw_dbus_reset();
+				tihw.io[0x0d] = 0x40;
+			}
+        break;
+        case 0x0d:	// r- <76543210>
+			break;
+        case 0x0e:	// rw <....3210>
+			// set red/white wires (if direct access)			
+			if(io_bit_tst(0x0c,6))
+	        {
+				ticables_cable_set_d0(cable_handle, !bit_get(arg,0));
+				ticables_cable_set_d1(cable_handle, !bit_get(arg,1));
+	        }
+        break;
+        case 0x0f: 	// rw <76543210>
+			// write a byte to the transmit buffer (1 byte buffer)
+			io_bit_clr(0x0d, 0);	// STX=0 (tx reg is full)
+            hw_dbus_putbyte(arg);
+
+			if(logger.link_buf && logger.link_mask & 1)
+				logger.link_buf[logger.link_ptr++ % logger.link_size] = (uint16_t)(arg | (1 << 8));
+            break;
+        case 0x10: 	// -w <76543210> (hw1)
+			// address of LCD memory divided by 8 (msb)
+			if(tihw.hw_type == HW1)
+				tihw.lcd_adr = ((arg << 8) | tihw.io[0x11]) << 3;
+        break;
+        case 0x11: 	// -w <76543210> (hw1)
+			// address of LCD memory divided by 8 (lsb)
+			if(tihw.hw_type == HW1)
+				tihw.lcd_adr = ((tihw.io[0x10] << 8) | arg) << 3;
+        break;
+        case 0x12:	// -w <76543210>
+			// LCD logical width = (64-n)*2 bytes = (64-n)*16 pixels <=> n = 64-w/16
+			tihw.log_w = (64 - arg) * 16;
+        break;
+        case 0x13:	// -w <..543210>
+			// LCD logical height = (256-n) <=> n = 256-h
+			tihw.log_h = 0x100 - arg;
+        break;
+        case 0x14:
+        break;
+        case 0x15:	// rw <7.6543210>
+        	// %7 set: Master disable timer interrupts (level 1, 3 and 5)
+        	// see hardware.c
+        	
+        	// %[5-4]: Increment rate of $600017 (prescaler)
+			set_prescaler((arg >> 4) & 3);
+        	
+        	// %3 set: Enable incrementing of $600017
+        	// see hardware.c        	
+        	
+        	// %2 set: Trigger interrupt level 3 at OSC2/2^19  (~1 Hz on HW2)
+        	// see hardware.c
+        	
+        	// %1 set: OSC2 (and OSC3?) enable (bit clear means oscillator stopped!)
+        	// see hardware.c
+        	
+        	// %0 set: LCD controller DMA enable else LCD blank ("white")
+        	// could be implemented but redundant with tihw.on_off
+        break;
+        case 0x16:
+        break;
+        case 0x17: 	// rw <76543210>
+			// programmable rate generator
+			tihw.timer_value = arg; // reset timer
+            break;
+        case 0x18:	// rw <......10>
+			// keyboard row mask (see keyboard.c)
+        break;    
+        case 0x19:	// rw <76543210>
+			// keyboard row mask (see keyboard.c)
+        break;
+        case 0x1a:	// r- <......10>
+        	// ON key status (see keyboard.c)
+        	// Write any value to $60001A to acknowledge this interrupt (AutoInt6)
+        break;
+        case 0x1b:	// r- <76543210>
+			// keyboard column status (see keyboard.c)
+        	// Write any value to $60001B to acknowledge this interrupt (AutoInt2)
+        break;
+        case 0x1c:	// -w <..5432..>
+        	// %[5-2] set: LCD RS (row sync) frequency, OSC2/((16-n)*8)
+        	// %1111 turns off the RS completely (used when LCD is off)        	
+			tihw.on_off = ((arg & 0x3c) == 0x3c) ? 0 : 1;
+        break;
+        case 0x1d:	// -w <7..43210>
+			// %[3-0]: contrast
+			if(tihw.calc_type == TI92)
+			{
+				// %[3-0]: bits <4321.> of contrast
+				static int avg = 0;				
+
+				avg = (avg + arg)/2;	// filter value
+            	tihw.contrast = (tihw.contrast & 1) | ((avg & 15) << 1);
+            }
+            else
+            {
+            	// %[4/3-0]: LCD contrast bits 4/3-0 (bit 4/3 is msb on HW2/HW1)
+				tihw.contrast = arg & (io2_bit_tst(0x1f,0) ? 0x1f : 0x0f);
+				
+				if(tihw.calc_type == TI89 || tihw.calc_type == TI89t)
+				{
+					if(tihw.hw_type == HW1)
+            			tihw.contrast = 31 - 2*tihw.contrast;
+					else
+						tihw.contrast = 31 - tihw.contrast;
+				}
+            }
+        break;
+        case 0x1e:
+        break;
+        case 0x1f:
+        break;
+    }
+  
+    tihw.io[addr] = arg;
+}
+
+void io_put_word(uint32_t addr, uint16_t arg) 
+{
+    io_put_byte(addr,   MSB(arg));
+    io_put_byte(addr+1, LSB(arg));
+}
+
+void io_put_long(uint32_t addr, uint32_t arg) 
+{
+    io_put_word(addr,   MSW(arg));
+    io_put_word(addr+2, LSW(arg));
+}
+
+uint8_t io_get_byte(uint32_t addr) 
+{
+    int v;
+	
+	addr &= 31;	//tihw.io_size-1;
+	v = tihw.io[addr];
+
+    switch(addr) 
+    {
+        case 0x00:	// rw <76...2..>
+			// %0: bits <....0> of contrast
+			if(tihw.calc_type == TI92)
+				v = ((tihw.contrast & 1) << 5);
+
+			// %2: Battery voltage level is *above* the trig level
+            v |= 4;
+            
+            // %[7-6]: keep clear
+        break;
+        case 0x01:	// rw <.....2.0>
+        break;
+        case 0x02:
+		break;
+        case 0x03:	// -w <.654.210>
+        break;
+        case 0x04:	// ??
+        break;        
+        case 0x05:	// -w <...43210>
+        break;
+        case 0x06:  // ??
+        case 0x07: 
+        case 0x08: 
+        case 0x09: 
+        case 0x0a: 
+        case 0x0b:
+        return 0x14;
+        case 0x0c:	// rw <765.3210>
+        	// linkport status
+        	// see hardware.c or dbus.c
+        break;
+        case 0x0d:	// r- <76543210>
+			// reading the DBus status register resets that register (as specified by TI)
+			// but don't touch the SLE bit
+			tihw.io[0x0d] = (v & 0x80) | 0x40;
+		break;
+        case 0x0e:	// rw <....3210>
+			// %[2-3]: read red/white wires if raw access
+			if(io_bit_tst(0x0c,6))
+			{
+				v |= ticables_cable_get_d1(cable_handle);
+				v |= ticables_cable_get_d0(cable_handle);
+			}
+            break;
+        case 0x0f: 	// rw <76543210>
+			// read one byte from receive (incoming) buffer
+            v = hw_dbus_getbyte();
+			io_bit_clr(0x0d, 5);	// SRX=0 (rx reg is empty)
+
+			if(logger.link_buf && logger.link_mask & 2)
+				logger.link_buf[logger.link_ptr++ % logger.link_size] = (uint16_t)(v | (2 << 8));
+		break;
+        case 0x10: 	// -w <76543210> (hw1)
+        return 0x14;
+        case 0x11: 	// -w <76543210> (hw1) 
+        return 0x14;
+        case 0x12: 	// -w <76543210>
+        return 0x14;
+        case 0x13: 	// -w <..543210>
+        return 0x14;
+        case 0x14:	// ??
+        break;
+        case 0x15:	// rw <7.6543210> 
+        break;
+        case 0x16:	// ??
+        break;
+        case 0x17: 	// rw <76543210>
+			// Programmable rate generator
+			return tihw.timer_value;
+        case 0x18: 	// rw <76543210>
+        break;
+        case 0x19:	// rw <......10>
+        break;
+        case 0x1a:	// rw <......10>
+			// ON key status (0=down, 1=up)
+			bit_chg(v,1,!tihw.on_key);
+        break;
+        case 0x1b:	// r- <76543210> 
+			// keyboard column status
+	        v = hw_kbd_read_cols();
+        case 0x1c:	// -w <..5432..> 
+        break;
+        case 0x1d:	// -w <7..43210>
+        break;
+        case 0x1e:	// ??
+        return 0x14;
+        case 0x1f:	// ??
+        return 0x14;
+		default:
+        return 0x14;
+    }
+  
+    return v;
+}
+
+uint16_t io_get_word(uint32_t addr) 
+{
+    return (((uint16_t)io_get_byte(addr))<<8) | io_get_byte(addr+1);
+}
+
+uint32_t io_get_long(uint32_t addr) 
+{
+    return (((uint32_t)io_get_word(addr))<<16) | io_get_word(addr+2);
+}
+
+/** HW2 **/
+
+void io2_put_byte(uint32_t addr, uint8_t arg)
+{
+	int i;
+
+	addr &= 63;	//tihw.io2_size-1;
+
+    switch(addr) 
+    {
+        case 0x00:	// rw <76543210>
+		case 0x08:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)	// this is the fastest method (an easier method will use 64 bit integer)
+				tihw.ram_exec[8+i] = arg & (1 << i);
+			break;
+		case 0x01:	// rw <76543210>
+		case 0x09:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)
+				tihw.ram_exec[0+i] = arg & (1 << i);
+			break;
+		case 0x02:	// rw <76543210>
+		case 0x0a:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)
+				tihw.ram_exec[24+i] = arg & (1 << i);
+			break;
+		case 0x03:	// rw <76543210>
+		case 0x0b:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)
+				tihw.ram_exec[16+i] = arg & (1 << i);
+			break;
+		case 0x04:	// rw <76543210>
+		case 0x0c:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)
+				tihw.ram_exec[40+i] = arg & (1 << i);
+			break;
+		case 0x05:	// rw <76543210>
+		case 0x0d:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)
+				tihw.ram_exec[32+i] = arg & (1 << i);
+			break;
+		case 0x06:	// rw <76543210>
+		case 0x0e:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)
+				tihw.ram_exec[56+i] = arg & (1 << i);
+		case 0x07:	// rw <76543210>
+		case 0x0f:
+			if(tihw.protect)
+				return;
+			for(i = 0; i < 8; i++)
+				tihw.ram_exec[48+i] = arg & (1 << i);
+			break;
+		case 0x11:	// -w <76543210>
+			break;
+		case 0x12:	// rw <..543210>
+			if(tihw.protect)
+				return;
+			arg &= 0x3f;
+			break;
+		case 0x13:
+			break;
+		case 0x14:	// rw <76543210>
+			// RTC, incremented every 2^13 seconds. The whole word must be read: 
+			// reading the port byte by byte can return wrong value
+			tihw.rtc_value = (tihw.io2[0x14] << 8) | tihw.io2[0x15];
+			break;
+		case 0x15:	// rw <76543210>
+			tihw.rtc_value = (tihw.io2[0x14] << 8) | tihw.io2[0x15];
+			break;
+		case 0x17:	// rw <......10>
+			// Display memory snoop range
+			tihw.lcd_adr = 0x4c00 + 0x1000*(arg&3);
+		break;
+		case 0x1d:	// rw <7...3210>
+			// %1: Screen enable (clear this bit to shut down LCD)
+			tihw.on_off = bit_tst(arg,1) ? 1 : 0;
+			break;
+		case 0x1f:	// rw <.....210>
+			if(!tihw.protect) tihw.io2[addr] = arg; else return;
+			// %0 set: use 5 contrast bits (default for AMS).
+
+			// %[2:1]
+			// %2 set: activates the incrementation of $700014.w
+			break;
+    }
+
+    tihw.io2[addr] = arg;
+}
+
+void io2_put_word(uint32_t addr, uint16_t arg) 
+{
+    io2_put_byte(addr,   MSB(arg));
+    io2_put_byte(addr+1, LSB(arg));
+}
+
+void io2_put_long(uint32_t addr, uint32_t arg) 
+{
+    io2_put_word(addr,   MSW(arg));
+    io2_put_word(addr+2, LSW(arg));
+}
+
+uint8_t io2_get_byte(uint32_t addr) 
+{
+    int v;
+	
+	addr &= 63;	//tihw.io2_size-1;
+	v = tihw.io2[addr];
+
+    switch(addr) 
+    {
+        case 0x00:
+		case 0x08:
+			break;
+		case 0x01:
+		case 0x09:
+			break;
+		case 0x02:
+		case 0x0a:
+			break;
+		case 0x03:
+		case 0x0b:
+			break;
+		case 0x04:
+		case 0x0c:
+			break;
+		case 0x05:
+		case 0x0d:
+			break;
+		case 0x06:
+		case 0x0e:
+			break;
+		case 0x07:
+		case 0x0f:
+			break;
+		case 0x11:
+			break;
+		case 0x12:
+			break;
+		case 0x13:
+			break;
+		case 0x14:	// rw <7...3210>
+			// RTC hw2 incremented every 2^13 seconds. The whole word must 
+			// be read: reading the port byte per byte can return wrong value.
+			return MSB(tihw.rtc_value);
+			break;
+		case 0x15:
+			return LSB(tihw.rtc_value);
+			break;
+		case 0x17:
+			break;
+		case 0x1d:
+			break;
+		case 0x1f:
+			break;
+    }
+  
+    return v;
+}
+
+uint16_t io2_get_word(uint32_t addr) 
+{
+    return (((uint16_t)io2_get_byte(addr))<<8) | io2_get_byte(addr+1);
+}
+
+uint32_t io2_get_long(uint32_t addr) 
+{
+    return (((uint32_t)io2_get_word(addr))<<16) | io2_get_word(addr+2);
+}
+
+/** HW3 **/
+
+void io3_put_byte(uint32_t addr, uint8_t arg)
+{
+	addr &= 255;	//tihw.io3_size-1;
+
+	switch(addr) 
+	{
+		case 0x00:	// rw <76543210>
+			break;
+
+		case 0x40:
+		case 0x41:
+		case 0x42:
+		case 0x43:	// rw <76543210>
+			// RTC hw3: seconds since January 1st, 1997 00:00:00 (loading register)		
+			break;
+		case 0x44:	// rw <....3210>
+			// RTC hw3: 1/16th of seconds, upper digit is always 0 (loading register)
+			arg &= 0x0f;
+			break;
+		case 0x45:	// ro <....3210>
+			// RTC hw3: 1/16th of seconds, upper digit is always 0 (counting register)
+			arg &= 0x0f;
+			return;
+		case 0x46:
+		case 0x47:
+		case 0x48:
+		case 0x49:	// ro <76543210>
+			// RTC hw3: seconds since January 1st, 1997 00:00:00 (counting register)
+			return;
+		case 0x5f:	// ro & rw <......10>
+			// RTC hw3 control register
+			// bit 0 means clock enabled ($710040 is set to 0 when disabled), 
+			// bit 1 changing from 0 to 1 loads $710040:44 to $710045-49 and set the clock
+			arg &= 0x03;
+			arg |= 0x80;
+
+			if(!bit_tst(arg,0))
+			{
+				// RTC is disabled
+				tihw.io3[0x40] = tihw.io3[0x41] = tihw.io3[0x42] = tihw.io3[0x43] = 0;
+				memcpy(&tihw.rtc3_beg, &tihw.rtc3_ref, sizeof(TTIME));
+			}
+			else if(!bit_tst(arg,1))
+			{
+				// RTC reload
+				tihw.io3[0x46] = tihw.io3[0x40];
+				tihw.io3[0x47] = tihw.io3[0x41];
+				tihw.io3[0x48] = tihw.io3[0x42];
+				tihw.io3[0x49] = tihw.io3[0x43];
+				tihw.io3[0x45] = tihw.io3[0x44];
+
+				tihw.rtc3_load.s = (tihw.io3[0x46] << 24) | (tihw.io3[0x47] << 16) | (tihw.io3[0x48] << 8) | tihw.io3[0x49];
+				tihw.rtc3_load.ms = (125 * tihw.io3[0x45]) >> 1;
+
+				rtc3_get_time(&tihw.rtc3_beg);
+			}
+			break;
+	}
+
+	tihw.io3[addr] = arg;
+}
+
+void io3_put_word(uint32_t addr, uint16_t arg) 
+{
+    io3_put_byte(addr,   MSB(arg));
+    io3_put_byte(addr+1, LSB(arg));
+}
+
+void io3_put_long(uint32_t addr, uint32_t arg) 
+{
+    io3_put_word(addr,   MSW(arg));
+    io3_put_word(addr+2, LSW(arg));
+}
+
+uint8_t io3_get_byte(uint32_t addr) 
+{
+	int v;
+	
+	addr &= 255;	//tihw.io3_size-1;
+	v = tihw.io3[addr];
+
+	switch(addr) 
+	{
+		case 0x00:
+			break;
+
+		case 0x40: 
+		case 0x41: 
+		case 0x42: 
+		case 0x43: 	// rw <76543210>
+			// RTC hw3: seconds since January 1st, 1997 00:00:00 (loading register)
+			break;
+		case 0x44:	// rw <....3210>
+			// RTC hw3: 1/16th of seconds, upper digit is always 0 (loading register)
+			v &= 0x0f;
+			break;
+		case 0x45:	// ro <....3210>
+			// RTC hw3: 1/16th of seconds, upper digit is always 0 (counting register)
+			// beware: this function may be non portable but an equivalent exists for Linux
+		case 0x46:	// ro <76543210>
+		case 0x47:
+		case 0x48:
+		case 0x49:
+			// RTC hw3: seconds since January 1st, 1997 00:00:00 (counting register)
+			rtc3_state_save();
+			break;			
+		case 0x5f:	// rw <......10>
+			// RTC hw3 control register
+			break;
+	}
+  
+	return v;
+}
+
+uint16_t io3_get_word(uint32_t addr) 
+{
+    return (((uint16_t)io3_get_byte(addr))<<8) | io3_get_byte(addr+1);
+}
+
+uint32_t io3_get_long(uint32_t addr) 
+{
+    return (((uint32_t)io3_get_word(addr))<<16) | io3_get_word(addr+2);
+}
+
diff --git a/src/core/ti_hw/ports.h b/src/core/ti_hw/ports.h
new file mode 100644
index 0000000..309f84f
--- /dev/null
+++ b/src/core/ti_hw/ports.h
@@ -0,0 +1,86 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 245 2004-05-23 20:45:43Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_IO__
+#define __TI68K_IO__
+
+#include <stdint.h>
+#include "bits.h"
+
+int hw_io_init(void);
+int hw_io_reset(void);
+int hw_io_exit(void);
+
+extern uint8_t  io_get_byte(uint32_t addr);
+extern uint16_t io_get_word(uint32_t addr);
+extern uint32_t io_get_long(uint32_t addr);
+
+extern void io_put_long(uint32_t addr, uint32_t arg);
+extern void io_put_word(uint32_t addr, uint16_t arg);
+extern void io_put_byte(uint32_t addr, uint8_t  arg);
+
+#define io_bit_get(a,b)		bit_get(tihw.io[a],b)
+#define io_bit_set(a,b)		bit_set(tihw.io[a],b)
+#define io_bit_clr(a,b)		bit_clr(tihw.io[a],b)
+
+#define io_bit_tst(a,b)		bit_tst(tihw.io[a],b)
+#define io_bit_chg(a,b,s)	bit_chg(tihw.io[a],b,s)	
+
+// ---
+
+extern uint8_t  io2_get_byte(uint32_t addr);
+extern uint16_t io2_get_word(uint32_t addr);
+extern uint32_t io2_get_long(uint32_t addr);
+
+extern void io2_put_long(uint32_t addr, uint32_t arg);
+extern void io2_put_word(uint32_t addr, uint16_t arg);
+extern void io2_put_byte(uint32_t addr, uint8_t  arg);
+
+#define io2_bit_get(a,b)		bit_get(tihw.io2[a],b)
+#define io2_bit_set(a,b)		bit_set(tihw.io2[a],b)
+#define io2_bit_clr(a,b)		bit_clr(tihw.io2[a],b)
+
+#define io2_bit_tst(a,b)		bit_tst(tihw.io2[a],b)
+#define io2_bit_chg(a,b,s)		bit_chg(tihw.io2[a],b,s)	
+
+// ---
+
+extern uint8_t  io3_get_byte(uint32_t addr);
+extern uint16_t io3_get_word(uint32_t addr);
+extern uint32_t io3_get_long(uint32_t addr);
+
+extern void io3_put_long(uint32_t addr, uint32_t arg);
+extern void io3_put_word(uint32_t addr, uint16_t arg);
+extern void io3_put_byte(uint32_t addr, uint8_t  arg);
+
+#define io3_bit_get(a,b)		bit_get(tihw.io3[a],b)
+#define io3_bit_set(a,b)		bit_set(tihw.io3[a],b)
+#define io3_bit_clr(a,b)		bit_clr(tihw.io3[a],b)
+
+#define io3_bit_tst(a,b)		bit_tst(tihw.io3[a],b)
+#define io3_bit_chg(a,b,s)		bit_chg(tihw.io3[a],b,s)	
+
+#endif
diff --git a/src/core/ti_hw/rtc_hw3.c b/src/core/ti_hw/rtc_hw3.c
new file mode 100644
index 0000000..8a1c678
--- /dev/null
+++ b/src/core/ti_hw/rtc_hw3.c
@@ -0,0 +1,185 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: rtc_hw3.c 2559 2007-06-24 17:33:54Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    TI's HW3 RTC helpers.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <sys/types.h>
+
+#include "libuae.h"
+#include "mem.h"
+#include "ports.h"
+#include "images.h"
+#include "ti68k_def.h"
+#include "rtc_hw3.h"
+#include "gettimeofday.h"
+
+int rtc3_init(void)
+{
+	struct tm ref;
+	time_t now;
+
+	if(tihw.hw_type < HW3)
+		return 0;
+
+	// Computes pseudo-constant (difference between PC ref and TI ref) because:
+	// - TI counts seconds since January 1st, 1997 00:00:00
+	// - PC counts seconds since January 1st, 1970 00:00:00
+	time(&now);	
+	memcpy(&ref, localtime(&now), sizeof(struct tm)); // get tm_isdst field (DST status)
+	ref.tm_year  = 1997 - 1900;
+	ref.tm_mon   = 0;
+	ref.tm_yday  = 0;
+	ref.tm_mday  = 1;
+	ref.tm_wday  = 3;
+	ref.tm_hour  = 0;
+	ref.tm_min   = 0;
+	ref.tm_sec   = 0;
+	tihw.rtc3_beg.s  = tihw.rtc3_ref.s  = mktime(&ref);
+	tihw.rtc3_beg.ms = tihw.rtc3_ref.ms = 0;
+	//printf("<<%s>>\n", asctime(&ref));
+
+	tihw.io3[0x5f] = 0x80;
+
+	return 0;
+}
+
+int rtc3_reset(void)
+{
+	return 0;
+}
+
+int rtc3_exit(void)
+{
+	return 0;
+}
+
+// return seconds and milli-seconds
+// FIXME: kill this stupid wrapper which loses precision and use gettimeofday
+//        and struct timeval directly instead
+// Problem: We'll have to bump the savefile revision if we do that. :-(
+void rtc3_get_time(TTIME* tt)
+{
+	struct timeval tp;
+	gettimeofday(&tp, NULL);
+	tt->s = tp.tv_sec;
+	tt->ms = tp.tv_usec/1000;
+}
+
+// tt = t2 - t1 and take care of reporting milli-seconds
+void rtc3_diff_time(TTIME* t2, TTIME* t1, TTIME* tt)
+{
+	tt->s = (time_t)difftime(t2->s, t1->s);
+	tt->ms = t2->ms - t1->ms;
+
+	if(tt->ms < 0)
+	{
+		tt->ms += 1000;
+		tt->s--;
+	}
+}
+
+// tt = t2 + t1 and take care of reporting milli-seconds
+void rtc3_add_time(TTIME* t2, TTIME* t1, TTIME* tt)
+{
+	tt->ms = t1->ms + t2->ms;
+	tt->s = t1->s + t2->s;
+
+	if(tt->ms > 1000)
+	{
+		tt->ms -= 1000;
+		tt->s++;
+	}
+}
+
+// Call it before ti68k_state_save to update registers with current clock
+// so that clock is correcly saved
+int rtc3_state_save(void)
+{
+	TTIME rtc3_cur;
+	TTIME d, a;
+
+	if(tihw.hw_type < HW3)
+		return 0;
+
+	// get time and computes time elapsed since reload (cur - beg + load)
+	rtc3_get_time(&rtc3_cur);
+	rtc3_diff_time(&rtc3_cur, &tihw.rtc3_beg, &d);
+	rtc3_add_time(&d, &tihw.rtc3_load, &a);
+
+	// 1/16th of seconds
+	tihw.io3[0x45] = (a.ms+a.ms) / 125;
+
+	// seconds since January 1st, 1997 00:00:00
+	tihw.io3[0x46] = MSB(MSW(a.s)); 
+	tihw.io3[0x47] = LSB(MSW(a.s)); 
+	tihw.io3[0x48] = MSB(LSW(a.s)); 
+	tihw.io3[0x49] = LSB(LSW(a.s)); 
+
+	//printf("%i.%i\n", tihw.io3[0x49], tihw.io3[0x45]);
+
+	/*
+	rtc3_diff_time(&rtc3_cur, &tihw.rtc3_beg, &r);
+	printf("%i.%i - %i.%i = %i.%i\n", 
+		rtc3_cur.s, rtc3_cur.ms, tihw.rtc3_beg.s, tihw.rtc3_beg.ms, r.s, r.ms);
+	*/
+	/*
+	rtc3_add_time(&rtc3_cur, &tihw.rtc3_beg, &r);
+	printf("%i.%i - %i.%i = %i.%i\n", 
+		rtc3_cur.s, rtc3_cur.ms, tihw.rtc3_beg.s, tihw.rtc3_beg.ms, r.s, r.ms);
+	*/
+
+	return 0;
+}
+
+// Call it after ti68k_state_load to update current clock so that the calc always
+// display the right time even if calc has been shudown.
+int rtc3_state_load(void)
+{
+	TTIME rtc3_cur;
+
+	if(tihw.hw_type < HW3)
+		return 0;
+
+	// clock disabled ?
+	if(!io3_bit_tst(0x5f,0))
+		return 0;
+
+	// update current time
+	rtc3_get_time(&rtc3_cur);
+
+	return 0;
+}
+
+// When compiling without GDB, build the Win32 implementation of gettimeofday
+// here to avoid the makefile hackery. GDB-enabled builds build it as part of
+// libiberty.
+#if defined(_WIN32) && defined(NO_GDB) && !defined(_MSC_VER)
+#include "../../misc/gettimeofday_win32_impl.h"
+#endif
diff --git a/src/core/ti_hw/rtc_hw3.h b/src/core/ti_hw/rtc_hw3.h
new file mode 100644
index 0000000..0ea822e
--- /dev/null
+++ b/src/core/ti_hw/rtc_hw3.h
@@ -0,0 +1,48 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hw.h 1455 2005-05-31 18:38:03Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2005, Christian Walther (patches for Mac OS-X port)
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_RTC3__
+#define __TI68K_RTC3__
+
+#include <time.h>
+
+typedef struct
+{
+	time_t	s;
+	int		ms;
+} TTIME;
+
+int rtc3_init(void);
+int rtc3_reset(void);
+int rtc3_exit(void);
+
+int rtc3_state_save(void);
+int rtc3_state_load(void);
+
+void rtc3_get_time(TTIME* tt);
+
+#endif
diff --git a/src/core/ti_hw/tichars.c b/src/core/ti_hw/tichars.c
new file mode 100644
index 0000000..a72bae6
--- /dev/null
+++ b/src/core/ti_hw/tichars.c
@@ -0,0 +1,385 @@
+/*  TiEmu - a TI calculator emulator
+ *
+ *  Character to key conversion routine
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "keydefs.h"
+
+static const int keys[256][5]={
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {TIKEY_ENTER1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_ESCAPE,TIKEY_DIAMOND,TIKEY_Q,TIKEY_VOID},
+ {TIKEY_CLEAR,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_2,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_3,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_4,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_5,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_6,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_7,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_8,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_9,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_A,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_B,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_C,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_D,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_E,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_2,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_3,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_4,-1},
+ {TIKEY_SPACE,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_2,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_3,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_4,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_5,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_6,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_7,-1},
+ {TIKEY_PALEFT,-1,-1,-1,-1},
+ {TIKEY_PARIGHT,-1,-1,-1,-1},
+ {TIKEY_MULTIPLY,-1,-1,-1,-1},
+ {TIKEY_PLUS,-1,-1,-1,-1},
+ {TIKEY_COMMA,-1,-1,-1,-1},
+ {TIKEY_MINUS,-1,-1,-1,-1},
+ {TIKEY_PERIOD,-1,-1,-1,-1},
+ {TIKEY_DIVIDE,-1,-1,-1,-1},
+ {TIKEY_0,-1,-1,-1,-1},
+ {TIKEY_1,-1,-1,-1,-1},
+ {TIKEY_2,-1,-1,-1,-1},
+ {TIKEY_3,-1,-1,-1,-1},
+ {TIKEY_4,-1,-1,-1,-1},
+ {TIKEY_5,-1,-1,-1,-1},
+ {TIKEY_6,-1,-1,-1,-1},
+ {TIKEY_7,-1,-1,-1,-1},
+ {TIKEY_8,-1,-1,-1,-1},
+ {TIKEY_9,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_THETA,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_M,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_0,-1,-1,-1},
+ {TIKEY_EQUALS,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PERIOD,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_8,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_9,-1},
+ {TIKEY_SHIFT,TIKEY_A,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_B,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_C,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_D,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_E,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_F,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_G,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_H,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_I,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_J,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_K,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_L,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_M,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_N,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_O,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_P,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_Q,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_R,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_S,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_T,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_U,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_V,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_W,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_X,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_Y,-1,-1,-1},
+ {TIKEY_SHIFT,TIKEY_Z,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_COMMA,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_EQUALS,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_DIVIDE,-1,-1,-1},
+ {TIKEY_POWER,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_A,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_B,-1},
+ {TIKEY_A,-1,-1,-1,-1},
+ {TIKEY_B,-1,-1,-1,-1},
+ {TIKEY_C,-1,-1,-1,-1},
+ {TIKEY_D,-1,-1,-1,-1},
+ {TIKEY_E,-1,-1,-1,-1},
+ {TIKEY_F,-1,-1,-1,-1},
+ {TIKEY_G,-1,-1,-1,-1},
+ {TIKEY_H,-1,-1,-1,-1},
+ {TIKEY_I,-1,-1,-1,-1},
+ {TIKEY_J,-1,-1,-1,-1},
+ {TIKEY_K,-1,-1,-1,-1},
+ {TIKEY_L,-1,-1,-1,-1},
+ {TIKEY_M,-1,-1,-1,-1},
+ {TIKEY_N,-1,-1,-1,-1},
+ {TIKEY_O,-1,-1,-1,-1},
+ {TIKEY_P,-1,-1,-1,-1},
+ {TIKEY_Q,-1,-1,-1,-1},
+ {TIKEY_R,-1,-1,-1,-1},
+ {TIKEY_S,-1,-1,-1,-1},
+ {TIKEY_T,-1,-1,-1,-1},
+ {TIKEY_U,-1,-1,-1,-1},
+ {TIKEY_V,-1,-1,-1,-1},
+ {TIKEY_W,-1,-1,-1,-1},
+ {TIKEY_X,-1,-1,-1,-1},
+ {TIKEY_Y,-1,-1,-1,-1},
+ {TIKEY_Z,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PALEFT,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_C,-1},
+ {TIKEY_2ND,TIKEY_PARIGHT,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_D,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_4,TIKEY_F,-1},
+
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_2,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_3,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_4,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_5,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_6,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_7,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_8,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_9,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_A,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_C,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_D,-1},
+ {TIKEY_2ND,TIKEY_POWER,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_F,-1},
+ {TIKEY_DIAMOND,TIKEY_G,TIKEY_SHIFT,TIKEY_S,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_G,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_H,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_I,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_J,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_K,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_L,-1},
+ {TIKEY_2ND,TIKEY_1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_5,-1},
+ {TIKEY_2ND,TIKEY_I,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_6,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_9,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_A,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_B,-1},
+ {TIKEY_DIAMOND,TIKEY_0,-1,-1,-1},
+ {TIKEY_DIAMOND,TIKEY_EQUALS,-1,-1,-1},
+ {TIKEY_DIAMOND,TIKEY_PERIOD,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_8,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_E,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_F,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_G,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_H,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_I,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_J,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_K,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_L,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_F,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_M,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_F},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_Q,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_G,-1},
+ {TIKEY_NEGATE,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_N,-1},
+ {-1,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_7,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_N,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_I,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_J,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_K,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_1,TIKEY_B,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_O,-1},
+ {-1,-1,-1,-1,-1},
+ {-1,-1,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_H,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_D},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_R,-1},
+ {TIKEY_2ND,TIKEY_8,TIKEY_BACKSPACE,-1,-1},
+ {TIKEY_2ND,TIKEY_7,TIKEY_BACKSPACE,-1,-1},
+ {TIKEY_2ND,TIKEY_J,-1,-1,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_3,TIKEY_P,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_3},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_5},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_7},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_9},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_B},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_D},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_3},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_5},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_7},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_3},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_5},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_7},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_3},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_5},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_3},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_5},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_7},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_9},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_L,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_B},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_3},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_5},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_7},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_A},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_8},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_7},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_2},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_4},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_6},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_8},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_A},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_C},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_1,TIKEY_E},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_2},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_2},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_4},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_6},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_2,TIKEY_8},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_2},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_4},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_6},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_3,TIKEY_8},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_4},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_6},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_2},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_4},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_6},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_8},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_A},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_2,TIKEY_M,-1},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_4,TIKEY_C},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_2},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_4},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_6},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_5,TIKEY_8},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_B},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_9},
+ {TIKEY_2ND,TIKEY_PLUS,TIKEY_5,TIKEY_6,TIKEY_C}
+};
+
+static const int keys89_12[5]={TIKEY_2ND,TIKEY_ESCAPE,TIKEY_HOME,TIKEY_VOID,-1};
+static const int keys89_58[3]={TIKEY_2ND,TIKEY_4,-1};
+static const int keys89_59[3]={TIKEY_2ND,TIKEY_9,-1};
+static const int keys89_92[3]={TIKEY_2ND,TIKEY_2,-1};
+static const int keys89_142[5]={TIKEY_DIAMOND,TIKEY_PALEFT,TIKEY_SHIFT,TIKEY_3,-1};
+static const int keys89_149[2]={TIKEY_EE,-1};
+static const int keys89_151[3]={TIKEY_2ND,TIKEY_CATALOG,-1};
+static const int keys89_190[3]={TIKEY_DIAMOND,TIKEY_CATALOG,-1};
+
+int *chars_to_keys(const char *chars, int ti89)
+{
+  int *buffer, *q, i, shift=0;
+  const unsigned char *p;
+  const int *row;
+  buffer=malloc((strlen(chars)*6+1)*sizeof(int));
+  if (!buffer)
+    return NULL;
+  q=buffer;
+  for (p=(const unsigned char *)chars; *p; p++) {
+    row=keys[*p];
+    if (ti89) {
+      switch (*p) {
+        case 12: // Form Feed => QUIT + HOME
+          row=keys89_12;
+          break;
+        case 58: // :
+          row=keys89_58;
+          break;
+        case 59: // ;
+          row=keys89_59;
+          break;
+        case 92: // backslash
+          row=keys89_92;
+          break;
+        case 142: // SIGMA
+          row=keys89_142;
+          break;
+        case 149: // EE
+          row=keys89_149;
+          break;
+        case 151: // imaginary i
+          row=keys89_151;
+          break;
+        case 190: // infinity
+          row=keys89_190;
+          break;
+        default:
+          break;
+      }
+    }
+    for (i=0; i<5; i++) {
+      if (row[i]==-1)
+        break;
+      if (ti89) {
+        switch (row[i]) {
+#define ALPHA(letter,key89) case TIKEY_ ## letter: \
+                              if (!shift) \
+                                *(q++)=TIKEY_ALPHA; \
+                              *(q++)=TIKEY_ ## key89; \
+                              shift=0; \
+                              break;
+          ALPHA(A,EQUALS)
+          ALPHA(B,PALEFT)
+          ALPHA(C,PARIGHT)
+          ALPHA(D,COMMA)
+          ALPHA(E,DIVIDE)
+          ALPHA(F,PIPE)
+          ALPHA(G,7)
+          ALPHA(H,8)
+          ALPHA(I,9)
+          ALPHA(J,MULTIPLY)
+          ALPHA(K,EE)
+          ALPHA(L,4)
+          ALPHA(M,5)
+          ALPHA(N,6)
+          ALPHA(O,MINUS)
+          ALPHA(P,STORE)
+          ALPHA(Q,1)
+          ALPHA(R,2)
+          ALPHA(S,3)
+          ALPHA(U,PLUS)
+          ALPHA(V,0)
+          ALPHA(W,PERIOD)
+          ALPHA(SPACE,NEGATE)
+          case TIKEY_SHIFT:
+            *(q++)=TIKEY_SHIFT;
+            shift=1;
+            break;
+          default:
+            *(q++)=row[i];
+            shift=0;
+            break;
+        }
+      } else {
+        *(q++)=row[i];
+      }
+    }
+  }
+  *q=-1;
+  return buffer;
+}
diff --git a/src/core/ti_hw/tichars.h b/src/core/ti_hw/tichars.h
new file mode 100644
index 0000000..b547c60
--- /dev/null
+++ b/src/core/ti_hw/tichars.h
@@ -0,0 +1,28 @@
+/*  TiEmu - a TI calculator emulator
+ *
+ *  Character to key conversion routine
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef TICHARS_H
+#define TICHARS_H
+#include <glib.h>
+
+G_BEGIN_DECLS
+int *chars_to_keys(const char *chars, int ti89);
+G_END_DECLS
+#endif
diff --git a/src/core/ti_hw/tilibs.h b/src/core/ti_hw/tilibs.h
new file mode 100644
index 0000000..4ce40a9
--- /dev/null
+++ b/src/core/ti_hw/tilibs.h
@@ -0,0 +1,39 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: tilibs.h 2222 2006-09-21 16:35:18Z kevinkofler $ */
+
+/*  tilp - Ti Linking Program
+ *  Copyright (C) 1999-2004  Romain Lievin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  This file includes libtifiles, libticables & libticalcs headers and some
+  other needed headers.
+*/
+
+#ifndef TILIBS_H
+#define TILIBS_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ticables.h>
+#include <tifiles.h>
+#include <ticalcs.h>
+#include <ticonv.h>
+
+#endif
diff --git a/src/core/ti_sw/er_codes.c b/src/core/ti_sw/er_codes.c
new file mode 100644
index 0000000..c642db9
--- /dev/null
+++ b/src/core/ti_sw/er_codes.c
@@ -0,0 +1,186 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: er_codes.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2005, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    ER_throw support
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* This table is converted and hand-edited from the TIGCC error.h. */
+static struct {unsigned int id; const char *name;} erthrow_table[] = {
+  {0, "ER_OK"},
+  {1, "ER_EXIT"},
+  {2, "ER_STOP"},
+  {3, "ER_OFF"},
+  {4, "ER_PRGM_STOP"},
+  {9, "ER_NO_MSG"},
+  {10, "ER_FUNC_DID_NOT_RETURN_VALUE"},
+  {20, "ER_TEST_NOT_TRUE_OR_FALSE"},
+  {30, "ER_ARG_CANNOT_BE_FOLDER"},
+  {40, "ER_ARGUMENT"},
+  {50, "ER_ARG_MISMATCH"},
+  {60, "ER_EXPECTED_BOOL_OR_AGG"},
+  {70, "ER_ARG_MUST_BE_DECIMAL"},
+  {80, "ER_ARG_MUST_BE_LABEL"},
+  {90, "ER_ARGUMENT_MUST_BE_LIST"},
+  {100, "ER_ARG_MUST_BE_MATRIX"},
+  {110, "ER_ARG_MUST_BE_PIC"},
+  {120, "ER_ARG_MUST_BE_PIC_OR_STR"},
+  {130, "ER_ARG_MUST_BE_STRING"},
+  {140, "ER_EXPECTED_VAR"},
+  {150, "ER_ARG_MUST_BE_EMPTY_FOLDER"},
+  {160, "ER_EXPECTED_ALGEBRAIC"},
+  {161, "ER_ASAP_TOO_LONG"},
+  {163, "ER_ATTRIBUTE_NOT_FOUND"},
+  {165, "ER_BATT_LOW"},
+  {170, "ER_BOUND"},
+  {180, "ER_BREAK"},
+  {185, "ER_CHECKSUM"},
+  {190, "ER_CIRCULAR_DEFINITION"},
+  {200, "ER_INVALID_SUCH_THAT"},
+  {210, "ER_DATATYPE"},
+  {220, "ER_DEPENDENT_LIMIT"},
+  {225, "ER_DIFF_EQ_SETUP"},
+  {230, "ER_DIMENSION"},
+  {240, "ER_NON_CONFORMING_LISTS"},
+  {250, "ER_DIVBY0"},
+  {260, "ER_DOMAIN"},
+  {270, "ER_DUPLICATE_VAR_NAME"},
+  {280, "ER_ELSE_WITHOUT_IF"},
+  {290, "ER_ENDTRY_WITHOUT_ELSE"},
+  {295, "ER_EXCESSIVE_ITERATION"},
+  {300, "ER_EXPECTED_2OR3_ELEMENTS"},
+  {305, "ER_EXPIRED"},
+  {307, "ER_APP_EXT_NOT_FOUND"},
+  {308, "ER_APP_NOT_FOUND"},
+  {310, "ER_INVALID_NSOLVE_ARG1"},
+  {320, "ER_INVALID_SOLVE_ARG1"},
+  {330, "ER_FOLDER"},
+  {335, "ER_FUNCS_IN_DIFF_EQ"},
+  {345, "ER_INCONSISTENT_UNITS"},
+  {350, "ER_INVALID_SUBSCRIPT"},
+  {360, "ER_INVALID_INDIR_STRING"},
+  {380, "ER_INVALID_ANS"},
+  {390, "ER_ILLEGAL_ASSIGNMENT"},
+  {400, "ER_ILLEGAL_ASSIGNMENT_VALUE"},
+  {405, "ER_INVALID_AXES"},
+  {410, "ER_ILLEGAL_COMMAND"},
+  {420, "ER_INVALID_FOLDER_NAME"},
+  {430, "ER_GRAPH_MODE"},
+  {435, "ER_INVALID_GUESS"},
+  {440, "ER_INVALID_IMPLIED_MULT"},
+  {450, "ER_ILLEGAL_IN_FUNC"},
+  {460, "ER_ILLEGAL_IN_CUSTOM"},
+  {470, "ER_ILLEGAL_IN_DIALOG"},
+  {480, "ER_ILLEGAL_IN_TOOLBAR"},
+  {490, "ER_CANNOT_EXIT_FROM_TRY"},
+  {500, "ER_INVALID_LABEL"},
+  {510, "ER_INVALID_LIST_OR_MATRIX"},
+  {520, "ER_INVAL_OUTSIDE_TB_CM"},
+  {530, "ER_INVAL_OUTSIDE_DG_TB_CM"},
+  {540, "ER_INVALID_OUTSIDE_DIALOG"},
+  {550, "ER_MUST_BE_IN_PRGM_OR_FUNC"},
+  {560, "ER_EXIT_NOT_IN_LOOP"},
+  {570, "ER_INVALID_PATHNAME"},
+  {575, "ER_INVALID_POLAR_COMPLEX"},
+  {580, "ER_ILLEGAL_PRGM_REF"},
+  {590, "ER_INVALID_SYNTAX_BLOCK"},
+  {600, "ER_INVALID_TABLE"},
+  {605, "ER_INVALID_USE_OF_UNITS"},
+  {610, "ER_INVALID_LOCAL_DECLARATION"},
+  {620, "ER_EXPECTED_VAR_OR_FUNC"},
+  {630, "ER_INVALID_VAR_REF"},
+  {640, "ER_INVALID_VECTOR_SYNTAX"},
+  {650, "ER_LINK_IO"},
+  {665, "ER_MAT_NOT_DIAGONALIZABLE"},
+  {670, "ER_MEMORY"},
+  {673, "ER_STACK_VIO"},
+  {680, "ER_EXPECTED_LPAR"},
+  {690, "ER_EXPECTED_RPAR"},
+  {700, "ER_EXPECTED_DOUBLE_QUOTE"},
+  {710, "ER_EXPECTED_RIGHT_BRACKET"},
+  {720, "ER_EXPECTED_RIGHT_BRACE"},
+  {730, "ER_INVALID_BLOCK_STRUCTURE"},
+  {740, "ER_MISSING_THEN"},
+  {750, "ER_NOT_FUNC_OR_PRGM"},
+  {765, "ER_NO_FUNCS_SEL"},
+  {780, "ER_NO_SOLUTION"},
+  {790, "ER_NON_ALGEBRAIC_VARIABLE"},
+  {800, "ER_UNREAL_RESULT"},
+  {810, "ER_MEMORY_DML"},
+  {830, "ER_OVERFLOW"},
+  {840, "ER_STAT_PLOT"},
+  {850, "ER_PRGM_NOT_FOUND"},
+  {860, "ER_RECURSION_TOO_DEEP"},
+  {870, "ER_RESERVED"},
+  {875, "ER_ROM_ROUTINE_NOT_AVAILABLE"},
+  {880, "ER_SEQUENCE_SETUP"},
+  {885, "ER_SIGNATURE_ERR"},
+  {890, "ER_SINGULARMAT"},
+  {895, "ER_SLOPE_FIELD_FUNCS"},
+  {900, "ER_EMPTY_GROUP_NOT_VALID"},
+  {910, "ER_SYNTAX"},
+  {930, "ER_TOO_FEW_ARGS"},
+  {940, "ER_TOO_MANY_ARGS"},
+  {950, "ER_TOO_MANY_SUBSCRIPTS"},
+  {955, "ER_TOO_MANY_UNDEFINED"},
+  {960, "ER_UNDEFINED_VAR"},
+  {965, "ER_UNLICENSED"},
+  {970, "ER_VAR_IN_USE"},
+  {980, "ER_PROTECTED"},
+  {990, "ER_NAME_TOO_LONG"},
+  {1000, "ER_RANGE"},
+  {1010, "ER_ZOOM"},
+  {1020, "ER_ILLEGAL_TAG"},
+  {1030, "ER_MEM_VIO"},
+  {2048, NULL}
+};
+
+const char* ercodes_get_name(unsigned id)
+{
+	if(id >= 2048)
+		return "Unknown ERROR code";
+	else
+	{
+		unsigned n = sizeof(erthrow_table)/sizeof(*erthrow_table), lb = 0, ub = n-1;
+		while (lb < ub - 1)	
+		{
+			unsigned mid = (lb + ub) >> 1;
+			if (erthrow_table[mid].id <= id)
+				lb = mid;
+			else
+				ub = mid;
+		}
+		if (id != erthrow_table[lb].id)
+		{
+			static char buffer[100];
+			sprintf(buffer, "%s + %u", erthrow_table[lb].name,
+			        id - erthrow_table[lb].id);
+			return buffer;
+		}
+		else
+			return erthrow_table[lb].name;
+	}
+}
+
diff --git a/src/core/ti_sw/handles.c b/src/core/ti_sw/handles.c
new file mode 100644
index 0000000..f7afce4
--- /dev/null
+++ b/src/core/ti_sw/handles.c
@@ -0,0 +1,189 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: handles.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Handles/Heap access:
+	$5D42 is a pointer on the Handles[] array. An handle is an index in this array
+	which poins on a memory allocatedblock :
+	Handles[0] => block 0
+	Handles[1] => block 1 ....
+
+	The first word just before the beginning of the block is the block size.
+
+	- HeapAlloc: | size | block |
+				  		  |
+	HeapDeref           --+
+
+	- HeapAllocPtr:		--+
+						  |
+		| size | handle | block |
+				 |
+	HeapDeref  --+
+
+	- PedRom: | size.l | handle | block |
+								  |
+	HeapDeref					--+
+
+
+*/
+
+#include <stdio.h>
+
+#include "handles.h"
+#include "romcalls.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+
+static int pedrom = 0;
+
+/*
+	Retrieve address of heap (pointed by $5D42 on TI92).
+*/
+void heap_get_addr(uint32_t *base)
+{
+	pedrom = (mem_rd_word(0x32) == (('R'<<8)+'O'));
+
+	if(pedrom && mem_rd_word(0x30)<=0x0080) // PedroM <=0.80
+	{
+		uint32_t ptr = 0x5d58;				// fixed by PPhD for AMS1 compat
+		*base = mem_rd_long(ptr);
+	}
+	else if(tihw.ti92v2) // TI-92 II
+	{
+		uint32_t ptr = 0x4720 + 0x1902;		//tios::main_lcd�equ�tios::globals+$0000
+		*base = mem_rd_long(ptr);
+	}
+	else if(tihw.ti92v1) // TI-92 I
+	{
+		uint32_t ptr = 0x4440 + 0x1902;		//and tios::heap equ tios::globals+$1902
+		*base = mem_rd_long(ptr);
+	}
+	else
+	{
+		uint32_t b, size, addr, ptr;
+
+		romcalls_get_table_infos(&b, &size);
+		if(size < 0x441 && !pedrom) // AMS 1
+		{
+			romcalls_get_symbol_address(0x96, &addr);	// tios::HeapDeref (#0x096)
+			ptr = mem_rd_word(addr + 8);				// MOVEA.W $7592,A0
+			*base = mem_rd_long(ptr);
+		} else // AMS 2, PedroM >=0.81
+		{
+			romcalls_get_symbol_address(0x441, &addr);	// tios::HeapTable	(#0x441)
+			*base  = addr;
+		}
+	}
+}
+
+/*
+	Get address of an allocated block (like HeapDeref)
+*/
+
+uint32_t heap_deref(int handle)
+{
+	uint32_t base;
+
+	heap_get_addr(&base);
+	return mem_rd_long(base + 4*handle);
+}
+
+void heap_get_block_addr(int handle, uint32_t *addr)
+{
+	*addr = heap_deref(handle);
+}
+
+/*
+	Get size of an allocated block (like HeapSize)
+*/
+uint16_t heap_size(int handle)
+{
+	uint32_t base;
+	uint32_t addr;
+	uint16_t size;
+
+	heap_get_addr(&base);
+
+	addr = mem_rd_long(base + 4*handle);
+	if(!pedrom)
+	{
+		size = mem_rd_word(addr - 2);
+		size &= ~(1 << 16);	// remove lock
+		size <<= 1;			// size is twice
+		size -= 2;
+	}
+	else if(addr >= tihw.rom_base) // archived file on PedroM - use file size
+	{
+		size = mem_rd_word(addr);
+		size += 2;
+	}
+	else
+	{
+		size = (uint16_t)mem_rd_long(addr - 6);
+		size -= 6;
+	}
+
+	return size;
+}
+
+void heap_get_block_size(int handle, uint16_t *size)
+{
+	*size = heap_size(handle);
+}
+
+/*
+	Given an handle, retrieve block size and block address
+*/
+void heap_get_block_addr_and_size(int handle, uint32_t *addr, uint16_t *size)
+{
+	*addr = heap_deref(handle);
+	*size = heap_size(handle);
+}
+
+/*
+	Walk in the heap to search for a block address.
+*/
+void heap_search_for_address(uint32_t address, int *handle)
+{
+	uint32_t base;
+	int i;
+
+	heap_get_addr(&base);
+
+	for(i = 1; i < HEAP_MAX_SIZE; i++)
+	{
+		uint32_t addr = mem_rd_long(base + 4*i);
+		uint16_t size = mem_rd_word(addr - 2);
+		
+		if (addr && (address >= addr) && (address < addr+size))
+			*handle = i;
+	}
+
+	*handle = -1;
+}
+
+//#define HeapDeref(handle) HeapTable[handle]
+//#define HeapSize(handle) ((short*)HeapDeref(handle))[-1]<<1;
diff --git a/src/core/ti_sw/handles.h b/src/core/ti_sw/handles.h
new file mode 100644
index 0000000..2bf6420
--- /dev/null
+++ b/src/core/ti_sw/handles.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: handles.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __HANDLES__
+#define __HANDLES__
+
+#include <stdint.h>
+
+void heap_get_addr(uint32_t *base);
+
+void heap_get_block_addr(int handle, uint32_t *addr);
+void heap_get_block_size(int handle, uint16_t *size);
+void heap_get_block_addr_and_size(int handle, uint32_t *addr, uint16_t *size);
+
+void heap_search_for_address(uint32_t address, int *handle);
+
+// aliases
+uint32_t heap_deref(int handle);
+uint16_t heap_size(int handle);
+
+#define HEAP_MAX_SIZE 2000
+
+#endif
diff --git a/src/core/ti_sw/iodefs.c b/src/core/ti_sw/iodefs.c
new file mode 100644
index 0000000..511a31e
--- /dev/null
+++ b/src/core/ti_sw/iodefs.c
@@ -0,0 +1,358 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: iodefs.c 2372 2007-02-25 21:43:23Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    IO ports definitions loader/parser.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "ti68k_int.h"
+#include "iodefs.h"
+#include "logging.h"
+
+GNode*	tree = NULL;
+extern int img_changed;
+
+static const char* iodefs_calc2str(int calc_type)
+{
+	switch(calc_type)
+	{
+		case TI89:  return "ti89";
+		case TI92:  return "ti92";
+		case TI92p: return "ti92p";
+		case V200:  return "v200";
+        case TI89t: return "ti89t";
+		default:    return "none";
+	}
+	return "";
+}
+
+static const char* iodefs_get_filename()
+{
+	static char s[256] = "";
+
+	sprintf(s, "iodefs_%s_hw%i.txt", 
+		iodefs_calc2str(tihw.calc_type), tihw.hw_type);
+
+	return s;
+}
+
+// get section name [section]
+static char* get_section(char *s)
+{
+	char *b, *e;
+
+	b = strchr(s, '[');
+	e = strrchr(s, ']');
+
+	if(!b ||!e)
+	{
+		fprintf(stdout, "Missing '[' or ']' token in section name!\n");
+		return NULL;
+	}
+
+	b++;
+	*e = '\0';
+
+	return b;
+}
+
+static char* get_name(char *s)
+{
+	char *t;
+
+	while(*s == ' ') s++;
+
+	t = strchr(s, '\t');
+	if(t) *t = '\0';
+
+	return s;
+}
+
+// convert "ro", "wo", "rw" into value
+static int get_type(const char* s)
+{
+	while(*s == ' ') s++;
+
+	if(s[0] == 'r' && s[1] == 'o')
+		return IO_RO;
+	else if(s[0] == 'w' && s[1] == 'o')
+		return IO_WO;
+	else if(s[0] == 'r' && s[1] == 'w')
+		return IO_RW;
+
+	return 0;
+}
+
+// parse <..5.....> entry and returns number of available bits
+static int get_bits(const char *s, IO_DEF* t)
+{
+	char *b, *e;
+	int i, j, nbits = 8 * t->size;
+	int all;
+
+	while(*s == ' ') s++;
+
+	b = strchr(s, '<');
+	e = strrchr(s, '>');
+
+	if(!b ||!e)
+	{
+		fprintf(stdout, "Missing '<' or '>' token !\n");
+		return -1;
+	}
+
+	b++;
+	e--;
+	all = !strncmp(b, "all", 3);
+
+	if((e - b + 1) != nbits && !all)
+	{
+		fprintf(stdout, "Number of bits does not match size !\n");
+		return -1;
+	}
+
+	memset(t->bits, 0, nbits);
+	for(i = 0, j = 0; i < nbits; i++)
+	{
+		if(b[i] == '.')
+		{
+		}
+		else if(isdigit(b[i]) || all)
+		{
+			t->bits[j++] = nbits - i - 1;
+		}
+		else
+		{
+			fprintf(stdout, "Wrong character in bit sequence (digit or '.') !\n");
+			return -1;
+		}
+	}
+
+	t->nbits = j;
+
+	return 0;
+}
+
+static int get_bit_names(char *s, IO_DEF *t)
+{
+	int i;
+	gchar **split;
+
+	if(s == NULL)
+		return 0;
+
+	while(*s == ' ') s++;
+
+	split = g_strsplit(s, ",", t->nbits);
+	if(split[0] == NULL)
+		return 0;
+
+	for(i = 0; i < t->nbits; i++)
+	{
+		if(split[i] != NULL)
+			t->bit_name[i] = strdup(split[i]);
+	}
+	
+	return 0;
+}
+
+// get bit string <76543210>
+static char* get_bit_str(char *s)
+{
+	char *b, *e;
+
+	b = strchr(s, '<');
+	e = strrchr(s, '>');
+
+	if(!b ||!e)
+	{
+		fprintf(stdout, "Missing '<' or '>' token in bit mask !\n");
+		return NULL;
+	}
+
+	*++e = '\0';
+
+	return b;
+}
+
+/*
+	Unload information on I/O ports (free resources).
+*/
+static gboolean free_node(GNode *node, gpointer data)
+{
+	if (node)
+		if(node->data)
+			free(node->data);
+
+	return FALSE;
+}
+
+int iodefs_unload(void)
+{
+  if(tree != NULL) 
+  {
+		g_node_traverse(tree, G_IN_ORDER, G_TRAVERSE_ALL, -1, free_node, NULL);
+		g_node_destroy(tree);
+		tree = NULL;
+  }
+  return 0;
+}
+
+/*
+	Load information on I/O ports.
+	Return value:
+	 0 if successful
+	-1 if error
+	-2 if no image
+	-4 if already loaded
+
+	File naming scheme : "iodefs_model.txt" => iodefs_89.txt
+*/
+int iodefs_load(const char* path)
+{
+	FILE *f;
+	gchar *filename;
+	int n;
+	char line[1024];
+	
+	GNode* parent = NULL;
+	GNode* node;
+
+	static int calc_type = 0;
+	static int hw_type = 0;
+
+	if(!img_loaded) 
+		return -2;
+	if(calc_type != tihw.calc_type || hw_type != tihw.hw_type)
+	{
+		calc_type = tihw.calc_type;
+		hw_type = tihw.hw_type;
+	}
+	else
+		return -4;
+
+	if(tree)
+		iodefs_unload();
+	
+	filename = g_strconcat(path, iodefs_get_filename(), NULL);
+	f = fopen(filename, "rb");
+	if(f == NULL)
+	{
+		g_free(filename);
+		return -1;
+	}
+
+	tree = g_node_new(NULL);
+
+	for(n = 0; !feof(f);)
+	{
+		gchar **split;
+		IO_DEF *s;
+
+		if (!fgets(line, sizeof(line), f))
+			break;
+		/* An empty string means end of file. Don't clobber other stack
+		   variables with the underflow. */
+		if (!*line)
+			break;
+		line[strlen(line) - 2] = '\0';
+
+		if(feof(f))
+			break;
+
+		if(line[0] == ';')
+			continue;
+		else if(line[0] == '[')
+		{
+			char *name = get_section(line);
+			if(name == NULL) return -1;
+
+			s = (IO_DEF*)calloc(1, sizeof(IO_DEF));
+			s->name = strdup(name);
+
+			parent = g_node_new(s);
+			g_node_append(tree, parent);
+
+			continue;
+		}
+		else if(line[0] == '#')
+		{
+		}
+		else if(line[0] != '$')
+			continue;
+		
+
+		split = g_strsplit(line, "|", 6);
+		if(!split[0] || !split[1] || !split[2] || !split[3] || !split[4] )
+		{
+			fprintf(stderr, "Error at line %i: malformed line !\n", n);
+			return -1;
+		}
+
+		s = (IO_DEF*)calloc(1, sizeof(IO_DEF));
+
+		sscanf(split[0], "$%06x", &s->addr);
+		sscanf(split[1], "%i", &s->size);
+		s->type = get_type(split[2]);
+		s->bit_str = strdup(get_bit_str(split[3]));
+		if(get_bits(split[3], s) == -1)
+			return -1;
+		s->all_bits = (s->nbits == (8 * s->size));
+		s->name = strdup(get_name(split[4]));
+
+		if(get_bit_names(split[5], s) == -1)
+			return -1;
+
+		if(parent == NULL)
+		{
+			fprintf(stderr, "Error at line %i: no section defined !\n", n);
+			return -1;
+		}
+
+		node = g_node_new(s);
+		g_node_append(parent, node);
+
+		n++;
+	}
+
+	g_free(filename);
+	fclose(f);
+
+	tiemu_info(_("loading I/O defs: %s (%i entries)"), iodefs_get_filename(), n);
+    return 0;
+}
+
+GNode* iodefs_tree(void)
+{
+	return tree;
+}
diff --git a/src/core/ti_sw/iodefs.h b/src/core/ti_sw/iodefs.h
new file mode 100644
index 0000000..559a5e0
--- /dev/null
+++ b/src/core/ti_sw/iodefs.h
@@ -0,0 +1,68 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: iodefs.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  Breakpoint definitions
+*/
+
+#ifndef __IODEFS_H__
+#define __IODEFS_H__
+
+#include <stdio.h>
+#include <stdint.h>
+#include <glib.h>
+
+/* Types */
+
+typedef enum
+{
+	IO_RO = 1, IO_WO = 2, IO_RW = 3,
+} IO_ACC;
+
+typedef struct
+{
+	uint32_t	addr;		// $600000
+	int			size;		// 1, 2, 4 bytes
+	int			type;		// ro, wo, rw
+
+	char*		bit_str;	// <..5...1.>
+	int			bits[32];	// bit number like 1,5
+
+	int			nbits;		// number of bits usable
+	int			all_bits;	// set to 1 if all bits are used
+
+	char*		bit_name[32];// name of each bit (like SLE)
+	char*		name;		// "Constrast and battery status"
+} IO_DEF;
+
+/* Functions */
+
+int iodefs_load(const char *path);
+int iodefs_unload(void);
+
+GNode* iodefs_tree(void);
+
+#endif
diff --git a/src/core/ti_sw/mem_map.c b/src/core/ti_sw/mem_map.c
new file mode 100644
index 0000000..9c0f24a
--- /dev/null
+++ b/src/core/ti_sw/mem_map.c
@@ -0,0 +1,170 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: iodefs.c 2372 2007-02-25 21:43:23Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Sarrayt - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory Maps loader/parser.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "ti68k_int.h"
+#include "mem_map.h"
+#include "logging.h"
+
+MEM_MAP** array = NULL;
+extern int img_changed;
+
+static const char* memmap_calc2str(int calc_type)
+{
+	switch(calc_type)
+	{
+		case TI89:  return "ti89";
+		case TI92:  return "ti92";
+		case TI92p: return "ti92p";
+		case V200:  return "v200";
+        case TI89t: return "ti89t";
+		default:    return "none";
+	}
+	return "";
+}
+
+static const char* memmap_get_filename()
+{
+	static char s[256] = "";
+
+	sprintf(s, "memmap_%s_hw%i.txt", 
+		memmap_calc2str(tihw.calc_type), tihw.hw_type);
+
+	return s;
+}
+
+int memmap_unload(void)
+{
+  if(array != NULL) 
+  {
+	  MEM_MAP **ptr;
+	  for(ptr = array; *ptr; ptr++)
+		  g_free(*ptr);
+	  g_free(array);
+	  array = NULL;
+  }
+
+  return 0;
+}
+
+/*
+	Load information on I/O ports.
+	Return value:
+	 0 if successful
+	-1 if error
+	-2 if no image
+	-4 if already loaded
+
+	File naming scheme : "memmap_model.txt" => memmap_89.txt
+*/
+int memmap_load(const char* path)
+{
+	FILE *f;
+	gchar *filename;
+	char line[1024];
+	int n;
+
+	static int calc_type = 0;
+	static int hw_type = 0;
+
+	if(!img_loaded) 
+		return -2;
+	if(calc_type != tihw.calc_type || hw_type != tihw.hw_type)
+	{
+		calc_type = tihw.calc_type;
+		hw_type = tihw.hw_type;
+	}
+	else
+		return -4;
+
+	if(array)
+		memmap_unload();
+	
+	filename = g_strconcat(path, memmap_get_filename(), NULL);
+	f = fopen(filename, "rb");
+	if(f == NULL)
+	{
+		g_free(filename);
+		return -1;
+	}
+
+	for(n = 0; !feof(f);)
+	{
+		gchar **split;
+		MEM_MAP *s;
+		guint32 tmp;
+
+		if (!fgets(line, sizeof(line), f))
+			break;
+		if (!*line)
+			break;
+		line[strlen(line) - 2] = '\0';
+
+		if(line[0] == ';')
+			continue;
+
+		if(strlen(line) < 2)
+			continue;
+
+		if(feof(f))
+			break;
+
+		split = g_strsplit_set(line, "-:", 3);
+		if(!split[0] || !split[1] || !split[2])
+		{
+			fprintf(stderr, "Error at line %i: malformed line !\n", n);
+			return -1;
+		}
+
+		array = g_realloc(array, (n+2) * sizeof(MEM_MAP *));
+		s = g_new0(MEM_MAP, 1);
+		
+		sscanf(split[0], "%06x", &s->addr);
+		sscanf(split[1], "%06x", &tmp);
+		s->size = tmp - s->addr + 1;
+		s->name = strdup(split[2]);
+
+		g_strfreev(split);
+		array[n++] = s;
+		array[n] = NULL;
+	}
+
+	g_free(filename);
+	fclose(f);
+
+	tiemu_info(_("loading memory map: %s"), memmap_get_filename());
+    return 0;
+}
+
+MEM_MAP** memmap_array(void)
+{
+	return array;
+}
diff --git a/src/core/ti_sw/mem_map.h b/src/core/ti_sw/mem_map.h
new file mode 100644
index 0000000..f35792b
--- /dev/null
+++ b/src/core/ti_sw/mem_map.h
@@ -0,0 +1,55 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: iodefs.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  Breakpoint definitions
+*/
+
+#ifndef __MEMMAP_H__
+#define __MEMMAP_H__
+
+#include <stdio.h>
+#include <stdint.h>
+#include <glib.h>
+
+/* Types */
+
+typedef struct
+{
+	uint32_t	addr;		// $200000
+	uint32_t	size;		// 1 MB
+
+	char*		name;		// "FLASH"
+} MEM_MAP;
+
+/* Functions */
+
+int memmap_load(const char *path);
+int memmap_unload(void);
+
+MEM_MAP** memmap_array(void);
+
+#endif
diff --git a/src/core/ti_sw/registers.c b/src/core/ti_sw/registers.c
new file mode 100644
index 0000000..6ea2964
--- /dev/null
+++ b/src/core/ti_sw/registers.c
@@ -0,0 +1,350 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: registers.c 2603 2007-07-14 17:09:56Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Registers access/manipulation
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#include "libuae.h"
+#include "ti68k_int.h"
+#include "ti68k_def.h"
+#include "bits.h"
+
+/* Flushes GDB's register cache */
+extern void registers_changed(void);
+/* Flushes GDB's frame cache */
+extern void reinit_frame_cache(void);
+/* Refreshes Insight */
+extern void gdbtk_update(void);
+
+// SR bits set/get modifiers
+#define SR_get_T(sr)        bit_get(sr, 15)
+#define SR_get_S(sr)        bit_get(sr, 13)
+#define SR_get_I(sr)        (((sr) >> 8) & 7)
+
+#define SR_get_X(sr)        bit_get(sr, 4)
+#define SR_get_N(sr)        bit_get(sr, 3)
+#define SR_get_Z(sr)        bit_get(sr, 2)
+#define SR_get_V(sr)        bit_get(sr, 1)
+#define SR_get_C(sr)        bit_get(sr, 0)
+
+#define SR_chg_T(sr, s)     bit_chg(sr, 15, s);
+#define SR_chg_S(sr, s)     bit_chg(sr, 13, s)
+#define SR_chg_I(sr, v)     { sr &= ~(7 << 8); sr |= (v << 8); }
+
+#define SR_chg_X(sr, s)     bit_chg(sr, 4, s)
+#define SR_chg_N(sr, s)     bit_chg(sr, 3, s)
+#define SR_chg_Z(sr, s)     bit_chg(sr, 2, s)
+#define SR_chg_V(sr, s)     bit_chg(sr, 1, s)
+#define SR_chg_C(sr, s)     bit_chg(sr, 0, s)
+
+// Previous state to detect change
+static uint32_t old_d[8];
+static uint32_t old_a[8];
+static uint32_t old_sp, old_usp, old_ssp;
+static uint32_t old_pc;
+static uint16_t old_sr;
+static char old_sf[32];
+static char old_uf[32];
+
+void ti68k_register_set_data(int n, uint32_t val)
+{
+    if (n>=0 && n<8) m68k_dreg(regs,n) = val;
+#ifndef NO_GDB
+    registers_changed ();
+	gdbtk_update();
+#endif
+}
+
+void ti68k_register_set_addr(int n, uint32_t val)
+{
+    if (n>=0 && n<8) m68k_areg(regs,n) = val;
+#ifndef NO_GDB
+    registers_changed ();
+	gdbtk_update();
+#endif
+}
+
+void ti68k_register_set_sp(uint32_t val)
+{
+    m68k_areg(regs,7) = val;
+#ifndef NO_GDB
+    registers_changed ();
+    reinit_frame_cache ();
+	gdbtk_update();
+#endif
+}
+
+void ti68k_register_set_usp(uint32_t val)
+{
+    if(!regs.s)
+        m68k_areg(regs,7) = val;
+    else
+        regs.usp = val;
+
+#ifndef NO_GDB
+    registers_changed ();
+    reinit_frame_cache ();
+	gdbtk_update();
+#endif
+}
+
+void ti68k_register_set_ssp(uint32_t val)
+{
+    if(regs.s)
+        m68k_areg(regs,7) = val;
+    else
+        regs.isp = val;
+
+#ifndef NO_GDB
+    registers_changed ();
+    reinit_frame_cache ();
+	gdbtk_update();
+#endif
+}
+
+void ti68k_register_set_pc(uint32_t val)
+{
+    m68k_setpc(val);
+    fill_prefetch_slow (); /* Force reloading the prefetch. */
+
+#ifndef NO_GDB
+    registers_changed ();
+    reinit_frame_cache ();
+	gdbtk_update();
+#endif
+}
+
+void ti68k_register_set_sr(uint32_t val)
+{
+    regs.sr = (int)val;
+    MakeFromSR();
+
+#ifndef NO_GDB
+    registers_changed ();
+	gdbtk_update();
+#endif
+}
+
+void ti68k_register_set_flag(uint8_t flag)
+{
+  	//TODO
+  	/* T  0  S  0  0  I2 I1 I0 0  0  0  X  N  Z  V  C */	  
+#ifndef NO_GDB
+    registers_changed ();
+	gdbtk_update();
+#endif
+}
+
+int ti68k_register_set_flags(const char *sf, const char *uf)
+{
+	/* SR: T 0 S 0 0 I2 I1 I0 0 0 0 X N Z V C */
+	int t, s, i, x, n, z, v, c;
+	int nargs;
+	
+    MakeSR();
+
+	if(sf != NULL)
+	{
+		nargs = sscanf(sf, "T=%d S=%d I=%d", &t, &s, &i);
+		
+		if(nargs < 3)
+			return 0;
+		if((i < 0) || (i > 7))
+			return 0;
+    
+        SR_chg_T(regs.sr, 1);
+        SR_chg_T(regs.sr, t);
+        SR_chg_S(regs.sr, s);
+        SR_chg_I(regs.sr, i);
+	}
+
+	if(uf != NULL)
+	{
+		nargs = sscanf(uf, "X=%d N=%d \nZ=%d V=%d C=%d", &x, &n, &z, &v, &c);
+
+		if(nargs < 5)
+			return 0;
+
+        SR_chg_X(regs.sr, x);
+        SR_chg_N(regs.sr, n);
+        SR_chg_Z(regs.sr, z);
+        SR_chg_V(regs.sr, v);
+        SR_chg_C(regs.sr, c);
+	}
+
+    MakeFromSR();
+
+#ifndef NO_GDB
+    registers_changed ();
+	gdbtk_update();
+#endif
+
+	return !0;
+}
+
+int ti68k_register_get_data(int n, uint32_t *val)
+{
+	int c = 0;
+	
+    if (n>=0 && n<8)
+    	*val = m68k_dreg(regs,n);
+    	
+    if(m68k_dreg(regs,n) != old_d[n])
+    	c = !0;
+    	
+    old_d[n] = m68k_dreg(regs,n);
+    return c;
+}
+
+int ti68k_register_get_addr(int n, uint32_t *val)
+{
+	int c = 0;
+
+    if (n>=0 && n<8) 
+    	*val = m68k_areg(regs,n);
+    
+    if(m68k_areg(regs,n) != old_a[n])
+    	c = !0;
+    	
+    old_a[n] = m68k_areg(regs,n);
+    return c;
+}
+	
+int ti68k_register_get_sp(uint32_t *val)
+{
+	int c = 0;
+	
+	*val = m68k_areg(regs,7);
+	if(m68k_areg(regs,7) != old_sp)
+		c = !0;
+
+	old_sp = m68k_areg(regs,7);
+    return c;
+}
+
+int ti68k_register_get_usp(uint32_t *val)
+{
+    int c = 0;
+    uae_u32 *reg;
+
+    if(!regs.s)
+        reg = &m68k_areg(regs,7);
+    else
+        reg = &regs.usp;
+
+    *val = *reg;
+	if(*reg != old_usp)
+		c = !0;
+
+	old_usp = *reg;
+    return c;
+}
+
+int ti68k_register_get_ssp(uint32_t *val)
+{
+    int c = 0;
+    uae_u32 *reg;
+
+    if(regs.s)
+        reg = &m68k_areg(regs,7);
+    else
+        reg = &regs.isp;
+
+    *val = *reg;
+	if(*reg != old_ssp)
+		c = !0;
+
+	old_ssp = *reg;
+    return c;
+}
+
+int ti68k_register_get_pc(uint32_t *val)
+{
+	int c = 0;
+
+    *val = m68k_getpc();
+	if(*val != old_pc)
+		c = !0;
+
+	old_pc = regs.pc;
+	return c;
+}
+
+int ti68k_register_get_sr(uint32_t *val)
+{
+	int c =0;
+
+    MakeSR();
+    *val = regs.sr;
+	if(regs.sr != old_sr)
+		c = !0;
+
+	old_sr = regs.sr;
+	return c;
+}
+
+const char *ti68k_register_get_flag(void)
+{
+    static char str[64];
+
+	/* T  0  S  0  0  I2 I1 I0 0  0  0  X  N  Z  V  C */
+    MakeSR();
+    printf("T=%d S=%d I=%d | X=%d N=%d\nZ=%d V=%d C=%d\n",
+        SR_get_T(regs.sr), SR_get_S(regs.sr),
+        SR_get_I(regs.sr), SR_get_X(regs.sr),
+        SR_get_N(regs.sr), SR_get_Z(regs.sr),
+        SR_get_V(regs.sr), SR_get_C(regs.sr)
+        );
+
+    return str;
+}
+
+int ti68k_register_get_flags(char *sf, char *uf)
+{
+	int c =0;
+
+	/* SR: T 0 S 0 0 I2 I1 I0 0 0 0 X N Z V C */
+    MakeSR();
+    sprintf(sf, "T=%d S=%d I=%d", SR_get_T(regs.sr), SR_get_S(regs.sr), SR_get_I(regs.sr));
+	sprintf(uf, "X=%d N=%d \nZ=%d V=%d C=%d",   /* %dSPC\n: SPC is important ! */
+        SR_get_X(regs.sr), SR_get_N(regs.sr), SR_get_Z(regs.sr), 
+        SR_get_V(regs.sr), SR_get_C(regs.sr));	 
+
+	if(strcmp(sf, old_sf) || strcmp(uf, old_uf))
+		c = !0;
+
+	strcpy(old_sf, sf);
+	strcpy(old_uf, uf);
+	return c;
+}
+
diff --git a/src/core/ti_sw/registers.h b/src/core/ti_sw/registers.h
new file mode 100644
index 0000000..412aa88
--- /dev/null
+++ b/src/core/ti_sw/registers.h
@@ -0,0 +1,60 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: registers.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_REGS__
+#define __TI68K_REGS__
+
+typedef enum {
+    REG_D0, REG_D1, REG_D2, REG_D3,
+    REG_D4, REG_D5, REG_D6, REG_D7,
+} Ti68kDataRegister;
+
+typedef enum {
+    REG_A0, REG_A1, REG_A2, REG_A3,
+    REG_A4, REG_A5, REG_A6, REG_A7,
+} Ti68kAddrRegister;
+
+void ti68k_register_set_data(int n, uint32_t val);
+void ti68k_register_set_addr(int n, uint32_t val);
+void ti68k_register_set_sp(uint32_t val);
+void ti68k_register_set_usp(uint32_t val);
+void ti68k_register_set_ssp(uint32_t val);
+void ti68k_register_set_pc(uint32_t val);
+void ti68k_register_set_sr(uint32_t val);
+void ti68k_register_set_flag(uint8_t flag);
+int  ti68k_register_set_flags(const char *sf, const char *uf);
+
+int ti68k_register_get_data(int n, uint32_t *val);
+int ti68k_register_get_addr(int n, uint32_t *val);
+int ti68k_register_get_sp(uint32_t *val);
+int ti68k_register_get_usp(uint32_t *val);
+int ti68k_register_get_ssp(uint32_t *val);
+int ti68k_register_get_pc(uint32_t *val);
+int ti68k_register_get_sr(uint32_t *val);
+const char *ti68k_register_get_flag(void);
+int ti68k_register_get_flags(char *sf, char *uf);
+
+#endif
diff --git a/src/core/ti_sw/romcalls.c b/src/core/ti_sw/romcalls.c
new file mode 100644
index 0000000..0e896bf
--- /dev/null
+++ b/src/core/ti_sw/romcalls.c
@@ -0,0 +1,375 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: romcalls.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Symbols (ROM calls address and names)
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "romcalls.h"
+#include "images.h"
+#include "ti68k_def.h"
+#include "timem.h"
+
+extern int img_changed;		// set if image modified
+static int loaded = 0;		// loaded
+
+static ROM_CALL table[NMAX_ROMCALLS];	// list by id
+static GList	*list = NULL;			// sorted list (by id, addr or name)
+
+
+/* =========== */
+
+/*
+	Retrieve base address of ROM calls table and size.
+*/
+void romcalls_get_table_infos(uint32_t *base, uint32_t *size)
+{
+	*base = *size = 0;
+
+	if(tihw.calc_type == TI92)
+		return;
+
+	*base = rd_long(&tihw.rom[0x12000 + 0x88 + 0xC8]);
+	*size = rd_long(&tihw.rom[((*base-4) & 0x0fffff)]);
+}
+
+/*
+	Given a ROM call ID, retrieve address of ROM call.
+*/
+void romcalls_get_symbol_address(int id, uint32_t *addr)
+{
+	uint32_t base;
+
+	base = rd_long(&tihw.rom[0x12000 + 0x88 + 0xC8]);
+	*addr = rd_long(&tihw.rom[(base & 0x0fffff) + 4*id]); 
+}
+
+/* =========== */
+
+/* Load a list of ROM calls symbols (addr & id), TIGCC formatted. */
+static void load_tigcc_file_type(FILE *f)    // os.h TIGCC file: ".set acos, 0xF5"
+{
+    char buf[256];
+    char *name, *p;
+    int n;
+    int number;
+
+    while(!feof(f))
+    {
+        if (!fgets(buf, sizeof(buf), f))
+            break;
+
+        // no '.set' ?
+        if(*buf != '.')
+            continue;
+
+        // get function name
+        name = strdup(buf+5);
+        p = strchr(name, ',');
+        if(p == NULL)
+			continue;
+        else
+			*p++ = '\0';
+
+        // get function number
+        n = sscanf(p, "%x", &number);
+        if((n < 1) || (number > 0x7ff))
+        {
+            free(name);
+            continue;
+        }
+
+		// and store
+		table[number].name = name;
+		table[number].id = number;
+    }
+}
+
+/* Load a list of ROM calls symbols (addr & id), tthdex formatted. */
+static void load_lionel_file_type(FILE *f)   // Lionel Debroux formatted file: 2E:ScrToHome
+{
+    char str[256];
+    int number;
+
+    while(!feof(f))
+    {
+        gchar **array;
+
+        // get line
+        if (!fgets(str, sizeof(str), f) || feof(f))
+             break;
+		for (number = strlen(str) - 1; str[number] == '\n' || str[number] == '\r'; number--) str[number] = '\0';
+
+        if(!strchr(str, ':'))
+            continue;
+
+        // split
+        array = g_strsplit(str, ":", 2);
+        if(!array[0] || !array[1])
+        {
+            g_strfreev(array);
+            continue;
+        }
+
+        // get values and store
+        sscanf(array[0], "%x", &number);
+		table[number].name = strdup(array[1]);
+		table[number].id = number;
+
+        g_strfreev(array);
+    }
+}
+
+/*
+	Load ROM calls (id & addr) from file. Don't touch addr field.
+*/
+static int load_from_file(const char *filename)
+{
+	FILE *f;
+	char tmp[32];
+
+	printf("Loading ROM calls from file <%s>... ", filename);
+    memset(table, 0, sizeof(table));
+
+    f = fopen(filename, "rt");
+    if(f == NULL
+       || !fgets(tmp, sizeof(tmp), f)
+       || !fgets(tmp, sizeof(tmp), f))
+	{
+		printf("Failed to open <%s> with error %s (%d)\n", 
+			       filename, strerror(errno), errno);
+        return -1;
+	}
+
+	rewind(f);
+
+    if(!strncmp(tmp, ".set", strlen(".set")))
+        load_tigcc_file_type(f);
+	else
+		load_lionel_file_type(f);
+
+    fclose(f);
+	printf("Done !\n");
+
+	return 0;
+}
+
+/*
+	Fill the addr field from ROM calls located in FLASH. Don't touch other fields !
+	And construct list from ROM call table.
+*/
+static int merge_from_flash(void)
+{
+	uint32_t addr;
+	int size;
+	int i;
+
+	if(list != NULL)
+	{
+		g_list_free(list);
+		list = NULL;
+	}
+
+	romcalls_get_table_infos(&addr, (uint32_t *)&size);
+	if(size == 0)
+		return -1;
+
+	printf("Parsing ROM calls from flash memory (%i entries at $%06x)... ", size, addr);
+
+	for(i = 0; i < size; i++)
+	{
+		if(table[i].name == NULL)
+			table[i].name = strdup("unknown");
+
+		table[i].addr = rd_long(&tihw.rom[(addr & 0x0fffff) + (i << 2)]); 
+
+		list = g_list_append (list, &table[i]);
+	}
+	
+	//list = g_list_reverse(list);
+	printf("Done !\n");
+
+	return 0;
+}
+
+/*
+	Load ROM calls from file and FLASH and merge.
+	Return value:
+	 0 if successful
+	-1 if error
+	-2 if no image
+	-3 if TI92
+	-4 if already loaded
+*/
+int romcalls_load(const char* filename)
+{
+	IMG_INFO *img = &img_infos;
+
+	// check whether parsing is possible
+	if(!img_loaded) return -2;
+	if(img->calc_type == TI92) return -3;
+
+	// check for reload
+	if(!img_changed)
+		return -4;
+	else
+		img_changed = 0;
+
+	if(load_from_file(filename))
+		return -1;
+
+	if(merge_from_flash())
+		return -1;
+
+	loaded = !0;
+
+    return 0;
+}
+
+int romcalls_is_loaded(void)
+{
+	return loaded;
+}
+
+/* =========== */
+
+// negative value if a < b; zero if a = b; positive value if a > b
+static gint compare_func_by_id(gconstpointer a, gconstpointer b)
+{
+	ROM_CALL *aa = (ROM_CALL *)a;
+	ROM_CALL *bb = (ROM_CALL *)b;
+
+	if(aa->id == bb->id)
+		return 0;
+	else if(aa->id > bb->id)
+		return 1;
+	else return -1;
+}
+
+GList* romcalls_sort_by_id(void)
+{
+	return g_list_sort(list, compare_func_by_id);
+}
+
+// negative value if a < b; zero if a = b; positive value if a > b
+static gint compare_func_by_addr(gconstpointer a, gconstpointer b)
+{
+	ROM_CALL *aa = (ROM_CALL *)a;
+	ROM_CALL *bb = (ROM_CALL *)b;
+
+	if(aa->addr == bb->addr)
+		return 0;
+	else if(aa->addr > bb->addr)
+		return 1;
+	else return -1;
+}
+
+GList* romcalls_sort_by_addr(void)
+{
+	return list = g_list_sort(list, compare_func_by_addr);
+}
+
+// negative value if a < b; zero if a = b; positive value if a > b
+static gint compare_func_by_name(gconstpointer a, gconstpointer b)
+{
+	ROM_CALL *aa = (ROM_CALL *)a;
+	ROM_CALL *bb = (ROM_CALL *)b;
+
+	return strcmp(aa->name, bb->name);
+}
+
+GList* romcalls_sort_by_name(void)
+{
+	return list = g_list_sort(list, compare_func_by_name);
+}
+
+// negative value if a < b; zero if a = b; positive value if a > b
+static gint compare_func_by_iname(gconstpointer a, gconstpointer b)
+{
+	ROM_CALL *aa = (ROM_CALL *)a;
+	ROM_CALL *bb = (ROM_CALL *)b;
+
+	return g_ascii_strcasecmp(aa->name, bb->name);
+}
+
+GList* romcalls_sort_by_iname(void)
+{
+	return list = g_list_sort(list, compare_func_by_iname);
+}
+
+/* =========== */
+
+// cache last search (disasm)
+static int last_id = 0;	
+
+// returns id or -1
+int romcalls_is_addr(uint32_t addr)
+{
+	int i;
+
+	if(!loaded)	return -1;
+
+	for(i = 0; i < (int)g_list_length(list); i++)
+	{
+		if(addr == table[i].addr)
+			return last_id = i;
+	}
+
+	return -1;
+}
+
+// returns id or -1
+int romcalls_is_name(const char *name)
+{
+	int i;
+
+	if(!loaded)	return -1;
+
+	for(i = 0; i < (int)g_list_length(list); i++)
+	{
+		if(!strcmp(name, table[i].name))
+			return i;
+	}
+
+	return -1;
+}
+
+const char* romcalls_get_name(int id)
+{
+	if(!loaded)	return "not loaded";
+	return table[id].name;
+}
+
+uint32_t romcalls_get_addr(int id)
+{
+	return table[id].addr;
+}
diff --git a/src/core/ti_sw/romcalls.h b/src/core/ti_sw/romcalls.h
new file mode 100644
index 0000000..d9a4ea4
--- /dev/null
+++ b/src/core/ti_sw/romcalls.h
@@ -0,0 +1,77 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: romcalls.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  Breakpoint definitions
+*/
+
+#ifndef __ROMCALLS__
+#define __ROMCALLS__
+
+#include <stdio.h>
+#include <stdint.h>
+#ifndef FLOATFORMAT_H /* Don't include glib.h when included from GDB. */
+#include <glib.h>
+#endif
+
+#define NMAX_ROMCALLS	0x800
+
+/* Types */
+
+typedef struct
+{
+	int			id;
+    uint32_t    addr;
+    char*       name;
+} ROM_CALL;
+
+/* Functions */
+
+void romcalls_get_table_infos(uint32_t *base, uint32_t *size);
+void romcalls_get_symbol_address(int id, uint32_t *addr);
+int romcalls_load(const char* filename);
+int romcalls_is_loaded(void);
+
+#ifndef FLOATFORMAT_H
+GList* romcalls_sort_by_id(void);
+GList* romcalls_sort_by_addr(void);
+GList* romcalls_sort_by_name(void);
+GList* romcalls_sort_by_iname(void);
+#endif
+
+int romcalls_is_addr(uint32_t addr);
+int romcalls_is_name(const char *name);
+
+const char* romcalls_get_name(int id);
+uint32_t romcalls_get_addr(int id);
+
+const char* ercodes_get_name(unsigned id);
+
+#define ROMCALL_ID(elt)		(((ROM_CALL *)(elt->data))->id)
+#define ROMCALL_NAME(elt)	(((ROM_CALL *)(elt->data))->name)
+#define ROMCALL_ADDR(elt)	(((ROM_CALL *)(elt->data))->addr)
+
+#endif
diff --git a/src/core/ti_sw/timem.c b/src/core/ti_sw/timem.c
new file mode 100644
index 0000000..b9a3a3f
--- /dev/null
+++ b/src/core/ti_sw/timem.c
@@ -0,0 +1,79 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: timem.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Memory access (take care of little/big endian issues)
+*/
+
+#include <stdint.h>
+#include <glib.h>
+
+#include "timem.h"
+#include "mem.h"
+
+/* General functions (not related to TI memory) */
+
+uint16_t rd_word(uint8_t *p)
+{
+	uint16_t *p16 = (uint16_t *)p;
+	return GUINT16_FROM_BE(*p16);
+}
+
+uint32_t rd_long(uint8_t *p)
+{
+	uint32_t *p32 = (uint32_t *)p;
+	return GUINT32_FROM_BE(*p32);
+}
+
+void wr_word(uint8_t *p, uint16_t d)
+{
+	uint16_t *p16 = (uint16_t *)p;
+	*p16 = GUINT16_TO_BE(d);
+}
+
+void wr_long(uint8_t *p, uint32_t d)
+{
+	uint32_t *p32 = (uint32_t *)p;
+	*p32 = GUINT32_TO_BE(d);
+}
+
+/* Memory access functions (TI memory) */
+
+void mem_rd_block(uint32_t a, uint8_t *d, uint16_t len)
+{
+	int i;
+
+	for(i = 0; i < len; i++)
+		d[i] = mem_rd_byte(a+i);
+}
+
+void mem_wr_block(uint32_t a, uint8_t *d, uint16_t len)
+{
+	int i;
+
+	for(i = 0; i < len; i++)
+		mem_wr_byte(a+i, d[i]);
+}
diff --git a/src/core/ti_sw/timem.h b/src/core/ti_sw/timem.h
new file mode 100644
index 0000000..152acdc
--- /dev/null
+++ b/src/core/ti_sw/timem.h
@@ -0,0 +1,53 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: romcalls.h 864 2005-02-22 09:54:05Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TIMEM__
+#define __TIMEM__
+
+#include "mem.h"
+
+/*
+	Functions
+*/
+
+uint16_t rd_word(uint8_t *p);
+uint32_t rd_long(uint8_t *p);
+
+void wr_word(uint8_t *p, uint16_t d);
+void wr_long(uint8_t *p, uint32_t d);
+
+#define mem_rd_byte		mem_get_byte_ptr
+#define mem_rd_word		mem_get_word_ptr
+#define mem_rd_long		mem_get_long_ptr
+
+#define mem_wr_byte		mem_put_byte_ptr
+#define mem_wr_word		mem_put_word_ptr
+#define mem_wr_long		mem_put_long_ptr
+
+void mem_rd_block(uint32_t a, uint8_t *d, uint16_t len);
+void mem_wr_block(uint32_t a, uint8_t *d, uint16_t len);
+
+#endif
diff --git a/src/core/ti_sw/vat.c b/src/core/ti_sw/vat.c
new file mode 100644
index 0000000..980d40b
--- /dev/null
+++ b/src/core/ti_sw/vat.c
@@ -0,0 +1,461 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: vat.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Variable Allocation Table access routines
+*/
+
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+
+#include "handles.h"
+#include "vat.h"
+
+typedef struct 
+{
+	char name[8]; 
+	uint16_t compat; 
+	union { 
+		uint16_t flags_n; 
+		struct { 
+			uint16_t busy : 1, local : 1, flag1_5 : 1, flag1_4 : 1, collapsed : 1, twin : 1, archived : 1, in_view : 1; 
+			uint16_t folder : 1, overwritten : 1, checked : 1, hidden : 1, locked : 1, statvar : 1, graph_ref_1 : 1, graph_ref_0 : 1; 
+		} bits; 
+	} flags; 
+	uint16_t handle; 
+} TI89_SYM_ENTRY;
+
+typedef struct 
+{ 
+	uint16_t folder; 
+	uint16_t offset; 
+} TI89_HSym;
+
+/*
+	"a" To "z", "A" To "Z", Chr(128), Chr(129), Chr(130), Chr(131), Chr(132), Chr(133), Chr(134), 
+	Chr(135), Chr(136), Chr(137), Chr(138), Chr(139), Chr(141), Chr(142), Chr(143), Chr(144), 
+	Chr(145), Chr(146), Chr(147), Chr(148), "�" To "�", "�" To "�", "�" To "�", "_", Chr(154), 
+	Chr(155), Chr(178), "\"
+	and "0" To "9" (apart from first position)
+*/
+static int valid_chars[256] = {
+	0, 0, 0, 0, 0, 0, 0, 0,		0, 0, 0, 0, 0, 0, 0, 0,	// 0x00
+	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,	// 0x20
+	1, 1, 1, 1, 1, 1, 1, 1,		1, 1, 0, 0, 0, 0, 0, 0,
+	0, 1, 1, 1, 1, 1, 1, 1,		1, 1, 1, 1, 1, 1, 1, 1,	// 0x40
+	1, 1, 1, 1, 1, 1, 1, 1,		1, 1, 1, 0, 1, 0, 0, 1,
+	0, 1, 1, 1, 1, 1, 1, 1,		1, 1, 1, 1, 1, 1, 1, 1,	// 0x60
+	1, 1, 1, 1, 1, 1, 1, 1,		1, 1, 1, 0, 0, 0, 0, 0,
+	1, 1, 1, 1, 1, 1, 1, 1,		1, 1, 1, 1, 0, 1, 1, 1,	// 0x80
+	1, 1, 1, 1, 1, 0, 0, 0,		0, 0, 1, 1, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0,		0, 0, 0, 0, 0, 0, 0, 0,	// 0xa0
+	0, 0, 1, 0, 0, 0, 0, 0,		0, 0, 0, 0, 0, 0, 0, 0,
+	1, 1, 1, 1, 1, 1, 1, 0,		1, 1, 1, 1, 1, 1, 1, 1,	// 0xc0
+	1, 1, 1, 1, 1, 1, 1, 0,		1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 0,		1, 1, 1, 1, 1, 1, 1, 1,	// 0xe0
+	1, 1, 1, 1, 1, 1, 1, 0,		1, 1, 1, 1, 1, 1, 1, 1,
+};
+
+#define is_allowed_char(x)	(valid_chars[(x) & 0xff])
+//#define is_alnum(c)			isalnum((char)(c))
+
+// Return TRUE if there is a NULL terminated string starting at *mem.
+static int is_varname(uint8_t *mem)
+{
+	int i=0;
+
+	//printf("%i %i %i %02x\n", is_alnum(mem[i]) ? 1 : 0, is_allowed_char(mem[i]), mem[i], mem[i]);
+
+	// The VAT can contain names starting with a number, they are hidden in Var-Link.
+	if(!is_allowed_char(mem[0]))
+		return 0;
+
+	for(i=1; i<8; i++)
+		if(!is_allowed_char(mem[i]) && mem[i])
+			return 0;
+
+	return !0;
+}
+
+static int get_folder_list_handle(void)
+{
+	int h, i;
+
+	// search for memory blocks which have a string at [5]
+	for(h = 1; h < HEAP_MAX_SIZE; h++)
+	{
+		uint32_t addr;
+		uint16_t size;
+
+		heap_get_block_addr_and_size(h, &addr, &size);
+		if(is_varname(ti68k_get_real_address(addr + 4)))
+		{
+			// next, be sure we have found the folder list by comparing the number of (possible)
+			// folders with the number of identified folders
+			int nfolders = mem_rd_word(addr+2);
+			
+			// The folder list always contains at least the main folder.
+			if(nfolders == 0)
+				continue;
+
+			for(i = 0; i < nfolders; i++)
+				if(!is_varname(ti68k_get_real_address(addr + 4 + i*sizeof(TI89_SYM_ENTRY))))
+					break;
+
+			// not valid, so try the next handle
+			if(i < nfolders)
+				continue;
+
+			printf("handle $%i, #folders = %i\n", h, nfolders);
+			return h;
+		}
+	}
+
+	return -1;
+}
+
+static int parse_vat_89(GNode *node_top)
+{
+	uint32_t fa, va, pa;
+	uint16_t fs, vs, ps;
+	int nfolders, nvars;
+	int i, j;
+	VatSymEntry *vse;
+	GNode *node_fol, *node_var;
+	int handle = 0x08;
+
+	if(tihw.calc_type == TI92)
+		return -1;	
+
+	// handle: names and handles of all folders (including "main")
+	if(strcmp(img_infos.version, "2.00") >= 0)
+		handle = get_folder_list_handle();	// AMS2 (dynamic)
+	else
+		handle = 0x08;	// AMS1 (static)
+
+	if(handle == -1)
+		return -1;
+	else
+		heap_get_block_addr_and_size(handle, &fa, &fs);
+
+	// skip maximum number of folders before handle #$B needs to be resized
+	// and actual number of folders 
+	nfolders = mem_rd_word(fa+2);
+	fa += 4;
+
+	// now, we read a list of SYM_ENTRY structs (list of folders)
+	for(i=0; i<nfolders; i++)
+	{
+		TI89_SYM_ENTRY se;
+		
+		// read struct
+		memcpy(&se, ti68k_get_real_address(fa + i * sizeof(TI89_SYM_ENTRY)), sizeof(TI89_SYM_ENTRY));
+		se.handle = GUINT16_FROM_BE(se.handle);
+
+		// add node
+		vse = g_malloc0(sizeof(VatSymEntry));
+		strcpy(vse->name, se.name);	vse->handle = se.handle;
+		g_node_append(node_top, node_fol = g_node_new(vse));
+
+		// handle xxxx: names and handles of all variables
+		heap_get_block_addr_and_size(se.handle, &va, &vs);
+
+		// skip max num and actual num of vars
+		nvars = mem_rd_word(va+2);
+		va += 4;
+
+		for(j=0; j<nvars; j++)
+		{
+			TI89_SYM_ENTRY se;
+
+			// read struct
+			memcpy(&se, ti68k_get_real_address(va + j * sizeof(TI89_SYM_ENTRY)), sizeof(TI89_SYM_ENTRY));
+			se.handle = GUINT16_FROM_BE(se.handle);
+
+			// add node
+			vse = g_malloc0(sizeof(VatSymEntry));
+			strcpy(vse->name, se.name);	vse->handle = se.handle;
+			g_node_append(node_fol, node_var = g_node_new(vse));
+
+			// handle: variable content
+			heap_get_block_addr_and_size(se.handle, &pa, &ps);
+		}
+	}
+
+	return 0;
+}
+
+/*
+	An excellent doc on VAT: http://doors.ticalc.org/tips.htm#VAT
+*/
+
+typedef struct 
+{
+	char name[9]; 
+	uint8_t state;
+	uint16_t handle; 
+} TI92_SYM_ENTRY;
+
+// tested: OK.
+static int parse_vat_92(GNode *node_top)
+{
+	uint32_t fa, va, pa;
+	uint16_t fs, vs, ps;
+	int nfolders, nvars;
+	int i, j;
+	VatSymEntry *vse;
+	GNode *node_fol, *node_var;
+
+	if(tihw.calc_type != TI92)
+		return -1;
+
+	// handle 000B:	names and handles of all folders (including "main")
+	heap_get_block_addr_and_size(0xb, &fa, &fs);
+
+	// skip maximum number of folders before handle #$B needs to be resized
+	// and actual number of folders 
+	nfolders = mem_rd_word(fa+2);
+	fa += 4;
+
+	// now, we read a list of SYM_ENTRY structs (list of folders)
+	for(i=0; i<nfolders; i++)
+	{
+		TI92_SYM_ENTRY se;
+		
+		// read struct
+		memcpy(&se, ti68k_get_real_address(fa + i * sizeof(TI92_SYM_ENTRY)), sizeof(TI92_SYM_ENTRY));
+		se.handle = GUINT16_FROM_BE(se.handle);
+
+		// add node
+		vse = g_malloc0(sizeof(VatSymEntry));
+		strcpy(vse->name, se.name);	vse->handle = se.handle;
+		g_node_append(node_top, node_fol = g_node_new(vse));
+
+		// handle xxxx: names and handles of all variables
+		heap_get_block_addr_and_size(se.handle, &va, &vs);
+
+		// skip max num and actual num of vars
+		nvars = mem_rd_word(va+2);
+		va += 4;
+
+		for(j=0; j<nvars; j++)
+		{
+			TI92_SYM_ENTRY se;
+
+			// read struct
+			memcpy(&se, ti68k_get_real_address(va + j * sizeof(TI92_SYM_ENTRY)), sizeof(TI92_SYM_ENTRY));
+			se.handle = GUINT16_FROM_BE(se.handle);
+
+			// add node
+			vse = g_malloc0(sizeof(VatSymEntry));
+			strcpy(vse->name, se.name);	vse->handle = se.handle;
+			g_node_append(node_fol, node_var = g_node_new(vse));
+
+			// handle: variable content
+			heap_get_block_addr_and_size(se.handle, &pa, &ps);
+		}
+	}
+
+	return 0;
+}
+
+/*
+	Allocate and create a tree
+*/
+int vat_parse(GNode **tree)
+{
+	VatSymEntry *vse;
+
+	if(tree == NULL)
+		return -1;
+
+	vse = g_malloc0(sizeof(VatSymEntry));
+	strcpy(vse->name, "home");
+	*tree = g_node_new(vse);
+
+	if(tihw.calc_type == TI92)
+		parse_vat_92(*tree);
+	else
+		parse_vat_89(*tree);
+
+	return 0;
+}
+
+
+static int sym_find_handle_89(const char *dirname, const char *filename)
+{
+	uint32_t fa, va;
+	uint16_t fs, vs;
+	int nfolders, nvars;
+	int i, j;
+	int handle = 0x08;
+
+	if(tihw.calc_type == TI92)
+		return -1;	
+
+	// handle: names and handles of all folders (including "main")
+	if(strcmp(img_infos.version, "2.00") >= 0)
+		handle = get_folder_list_handle();	// AMS2 (dynamic)
+	else
+		handle = 0x08;	// AMS1 (static)
+
+	if(handle == -1)
+		return 0;
+	else
+		heap_get_block_addr_and_size(handle, &fa, &fs);
+
+	// skip maximum number of folders before handle #$B needs to be resized
+	// and actual number of folders 
+	nfolders = mem_rd_word(fa+2);
+	fa += 4;
+
+	// now, we read a list of SYM_ENTRY structs (list of folders)
+	for(i=0; i<nfolders; i++)
+	{
+		TI89_SYM_ENTRY se;
+		
+		// read struct
+		memcpy(&se, ti68k_get_real_address(fa + i * sizeof(TI89_SYM_ENTRY)), sizeof(TI89_SYM_ENTRY));
+		se.handle = GUINT16_FROM_BE(se.handle);
+
+		if (strncmp (se.name, dirname, 8)) continue;
+
+		// handle xxxx: names and handles of all variables
+		heap_get_block_addr_and_size(se.handle, &va, &vs);
+
+		// skip max num and actual num of vars
+		nvars = mem_rd_word(va+2);
+		va += 4;
+
+		for(j=0; j<nvars; j++)
+		{
+			TI89_SYM_ENTRY se;
+
+			// read struct
+			memcpy(&se, ti68k_get_real_address(va + j * sizeof(TI89_SYM_ENTRY)), sizeof(TI89_SYM_ENTRY));
+			se.handle = GUINT16_FROM_BE(se.handle);
+
+			// add node
+			if (strncmp (se.name, filename, 8)) continue;
+
+			return se.handle;
+		}
+	}
+
+	return 0;
+}
+
+static int sym_find_handle_92(const char *dirname, const char *filename)
+{
+	uint32_t fa, va;
+	uint16_t fs, vs;
+	int nfolders, nvars;
+	int i, j;
+
+	if(tihw.calc_type != TI92)
+		return 0;
+
+	// handle 000B:	names and handles of all folders (including "main")
+	heap_get_block_addr_and_size(0xb, &fa, &fs);
+
+	// skip maximum number of folders before handle #$B needs to be resized
+	// and actual number of folders 
+	nfolders = mem_rd_word(fa+2);
+	fa += 4;
+
+	// now, we read a list of SYM_ENTRY structs (list of folders)
+	for(i=0; i<nfolders; i++)
+	{
+		TI92_SYM_ENTRY se;
+		
+		// read struct
+		memcpy(&se, ti68k_get_real_address(fa + i * sizeof(TI92_SYM_ENTRY)), sizeof(TI92_SYM_ENTRY));
+		se.handle = GUINT16_FROM_BE(se.handle);
+
+		if (strncmp (se.name, dirname, 8)) continue;
+
+		// handle xxxx: names and handles of all variables
+		heap_get_block_addr_and_size(se.handle, &va, &vs);
+
+		// skip max num and actual num of vars
+		nvars = mem_rd_word(va+2);
+		va += 4;
+
+		for(j=0; j<nvars; j++)
+		{
+			TI92_SYM_ENTRY se;
+
+			// read struct
+			memcpy(&se, ti68k_get_real_address(va + j * sizeof(TI92_SYM_ENTRY)), sizeof(TI92_SYM_ENTRY));
+			se.handle = GUINT16_FROM_BE(se.handle);
+
+			// add node
+			if (strncmp (se.name, filename, 8)) continue;
+
+			return se.handle;
+		}
+	}
+
+	return 0;
+}
+
+/*
+	Allocate and create a tree
+*/
+int sym_find_handle(const char *dirname, const char *filename)
+{
+	if(tihw.calc_type == TI92)
+		return sym_find_handle_92(dirname, filename);
+	else
+		return sym_find_handle_89(dirname, filename);
+}
+
+static gboolean free_vse(GNode *node, gpointer data)
+{
+	if (node) 
+		g_free(node->data);
+	return FALSE;
+}
+
+/*
+	Free a previously allocated tree
+*/
+int vat_free(GNode **tree)
+{
+	if (*tree != NULL) 
+	{
+	    g_node_traverse(*tree, G_IN_ORDER, G_TRAVERSE_ALL, -1, free_vse, NULL);
+		g_node_destroy(*tree);
+		*tree = NULL;
+	}
+
+	return 0;
+}
diff --git a/src/core/ti_sw/vat.h b/src/core/ti_sw/vat.h
new file mode 100644
index 0000000..7bed00a
--- /dev/null
+++ b/src/core/ti_sw/vat.h
@@ -0,0 +1,50 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: vat.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __VAT__
+#define __VAT__
+
+/*
+	Definitions
+*/
+
+typedef struct
+{
+	char		name[9];
+	uint16_t	handle;
+} VatSymEntry;
+
+
+/*
+	Functions
+*/
+
+int vat_parse(GNode **tree);
+int vat_free(GNode **tree);
+int sym_find_handle(const char *dirname, const char *filename);
+
+
+#endif
diff --git a/src/core/type2str.c b/src/core/type2str.c
new file mode 100644
index 0000000..5d736b9
--- /dev/null
+++ b/src/core/type2str.c
@@ -0,0 +1,307 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: type2str.c 2601 2007-07-14 08:49:30Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+    Type conversion routines
+*/
+
+#include <stdio.h>
+#include <string.h>
+
+#include "intl.h"
+#include "ti68k_def.h"
+#include "bkpts.h"
+
+const char *ti68k_calctype_to_string(int type)
+{
+	switch(type)
+	{
+		case TI89:  return "TI89";
+		case TI92:  return "TI92";
+		case TI92p: return "TI92+";
+		case V200:  return "V200PLT";
+        case TI89t: return "TI89t";
+		default:    return "none";
+	}
+}
+
+int ti68k_string_to_calctype(const char *str)
+{
+	if(!strcmp(str, "TI89"))
+		return TI89;
+	else if(!strcmp(str, "TI92"))
+		return TI92;
+	else if(!strcmp(str, "TI92+"))
+		return TI92p;
+	else if(!strcmp(str, "V200PLT"))
+		return V200;
+    else if(!strcmp(str, "TI89t"))
+		return TI89t;
+       
+	return 0;
+}
+
+const char *ti68k_romtype_to_string(int type)
+{
+	switch(type)
+	{
+		case 0:			return "EPROM";
+		case FLASH_ROM:	return "FLASH";
+	}
+		
+	return 0;
+}
+
+int         ti68k_string_to_romtype(const char *str)
+{
+	if(!strcmp(str, "EPROM"))
+		return 0;
+	else if(!strcmp(str, "FLASH"))
+		return FLASH_ROM;
+		
+	return 0;
+}
+
+const char *ti68k_hwtype_to_string(int type)
+{
+	switch(type)
+	{
+		case HW1:   return "HW1";
+		case HW2:   return "HW2";
+        case HW3:   return "HW3";
+		case HW4:   return "HW4";
+		default:    return "none";
+	}
+}
+
+int ti68k_string_to_hwtype(const char *str)
+{
+	if(!strcmp(str, "HW1"))
+		return HW1;
+	else if(!strcmp(str, "HW2"))
+		return HW2;
+    else if(!strcmp(str, "HW3"))
+		return HW3;
+	else if(!strcmp(str, "HW4"))
+		return HW4;
+
+	return 0;
+}
+
+const char *ti68k_exception_to_string(int number)
+{
+	switch(number)
+	{
+		case 0: return _("Initial SSP");
+		case 1: return _("Initial PC");
+		case 2: return _("Bus Error vector");
+		case 3: return _("Address Error vector");
+		case 4: return _("Illegal Instruction vector");
+		case 5: return _("Zero Divide vector");
+		case 6: return _("CHK Instruction vector");
+		case 7: return _("TRAPV Instruction vector");
+		case 8: return _("Privilege Violation vector");
+		case 9: return _("Trace vector");
+		case 10: return _("Line 1010 Emulator vectors");
+		case 11: return _("Line 1111 Emulator vectors");
+		case 12: return _("Unassigned, reserved");
+		case 13: return _("Unassigned, reserved");
+		case 14: return _("Unassigned, reserved");
+		case 15: return _("Uninitialised Interrupt vector");
+		case 16: return _("Unassigned, reserved");
+		case 17: return _("Unassigned, reserved");
+		case 18: return _("Unassigned, reserved");
+		case 19: return _("Unassigned, reserved");
+		case 20: return _("Unassigned, reserved");
+		case 21: return _("Unassigned, reserved");
+		case 22: return _("Unassigned, reserved");
+		case 23: return _("Unassigned, reserved");
+		case 24: return _("Spurious Interrupt vector");
+		case 25: return _("Level 1 Interrupt auto-vectors");
+		case 26: return _("Level 2 Interrupt auto-vectors");
+		case 27: return _("Level 3 Interrupt auto-vectors");
+		case 28: return _("Level 4 Interrupt auto-vectors");
+		case 29: return _("Level 5 Interrupt auto-vectors");
+		case 30: return _("Level 6 Interrupt auto-vectors");
+		case 31: return _("Level 7 Interrupt auto-vectors");
+		case 32: return _("TRAP #0 Instruction vectors");
+		case 33: return _("TRAP #1 Instruction vectors");
+		case 34: return _("TRAP #2 Instruction vectors");
+		case 35: return _("TRAP #3 Instruction vectors");
+		case 36: return _("TRAP #4 Instruction vectors");
+		case 37: return _("TRAP #5 Instruction vectors");
+		case 38: return _("TRAP #6 Instruction vectors");
+		case 39: return _("TRAP #7 Instruction vectors");
+		case 40: return _("TRAP #8 Instruction vectors");
+		case 41: return _("TRAP #9 Instruction vectors");
+		case 42: return _("TRAP #10 Instruction vectors");
+		case 43: return _("TRAP #11 Instruction vectors");
+		case 44: return _("TRAP #12 Instruction vectors");
+		case 45: return _("TRAP #13 Instruction vectors");
+		case 46: return _("TRAP #14 Instruction vectors");
+		case 47: return _("TRAP #15 Instruction vectors");	
+		case 48: 
+		case 49: 
+		case 50: 
+		case 51: 
+		case 52: 
+		case 53: 
+		case 54: 
+		case 55: 
+		case 56: 
+		case 57: 
+		case 58: 
+		case 59: 
+		case 60: 
+		case 61: 
+		case 62: 
+		case 63: return _("Unassigned, reserved");
+		case 64: return _("User Interrupt vectors");
+		
+		default: return _("User Interrupt vectors");
+	}
+}
+
+const char *ti68k_bkpt_cause_to_string(int type)
+{
+	switch(type)
+	{
+	case BK_CAUSE_ACCESS:	return _("access");
+	case BK_CAUSE_RANGE:	return _("access range");
+	case BK_CAUSE_ADDRESS:	return _("address");
+    case BK_CAUSE_EXCEPTION:return _("exception");
+	case BK_CAUSE_PGMENTRY: return _("prgm entry");
+	case BK_CAUSE_PROTECT:  return _("hw protection");
+	case BK_CAUSE_BIT:		return _("bit change");
+	default:				return _("unknown");
+	}
+}
+
+
+const char *ti68k_bkpt_type_to_string(int type)
+{
+	switch(type)
+	{
+    case BK_TYPE_ACCESS:    return _("access");
+    case BK_TYPE_RANGE:     return _("range");
+    case BK_TYPE_CODE:      return _("code");
+    case BK_TYPE_EXCEPTION: return _("exception");
+	case BK_TYPE_PGMENTRY:	return _("prgm entry");
+	case BK_TYPE_PROTECT:   return _("hw protection");
+	case BK_TYPE_BIT:		return _("bit change");
+	default:                return _("unknown");
+	}
+}
+
+int ti68k_string_to_bkpt_type(const char *str)
+{
+	if(!strcmp(str, _("access")))
+		return BK_TYPE_ACCESS;
+	else if(!strcmp(str, _("range")))
+		return BK_TYPE_RANGE;
+	else if(!strcmp(str, _("code")))
+		return BK_TYPE_CODE;
+	else if(!strcmp(str, _("exception")))
+		return BK_TYPE_EXCEPTION;
+	else if(!strcmp(str, _("prgm entry")))
+		return BK_TYPE_PGMENTRY;
+	else if(!strcmp(str, _("hw protection")))
+		return BK_TYPE_PROTECT;
+	else if(!strcmp(str, _("bit change")))
+		return BK_TYPE_BIT;
+
+	return 0;
+}
+
+const char *ti68k_bkpt_mode_to_string(int type, int mode)
+{
+	// don't use type, it's implicit.
+	if( (mode & BK_READ) && !(mode & BK_WRITE) )
+	{
+		if(mode & BK_BYTE)
+			return "byte-read";
+		else if(mode & BK_WORD)
+			return "word-read";
+		else if(mode & BK_LONG)
+			return "long-read";
+		else
+			return "read";
+	}
+	else if( !(mode & BK_READ) && (mode & BK_WRITE) )
+	{
+		if(mode & BK_BYTE)
+			return "byte-write";
+		else if(mode & BK_WORD)
+			return "word-write";
+		else if(mode & BK_LONG)
+			return "long-write";
+		else
+			return "write";
+	}
+	else if( (mode & BK_READ) && (mode & BK_WRITE) )
+	{
+		if(mode & BK_BYTE)
+			return "r/w byte";
+		else if(mode & BK_WORD)
+			return "r/w word";
+		else if(mode & BK_LONG)
+			return "r/w long";
+		else
+			return "r/w";
+	}
+
+    return "unknown (bug)";
+}
+
+int ti68k_string_to_bkpt_mode(const char * str)
+{
+    if(!strcmp(str, "any") || !strcmp(str, "r/w"))
+        return BK_READ | BK_WRITE;
+    else if(!strcmp(str, "read"))
+        return BK_READ;
+    else if(!strcmp(str, "write"))
+        return BK_WRITE;
+    else if(!strcmp(str, "byte-read"))
+        return BK_READ_BYTE;
+    else if(!strcmp(str, "word-read"))
+        return BK_READ_WORD;
+    else if(!strcmp(str, "long-read"))
+        return BK_READ_LONG;
+    else if(!strcmp(str, "byte-write"))
+        return BK_WRITE_BYTE;
+    else if(!strcmp(str, "word-write"))
+        return BK_WRITE_WORD;
+    else if(!strcmp(str, "long-write"))
+        return BK_WRITE_LONG;
+	else if(!strcmp(str, "r/w byte"))
+		return BK_RW_BYTE;
+	else if(!strcmp(str, "r/w word"))
+		return BK_RW_WORD;
+	else if(!strcmp(str, "r/w long"))
+		return BK_RW_LONG;
+    else
+        return 0;
+}
diff --git a/src/core/type2str.h b/src/core/type2str.h
new file mode 100644
index 0000000..8c0a12d
--- /dev/null
+++ b/src/core/type2str.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: type2str.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TI68K_TYPE2STR__
+#define __TI68K_TYPE2STR__
+
+const char *ti68k_calctype_to_string(int type);
+int         ti68k_string_to_calctype(const char *str);
+
+const char *ti68k_romtype_to_string(int type);
+int         ti68k_string_to_romtype(const char *str);
+
+const char *ti68k_hwtype_to_string(int type);
+int         ti68k_string_to_hwtype(const char *str);
+
+const char *ti68k_exception_to_string(int number);
+
+const char *ti68k_bkpt_type_to_string(int type);
+int         ti68k_string_to_bkpt_type(const char *str);
+
+const char *ti68k_bkpt_mode_to_string(int type, int mode);
+int         ti68k_string_to_bkpt_mode(const char * str);
+
+#endif
diff --git a/src/core/uae/COPYING b/src/core/uae/COPYING
new file mode 100644
index 0000000..f89b4fa
--- /dev/null
+++ b/src/core/uae/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.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/src/core/uae/Makefile b/src/core/uae/Makefile
new file mode 100644
index 0000000..ae4014b
--- /dev/null
+++ b/src/core/uae/Makefile
@@ -0,0 +1,87 @@
+#
+# Extra rules for building the emulation engine
+#
+#CPUFLAGS = -O3 -mpentium -fomit-frame-pointer -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes -DX86_ASSEMBLY -D__inline__=inline -DSTATFS_NO_ARGS=2 -DSTATBUF_BAVAIL=f_bavail
+
+# trying to be portable... *TRYING*
+#CFLAGS   = -mms-bitfields
+CPUFLAGS = $(CFLAGS) -fomit-frame-pointer -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes -D__inline__=inline -DSTATFS_NO_ARGS=2 -DSTATBUF_BAVAIL=f_bavail #-Wall
+
+gen: cpudefs.c cpustbl.c cputbl.h cpuemu.c
+
+# WARNING: Don't try to build newcpu.o here, because newcpu.c references TiEmu include files.
+all: cpudefs.o cpustbl.o readcpu.o fpp.o missing.o cpuemu1.o cpuemu2.o cpuemu3.o cpuemu4.o cpuemu5.o cpuemu6.o cpuemu7.o cpuemu8.o
+
+# For cross-compiling (generators are run on host)
+build68k_host.o: build68k.c
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc -c -o $@ $?
+gencpu_host.o: gencpu.c
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc -c -o $@ $?
+readcpu_host.o: readcpu.c
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc -c -o $@ $?
+cpudefs_host.o: cpudefs.c
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc -c -o $@ $?
+missing_host.o: missing.c
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc -c -o $@ $?
+xmalloc_host.o: xmalloc.c
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc -c -o $@ $?
+
+# Build generators and files to generate
+build68k: build68k_host.o
+	@echo "-> Compiling 68k builder..."
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc $(LDFLAGS) -o $@ $?
+
+gencpu: gencpu_host.o readcpu_host.o cpudefs_host.o missing_host.o xmalloc_host.o
+	@echo "-> Compiling CPU generator..."
+	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc $(LDFLAGS) -o $@ gencpu_host.o readcpu_host.o cpudefs_host.o missing_host.o xmalloc_host.o
+
+cpudefs.c: build68k table68k
+	@echo "-> Building CPU definitions..."
+	./build68k <table68k >cpudefs.c
+
+cpuemu.c: gencpu
+	@echo "-> Generating CPU tables..."
+	./gencpu
+
+# gencpu also creates cpustbl.c and cputbl.h
+cpustbl.c: cpuemu.c
+cputbl.h: cpuemu.c
+
+# CPU engine
+cpuemu1.o: cpuemu.c
+	$(CC) -DPART_1 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpuemu2.o: cpuemu.c
+	$(CC) -DPART_2 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpuemu3.o: cpuemu.c
+	$(CC) -DPART_3 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpuemu4.o: cpuemu.c
+	$(CC) -DPART_4 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpuemu5.o: cpuemu.c
+	$(CC) -DPART_5 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpuemu6.o: cpuemu.c
+	$(CC) -DPART_6 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpuemu7.o: cpuemu.c
+	$(CC) -DPART_7 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpuemu8.o: cpuemu.c
+	$(CC) -DPART_8 $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+
+# Misc
+cpudefs.o: cpudefs.c
+	$(CC) $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+cpustbl.o: cputbl.h
+	$(CC) $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $*.c
+readcpu.o: readcpu.h
+	$(CC) $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $*.c
+fpp.o: fpp.c
+	$(CC) $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+missing.o: missing.c
+	$(CC) $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@ 
+newcpu.o: newcpu.c newcpu.h
+	$(CC) $(INCLUDES) -c $(INCDIRS) $(CPUFLAGS) $< -o $@
+
+clean:
+	$(RM) build68k gencpu *.o
+	$(RM) build68k.exe gencpu.exe
+
+distclean: clean
+	$(RM) cpudefs.c cpustbl.c cputbl.? cpuemu.c cpuemu?.o
diff --git a/src/core/uae/README b/src/core/uae/README
new file mode 100644
index 0000000..c07a110
--- /dev/null
+++ b/src/core/uae/README
@@ -0,0 +1,937 @@
+This is version 0.8.25 of UAE-core, the UAE Amiga Emulator.
+
+This package used to be the master copy of UAE; it has somewhat lagged in
+development.  It is now intended to be a stable emulator core with a focus
+on running old A500 games and demos.  Certain extra features, such as a JIT
+compiler, will not be added - other packages such as WinUAE or E-UAE are
+available which include these patches.
+
+
+License
+=======
+
+UAE is available under the terms of the GNU General Public License. This means
+that it is free software: you are welcome to distribute copies of it and/or
+modify it, under certain conditions. It also means that there is no warranty
+for UAE.
+See the file COPYING that is included in the top level directory of this
+archive for details.
+
+
+Overview
+========
+
+An emulator is a program which enables you to run software for a machine
+which has non-native hardware and a non-native operating system, on your
+computer.  UAE allows you to run most of the available Amiga software. It is a
+software emulation, meaning that no extra or special hardware is needed to do
+this. The hardware of an Amiga is emulated accurately, so that Amiga software
+is tricked into thinking it is running on the real thing, with your computer's
+display, keyboard, harddisk and mouse taking the parts of their emulated
+counterparts.
+
+UAE was developed for Unixoid systems. Meanwhile, it has been ported to the
+Mac, DOS, Windows, the BeBox, NextStep, the XFree86/OS2 environment and the
+Amigas (it can run itself by now). You should have received several other
+files along with this document with details on how to install and use the
+version for your operating system.
+
+This section is just what it says: an overview. Please read _all_ of this
+file, especially if you have problems. UAE has many, many features and
+equally many configuration options. If you don't know about them, it's likely
+that UAE doesn't work for you, or doesn't work as good as it could.
+
+Please read also the file "FAQ" which contains some Frequently Asked
+Questions (and even the answers!) You should also look for a document
+describing the specific port of UAE to the operating system you are using,
+for example "BeOS/README" or "DOS/README".
+
+People have complained that the UAE documentation contains only "weird jargon".
+Sorry about this. Despite what MessySoft and Tomato tell you, computer
+programs aren't always easy to use. UAE does require some assistance from you,
+and therefore you should at least understand a bit about computers. After all,
+you are an Amiga fan, so you should know what a Workbench is, don't you think?
+
+
+Features
+========
+
+This version of UAE emulates:
+
+- A 68000, 68010 or 68020 CPU, optionally a 68881 FPU
+- OCS Graphics Chipset, plus big blits from the ECS Chipset
+- Up to 2MB Chip RAM and up to 8MB Fast RAM, or 8MB Chip RAM without Fast RAM
+- Up to 64MB Zorro III Fast RAM, independent of Chip RAM setting (68020 only)
+- Up to 1MB Slow RAM, for extended compatibility with problem software
+- Up to 8MB of graphics card memory, usable by software that supports
+  Picasso 96 compatible graphics cards
+- 4 x 3.5" floppy disk drives (DF0:, DF1:, DF2: and DF3:). It's not possible to
+  read Amiga disks, so these are emulated with disk files.
+- A hard-disk: either a harddisk image file or part of the native filesystem
+- Joystick support (with option of mapping joystick to numeric keypad)
+- Mouse support
+- Ability to run in various screen modes (for better display quality or
+  better speed)
+- Full stereo sound support, consisting of 4 x 8bit channels
+- Beta parallel and serial port support
+- some other things which don't work well enough to mention them here...
+
+  
+Requirements (IMPORTANT! READ THIS!)/Limitations
+================================================
+
+Not emulated:
+- Sprite to playfield collisions (sprite to sprite collisions work)
+- An MMU (part of 68030/040 CPUs except those that Commodore used). This means
+  you can't use virtual memory systems or real operating systems like Linux
+  or BSD.
+- The AGA chipset (A4000/A1200). This chipset has enhanced capabilites for
+  up to 256 colors in all resolutions.
+- Serial port emulation exists but doesn't work too well.
+
+Since the PC floppy controller can't read Amiga disks (yes, that's a fact), 
+floppy access has to be emulated differently: Floppies are emulated by means 
+of disk files that contain a raw image of the floppy disk you want to emulate.
+A disk file is an image of the raw data on an Amiga floppy disk, it contains
+901120 bytes (880K), which is the standard capacity of an Amiga disk.
+
+To actually run the program, you'll need to install the ROM image from your
+Amiga. You can't run UAE if you don't have this image. It is not included
+because it is copyrighted software. Don't ask me to send you one. I won't.
+If you don't have an Amiga and still want to use UAE, you'll have to buy an
+Amiga or at least the system software (ROM + Workbench) first.
+The Kickstart image can have a size of either 256K or 512K. It must be named
+"kick.rom" by default.
+
+Read the section "tools" below for information how to create ROM images and
+disk files.
+
+If you don't have a Kickstart file, you may still be able to boot some games
+and demos. The emulator includes some primitive bootstrap code that will try
+to read and execute the bootblock of the diskfile you are using, and if that
+bootblock only uses the one or two Kickstart functions that are supported by 
+the "replacement Kickstart", your program will boot. Don't expect too much, 
+though.
+
+You'll also need some other software to run - why else would you want to
+emulate an Amiga? There are several ways to make the software accessible to
+UAE, either with disk image files or with a harddisk emulation. You should
+make an image of your Amiga's Workbench disk and install it as "df0.adf"
+(adf = Amiga Disk File) when you use UAE for the first time. More about how
+to create these files in the chapter "Transferring software"
+
+To use Picasso96 emulation, you need the Picasso96 libraries, which are also
+not included. They can be obtained (e.g.) from Aminet.
+
+
+Invoking UAE
+============
+
+First, read the system-specific documents for information how to set up UAE.
+You should have an executable program called "uae". You can simply execute it,
+but you can also optionally give it one or more of the following parameters:
+
+ -h              : Print out a help text.
+ -f file         : Load a configuration file
+ -s opt=val      : Set the emulator's option "opt" to value "val".
+
+Configuration files consist of several lines of the form "opt=val", just as
+with the "-s" parameter.  You can use the following options with the "-s"
+option, or in a config file.
+[Here, "=n" means the option takes a number as value.  "=bool" means the option
+takes a value of either "yes" or "no" (or "true", "false", or abbreviations of
+any of these).  There are other classes as well.]
+
+General options:
+accuracy=n [default=2]
+  Set emulator accuracy to n. The default is n = 2, which means the
+  emulator will try to be as accurate as possible. This no longer
+  does much in this version, and I'll probably remove it.
+framerate=n [default=1]
+  Sets the frame rate to 1/n. Only every nth screen will be drawn.  Using a
+  higher value can speed up the emulator, at the expense of graphics quality.
+autoconfig=bool [default=yes]
+  If this is enabled, all expansion devices provided by the emulation will be
+  automounted. You should only disable this if you have a Kickstart ROM
+  earlier than 1.3 which can't cope with this. Some badly written games and
+  demos might also be incompatible with this.
+kbd_lang=lang [default=us]
+  Set the keyboard language. Currently, the following values can be used: "us"
+  for U.S. keyboard (default), "se" for swedish, "fr" for french, "it" for
+  italian, "es" for spanish, "dk" for danish, or "de" for german keyboard.
+  This setting only affects the X11 version.
+floppy0=file [default=df0.adf]
+  Try to use the specified file as diskfile for drive 0 instead of df0.adf.
+  The options floppy1, floppy2, and floppy3 also exist.
+kickstart_rom_file=file [default=kick.rom]
+  Use the specified file instead of kick.rom as Kickstart image.
+  You can also use an 8k sized A1000 boot ROM.  The emulator will detect it
+  by its small size and behave like an A1000.
+kickstart_key_file=file [default=none]
+  For some strange licensing reasons, Cloanto had to encrypt the ROM images
+  they ship with the Amiga Forever package.  This option lets you select the
+  key file; this is only necessary if you are using one of the ROMs from
+  Amiga Forever.
+joyport0=mode [default=mouse]
+  Specify how to emulate joystick port 0. You can use "mouse", "joy0", or
+  "joy1" to use the corresponding input devices of your machine, or you can
+  select several different keyboard replacements for a joystick:
+    "kbd1" for the numeric pad.  '0' is the fire button.  Three keys on the
+           numeric pad act as autofire toggle: '.' (or ',' depending on your
+           keyboard language), Enter and the division key.
+    "kbd2" for the cursor keys with right control key as fire button and the
+           right shift key as autofire toggle
+    "kbd3" for T/F/H/B with the left Alt key as fire button and the left Shift
+           key as autofire toggle.
+  The autofire toggle keys will turn on autofire (25 shots per second), it
+  will stay enabled until you hit the autofire toggle again.
+joyport1=mode [default=joy0]
+  Like joyport0, but for the Amiga's joystick port 1.
+use_gui=state [default=yes]
+  If enabled, show a user-interface that enables changing these options at
+  run-time.  Possible settings are "no", "yes" and "nowait".  If "nowait" is
+  used, the GUI will be shown at program startup, but the emulator will also
+  start immediately without waiting for the user to change any of the
+  settings.
+immediate_blits=bool [default=no]
+  If enabled, all blits will finish immediately, which can be nice for speed,
+  but may cause incompatibilities.
+collision_level=level [default=sprites]
+  This can have a value of "none", "sprites", "playfields", or "full".  If
+  set to "sprites", the emulator will only compute collisions between sprites.
+  If set to "playfields", it will additionally compute collisions between
+  sprites and the background.  This is much slower and used only rarely.  When
+  "full" level is selected, collisions of the background with itself are also
+  computed.  This is also used very rarely, and makes the emulator even slower.
+  Using "sprites" or "none" will almost always be enough.
+cpu_speed=speed [default=4]
+  This can have a value of "real", "max", or an integer between 1 and 20.
+  "real" will try to give the CPU emulation exactly as many cycles, relative
+  to the other chips, as on a real A500.  "max" will try to give you the
+  maximum CPU emulation speed achievable on your machine.  Numeric values
+  specify a fixed relation between CPU and custom chip emulation, where lower
+  values prioritize CPU emulation, while higher values prioritize custom chip
+  emulation.
+finegrain_cpu_speed=speed
+  Like cpu_speed, but only accepts numeric values.  These numeric values are
+  equivalent to the ones given to cpu_speed multiplied by 512.  This means
+  that "cpu_speed=2" and "finegrain_cpu_speed=1024" have the same effect.
+  Using this option you can give the CPU emulation a much higher priority by
+  using small values.
+cpu_type=type [default=68000]
+  Controls which CPU is emulated. This can be "68000", "68010", "68020" or
+  "68020/68881".  In some cases, you may need to use "68ec020" or
+  "68ec020/68881" to emulate a crippled variant of the 68020 that has only a
+  24 bit address bus.  Some software, including some Kickstart versions, does
+  not work with a normal 68020 that has a 32 bit address bus.
+  Careful: using an "ec" variant has harmful side effects, and should be
+  disabled unless absolutely needed (you lose Z3 memory and Picasso
+  emulation).
+cpu_compatible=bool [default=no]
+  If enabled, a slower but slightly more accurate variant of the CPU emulation
+  will be used.  This is needed for some types of copy protection, among other
+  things. This is only meaningful for a CPU type of "68000".
+nr_floppies=n [default=4]
+  The emulator will emulate this many external floppy drives.  Some very old
+  games apparently have problems if this is larger than 1, but for all normal
+  programs the default is good enough.
+
+Emulating external devices (harddisk, CD-ROM, printer, serial port):
+filesystem=access,volume:path [default=no filesystems mounted]
+  Mount the host's file system at "path" as an Amiga filesystem with volume
+  name "VOLUME:".  "access" can be either "ro" (for readonly), or "rw" (for
+  read-write).  If you want to mount a CD-ROM, you should use a readonly
+  mount.  You can mount multiple file systems.
+  See below.
+hardfile=access,secs,heads,reserved,bsize,file [default=no hardfiles mounted]
+  Mount the hardfile "file" as an emulated harddisk, using a geometry of
+  "secs" sectors per track, "heads" surfaces and "nr" reserved blocks.
+  Each sector should have "bsize" bytes. This can be abused to mount
+  floppy images.  You can mount multiple hardfiles.
+  See below.
+
+Sound options:
+sound_output=type [default=none]
+  The type of sound output can be "none" (no sound at all), "interrupts"
+  (emulated for the internal side effects that can be noticed by programs,
+  but no sound output), "normal" (emulated, and sound output), "exact" (a
+  slightly more accurate emulation that may be necessary in some cases, but
+  can also be slower).
+sound_channels=type [default=mono]
+  Can be "mono", "stereo", or "mixed".  If set to "stereo", the left and right
+  channels produce the same output as on a real Amiga - two of the four audio
+  channels are audible on the left, and the other two on the right.  This is
+  exactly what you want, except if you're using headphones - having the sound
+  split so strictly can lead to a strange listening experience at times.  This
+  is what "mixed" is trying to solve: it mixes the left channel with a low
+  volume into the right channel and vice versa.  (This mixing operation loses
+  a bit of precision in the output).
+sound_bits=n [default varies across UAE versions on different OS types]
+  Common values are 8 (low quality) or 16 (high quality)
+sound_frequency=n [default varies across UAE versions on different OS types]
+  Common values are 22050 or 44100. The quality of sound output increases with
+  the frequency.
+sound_min_buff=n
+sound_max_buff=n [default varies across UAE versions on different OS types]
+  You can specify the minimum and maximum size of the sound buffer.
+  Smaller buffers reduce latency.  Usually only the minimum size is used.
+sound_interpol=type [default none]
+  Normally, sound samples are output exactly as they are computed, without
+  any post-processing.  This can generate errors in the sound output when the
+  output frequency isn't an even multiple of the input frequency.  These
+  errors are usuable perceived as a high-frequency noise.
+  There are currently two types of interpolation available, both under
+  experimentation.  You can use either "rh" or "crux" as value for this
+  option.  Note that no interpolation is supported for 8 bit output; you need
+  to use 16 bit output to hear a difference.  If you have any comments about
+  the effects of either method on audio quality, I'd be very interested to
+  hear them.
+
+Memory options:
+bogomem_size=n [default=0]
+  Emulate n*256K slow memory at 0xC00000. Some demos/games need this.
+fastmem_size=n [default=0]
+  Emulate n megabytes of fast memory as an expansion board.
+z3mem_size=n [default=0]
+  Emulate n megabytes of Zorro III fast memory as an expansion board.
+chipmem_size=n [default=4]
+  Emulate n*512K chip memory. Some very broken programs need specific amounts
+  of chip mem to work properly. The largest valid value is 16, which means 8MB
+  chip memory.
+
+Display options:
+gfx_width=n [default=800]
+  Use a window that is n pixels wide for displaying the Amiga screen.
+gfx_height=n [default=300]
+  Use a window that is n pixels high for displaying the Amiga screen.
+gfx_lores=bool [default=no]
+  Enable this option if you use a very small window width (320 to 400 pixels)
+  to shrink the display horizontally.
+gfx_linemode=type [default=scanlines]
+  The type can be none (every line is drawn once), "double" (every line is
+  drawn twice), and "scanlines" (every line is drawn once, but the image is
+  stretched vertically by inserting a black line every other line to simulate
+  the display on an old monitor).
+  The "double" mode gives best results, but slows down the emulation quite a
+  lot. Don't use the "none" mode if you want a decent interlace emulation.
+  If you use "double" or "scanlines", your window needs to be twice as high
+  as when using the "none" mode.
+gfx_correct_aspect=bool [default=none]
+  Try to fit the image into the specified window dimensions by leaving out
+  certain lines.  Useful if you want to fit a 640x512 Amiga display in a
+  640x480 window.
+gfx_center_vertical=bool [default=no]
+gfx_center_horizontal=bool [default=no]
+  If you use a smaller window than 800x300 (400x300 with "gfx_lores" option or
+  800x600 with a gfx_linemode other than "none"), not all parts of the display
+  will fit on the screen. By enabling the necessary centering options, you can
+  ask the emulator to try and move the screen contents so that the relevant
+  parts are displayed. If you are unlucky, this can cause the contents to jump
+  around a bit in certain cases.
+gfx_fullscreen_amiga=bool [default=no]
+  Enable if you want to use the full screen, not a window on the desktop, for
+  the Amiga display.  Some ports (DOS, SVGAlib) always use fullscreen mode.
+gfx_fullscreen_picasso=bool [default=no]
+  Like gfx_fullscreen_amiga, but for the Picasso graphics card display.
+gfx_color_mode=mode [default=8bit]
+  Select a color mode to use.
+  Color modes: 8bit (256 colors), 15bit (32768 colors), 16bit (65536 colors),
+	       8bit_dithered (256 colors, with dithering to improve quality),
+	       4bit_dithered (16 colors, dithered); 32bit (16 million colors)
+gfxcard_size=n [default=0]
+  Emulate a Picasso 96 compatible graphics card with n MB graphics memory.
+  This requires that you use set the CPU type to "68020" or higher, and that
+  you do not use 24 bit addressing.
+
+Debugging options (not interesting for most users):
+use_debugger=bool [default=no]
+  If enabled, don't start the emulator at once, use the built-in debugger.
+log_illegal_mem [default=no]
+  If enabled, print illegal memory accesses
+
+
+Whew. You'll probably have to experiment a little to get a feeling for it.
+
+
+You can also put these options into a configuration file in your home
+directory. Simply create ~/.uaerc and put some of these options in it. On
+non-Unix systems, the file is called uae.rc and should be located in the
+current directory.
+
+
+Choosing color and screen modes
+===============================
+
+As described in the previous paragraph, UAE can run in many different 
+resolutions and color modes. However, few of the color mode options are
+available if you use the X11 version of UAE, since the X server determines
+how many colors are available. If you are running a 256 color X server, you
+can use "-H3" to tell UAE to dither the colors for better results.
+
+You will have to experiment which mode gives the best results for you at a
+satisfying speed. Note that the dithering process consumes time, so even if
+256 colors with dithering look better than 256 colors without, remember that
+UAE will be slower in that mode.
+
+The recommended resolution is 800x600. In the lower resolution modes, some
+overscan pictures the Amiga tries to display may not fit entirely on the
+screen, others may be off-center and some graphical effects may look weird.
+For best results, use 800x600 with at least 32768 colors.
+For speed, use 400x300 lores with 256 colors.
+
+_Don't_ use 24 bit or 32 bit screen modes, unless you absolutely have to.
+These are way too slow to be usable.
+
+
+Harddisk emulation
+==================
+
+Since using diskfiles is awkward, it is necessary to emulate harddisks. There
+are two ways how you can use large amounts of data with UAE: harddisk files
+and mounted directories.
+
+1. Harddisk files
+
+Harddisk files are large files that contain the image of an Amiga filesystem.
+They work much the same way as a disk file. You can simply create a large
+empty file and tell UAE to use it as a hardfile, but you will need to format
+it from the emulation before you can actually use it.
+
+Under Unix, You can create a (unformatted) harddisk file with
+  dd if=/dev/zero of=hardfile bs=512 count=16384
+That will create an 8MB file. Other ports of UAE may come with a utility
+called "makedisk" or other ways to create such a file.
+
+To tell the emulator that you want to use a certain file as a hardfile, use
+the "-W" option, for example
+  uae -W 32:1:2:hardfile
+The first three numbers are geometry information which tell the AmigaOS how
+the file is organized. The first number (32) is the number of sectors per
+track, the second number (1) is the number of heads or surfaces, the third
+number (2) is the number of reserved blocks. If you use "normal" sizes
+(powers of two, like 32MB), then you should be OK using the same numbers as
+in the above example. Using different numbers can make sense if you transfer
+the image of a real Amiga harddisk which uses a different geometry. The last
+field of the argument to the "-W" option is the name of the harddisk file.
+
+If you are using Kickstart 1.3 or earlier, hardfiles can't currently be
+mounted at boot time, and therefore you can't boot from it either. You will
+have to boot either from a floppy disk image or from a filesystem (see below),
+and mount the hardfile.device later. To do this, add the following to
+"DEVS:mountlist":
+
+UAE0:	   Device = uaehf.device
+	   Unit   = 0
+	   Flags  = 0
+	   Surfaces  = 1
+	   BlocksPerTrack = 32
+	   Reserved = 1
+	   Interleave = 0
+	   LowCyl = 0  ;  HighCyl = 511
+	   Buffers = 5
+	   DosType = 0x444F5300
+	   BufMemType = 1
+#
+
+(You may need to adjust the values if you specified a different geometry,
+and/or your hardfile has a different size than 8MB, and/or the hardfile is not
+mounted as UAE0: because you mounted other harddisks before it.)
+
+Then, type "mount UAE0:" (or put that command in your startup-sequence), and
+you should be able to access it. Don't forget to format it with the AmigaDOS
+format command:
+
+  format drive uae0: name Mister_Willwink
+
+b) Accessing native filesystems from the emulator
+
+This has some major advantages:
+ - It has no problems with Kickstart 1.3
+ - It is more convenient.
+ - It is much faster.
+
+If you specify the -M or -m command line arguments, you your native filesystem 
+from the emulator. If you start UAE with
+
+  uae -m sound:/usr/amiga/modules
+
+you can access all the files in /usr/amiga/modules by reading from the
+AmigaDOS volume "SOUND:".
+(DOS users: try "uae -m dh0:C:\" to mount your drive C:\ as DH0:)
+
+You can mount up to 20 devices, either hardfiles or filesystems, by giving
+either of these options multiple times. The volumes will be named UAE0:,
+UAE1:, etc. UAE will boot from UAE0: if no diskfile is found for floppy
+drive 0.
+You can also use native filesystems to mount Amiga CD-ROMs, and you can
+abuse the hardfile emulation to mount floppy disks: "uae -W 11:2:2:wb13.adf"
+will mount the diskfile "wb13.adf".
+
+
+Tools / Transferring files
+==========================
+
+As you should know by now, you need to transfer files between your Amiga and
+the machine you run UAE on. There are several ways how to do this.
+
+- Using a null modem cable, and a terminal package running on each machine,
+  you can transfer the file(s) via Zmodem upload/download. 68000 equipped
+  Amigas can normally attain around 3000cps through the null modem cable,
+  using the standard Commodore serial.device.  However, by using the device
+  replacement BaudBandit.device, anything up to 5500cps can be attained.
+  BaudBandit can be obtained from Aminet.  A second alternative is to use
+  the BASIC program adfi.bas (included with UAE) to transfer a file from the
+  Amiga to the PC via the null modem cable.
+  
+- If you're using CrossDOS on your Amiga, you can compress the disk or
+  kickstart image using LhA or similar PC compatible archiver and copy it to
+  a 720KB floppy disk.  You can now take the disk over to the PC, copy the
+  compressed file to the UAE directory and uncompress it.
+  If you don't have CrossDOS on the Amiga, there is a similar freeware tool
+  called Msh, which can be found on Aminet or on Fish disk 382 or 327.
+
+In either case, you ought to read the documentation for the programs that
+you use for the transfer. These programs can't be explained here.
+
+In the "amiga" subdirectory you'll find two small Amiga programs that will
+help you to generate the necessary image files. These are called transrom 
+and transdisk. Copy them to your Amiga and make them executable (by typing
+"protect transrom rwed" and "protect transdisk rwed" in the Amiga shell
+window).
+transrom will dump the contents of your Kickstart ROM, and transdisk will 
+dump an image of a floppy in one of the drives. Both programs write to the
+standard output (read: the screen), so you'll want to redirect that. Do
+
+   transrom >ram:kick.rom
+   
+to create a file called "kick.rom" in the RAM disk, and
+
+   transdisk >ram:df0.adf
+   
+to create a file called "df0.adf" in the RAM disk. These files are pretty
+big, 262144 or 524288 bytes for the ROM image and 901120 bytes for a disk 
+image.
+
+NEVER run either of these programs from the Workbench. Always open a Shell
+or CLI window to do this.
+
+transdisk understands the following arguments:
+
+    -d device unit: Use this device instead of DF0:
+    -s n:           Begin transfer at track n (default: 0)
+    -e n:           End transfer at track n (default: 79)
+    -w file:        don't read from the floppy, instead write the contents
+                    of "file" to the floppy
+    -h:             Treat the disk as high-density disk. HD images aren't
+                    supported by UAE yet, though. Note that the resulting
+		    file will be twice as big.
+
+So, to transfer the disk in drive DF1:, you'd give the command:
+
+  transdisk >ram:df1.adf -d trackdisk 1
+
+If you don't have much RAM and can't fit all of a disk image in the RAM disk,
+you can split up the transfer into multiple parts with the "-s" and "-e"
+parameters. To transfer the disk in four parts, you'd use the following 
+commands:
+
+  transdisk >ram:df0_1.adf -s 0 -e 19
+  transdisk >ram:df0_2.adf -s 20 -e 39
+  transdisk >ram:df0_3.adf -s 40 -e 59
+  transdisk >ram:df0_4.adf -s 60 -e 79
+
+Of course, you should save each of the four files to another place before
+transferring the next one with transdisk to make space in your RAM disk. 
+If you have all the files on your PC, you can do the following under Unix:
+  cat df0_1.adf df0_2.adf df0_3.adf df0_4.adf >df0.adf
+or, under DOS:
+  COPY /B df0_1.adf+df0_2.adf+df0_3.adf+df0_4.adf df0.adf
+I've been told there are the following tools for the Mac to join binaries:
+"ChunkJoiner 2.1.2" found under Info-Mac's <disk> directory or 
+"JoinFiles 1.0.1" under Info-Mac's <text>.
+
+The current transdisk can only read the standard AmigaDOS format. This means
+that most games that rely on some form of copy-protection cannot be
+transferred (more about disk formats in the file "FAQ")
+
+****************************************************************************
+If you transfer commercial software, you must not distribute the resulting
+image files, since that would be a violation of copyright law. The Kickstart
+ROM has to be considered commercial software. You may only use the Kickstart
+from your own Amiga, and you may not distribute Kickstart ROM files.
+Please read the license that came with your software for details.
+****************************************************************************
+
+
+Retrieving files from a disk image
+==================================
+
+If you have a disk image file, and you want to retrieve the files from it, you
+can use the "readdisk" tool. It is automatically built by "make". If you have
+a disk image of a disk called "Workbench1.3D" as df0.adf, and you do
+   readdisk df0.adf
+the whole directory structure of the disk image will be stored in a newly
+created subdirectory called "Workbench1.3D". You can optionally give a second
+parameter to specify a directory where to create the output other than the
+current directory.
+readdisk only understands about the OFS right now. FFS disks will cheerfully
+be regarded as being unreadable. Use the unixfs.device from within the
+emulator if you want to transfer files from FFS disks.
+
+
+Picasso 96 graphics card emulation
+==================================
+
+To use this feature, you must select 68020 emulation with a 32 bit address
+space (i.e. _not_ 68ec020). You also need a Kickstart 3.x ROM.
+
+To specify how much graphic memory you want to emulate, use the "-U" option,
+e.g. "-U 4" for 4 megabytes. Then, you need the Picasso 96 software which
+is not distributed with UAE (There will be a link to the Picasso 96 home page
+on the UAE Web page soon). Version 1.31 or higher is recommended.
+Install the Picasso software, and make sure you enable the "uaegfx" driver.
+After that is complete, reboot, and you should be able to select the new
+modes from the ScreenModes program.
+
+
+AHI sound card emulation
+========================
+
+In the "amiga" subdirectory of the UAE distribution, you will find a "Devs"
+directory that contains the necessary files for AHI sound support.  This is
+at an early stage and will not work very well in this release.  It is
+included mainly in the hope that someone with a clue about AHI will pick up
+this work and finish it properly.
+
+
+Saving and restoring snapshots
+==============================
+
+From version 0.8.17 onwards, the emulator has the capability to save the
+current state of the emulation into a "snapshot" file that can be restored
+later on.  This functionality is available through the GUI on some ports.
+It is mainly useful for computer games that either have no save game
+feature, or whose save game feature does not work on UAE (often, games try
+to save in a non-standard disk format, this can be tricky to emulate).
+
+There are several restrictions that apply to the save state feature:
+
+ - It is at the moment experimental.  It is not guaranteed that the
+   emulator can correctly restore every snapshot.  It is not guaranteed
+   that future versions of the emulator will be able to restore snapshots
+   saved by this version.
+ - The state of the harddisk emulation cannot be saved.  This makes it
+   essentially useless for applications, but remember it's designed for
+   games.  Be careful with games that have been installed to the harddisk.
+ - Neither ROM contents nor floppy disk contents are saved right now.
+
+
+UAE SCSI device
+===============
+
+To enable SCSI support, use --enable-scsi-device when running configure. 
+The emulator provides a uaescsi.device. This device only supports
+direct SCSI, which is sufficient to run applications like MakeCD. The
+device does not support reading or writing with the normal Exec commands,
+so you cannot mount filesystems on it right now.
+
+The unit numbers of the uaescsi.device follow the Amiga SCSI
+conventions: unit number "xyz" maps to the lun y of target z on bus
+x. Wide SCSI busses can have targets with numbers larger than 9. In
+this case the uaescsi.device pretends that there is another SCSI
+bus. To avoid confusion, all available SCSI targets are listed
+together with their unit number when starting UAE. Devices cannot be
+added while the emulator is running.  Reseting it is not sufficient
+either for technical reasons.
+
+The implementation of the uaescsi.device uses cdrecord's libscg as
+interface to the native SCSI system. The Linux implementation of this
+library used to be included into UAE, but now the library as generated
+by the cdrecord source package (ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/)
+is used. As the library is not distributed seperately, you will have
+to get the whole cdrecord sources, compile it and then make several
+header and lib files available to the compiler if (and only if) building
+UAE with SCSI support. The script "src/install_libscg" copies the files
+required for the libscg in cdrecord 1.8.1.
+
+Using threads is strongly recommended, because some SCSI commands can
+run for extended periods of time and would block the whole emulation
+during this time without threads. Use --enable-threads when starting
+configure.
+
+Depending on the hosts capabilities the uaescsi.device may be limited
+compared to other Amiga SCSI devices. The Linux kernel by default only
+allows 32KB of data per SCSI command and does not always perform SCSI
+requests in parallel.
+
+Setting the chunk size in MakeCD to 30KB is already too much and
+causes an IO error -4 (IOERR_BADLENGTH), because the setting is only
+used as a guideline. You can work around this by setting the Tooltypes
+BUFFER_CHUNK_XXX to 29. On a Pentium II 350MHz with Adaptec UW SCSI
+controller on board on-the-fly copying was possible from a Philips
+CDD2600 (SCSI) to a Yamaha CRW4416E (IDE) at 4x.
+
+
+The UAE_CONTROL program
+=======================
+
+In the "amiga" subdirectory, you will find two programs, uae_control and
+uaectrl that provide the same functionality as the X11 GUI. uaectrl is
+shell-based and works with any Kickstart, while uae_control needs the
+gadtools.library and a recent version of reqtools.library, so it only works
+with Kick 2.0 and upwards. Copy these two programs to the directory that you
+use for harddisk emulation. They should be self-explanatory.
+
+
+The timehack
+============
+
+Another tool in the "amiga" subdirectory, timehack, synchronizes the
+emulated Amiga's system time with the host's time every second. This
+is useful when the emulation is not done in real-time or is suspended
+completely.
+
+
+Quick overview of the debugger commands
+=======================================
+
+Some (window-system based) ports of UAE have a built-in debugger. You can
+press ^C at any time to enter this debugger.
+Each debugger command consists of a single letter and occasionally some
+parameters.
+
+g [<address>]         Start execution at the current address or <address>
+c                     Dump state of the CIA, disk drives and custom registers
+r                     Dump state of the CPU
+m <address> [<lines>] Memory dump starting at <address>
+d <address> [<lines>] Disassembly starting at <address>
+t [instructions]      Step one or more instructions
+z                     Step through one instruction - useful for JSR, DBRA etc
+f                     Step forward until PC in RAM
+f <address>           Add/remove breakpoint
+fi                    Step forward until PC points to RTS/RTD or RTE
+fi <opcode>           Step forward until PC points to <opcode>
+fl                    List breakpoints
+fd                    Remove all breakpoints
+f <addr1> <addr2>     Step forward until <addr1> <= PC <= <addr2>
+e                     Dump contents of all custom registers
+i                     Dump contents of interrupt and trap vectors
+o <1|2|addr> [<lines>]View memory as Copper instructions
+O                     Display bitplane offsets
+O <plane> <offset>    Offset a bitplane
+H <count>             Show PC history <count> instructions
+M                     Search for *Tracker sound modules
+C <value>             Search for values like energy or lifes in games
+W <address> <value>   Write into Amiga memory
+w <num> <address> <length> <R/W/RW> [<value>]
+                      Add/remove memory watchpoints
+wd                    Enable illegal access logger
+S <file> <addr> <n>   Save a block of Amiga memory
+s <string>/<values> [<addr>] [<length>]
+                      Search for string/bytes
+T                     Show exec tasks and their PCs
+h,?                   Show this help page
+q                     Quit the emulator. You don't want to use this command.
+
+
+Sound
+=====
+
+If your version of UAE supports sound, you can pass parameters like frequency
+or number of bits to use on the commandline; if you don't specify any, sane
+defaults will be used. If graphics output is enabled while sound is output,
+the emulator will be much too slow on most systems. The sound will not be
+continuous. Therefore, a hack to turn off screen updates is provided: Press
+ScrollLock to disable graphics, press it again to enable them.
+
+The quality of the emulation depends on the setting of the "-S" commandline
+option. With "-S 3", all of the sound hardware is emulated; and some programs
+(e.g. AIBB) won't run with other settings. "-S 2" should sound just as good as
+"-S 3" and will be much faster for some programs. "-S 1" tries to emulate most
+of the sound hardware, but doesn't actually output sound. "-S 0" completely
+turns off sound.
+
+
+Pointers
+========
+
+There are a few sites in the Internet that contain helpful information about
+UAE.
+
+The new "official" UAE page is located at
+
+  http://www.freiburg.linux.de/~uae
+
+thanks to Stefan Reinauer who is now maintaining it.
+
+There, you will find links to other UAE pages. One which is especially useful
+is the "UAE Discussion Board" set up by Gustavo Goedert, the address is
+
+  http://amiga.nvg.org/uaeboard
+
+There is supposedly a newsgroup named "alt.emulators.amiga", but I don't get
+it here.
+The newsgroup "comp.sys.amiga.emulations" appears to be a proper place to
+discuss Amiga emulation, but, strictly speaking, it is _not_ the right place.
+More appropriate places are "comp.emulators.misc", and, of course, Gustavo's
+discussion board.
+
+Petter Schau has written another Amiga emulator named "Fellow".  It's mostly
+written in x86 assembly and only runs under DOS.  It's quite compatible and
+generally faster than UAE.  The Fellow homepage is at
+
+  http://www.geocities.com/SiliconValley/Peaks/5244/
+
+The homepage of the Disk2FDI project, which allows you to read Amiga floppies
+if you have two PC drives, is
+
+  http://fast.emuunlim.com/disk2fdi/
+
+
+Thanks & Acknowledgements
+=========================
+
+Thanks to all who have written me so far with bugreports and success/failure
+reports when trying to run the emulator on various hardware with different
+Kickstart versions. A list of everyone who has contributed to the source code
+can be found in the CREDITS file (this was getting too big to keep it here).
+
+Special thanks to:
+  - Jay Miner, Dale Luck, R.J. Mical and all the others who built the Amiga.
+  - Felix Bardos, whose HRM I "borrowed".
+  - Hetz Ben Hamo mailed Peter Kittel from Commodore asking for permission to
+    give Kick 1.3 away. Unfortunately, the response was negative :-(
+  - Stefan Reinauer, for hosting the UAE Web page after the RWTH decided it's
+    too dangerous to let students have their own Web pages.
+  - Bruno Coste, Ed Hanway, Alessandro Soldo and Marko Nippula provided useful
+    documentation about the Amiga
+  - Fabio Ciucci gets the "Best bug reports" award for his help with the
+    blitter line emulation and other problem areas.
+  - Michael C. Battilana and Cloanto Software, for all their support.
+  - Julian Eggebrecht of Factor 5, for providing several F5 games and a lot
+    of valuable input.
+    Factor 5 has made several of their classic Amiga games freely
+    available for download. There are still some good people left in the
+    world...
+  - Jens Sch�nfeld, inventor of the Catweasel controller, donated one
+    controller card.
+  - J�rgen Beck and Ralf Steines, maintainers of the Amiga emulation web
+    site "Back to the Roots" (http://www.back2roots.org) and everyone else
+    who spends time writing to software companies asking for permission to
+    distribute old Amiga games.
+  - all the software companies who allow distribution of their Amiga games on
+    sites like "Back to the Roots".
+
+
+Authors/Maintainers
+===================
+
+My email address is (please read the section "Before you send email" below):
+
+bernds_cb1 at t-online.de
+
+or, via snailmail
+
+Bernd Schmidt
+Toelzer Strasse 27a
+81379 Muenchen
+Germany
+
+Email is more likely to be answered, and will definitely be answered much
+faster.
+I won't distribute software, neither PD or commercial. Don't send me floppy
+disks without at least asking first, you will not get them back.
+
+The following people have ported UAE to different platforms; you should
+direct system-specific questions to them:
+
+DOS port:
+  Gustavo Goedert <ggoedert at netrunner.com.br>
+  Available: http://www.netrunner.com.br/dosuae
+  Sourecode: available on the above Web page, most of it included in the
+             main source (with some delay)
+
+Mac port:
+  Originally: Ernesto Corvi <someone at imagina.com>
+  Currently: Arnaud Blanchard <jblancha at pratique.fr>
+  Available: http://www.pratique.fr/~jblancha/
+  Sourcecode: extra package available. Bits and pieces in the main source,
+              but nothing you could get to compile.
+
+BeBox port:
+  Christian Bauer <bauec002 at goofy.zdv.uni-mainz.de>
+  Available: The main UAE web page (use the Unix sources)
+  Sourcecode: Included in the main source. Should compile OK.
+  Notes: Christian says he doesn't have much time to spend on UAE, so if
+         anyone is willing to help maintain this port, please speak up.
+
+NextStep port:
+  Ian Stephenson <ians at cam-ani.co.uk>
+  Available: The main UAE web page (use the Unix sources)
+  Sourcecode: Included in the main source. Should compile OK.
+  Notes: Ian says he doesn't have much time to spend on UAE, so if
+         anyone is willing to help maintain this port, please speak up.
+
+Amiga port:
+  Originally: Olaf 'Olsen' Barthel <olsen at sourcery.han.de>
+  Currently: Samuel Devulder <devulder at info.unicaen.fr>
+  Available: Not quite sure yet. Paul Liss' Web page has binaries.
+  Sourcecode: Included in the main source. Should compile OK.
+
+pOS port:
+  Samuel Devulder <devulder at info.unicaen.fr>
+  Available: Not quite sure yet.
+  Sourcecode: Included in the main source. Should compile OK.
+
+OS/2 port:
+  Pressenna Sockalingasamy <deathlok at cww.de>
+  Available: ftp://hobbes.nmsu.edu/pub/os2/apps/emulator/uae2_0810_a1.zip
+  Sourcecode: working on including it
+
+XFree86/OS2 port:
+  Krister Bergman <bellman at kuai.se>
+  Available: http://www.kuai.se/~bellman/html/xfreeapps.html
+  Sourcecode: nothing special, apparently the Unix stuff compiles cleanly (?)
+
+Win32 port:
+  Originally: Mathias Ortmann <ortmann at informatik.tu-muenchen.de>
+  Currently: Brian King <Brian_King at codepoet.com>
+  Available: http://www.codepoet.com/uae
+  Sourcecode: bits merged into the main source, the rest available from the
+              URL above. Still trying to merge more of it...
+
+Acorn RISC PC port:
+  Peter Teichmann <sol at Space.WH1.TU-Dresden.De>
+  Available: http://www.wh1.tu-dresden.de/~sol/acorn.shtml
+             http://www.wh1.tu-dresden.de/~sol/acorne.shtml
+  Sourcecode: Some of it is included in the main source, but since Acorn's OS
+              apparently doesn't have decent file handling, you can't even
+	      use the same source layout. Also needs lots of additional files.
+	      
+Since I generally don't have the possibility to test or improve these ports,
+it is a good idea to contact their respective authors if you have questions.
+
+
+Before you send email...
+========================
+
+Before you contact me with a problem that you have, make sure you have read
+_all_ of the above. Please read also the file "FAQ", which contains a lot of
+helpful information, and the README file for your specific system. 
+
+I can't answer _every_ question. If you have trouble understanding this
+README, either because you don't speak English very well or because you have
+no clue at all about computers, please try to find some friend of yours who 
+does understand this file and who can translate/explain it for you. I simply
+can't explain (for example) how to use terminal programs or CrossDOS because
+I don't use either, and it would be much too time-consuming anyway. This file
+and the file FAQ contains about every piece of information I can give you. I 
+try to help people who have questions, but sometimes it takes too much time.
+
+Please don't ask for Kickstart ROM files or other copyrighted software. Don't
+_send_ me stuff like this either.  Don't send large attachments, at least not
+without asking first.
+
+Oh, and another thing: If I promise to do things (like implement new
+features), and forget about them, pester me. That happens occasionally, it's
+a known bug in my brain. I'll have it replaced.
diff --git a/src/core/uae/build68k.c b/src/core/uae/build68k.c
new file mode 100644
index 0000000..c3f6140
--- /dev/null
+++ b/src/core/uae/build68k.c
@@ -0,0 +1,248 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: build68k.c 1542 2005-06-25 14:27:52Z roms $ */
+
+/*
+ * UAE - The Un*x Amiga Emulator
+ *
+ * Read 68000 CPU specs from file "table68k" and build table68k.c
+ *
+ * Copyright 1995,1996 Bernd Schmidt
+ */
+
+#include <stdlib.h>
+#include "sysdeps.h"
+#include <stdio.h>
+#include <assert.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "readcpu.h"
+
+static FILE *tablef;
+static int nextch = 0;
+
+static void getnextch(void)
+{
+    do {
+	nextch = fgetc(tablef);
+	if (nextch == '%') {
+	    do {
+		nextch = fgetc(tablef);
+	    } while (nextch != EOF && nextch != '\n');
+	}
+    } while (nextch != EOF && isspace(nextch));
+}
+
+static int nextchtohex(void)
+{
+    switch (isupper (nextch) ? tolower (nextch) : nextch) {
+     case '0': return 0;
+     case '1': return 1;
+     case '2': return 2;
+     case '3': return 3;
+     case '4': return 4;
+     case '5': return 5;
+     case '6': return 6;
+     case '7': return 7;
+     case '8': return 8;
+     case '9': return 9;
+     case 'a': return 10;
+     case 'b': return 11;
+     case 'c': return 12;
+     case 'd': return 13;
+     case 'e': return 14;
+     case 'f': return 15;
+     default: abort();
+    }
+}
+
+int main(int argc, char **argv)
+{
+    int no_insns = 0;
+
+    printf ("#include <stdlib.h>\n");   
+    printf ("#include \"sysdeps.h\"\n");
+    printf ("#include \"readcpu.h\"\n");
+    printf ("struct instr_def defs68k[] = {\n");
+#if 0
+    tablef = fopen("table68k","r");
+    if (tablef == NULL) {
+	fprintf(stderr, "table68k not found\n");
+	exit(1);
+    }
+#else
+    tablef = stdin;
+#endif
+    getnextch();
+    while (nextch != EOF) {
+	int cpulevel, plevel, sduse;
+	int i;
+
+	char patbits[16];
+	char opcstr[256];
+	int bitpos[16];
+	int flagset[5], flaguse[5];
+
+	unsigned int bitmask,bitpattern;
+	int n_variable;
+
+	n_variable = 0;
+	bitmask = bitpattern = 0;
+	memset (bitpos, 0, sizeof(bitpos));
+	for(i=0; i<16; i++) {
+	    int currbit;
+	    bitmask <<= 1;
+	    bitpattern <<= 1;
+
+	    switch (nextch) {
+	     case '0': currbit = bit0; bitmask |= 1; break;
+	     case '1': currbit = bit1; bitmask |= 1; bitpattern |= 1; break;
+	     case 'c': currbit = bitc; break;
+	     case 'C': currbit = bitC; break;
+	     case 'f': currbit = bitf; break;
+	     case 'i': currbit = biti; break;
+	     case 'I': currbit = bitI; break;
+	     case 'j': currbit = bitj; break;
+	     case 'J': currbit = bitJ; break;
+	     case 'k': currbit = bitk; break;
+	     case 'K': currbit = bitK; break;
+	     case 's': currbit = bits; break;
+	     case 'S': currbit = bitS; break;
+	     case 'd': currbit = bitd; break;
+	     case 'D': currbit = bitD; break;
+	     case 'r': currbit = bitr; break;
+	     case 'R': currbit = bitR; break;
+	     case 'z': currbit = bitz; break;
+	     case 'p': currbit = bitp; break;
+	     default: abort();
+	    }
+	    if (!(bitmask & 1)) {
+		bitpos[n_variable] = currbit;
+		n_variable++;
+	    }
+
+	    if (nextch == '0' || nextch == '1')
+		bitmask |= 1;
+	    if (nextch == '1')
+		bitpattern |= 1;
+	    patbits[i] = nextch;
+	    getnextch();
+	}
+
+	while (isspace(nextch) || nextch == ':') /* Get CPU and privilege level */
+	    getnextch();
+
+	switch (nextch) {
+	 case '0': cpulevel = 0; break;
+	 case '1': cpulevel = 1; break;
+	 case '2': cpulevel = 2; break;
+	 case '3': cpulevel = 3; break;
+	 case '4': cpulevel = 4; break;
+	 default: abort();
+	}
+	getnextch();
+
+	switch (nextch) {
+	 case '0': plevel = 0; break;
+	 case '1': plevel = 1; break;
+	 case '2': plevel = 2; break;
+	 case '3': plevel = 3; break;
+	 default: abort();
+	}
+	getnextch();
+
+	while (isspace(nextch))                   /* Get flag set information */
+	    getnextch();
+
+	if (nextch != ':')
+	    abort();
+
+	for(i = 0; i < 5; i++) {
+	    getnextch();
+	    switch(nextch){
+	     case '-': flagset[i] = fa_unset; break;
+	     case '/': flagset[i] = fa_isjmp; break;
+	     case '+': flagset[i] = fa_isbranch; break;
+	     case '0': flagset[i] = fa_zero; break;
+	     case '1': flagset[i] = fa_one; break;
+	     case 'x': flagset[i] = fa_dontcare; break;
+	     case '?': flagset[i] = fa_unknown; break;
+	     default: flagset[i] = fa_set; break;
+	    }
+	}
+
+	getnextch();
+	while (isspace(nextch))
+	    getnextch();
+
+	if (nextch != ':')                        /* Get flag used information */
+	    abort();
+
+	for(i = 0; i < 5; i++) {
+	    getnextch();
+	    switch(nextch){
+	     case '-': flaguse[i] = fu_unused; break;
+	     case '/': flaguse[i] = fu_isjmp; break;
+	     case '+': flaguse[i] = fu_maybecc; break;
+	     case '?': flaguse[i] = fu_unknown; break;
+	     default: flaguse[i] = fu_used; break;
+	    }
+	}
+
+	getnextch();
+	while (isspace(nextch))
+	    getnextch();
+
+	if (nextch != ':')                        /* Get source/dest usage information */
+	    abort();
+
+	getnextch();
+	sduse = nextchtohex() << 4;
+	getnextch();
+	sduse |= nextchtohex();
+
+	getnextch();
+	while (isspace(nextch))
+	    getnextch();
+
+	if (nextch != ':')
+	    abort();
+
+	fgets(opcstr, 250, tablef);
+	getnextch();
+	{
+	    int j;
+	    /* Remove superfluous spaces from the string */
+	    char *opstrp = opcstr, *osendp;
+	    int slen = 0;
+
+	    while (isspace(*opstrp))
+		opstrp++;
+
+	    osendp = opstrp;
+	    while (*osendp) {
+		if (!isspace (*osendp))
+		    slen = osendp - opstrp + 1;
+		osendp++;
+	    }
+	    opstrp[slen] = 0;
+
+	    if (no_insns > 0)
+		printf(",\n");
+	    no_insns++;
+	    printf("{ %d, %d, {", bitpattern, n_variable);
+	    for (j = 0; j < 16; j++) {
+		printf("%d", bitpos[j]);
+		if (j < 15)
+		    printf(",");
+	    }
+	    printf ("}, %d, %d, %d, { ", bitmask, cpulevel, plevel);
+	    for(i = 0; i < 5; i++) {
+		printf("{ %d, %d }%c ", flaguse[i], flagset[i], i == 4 ? ' ' : ',');
+	    }
+	    printf("}, %d, \"%s\"}", sduse, opstrp);
+	}
+    }
+    printf("};\nint n_defs68k = %d;\n", no_insns);
+    return 0;
+}
diff --git a/src/core/uae/build68k.dsp b/src/core/uae/build68k.dsp
new file mode 100644
index 0000000..bfe4033
--- /dev/null
+++ b/src/core/uae/build68k.dsp
@@ -0,0 +1,100 @@
+# Microsoft Developer Studio Project File - Name="build68k" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=build68k - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "build68k.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "build68k.mak" CFG="build68k - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "build68k - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "build68k - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "build68k - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WIN32__" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"build68k.exe"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Building CPU definitions...
+PostBuild_Cmds=build68k <table68k >cpudefs.c
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "build68k - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "build68k___Win32_Debug"
+# PROP BASE Intermediate_Dir "build68k___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WIN32__" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"build68k.exe" /pdbtype:sept
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Building CPU definitions...
+PostBuild_Cmds=build68k.exe <table68k >cpudefs.c
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "build68k - Win32 Release"
+# Name "build68k - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\build68k.c
+# End Source File
+# End Target
+# End Project
diff --git a/src/core/uae/clean.bat b/src/core/uae/clean.bat
new file mode 100644
index 0000000..363350a
--- /dev/null
+++ b/src/core/uae/clean.bat
@@ -0,0 +1,10 @@
+deltree /debug
+del *.ncb
+del *.plg
+del *.ilk
+del *.opt
+del cpudefs.c
+del cpustbl.c
+del cputbl.c
+del cputbl.h
+del cpuemu.c
\ No newline at end of file
diff --git a/src/core/uae/cpu_prefetch.h b/src/core/uae/cpu_prefetch.h
new file mode 100644
index 0000000..60de52a
--- /dev/null
+++ b/src/core/uae/cpu_prefetch.h
@@ -0,0 +1,16 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: cpu_prefetch.h 2010 2006-02-25 06:45:21Z kevinkofler $ */
+
+STATIC_INLINE uae_u32 get_word_prefetch (int o)
+{
+    uae_u32 v = regs.irc;
+    regs.irc = get_word (m68k_getpc() + o);
+    return v;
+}
+STATIC_INLINE uae_u32 get_long_prefetch (int o)
+{
+    uae_u32 v = get_word_prefetch (o) << 16;
+    v |= get_word_prefetch (o + 2);
+    return v;
+}
+
diff --git a/src/core/uae/fpp.c b/src/core/uae/fpp.c
new file mode 100644
index 0000000..bb81d94
--- /dev/null
+++ b/src/core/uae/fpp.c
@@ -0,0 +1,47 @@
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * MC68881 emulation
+  *
+  * Copyright 1996 Herman ten Brugge
+  * stubbed out for TiEmu - Copyright (C) 2005 Kevin Kofler
+  */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "sysdeps.h"
+
+void fdbcc_opp (uae_u32 opcode, uae_u16 extra)
+{
+    abort();
+}
+
+void fscc_opp (uae_u32 opcode, uae_u16 extra)
+{
+    abort();
+}
+
+void ftrapcc_opp (uae_u32 opcode, uaecptr oldpc)
+{
+    abort();
+}
+
+void fbcc_opp (uae_u32 opcode, uaecptr pc, uae_u32 extra)
+{
+    abort();
+}
+
+void fsave_opp (uae_u32 opcode)
+{
+    abort();
+}
+
+void frestore_opp (uae_u32 opcode)
+{
+    abort();
+}
+
+void fpp_opp (uae_u32 opcode, uae_u16 extra)
+{
+    abort();
+}
diff --git a/src/core/uae/gencpu.c b/src/core/uae/gencpu.c
new file mode 100644
index 0000000..73f2602
--- /dev/null
+++ b/src/core/uae/gencpu.c
@@ -0,0 +1,2779 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: gencpu.c 2681 2007-11-20 18:01:02Z roms $ */
+
+/*
+ * UAE - The Un*x Amiga Emulator
+ *
+ * MC68000 emulation generator
+ *
+ * This is a fairly stupid program that generates a lot of case labels that
+ * can be #included in a switch statement.
+ * As an alternative, it can generate functions that handle specific
+ * MC68000 instructions, plus a prototype header file and a function pointer
+ * array to look up the function for an opcode.
+ * Error checking is bad, an illegal table68k file will cause the program to
+ * call abort().
+ * The generated code is sometimes sub-optimal, an optimizing compiler should
+ * take care of this.
+ *
+ * The source for the insn timings is Markt & Technik's Amiga Magazin 8/1992.
+ *
+ * Copyright 1995, 1996, 1997, 1998, 1999, 2000 Bernd Schmidt
+ */
+
+#include <stdlib.h>
+#include "sysdeps.h"
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+#include <stdio.h>
+#include "readcpu.h"
+
+#define BOOL_TYPE "int"
+
+static FILE *headerfile;
+static FILE *stblfile;
+
+static int using_prefetch;
+static int using_exception_3;
+static int using_ce = 0;
+static int cpu_level;
+
+/* Flags for genamode.  */
+#define GF_APDI 1
+#define GF_AD8R 2
+#define GF_PC8R 4
+#define GF_AA 7
+#define GF_NOREFILL 8
+#define GF_PREFETCH 16
+
+/* For the current opcode, the next lower level that will have different code.
+ * Initialized to -1 for each opcode. If it remains unchanged, indicates we
+ * are done with that opcode.  */
+static int next_cpu_level;
+
+static int *opcode_map;
+static int *opcode_next_clev;
+static int *opcode_last_postfix;
+static unsigned long *counts;
+
+static void read_counts (void)
+{
+    FILE *file;
+    unsigned long opcode, count, total;
+    char name[20];
+    int nr = 0;
+    memset (counts, 0, 65536 * sizeof *counts);
+
+    file = fopen ("frequent.68k", "r");
+    if (file) {
+	fscanf (file, "Total: %lu\n", &total);
+	while (fscanf (file, "%lx: %lu %s\n", &opcode, &count, name) == 3) {
+	    opcode_next_clev[nr] = 4;
+	    opcode_last_postfix[nr] = -1;
+	    opcode_map[nr++] = opcode;
+	    counts[opcode] = count;
+	}
+	fclose (file);
+    }
+    if (nr == nr_cpuop_funcs)
+	return;
+    for (opcode = 0; opcode < 0x10000; opcode++) {
+	if (table68k[opcode].handler == -1 && table68k[opcode].mnemo != i_ILLG
+	    && counts[opcode] == 0)
+	{
+	    opcode_next_clev[nr] = 4;
+	    opcode_last_postfix[nr] = -1;
+	    opcode_map[nr++] = opcode;
+	    counts[opcode] = count;
+	}
+    }
+    if (nr != nr_cpuop_funcs)
+	abort ();
+}
+
+static char endlabelstr[80];
+static int endlabelno = 0;
+static int need_endlabel;
+
+static int n_braces = 0;
+static int m68k_pc_offset = 0;
+static int insn_n_cycles;
+
+static void returncycles (char *s, int cycles)
+{
+    if (using_ce) return;
+    printf ("%sreturn %d * %d;\n", s, cycles, CYCLE_UNIT / 2);
+}
+
+static int isreg (amodes mode)
+{
+    if (mode == Dreg || mode == Areg)
+	return 1;
+    return 0;
+}
+
+static void start_brace (void)
+{
+    n_braces++;
+    printf ("{");
+}
+
+static void close_brace (void)
+{
+    assert (n_braces > 0);
+    n_braces--;
+    printf ("}");
+}
+
+static void finish_braces (void)
+{
+    while (n_braces > 0)
+	close_brace ();
+}
+
+static void pop_braces (int to)
+{
+    while (n_braces > to)
+	close_brace ();
+}
+
+static int bit_size (int size)
+{
+    switch (size) {
+     case sz_byte: return 8;
+     case sz_word: return 16;
+     case sz_long: return 32;
+     default: abort ();
+    }
+    return 0;
+}
+
+static const char *bit_mask (int size)
+{
+    switch (size) {
+     case sz_byte: return "0xff";
+     case sz_word: return "0xffff";
+     case sz_long: return "0xffffffff";
+     default: abort ();
+    }
+    return 0;
+}
+
+static void gen_nextilong (char *type, char *name, int norefill)
+{
+    int r = m68k_pc_offset;
+    m68k_pc_offset += 4;
+
+    if (using_ce) {
+        printf ("\t%s %s;\n", type, name);
+	/* we must do this because execution order of (something | something2) is not defined */
+	if (norefill) {
+	    printf ("\t%s = get_word_ce_prefetch (%d) << 16;\n", name, r + 2);
+	    printf ("\t%s |= regs.irc;\n", name);
+	} else {
+	    printf ("\t%s = get_word_ce_prefetch (%d) << 16;\n", name, r + 2);
+	    printf ("\t%s |= get_word_ce_prefetch (%d);\n", name, r + 4);
+	}
+    } else {
+        if (using_prefetch) {
+	    if (norefill) {
+	        printf ("\t%s %s;\n", type, name);
+		printf ("\t%s = get_word_prefetch (%d) << 16;\n", name, r + 2);
+		printf ("\t%s |= regs.irc;\n", name);
+		insn_n_cycles += 4;
+	    } else
+		printf ("\t%s %s = get_long_prefetch (%d);\n", type, name, r + 2);
+		insn_n_cycles += 8;
+	} else {
+	    insn_n_cycles += 8;
+	    printf ("\t%s %s = get_ilong (%d);\n", type, name, r);
+	}
+    }
+}
+
+static const char *gen_nextiword (int norefill)
+{
+    static char buffer[80];
+    int r = m68k_pc_offset;
+    m68k_pc_offset += 2;
+
+    if (using_ce) {
+	if (norefill)
+	    strcpy (buffer, "regs.irc");
+	else
+	    sprintf (buffer, "get_word_ce_prefetch (%d)", r + 2);
+    } else {
+	if (using_prefetch) {
+	    if (norefill) {
+		sprintf (buffer, "regs.irc", r);
+	    } else {
+		sprintf (buffer, "get_word_prefetch (%d)", r + 2);
+		insn_n_cycles += 4;
+	    }
+	} else {
+	    sprintf (buffer, "get_iword (%d)", r);
+            insn_n_cycles += 4;
+	}
+    }
+    return buffer;
+}
+
+static const char *gen_nextibyte (int norefill)
+{
+    static char buffer[80];
+    int r = m68k_pc_offset;
+    m68k_pc_offset += 2;
+
+    if (using_ce) {
+	if (norefill)
+	    strcpy (buffer, "(uae_u8)regs.irc");
+	else
+	    sprintf (buffer, "(uae_u8)get_word_ce_prefetch (%d)", r + 2);
+    } else {
+        insn_n_cycles += 4;
+	if (using_prefetch) {
+	    if (norefill) {
+		sprintf (buffer, "(uae_u8)regs.irc", r);
+	    } else {
+		sprintf (buffer, "(uae_u8)get_word_prefetch (%d)", r + 2);
+	        insn_n_cycles += 4;
+	    }
+	} else {
+	    sprintf (buffer, "get_ibyte (%d)", r);
+            insn_n_cycles += 4;
+	}
+    }
+    return buffer;
+}
+
+static void irc2ir (void)
+{
+    if (!using_prefetch)
+	return;
+    printf ("\tregs.ir = regs.irc;\n");
+}
+
+static int did_prefetch;
+
+static void fill_prefetch_2 (void)
+{
+    if (!using_prefetch)
+	return;
+    if (using_ce)
+	printf ("\tget_word_ce_prefetch (%d);\n", m68k_pc_offset + 2);
+    else
+	printf ("\tget_word_prefetch (%d);\n", m68k_pc_offset + 2);
+    did_prefetch = 1;
+    insn_n_cycles += 4;
+}
+
+static void fill_prefetch_1 (int o, int needcycles)
+{
+    if (!using_prefetch)
+	return;
+    if (using_ce) {
+	if (needcycles) {
+	    printf ("\tlostcycles = get_word_ce_prefetch_cycles (%d);\n", o);
+	} else {
+	    printf ("\tget_word_ce_prefetch (%d);\n", o);
+	}
+    } else {
+	printf ("\tget_word_prefetch (%d);\n", o);
+    }
+    did_prefetch = 1;
+    insn_n_cycles += 4;
+}
+
+static void fill_prefetch_full (void)
+{
+    fill_prefetch_1 (0, 0);
+    irc2ir ();
+    fill_prefetch_1 (2, 0);
+}
+
+static void fill_prefetch_0 (void)
+{
+    if (!using_prefetch)
+	return;
+    if (using_ce)
+	printf ("\tget_word_ce_prefetch (0);\n");
+    else
+	printf ("\tget_word_prefetch (0);\n");
+    did_prefetch = 1;
+    insn_n_cycles += 4;
+} 
+
+static void fill_prefetch_next_1 (needcycles)
+{
+    if (needcycles && using_ce) {
+	printf ("\tint lostcycles;\n");
+    }
+    irc2ir ();
+    fill_prefetch_1 (m68k_pc_offset + 2, needcycles);
+} 
+
+static void fill_prefetch_next (void)
+{
+    fill_prefetch_next_1 (0);
+}
+static void fill_prefetch_next_cycles (void)
+{
+    fill_prefetch_next_1 (1);
+}
+
+static void fill_prefetch_next_delay (int extracycles)
+{
+    if (!using_prefetch)
+	return;
+    if (using_ce) {
+	if (extracycles > 0) {
+	    printf("\t{\n");
+	    fill_prefetch_next_cycles ();
+	    printf("\tif ((%d + 4) * %d > lostcycles) do_cycles_ce ((%d + 4) * %d - lostcycles);\n",
+		extracycles, CYCLE_UNIT / 2, extracycles, CYCLE_UNIT / 2);
+	    printf("\t}\n");
+	} else {
+	    fill_prefetch_next ();
+	}
+    } else {
+	fill_prefetch_next ();
+    }
+}
+
+static void fill_prefetch_finish (void)
+{
+    if (did_prefetch || !using_prefetch)
+	return;
+    fill_prefetch_1 (m68k_pc_offset, 0);
+}
+
+static void sync_m68k_pc (void)
+{
+    if (m68k_pc_offset == 0)
+	return;
+    printf ("\tm68k_incpc (%d);\n", m68k_pc_offset);
+    m68k_pc_offset = 0;
+}
+
+/* getv == 1: fetch data; getv != 0: check for odd address. If movem != 0,
+ * the calling routine handles Apdi and Aipi modes.
+ * gb-- movem == 2 means the same thing but for a MOVE16 instruction */
+static void genamode (amodes mode, char *reg, wordsizes size, char *name, int getv, int movem, int flags)
+{
+    char namea[100];
+    int m68k_pc_offset_last = m68k_pc_offset;
+
+    sprintf (namea, "%sa", name);
+
+    start_brace ();
+    switch (mode) {
+    case Dreg:
+	if (movem)
+	    abort ();
+	if (getv == 1)
+	    switch (size) {
+	    case sz_byte:
+#if defined(AMIGA) && !defined(WARPUP)
+		/* sam: I don't know why gcc.2.7.2.1 produces a code worse */
+		/* if it is not done like that: */
+		printf ("\tuae_s8 %s = ((uae_u8*)&m68k_dreg(regs, %s))[3];\n", name, reg);
+#else
+		printf ("\tuae_s8 %s = m68k_dreg(regs, %s);\n", name, reg);
+#endif
+		break;
+	    case sz_word:
+#if defined(AMIGA) && !defined(WARPUP)
+		printf ("\tuae_s16 %s = ((uae_s16*)&m68k_dreg(regs, %s))[1];\n", name, reg);
+#else
+		printf ("\tuae_s16 %s = m68k_dreg(regs, %s);\n", name, reg);
+#endif
+		break;
+	    case sz_long:
+		printf ("\tuae_s32 %s = m68k_dreg(regs, %s);\n", name, reg);
+		break;
+	    default:
+		abort ();
+	    }
+	return;
+    case Areg:
+	if (movem)
+	    abort ();
+	if (getv == 1)
+	    switch (size) {
+	    case sz_word:
+		printf ("\tuae_s16 %s = m68k_areg(regs, %s);\n", name, reg);
+		break;
+	    case sz_long:
+		printf ("\tuae_s32 %s = m68k_areg(regs, %s);\n", name, reg);
+		break;
+	    default:
+		abort ();
+	    }
+	return;
+    case Aind:
+	printf ("\tuaecptr %sa = m68k_areg(regs, %s);\n", name, reg);
+	break;
+    case Aipi:
+	printf ("\tuaecptr %sa = m68k_areg(regs, %s);\n", name, reg);
+	break;
+    case Apdi:
+	insn_n_cycles += 2;
+	switch (size) {
+	case sz_byte:
+	    if (movem)
+		printf ("\tuaecptr %sa = m68k_areg(regs, %s);\n", name, reg);
+	    else
+		printf ("\tuaecptr %sa = m68k_areg(regs, %s) - areg_byteinc[%s];\n", name, reg, reg);
+	    break;
+	case sz_word:
+	    printf ("\tuaecptr %sa = m68k_areg(regs, %s) - %d;\n", name, reg, movem ? 0 : 2);
+	    break;
+	case sz_long:
+	    printf ("\tuaecptr %sa = m68k_areg(regs, %s) - %d;\n", name, reg, movem ? 0 : 4);
+	    break;
+	default:
+	    abort ();
+	}
+	break;
+    case Ad16:
+	printf ("\tuaecptr %sa = m68k_areg(regs, %s) + (uae_s32)(uae_s16)%s;\n", name, reg, gen_nextiword (flags & GF_NOREFILL));
+	break;
+    case Ad8r:
+	insn_n_cycles += 2;
+	if (cpu_level > 1) {
+	    if (next_cpu_level < 1)
+		next_cpu_level = 1;
+	    sync_m68k_pc ();
+	    start_brace ();
+	    /* This would ordinarily be done in gen_nextiword, which we bypass.  */
+	    insn_n_cycles += 4;
+	    printf ("\tuaecptr %sa = get_disp_ea_020(m68k_areg(regs, %s), next_iword());\n", name, reg);
+	} else
+	    printf ("\tuaecptr %sa = get_disp_ea_000(m68k_areg(regs, %s), %s);\n", name, reg, gen_nextiword (flags & GF_NOREFILL));
+
+	break;
+    case PC16:
+	printf ("\tuaecptr %sa = m68k_getpc () + %d;\n", name, m68k_pc_offset);
+	printf ("\t%sa += (uae_s32)(uae_s16)%s;\n", name, gen_nextiword (flags & GF_NOREFILL));
+	break;
+    case PC8r:
+	insn_n_cycles += 2;
+	if (cpu_level > 1) {
+	    if (next_cpu_level < 1)
+		next_cpu_level = 1;
+	    sync_m68k_pc ();
+	    start_brace ();
+	    /* This would ordinarily be done in gen_nextiword, which we bypass.  */
+	    insn_n_cycles += 4;
+	    printf ("\tuaecptr tmppc = m68k_getpc();\n");
+	    printf ("\tuaecptr %sa = get_disp_ea_020(tmppc, next_iword());\n", name);
+	} else {
+	    printf ("\tuaecptr tmppc = m68k_getpc() + %d;\n", m68k_pc_offset);
+	    printf ("\tuaecptr %sa = get_disp_ea_000(tmppc, %s);\n", name, gen_nextiword (flags & GF_NOREFILL));
+	}
+
+	break;
+    case absw:
+	printf ("\tuaecptr %sa = (uae_s32)(uae_s16)%s;\n", name, gen_nextiword (flags & GF_NOREFILL));
+	break;
+    case absl:
+	gen_nextilong ("uaecptr", namea, flags & GF_NOREFILL);
+	break;
+    case imm:
+	if (getv != 1)
+	    abort ();
+	switch (size) {
+	case sz_byte:
+	    printf ("\tuae_s8 %s = %s;\n", name, gen_nextibyte (flags & GF_NOREFILL));
+	    break;
+	case sz_word:
+	    printf ("\tuae_s16 %s = %s;\n", name, gen_nextiword (flags & GF_NOREFILL));
+	    break;
+	case sz_long:
+	    gen_nextilong ("uae_s32", name, flags & GF_NOREFILL);
+	    break;
+	default:
+	    abort ();
+	}
+	return;
+    case imm0:
+	if (getv != 1)
+	    abort ();
+	printf ("\tuae_s8 %s = %s;\n", name, gen_nextibyte (flags & GF_NOREFILL));
+	return;
+    case imm1:
+	if (getv != 1)
+	    abort ();
+	printf ("\tuae_s16 %s = %s;\n", name, gen_nextiword (flags & GF_NOREFILL));
+	return;
+    case imm2:
+	if (getv != 1)
+	    abort ();
+	gen_nextilong ("uae_s32", name, flags & GF_NOREFILL);
+	return;
+    case immi:
+	if (getv != 1)
+	    abort ();
+	printf ("\tuae_u32 %s = %s;\n", name, reg);
+	return;
+    default:
+	abort ();
+    }
+
+    /* We get here for all non-reg non-immediate addressing modes to
+     * actually fetch the value. */
+
+    if (using_prefetch && using_exception_3 && getv != 0 && size != sz_byte) {	    
+	printf ("\tif (%sa & 1) {\n", name);
+	if (using_prefetch)
+	    printf ("\t\texception3 (opcode, m68k_getpc() + %d, %sa);\n", m68k_pc_offset + 2, name);
+	else
+	    printf ("\t\texception3 (opcode, m68k_getpc() + %d, %sa);\n", m68k_pc_offset_last, name); 
+	printf ("\t\tgoto %s;\n", endlabelstr);
+	printf ("\t}\n");
+	need_endlabel = 1;
+	start_brace ();
+    }
+
+    if (flags & GF_PREFETCH)
+	fill_prefetch_next ();
+
+    if (getv == 1) {
+	switch (size) {
+	case sz_byte: insn_n_cycles += 4; break;
+	case sz_word: insn_n_cycles += 4; break;
+	case sz_long: insn_n_cycles += 8; break;
+	default: abort ();
+	}
+	start_brace ();
+	switch (size) {
+	case sz_byte: printf ("\tuae_s8 %s = get_byte(%sa);\n", name, name); break;
+	case sz_word: printf ("\tuae_s16 %s = get_word(%sa);\n", name, name); break;
+	case sz_long: printf ("\tuae_s32 %s = get_long(%sa);\n", name, name); break;
+	default: abort ();
+	}
+    }
+
+    /* We now might have to fix up the register for pre-dec or post-inc
+     * addressing modes. */
+    if (!movem)
+	switch (mode) {
+	case Aipi:
+	    switch (size) {
+	    case sz_byte:
+		printf ("\tm68k_areg(regs, %s) += areg_byteinc[%s];\n", reg, reg);
+		break;
+	    case sz_word:
+		printf ("\tm68k_areg(regs, %s) += 2;\n", reg);
+		break;
+	    case sz_long:
+		printf ("\tm68k_areg(regs, %s) += 4;\n", reg);
+		break;
+	    default:
+		abort ();
+	    }
+	    break;
+	case Apdi:
+	    printf ("\tm68k_areg (regs, %s) = %sa;\n", reg, name);
+	    break;
+	default:
+	    break;
+	}
+}
+
+static void genastore (char *from, amodes mode, char *reg, wordsizes size, char *to)
+{
+    switch (mode) {
+     case Dreg:
+	switch (size) {
+	 case sz_byte:
+	    printf ("\tm68k_dreg(regs, %s) = (m68k_dreg(regs, %s) & ~0xff) | ((%s) & 0xff);\n", reg, reg, from);
+	    break;
+	 case sz_word:
+	    printf ("\tm68k_dreg(regs, %s) = (m68k_dreg(regs, %s) & ~0xffff) | ((%s) & 0xffff);\n", reg, reg, from);
+	    break;
+	 case sz_long:
+	    printf ("\tm68k_dreg(regs, %s) = (%s);\n", reg, from);
+	    break;
+	 default:
+	    abort ();
+	}
+	break;
+     case Areg:
+	switch (size) {
+	 case sz_word:
+	    printf ("\tm68k_areg(regs, %s) = (uae_s32)(uae_s16)(%s);\n", reg, from);
+	    break;
+	 case sz_long:
+	    printf ("\tm68k_areg(regs, %s) = (%s);\n", reg, from);
+	    break;
+	 default:
+	    abort ();
+	}
+	break;
+     case Aind:
+     case Aipi:
+     case Apdi:
+     case Ad16:
+     case Ad8r:
+     case absw:
+     case absl:
+     case PC16:
+     case PC8r:
+	if (using_prefetch)
+	    sync_m68k_pc ();
+	switch (size) {
+	 case sz_byte:
+	    insn_n_cycles += 4;
+	    printf ("\tput_byte(%sa,%s);\n", to, from);
+	    break;
+	 case sz_word:
+	    insn_n_cycles += 4;
+	    if (cpu_level < 2 && (mode == PC16 || mode == PC8r))
+		abort ();
+	    printf ("\tput_word(%sa,%s);\n", to, from);
+	    break;
+	 case sz_long:
+	    insn_n_cycles += 8;
+	    if (cpu_level < 2 && (mode == PC16 || mode == PC8r))
+		abort ();
+	    printf ("\tput_long(%sa,%s);\n", to, from);
+	    break;
+	 default:
+	    abort ();
+	}
+	break;
+     case imm:
+     case imm0:
+     case imm1:
+     case imm2:
+     case immi:
+	abort ();
+	break;
+     default:
+	abort ();
+    }
+}
+
+static void genmovemel (uae_u16 opcode)
+{
+    char getcode[100];
+    int size = table68k[opcode].size == sz_long ? 4 : 2;
+
+    if (table68k[opcode].size == sz_long) {
+	strcpy (getcode, "get_long(srca)");
+    } else {
+	strcpy (getcode, "(uae_s32)(uae_s16)get_word(srca)");
+    }
+
+    printf ("\tuae_u16 mask = %s;\n", gen_nextiword (0));
+    printf ("\tunsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
+    genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1, 0);
+    start_brace ();
+    printf ("\twhile (dmask) { m68k_dreg(regs, movem_index1[dmask]) = %s; srca += %d; dmask = movem_next[dmask]; }\n",
+	    getcode, size);
+    printf ("\twhile (amask) { m68k_areg(regs, movem_index1[amask]) = %s; srca += %d; amask = movem_next[amask]; }\n",
+	    getcode, size);
+
+    if (table68k[opcode].dmode == Aipi)
+	printf ("\tm68k_areg(regs, dstreg) = srca;\n");
+}
+
+static void genmovemle (uae_u16 opcode)
+{
+    char putcode[100];
+    int size = table68k[opcode].size == sz_long ? 4 : 2;
+    if (table68k[opcode].size == sz_long) {
+	strcpy (putcode, "put_long(srca,");
+    } else {
+	strcpy (putcode, "put_word(srca,");
+    }
+
+    printf ("\tuae_u16 mask = %s;\n", gen_nextiword (0));
+    genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1, 0);
+    if (using_prefetch)
+	sync_m68k_pc ();
+
+    start_brace ();
+    if (table68k[opcode].dmode == Apdi) {
+	printf ("\tuae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff;\n");
+	printf ("\twhile (amask) { srca -= %d; %s m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; }\n",
+		size, putcode);
+	printf ("\twhile (dmask) { srca -= %d; %s m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
+		size, putcode);
+	printf ("\tm68k_areg(regs, dstreg) = srca;\n");
+    } else {
+	printf ("\tuae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
+	printf ("\twhile (dmask) { %s m68k_dreg(regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
+		putcode, size);
+	printf ("\twhile (amask) { %s m68k_areg(regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
+		putcode, size);
+    }
+}
+
+static void duplicate_carry (int n)
+{
+    while (n-- != 0)
+	printf ("\t");
+    printf ("COPY_CARRY;\n");
+}
+
+typedef enum
+{
+  flag_logical_noclobber, flag_logical, flag_add, flag_sub, flag_cmp, flag_addx, flag_subx, flag_zn,
+  flag_av, flag_sv
+}
+flagtypes;
+
+static void genflags_normal (flagtypes type, wordsizes size, char *value, char *src, char *dst)
+{
+    char vstr[100], sstr[100], dstr[100];
+    char usstr[100], udstr[100];
+    char unsstr[100], undstr[100];
+
+    switch (size) {
+     case sz_byte:
+	strcpy (vstr, "((uae_s8)(");
+	strcpy (usstr, "((uae_u8)(");
+	break;
+     case sz_word:
+	strcpy (vstr, "((uae_s16)(");
+	strcpy (usstr, "((uae_u16)(");
+	break;
+     case sz_long:
+	strcpy (vstr, "((uae_s32)(");
+	strcpy (usstr, "((uae_u32)(");
+	break;
+     default:
+	abort ();
+    }
+    strcpy (unsstr, usstr);
+
+    strcpy (sstr, vstr);
+    strcpy (dstr, vstr);
+    strcat (vstr, value);
+    strcat (vstr, "))");
+    strcat (dstr, dst);
+    strcat (dstr, "))");
+    strcat (sstr, src);
+    strcat (sstr, "))");
+
+    strcpy (udstr, usstr);
+    strcat (udstr, dst);
+    strcat (udstr, "))");
+    strcat (usstr, src);
+    strcat (usstr, "))");
+
+    strcpy (undstr, unsstr);
+    strcat (unsstr, "-");
+    strcat (undstr, "~");
+    strcat (undstr, dst);
+    strcat (undstr, "))");
+    strcat (unsstr, src);
+    strcat (unsstr, "))");
+
+    switch (type) {
+     case flag_logical_noclobber:
+     case flag_logical:
+     case flag_zn:
+     case flag_av:
+     case flag_sv:
+     case flag_addx:
+     case flag_subx:
+	break;
+
+     case flag_add:
+	start_brace ();
+	printf ("uae_u32 %s = %s + %s;\n", value, dstr, sstr);
+	break;
+     case flag_sub:
+     case flag_cmp:
+	start_brace ();
+	printf ("uae_u32 %s = %s - %s;\n", value, dstr, sstr);
+	break;
+    }
+
+    switch (type) {
+     case flag_logical_noclobber:
+     case flag_logical:
+     case flag_zn:
+	break;
+
+     case flag_add:
+     case flag_sub:
+     case flag_addx:
+     case flag_subx:
+     case flag_cmp:
+     case flag_av:
+     case flag_sv:
+	start_brace ();
+	printf ("\t" BOOL_TYPE " flgs = %s < 0;\n", sstr);
+	printf ("\t" BOOL_TYPE " flgo = %s < 0;\n", dstr);
+	printf ("\t" BOOL_TYPE " flgn = %s < 0;\n", vstr);
+	break;
+    }
+
+    switch (type) {
+     case flag_logical:
+	printf ("\tCLEAR_CZNV;\n");
+	printf ("\tSET_ZFLG (%s == 0);\n", vstr);
+	printf ("\tSET_NFLG (%s < 0);\n", vstr);
+	break;
+     case flag_logical_noclobber:
+	printf ("\tSET_ZFLG (%s == 0);\n", vstr);
+	printf ("\tSET_NFLG (%s < 0);\n", vstr);
+	break;
+     case flag_av:
+	printf ("\tSET_VFLG ((flgs ^ flgn) & (flgo ^ flgn));\n");
+	break;
+     case flag_sv:
+	printf ("\tSET_VFLG ((flgs ^ flgo) & (flgn ^ flgo));\n");
+	break;
+     case flag_zn:
+	printf ("\tSET_ZFLG (GET_ZFLG & (%s == 0));\n", vstr);
+	printf ("\tSET_NFLG (%s < 0);\n", vstr);
+	break;
+     case flag_add:
+	printf ("\tSET_ZFLG (%s == 0);\n", vstr);
+	printf ("\tSET_VFLG ((flgs ^ flgn) & (flgo ^ flgn));\n");
+	printf ("\tSET_CFLG (%s < %s);\n", undstr, usstr);
+	duplicate_carry (0);
+	printf ("\tSET_NFLG (flgn != 0);\n");
+	break;
+     case flag_sub:
+	printf ("\tSET_ZFLG (%s == 0);\n", vstr);
+	printf ("\tSET_VFLG ((flgs ^ flgo) & (flgn ^ flgo));\n");
+	printf ("\tSET_CFLG (%s > %s);\n", usstr, udstr);
+	duplicate_carry (0);
+	printf ("\tSET_NFLG (flgn != 0);\n");
+	break;
+     case flag_addx:
+	printf ("\tSET_VFLG ((flgs ^ flgn) & (flgo ^ flgn));\n"); /* minterm SON: 0x42 */
+	printf ("\tSET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn)));\n"); /* minterm SON: 0xD4 */
+	duplicate_carry (0);
+	break;
+     case flag_subx:
+	printf ("\tSET_VFLG ((flgs ^ flgo) & (flgo ^ flgn));\n"); /* minterm SON: 0x24 */
+	printf ("\tSET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn)));\n"); /* minterm SON: 0xB2 */
+	duplicate_carry (0);
+	break;
+     case flag_cmp:
+	printf ("\tSET_ZFLG (%s == 0);\n", vstr);
+	printf ("\tSET_VFLG ((flgs != flgo) && (flgn != flgo));\n");
+	printf ("\tSET_CFLG (%s > %s);\n", usstr, udstr);
+	printf ("\tSET_NFLG (flgn != 0);\n");
+	break;
+    }
+}
+
+static void genflags (flagtypes type, wordsizes size, char *value, char *src, char *dst)
+{
+    /* Temporarily deleted 68k/ARM flag optimizations.  I'd prefer to have
+       them in the appropriate m68k.h files and use just one copy of this
+       code here.  The API can be changed if necessary.  */
+#ifdef OPTIMIZED_FLAGS
+    switch (type) {
+     case flag_add:
+     case flag_sub:
+	start_brace ();
+	printf ("\tuae_u32 %s;\n", value);
+	break;
+
+     default:
+	break;
+    }
+
+    /* At least some of those casts are fairly important! */
+    switch (type) {
+     case flag_logical_noclobber:
+	printf ("\t{uae_u32 oldcznv = GET_CZNV & ~(FLAGVAL_Z | FLAGVAL_N);\n");
+	if (strcmp (value, "0") == 0) {
+	    printf ("\tSET_CZNV (olcznv | FLAGVAL_Z);\n");
+	} else {
+	    switch (size) {
+	     case sz_byte: printf ("\toptflag_testb ((uae_s8)(%s));\n", value); break;
+	     case sz_word: printf ("\toptflag_testw ((uae_s16)(%s));\n", value); break;
+	     case sz_long: printf ("\toptflag_testl ((uae_s32)(%s));\n", value); break;
+	    }
+	    printf ("\tIOR_CZNV (oldcznv);\n");
+	}
+	printf ("\t}\n");
+	return;
+     case flag_logical:
+	if (strcmp (value, "0") == 0) {
+	    printf ("\tSET_CZNV (FLAGVAL_Z);\n");
+	} else {
+	    switch (size) {
+	     case sz_byte: printf ("\toptflag_testb ((uae_s8)(%s));\n", value); break;
+	     case sz_word: printf ("\toptflag_testw ((uae_s16)(%s));\n", value); break;
+	     case sz_long: printf ("\toptflag_testl ((uae_s32)(%s));\n", value); break;
+	    }
+	}
+	return;
+
+     case flag_add:
+	switch (size) {
+	 case sz_byte: printf ("\toptflag_addb (%s, (uae_s8)(%s), (uae_s8)(%s));\n", value, src, dst); break;
+	 case sz_word: printf ("\toptflag_addw (%s, (uae_s16)(%s), (uae_s16)(%s));\n", value, src, dst); break;
+	 case sz_long: printf ("\toptflag_addl (%s, (uae_s32)(%s), (uae_s32)(%s));\n", value, src, dst); break;
+	}
+	return;
+
+     case flag_sub:
+	switch (size) {
+	 case sz_byte: printf ("\toptflag_subb (%s, (uae_s8)(%s), (uae_s8)(%s));\n", value, src, dst); break;
+	 case sz_word: printf ("\toptflag_subw (%s, (uae_s16)(%s), (uae_s16)(%s));\n", value, src, dst); break;
+	 case sz_long: printf ("\toptflag_subl (%s, (uae_s32)(%s), (uae_s32)(%s));\n", value, src, dst); break;
+	}
+	return;
+
+     case flag_cmp:
+	switch (size) {
+	 case sz_byte: printf ("\toptflag_cmpb ((uae_s8)(%s), (uae_s8)(%s));\n", src, dst); break;
+	 case sz_word: printf ("\toptflag_cmpw ((uae_s16)(%s), (uae_s16)(%s));\n", src, dst); break;
+	 case sz_long: printf ("\toptflag_cmpl ((uae_s32)(%s), (uae_s32)(%s));\n", src, dst); break;
+	}
+	return;
+	
+     default:
+	break;
+    }
+#endif
+
+    genflags_normal (type, size, value, src, dst);
+}
+
+static void force_range_for_rox (const char *var, wordsizes size)
+{
+    /* Could do a modulo operation here... which one is faster? */
+    switch (size) {
+     case sz_long:
+	printf ("\tif (%s >= 33) %s -= 33;\n", var, var);
+	break;
+     case sz_word:
+	printf ("\tif (%s >= 34) %s -= 34;\n", var, var);
+	printf ("\tif (%s >= 17) %s -= 17;\n", var, var);
+	break;
+     case sz_byte:
+	printf ("\tif (%s >= 36) %s -= 36;\n", var, var);
+	printf ("\tif (%s >= 18) %s -= 18;\n", var, var);
+	printf ("\tif (%s >= 9) %s -= 9;\n", var, var);
+	break;
+    }
+}
+
+static const char *cmask (wordsizes size)
+{
+    switch (size) {
+     case sz_byte: return "0x80";
+     case sz_word: return "0x8000";
+     case sz_long: return "0x80000000";
+     default: abort ();
+    }
+}
+
+static int source_is_imm1_8 (struct instr *i)
+{
+    return i->stype == 3;
+}
+
+static void gen_opcode (unsigned long int opcode)
+{
+    struct instr *curi = table68k + opcode;
+    int tmpc = 0;
+    insn_n_cycles = 4;
+
+    start_brace ();
+#if 0
+    printf ("uae_u8 *m68k_pc = regs.pc_p;\n");
+#endif
+    m68k_pc_offset = 2;
+    switch (curi->plev) {
+    case 0: /* not privileged */
+	break;
+    case 1: /* unprivileged only on 68000 */
+	if (cpu_level == 0)
+	    break;
+	if (next_cpu_level < 0)
+	    next_cpu_level = 0;
+
+	/* fall through */
+    case 2: /* priviledged */
+	printf ("if (!regs.s) { Exception(8,0); goto %s; }\n", endlabelstr);
+	need_endlabel = 1;
+	start_brace ();
+	break;
+    case 3: /* privileged if size == word */
+	if (curi->size == sz_byte)
+	    break;
+	printf ("if (!regs.s) { Exception(8,0); goto %s; }\n", endlabelstr);
+	need_endlabel = 1;
+	start_brace ();
+	break;
+    }
+    switch (curi->mnemo) {
+    case i_OR:
+    case i_AND:
+    case i_EOR:
+	case i_ORI:
+	case i_ANDI:
+	case i_EORI:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	printf ("\tsrc %c= dst;\n", (curi->mnemo == i_OR || curi->mnemo == i_ORI) ? '|' : (curi->mnemo == i_AND || curi->mnemo == i_ANDI) ? '&' : '^');
+	genflags (flag_logical, curi->size, "src", "", "");
+	if (curi->size == sz_long && isreg (curi->dmode))
+	    tmpc += curi->mnemo == (i_AND || i_ANDI) ? 2 : 4;
+	fill_prefetch_next_delay (tmpc);
+	genastore ("src", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_ORSR:
+    case i_EORSR:
+	printf ("\tMakeSR();\n");
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	if (curi->size == sz_byte) {
+	    printf ("\tsrc &= 0xFF;\n");
+	}
+        fill_prefetch_next_delay (4);
+	printf ("\tregs.sr %c= src;\n", curi->mnemo == i_EORSR ? '^' : '|');
+	printf ("\tMakeFromSR();\n");
+	break;
+    case i_ANDSR:
+	printf ("\tMakeSR();\n");
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	if (curi->size == sz_byte) {
+	    printf ("\tsrc |= 0xFF00;\n");
+	}
+        fill_prefetch_next_delay (4);
+	printf ("\tregs.sr &= src;\n");
+	printf ("\tMakeFromSR();\n");
+	break;
+    case i_SUB:
+	case i_SUBQ:
+	case i_SUBI:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) {
+	    if (curi->dmode == Dreg && curi->size == sz_long)
+		tmpc += (curi->smode == imm || curi->smode == immi) ? 4 : 2;
+	}
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	genflags (flag_sub, curi->size, "newv", "src", "dst");
+	genastore ("newv", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_SUBA:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0, 0);
+	if (isreg (curi->dmode) && curi->dmode == Areg) {
+	    tmpc += curi->size == sz_long ? 2 : 4;
+	    if (curi->size == sz_long)
+		tmpc += (isreg (curi->smode) || curi->smode == imm) ? 2 : 0;
+	}
+	fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	printf ("\tuae_u32 newv = dst - src;\n");
+	genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
+	break;
+    case i_SUBX:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, GF_AA);
+	if ((isreg (curi->smode) && curi->size == sz_long) || !isreg (curi->smode))
+	    tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	printf ("\tuae_u32 newv = dst - src - (GET_XFLG ? 1 : 0);\n");
+	genflags (flag_subx, curi->size, "newv", "src", "dst");
+	genflags (flag_zn, curi->size, "newv", "", "");
+	genastore ("newv", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_SBCD:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, GF_AA);
+        fill_prefetch_next ();
+	start_brace ();
+	printf ("\tuae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0);\n");
+	printf ("\tuae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0);\n");
+	printf ("\tuae_u16 newv, tmp_newv;\n");
+	printf ("\tint bcd = 0;\n");
+	printf ("\tnewv = tmp_newv = newv_hi + newv_lo;\n");
+	printf ("\tif (newv_lo & 0xF0) { newv -= 6; bcd = 6; };\n");
+	printf ("\tif ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; }\n");
+	printf ("\tSET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF);\n");
+	duplicate_carry (0);
+	genflags (flag_zn, curi->size, "newv", "", "");
+	printf ("\tSET_VFLG ((tmp_newv & 0x80) != 0 && (newv & 0x80) == 0);\n");
+	genastore ("newv", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_ADD:
+	case i_ADDQ:
+	case i_ADDI:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) {
+	    if (curi->dmode == Dreg && curi->size == sz_long)
+	        tmpc += (curi->smode == imm || curi->smode == immi) ? 4 : 2;
+	}
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	genflags (flag_add, curi->size, "newv", "src", "dst");
+	genastore ("newv", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_ADDA:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0, 0);
+	if (isreg (curi->dmode) && curi->dmode == Areg) {
+	    tmpc += curi->size == sz_long ? 2 : 4;
+	    if (curi->size == sz_long)
+		tmpc += (isreg (curi->smode) || curi->smode == imm) ? 2 : 0;
+	}
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	printf ("\tuae_u32 newv = dst + src;\n");
+	genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
+	break;
+    case i_ADDX:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, GF_AA);
+	if ((isreg (curi->smode) && curi->size == sz_long) || !isreg (curi->smode))
+	    tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	printf ("\tuae_u32 newv = dst + src + (GET_XFLG ? 1 : 0);\n");
+	genflags (flag_addx, curi->size, "newv", "src", "dst");
+	genflags (flag_zn, curi->size, "newv", "", "");
+	genastore ("newv", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_ABCD:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, GF_AA);
+        fill_prefetch_next ();
+	start_brace ();
+	printf ("\tuae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0);\n");
+	printf ("\tuae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0);\n");
+	printf ("\tuae_u16 newv, tmp_newv;\n");
+	printf ("\tint cflg;\n");
+	printf ("\tnewv = tmp_newv = newv_hi + newv_lo;");
+	printf ("\tif (newv_lo > 9) { newv += 6; }\n");
+	printf ("\tcflg = (newv & 0x3F0) > 0x90;\n");
+	printf ("\tif (cflg) newv += 0x60;\n");
+	printf ("\tSET_CFLG (cflg);\n");
+	duplicate_carry (0);
+	genflags (flag_zn, curi->size, "newv", "", "");
+	printf ("\tSET_VFLG ((tmp_newv & 0x80) == 0 && (newv & 0x80) != 0);\n");
+	genastore ("newv", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_NEG:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	if (isreg (curi->smode) && curi->size == sz_long) tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	genflags (flag_sub, curi->size, "dst", "src", "0");
+	genastore ("dst", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_NEGX:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	if (isreg (curi->smode) && curi->size == sz_long) tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	printf ("\tuae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0);\n");
+	genflags (flag_subx, curi->size, "newv", "src", "0");
+	genflags (flag_zn, curi->size, "newv", "", "");
+	genastore ("newv", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_NBCD:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	if (isreg (curi->smode)) tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	printf ("\tuae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0);\n");
+	printf ("\tuae_u16 newv_hi = - (src & 0xF0);\n");
+	printf ("\tuae_u16 newv, tmp_newv;\n");
+	printf ("\tint bcd = 0;\n");
+	printf ("\tnewv = tmp_newv = newv_hi + newv_lo;");
+	printf ("\tif (newv_lo & 0xF0) { newv -= 6; bcd = 6; };\n");
+	printf ("\tif (((- (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; }\n");
+	printf ("\tSET_CFLG (((- (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF);\n");
+	duplicate_carry (0);
+	genflags (flag_zn, curi->size, "newv", "", "");
+	printf ("\tSET_VFLG ((tmp_newv & 0x80) != 0 && (newv & 0x80) == 0);\n");
+	genastore ("newv", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_CLR:
+	genamode (curi->smode, "srcreg", curi->size, "src", cpu_level == 0 ? 1 : 2, 0, 0);
+	if (isreg (curi->smode) && curi->size == sz_long) tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	genflags (flag_logical, curi->size, "0", "", "");
+	genastore ("0", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_NOT:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	if (isreg (curi->smode) && curi->size == sz_long) tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	printf ("\tuae_u32 dst = ~src;\n");
+	genflags (flag_logical, curi->size, "dst", "", "");
+	genastore ("dst", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_TST:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+        fill_prefetch_next ();
+	genflags (flag_logical, curi->size, "src", "", "");
+	break;
+    case i_BTST:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	if (curi->size == sz_byte)
+	    printf ("\tsrc &= 7;\n");
+	else
+	    printf ("\tsrc &= 31;\n");
+	printf ("\tSET_ZFLG (1 ^ ((dst >> src) & 1));\n");
+	break;
+    case i_BCHG:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) tmpc += 4;
+        fill_prefetch_next_delay (tmpc);
+	if (curi->size == sz_byte)
+	    printf ("\tsrc &= 7;\n");
+	else
+	    printf ("\tsrc &= 31;\n");
+	printf ("\tdst ^= (1 << src);\n");
+	printf ("\tSET_ZFLG (((uae_u32)dst & (1 << src)) >> src);\n");
+	genastore ("dst", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_BCLR:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) tmpc += 4;
+        fill_prefetch_next_delay (tmpc);
+	if (curi->size == sz_byte)
+	    printf ("\tsrc &= 7;\n");
+	else
+	    printf ("\tsrc &= 31;\n");
+	printf ("\tSET_ZFLG (1 ^ ((dst >> src) & 1));\n");
+	printf ("\tdst &= ~(1 << src);\n");
+	genastore ("dst", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_BSET:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) tmpc += 4;
+        fill_prefetch_next_delay (tmpc);
+	if (curi->size == sz_byte)
+	    printf ("\tsrc &= 7;\n");
+	else
+	    printf ("\tsrc &= 31;\n");
+	printf ("\tSET_ZFLG (1 ^ ((dst >> src) & 1));\n");
+	printf ("\tdst |= (1 << src);\n");
+	genastore ("dst", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_CMPM:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, GF_AA);
+        fill_prefetch_next ();
+	start_brace ();
+	genflags (flag_cmp, curi->size, "newv", "src", "dst");
+	break;
+    case i_CMP:
+	case i_CMPI:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) {
+	    if (curi->dmode == Areg || (curi->dmode == Dreg && curi->size == sz_long))
+		tmpc += 2;
+	}
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	genflags (flag_cmp, curi->size, "newv", "src", "dst");
+	break;
+    case i_CMPA:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0, 0);
+	if (isreg (curi->dmode)) {
+	    if (curi->dmode == Areg || (curi->dmode == Dreg && curi->size == sz_long))
+		tmpc += 2;
+	}
+        fill_prefetch_next_delay (tmpc);
+	start_brace ();
+	genflags (flag_cmp, sz_long, "newv", "src", "dst");
+	break;
+	/* The next two are coded a little unconventional, but they are doing
+	 * weird things... */
+    case i_MVPRM:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	printf ("\tuaecptr memp = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword (0));
+        fill_prefetch_next ();
+	if (curi->size == sz_word) {
+	    printf ("\tput_byte(memp, src >> 8); put_byte(memp + 2, src);\n");
+	} else {
+	    printf ("\tput_byte(memp, src >> 24); put_byte(memp + 2, src >> 16);\n");
+	    printf ("\tput_byte(memp + 4, src >> 8); put_byte(memp + 6, src);\n");
+	}
+	break;
+    case i_MVPMR:
+	printf ("\tuaecptr memp = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword (0));
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, 0);
+	if (curi->size == sz_word) {
+	    printf ("\tuae_u16 val = (get_byte(memp) << 8) + get_byte(memp + 2);\n");
+	} else {
+	    printf ("\tuae_u32 val = (get_byte(memp) << 24) + (get_byte(memp + 2) << 16)\n");
+	    printf ("              + (get_byte(memp + 4) << 8) + get_byte(memp + 6);\n");
+	}
+	fill_prefetch_next ();
+	genastore ("val", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_MOVE:
+	case i_MOVEQ:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, GF_APDI);
+	genastore ("src", curi->dmode, "dstreg", curi->size, "dst");
+	genflags (flag_logical, curi->size, "src", "", "");
+	sync_m68k_pc ();
+	fill_prefetch_next ();
+	break;
+    case i_MOVEA:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, GF_APDI);
+	if (curi->size == sz_word) {
+	    printf ("\tuae_u32 val = (uae_s32)(uae_s16)src;\n");
+	} else {
+	    printf ("\tuae_u32 val = src;\n");
+	}
+        fill_prefetch_next ();
+	genastore ("val", curi->dmode, "dstreg", sz_long, "dst");
+	break;
+    case i_MVSR2:
+	genamode (curi->smode, "srcreg", sz_word, "src", 2, 0, 0);
+	if (isreg (curi->smode)) tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	printf ("\tMakeSR();\n");
+	if (curi->size == sz_byte)
+	    genastore ("regs.sr & 0xff", curi->smode, "srcreg", sz_word, "src");
+	else
+	    genastore ("regs.sr", curi->smode, "srcreg", sz_word, "src");
+	break;
+    case i_MV2SR:
+	genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
+	if (curi->size == sz_byte) {
+	    tmpc += 8;
+	    printf ("\tMakeSR();\n\tregs.sr &= 0xFF00;\n\tregs.sr |= src & 0xFF;\n");
+	} else {
+	    tmpc += 4;
+	    printf ("\tregs.sr = src;\n");
+	}
+        fill_prefetch_next_delay (tmpc);
+	printf ("\tMakeFromSR();\n");
+	break;
+    case i_SWAP:
+	genamode (curi->smode, "srcreg", sz_long, "src", 1, 0, 0);
+        fill_prefetch_next ();
+	start_brace ();
+	printf ("\tuae_u32 dst = ((src >> 16)&0xFFFF) | ((src&0xFFFF)<<16);\n");
+	genflags (flag_logical, sz_long, "dst", "", "");
+	genastore ("dst", curi->smode, "srcreg", sz_long, "src");
+	break;
+    case i_EXG:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+        fill_prefetch_next_delay (2);
+	genastore ("dst", curi->smode, "srcreg", curi->size, "src");
+	genastore ("src", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_EXT:
+	genamode (curi->smode, "srcreg", sz_long, "src", 1, 0, 0);
+        fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 dst = (uae_s32)(uae_s8)src;\n"); break;
+	case sz_word: printf ("\tuae_u16 dst = (uae_s16)(uae_s8)src;\n"); break;
+	case sz_long: printf ("\tuae_u32 dst = (uae_s32)(uae_s16)src;\n"); break;
+	default: abort ();
+	}
+	genflags (flag_logical,
+		  curi->size == sz_word ? sz_word : sz_long, "dst", "", "");
+	genastore ("dst", curi->smode, "srcreg",
+		   curi->size == sz_word ? sz_word : sz_long, "src");
+	break;
+    case i_MVMEL:
+	genmovemel (opcode);
+        fill_prefetch_next ();
+	break;
+    case i_MVMLE:
+	genmovemle (opcode);
+        fill_prefetch_next ();
+	break;
+    case i_TRAP:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tException(src+32,0);\n");
+	did_prefetch = 1;
+	m68k_pc_offset = 0;
+	break;
+    case i_MVR2USP:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+        fill_prefetch_next ();
+	printf ("\tregs.usp = src;\n");
+	break;
+    case i_MVUSP2R:
+	genamode (curi->smode, "srcreg", curi->size, "src", 2, 0, 0);
+        fill_prefetch_next ();
+	genastore ("regs.usp", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_RESET:
+        fill_prefetch_next ();
+	/*printf ("\tcpureset();\n");*/
+	break;
+    case i_NOP:
+        fill_prefetch_next ();
+	break;
+    case i_STOP:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	printf ("\tregs.sr = src;\n");
+	printf ("\tMakeFromSR();\n");
+	printf ("\tm68k_setstopped(1);\n");
+	sync_m68k_pc ();
+	fill_prefetch_full ();
+	break;
+    case i_RTE:
+	if (cpu_level == 0) {
+	    genamode (Aipi, "7", sz_word, "sr", 1, 0, GF_NOREFILL);
+	    genamode (Aipi, "7", sz_long, "pc", 1, 0, GF_NOREFILL);
+	    printf ("\tregs.sr = sr; m68k_setpc (pc);\n");
+	    printf ("\tMakeFromSR();\n");
+	} else {
+	    int old_brace_level = n_braces;
+	    if (next_cpu_level < 0)
+		next_cpu_level = 0;
+	    printf ("\tuae_u16 newsr; uae_u32 newpc; for (;;) {\n");
+	    genamode (Aipi, "7", sz_word, "sr", 1, 0, 0);
+	    genamode (Aipi, "7", sz_long, "pc", 1, 0, 0);
+	    genamode (Aipi, "7", sz_word, "format", 1, 0, 0);
+	    printf ("\tnewsr = sr; newpc = pc;\n");
+	    printf ("\tif ((format & 0xF000) == 0x0000) { break; }\n");
+	    printf ("\telse if ((format & 0xF000) == 0x1000) { ; }\n");
+	    printf ("\telse if ((format & 0xF000) == 0x2000) { m68k_areg(regs, 7) += 4; break; }\n");
+	    printf ("\telse if ((format & 0xF000) == 0x8000) { m68k_areg(regs, 7) += 50; break; }\n");
+	    printf ("\telse if ((format & 0xF000) == 0x9000) { m68k_areg(regs, 7) += 12; break; }\n");
+	    printf ("\telse if ((format & 0xF000) == 0xa000) { m68k_areg(regs, 7) += 24; break; }\n");
+	    printf ("\telse if ((format & 0xF000) == 0xb000) { m68k_areg(regs, 7) += 84; break; }\n");
+	    printf ("\telse { Exception(14,0); goto %s; }\n", endlabelstr);
+	    printf ("\tregs.sr = newsr; MakeFromSR();\n}\n");
+	    pop_braces (old_brace_level);
+	    printf ("\tregs.sr = newsr; MakeFromSR();\n");
+	    printf ("\tif (newpc & 1)\n");
+	    printf ("\t\texception3 (0x%04.4X, m68k_getpc(), newpc);\n", opcode);
+	    printf ("\telse\n");
+	    printf ("\t\tm68k_setpc (newpc);\n");
+	    need_endlabel = 1;
+	}
+	/* PC is set and prefetch filled. */
+	m68k_pc_offset = 0;
+	fill_prefetch_full ();
+	break;
+    case i_RTD:
+	genamode (Aipi, "7", sz_long, "pc", 1, 0, 0);
+	genamode (curi->smode, "srcreg", curi->size, "offs", 1, 0, 0);
+	printf ("\tm68k_areg(regs, 7) += offs;\n");
+        printf ("\tif (pc & 1)\n");
+        printf ("\t\texception3 (0x%04.4X, m68k_getpc(), pc);\n", opcode);
+        printf ("\telse\n");
+	printf ("\t\tm68k_setpc (pc);\n");
+	/* PC is set and prefetch filled. */
+	m68k_pc_offset = 0;
+	fill_prefetch_full ();
+	break;
+    case i_LINK:
+	genamode (Apdi, "7", sz_long, "old", 2, 0, 0);
+	genamode (curi->smode, "srcreg", sz_long, "src", 1, 0, 0);
+	genastore ("src", Apdi, "7", sz_long, "old");
+	genastore ("m68k_areg(regs, 7)", curi->smode, "srcreg", sz_long, "src");
+	genamode (curi->dmode, "dstreg", curi->size, "offs", 1, 0, 0);
+	printf ("\tm68k_areg(regs, 7) += offs;\n");
+        fill_prefetch_next ();
+	break;
+    case i_UNLK:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	printf ("\tm68k_areg(regs, 7) = src;\n");
+	genamode (Aipi, "7", sz_long, "old", 1, 0, 0);
+        fill_prefetch_next ();
+	genastore ("old", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_RTS:
+	printf ("\tm68k_do_rts();\n");
+	m68k_pc_offset = 0;
+	fill_prefetch_full ();
+	break;
+    case i_TRAPV:
+	sync_m68k_pc ();
+	printf ("\tif (GET_VFLG) {\n");
+	printf ("\t\tException (7, m68k_getpc ());\n");
+	printf ("\t\tgoto %s;\n", endlabelstr);
+	printf ("\t}\n");
+        fill_prefetch_next ();
+	need_endlabel = 1;
+	break;
+    case i_RTR:
+	printf ("\tMakeSR();\n");
+	genamode (Aipi, "7", sz_word, "sr", 1, 0, 0);
+	genamode (Aipi, "7", sz_long, "pc", 1, 0, 0);
+	printf ("\tregs.sr &= 0xFF00; sr &= 0xFF;\n");
+	printf ("\tregs.sr |= sr; m68k_setpc(pc);\n");
+	printf ("\tMakeFromSR();\n");
+	m68k_pc_offset = 0;
+	fill_prefetch_full ();
+	break;
+    case i_JSR:
+	genamode (curi->smode, "srcreg", curi->size, "src", 0, 0, GF_AA|GF_NOREFILL);
+	start_brace ();
+	printf ("\tuaecptr oldpc = m68k_getpc() + %d;\n", m68k_pc_offset);
+	if (using_exception_3) {
+	    printf ("\tif (srca & 1) {\n");
+	    printf ("\t\texception3i (opcode, oldpc, srca);\n");
+	    printf ("\t\tgoto %s;\n", endlabelstr);
+	    printf ("\t}\n");
+	    need_endlabel = 1;
+	}
+	printf ("\tm68k_setpc (srca);\n");
+	m68k_pc_offset = 0;
+	fill_prefetch_1 (0, 0);
+        printf("\tm68k_areg (regs, 7) -= 4;\n");
+	printf("\tput_long (m68k_areg (regs, 7), oldpc);\n");
+        fill_prefetch_next ();
+	break;
+    case i_JMP:
+	genamode (curi->smode, "srcreg", curi->size, "src", 0, 0, GF_AA|GF_NOREFILL);
+	if (using_exception_3) {
+	    printf ("\tif (srca & 1) {\n");
+	    printf ("\t\texception3i (opcode, m68k_getpc() + 6, srca);\n");
+	    printf ("\t\tgoto %s;\n", endlabelstr);
+	    printf ("\t}\n");
+	    need_endlabel = 1;
+	}
+	printf ("\tm68k_setpc(srca);\n");
+	m68k_pc_offset = 0;
+	fill_prefetch_full ();
+	break;
+    case i_BSR:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA|GF_NOREFILL);
+	printf("{");
+	printf ("\tuae_s32 s = (uae_s32)src + 2;\n");
+	if (using_exception_3) {
+	    printf ("\tif (src & 1) {\n");
+	    printf ("\t\texception3i (opcode, m68k_getpc() + 2, m68k_getpc() + s);\n");
+	    printf ("\t\tgoto %s;\n", endlabelstr);
+	    printf ("\t}\n");
+	    need_endlabel = 1;
+	}
+	printf ("\tm68k_do_bsr(m68k_getpc() + %d, s);\n", m68k_pc_offset);
+	printf("}");
+	m68k_pc_offset = 0;
+	fill_prefetch_full ();
+	break;
+    case i_Bcc:
+	if (curi->size == sz_long) {
+	    if (cpu_level < 2) {
+		printf ("\tif (cctrue(%d)) {\n", curi->cc, endlabelstr);
+		printf ("\t\texception3i (opcode, m68k_getpc() + 2, m68k_getpc() + 1);\n");
+		printf ("\t\tgoto %s;\n", endlabelstr);
+		printf ("\t}\n");
+		sync_m68k_pc ();
+	        irc2ir ();
+		fill_prefetch_2 ();
+		printf ("\tgoto %s;\n", endlabelstr);
+		need_endlabel = 1;
+	    } else {
+		if (next_cpu_level < 1)
+		    next_cpu_level = 1;
+	    }
+	}
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA|GF_NOREFILL);
+	printf ("\tif (!cctrue(%d)) goto didnt_jump;\n", curi->cc);
+	if (using_exception_3) {
+	    printf ("\tif (src & 1) {\n");
+	    printf ("\t\texception3i (opcode, m68k_getpc() + 2, m68k_getpc() + 2 + (uae_s32)src);\n");
+	    printf ("\t\tgoto %s;\n", endlabelstr);
+	    printf ("\t}\n");
+	    need_endlabel = 1;
+	}
+	if (using_prefetch) {
+	    if (curi->size == sz_byte) {
+		printf ("\tm68k_incpc ((uae_s32)src + 2);\n");
+	    } else {
+		printf ("\tm68k_incpc ((uae_s32)src + 2);\n");
+	    }
+	    fill_prefetch_full ();
+	    if (using_ce)
+		printf ("\treturn;\n");
+	    else
+		printf ("\treturn 10 * %d;\n", CYCLE_UNIT / 2);
+	} else {
+	    printf ("\tm68k_incpc ((uae_s32)src + 2);\n");
+	    returncycles ("\t", 10);
+	}
+	printf ("didnt_jump:;\n");
+	need_endlabel = 1;
+	sync_m68k_pc ();
+	if (curi->size == sz_byte) {
+	    irc2ir ();
+	    fill_prefetch_2 ();
+	} else
+	    fill_prefetch_full ();
+	insn_n_cycles = curi->size == sz_byte ? 8 : 12;
+	break;
+    case i_LEA:
+	genamode (curi->smode, "srcreg", curi->size, "src", 0, 0, GF_AA);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, GF_AA);
+	if (curi->smode == Ad8r || curi->smode == PC8r)
+	    tmpc += 4;
+        fill_prefetch_next_delay (tmpc);
+	genastore ("srca", curi->dmode, "dstreg", curi->size, "dst");
+	break;
+    case i_PEA:
+	genamode (curi->smode, "srcreg", curi->size, "src", 0, 0, GF_AA);
+	genamode (Apdi, "7", sz_long, "dst", 2, 0, GF_AA);
+	if (curi->smode == Ad8r || curi->smode == PC8r)
+	    tmpc += 4;
+        fill_prefetch_next_delay (tmpc);
+	genastore ("srca", Apdi, "7", sz_long, "dst");
+	break;
+    case i_DBcc:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA|GF_NOREFILL);
+	genamode (curi->dmode, "dstreg", curi->size, "offs", 1, 0, GF_AA|GF_NOREFILL);
+
+	printf ("\tuaecptr oldpc = m68k_getpc();\n");
+	printf ("\tif (!cctrue(%d)) {\n", curi->cc);
+	printf ("\t\tm68k_incpc((uae_s32)offs + 2);\n");
+	printf ("\t"); fill_prefetch_1 (0, 0);
+	printf ("\t"); genastore ("(src-1)", curi->smode, "srcreg", curi->size, "src");
+
+	printf ("\t\tif (src) {\n");
+	if (using_exception_3) {
+	    printf ("\t\t\tif (offs & 1) {\n");
+	    printf ("\t\t\t\texception3i (opcode, m68k_getpc() + 2, m68k_getpc() + 2 + (uae_s32)offs + 2);\n");
+	    printf ("\t\t\t\tgoto %s;\n", endlabelstr);
+	    printf ("\t\t\t}\n");
+	    need_endlabel = 1;
+	}
+	irc2ir ();
+	fill_prefetch_1 (2, 0);
+	returncycles ("\t\t\t", 12);
+	printf ("\t\t}\n");
+	printf ("\t} else {\n");
+	printf ("\t}\n");
+	printf ("\tm68k_setpc (oldpc + %d);\n", m68k_pc_offset);
+	m68k_pc_offset = 0;
+	fill_prefetch_full ();
+	insn_n_cycles = 12;
+	need_endlabel = 1;
+	break;
+    case i_Scc:
+	genamode (curi->smode, "srcreg", curi->size, "src", cpu_level == 0 ? 1 : 2, 0, 0);
+	start_brace ();
+        fill_prefetch_next_cycles ();
+		printf("{");
+	printf ("\tint val = cctrue(%d) ? 0xff : 0;\n", curi->cc);
+	genastore ("val", curi->smode, "srcreg", curi->size, "src");
+	printf("}");
+	break;
+    case i_DIVU:
+	printf ("\tuaecptr oldpc = m68k_getpc();\n");
+	genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0, 0);
+        fill_prefetch_next_cycles ();
+	sync_m68k_pc ();
+	printf ("\tCLEAR_CZNV;\n");
+	printf ("\tif (src == 0) {\n");
+	if (cpu_level > 0) {
+	    /* 68020 sets V when dividing by zero and N if dst is negative
+	     * 68000 clears both
+	     */
+	    printf("\t\tSET_VFLG (1);\n");
+	    printf("\t\tif (dst < 0) SET_NFLG (1);\n");
+	}	
+	printf ("\t\tException (5, oldpc);\n");
+	printf ("\t\tgoto %s;\n", endlabelstr);
+	printf ("\t} else {\n");
+	printf ("\t\tuae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src;\n");
+	printf ("\t\tuae_u32 rem = (uae_u32)dst %% (uae_u32)(uae_u16)src;\n");
+	if (using_ce) {
+	    printf ("\t\tint cycles = 138 * %d - lostcycles;\n", CYCLE_UNIT / 2);
+	}
+	/* The N flag appears to be set each time there is an overflow.
+	 * Weird. but 68020 only sets N when dst is negative.. */
+	printf ("\t\tif (newv > 0xffff) {\n");
+	printf ("\t\t\tSET_VFLG (1);\n");
+#ifdef UNDEF68020
+	if (cpu_level >= 2)
+	    printf ("\t\t\tif (currprefs.cpu_level == 0 || dst < 0) SET_NFLG (1);\n");
+	else /* ??? some 68000 revisions may not set NFLG when overflow happens.. */
+#endif
+	    printf ("\t\t\tSET_NFLG (1);\n");
+	printf ("\t\t} else {\n");
+	printf ("\t\t"); genflags (flag_logical, sz_word, "newv", "", "");
+	printf ("\t\t\tnewv = (newv & 0xffff) | ((uae_u32)rem << 16);\n");
+	printf ("\t\t"); genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
+	printf ("\t\t}\n");
+	printf ("\t}\n");
+	insn_n_cycles += 136;
+	need_endlabel = 1;
+	break;
+    case i_DIVS:
+	printf ("\tuaecptr oldpc = m68k_getpc();\n");
+	genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	sync_m68k_pc ();
+	printf ("\tCLEAR_CZNV;\n");
+	printf ("\tif (src == 0) {\n");
+	if (cpu_level > 0) {
+	    /* 68020 sets V when dividing by zero. Z is also set.
+	     * 68000 clears both
+	     */
+	    printf("\t\tSET_VFLG (1);\n");
+	    printf("\t\tSET_ZFLG (1);\n");
+	}
+	printf ("\t\tException (5, oldpc);\n");
+	printf ("\t\tgoto %s;\n", endlabelstr);
+	printf ("\t} else {\n");
+	printf ("\t\tuae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src;\n");
+	printf ("\t\tuae_u16 rem = (uae_s32)dst %% (uae_s32)(uae_s16)src;\n");
+	if (using_ce) {
+	    printf ("\t\tint cycles = 156 * %d - lostcycles;\n", CYCLE_UNIT / 2);
+	}
+	printf ("\t\tif ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) {\n");
+	printf ("\t\t\tSET_VFLG (1);\n");
+#ifdef UNDEF68020
+	if (cpu_level > 0)
+	    printf ("\t\t\tif (currprefs.cpu_level == 0) SET_NFLG (1);\n");
+	else
+#endif
+	    printf ("\t\t\tSET_NFLG (1);\n");
+	printf ("\t\t} else {\n");
+	printf ("\t\t\tif (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem;\n");
+	genflags (flag_logical, sz_word, "newv", "", "");
+	printf ("\t\t\tnewv = (newv & 0xffff) | ((uae_u32)rem << 16);\n");
+	printf ("\t\t"); genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
+	printf ("\t\t}\n");
+	printf ("\t}\n");
+	insn_n_cycles += 154;
+	need_endlabel = 1;
+	break;
+    case i_MULU:
+	genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_word, "dst", 1, 0, 0);
+        fill_prefetch_next_cycles ();
+	start_brace ();
+	printf ("\tuae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src;\n");
+	genflags (flag_logical, sz_long, "newv", "", "");
+	genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
+	sync_m68k_pc ();
+	insn_n_cycles += 66;
+	break;
+    case i_MULS:
+	genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_word, "dst", 1, 0, 0);
+        fill_prefetch_next_cycles ();
+	start_brace ();
+	printf ("\tuae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src;\n");
+	genflags (flag_logical, sz_long, "newv", "", "");
+	genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
+	insn_n_cycles += 66;
+	break;
+    case i_CHK:
+	printf ("\tuaecptr oldpc = m68k_getpc();\n");
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	sync_m68k_pc ();
+        fill_prefetch_next_delay (6);
+	printf ("\tSET_ZFLG (!dst);\n");
+	printf ("\tSET_CFLG (0);\n");
+	printf ("\tSET_VFLG (0);\n");
+	printf ("\tif ((uae_s32)dst < 0) {\n");
+	printf ("\t\tSET_NFLG (1);\n");
+	printf ("\t\tException (6, oldpc);\n");
+	printf ("\t\tgoto %s;\n", endlabelstr);
+	printf ("\t} else if (dst > src) {\n");
+	printf ("\t\tSET_NFLG (0);\n");
+	printf ("\t\tException (6, oldpc);\n");
+	printf ("\t\tgoto %s;\n", endlabelstr);
+	printf ("\t}\n");
+	need_endlabel = 1;
+	break;
+
+    case i_CHK2:
+	printf ("\tuaecptr oldpc = m68k_getpc();\n");
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, 0);
+        fill_prefetch_0 ();
+	printf ("\t{uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15];\n");
+	switch (curi->size) {
+	case sz_byte:
+	    printf ("\tlower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1);\n");
+	    printf ("\tif ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg;\n");
+	    break;
+	case sz_word:
+	    printf ("\tlower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2);\n");
+	    printf ("\tif ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg;\n");
+	    break;
+	case sz_long:
+	    printf ("\tlower=get_long(dsta); upper = get_long(dsta+4);\n");
+	    break;
+	default:
+	    abort ();
+	}
+	printf ("\tSET_ZFLG (upper == reg || lower == reg);\n");
+	printf ("\tSET_CFLG (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower);\n");
+	printf ("\tif ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto %s; }\n}\n", endlabelstr);
+	need_endlabel = 1;
+	break;
+
+    case i_ASR:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 sign = (%s & val) >> %d;\n", cmask (curi->size), bit_size (curi->size) - 1);
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	printf ("\tif (cnt >= %d) {\n", bit_size (curi->size));
+	printf ("\t\tval = %s & (uae_u32)-sign;\n", bit_mask (curi->size));
+	printf ("\t\tSET_CFLG (sign);\n");
+	duplicate_carry (0);
+	if (source_is_imm1_8 (curi))
+	    printf ("\t} else {\n");
+	else
+	    printf ("\t} else if (cnt > 0) {\n");
+	printf ("\t\tval >>= cnt - 1;\n");
+	printf ("\t\tSET_CFLG (val & 1);\n");
+	duplicate_carry (0);
+	printf ("\t\tval >>= 1;\n");
+	printf ("\t\tval |= (%s << (%d - cnt)) & (uae_u32)-sign;\n",
+		bit_mask (curi->size),
+		bit_size (curi->size));
+	printf ("\t\tval &= %s;\n", bit_mask (curi->size));
+	printf ("\t}\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_ASL:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	printf ("\tif (cnt >= %d) {\n", bit_size (curi->size));
+	printf ("\t\tSET_VFLG (val != 0);\n");
+	printf ("\t\tSET_CFLG (cnt == %d ? val & 1 : 0);\n",
+		bit_size (curi->size));
+	duplicate_carry (0);
+	printf ("\t\tval = 0;\n");
+	if (source_is_imm1_8 (curi))
+	    printf ("\t} else {\n");
+	else
+	    printf ("\t} else if (cnt > 0) {\n");
+	printf ("\t\tuae_u32 mask = (%s << (%d - cnt)) & %s;\n",
+		bit_mask (curi->size),
+		bit_size (curi->size) - 1,
+		bit_mask (curi->size));
+	printf ("\t\tSET_VFLG ((val & mask) != mask && (val & mask) != 0);\n");
+	printf ("\t\tval <<= cnt - 1;\n");
+	printf ("\t\tSET_CFLG ((val & %s) >> %d);\n", cmask (curi->size), bit_size (curi->size) - 1);
+	duplicate_carry (0);
+	printf ("\t\tval <<= 1;\n");
+	printf ("\t\tval &= %s;\n", bit_mask (curi->size));
+	printf ("\t}\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_LSR:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	printf ("\tif (cnt >= %d) {\n", bit_size (curi->size));
+	printf ("\t\tSET_CFLG ((cnt == %d) & (val >> %d));\n",
+		bit_size (curi->size), bit_size (curi->size) - 1);
+	duplicate_carry (0);
+	printf ("\t\tval = 0;\n");
+	if (source_is_imm1_8 (curi))
+	    printf ("\t} else {\n");
+	else
+	    printf ("\t} else if (cnt > 0) {\n");
+	printf ("\t\tval >>= cnt - 1;\n");
+	printf ("\t\tSET_CFLG (val & 1);\n");
+	duplicate_carry (0);
+	printf ("\t\tval >>= 1;\n");
+	printf ("\t}\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_LSL:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	printf ("\tif (cnt >= %d) {\n", bit_size (curi->size));
+	printf ("\t\tSET_CFLG (cnt == %d ? val & 1 : 0);\n",
+		bit_size (curi->size));
+	duplicate_carry (0);
+	printf ("\t\tval = 0;\n");
+	if (source_is_imm1_8 (curi))
+	    printf ("\t} else {\n");
+	else
+	    printf ("\t} else if (cnt > 0) {\n");
+	printf ("\t\tval <<= (cnt - 1);\n");
+	printf ("\t\tSET_CFLG ((val & %s) >> %d);\n", cmask (curi->size), bit_size (curi->size) - 1);
+	duplicate_carry (0);
+	printf ("\t\tval <<= 1;\n");
+	printf ("\tval &= %s;\n", bit_mask (curi->size));
+	printf ("\t}\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_ROL:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	if (source_is_imm1_8 (curi))
+	    printf ("{");
+	else
+	    printf ("\tif (cnt > 0) {\n");
+	printf ("\tuae_u32 loval;\n");
+	printf ("\tcnt &= %d;\n", bit_size (curi->size) - 1);
+	printf ("\tloval = val >> (%d - cnt);\n", bit_size (curi->size));
+	printf ("\tval <<= cnt;\n");
+	printf ("\tval |= loval;\n");
+	printf ("\tval &= %s;\n", bit_mask (curi->size));
+	printf ("\tSET_CFLG (val & 1);\n");
+	printf ("}\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_ROR:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	if (source_is_imm1_8 (curi))
+	    printf ("{");
+	else
+	    printf ("\tif (cnt > 0) {");
+	printf ("\tuae_u32 hival;\n");
+	printf ("\tcnt &= %d;\n", bit_size (curi->size) - 1);
+	printf ("\thival = val << (%d - cnt);\n", bit_size (curi->size));
+	printf ("\tval >>= cnt;\n");
+	printf ("\tval |= hival;\n");
+	printf ("\tval &= %s;\n", bit_mask (curi->size));
+	printf ("\tSET_CFLG ((val & %s) >> %d);\n", cmask (curi->size), bit_size (curi->size) - 1);
+	printf ("\t}\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_ROXL:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	if (source_is_imm1_8 (curi))
+	    printf ("{");
+	else {
+	    force_range_for_rox ("cnt", curi->size);
+	    printf ("\tif (cnt > 0) {\n");
+	}
+	printf ("\tcnt--;\n");
+	printf ("\t{\n\tuae_u32 carry;\n");
+	printf ("\tuae_u32 loval = val >> (%d - cnt);\n", bit_size (curi->size) - 1);
+	printf ("\tcarry = loval & 1;\n");
+	printf ("\tval = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1);\n");
+	printf ("\tSET_XFLG (carry);\n");
+	printf ("\tval &= %s;\n", bit_mask (curi->size));
+	printf ("\t} }\n");
+	printf ("\tSET_CFLG (GET_XFLG);\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_ROXR:
+	genamode (curi->smode, "srcreg", curi->size, "cnt", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next_cycles ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tcnt &= 63;\n");
+	printf ("\tCLEAR_CZNV;\n");
+	if (source_is_imm1_8 (curi))
+	    printf ("{");
+	else {
+	    force_range_for_rox ("cnt", curi->size);
+	    printf ("\tif (cnt > 0) {\n");
+	}
+	printf ("\tcnt--;\n");
+	printf ("\t{\n\tuae_u32 carry;\n");
+	printf ("\tuae_u32 hival = (val << 1) | GET_XFLG;\n");
+	printf ("\thival <<= (%d - cnt);\n", bit_size (curi->size) - 1);
+	printf ("\tval >>= cnt;\n");
+	printf ("\tcarry = val & 1;\n");
+	printf ("\tval >>= 1;\n");
+	printf ("\tval |= hival;\n");
+	printf ("\tSET_XFLG (carry);\n");
+	printf ("\tval &= %s;\n", bit_mask (curi->size));
+	printf ("\t} }\n");
+	printf ("\tSET_CFLG (GET_XFLG);\n");
+	genflags (flag_logical_noclobber, curi->size, "val", "", "");
+	genastore ("val", curi->dmode, "dstreg", curi->size, "data");
+	break;
+    case i_ASRW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 sign = %s & val;\n", cmask (curi->size));
+	printf ("\tuae_u32 cflg = val & 1;\n");
+	printf ("\tval = (val >> 1) | sign;\n");
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("\tSET_CFLG (cflg);\n");
+	duplicate_carry (0);
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_ASLW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 sign = %s & val;\n", cmask (curi->size));
+	printf ("\tuae_u32 sign2;\n");
+	printf ("\tval <<= 1;\n");
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("\tsign2 = %s & val;\n", cmask (curi->size));
+	printf ("\tSET_CFLG (sign != 0);\n");
+	duplicate_carry (0);
+
+	printf ("\tSET_VFLG (GET_VFLG | (sign2 != sign));\n");
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_LSRW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u32 val = (uae_u8)data;\n"); break;
+	case sz_word: printf ("\tuae_u32 val = (uae_u16)data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 carry = val & 1;\n");
+	printf ("\tval >>= 1;\n");
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("SET_CFLG (carry);\n");
+	duplicate_carry (0);
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_LSLW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u8 val = data;\n"); break;
+	case sz_word: printf ("\tuae_u16 val = data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 carry = val & %s;\n", cmask (curi->size));
+	printf ("\tval <<= 1;\n");
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("SET_CFLG (carry >> %d);\n", bit_size (curi->size) - 1);
+	duplicate_carry (0);
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_ROLW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u8 val = data;\n"); break;
+	case sz_word: printf ("\tuae_u16 val = data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 carry = val & %s;\n", cmask (curi->size));
+	printf ("\tval <<= 1;\n");
+	printf ("\tif (carry)  val |= 1;\n");
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("SET_CFLG (carry >> %d);\n", bit_size (curi->size) - 1);
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_RORW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u8 val = data;\n"); break;
+	case sz_word: printf ("\tuae_u16 val = data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 carry = val & 1;\n");
+	printf ("\tval >>= 1;\n");
+	printf ("\tif (carry) val |= %s;\n", cmask (curi->size));
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("SET_CFLG (carry);\n");
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_ROXLW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u8 val = data;\n"); break;
+	case sz_word: printf ("\tuae_u16 val = data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 carry = val & %s;\n", cmask (curi->size));
+	printf ("\tval <<= 1;\n");
+	printf ("\tif (GET_XFLG) val |= 1;\n");
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("SET_CFLG (carry >> %d);\n", bit_size (curi->size) - 1);
+	duplicate_carry (0);
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_ROXRW:
+	genamode (curi->smode, "srcreg", curi->size, "data", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	switch (curi->size) {
+	case sz_byte: printf ("\tuae_u8 val = data;\n"); break;
+	case sz_word: printf ("\tuae_u16 val = data;\n"); break;
+	case sz_long: printf ("\tuae_u32 val = data;\n"); break;
+	default: abort ();
+	}
+	printf ("\tuae_u32 carry = val & 1;\n");
+	printf ("\tval >>= 1;\n");
+	printf ("\tif (GET_XFLG) val |= %s;\n", cmask (curi->size));
+	genflags (flag_logical, curi->size, "val", "", "");
+	printf ("SET_CFLG (carry);\n");
+	duplicate_carry (0);
+	genastore ("val", curi->smode, "srcreg", curi->size, "data");
+	break;
+    case i_MOVEC2:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	printf ("\tint regno = (src >> 12) & 15;\n");
+	printf ("\tuae_u32 *regp = regs.regs + regno;\n");
+	printf ("\tif (! m68k_movec2(src & 0xFFF, regp)) goto %s;\n", endlabelstr);
+	break;
+    case i_MOVE2C:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	fill_prefetch_next ();
+	start_brace ();
+	printf ("\tint regno = (src >> 12) & 15;\n");
+	printf ("\tuae_u32 *regp = regs.regs + regno;\n");
+	printf ("\tif (! m68k_move2c(src & 0xFFF, regp)) goto %s;\n", endlabelstr);
+	break;
+    case i_CAS:
+    {
+	int old_brace_level;
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	fill_prefetch_0 ();
+	start_brace ();
+	printf ("\tint ru = (src >> 6) & 7;\n");
+	printf ("\tint rc = src & 7;\n");
+	genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, rc)", "dst");
+	printf ("\tif (GET_ZFLG)");
+	old_brace_level = n_braces;
+	start_brace ();
+	genastore ("(m68k_dreg(regs, ru))", curi->dmode, "dstreg", curi->size, "dst");
+	pop_braces (old_brace_level);
+	printf ("else");
+	start_brace ();
+	printf ("m68k_dreg(regs, rc) = dst;\n");
+	pop_braces (old_brace_level);
+    }
+    break;
+    case i_CAS2:
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	printf ("\tuae_u32 rn1 = regs.regs[(extra >> 28) & 15];\n");
+	printf ("\tuae_u32 rn2 = regs.regs[(extra >> 12) & 15];\n");
+	if (curi->size == sz_word) {
+	    int old_brace_level = n_braces;
+	    printf ("\tuae_u16 dst1 = get_word(rn1), dst2 = get_word(rn2);\n");
+	    genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, (extra >> 16) & 7)", "dst1");
+	    printf ("\tif (GET_ZFLG) {\n");
+	    genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, extra & 7)", "dst2");
+	    printf ("\tif (GET_ZFLG) {\n");
+	    printf ("\tput_word(rn1, m68k_dreg(regs, (extra >> 22) & 7));\n");
+	    printf ("\tput_word(rn1, m68k_dreg(regs, (extra >> 6) & 7));\n");
+	    printf ("\t}}\n");
+	    pop_braces (old_brace_level);
+	    printf ("\tif (! GET_ZFLG) {\n");
+	    printf ("\tm68k_dreg(regs, (extra >> 22) & 7) = (m68k_dreg(regs, (extra >> 22) & 7) & ~0xffff) | (dst1 & 0xffff);\n");
+	    printf ("\tm68k_dreg(regs, (extra >> 6) & 7) = (m68k_dreg(regs, (extra >> 6) & 7) & ~0xffff) | (dst2 & 0xffff);\n");
+	    printf ("\t}\n");
+	} else {
+	    int old_brace_level = n_braces;
+	    printf ("\tuae_u32 dst1 = get_long(rn1), dst2 = get_long(rn2);\n");
+	    genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, (extra >> 16) & 7)", "dst1");
+	    printf ("\tif (GET_ZFLG) {\n");
+	    genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, extra & 7)", "dst2");
+	    printf ("\tif (GET_ZFLG) {\n");
+	    printf ("\tput_long(rn1, m68k_dreg(regs, (extra >> 22) & 7));\n");
+	    printf ("\tput_long(rn1, m68k_dreg(regs, (extra >> 6) & 7));\n");
+	    printf ("\t}}\n");
+	    pop_braces (old_brace_level);
+	    printf ("\tif (! GET_ZFLG) {\n");
+	    printf ("\tm68k_dreg(regs, (extra >> 22) & 7) = dst1;\n");
+	    printf ("\tm68k_dreg(regs, (extra >> 6) & 7) = dst2;\n");
+	    printf ("\t}\n");
+	}
+	break;
+    case i_MOVES:		/* ignore DFC and SFC because we have no MMU */
+    {
+	int old_brace_level;
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	printf ("\tif (extra & 0x800)\n");
+	old_brace_level = n_braces;
+	start_brace ();
+	printf ("\tuae_u32 src = regs.regs[(extra >> 12) & 15];\n");
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, 0);
+	genastore ("src", curi->dmode, "dstreg", curi->size, "dst");
+	pop_braces (old_brace_level);
+	printf ("else");
+	start_brace ();
+	genamode (curi->dmode, "dstreg", curi->size, "src", 1, 0, 0);
+	printf ("\tif (extra & 0x8000) {\n");
+	switch (curi->size) {
+	case sz_byte: printf ("\tm68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src;\n"); break;
+	case sz_word: printf ("\tm68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src;\n"); break;
+	case sz_long: printf ("\tm68k_areg(regs, (extra >> 12) & 7) = src;\n"); break;
+	default: abort ();
+	}
+	printf ("\t} else {\n");
+	genastore ("src", Dreg, "(extra >> 12) & 7", curi->size, "");
+	printf ("\t}\n");
+	pop_braces (old_brace_level);
+    }
+    break;
+    case i_BKPT:		/* only needed for hardware emulators */
+	sync_m68k_pc ();
+	printf ("\top_illg(opcode);\n");
+	break;
+    case i_CALLM:		/* not present in 68030 */
+	sync_m68k_pc ();
+	printf ("\top_illg(opcode);\n");
+	break;
+    case i_RTM:		/* not present in 68030 */
+	sync_m68k_pc ();
+	printf ("\top_illg(opcode);\n");
+	break;
+    case i_TRAPcc:
+	if (curi->smode != am_unknown && curi->smode != am_illg)
+	    genamode (curi->smode, "srcreg", curi->size, "dummy", 1, 0, 0);
+	fill_prefetch_0 ();
+	printf ("\tif (cctrue(%d)) { Exception(7,m68k_getpc()); goto %s; }\n", curi->cc, endlabelstr);
+	need_endlabel = 1;
+	break;
+    case i_DIVL:
+	sync_m68k_pc ();
+	start_brace ();
+	printf ("\tuaecptr oldpc = m68k_getpc();\n");
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tm68k_divl(opcode, dst, extra, oldpc);\n");
+	break;
+    case i_MULL:
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tm68k_mull(opcode, dst, extra);\n");
+	break;
+    case i_BFTST:
+    case i_BFEXTU:
+    case i_BFCHG:
+    case i_BFEXTS:
+    case i_BFCLR:
+    case i_BFFFO:
+    case i_BFSET:
+    case i_BFINS:
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	genamode (curi->dmode, "dstreg", sz_long, "dst", 2, 0, 0);
+	start_brace ();
+	printf ("\tuae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f;\n");
+	printf ("\tint width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1;\n");
+	if (curi->dmode == Dreg) {
+	    printf ("\tuae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f);\n");
+	} else {
+	    printf ("\tuae_u32 tmp,bf0,bf1;\n");
+	    printf ("\tdsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0);\n");
+	    printf ("\tbf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff;\n");
+	    printf ("\ttmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7)));\n");
+	}
+	printf ("\ttmp >>= (32 - width);\n");
+	printf ("\tSET_NFLG (tmp & (1 << (width-1)) ? 1 : 0);\n");
+	printf ("\tSET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0);\n");
+	switch (curi->mnemo) {
+	case i_BFTST:
+	    break;
+	case i_BFEXTU:
+	    printf ("\tm68k_dreg(regs, (extra >> 12) & 7) = tmp;\n");
+	    break;
+	case i_BFCHG:
+	    printf ("\ttmp = ~tmp;\n");
+	    break;
+	case i_BFEXTS:
+	    printf ("\tif (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width);\n");
+	    printf ("\tm68k_dreg(regs, (extra >> 12) & 7) = tmp;\n");
+	    break;
+	case i_BFCLR:
+	    printf ("\ttmp = 0;\n");
+	    break;
+	case i_BFFFO:
+	    printf ("\t{ uae_u32 mask = 1 << (width-1);\n");
+	    printf ("\twhile (mask) { if (tmp & mask) break; mask >>= 1; offset++; }}\n");
+	    printf ("\tm68k_dreg(regs, (extra >> 12) & 7) = offset;\n");
+	    break;
+	case i_BFSET:
+	    printf ("\ttmp = 0xffffffff;\n");
+	    break;
+	case i_BFINS:
+	    printf ("\ttmp = m68k_dreg(regs, (extra >> 12) & 7);\n");
+	    printf ("\tSET_NFLG (tmp & (1 << (width - 1)) ? 1 : 0);\n");
+	    printf ("\tSET_ZFLG (tmp == 0);\n");
+	    break;
+	default:
+	    break;
+	}
+	if (curi->mnemo == i_BFCHG
+	    || curi->mnemo == i_BFCLR
+	    || curi->mnemo == i_BFSET
+	    || curi->mnemo == i_BFINS)
+	    {
+		printf ("\ttmp <<= (32 - width);\n");
+		if (curi->dmode == Dreg) {
+		    printf ("\tm68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 :\n");
+		    printf ("\t\t(0xffffffff << (32 - (offset & 0x1f))))) |\n");
+		    printf ("\t\t(tmp >> (offset & 0x1f)) |\n");
+		    printf ("\t\t(((offset & 0x1f) + width) >= 32 ? 0 :\n");
+		    printf (" (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width))));\n");
+		} else {
+		    printf ("\tbf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) |\n");
+		    printf ("\t\t(tmp >> (offset & 7)) |\n");
+		    printf ("\t\t(((offset & 7) + width) >= 32 ? 0 :\n");
+		    printf ("\t\t (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width))));\n");
+		    printf ("\tput_long(dsta,bf0 );\n");
+		    printf ("\tif (((offset & 7) + width) > 32) {\n");
+		    printf ("\t\tbf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) |\n");
+		    printf ("\t\t\t(tmp << (8 - (offset & 7)));\n");
+		    printf ("\t\tput_byte(dsta+4,bf1);\n");
+		    printf ("\t}\n");
+		}
+	    }
+	break;
+    case i_PACK:
+	if (curi->smode == Dreg) {
+	    printf ("\tuae_u16 val = m68k_dreg(regs, srcreg) + %s;\n", gen_nextiword (0));
+	    printf ("\tm68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffffff00) | ((val >> 4) & 0xf0) | (val & 0xf);\n");
+	} else {
+	    printf ("\tuae_u16 val;\n");
+	    printf ("\tm68k_areg(regs, srcreg) -= areg_byteinc[srcreg];\n");
+	    printf ("\tval = (uae_u16)get_byte(m68k_areg(regs, srcreg));\n");
+	    printf ("\tm68k_areg(regs, srcreg) -= areg_byteinc[srcreg];\n");
+	    printf ("\tval = (val | ((uae_u16)get_byte(m68k_areg(regs, srcreg)) << 8)) + %s;\n", gen_nextiword (0));
+	    printf ("\tm68k_areg(regs, dstreg) -= areg_byteinc[dstreg];\n");
+	    printf ("\tput_byte(m68k_areg(regs, dstreg),((val >> 4) & 0xf0) | (val & 0xf));\n");
+	}
+	break;
+    case i_UNPK:
+	if (curi->smode == Dreg) {
+	    printf ("\tuae_u16 val = m68k_dreg(regs, srcreg);\n");
+	    printf ("\tval = (((val << 4) & 0xf00) | (val & 0xf)) + %s;\n", gen_nextiword (0));
+	    printf ("\tm68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffff0000) | (val & 0xffff);\n");
+	} else {
+	    printf ("\tuae_u16 val;\n");
+	    printf ("\tm68k_areg(regs, srcreg) -= areg_byteinc[srcreg];\n");
+	    printf ("\tval = (uae_u16)get_byte(m68k_areg(regs, srcreg));\n");
+	    printf ("\tval = (((val << 4) & 0xf00) | (val & 0xf)) + %s;\n", gen_nextiword (0));
+	    printf ("\tm68k_areg(regs, dstreg) -= areg_byteinc[dstreg];\n");
+	    printf ("\tput_byte(m68k_areg(regs, dstreg),val);\n");
+	    printf ("\tm68k_areg(regs, dstreg) -= areg_byteinc[dstreg];\n");
+	    printf ("\tput_byte(m68k_areg(regs, dstreg),val >> 8);\n");
+	}
+	break;
+    case i_TAS:
+	genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
+	genflags (flag_logical, curi->size, "src", "", "");
+	if (!isreg (curi->smode))
+	    tmpc += 2;
+        fill_prefetch_next_delay (tmpc);
+	printf ("\tsrc |= 0x80;\n");
+	genastore ("src", curi->smode, "srcreg", curi->size, "src");
+	break;
+    case i_FPP:
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tfpp_opp(opcode,extra);\n");
+	break;
+    case i_FDBcc:
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tfdbcc_opp(opcode,extra);\n");
+	break;
+    case i_FScc:
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tfscc_opp(opcode,extra);\n");
+	break;
+    case i_FTRAPcc:
+	sync_m68k_pc ();
+	start_brace ();
+	printf ("\tuaecptr oldpc = m68k_getpc();\n");
+	if (curi->smode != am_unknown && curi->smode != am_illg)
+	    genamode (curi->smode, "srcreg", curi->size, "dummy", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tftrapcc_opp(opcode,oldpc);\n");
+	break;
+    case i_FBcc:
+	sync_m68k_pc ();
+	start_brace ();
+	printf ("\tuaecptr pc = m68k_getpc();\n");
+	genamode (curi->dmode, "srcreg", curi->size, "extra", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tfbcc_opp(opcode,pc,extra);\n");
+	break;
+    case i_FSAVE:
+	sync_m68k_pc ();
+	printf ("\tfsave_opp(opcode);\n");
+	break;
+    case i_FRESTORE:
+	sync_m68k_pc ();
+	printf ("\tfrestore_opp(opcode);\n");
+	break;
+
+     case i_CINVL:
+     case i_CINVP:
+     case i_CINVA:
+     case i_CPUSHL:
+     case i_CPUSHP:
+     case i_CPUSHA:
+	break;
+     case i_MOVE16:
+	 if ((opcode & 0xfff8) == 0xf620) {
+	     /* MOVE16 (Ax)+,(Ay)+ */
+	     printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15, memd;\n");
+	     printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword (0));
+	     printf ("\tmemd = m68k_areg(regs, dstreg) & ~15;\n");
+	     printf ("\tput_long(memd, get_long(mems));\n");
+	     printf ("\tput_long(memd+4, get_long(mems+4));\n");
+	     printf ("\tput_long(memd+8, get_long(mems+8));\n");
+	     printf ("\tput_long(memd+12, get_long(mems+12));\n");
+	     printf ("\tif (srcreg != dstreg)\n");
+	     printf ("\tm68k_areg(regs, srcreg) += 16;\n");
+	     printf ("\tm68k_areg(regs, dstreg) += 16;\n");
+	 } else {
+	     /* Other variants */
+	     genamode (curi->smode, "srcreg", curi->size, "mems", 0, 2, 0);
+	     genamode (curi->dmode, "dstreg", curi->size, "memd", 0, 2, 0);
+	     printf ("\tmemsa &= ~15;\n");
+	     printf ("\tmemda &= ~15;\n");
+	     printf ("\tput_long(memda, get_long(memsa));\n");
+	     printf ("\tput_long(memda+4, get_long(memsa+4));\n");
+	     printf ("\tput_long(memda+8, get_long(memsa+8));\n");
+	     printf ("\tput_long(memda+12, get_long(memsa+12));\n");
+	     if ((opcode & 0xfff8) == 0xf600)
+                 printf ("\tm68k_areg(regs, srcreg) += 16;\n");
+	     else if ((opcode & 0xfff8) == 0xf608)
+		 printf ("\tm68k_areg(regs, dstreg) += 16;\n");
+	 }
+	 break;
+
+    case i_MMUOP:
+	genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
+	sync_m68k_pc ();
+	printf ("\tmmu_op(opcode,extra);\n");
+	break;
+    default:
+	abort ();
+	break;
+    }
+    finish_braces ();
+    fill_prefetch_finish ();
+    sync_m68k_pc ();
+    did_prefetch = 0;
+}
+
+static void generate_includes (FILE * f)
+{
+    fprintf (f, "#include <stdlib.h>\n");
+    fprintf (f, "#include \"sysdeps.h\"\n");
+    fprintf (f, "#include \"uconfig.h\"\n");
+    fprintf (f, "#include \"options.h\"\n");
+    fprintf (f, "#include \"memory.h\"\n");
+/*    fprintf (f, "#include \"custom.h\"\n");*/
+    fprintf (f, "#include \"newcpu.h\"\n");
+    fprintf (f, "#include \"cpu_prefetch.h\"\n");
+    fprintf (f, "#include \"cputbl.h\"\n");
+    
+    fprintf (f, "#define CPUFUNC(x) x##_ff\n"
+	     "#ifdef NOFLAGS\n"
+	     "#include \"noflags.h\"\n"
+	     "#endif\n");
+}
+
+static int postfix;
+
+static void generate_one_opcode (int rp)
+{
+    int i;
+    uae_u16 smsk, dmsk;
+    long int opcode = opcode_map[rp];
+
+    if (table68k[opcode].mnemo == i_ILLG
+	|| table68k[opcode].clev > cpu_level)
+	return;
+
+    for (i = 0; lookuptab[i].name[0]; i++) {
+	if (table68k[opcode].mnemo == lookuptab[i].mnemo)
+	    break;
+    }
+
+    if (table68k[opcode].handler != -1)
+	return;
+
+    if (opcode_next_clev[rp] != cpu_level) {
+	fprintf (stblfile, "{ CPUFUNC(op_%lx_%d), 0, %ld }, /* %s */\n", opcode, opcode_last_postfix[rp],
+		 opcode, lookuptab[i].name);
+	return;
+    }
+    fprintf (stblfile, "{ CPUFUNC(op_%lx_%d), 0, %ld }, /* %s */\n", opcode, postfix, opcode, lookuptab[i].name);
+    fprintf (headerfile, "extern cpuop_func op_%lx_%d_nf;\n", opcode, postfix);
+    fprintf (headerfile, "extern cpuop_func op_%lx_%d_ff;\n", opcode, postfix);
+    printf ("unsigned long REGPARAM2 CPUFUNC(op_%lx_%d)(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name);
+
+    switch (table68k[opcode].stype) {
+    case 0: smsk = 7; break;
+    case 1: smsk = 255; break;
+    case 2: smsk = 15; break;
+    case 3: smsk = 7; break;
+    case 4: smsk = 7; break;
+    case 5: smsk = 63; break;
+    case 7: smsk = 3; break;
+    default: abort ();
+    }
+    dmsk = 7;
+
+    next_cpu_level = -1;
+    if (table68k[opcode].suse
+	&& table68k[opcode].smode != imm && table68k[opcode].smode != imm0
+	&& table68k[opcode].smode != imm1 && table68k[opcode].smode != imm2
+	&& table68k[opcode].smode != absw && table68k[opcode].smode != absl
+	&& table68k[opcode].smode != PC8r && table68k[opcode].smode != PC16)
+    {
+	if (table68k[opcode].spos == -1) {
+	    if (((int) table68k[opcode].sreg) >= 128)
+		printf ("\tuae_u32 srcreg = (uae_s32)(uae_s8)%d;\n", (int) table68k[opcode].sreg);
+	    else
+		printf ("\tuae_u32 srcreg = %d;\n", (int) table68k[opcode].sreg);
+	} else {
+	    char source[100];
+	    int pos = table68k[opcode].spos;
+
+	    if (pos)
+		sprintf (source, "((opcode >> %d) & %d)", pos, smsk);
+	    else
+		sprintf (source, "(opcode & %d)", smsk);
+
+	    if (table68k[opcode].stype == 3)
+		printf ("\tuae_u32 srcreg = imm8_table[%s];\n", source);
+	    else if (table68k[opcode].stype == 1)
+		printf ("\tuae_u32 srcreg = (uae_s32)(uae_s8)%s;\n", source);
+	    else
+		printf ("\tuae_u32 srcreg = %s;\n", source);
+	}
+    }
+    if (table68k[opcode].duse
+	/* Yes, the dmode can be imm, in case of LINK or DBcc */
+	&& table68k[opcode].dmode != imm && table68k[opcode].dmode != imm0
+	&& table68k[opcode].dmode != imm1 && table68k[opcode].dmode != imm2
+	&& table68k[opcode].dmode != absw && table68k[opcode].dmode != absl)
+    {
+	if (table68k[opcode].dpos == -1) {
+	    if (((int) table68k[opcode].dreg) >= 128)
+		printf ("\tuae_u32 dstreg = (uae_s32)(uae_s8)%d;\n", (int) table68k[opcode].dreg);
+	    else
+		printf ("\tuae_u32 dstreg = %d;\n", (int) table68k[opcode].dreg);
+	} else {
+	    int pos = table68k[opcode].dpos;
+#if 0
+	    /* Check that we can do the little endian optimization safely.  */
+	    if (pos < 8 && (dmsk >> (8 - pos)) != 0)
+		abort ();
+#endif	    
+	    if (pos)
+		printf ("\tuae_u32 dstreg = (opcode >> %d) & %d;\n",
+			pos, dmsk);
+	    else
+		printf ("\tuae_u32 dstreg = opcode & %d;\n", dmsk);
+	}
+    }
+    need_endlabel = 0;
+    endlabelno++;
+    sprintf (endlabelstr, "endlabel%d", endlabelno);
+    gen_opcode (opcode);
+    if (need_endlabel)
+	printf ("%s: ;\n", endlabelstr);
+    printf ("return %d;\n", insn_n_cycles * CYCLE_UNIT / 2);
+    printf ("}\n");
+    opcode_next_clev[rp] = next_cpu_level;
+    opcode_last_postfix[rp] = postfix;
+}
+
+static void generate_func (void)
+{
+    int i, j, rp;
+
+    using_prefetch = 0;
+    using_exception_3 = 0;
+    for (i = 0; i < 6; i++) {
+	cpu_level = 4 - i;
+	if (i == 5) {
+	    cpu_level = 0;
+	    using_prefetch = 1;
+	    using_exception_3 = 1;
+	    for (rp = 0; rp < nr_cpuop_funcs; rp++)
+		opcode_next_clev[rp] = 0;
+	}
+
+	postfix = i;
+	fprintf (stblfile, "struct cputbl CPUFUNC(op_smalltbl_%d)[] = {\n", postfix);
+
+	/* sam: this is for people with low memory (eg. me :)) */
+	printf ("\n"
+                "#if !defined(PART_1) && !defined(PART_2) && "
+	 	    "!defined(PART_3) && !defined(PART_4) && "
+		    "!defined(PART_5) && !defined(PART_6) && "
+		    "!defined(PART_7) && !defined(PART_8)"
+		"\n"
+	        "#define PART_1 1\n"
+	        "#define PART_2 1\n"
+	        "#define PART_3 1\n"
+	        "#define PART_4 1\n"
+	        "#define PART_5 1\n"
+	        "#define PART_6 1\n"
+	        "#define PART_7 1\n"
+	        "#define PART_8 1\n"
+	        "#endif\n\n");
+	
+	rp = 0;
+	for(j = 1; j <= 8; ++j) {
+		int k = (j * nr_cpuop_funcs) / 8;
+		printf ("#ifdef PART_%d\n",j);
+		for (; rp < k; rp++)
+		   generate_one_opcode (rp);
+		printf ("#endif\n\n");
+	}
+
+	fprintf (stblfile, "{ 0, 0, 0 }};\n");
+    }
+}
+
+int main (int argc, char **argv)
+{
+    read_table68k ();
+    do_merges ();
+
+    opcode_map = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
+    opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
+    opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
+    counts = (unsigned long *) xmalloc (65536 * sizeof (unsigned long));
+    read_counts ();
+
+    /* It would be a lot nicer to put all in one file (we'd also get rid of
+     * cputbl.h that way), but cpuopti can't cope.  That could be fixed, but
+     * I don't dare to touch the 68k version.  */
+
+    headerfile = fopen ("cputbl.h", "wb");
+    stblfile = fopen ("cpustbl.c", "wb");
+    freopen ("cpuemu.c", "wb", stdout);
+
+    generate_includes (stdout);
+    generate_includes (stblfile);
+
+    generate_func ();
+
+    free (table68k);
+    return 0;
+}
diff --git a/src/core/uae/gencpu.dsp b/src/core/uae/gencpu.dsp
new file mode 100644
index 0000000..491faec
--- /dev/null
+++ b/src/core/uae/gencpu.dsp
@@ -0,0 +1,115 @@
+# Microsoft Developer Studio Project File - Name="gencpu" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=gencpu - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "gencpu.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "gencpu.mak" CFG="gencpu - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "gencpu - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "gencpu - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "gencpu - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WIN32__" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"gencpu.exe"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Generating CPU tables...
+PostBuild_Cmds=gencpu.exe
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "gencpu - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "gencpu___Win32_Debug"
+# PROP BASE Intermediate_Dir "gencpu___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WIN32__" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"gencpu.exe" /pdbtype:sept
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=gencpu.exe
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "gencpu - Win32 Release"
+# Name "gencpu - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\cpudefs.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\gencpu.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\missing.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\readcpu.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\xmalloc.c
+# End Source File
+# End Target
+# End Project
diff --git a/src/core/uae/libuae.dsp b/src/core/uae/libuae.dsp
new file mode 100644
index 0000000..e20dcc4
--- /dev/null
+++ b/src/core/uae/libuae.dsp
@@ -0,0 +1,160 @@
+# Microsoft Developer Studio Project File - Name="libuae" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libuae - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "libuae.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "libuae.mak" CFG="libuae - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "libuae - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libuae - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "libuae - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /w /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "__WIN32__" /D "BUILD_UAE" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"libuae.lib"
+
+!ELSEIF  "$(CFG)" == "libuae - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /w /W0 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "__WIN32__" /D "BUILD_UAE" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"libuae.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "libuae - Win32 Release"
+# Name "libuae - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\cpudefs.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\cpuemu.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\cpustbl.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\fpp.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\missing.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\readcpu.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\xmalloc.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\compiler.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cputbl.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\libuae.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\memory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\newcpu.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\options.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\readcpu.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\sysconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\sysdeps.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\uconfig.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/src/core/uae/libuae.h b/src/core/uae/libuae.h
new file mode 100644
index 0000000..ce7c067
--- /dev/null
+++ b/src/core/uae/libuae.h
@@ -0,0 +1,41 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: libuae.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __UAE_H__
+#define __UAE_H__
+
+#include "sysdeps.h"
+#include "uconfig.h"
+#include "options.h"
+#include "memory.h"
+#include "newcpu.h"
+
+/* Backwards compatibility */
+#define curriword() (regs.ir)
+#define get_iword_prefetch(o) (o?get_iword(o):regs.ir)
+#define fill_prefetch_0 fill_prefetch_slow
+
+#endif
diff --git a/src/core/uae/machdep/m68k.h b/src/core/uae/machdep/m68k.h
new file mode 100644
index 0000000..40973bc
--- /dev/null
+++ b/src/core/uae/machdep/m68k.h
@@ -0,0 +1,42 @@
+ /* 
+  * UAE - The Un*x Amiga Emulator
+  * 
+  * MC68000 emulation - machine dependent bits
+  *
+  * Copyright 1996 Bernd Schmidt
+  * $Id: m68k.h 1695 2005-08-26 21:05:37Z kevinkofler $
+  */
+
+ 
+#define regflags regs.flags
+
+#define ZFLG (regflags.z)
+#define NFLG (regflags.n)
+#define CFLG (regflags.c)
+#define VFLG (regflags.v)
+#define XFLG (regflags.x)
+
+static __inline__ int cctrue(const int cc)
+{
+    switch(cc){
+     case 0: return 1;                       /* T */
+     case 1: return 0;                       /* F */
+     case 2: return !CFLG && !ZFLG;          /* HI */
+     case 3: return CFLG || ZFLG;            /* LS */
+     case 4: return !CFLG;                   /* CC */
+     case 5: return CFLG;                    /* CS */
+     case 6: return !ZFLG;                   /* NE */
+     case 7: return ZFLG;                    /* EQ */
+     case 8: return !VFLG;                   /* VC */
+     case 9: return VFLG;                    /* VS */
+     case 10:return !NFLG;                   /* PL */
+     case 11:return NFLG;                    /* MI */
+     case 12:return NFLG == VFLG;            /* GE */
+     case 13:return NFLG != VFLG;            /* LT */
+     case 14:return !ZFLG && (NFLG == VFLG); /* GT */
+     case 15:return ZFLG || (NFLG != VFLG);  /* LE */
+    }
+//    abort();
+    return 0;
+}
+
diff --git a/src/core/uae/machdep/maccess.h b/src/core/uae/machdep/maccess.h
new file mode 100644
index 0000000..80031c4
--- /dev/null
+++ b/src/core/uae/machdep/maccess.h
@@ -0,0 +1,57 @@
+ /* 
+  * UAE - The Un*x Amiga Emulator
+  * 
+  * Memory access functions
+  *
+  * Copyright 1996 Bernd Schmidt
+  * $Id: maccess.h 1695 2005-08-26 21:05:37Z kevinkofler $
+  */
+
+static __inline__ uae_u32 do_get_mem_long(uae_u32 *a)
+{
+    uae_u8 *b = (uae_u8 *)a;
+    
+    return (*b << 24) | (*(b+1) << 16) | (*(b+2) << 8) | (*(b+3));
+}
+
+static __inline__ uae_u16 do_get_mem_word(uae_u16 *a)
+{
+    uae_u8 *b = (uae_u8 *)a;
+    
+    return (*b << 8) | (*(b+1));
+}
+
+static __inline__ uae_u8 do_get_mem_byte(uae_u8 *a)
+{
+    return *a;
+}
+
+static __inline__ void do_put_mem_long(uae_u32 *a, uae_u32 v)
+{
+    uae_u8 *b = (uae_u8 *)a;
+    
+    *b = (uae_u8)(v >> 24);
+    *(b+1) = (uae_u8)(v >> 16);    
+    *(b+2) = (uae_u8)(v >> 8);
+    *(b+3) = (uae_u8)(v);
+}
+
+static __inline__ void do_put_mem_word(uae_u16 *a, uae_u16 v)
+{
+    uae_u8 *b = (uae_u8 *)a;
+    
+    *b = v >> 8;
+    *(b+1) = (uae_u8)(v);
+}
+
+static __inline__ void do_put_mem_byte(uae_u8 *a, uae_u8 v)
+{
+    *a = v;
+}
+
+#define call_mem_get_func(func, addr) ((*func)(addr))
+#define call_mem_put_func(func, addr, v) ((*func)(addr, v))
+
+#undef NO_INLINE_MEMORY_ACCESS
+#undef MD_HAVE_MEM_1_FUNCS
+
diff --git a/src/core/uae/memory.h b/src/core/uae/memory.h
new file mode 100644
index 0000000..3c2a13c
--- /dev/null
+++ b/src/core/uae/memory.h
@@ -0,0 +1,30 @@
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * memory management - reimplementation for TiEmu
+  *
+  *  TiEmu - Tiemu Is an EMUlator
+  *
+  *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+  *  Copyright (c) 2001-2003, Romain Lievin
+  *  Copyright (c) 2003, Julien Blache
+  *  Copyright (c) 2004, Romain Li�vin
+  *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+  *  $Id: memory.h 2268 2006-11-06 17:18:51Z roms $
+  */
+
+#ifndef BUILD_UAE
+#include "../ti_hw/mem.h"
+#endif
+
+//wrappers
+#define get_byte(addr)	hw_get_byte(addr)
+#define get_word(addr)	hw_get_word(addr)
+#define get_long(addr)	hw_get_long(addr)
+
+#define put_long(adr, arg)	hw_put_long(adr, arg)
+#define put_word(adr, arg)	hw_put_word(adr, arg)
+#define put_byte(adr, arg)	hw_put_byte(adr, arg)
+ 
+#define get_real_address(addr)	hw_get_real_address(addr)
+#define valid_address(addr, size)	1
diff --git a/src/core/uae/missing.c b/src/core/uae/missing.c
new file mode 100644
index 0000000..371a131
--- /dev/null
+++ b/src/core/uae/missing.c
@@ -0,0 +1,26 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: missing.c 1693 2005-08-25 14:29:36Z roms $ */
+
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * Various stuff missing in some OSes.
+  *
+  * Copyright 1997 Bernd Schmidt
+  */
+
+#include <stdlib.h>
+#include <string.h>
+#include "sysdeps.h"
+
+#ifndef HAVE_STRDUP
+
+char *my_strdup (const char *s)
+{
+    /* The casts to char * are there to shut up the compiler on HPUX */
+    char *x = (char*)xmalloc(strlen((char *)s) + 1);
+    strcpy(x, (char *)s);
+    return x;
+}
+
+#endif
diff --git a/src/core/uae/newcpu.c b/src/core/uae/newcpu.c
new file mode 100644
index 0000000..0ce467f
--- /dev/null
+++ b/src/core/uae/newcpu.c
@@ -0,0 +1,1986 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: newcpu.c 2783 2008-05-25 13:08:41Z roms $ */
+
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * MC68000 emulation
+  *
+  * (c) 1995 Bernd Schmidt
+  */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "sysconfig.h"
+#include "sysdeps.h"
+#include "uconfig.h"
+#include "options.h"
+#include "memory.h"
+#include "newcpu.h"
+
+// tiemu begin
+#include "tilibs.h"
+#include "ti68k_def.h"
+#include "bkpts.h"
+#define write_log printf
+static const struct uae_prefs currprefs = {0, 1, 1};
+#if defined(CYGNUS_SIM) && !defined(NO_GDB)
+extern const char *symfile;
+#endif /* CYGNUS_SIM */
+#define FLOATFORMAT_H /* don't include glib.h in romcalls.h */
+// tiemu end
+
+/* Opcode of faulting instruction */
+static uae_u16 last_op_for_exception_3;
+/* PC at fault time */
+static uaecptr last_addr_for_exception_3;
+/* Address that generated the exception */
+static uaecptr last_fault_for_exception_3;
+/* read (0) or write (1) access */
+static int last_writeaccess_for_exception_3;
+/* instruction (1) or data (0) access */
+static int last_instructionaccess_for_exception_3;
+
+int areg_byteinc[] = { 1,1,1,1,1,1,1,2 };
+int imm8_table[] = { 8,1,2,3,4,5,6,7 };
+
+int movem_index1[256];
+int movem_index2[256];
+int movem_next[256];
+
+int fpp_movem_index1[256];
+int fpp_movem_index2[256];
+int fpp_movem_next[256];
+
+cpuop_func *cpufunctbl[65536];
+
+#define COUNT_INSTRS 0
+
+#if COUNT_INSTRS
+static unsigned long int instrcount[65536];
+static uae_u16 opcodenums[65536];
+
+static int compfn (const void *el1, const void *el2)
+{
+    return instrcount[*(const uae_u16 *)el1] < instrcount[*(const uae_u16 *)el2];
+}
+
+static char *icountfilename (void)
+{
+    char *name = getenv ("INSNCOUNT");
+    if (name)
+	return name;
+    return COUNT_INSTRS == 2 ? "frequent.68k" : "insncount";
+}
+
+void dump_counts (void)
+{
+    FILE *f = fopen (icountfilename (), "w");
+    unsigned long int total;
+    int i;
+
+    write_log ("Writing instruction count file...\n");
+    for (i = 0; i < 65536; i++) {
+	opcodenums[i] = i;
+	total += instrcount[i];
+    }
+    qsort (opcodenums, 65536, sizeof(uae_u16), compfn);
+
+    fprintf (f, "Total: %lu\n", total);
+    for (i=0; i < 65536; i++) {
+	unsigned long int cnt = instrcount[opcodenums[i]];
+	struct instr *dp;
+	struct mnemolookup *lookup;
+	if (!cnt)
+	    break;
+	dp = table68k + opcodenums[i];
+	for (lookup = lookuptab;lookup->mnemo != dp->mnemo; lookup++)
+	    ;
+	fprintf (f, "%04x: %lu %s\n", opcodenums[i], cnt, lookup->name);
+    }
+    fclose (f);
+}
+#else
+void dump_counts (void)
+{
+}
+#endif
+
+int currIntLev = -1;
+int broken_in;
+int delayTime = 0;
+
+static unsigned long op_illg_1 (uae_u32 opcode) REGPARAM;
+
+static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode)
+{
+    op_illg (opcode);
+    return 4;
+}
+
+static void build_cpufunctbl (void)
+{
+    int i;
+    unsigned long opcode;
+    struct cputbl *tbl = (currprefs.cpu_level == 4 ? op_smalltbl_0_ff
+			  : currprefs.cpu_level == 3 ? op_smalltbl_1_ff
+			  : currprefs.cpu_level == 2 ? op_smalltbl_2_ff
+			  : currprefs.cpu_level == 1 ? op_smalltbl_3_ff
+			  : op_smalltbl_5_ff);
+
+    write_log ("UAE: Building CPU function table (%d %d).\n",
+	       currprefs.cpu_level, currprefs.address_space_24);
+
+    for (opcode = 0; opcode < 65536; opcode++)
+	cpufunctbl[opcode] = op_illg_1;
+    for (i = 0; tbl[i].handler != NULL; i++) {
+	if (! tbl[i].specific)
+	    cpufunctbl[tbl[i].opcode] = tbl[i].handler;
+    }
+    for (opcode = 0; opcode < 65536; opcode++) {
+	cpuop_func *f;
+
+	if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > currprefs.cpu_level)
+	    continue;
+
+	if (table68k[opcode].handler != -1) {
+	    f = cpufunctbl[table68k[opcode].handler];
+	    if (f == op_illg_1)
+		abort();
+	    cpufunctbl[opcode] = f;
+	}
+    }
+    for (i = 0; tbl[i].handler != NULL; i++) {
+	if (tbl[i].specific)
+	    cpufunctbl[tbl[i].opcode] = tbl[i].handler;
+    }
+}
+
+void fill_prefetch_slow (void)
+{
+#ifdef CPUEMU_6
+    if (currprefs.cpu_cycle_exact) {
+	regs.ir = get_word_ce (m68k_getpc ());
+	regs.irc = get_word_ce (m68k_getpc () + 2);
+    } else {
+#endif
+	regs.ir = get_word (m68k_getpc ());
+	regs.irc = get_word (m68k_getpc () + 2);
+#ifdef CPUEMU_6
+    }
+#endif
+}
+
+#if 0
+unsigned long cycles_mask, cycles_val;
+
+static void update_68k_cycles (void)
+{
+    cycles_mask = 0;
+    cycles_val = currprefs.m68k_speed;
+    if (currprefs.m68k_speed < 1) {
+	cycles_mask = 0xFFFFFFFF;
+	cycles_val = 0;
+    }
+}
+
+void check_prefs_changed_cpu (void)
+{
+    if (currprefs.m68k_speed != changed_prefs.m68k_speed) {
+	currprefs.m68k_speed = changed_prefs.m68k_speed;
+	reset_frame_rate_hack ();
+	update_68k_cycles ();
+    }
+}
+#endif
+
+void init_m68k (void)
+{
+    int i;
+
+    printf ("UAE: version 0.8.25\n");
+//    update_68k_cycles ();
+
+    for (i = 0 ; i < 256 ; i++) {
+	int j;
+	for (j = 0 ; j < 8 ; j++) {
+		if (i & (1 << j)) break;
+	}
+	movem_index1[i] = j;
+	movem_index2[i] = 7-j;
+	movem_next[i] = i & (~(1 << j));
+    }
+    for (i = 0 ; i < 256 ; i++) {
+	int j;
+	for (j = 7 ; j >= 0 ; j--) {
+		if (i & (1 << j)) break;
+	}
+	fpp_movem_index1[i] = 7-j;
+	fpp_movem_index2[i] = j;
+	fpp_movem_next[i] = i & (~(1 << j));
+    }
+#if COUNT_INSTRS
+    {
+	FILE *f = fopen (icountfilename (), "r");
+	memset (instrcount, 0, sizeof instrcount);
+	if (f) {
+	    uae_u32 opcode, count, total;
+	    char name[20];
+	    write_log ("Reading instruction count file...\n");
+	    fscanf (f, "Total: %lu\n", &total);
+	    while (fscanf (f, "%lx: %lu %s\n", &opcode, &count, name) == 3) {
+		instrcount[opcode] = count;
+	    }
+	    fclose(f);
+	}
+    }
+#endif
+    write_log ("UAE: Building CPU table for configuration: 68");
+    regs.address_space_mask = 0xffffffff;
+    if (currprefs.address_space_24 && currprefs.cpu_level > 1)
+        write_log ("EC");
+    switch (currprefs.cpu_level) {
+    case 1:
+        write_log ("010");
+        break;
+    case 2:
+        write_log ("020");
+        break;
+    case 3:
+        write_log ("020/881");
+        break;
+    case 4:
+        /* Who is going to miss the MMU anyway...? :-)  */
+        write_log ("040");
+        break;
+    default:
+        write_log ("000");
+        break;
+    }
+    if (currprefs.address_space_24) {
+	regs.address_space_mask = 0x00ffffff;
+	write_log (" 24-bit addressing");
+    }
+    write_log ("\n");
+    
+    read_table68k ();
+    do_merges ();
+
+    write_log ("UAE: %d CPU functions\n", nr_cpuop_funcs);
+
+    build_cpufunctbl ();
+}
+
+struct regstruct regs, lastint_regs;
+#ifndef NO_GDB
+static struct regstruct regs_backup[16];
+static int backup_pointer = 0;
+#endif /* 0 */
+#ifdef NO_GDB
+static long int m68kpc_offset;
+#endif /* NO_GDB */
+int lastint_no;
+
+#define get_ibyte_1(o) get_byte(regs.pc + (regs.pc_p - regs.pc_oldp) + (o) + 1)
+#define get_iword_1(o) get_word(regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
+#define get_ilong_1(o) get_long(regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
+
+#ifdef NO_GDB
+
+#ifdef __WIN32__
+#define snprintf	_snprintf
+#endif
+
+char *sym_addr(uae_u32 addr)
+{
+	static char buf[256];
+	int rcid = romcalls_is_addr(addr);
+
+	if(rcid == -1)
+		snprintf(buf, sizeof(buf), "$%06lX", (unsigned long)addr);
+	else
+		snprintf(buf, sizeof(buf), "$%06lX -> tios::%s", (unsigned long)addr, romcalls_get_name(rcid)); 
+
+	return buf;
+}
+
+uae_s32 ShowEA (FILE *f, int reg, amodes mode, wordsizes size, char *buf)
+{
+    uae_u16 dp;
+    uae_s8 disp8;
+    uae_s16 disp16;
+    int r;
+    uae_u32 dispreg;
+    uaecptr addr;
+    uae_s32 offset = 0;
+    char buffer[296];
+
+    switch (mode){
+     case Dreg:
+	sprintf (buffer,"D%d", reg);
+	break;
+     case Areg:
+	sprintf (buffer,"A%d", reg);
+	break;
+     case Aind:
+	sprintf (buffer,"(A%d)", reg);
+	break;
+     case Aipi:
+	sprintf (buffer,"(A%d)+", reg);
+	break;
+     case Apdi:
+	sprintf (buffer,"-(A%d)", reg);
+	break;
+     case Ad16:
+	disp16 = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
+	addr = m68k_areg(regs,reg) + (uae_s16)disp16;
+	if (disp16 & 0x8000)
+		sprintf (buffer,"(-$%X,A%d) [%s]", (-(uae_s16)(disp16)) & 0xffff, reg, sym_addr ((uae_u32)addr));
+	else
+		sprintf (buffer,"(+$%X,A%d) [%s]", disp16 & 0xffff, reg, sym_addr ((uae_u32)addr));
+	break;
+     case Ad8r:
+	dp = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
+	disp8 = dp & 0xFF;
+	r = (dp & 0x7000) >> 12;
+	dispreg = dp & 0x8000 ? m68k_areg(regs,r) : m68k_dreg(regs,r);
+	if (!(dp & 0x800)) dispreg = (uae_s32)(uae_s16)(dispreg);
+	dispreg <<= (dp >> 9) & 3;
+
+	if (dp & 0x100) {
+	    uae_s32 outer = 0, disp = 0;
+	    uae_s32 base = m68k_areg(regs,reg);
+	    char name[10];
+	    sprintf (name,"A%d, ",reg);
+	    if (dp & 0x80) { base = 0; name[0] = 0; }
+	    if (dp & 0x40) dispreg = 0;
+	    if ((dp & 0x30) == 0x20) { disp = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
+	    if ((dp & 0x30) == 0x30) { disp = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
+	    base += disp;
+
+	    if ((dp & 0x3) == 0x2) { outer = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
+	    if ((dp & 0x3) == 0x3) { outer = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
+
+	    if (!(dp & 4)) base += dispreg;
+	    if (dp & 3) base = get_long (base);
+	    if (dp & 4) base += dispreg;
+
+	    addr = base + outer;
+	    sprintf (buffer,"(%s%c%d.%c+%ld)+%ld [$%06lX]", name,
+		    dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
+		    disp,outer,
+		    (unsigned long)addr);
+	} else {
+	  addr = m68k_areg(regs,reg) + (uae_s32)((uae_s8)disp8) + dispreg;
+	  sprintf (buffer,"(A%d, %c%d.%c, $%02X) [$%06lX]", reg,
+	       dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
+	       disp8,
+	       (unsigned long)addr);
+	}
+	break;
+     case PC16:
+	addr = m68k_getpc () + m68kpc_offset;
+	disp16 = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
+	addr += (uae_s16)disp16;
+	if (disp16 & 0x8000)
+		sprintf (buffer,"(-$%X,PC) [%s]", (-(uae_s16)(disp16)) & 0xffff, sym_addr ((uae_u32)addr));
+	else
+		sprintf (buffer,"(+$%X,PC) [%s]", disp16 & 0xffff, sym_addr ((uae_u32)addr));
+	break;
+     case PC8r:
+	addr = m68k_getpc () + m68kpc_offset;
+	dp = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
+	disp8 = dp & 0xFF;
+	r = (dp & 0x7000) >> 12;
+	dispreg = dp & 0x8000 ? m68k_areg(regs,r) : m68k_dreg(regs,r);
+	if (!(dp & 0x800)) dispreg = (uae_s32)(uae_s16)(dispreg);
+	dispreg <<= (dp >> 9) & 3;
+
+	if (dp & 0x100) {
+	    uae_s32 outer = 0,disp = 0;
+	    uae_s32 base = addr;
+	    char name[10];
+	    sprintf (name,"PC, ");
+	    if (dp & 0x80) { base = 0; name[0] = 0; }
+	    if (dp & 0x40) dispreg = 0;
+	    if ((dp & 0x30) == 0x20) { disp = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
+	    if ((dp & 0x30) == 0x30) { disp = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
+	    base += disp;
+
+	    if ((dp & 0x3) == 0x2) { outer = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
+	    if ((dp & 0x3) == 0x3) { outer = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
+
+	    if (!(dp & 4)) base += dispreg;
+	    if (dp & 3) base = get_long (base);
+	    if (dp & 4) base += dispreg;
+
+	    addr = base + outer;
+	    sprintf (buffer,"(%s%c%d.%c+%ld)+%ld [%s]", name,
+		    dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
+		    disp,outer,
+		    sym_addr ((uae_u32)addr));
+	} else {
+	  addr += (uae_s32)((uae_s8)disp8) + dispreg;
+	  sprintf (buffer,"(PC, %c%d.%c, $%02X) [%s]", dp & 0x8000 ? 'A' : 'D',
+		(int)r, dp & 0x800 ? 'L' : 'W',
+		disp8, sym_addr ((uae_u32)addr));
+	}
+	break;
+     case absw:
+	sprintf (buffer,"$%lX", (unsigned long)(uae_s32)(uae_s16)get_iword_1 (m68kpc_offset));
+	m68kpc_offset += 2;
+	break;
+     case absl:
+	sprintf (buffer,"%s", sym_addr ((uae_u32)get_ilong_1 (m68kpc_offset)));
+	m68kpc_offset += 4;
+	break;
+     case imm:
+	switch (size){
+	 case sz_byte:
+	    sprintf (buffer,"#$%X", (unsigned int)(get_iword_1 (m68kpc_offset) & 0xff));
+	    m68kpc_offset += 2;
+	    break;
+	 case sz_word:
+	    sprintf (buffer,"#$%X", (unsigned int)(get_iword_1 (m68kpc_offset) & 0xffff));
+	    m68kpc_offset += 2;
+	    break;
+	 case sz_long:
+	    sprintf (buffer,"#$%lX", (unsigned long)(get_ilong_1 (m68kpc_offset)));
+	    m68kpc_offset += 4;
+	    break;
+	 default:
+	    break;
+	}
+	break;
+     case imm0:
+	offset = (uae_s32)(uae_s8)get_iword_1 (m68kpc_offset);
+	m68kpc_offset += 2;
+	sprintf (buffer,"#$%X", (unsigned int)(offset & 0xff));
+	break;
+     case imm1:
+	offset = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset);
+	m68kpc_offset += 2;
+	sprintf (buffer,"#$%X", (unsigned int)(offset & 0xffff));
+	break;
+     case imm2:
+	offset = (uae_s32)get_ilong_1 (m68kpc_offset);
+	m68kpc_offset += 4;
+	sprintf (buffer,"#$%lX", (unsigned long)offset);
+	break;
+     case immi:
+	offset = (uae_s32)(uae_s8)(reg & 0xff);
+	sprintf (buffer,"#$%lX", (unsigned long)offset);
+	break;
+     default:
+	break;
+    }
+    if (buf == 0)
+	fprintf (f, "%s", buffer);
+    else
+	strcat (buf, buffer);
+    return offset;
+}
+#endif /* NO_GDB */
+
+#if 0
+/* The plan is that this will take over the job of exception 3 handling -
+ * the CPU emulation functions will just do a longjmp to m68k_go whenever
+ * they hit an odd address. */
+static int verify_ea (int reg, amodes mode, wordsizes size, uae_u32 *val)
+{
+    uae_u16 dp;
+    uae_s8 disp8;
+    uae_s16 disp16;
+    int r;
+    uae_u32 dispreg;
+    uaecptr addr;
+
+    switch (mode){
+     case Dreg:
+	*val = m68k_dreg (regs, reg);
+	return 1;
+     case Areg:
+	*val = m68k_areg (regs, reg);
+	return 1;
+
+     case Aind:
+     case Aipi:
+	addr = m68k_areg (regs, reg);
+	break;
+     case Apdi:
+	addr = m68k_areg (regs, reg);
+	break;
+     case Ad16:
+	disp16 = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
+	addr = m68k_areg(regs,reg) + (uae_s16)disp16;
+	break;
+     case Ad8r:
+	addr = m68k_areg (regs, reg);
+     d8r_common:
+	dp = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
+	disp8 = dp & 0xFF;
+	r = (dp & 0x7000) >> 12;
+	dispreg = dp & 0x8000 ? m68k_areg(regs,r) : m68k_dreg(regs,r);
+	if (!(dp & 0x800)) dispreg = (uae_s32)(uae_s16)(dispreg);
+	dispreg <<= (dp >> 9) & 3;
+
+	if (dp & 0x100) {
+	    uae_s32 outer = 0, disp = 0;
+	    uae_s32 base = addr;
+	    if (dp & 0x80) base = 0;
+	    if (dp & 0x40) dispreg = 0;
+	    if ((dp & 0x30) == 0x20) { disp = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
+	    if ((dp & 0x30) == 0x30) { disp = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
+	    base += disp;
+
+	    if ((dp & 0x3) == 0x2) { outer = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
+	    if ((dp & 0x3) == 0x3) { outer = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
+
+	    if (!(dp & 4)) base += dispreg;
+	    if (dp & 3) base = get_long (base);
+	    if (dp & 4) base += dispreg;
+
+	    addr = base + outer;
+	} else {
+	  addr += (uae_s32)((uae_s8)disp8) + dispreg;
+	}
+	break;
+     case PC16:
+	addr = m68k_getpc () + m68kpc_offset;
+	disp16 = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
+	addr += (uae_s16)disp16;
+	break;
+     case PC8r:
+	addr = m68k_getpc () + m68kpc_offset;
+	goto d8r_common;
+     case absw:
+	addr = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset);
+	m68kpc_offset += 2;
+	break;
+     case absl:
+	addr = get_ilong_1 (m68kpc_offset);
+	m68kpc_offset += 4;
+	break;
+     case imm:
+	switch (size){
+	 case sz_byte:
+	    *val = get_iword_1 (m68kpc_offset) & 0xff;
+	    m68kpc_offset += 2;
+	    break;
+	 case sz_word:
+	    *val = get_iword_1 (m68kpc_offset) & 0xffff;
+	    m68kpc_offset += 2;
+	    break;
+	 case sz_long:
+	    *val = get_ilong_1 (m68kpc_offset);
+	    m68kpc_offset += 4;
+	    break;
+	 default:
+	    break;
+	}
+	return 1;
+     case imm0:
+	*val = (uae_s32)(uae_s8)get_iword_1 (m68kpc_offset);
+	m68kpc_offset += 2;
+	return 1;
+     case imm1:
+	*val = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset);
+	m68kpc_offset += 2;
+	return 1;
+     case imm2:
+	*val = get_ilong_1 (m68kpc_offset);
+	m68kpc_offset += 4;
+	return 1;
+     case immi:
+	*val = (uae_s32)(uae_s8)(reg & 0xff);
+	return 1;
+     default:
+	addr = 0;
+	break;
+    }
+    if ((addr & 1) == 0)
+	return 1;
+
+    last_addr_for_exception_3 = m68k_getpc () + m68kpc_offset;
+    last_fault_for_exception_3 = addr;
+    last_writeaccess_for_exception_3 = 0;
+    last_instructionaccess_for_exception_3 = 0;
+    return 0;
+}
+#endif /* 0 */
+
+uae_u32 get_disp_ea_020 (uae_u32 base, uae_u32 dp)
+{
+    int reg = (dp >> 12) & 15;
+    uae_s32 regd = regs.regs[reg];
+    if ((dp & 0x800) == 0)
+	regd = (uae_s32)(uae_s16)regd;
+    regd <<= (dp >> 9) & 3;
+    if (dp & 0x100) {
+	uae_s32 outer = 0;
+	if (dp & 0x80) base = 0;
+	if (dp & 0x40) regd = 0;
+
+	if ((dp & 0x30) == 0x20) base += (uae_s32)(uae_s16)next_iword();
+	if ((dp & 0x30) == 0x30) base += next_ilong();
+
+	if ((dp & 0x3) == 0x2) outer = (uae_s32)(uae_s16)next_iword();
+	if ((dp & 0x3) == 0x3) outer = next_ilong();
+
+	if ((dp & 0x4) == 0) base += regd;
+	if (dp & 0x3) base = get_long (base);
+	if (dp & 0x4) base += regd;
+
+	return base + outer;
+    } else {
+	return base + (uae_s32)((uae_s8)dp) + regd;
+    }
+}
+
+uae_u32 get_disp_ea_000 (uae_u32 base, uae_u32 dp)
+{
+    int reg = (dp >> 12) & 15;
+    uae_s32 regd = regs.regs[reg];
+#if 1
+    if ((dp & 0x800) == 0)
+	regd = (uae_s32)(uae_s16)regd;
+    return base + (uae_s8)dp + regd;
+#else
+    /* Branch-free code... benchmark this again now that
+     * things are no longer inline.  */
+    uae_s32 regd16;
+    uae_u32 mask;
+    mask = ((dp & 0x800) >> 11) - 1;
+    regd16 = (uae_s32)(uae_s16)regd;
+    regd16 &= mask;
+    mask = ~mask;
+    base += (uae_s8)dp;
+    regd &= mask;
+    regd |= regd16;
+    return base + regd;
+#endif
+}
+
+void MakeSR (void)
+{
+#if 0
+    assert((regs.t1 & 1) == regs.t1);
+    assert((regs.t0 & 1) == regs.t0);
+    assert((regs.s & 1) == regs.s);
+    assert((regs.m & 1) == regs.m);
+    assert((XFLG & 1) == XFLG);
+    assert((NFLG & 1) == NFLG);
+    assert((ZFLG & 1) == ZFLG);
+    assert((VFLG & 1) == VFLG);
+    assert((CFLG & 1) == CFLG);
+#endif
+    regs.sr = ((regs.t1 << 15) /*| (regs.t0 << 14)*/
+	       | (regs.s << 13) /*| (regs.m << 12)*/ | (regs.intmask << 8)
+	       | (GET_XFLG << 4) | (GET_NFLG << 3) | (GET_ZFLG << 2) | (GET_VFLG << 1)
+	       | GET_CFLG);
+}
+
+void MakeFromSR (void)
+{
+//    int oldm = regs.m;
+    int olds = regs.s;
+
+    regs.t1 = (regs.sr >> 15) & 1;
+//    regs.t0 = (regs.sr >> 14) & 1;
+    regs.s = (regs.sr >> 13) & 1;
+//    regs.m = (regs.sr >> 12) & 1;
+    regs.intmask = (regs.sr >> 8) & 7;
+    SET_XFLG ((regs.sr >> 4) & 1);
+    SET_NFLG ((regs.sr >> 3) & 1);
+    SET_ZFLG ((regs.sr >> 2) & 1);
+    SET_VFLG ((regs.sr >> 1) & 1);
+    SET_CFLG (regs.sr & 1);
+#if 0
+    if (currprefs.cpu_level >= 2) {
+	if (olds != regs.s) {
+	    if (olds) {
+		if (oldm)
+		    regs.msp = m68k_areg(regs, 7);
+		else
+		    regs.isp = m68k_areg(regs, 7);
+		m68k_areg(regs, 7) = regs.usp;
+	    } else {
+		regs.usp = m68k_areg(regs, 7);
+		m68k_areg(regs, 7) = regs.m ? regs.msp : regs.isp;
+	    }
+	} else if (olds && oldm != regs.m) {
+	    if (oldm) {
+		regs.msp = m68k_areg(regs, 7);
+		m68k_areg(regs, 7) = regs.isp;
+	    } else {
+		regs.isp = m68k_areg(regs, 7);
+		m68k_areg(regs, 7) = regs.msp;
+	    }
+	}
+    } else {
+#endif
+	if (olds != regs.s) {
+	    if (olds) {
+		regs.isp = m68k_areg(regs, 7);
+		m68k_areg(regs, 7) = regs.usp;
+	    } else {
+		regs.usp = m68k_areg(regs, 7);
+		m68k_areg(regs, 7) = regs.isp;
+	    }
+	}
+//    }
+
+    set_special (SPCFLAG_INT);
+    if (regs.t1 /*|| regs.t0*/)
+	set_special (SPCFLAG_TRACE);
+    else
+    	/* Keep SPCFLAG_DOTRACE, we still want a trace exception for
+	   SR-modifying instructions (including STOP).  */
+	unset_special (SPCFLAG_TRACE);
+}
+
+int intlev(void) 
+{
+  int rc = currIntLev;
+  currIntLev = -1;
+  return rc;
+}
+ 
+static void exception_trace (int nr)
+{
+    unset_special (SPCFLAG_TRACE | SPCFLAG_DOTRACE);
+    if (regs.t1 /*&& !regs.t0*/) {
+	/* trace stays pending if exception is div by zero, chk,
+	 * trapv or trap #x
+	 */
+	if (nr == 5 || nr == 6 || nr ==  7 || (nr >= 32 && nr <= 47))
+	    set_special (SPCFLAG_DOTRACE);
+    }
+    regs.t1 /*= regs.t0 = regs.m*/ = 0;
+}
+
+#if 0
+static void exception_debug (int nr)
+{
+#ifdef DEBUGGER
+    if (!exception_debugging)
+	return;
+    console_out ("Exception %d, PC=%08.8X\n", nr, m68k_getpc()); 
+#endif
+}
+#endif /* 0 */
+
+void Exception_normal (int nr, uaecptr oldpc)
+{
+    GList *l;
+
+    uae_u32 currpc = m68k_getpc (), newpc;
+    int sv = regs.s;
+
+//    exception_debug (nr);
+    MakeSR();
+
+    if (!regs.s) {
+	regs.usp = m68k_areg(regs, 7);
+#if 0
+	if (currprefs.cpu_level >= 2)
+	    m68k_areg(regs, 7) = regs.m ? regs.msp : regs.isp;
+	else
+#endif /* 0 */
+	    m68k_areg(regs, 7) = regs.isp;
+	regs.s = 1;
+    }
+#if 0
+    if (currprefs.cpu_level > 0) {
+	if (nr == 2 || nr == 3) {
+	    int i;
+	    if (currprefs.cpu_level >= 4) { /* 68040 */
+		if (nr == 2) {
+		    for (i = 0 ; i < 18 ; i++) {
+			m68k_areg(regs, 7) -= 2;
+			put_word (m68k_areg(regs, 7), 0);
+		    }
+		    m68k_areg(regs, 7) -= 4;
+		    put_long (m68k_areg(regs, 7), last_fault_for_exception_3);
+		    m68k_areg(regs, 7) -= 2;
+		    put_word (m68k_areg(regs, 7), 0);
+		    m68k_areg(regs, 7) -= 2;
+		    put_word (m68k_areg(regs, 7), 0);
+		    m68k_areg(regs, 7) -= 2;
+		    put_word (m68k_areg(regs, 7), 0);
+		    m68k_areg(regs, 7) -= 2;
+		    put_word (m68k_areg(regs, 7), 0x0140 | (sv ? 6 : 2)); /* SSW */
+		    m68k_areg(regs, 7) -= 4;
+		    put_long (m68k_areg(regs, 7), last_addr_for_exception_3);
+		    m68k_areg(regs, 7) -= 2;
+		    put_word (m68k_areg(regs, 7), 0x7000 + nr * 4);
+		} else {
+		    m68k_areg(regs, 7) -= 4;
+		    put_long (m68k_areg(regs, 7), last_fault_for_exception_3);
+		    m68k_areg(regs, 7) -= 2;
+		    put_word (m68k_areg(regs, 7), 0x2000 + nr * 4);
+		}
+	    } else {
+		uae_u16 ssw = (sv ? 4 : 0) | (last_instructionaccess_for_exception_3 ? 2 : 1);
+		ssw |= last_writeaccess_for_exception_3 ? 0 : 0x40;
+		ssw |= 0x20;
+		for (i = 0 ; i < 36; i++) {
+		    m68k_areg(regs, 7) -= 2;
+		    put_word (m68k_areg(regs, 7), 0);
+		}
+	        m68k_areg(regs, 7) -= 4;
+	        put_long (m68k_areg(regs, 7), last_fault_for_exception_3);
+		m68k_areg(regs, 7) -= 2;
+		put_word (m68k_areg(regs, 7), 0);
+		m68k_areg(regs, 7) -= 2;
+		put_word (m68k_areg(regs, 7), 0);
+		m68k_areg(regs, 7) -= 2;
+		put_word (m68k_areg(regs, 7), 0);
+		m68k_areg(regs, 7) -= 2;
+		put_word (m68k_areg(regs, 7), ssw);
+		m68k_areg(regs, 7) -= 2;
+		put_word (m68k_areg(regs, 7), 0xb000 + nr * 4);
+	    }
+#if 0
+	    write_log ("Exception %d (%x) at %x -> %x!\n", nr, oldpc, currpc, get_long (regs.vbr + 4*nr));
+#endif
+	    
+	} else if (nr ==5 || nr == 6 || nr == 7 || nr == 9) {
+	    m68k_areg(regs, 7) -= 4;
+	    put_long (m68k_areg(regs, 7), oldpc);
+	    m68k_areg(regs, 7) -= 2;
+	    put_word (m68k_areg(regs, 7), 0x2000 + nr * 4);
+	} else if (regs.m && nr >= 24 && nr < 32) { /* M + Interrupt */
+	    m68k_areg(regs, 7) -= 2;
+	    put_word (m68k_areg(regs, 7), nr * 4);
+	    m68k_areg(regs, 7) -= 4;
+	    put_long (m68k_areg(regs, 7), currpc);
+	    m68k_areg(regs, 7) -= 2;
+	    put_word (m68k_areg(regs, 7), regs.sr);
+	    regs.sr |= (1 << 13);
+	    regs.msp = m68k_areg(regs, 7);
+	    m68k_areg(regs, 7) = regs.isp;
+	    m68k_areg(regs, 7) -= 2;
+	    put_word (m68k_areg(regs, 7), 0x1000 + nr * 4);
+	} else {
+	    m68k_areg(regs, 7) -= 2;
+	    put_word (m68k_areg(regs, 7), nr * 4);
+	}
+    } else
+#endif /* 0 */
+    if (nr == 2 || nr == 3) {
+	uae_u16 mode = (sv ? 4 : 0) | (last_instructionaccess_for_exception_3 ? 2 : 1);
+        mode |= last_writeaccess_for_exception_3 ? 0 : 16;
+	m68k_areg(regs, 7) -= 14;
+	/* fixme: bit3=I/N */
+	put_word (m68k_areg(regs, 7) + 0, mode);
+	put_long (m68k_areg(regs, 7) + 2, last_fault_for_exception_3);
+	put_word (m68k_areg(regs, 7) + 6, last_op_for_exception_3);
+	put_word (m68k_areg(regs, 7) + 8, regs.sr);
+	put_long (m68k_areg(regs, 7) + 10, last_addr_for_exception_3);
+//        write_log ("Exception %d (%x) at %x -> %x!\n", nr, oldpc, currpc, get_long (regs.vbr + 4*nr));
+	goto kludge_me_do;
+    }
+    m68k_areg(regs, 7) -= 4;
+    put_long (m68k_areg(regs, 7), currpc);
+    m68k_areg(regs, 7) -= 2;
+    put_word (m68k_areg(regs, 7), regs.sr);
+kludge_me_do:
+    newpc = get_long (regs.vbr + 4 * nr);
+    if (newpc & 1) {
+#if 0
+	if (nr == 2 || nr == 3)
+	    uae_reset (1); /* there is nothing else we can do.. */
+	else
+#endif /* 0 */
+	    exception3 (regs.ir, m68k_getpc(), newpc);
+	return;
+    }
+    m68k_setpc (newpc);
+    fill_prefetch_slow ();
+    exception_trace (nr);
+
+  // added for capturing the exception and next launch a debugger
+  if ((l = bkpts.exception) && !(regs.spcflags & SPCFLAG_BRK))
+    {
+        bkpts.id = 0;
+        while (l) 
+	    {
+	        if (GPOINTER_TO_INT(l->data) == nr) 
+	        {
+				bkpts.type = BK_CAUSE_EXCEPTION;
+				bkpts.mode = nr;
+	            regs.spcflags |= SPCFLAG_BRK;	            
+	            break;
+	        }
+	        
+			bkpts.id++;
+	        l = l->next;
+	    }
+    }
+}
+
+void Exception (int nr, uaecptr oldpc)
+{
+    Exception_normal (nr, oldpc);
+}
+
+int uscycle = 0;
+
+void Interrupt(int nr)
+{
+    regs.stopped = 0;
+    unset_special (SPCFLAG_STOP);
+    assert(nr < 8 && nr >= 0);
+    lastint_regs = regs;
+    lastint_no = nr;
+    Exception (nr + 24, 0);
+
+    regs.intmask = nr;
+    set_special (SPCFLAG_INT);
+}
+
+static uae_u32 caar, cacr, itt0, itt1, dtt0, dtt1, tc, mmusr, urp, srp;
+
+int m68k_move2c (int regno, uae_u32 *regp)
+{
+    if ((currprefs.cpu_level == 1 && (regno & 0x7FF) > 1)
+	|| (currprefs.cpu_level < 4 && (regno & 0x7FF) > 2)
+	|| (currprefs.cpu_level == 4 && regno == 0x802))
+    {
+	op_illg (0x4E7B);
+	return 0;
+    } else {
+	switch (regno) {
+	case 0: regs.sfc = *regp & 7; break;
+	case 1: regs.dfc = *regp & 7; break;
+	case 2: cacr = *regp & (currprefs.cpu_level < 4 ? 0x3 : 0x80008000); break;
+	case 3: tc = *regp & 0xc000; break;
+	    /* Mask out fields that should be zero.  */
+	case 4: itt0 = *regp & 0xffffe364; break;
+	case 5: itt1 = *regp & 0xffffe364; break;
+	case 6: dtt0 = *regp & 0xffffe364; break;
+	case 7: dtt1 = *regp & 0xffffe364; break;
+	  
+	case 0x800: regs.usp = *regp; break;
+	case 0x801: regs.vbr = *regp; break;
+	case 0x802: caar = *regp & 0xfc; break;
+//	case 0x803: regs.msp = *regp; if (regs.m == 1) m68k_areg(regs, 7) = regs.msp; break;
+//	case 0x804: regs.isp = *regp; if (regs.m == 0) m68k_areg(regs, 7) = regs.isp; break;
+	case 0x805: mmusr = *regp; break;
+	case 0x806: urp = *regp; break;
+	case 0x807: srp = *regp; break;
+	default:
+	    op_illg (0x4E7B);
+	    return 0;
+	}
+    }
+    return 1;
+}
+
+int m68k_movec2 (int regno, uae_u32 *regp)
+{
+    if ((currprefs.cpu_level == 1 && (regno & 0x7FF) > 1)
+	|| (currprefs.cpu_level < 4 && (regno & 0x7FF) > 2)
+	|| (currprefs.cpu_level == 4 && regno == 0x802))
+    {
+	op_illg (0x4E7A);
+	return 0;
+    } else {
+	switch (regno) {
+	case 0: *regp = regs.sfc; break;
+	case 1: *regp = regs.dfc; break;
+	case 2: *regp = cacr; break;
+	case 3: *regp = tc; break;
+	case 4: *regp = itt0; break;
+	case 5: *regp = itt1; break;
+	case 6: *regp = dtt0; break;
+	case 7: *regp = dtt1; break;
+	case 0x800: *regp = regs.usp; break;
+	case 0x801: *regp = regs.vbr; break;
+	case 0x802: *regp = caar; break;
+//	case 0x803: *regp = regs.m == 1 ? m68k_areg(regs, 7) : regs.msp; break;
+//	case 0x804: *regp = regs.m == 0 ? m68k_areg(regs, 7) : regs.isp; break;
+	case 0x805: *regp = mmusr; break;
+	case 0x806: *regp = urp; break;
+	case 0x807: *regp = srp; break;
+	default:
+	    op_illg (0x4E7A);
+	    return 0;
+	}
+    }
+    return 1;
+}
+
+STATIC_INLINE int
+div_unsigned(uae_u32 src_hi, uae_u32 src_lo, uae_u32 div, uae_u32 *quot, uae_u32 *rem)
+{
+	uae_u32 q = 0, cbit = 0;
+	int i;
+
+	if (div <= src_hi) {
+	    return 1;
+	}
+	for (i = 0 ; i < 32 ; i++) {
+		cbit = src_hi & 0x80000000ul;
+		src_hi <<= 1;
+		if (src_lo & 0x80000000ul) src_hi++;
+		src_lo <<= 1;
+		q = q << 1;
+		if (cbit || div <= src_hi) {
+			q |= 1;
+			src_hi -= div;
+		}
+	}
+	*quot = q;
+	*rem = src_hi;
+	return 0;
+}
+
+void m68k_divl (uae_u32 opcode, uae_u32 src, uae_u16 extra, uaecptr oldpc)
+{
+#if defined(uae_s64)
+    if (src == 0) {
+	Exception (5, oldpc);
+	return;
+    }
+    if (extra & 0x800) {
+	/* signed variant */
+	uae_s64 a = (uae_s64)(uae_s32)m68k_dreg(regs, (extra >> 12) & 7);
+	uae_s64 quot, rem;
+
+	if (extra & 0x400) {
+	    a &= 0xffffffffu;
+	    a |= (uae_s64)m68k_dreg(regs, extra & 7) << 32;
+	}
+	rem = a % (uae_s64)(uae_s32)src;
+	quot = a / (uae_s64)(uae_s32)src;
+	if ((quot & UVAL64(0xffffffff80000000)) != 0
+	    && (quot & UVAL64(0xffffffff80000000)) != UVAL64(0xffffffff80000000))
+	{
+	    SET_VFLG (1);
+	    SET_NFLG (1);
+	    SET_CFLG (0);
+	} else {
+	    if (((uae_s32)rem < 0) != ((uae_s64)a < 0)) rem = -rem;
+	    SET_VFLG (0);
+	    SET_CFLG (0);
+	    SET_ZFLG (((uae_s32)quot) == 0);
+	    SET_NFLG (((uae_s32)quot) < 0);
+	    m68k_dreg(regs, extra & 7) = rem;
+	    m68k_dreg(regs, (extra >> 12) & 7) = quot;
+	}
+    } else {
+	/* unsigned */
+	uae_u64 a = (uae_u64)(uae_u32)m68k_dreg(regs, (extra >> 12) & 7);
+	uae_u64 quot, rem;
+
+	if (extra & 0x400) {
+	    a &= 0xffffffffu;
+	    a |= (uae_u64)m68k_dreg(regs, extra & 7) << 32;
+	}
+	rem = a % (uae_u64)src;
+	quot = a / (uae_u64)src;
+	if (quot > 0xffffffffu) {
+	    SET_VFLG (1);
+	    SET_NFLG (1);
+	    SET_CFLG (0);
+	} else {
+	    SET_VFLG (0);
+	    SET_CFLG (0);
+	    SET_ZFLG (((uae_s32)quot) == 0);
+	    SET_NFLG (((uae_s32)quot) < 0);
+	    m68k_dreg(regs, extra & 7) = rem;
+	    m68k_dreg(regs, (extra >> 12) & 7) = quot;
+	}
+    }
+#else
+    if (src == 0) {
+	Exception (5, oldpc);
+	return;
+    }
+    if (extra & 0x800) {
+	/* signed variant */
+	uae_s32 lo = (uae_s32)m68k_dreg(regs, (extra >> 12) & 7);
+	uae_s32 hi = lo < 0 ? -1 : 0;
+	uae_s32 save_high;
+	uae_u32 quot = 0, rem = 0;
+	uae_u32 sign;
+
+	if (extra & 0x400) {
+	    hi = (uae_s32)m68k_dreg(regs, extra & 7);
+	}
+	save_high = hi;
+	sign = (hi ^ src);
+	if (hi < 0) {
+	    hi = ~hi;
+	    lo = -lo;
+	    if (lo == 0) hi++;
+	}
+	if ((uae_s32)src < 0) src = -src;
+	if (div_unsigned(hi, lo, src, &quot, &rem) ||
+	    (sign & 0x80000000) ? quot > 0x80000000 : quot > 0x7fffffff) {
+	    SET_VFLG (1);
+	    SET_NFLG (1);
+	    SET_CFLG (0);
+	} else {
+	    if (sign & 0x80000000) quot = -quot;
+	    if (((uae_s32)rem < 0) != (save_high < 0)) rem = -rem;
+	    SET_VFLG (0);
+	    SET_CFLG (0);
+	    SET_ZFLG (((uae_s32)quot) == 0);
+	    SET_NFLG (((uae_s32)quot) < 0);
+	    m68k_dreg(regs, extra & 7) = rem;
+	    m68k_dreg(regs, (extra >> 12) & 7) = quot;
+	}
+    } else {
+	/* unsigned */
+	uae_u32 lo = (uae_u32)m68k_dreg(regs, (extra >> 12) & 7);
+	uae_u32 hi = 0;
+	uae_u32 quot, rem;
+
+	if (extra & 0x400) {
+	    hi = (uae_u32)m68k_dreg(regs, extra & 7);
+	}
+	if (div_unsigned(hi, lo, src, &quot, &rem)) {
+	    SET_VFLG (1);
+	    SET_NFLG (1);
+	    SET_CFLG (0);
+	} else {
+	    SET_VFLG (0);
+	    SET_CFLG (0);
+	    SET_ZFLG (((uae_s32)quot) == 0);
+	    SET_NFLG (((uae_s32)quot) < 0);
+	    m68k_dreg(regs, extra & 7) = rem;
+	    m68k_dreg(regs, (extra >> 12) & 7) = quot;
+	}
+    }
+#endif
+}
+
+STATIC_INLINE void
+mul_unsigned(uae_u32 src1, uae_u32 src2, uae_u32 *dst_hi, uae_u32 *dst_lo)
+{
+	uae_u32 r0 = (src1 & 0xffff) * (src2 & 0xffff);
+	uae_u32 r1 = ((src1 >> 16) & 0xffff) * (src2 & 0xffff);
+	uae_u32 r2 = (src1 & 0xffff) * ((src2 >> 16) & 0xffff);
+	uae_u32 r3 = ((src1 >> 16) & 0xffff) * ((src2 >> 16) & 0xffff);
+	uae_u32 lo;
+
+	lo = r0 + ((r1 << 16) & 0xffff0000ul);
+	if (lo < r0) r3++;
+	r0 = lo;
+	lo = r0 + ((r2 << 16) & 0xffff0000ul);
+	if (lo < r0) r3++;
+	r3 += ((r1 >> 16) & 0xffff) + ((r2 >> 16) & 0xffff);
+	*dst_lo = lo;
+	*dst_hi = r3;
+}
+
+void m68k_mull (uae_u32 opcode, uae_u32 src, uae_u16 extra)
+{
+#if defined(uae_s64)
+    if (extra & 0x800) {
+	/* signed variant */
+	uae_s64 a = (uae_s64)(uae_s32)m68k_dreg(regs, (extra >> 12) & 7);
+
+	a *= (uae_s64)(uae_s32)src;
+	SET_VFLG (0);
+	SET_CFLG (0);
+	SET_ZFLG (a == 0);
+	SET_NFLG (a < 0);
+	if (extra & 0x400)
+	    m68k_dreg(regs, extra & 7) = a >> 32;
+	else if ((a & UVAL64(0xffffffff80000000)) != 0
+		 && (a & UVAL64(0xffffffff80000000)) != UVAL64(0xffffffff80000000))
+	{
+	    SET_VFLG (1);
+	}
+	m68k_dreg(regs, (extra >> 12) & 7) = (uae_u32)a;
+    } else {
+	/* unsigned */
+	uae_u64 a = (uae_u64)(uae_u32)m68k_dreg(regs, (extra >> 12) & 7);
+
+	a *= (uae_u64)src;
+	SET_VFLG (0);
+	SET_CFLG (0);
+	SET_ZFLG (a == 0);
+	SET_NFLG (((uae_s64)a) < 0);
+	if (extra & 0x400)
+	    m68k_dreg(regs, extra & 7) = a >> 32;
+	else if ((a & UVAL64(0xffffffff00000000)) != 0) {
+	    SET_VFLG (1);
+	}
+	m68k_dreg(regs, (extra >> 12) & 7) = (uae_u32)a;
+    }
+#else
+    if (extra & 0x800) {
+	/* signed variant */
+	uae_s32 src1,src2;
+	uae_u32 dst_lo,dst_hi;
+	uae_u32 sign;
+
+	src1 = (uae_s32)src;
+	src2 = (uae_s32)m68k_dreg(regs, (extra >> 12) & 7);
+	sign = (src1 ^ src2);
+	if (src1 < 0) src1 = -src1;
+	if (src2 < 0) src2 = -src2;
+	mul_unsigned((uae_u32)src1,(uae_u32)src2,&dst_hi,&dst_lo);
+	if (sign & 0x80000000) {
+		dst_hi = ~dst_hi;
+		dst_lo = -dst_lo;
+		if (dst_lo == 0) dst_hi++;
+	}
+	SET_VFLG (0);
+	SET_CFLG (0);
+	SET_ZFLG (dst_hi == 0 && dst_lo == 0);
+	SET_NFLG (((uae_s32)dst_hi) < 0);
+	if (extra & 0x400)
+	    m68k_dreg(regs, extra & 7) = dst_hi;
+	else if ((dst_hi != 0 || (dst_lo & 0x80000000) != 0)
+		 && ((dst_hi & 0xffffffff) != 0xffffffff
+		     || (dst_lo & 0x80000000) != 0x80000000))
+	{
+	    SET_VFLG (1);
+	}
+	m68k_dreg(regs, (extra >> 12) & 7) = dst_lo;
+    } else {
+	/* unsigned */
+	uae_u32 dst_lo,dst_hi;
+
+	mul_unsigned(src,(uae_u32)m68k_dreg(regs, (extra >> 12) & 7),&dst_hi,&dst_lo);
+
+	SET_VFLG (0);
+	SET_CFLG (0);
+	SET_ZFLG (dst_hi == 0 && dst_lo == 0);
+	SET_NFLG (((uae_s32)dst_hi) < 0);
+	if (extra & 0x400)
+	    m68k_dreg(regs, extra & 7) = dst_hi;
+	else if (dst_hi != 0) {
+	    SET_VFLG (1);
+	}
+	m68k_dreg(regs, (extra >> 12) & 7) = dst_lo;
+    }
+#endif
+}
+#ifdef NO_GDB
+static char* ccnames[] =
+{ "T","F","HI","LS","CC","CS","NE","EQ",
+  "VC","VS","PL","MI","GE","LT","GT","LE" };
+#endif /* NO_GDB */
+
+void m68k_reset (void)
+{
+#if 0 /* The CPU is always the same in TiEmu. */
+    if (currprefs.cpu_level != changed_prefs.cpu_level
+	|| currprefs.address_space_24 != changed_prefs.address_space_24)
+    {
+	currprefs.address_space_24 = changed_prefs.address_space_24;
+	currprefs.cpu_level = changed_prefs.cpu_level;
+	build_cpufunctbl ();
+    }
+#endif /* 0 */
+
+//    regs.kick_mask = 0x00F80000;
+    regs.spcflags = 0;
+#if 0
+    if (savestate_state == STATE_RESTORE) {
+        m68k_setpc (regs.pc);
+	/* MakeFromSR() must not swap stack pointer */
+	regs.s = (regs.sr >> 13) & 1;
+	MakeFromSR();
+	/* set stack pointer */
+	if (regs.s)
+	    m68k_areg(regs, 7) = regs.isp;
+	else
+	    m68k_areg(regs, 7) = regs.usp;
+	return;
+    }
+#endif /* 0 */
+
+    m68k_areg (regs, 7) = tihw.initial_ssp;
+    m68k_setpc(tihw.initial_pc);
+    regs.s = 1;
+//    regs.m = 0;
+    regs.stopped = 0;
+    regs.t1 = 0;
+//    regs.t0 = 0;
+    SET_ZFLG (0);
+    SET_XFLG (0);
+    SET_CFLG (0);
+    SET_VFLG (0);
+    SET_NFLG (0);
+    regs.intmask = 7;
+    regs.vbr = regs.sfc = regs.dfc = 0;
+    regs.fpcr = regs.fpsr = regs.fpiar = 0;
+    regs.irc = 0xffff;
+    fill_prefetch_slow ();
+}
+
+unsigned long REGPARAM2 op_illg (uae_u32 opcode)
+{
+#if 0
+    uaecptr pc = m68k_getpc ();
+    
+    if (cloanto_rom && (opcode & 0xF100) == 0x7100) {
+	m68k_dreg (regs, (opcode >> 9) & 7) = (uae_s8)(opcode & 0xFF);
+	m68k_incpc (2);
+	fill_prefetch_slow ();
+	return 4;
+    }
+
+    if (opcode == 0x4E7B && get_long (0x10) == 0 && (pc & 0xF80000) == 0xF80000) {
+	write_log ("Your Kickstart requires a 68020 CPU. Giving up.\n");
+	broken_in = 1;
+	set_special (SPCFLAG_BRK);
+	quit_program = 1;
+    }
+    if (opcode == 0xFF0D) {
+	if ((pc & 0xF80000) == 0xF80000) {
+	    /* This is from the dummy Kickstart replacement */
+	    uae_u16 arg = get_iword (2);
+	    m68k_incpc (4);
+	    ersatz_perform (arg);
+	    fill_prefetch_slow ();
+	    return 4;
+	} else if ((pc & 0xFFFF0000) == RTAREA_BASE) {
+	    /* User-mode STOP replacement */
+	    m68k_setstopped (1);
+	    return 4;
+	}
+    }
+
+    if ((opcode & 0xF000) == 0xA000 && (pc & 0xFFFF0000) == RTAREA_BASE) {
+	/* Calltrap. */
+	m68k_incpc(2);
+	call_calltrap (opcode & 0xFFF);
+	fill_prefetch_slow ();
+	return 4;
+    }
+#endif /* 0 */
+
+    if ((opcode & 0xF000) == 0xF000) {
+	Exception(0xB,0);
+	return 4;
+    }
+    if ((opcode & 0xF000) == 0xA000) {
+#if 0
+	if ((pc & 0xFFFF0000) == RTAREA_BASE) {
+	    /* Calltrap. */
+	    call_calltrap (opcode & 0xFFF);
+	}
+#endif /* 0 */
+#if defined(CYGNUS_SIM) && !defined(NO_GDB)
+	/* Ignore ER_ASAP_TOO_LONG when running a file to debug. */
+	if (symfile && opcode == 0xA000 + 161) {
+		m68k_incpc(2);
+		fill_prefetch_slow ();
+		return 4;
+	}
+#endif /* CYGNUS_SIM */
+
+	Exception(0xA,0);
+	return 4;
+    }
+#if 0
+    write_log ("Illegal instruction: %04x at %08lx\n", opcode, pc);
+#endif
+    Exception (4,0);
+    return 4;
+}
+
+void mmu_op(uae_u32 opcode, uae_u16 extra)
+{
+    if ((opcode & 0xFE0) == 0x0500) {
+	/* PFLUSH */
+	mmusr = 0;
+	write_log ("PFLUSH\n");
+    } else if ((opcode & 0x0FD8) == 0x548) {
+	/* PTEST */
+	write_log ("PTEST\n");
+    } else
+	op_illg (opcode);
+}
+
+#if 0
+static uaecptr last_trace_ad = 0;
+
+static void do_trace (void)
+{
+    if (0/*regs.t0 && currprefs.cpu_level >= 2*/) {
+	uae_u16 opcode;
+	/* should also include TRAP, CHK, SR modification FPcc */
+	/* probably never used so why bother */
+	/* We can afford this to be inefficient... */
+	m68k_setpc (m68k_getpc ());
+	fill_prefetch_slow ();
+	opcode = get_word (regs.pc);
+	if (opcode == 0x4e72 		/* RTE */
+	    || opcode == 0x4e74 		/* RTD */
+	    || opcode == 0x4e75 		/* RTS */
+	    || opcode == 0x4e77 		/* RTR */
+	    || opcode == 0x4e76 		/* TRAPV */
+	    || (opcode & 0xffc0) == 0x4e80 	/* JSR */
+	    || (opcode & 0xffc0) == 0x4ec0 	/* JMP */
+	    || (opcode & 0xff00) == 0x6100  /* BSR */
+	    || ((opcode & 0xf000) == 0x6000	/* Bcc */
+		&& cctrue((opcode >> 8) & 0xf))
+	    || ((opcode & 0xf0f0) == 0x5050 /* DBcc */
+		&& !cctrue((opcode >> 8) & 0xf)
+		&& (uae_s16)m68k_dreg(regs, opcode & 7) != 0))
+	{
+	    last_trace_ad = m68k_getpc ();
+	    unset_special (SPCFLAG_TRACE);
+	    set_special (SPCFLAG_DOTRACE);
+	}
+    } else if (regs.t1) {
+	last_trace_ad = m68k_getpc ();
+	unset_special (SPCFLAG_TRACE);
+	set_special (SPCFLAG_DOTRACE);
+    }
+}
+
+static int do_specialties (int cycles)
+{
+    if (regs.spcflags & SPCFLAG_COPPER)
+	do_copper ();
+
+    /*n_spcinsns++;*/
+    while ((regs.spcflags & SPCFLAG_BLTNASTY) && cycles > 0) {
+	int c = blitnasty();
+	if (!c) {
+	    cycles -= 2 * CYCLE_UNIT;
+	    if (cycles < CYCLE_UNIT)
+		cycles = 0;
+	    c = 1;
+	}
+	do_cycles (c * CYCLE_UNIT);
+	if (regs.spcflags & SPCFLAG_COPPER)
+	    do_copper ();
+    }
+
+    if (regs.spcflags & SPCFLAG_DOTRACE)
+	Exception (9,last_trace_ad);
+
+    while (regs.spcflags & SPCFLAG_STOP) {
+	do_cycles (4 * CYCLE_UNIT);
+	if (regs.spcflags & SPCFLAG_COPPER)
+	    do_copper ();
+	if (regs.spcflags & (SPCFLAG_INT | SPCFLAG_DOINT)) {
+	    int intr = intlev ();
+	    unset_special (SPCFLAG_INT | SPCFLAG_DOINT);
+	    if (intr != -1 && intr > regs.intmask) {
+		Interrupt (intr);
+		regs.stopped = 0;
+		unset_special (SPCFLAG_STOP);
+	    }
+	}
+    }
+    if (regs.spcflags & SPCFLAG_TRACE)
+	do_trace ();
+
+    if (regs.spcflags & SPCFLAG_DOINT) {
+	int intr = intlev ();
+	unset_special (SPCFLAG_DOINT);
+	if (intr != -1 && intr > regs.intmask) {
+	    Interrupt (intr);
+	    regs.stopped = 0;
+	}
+    }
+    if (regs.spcflags & SPCFLAG_INT) {
+	unset_special (SPCFLAG_INT);
+	set_special (SPCFLAG_DOINT);
+    }
+    if (regs.spcflags & (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE)) {
+	unset_special (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
+	return 1;
+    }
+    return 0;
+}
+
+/* It's really sad to have two almost identical functions for this, but we
+   do it all for performance... :( */
+static void m68k_run_1 (void)
+{
+    for (;;) {
+	int cycles;
+	uae_u32 opcode = regs.ir;
+
+	/* assert (!regs.stopped && !(regs.spcflags & SPCFLAG_STOP)); */
+/*	regs_backup[backup_pointer = (backup_pointer + 1) % 16] = regs;*/
+#if COUNT_INSTRS == 2
+	if (table68k[opcode].handler != -1)
+	    instrcount[table68k[opcode].handler]++;
+#elif COUNT_INSTRS == 1
+	instrcount[opcode]++;
+#endif
+	cycles = (*cpufunctbl[opcode])(opcode);
+	/*n_insns++;*/
+	cycles &= cycles_mask;
+	cycles |= cycles_val;
+	do_cycles (cycles);
+	if (regs.spcflags) {
+	    if (do_specialties (cycles))
+		return;
+	}
+    }
+}
+
+#define DEBUG_PREFETCH
+
+/* Same thing, but don't use prefetch to get opcode.  */
+static void m68k_run_2 (void)
+{
+    for (;;) {
+	int cycles;
+	uae_u32 opcode = get_iword (0);
+
+	/* assert (!regs.stopped && !(regs.spcflags & SPCFLAG_STOP)); */
+/*	regs_backup[backup_pointer = (backup_pointer + 1) % 16] = regs;*/
+#if COUNT_INSTRS == 2
+	if (table68k[opcode].handler != -1)
+	    instrcount[table68k[opcode].handler]++;
+#elif COUNT_INSTRS == 1
+	instrcount[opcode]++;
+#endif
+	cycles = (*cpufunctbl[opcode])(opcode);
+
+	/*n_insns++;*/
+	cycles &= cycles_mask;
+	cycles |= cycles_val;
+        do_cycles (cycles);
+	if (regs.spcflags) {
+	    if (do_specialties (cycles))
+		return;
+	}
+    }
+}
+
+#define m68k_run1(F) (F) ()
+
+int in_m68k_go = 0;
+
+static void exception2_handle (uaecptr addr, uaecptr fault)
+{
+    last_addr_for_exception_3 = addr;
+    last_fault_for_exception_3 = fault;
+    last_writeaccess_for_exception_3 = 0;
+    last_instructionaccess_for_exception_3 = 0;
+    Exception (2, addr);
+}
+
+void m68k_go (int may_quit)
+{
+    if (in_m68k_go || !may_quit) {
+	write_log ("Bug! m68k_go is not reentrant.\n");
+	abort ();
+    }
+
+    reset_frame_rate_hack ();
+    update_68k_cycles ();
+
+    in_m68k_go++;
+    for (;;) {
+	if (quit_program > 0) {
+	    if (quit_program == 1)
+		break;
+	    quit_program = 0;
+	    if (savestate_state == STATE_RESTORE) {
+		restore_state (savestate_filename);
+#if 0
+		activate_debugger ();
+#endif
+	    }
+	    m68k_reset ();
+	    reset_all_systems ();
+	    customreset ();
+	    /* We may have been restoring state, but we're done now.  */
+	    savestate_restore_finish ();
+	    fill_prefetch_slow ();
+	    handle_active_events ();
+	    if (regs.spcflags)
+		do_specialties (0);
+	    m68k_setpc (regs.pc);
+	}
+
+	if (debugging)
+	    debug ();
+	if (regs.panic) {
+	    regs.panic = 0;
+	    /* program jumped to non-existing memory and cpu was >= 68020 */
+	    get_real_address (regs.isp); /* stack in no one's land? -> reboot */
+	    if (regs.isp & 1)
+		regs.panic = 1;
+	    if (!regs.panic)
+		exception2_handle (regs.panic_pc, regs.panic_addr);
+	    if (regs.panic) {
+		/* system is very badly confused */
+		write_log ("double bus error or corrupted stack, forcing reboot..\n");
+		regs.panic = 0;
+		uae_reset (1);
+	    }
+	}
+	m68k_run1 (currprefs.cpu_level == 0 ? m68k_run_1 : m68k_run_2);
+    }
+    in_m68k_go--;
+}
+
+static void m68k_verify (uaecptr addr, uaecptr *nextpc)
+{
+    uae_u32 opcode, val;
+    struct instr *dp;
+
+    opcode = get_iword_1(0);
+    last_op_for_exception_3 = opcode;
+    m68kpc_offset = 2;
+
+    if (cpufunctbl[opcode] == op_illg_1) {
+	opcode = 0x4AFC;
+    }
+    dp = table68k + opcode;
+
+    if (dp->suse) {
+	if (!verify_ea (dp->sreg, dp->smode, dp->size, &val)) {
+	    Exception (3, 0);
+	    return;
+	}
+    }
+    if (dp->duse) {
+	if (!verify_ea (dp->dreg, dp->dmode, dp->size, &val)) {
+	    Exception (3, 0);
+	    return;
+	}
+    }
+}
+#endif /* 0 */
+
+#ifdef NO_GDB
+int DasmFPU(uint16_t code, char *buf);
+
+int m68k_disasm (char *output, uaecptr addr)
+{
+    char buf[273];
+    uaecptr newpc = 0;
+
+	char instrname[20],*ccpt;
+	uae_u32 opcode;
+	struct mnemolookup *lookup;
+	struct instr *dp;
+	uae_u32 orig_opcode;
+	uaecptr nextpc;
+
+	m68kpc_offset = addr - m68k_getpc ();
+	output[0] = '\0';
+
+	sprintf (buf, "%06lx: ", m68k_getpc () + m68kpc_offset);
+	strcat (output, buf);
+	opcode = get_iword_1 (m68kpc_offset);
+	orig_opcode = opcode;
+	m68kpc_offset += 2;
+	if (cpufunctbl[opcode] == op_illg_1 || (orig_opcode & 0xf000) == 0xa000 || (orig_opcode & 0xf000) == 0xf000) {
+		if(!((orig_opcode >= 0xf800) && (orig_opcode <= 0xfff2)))
+			opcode = 0x4AFC;
+	}
+	dp = table68k + opcode;
+	for (lookup = lookuptab;lookup->mnemo != dp->mnemo; lookup++)
+	    ;
+
+	strcpy (instrname, lookup->name);
+	ccpt = strstr (instrname, "cc");
+	if (ccpt != 0) {
+	    strncpy (ccpt, ccnames[dp->cc], 2);
+	}
+	strcat (output, instrname);
+	switch (dp->size)
+	{
+	 case sz_byte: strcat (output, ".B "); break;
+	 case sz_word: strcat (output, ".W "); break;
+	 case sz_long: strcat (output, ".L "); break;
+	 default: strcat (output, "   "); break;
+	}
+
+	if (dp->suse) {
+	    newpc = m68k_getpc () + m68kpc_offset;
+	    newpc += ShowEA (0, dp->sreg, dp->smode, dp->size, output);
+	}
+	if (dp->suse && dp->duse)
+	    strcat(output, ",");
+	if (dp->duse) {
+	    newpc = m68k_getpc () + m68kpc_offset;
+	    newpc += ShowEA (0, dp->dreg, dp->dmode, dp->size, output);
+	}
+	if (ccpt != 0) {
+	    if (cctrue(dp->cc)) {
+		sprintf (buf, " [%06lX] (TRUE)", newpc);
+		strcat (output, buf);
+	    } else {
+		sprintf (buf, " [%06lX] (FALSE)", newpc);
+		strcat (output, buf);
+	    }
+	} else if ((opcode & 0xff00) == 0x6100) { /* BSR */
+	    sprintf (buf, " [%s]", sym_addr (newpc));
+	    strcat (output, buf);
+	} else if((orig_opcode >= 0xf800) && (orig_opcode <= 0xfff2)) {
+		char *buffer = &(output[8]);
+		unsigned long pm;
+		uint32_t pc = m68k_getpc();	/* addr */
+
+		/* F-Line ROM calls (see KerNO doc and thanks to Lionel Debroux) */
+		switch(orig_opcode)
+		{
+		case 0xfff0:	/* 6 byte bsr w/long word displacement */
+			pm = get_ilong_1 (m68kpc_offset); m68kpc_offset += 6 - 2;
+			if (pm & 0x8000)
+				sprintf (buffer, "FLINE bsr.l *-$%lX [%lX]", (-(signed long)(int32_t)pm) - 2, pc + (signed long)(int32_t)pm + 2);
+			else
+				sprintf (buffer, "FLINE bsr.l *+$%lX [%lX]", pm + 2, pc + pm + 2);
+			break;
+		case 0xfff1:	/* 6 byte bra w/long word displacement */
+			pm = get_ilong_1 (m68kpc_offset); m68kpc_offset += 6 - 2;
+			if (pm & 0x8000)
+				sprintf (buffer, "FLINE bra.l *-$%lX [%lX]", (-(signed long)(int32_t)pm) - 2, pc + (signed long)(int32_t)pm + 2);
+			else
+				sprintf (buffer, "FLINE bra.l *+$%lX [%lX]", pm + 2, pc + pm + 2);
+			break;
+		case 0xfff2:	/* 4 byte ROM CALL */
+			pm = get_iword_1 (m68kpc_offset); m68kpc_offset += 4 - 2;
+			sprintf (buffer, "FLINE $%04x.l [%s]", pm/4, romcalls_get_name(pm / 4));
+			break;
+		case 0xffee:	/* jmp __ld_entry_point_plus_0x8000+word */
+			pm = get_iword_1 (m68kpc_offset); m68kpc_offset += 4 - 2;
+			{
+				int handle;
+				uint32_t addr;
+				
+				heap_search_for_address(pc + 2, &handle);
+				if (handle > 0) heap_get_block_addr(handle, &addr); else addr = 0;
+				sprintf (buffer, "FLINE jmp.w *+$%lX [%lX]", (signed long)(signed short)pm + 0x8000, addr + (signed long)(signed short)pm + 0x8000);
+			}
+			break;
+		case 0xffef:	/* jsr __ld_entry_point_plus_0x8000+word */
+			pm = get_iword_1 (m68kpc_offset); m68kpc_offset += 4 - 2;
+			{
+				int handle;
+				uint32_t addr;
+				
+				heap_search_for_address(pc + 2, &handle);
+				if (handle > 0) heap_get_block_addr(handle, &addr); else addr = 0;
+				sprintf (buffer, "FLINE jsr.w *+$%lX [%lX]", (signed long)(signed short)pm + 0x8000, addr + (signed long)(signed short)pm + 0x8000);
+			}
+			break;
+		case 0xf8b5:	/* 2 byte ROM call followed by an FPU opcode (special case: _bcd_math) */
+			{
+				char tmp[64];
+				pm = get_iword_1 (m68kpc_offset); m68kpc_offset += 4 - 2;
+				DasmFPU(pm, tmp);
+				sprintf (buffer, "FLINE _bcd_math (FPU: %s)", tmp);
+				break;
+			}
+		default:		/* 2 byte ROM CALL */
+			sprintf (buffer, "FLINE $%03x.w [%s]", opcode & 0x7ff, romcalls_get_name(opcode & 0x7ff));
+			break;
+		}
+	} else if ((orig_opcode & 0xf000) == 0xa000) { /* ER_throw */
+		char *buffer = &(output[8]);
+		sprintf (buffer, "ER_throw %d [%s]", opcode & 0xfff, ercodes_get_name(opcode & 0xfff));
+	} else if (opcode == 0x4AFC && orig_opcode != 0x4AFC) { /* illegal instruction, but not ILLEGAL */
+		sprintf (output, "%06lx: DC.W $%04X", addr, orig_opcode);
+		
+	}
+
+	nextpc = m68k_getpc () + m68kpc_offset;	
+	return (nextpc - addr);
+}
+#endif /* NO_GDB */
+
+#if 0
+void m68k_dumpstate (FILE *f, uaecptr *nextpc)
+{
+    int i;
+    for (i = 0; i < 8; i++){
+	fprintf (f, "D%d: %08lx ", i, m68k_dreg(regs, i));
+	if ((i & 3) == 3) fprintf (f, "\n");
+    }
+    for (i = 0; i < 8; i++){
+	fprintf (f, "A%d: %08lx ", i, m68k_areg(regs, i));
+	if ((i & 3) == 3) fprintf (f, "\n");
+    }
+    if (regs.s == 0) regs.usp = m68k_areg(regs, 7);
+    if (regs.s && regs.m) regs.msp = m68k_areg(regs, 7);
+    if (regs.s && regs.m == 0) regs.isp = m68k_areg(regs, 7);
+    fprintf (f, "USP=%08lx ISP=%08lx MSP=%08lx VBR=%08lx\n",
+	     regs.usp,regs.isp,regs.msp,regs.vbr);
+    fprintf (f, "T=%d%d S=%d M=%d X=%d N=%d Z=%d V=%d C=%d IMASK=%d\n",
+	     regs.t1, regs.t0, regs.s, regs.m,
+	     GET_XFLG, GET_NFLG, GET_ZFLG, GET_VFLG, GET_CFLG, regs.intmask);
+    for (i = 0; i < 8; i++){
+	fprintf (f, "FP%d: %g ", i, regs.fp[i]);
+	if ((i & 3) == 3) fprintf (f, "\n");
+    }
+    fprintf (f, "N=%d Z=%d I=%d NAN=%d\n",
+	     (regs.fpsr & 0x8000000) != 0,
+	     (regs.fpsr & 0x4000000) != 0,
+	     (regs.fpsr & 0x2000000) != 0,
+	     (regs.fpsr & 0x1000000) != 0);
+
+    m68k_disasm (f, m68k_getpc (), nextpc, 1);
+    if (nextpc)
+	fprintf (f, "next PC: %08lx\n", *nextpc);
+}
+
+
+/* CPU save/restore code */
+
+#define CPUTYPE_EC 1
+#define CPUMODE_HALT 1
+
+uae_u8 *restore_cpu (uae_u8 *src)
+{
+    int i,model,flags;
+    uae_u32 l;
+
+    model = restore_u32();
+    switch (model) {
+    case 68000:
+	currprefs.cpu_level = 0;
+	break;
+    case 68010:
+	currprefs.cpu_level = 1;
+	break;
+    case 68020:
+	currprefs.cpu_level = 2;
+	break;
+    default:
+	write_log ("Unknown cpu type %d\n", model);
+	break;
+    }
+
+    flags = restore_u32();
+    currprefs.address_space_24 = 0;
+    if (flags & CPUTYPE_EC)
+	currprefs.address_space_24 = 1;
+    for (i = 0; i < 15; i++)
+	regs.regs[i] = restore_u32 ();
+    regs.pc = restore_u32 ();
+    regs.irc = restore_u16 ();
+    regs.ir = restore_u16 ();
+    regs.usp = restore_u32 ();
+    regs.isp = restore_u32 ();
+    regs.sr = restore_u16 ();
+    l = restore_u32();
+    if (l & CPUMODE_HALT) {
+	regs.stopped = 1;
+	set_special (SPCFLAG_STOP);
+    } else
+	regs.stopped = 0;
+    if (model >= 68010) {
+	regs.dfc = restore_u32 ();
+	regs.sfc = restore_u32 ();
+	regs.vbr = restore_u32 ();
+    }
+    if (model >= 68020) {
+	caar = restore_u32 ();
+	cacr = restore_u32 ();
+	regs.msp = restore_u32 ();
+    }
+    write_log ("CPU %d%s%03d, PC=%08.8X\n",
+	       model/1000, flags & 1 ? "EC" : "", model % 1000, regs.pc);
+
+    return src;
+}
+
+static int cpumodel[] = { 68000, 68010, 68020, 68020 };
+
+uae_u8 *save_cpu (int *len, uae_u8 *dstptr)
+{
+    uae_u8 *dstbak,*dst;
+    int model,i;
+
+    if (dstptr)
+	dstbak = dst = dstptr;
+    else
+    dstbak = dst = malloc(4+4+15*4+4+4+4+4+2+4+4+4+4+4+4+4);
+    model = cpumodel[currprefs.cpu_level];
+    save_u32 (model);					/* MODEL */
+    save_u32 (currprefs.address_space_24 ? 1 : 0);	/* FLAGS */
+    for(i = 0;i < 15; i++) save_u32 (regs.regs[i]);	/* D0-D7 A0-A6 */
+    save_u32 (m68k_getpc ());				/* PC */
+    save_u16 (regs.irc);				/* prefetch */
+    save_u16 (regs.ir);					/* instruction prefetch */
+    MakeSR ();
+    save_u32 (!regs.s ? regs.regs[15] : regs.usp);	/* USP */
+    save_u32 (regs.s ? regs.regs[15] : regs.isp);	/* ISP */
+    save_u16 (regs.sr);				/* SR/CCR */
+    save_u32 (regs.stopped ? CPUMODE_HALT : 0);	/* flags */
+    if(model >= 68010) {
+	save_u32 (regs.dfc);				/* DFC */
+	save_u32 (regs.sfc);				/* SFC */
+	save_u32 (regs.vbr);				/* VBR */
+    }
+    if(model >= 68020) {
+	save_u32 (caar);				/* CAAR */
+	save_u32 (cacr);				/* CACR */
+	save_u32 (regs.msp);				/* MSP */
+    }
+    *len = dst - dstbak;
+    return dstbak;
+}
+#endif /* 0 */
+
+static void exception3f (uae_u32 opcode, uaecptr addr, uaecptr fault, int writeaccess, int instructionaccess)
+{
+    last_addr_for_exception_3 = addr;
+    last_fault_for_exception_3 = fault;
+    last_op_for_exception_3 = opcode;
+    last_writeaccess_for_exception_3 = writeaccess;
+    last_instructionaccess_for_exception_3 = instructionaccess;
+    Exception (3, fault);
+}
+
+void exception3 (uae_u32 opcode, uaecptr addr, uaecptr fault)
+{
+    exception3f (opcode, addr, fault, 0, 0);
+}
+
+void exception3i (uae_u32 opcode, uaecptr addr, uaecptr fault)
+{
+    exception3f (opcode, addr, fault, 0, 1);
+}
+
+#if 0
+void exception2 (uaecptr addr, uaecptr fault)
+{
+    write_log ("delayed exception2!\n");
+    regs.panic_pc = m68k_getpc();
+    regs.panic_addr = addr;
+    regs.panic = 2;
+    set_special (SPCFLAG_BRK);
+    m68k_setpc (0xf80000);
+    fill_prefetch_slow ();
+}
+
+void cpureset (void)
+{
+    customreset ();
+#if 0
+    uae_u16 ins;
+    if (currprefs.cpu_level == 0 && (currprefs.cpu_compatible || currprefs.cpu_cycle_exact)) {
+	customreset ();
+	return;
+    }
+    ins = get_word (m68k_getpc() + 2);
+    if ((ins & ~7) == 0x4ed0) {
+	int reg = ins & 7;
+	uae_u32 addr = m68k_areg (regs, reg);
+	write_log ("reset/jmp (ax) combination emulated\n");
+	customreset ();
+	if (addr < 0x80000)
+	    addr += 0xf80000;
+	m68k_setpc (addr);
+    }
+#endif
+}
+#endif /* 0 */
+
diff --git a/src/core/uae/newcpu.h b/src/core/uae/newcpu.h
new file mode 100644
index 0000000..4497587
--- /dev/null
+++ b/src/core/uae/newcpu.h
@@ -0,0 +1,323 @@
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * MC68000 emulation
+  *
+  * Copyright 1995 Bernd Schmidt
+  * $Id: newcpu.h 2085 2006-05-16 19:28:18Z roms $
+  */
+
+#include "readcpu.h"
+#include "machdep/maccess.h"
+
+#define CYGNUS_SIM 1
+
+#define SPCFLAG_DBTRACE 1
+#define SPCFLAG_DBSKIP 2
+#define SPCFLAG_STOP 4
+#define SPCFLAG_INT  8
+#define SPCFLAG_BRK  16
+#define SPCFLAG_TRACE 32
+#define SPCFLAG_DOTRACE 64
+#define SPCFLAG_DOINT 128
+#define SPCFLAG_ADRERR 256
+#define SPCFLAG_MODE_CHANGE 512
+
+#ifndef SET_CFLG
+
+#define SET_CFLG(x) (CFLG = (x))
+#define SET_NFLG(x) (NFLG = (x))
+#define SET_VFLG(x) (VFLG = (x))
+#define SET_ZFLG(x) (ZFLG = (x))
+#define SET_XFLG(x) (XFLG = (x))
+
+#define GET_CFLG CFLG
+#define GET_NFLG NFLG
+#define GET_VFLG VFLG
+#define GET_ZFLG ZFLG
+#define GET_XFLG XFLG
+
+#define CLEAR_CZNV do { \
+ SET_CFLG (0); \
+ SET_ZFLG (0); \
+ SET_NFLG (0); \
+ SET_VFLG (0); \
+} while (0)
+
+#define COPY_CARRY (SET_XFLG (GET_CFLG))
+#endif
+
+extern int areg_byteinc[];
+extern int imm8_table[];
+
+extern int movem_index1[256];
+extern int movem_index2[256];
+extern int movem_next[256];
+
+extern int fpp_movem_index1[256];
+extern int fpp_movem_index2[256];
+extern int fpp_movem_next[256];
+
+extern int broken_in;
+
+extern int uae_initial_pc;
+extern int currIntLev;
+extern void Interrupt(int);
+
+typedef unsigned long cpuop_func (uae_u32) REGPARAM;
+
+struct cputbl {
+    cpuop_func *handler;
+    int specific;
+    uae_u16 opcode;
+};
+
+extern unsigned long op_illg (uae_u32) REGPARAM;
+
+typedef char flagtype;
+
+/* You can set this to long double to be more accurate. However, the
+   resulting alignment issues will cost a lot of performance in some
+   apps */
+#define USE_LONG_DOUBLE 0
+
+#if USE_LONG_DOUBLE
+typedef long double fptype;
+#else
+typedef double fptype;
+#endif
+
+struct flag_struct {
+    unsigned int c;
+    unsigned int z;
+    unsigned int n;
+    unsigned int v; 
+    unsigned int x;
+};
+
+extern struct regstruct
+{
+    uae_u32 regs[16];
+    uaecptr usp,isp/*,msp*/;
+    uae_u16 sr;
+    flagtype t1;
+//    flagtype t0;
+    flagtype s;
+//    flagtype m;
+    flagtype x;
+    flagtype stopped;
+    struct flag_struct flags;
+    int intmask;
+
+    uae_u32 pc;
+    uae_u8 *pc_p;
+    uae_u8 *pc_oldp;
+
+    uae_u32 vbr,sfc,dfc;
+
+    fptype fp[8];
+    fptype fp_result;
+
+    uae_u32 fpcr,fpsr,fpiar;
+    uae_u32 fpsr_highbyte;
+
+    uae_u32 spcflags;
+    uae_u32 kick_mask;
+    uae_u32 address_space_mask;
+    uae_u16 irc, ir;
+
+    uae_u8 panic;
+    uae_u32 panic_pc, panic_addr;
+
+#if CYGNUS_SIM
+  /* NOTE stuff related to simulator framework */
+
+    /* NOTE need to have m68k performance information here */
+
+    unsigned char *insn_end;
+
+    /* NOTE control information */
+
+    int prevlock;
+    int thislock;
+    int exception;
+
+    int end_of_registers;
+
+    /* NOTE simulator information */
+    int msize;
+#define PROFILE_FREQ 1
+#define PROFILE_SHIFT 2
+    int profile;
+    unsigned short *profile_hist;
+    unsigned char *memory;
+    int xyram_select, xram_start, yram_start;
+    unsigned char *xmem;
+    unsigned char *ymem;
+    unsigned char *xmem_offset;
+    unsigned char *ymem_offset;
+#endif /* CYGNUS_SIM */
+} regs, lastint_regs;
+
+#include "machdep/m68k.h"
+
+#if CYGNUS_SIM
+extern int trace;
+#endif /* CYGNUS_SIM */
+
+STATIC_INLINE uae_u32 munge24(uae_u32 x)
+{
+    return x & regs.address_space_mask;
+}
+
+STATIC_INLINE void set_special (uae_u32 x)
+{
+    regs.spcflags |= x;
+}
+
+STATIC_INLINE void unset_special (uae_u32 x)
+{
+    regs.spcflags &= ~x;
+}
+
+#define m68k_dreg(r,num) ((r).regs[(num)])
+#define m68k_areg(r,num) (((r).regs + 8)[(num)])
+
+STATIC_INLINE void m68k_setpc (uaecptr newpc)
+{
+    regs.pc_p = regs.pc_oldp = get_real_address (newpc);
+    regs.pc = newpc & 0xffffff;
+}
+
+STATIC_INLINE uaecptr m68k_getpc (void)
+{
+    return regs.pc + ((char *)regs.pc_p - (char *)regs.pc_oldp);
+}
+
+STATIC_INLINE uaecptr m68k_getpc_p (uae_u8 *p)
+{
+    return regs.pc + ((char *)p - (char *)regs.pc_oldp);
+}
+
+#define get_ibyte(o) do_get_mem_byte((uae_u8 *)(regs.pc_p + (o) + 1))
+#define get_iword(o) do_get_mem_word((uae_u16 *)(regs.pc_p + (o)))
+#define get_ilong(o) do_get_mem_long((uae_u32 *)(regs.pc_p + (o)))
+
+#define m68k_incpc(o) (regs.pc_p += (o))
+
+/* These are only used by the 68020/68881 code, and therefore don't
+ * need to handle prefetch.  */
+STATIC_INLINE uae_u32 next_ibyte (void)
+{
+    uae_u32 r = get_ibyte (0);
+    m68k_incpc (2);
+    return r;
+}
+
+STATIC_INLINE uae_u32 next_iword (void)
+{
+    uae_u32 r = get_iword (0);
+    m68k_incpc (2);
+    return r;
+}
+
+STATIC_INLINE uae_u32 next_ilong (void)
+{
+    uae_u32 r = get_ilong (0);
+    m68k_incpc (4);
+    return r;
+}
+
+STATIC_INLINE void m68k_do_rts(void)
+{
+    m68k_setpc(get_long(m68k_areg(regs, 7)));
+    m68k_areg(regs, 7) += 4;
+}
+
+STATIC_INLINE void m68k_do_bsr(uaecptr oldpc, uae_s32 offset)
+{
+    m68k_areg(regs, 7) -= 4;
+    put_long(m68k_areg(regs, 7), oldpc);
+    m68k_incpc(offset);
+}
+
+STATIC_INLINE void m68k_do_jsr(uaecptr oldpc, uaecptr dest)
+{
+    m68k_areg(regs, 7) -= 4;
+    put_long(m68k_areg(regs, 7), oldpc);
+    m68k_setpc(dest);
+}
+
+STATIC_INLINE void m68k_setstopped (int stop)
+{
+    regs.stopped = stop;
+    /* A traced STOP instruction drops through immediately without
+       actually stopping.  */
+    if (stop && (regs.spcflags & SPCFLAG_DOTRACE) == 0)
+	regs.spcflags |= SPCFLAG_STOP;
+}
+
+extern uae_u32 get_disp_ea_020 (uae_u32 base, uae_u32 dp);
+extern uae_u32 get_disp_ea_000 (uae_u32 base, uae_u32 dp);
+
+extern uae_s32 ShowEA (FILE *, int reg, amodes mode, wordsizes size, char *buf);
+
+extern void MakeSR (void);
+extern void MakeFromSR (void);
+extern void Exception (int, uaecptr);
+extern void dump_counts (void);
+extern int m68k_move2c (int, uae_u32 *);
+extern int m68k_movec2 (int, uae_u32 *);
+extern void m68k_divl (uae_u32, uae_u32, uae_u16, uaecptr);
+extern void m68k_mull (uae_u32, uae_u32, uae_u16);
+extern void init_m68k (void);
+extern void m68k_go (int);
+#if 0
+extern void m68k_dumpstate (FILE *, uaecptr *);
+#endif /* 0 */
+#ifdef NO_GDB
+extern int m68k_disasm (char *, uaecptr);
+#endif /* NO_GDB */
+extern void m68k_reset (void);
+extern int intlev(void);
+
+extern void mmu_op (uae_u32, uae_u16);
+
+extern void fpp_opp (uae_u32, uae_u16);
+extern void fdbcc_opp (uae_u32, uae_u16);
+extern void fscc_opp (uae_u32, uae_u16);
+extern void ftrapcc_opp (uae_u32,uaecptr);
+extern void fbcc_opp (uae_u32, uaecptr, uae_u32);
+extern void fsave_opp (uae_u32);
+extern void frestore_opp (uae_u32);
+
+extern void exception3 (uae_u32 opcode, uaecptr addr, uaecptr fault);
+extern void exception3i (uae_u32 opcode, uaecptr addr, uaecptr fault);
+#if 0
+extern void exception2 (uaecptr addr, uaecptr fault);
+extern void cpureset (void);
+#endif /* 0 */
+
+extern void fill_prefetch_slow (void);
+
+#define CPU_OP_NAME(a) op ## a
+
+/* 68040 */
+extern struct cputbl op_smalltbl_0_ff[];
+/* 68020 + 68881 */
+extern struct cputbl op_smalltbl_1_ff[];
+/* 68020 */
+extern struct cputbl op_smalltbl_2_ff[];
+/* 68010 */
+extern struct cputbl op_smalltbl_3_ff[];
+/* 68000 */
+extern struct cputbl op_smalltbl_4_ff[];
+/* 68000 slow but compatible.  */
+extern struct cputbl op_smalltbl_5_ff[];
+
+extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl");
+
+#ifdef JIT
+#else
+#define flush_icache(X) do {} while (0)
+#endif
diff --git a/src/core/uae/options.h b/src/core/uae/options.h
new file mode 100644
index 0000000..dc9b008
--- /dev/null
+++ b/src/core/uae/options.h
@@ -0,0 +1,290 @@
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * Stuff
+  *
+  * Copyright 1995, 1996 Ed Hanway
+  * Copyright 1995-2001 Bernd Schmidt
+  * $Id: options.h 2009 2006-02-25 06:33:50Z kevinkofler $
+  */
+
+#include <stdio.h> // FILE
+
+#define UAEMAJOR 0
+#define UAEMINOR 8
+#define UAESUBREV 25
+
+#if 0
+typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;
+
+extern long int version;
+
+struct uaedev_mount_info;
+
+struct strlist {
+    struct strlist *next;
+    char *str;
+};
+
+/* maximum number native input devices supported (single type) */
+#define MAX_INPUT_DEVICES 6
+/* maximum number of native input device's buttons and axles supported */
+#define MAX_INPUT_DEVICE_EVENTS 256
+/* 4 different customization settings */
+#define MAX_INPUT_SETTINGS 4
+#define MAX_INPUT_SUB_EVENT 4
+#define MAX_INPUT_SIMULTANEOUS_KEYS 4
+
+struct uae_input_device {
+    char *name;
+    uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
+    char *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
+    uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
+    uae_s16 extra[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS];
+    uae_u8 enabled;
+};
+#endif
+
+struct uae_prefs {
+#if 0
+    struct strlist *unknown_lines;
+
+    char description[256];
+    char info[256];
+
+    int illegal_mem;
+    int no_xhair;
+    int use_serial;
+    int serial_demand;
+    int parallel_demand;
+    int use_gfxlib;
+    int socket_emu;
+
+    int start_debugger;
+    int start_gui;
+
+    KbdLang keyboard_lang;
+    int allow_save;
+    int emul_accuracy;
+    int test_drawing_speed;
+
+    int produce_sound;
+    int sound_stereo;
+    int mixed_stereo;
+    int sound_bits;
+    int sound_freq;
+    int sound_minbsiz;
+    int sound_maxbsiz;
+    int sound_pri_time;
+    int sound_pri_cutoff;
+    int sound_interpol;
+
+    int gfx_framerate;
+    int gfx_width;
+    int gfx_height;
+    int gfx_lores;
+    int gfx_linedbl;
+    int gfx_correct_aspect;
+    int gfx_afullscreen;
+    int gfx_pfullscreen;
+    int gfx_xcenter;
+    int gfx_ycenter;
+    int color_mode;
+
+    int blits_32bit_enabled;
+    int immediate_blits;
+    unsigned int chipset_mask;
+    int ntscmode;
+    int collision_level;
+    int leds_on_screen;
+
+    char df[4][256];
+    char romfile[256];
+    char romextfile[256];
+    char keyfile[256];
+    char prtname[256];
+    char sername[256];
+
+    char path_floppy[256];
+    char path_hardfile[256];
+    char path_rom[256];
+
+    int m68k_speed;
+#endif
+    int cpu_level;
+    int cpu_compatible;
+    int address_space_24;
+
+#if 0
+    uae_u32 z3fastmem_size;
+    uae_u32 fastmem_size;
+    uae_u32 chipmem_size;
+    uae_u32 bogomem_size;
+    uae_u32 a3000mem_size;
+    uae_u32 gfxmem_size;
+
+    int kickshifter;
+
+    struct uaedev_mount_info *mountinfo;
+
+    int nr_floppies;
+    int dfxtype[4];
+
+    /* Target specific options */
+    int x11_use_low_bandwidth;
+    int x11_use_mitshm;
+    int x11_use_dgamode;
+    int x11_hide_cursor;
+    int svga_no_linear;
+    int win32_middle_mouse;
+    int win32_logfile;
+    int win32_iconified_nospeed;
+    int win32_iconified_nosound;
+    int curses_reverse_video;
+    int win32_no_overlay; /* If this is set, we won't try and use any RGB overlays */
+    int win32_automount_drives;
+
+    int curses_reverse_video;
+
+    int jport0;
+    int jport1;
+    int input_selected_setting;
+    int input_joymouse_multiplier;
+    int input_joymouse_deadzone;
+    int input_joystick_deadzone;
+    int input_joymouse_speed;
+    int input_autofire_framecnt;
+    int input_mouse_speed;
+    struct uae_input_device joystick_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
+    struct uae_input_device mouse_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
+    struct uae_input_device keyboard_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
+
+#endif
+};
+
+#if 0
+/* Contains the filename of .uaerc */
+extern char optionsfile[];
+extern void save_options (FILE *, struct uae_prefs *);
+
+extern void default_prefs (struct uae_prefs *);
+extern void discard_prefs (struct uae_prefs *);
+
+extern int parse_cmdline_option (char, char *);
+
+extern int cfgfile_yesno (char *option, char *value, char *name, int *location);
+extern int cfgfile_intval (char *option, char *value, char *name, int *location, int scale);
+extern int cfgfile_strval (char *option, char *value, char *name, int *location, const char *table[], int more);
+extern int cfgfile_string (char *option, char *value, char *name, char *location, int maxsz);
+extern char *cfgfile_subst_path (const char *path, const char *subst, const char *file);
+
+extern int target_parse_option (struct uae_prefs *, char *option, char *value);
+extern void target_save_options (FILE *, struct uae_prefs *);
+
+extern int cfgfile_load (struct uae_prefs *, const char *filename);
+extern int cfgfile_save (struct uae_prefs *, const char *filename);
+extern void cfgfile_parse_line (struct uae_prefs *p, char *);
+extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value);
+extern int cfgfile_get_description (const char *filename, char *description);
+extern void cfgfile_show_usage (void);
+
+extern void fixup_prefs_dimensions (struct uae_prefs *prefs);
+
+extern void check_prefs_changed_custom (void);
+extern void check_prefs_changed_cpu (void);
+extern void check_prefs_changed_audio (void);
+extern int check_prefs_changed_gfx (void);
+
+extern struct uae_prefs currprefs, changed_prefs;
+
+extern void machdep_init (void);
+
+/* AIX doesn't think it is Unix. Neither do I. */
+#if defined(_ALL_SOURCE) || defined(_AIX)
+#undef __unix
+#define __unix
+#endif
+
+#define MAX_COLOR_MODES 5
+
+/* #define NEED_TO_DEBUG_BADLY */
+
+#if !defined(USER_PROGRAMS_BEHAVE)
+#define USER_PROGRAMS_BEHAVE 0
+#endif
+
+/* Some memsets which know that they can safely overwrite some more memory
+ * at both ends and use that knowledge to align the pointers. */
+
+#define QUADRUPLIFY(c) (((c) | ((c) << 8)) | (((c) | ((c) << 8)) << 16))
+
+/* When you call this routine, bear in mind that it rounds the bounds and
+ * may need some padding for the array. */
+
+#define fuzzy_memset(p, c, o, l) fuzzy_memset_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 4) >> 2)
+STATIC_INLINE void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len)
+{
+    uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
+    int a = len & 7;
+    len >>= 3;
+    switch (a) {
+     case 7: p2--; goto l1;
+     case 6: p2-=2; goto l2;
+     case 5: p2-=3; goto l3;
+     case 4: p2-=4; goto l4;
+     case 3: p2-=5; goto l5;
+     case 2: p2-=6; goto l6;
+     case 1: p2-=7; goto l7;
+     case 0: if (!--len) return; break;
+    }
+
+    for (;;) {
+	p2[0] = c;
+	l1:
+	p2[1] = c;
+	l2:
+	p2[2] = c;
+	l3:
+	p2[3] = c;
+	l4:
+	p2[4] = c;
+	l5:
+	p2[5] = c;
+	l6:
+	p2[6] = c;
+	l7:
+	p2[7] = c;
+
+	if (!len)
+	    break;
+	len--;
+	p2 += 8;
+    }
+}
+
+/* This one knows it will never be asked to clear more than 32 bytes.  Make sure you call this with a
+   constant for the length.  */
+#define fuzzy_memset_le32(p, c, o, l) fuzzy_memset_le32_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 7) >> 2)
+STATIC_INLINE void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len)
+{
+    uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
+
+    switch (len) {
+     case 9: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; p2[8] = c; break;
+     case 8: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; break;
+     case 7: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; break;
+     case 6: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; break;
+     case 5: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; break;
+     case 4: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; break;
+     case 3: p2[0] = c; p2[1] = c; p2[2] = c; break;
+     case 2: p2[0] = c; p2[1] = c; break;
+     case 1: p2[0] = c; break;
+     case 0: break;
+     default: printf("Hit the programmer.\n"); break;
+    }
+}
+
+#if defined(AMIGA) && defined(__GNUC__)
+#include "od-amiga/amiga-kludges.h"
+#endif
+#endif /* 0 */
diff --git a/src/core/uae/readcpu.c b/src/core/uae/readcpu.c
new file mode 100644
index 0000000..0b649fb
--- /dev/null
+++ b/src/core/uae/readcpu.c
@@ -0,0 +1,860 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: readcpu.c 2681 2007-11-20 18:01:02Z roms $ */
+
+/*
+ * UAE - The Un*x Amiga Emulator
+ *
+ * Read 68000 CPU specs from file "table68k"
+ *
+ * Copyright 1995,1996 Bernd Schmidt
+ */
+
+#include <stdlib.h>
+#include "sysdeps.h"
+#include <ctype.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "readcpu.h"
+
+int nr_cpuop_funcs;
+
+struct mnemolookup lookuptab[] = {
+	{ i_MOVEQ,"MOVEQ" },
+	{ i_ADDQ, "ADDQ" },
+	{ i_SUBQ, "SUBQ" },	
+	{ i_CMPI, "CMPI" },
+	{ i_ADDI, "ADDI" },
+	{ i_SUBI, "SUBI" },	
+	{ i_ORI,  "ORI"  },
+	{ i_ANDI, "ANDI" },
+	{ i_EORI, "EORI" },
+
+    { i_ILLG, "ILLEGAL" },
+    { i_OR, "OR" },
+    { i_CHK, "CHK" },
+    { i_CHK2, "CHK2" },
+    { i_AND, "AND" },
+    { i_EOR, "EOR" },
+    { i_ORSR, "ORSR" },
+    { i_ANDSR, "ANDSR" },
+    { i_EORSR, "EORSR" },
+    { i_SUB, "SUB" },
+    { i_SUBA, "SUBA" },
+    { i_SUBX, "SUBX" },
+    { i_SBCD, "SBCD" },
+    { i_ADD, "ADD" },
+    { i_ADDA, "ADDA" },
+    { i_ADDX, "ADDX" },
+    { i_ABCD, "ABCD" },
+    { i_NEG, "NEG" },
+    { i_NEGX, "NEGX" },
+    { i_NBCD, "NBCD" },
+    { i_CLR, "CLR" },
+    { i_NOT, "NOT" },
+    { i_TST, "TST" },
+    { i_BTST, "BTST" },
+    { i_BCHG, "BCHG" },
+    { i_BCLR, "BCLR" },
+    { i_BSET, "BSET" },
+    { i_CMP, "CMP" },
+    { i_CMPM, "CMPM" },
+    { i_CMPA, "CMPA" },
+    { i_MVPRM, "MVPRM" },
+    { i_MVPMR, "MVPMR" },
+    { i_MOVE, "MOVE" },
+    { i_MOVEA, "MOVEA" },
+    { i_MVSR2, "MVSR2" },
+    { i_MV2SR, "MV2SR" },
+    { i_SWAP, "SWAP" },
+    { i_EXG, "EXG" },
+    { i_EXT, "EXT" },
+    { i_MVMEL, "MVMEL" },
+    { i_MVMLE, "MVMLE" },
+    { i_TRAP, "TRAP" },
+    { i_MVR2USP, "MVR2USP" },
+    { i_MVUSP2R, "MVUSP2R" },
+    { i_NOP, "NOP" },
+    { i_RESET, "RESET" },
+    { i_RTE, "RTE" },
+    { i_RTD, "RTD" },
+    { i_LINK, "LINK" },
+    { i_UNLK, "UNLK" },
+    { i_RTS, "RTS" },
+    { i_STOP, "STOP" },
+    { i_TRAPV, "TRAPV" },
+    { i_RTR, "RTR" },
+    { i_JSR, "JSR" },
+    { i_JMP, "JMP" },
+    { i_BSR, "BSR" },
+    { i_Bcc, "Bcc" },
+    { i_LEA, "LEA" },
+    { i_PEA, "PEA" },
+    { i_DBcc, "DBcc" },
+    { i_Scc, "Scc" },
+    { i_DIVU, "DIVU" },
+    { i_DIVS, "DIVS" },
+    { i_MULU, "MULU" },
+    { i_MULS, "MULS" },
+    { i_ASR, "ASR" },
+    { i_ASL, "ASL" },
+    { i_LSR, "LSR" },
+    { i_LSL, "LSL" },
+    { i_ROL, "ROL" },
+    { i_ROR, "ROR" },
+    { i_ROXL, "ROXL" },
+    { i_ROXR, "ROXR" },
+    { i_ASRW, "ASRW" },
+    { i_ASLW, "ASLW" },
+    { i_LSRW, "LSRW" },
+    { i_LSLW, "LSLW" },
+    { i_ROLW, "ROLW" },
+    { i_RORW, "RORW" },
+    { i_ROXLW, "ROXLW" },
+    { i_ROXRW, "ROXRW" },
+
+    { i_MOVE2C, "MOVE2C" },
+    { i_MOVEC2, "MOVEC2" },
+    { i_CAS, "CAS" },
+    { i_CAS2, "CAS2" },
+    { i_MULL, "MULL" },
+    { i_DIVL, "DIVL" },
+    { i_BFTST, "BFTST" },
+    { i_BFEXTU, "BFEXTU" },
+    { i_BFCHG, "BFCHG" },
+    { i_BFEXTS, "BFEXTS" },
+    { i_BFCLR, "BFCLR" },
+    { i_BFFFO, "BFFFO" },
+    { i_BFSET, "BFSET" },
+    { i_BFINS, "BFINS" },
+    { i_PACK, "PACK" },
+    { i_UNPK, "UNPK" },
+    { i_TAS, "TAS" },
+    { i_BKPT, "BKPT" },
+    { i_CALLM, "CALLM" },
+    { i_RTM, "RTM" },
+    { i_TRAPcc, "TRAPcc" },
+    { i_MOVES, "MOVES" },
+    { i_FPP, "FPP" },
+    { i_FDBcc, "FDBcc" },
+    { i_FScc, "FScc" },
+    { i_FTRAPcc, "FTRAPcc" },
+    { i_FBcc, "FBcc" },
+    { i_FBcc, "FBcc" },
+    { i_FSAVE, "FSAVE" },
+    { i_FRESTORE, "FRESTORE" },
+
+    { i_CINVL, "CINVL" },
+    { i_CINVP, "CINVP" },
+    { i_CINVA, "CINVA" },
+    { i_CPUSHL, "CPUSHL" },
+    { i_CPUSHP, "CPUSHP" },
+    { i_CPUSHA, "CPUSHA" },
+    { i_MOVE16, "MOVE16" },
+
+    { i_MMUOP, "MMUOP" },
+    { i_ILLG, "" },
+};
+
+struct instr *table68k = NULL;
+
+STATIC_INLINE amodes mode_from_str (const char *str)
+{
+    if (strncmp (str, "Dreg", 4) == 0) return Dreg;
+    if (strncmp (str, "Areg", 4) == 0) return Areg;
+    if (strncmp (str, "Aind", 4) == 0) return Aind;
+    if (strncmp (str, "Apdi", 4) == 0) return Apdi;
+    if (strncmp (str, "Aipi", 4) == 0) return Aipi;
+    if (strncmp (str, "Ad16", 4) == 0) return Ad16;
+    if (strncmp (str, "Ad8r", 4) == 0) return Ad8r;
+    if (strncmp (str, "absw", 4) == 0) return absw;
+    if (strncmp (str, "absl", 4) == 0) return absl;
+    if (strncmp (str, "PC16", 4) == 0) return PC16;
+    if (strncmp (str, "PC8r", 4) == 0) return PC8r;
+    if (strncmp (str, "Immd", 4) == 0) return imm;
+    abort ();
+    return 0;
+}
+
+STATIC_INLINE amodes mode_from_mr (int mode, int reg)
+{
+    switch (mode) {
+     case 0: return Dreg;
+     case 1: return Areg;
+     case 2: return Aind;
+     case 3: return Aipi;
+     case 4: return Apdi;
+     case 5: return Ad16;
+     case 6: return Ad8r;
+     case 7:
+	switch (reg) {
+	 case 0: return absw;
+	 case 1: return absl;
+	 case 2: return PC16;
+	 case 3: return PC8r;
+	 case 4: return imm;
+	 case 5:
+	 case 6:
+	 case 7: return am_illg;
+	}
+    }
+    abort ();
+    return 0;
+}
+
+static void build_insn (int insn)
+{
+    int find = -1;
+    int variants;
+    int isjmp = 0;
+    struct instr_def id;
+    const char *opcstr;
+    int i;
+
+    int flaglive = 0, flagdead = 0;
+
+    id = defs68k[insn];
+
+    /* Note: We treat anything with unknown flags as a jump. That
+       is overkill, but "the programmer" was lazy quite often, and
+       *this* programmer can't be bothered to work out what can and
+       can't trap. Usually, this will be overwritten with the gencomp
+       based information, anyway. */
+
+    for (i = 0; i < 5; i++) {
+	switch (id.flaginfo[i].flagset){
+	case fa_unset: break;
+	case fa_isjmp: isjmp = 1; break;
+	case fa_isbranch: isjmp = 1; break;
+	case fa_zero: flagdead |= 1 << i; break;
+	case fa_one: flagdead |= 1 << i; break;
+	case fa_dontcare: flagdead |= 1 << i; break;
+	case fa_unknown: isjmp = 1; flagdead = -1; goto out1;
+	case fa_set: flagdead |= 1 << i; break;
+	}
+    }
+
+  out1:
+    for (i = 0; i < 5; i++) {
+	switch (id.flaginfo[i].flaguse) {
+	case fu_unused: break;
+	case fu_isjmp: isjmp = 1; flaglive |= 1 << i; break;
+	case fu_maybecc: isjmp = 1; flaglive |= 1 << i; break;
+	case fu_unknown: isjmp = 1; flaglive |= 1 << i; break;
+	case fu_used: flaglive |= 1 << i; break;
+	}
+    }
+  out2:
+
+    opcstr = id.opcstr;
+    for (variants = 0; variants < (1 << id.n_variable); variants++) {
+	int bitcnt[lastbit];
+	int bitval[lastbit];
+	int bitpos[lastbit];
+	int i;
+	uae_u16 opc = id.bits;
+	uae_u16 msk, vmsk;
+	int pos = 0;
+	int mnp = 0;
+	int bitno = 0;
+	char mnemonic[10];
+
+	wordsizes sz = sz_long;
+	int srcgather = 0, dstgather = 0;
+	int usesrc = 0, usedst = 0;
+	int srctype = 0;
+	int srcpos = -1, dstpos = -1;
+
+	amodes srcmode = am_unknown, destmode = am_unknown;
+	int srcreg = -1, destreg = -1;
+
+	for (i = 0; i < lastbit; i++)
+	    bitcnt[i] = bitval[i] = 0;
+
+	vmsk = 1 << id.n_variable;
+
+	for (i = 0, msk = 0x8000; i < 16; i++, msk >>= 1) {
+	    if (!(msk & id.mask)) {
+		int currbit = id.bitpos[bitno++];
+		int bit_set;
+		vmsk >>= 1;
+		bit_set = variants & vmsk ? 1 : 0;
+		if (bit_set)
+		    opc |= msk;
+		bitpos[currbit] = 15 - i;
+		bitcnt[currbit]++;
+		bitval[currbit] <<= 1;
+		bitval[currbit] |= bit_set;
+	    }
+	}
+
+	if (bitval[bitj] == 0) bitval[bitj] = 8;
+	/* first check whether this one does not match after all */
+	if (bitval[bitz] == 3 || bitval[bitC] == 1)
+	    continue;
+	if (bitcnt[bitI] && (bitval[bitI] == 0x00 || bitval[bitI] == 0xff))
+	    continue;
+
+	/* bitI and bitC get copied to biti and bitc */
+	if (bitcnt[bitI]) {
+	    bitval[biti] = bitval[bitI]; bitpos[biti] = bitpos[bitI];
+	}
+	if (bitcnt[bitC])
+	    bitval[bitc] = bitval[bitC];
+
+	pos = 0;
+	while (opcstr[pos] && !isspace(opcstr[pos])) {
+	    if (opcstr[pos] == '.') {
+		pos++;
+		switch (opcstr[pos]) {
+
+		case 'B': sz = sz_byte; break;
+		case 'W': sz = sz_word; break;
+		case 'L': sz = sz_long; break;
+		case 'z':
+		    switch (bitval[bitz]) {
+		    case 0: sz = sz_byte; break;
+		    case 1: sz = sz_word; break;
+		    case 2: sz = sz_long; break;
+		    default: abort();
+		    }
+		    break;
+		default: abort();
+		}
+	    } else {
+		mnemonic[mnp] = opcstr[pos];
+		if (mnemonic[mnp] == 'f') {
+		    find = -1;
+		    switch (bitval[bitf]) {
+		    case 0: mnemonic[mnp] = 'R'; break;
+		    case 1: mnemonic[mnp] = 'L'; break;
+		    default: abort();
+		    }
+		}
+		mnp++;
+	    }
+	    pos++;
+	}
+	mnemonic[mnp] = 0;
+
+	/* now, we have read the mnemonic and the size */
+	while (opcstr[pos] && isspace(opcstr[pos]))
+	    pos++;
+
+	/* A goto a day keeps the D******a away. */
+	if (opcstr[pos] == 0)
+	    goto endofline;
+
+	/* parse the source address */
+	usesrc = 1;
+	switch (opcstr[pos++]) {
+	case 'D':
+	    srcmode = Dreg;
+	    switch (opcstr[pos++]) {
+	    case 'r': srcreg = bitval[bitr]; srcgather = 1; srcpos = bitpos[bitr]; break;
+	    case 'R': srcreg = bitval[bitR]; srcgather = 1; srcpos = bitpos[bitR]; break;
+	    default: abort();
+	    }
+	    break;
+	case 'A':
+	    srcmode = Areg;
+	    switch (opcstr[pos++]) {
+	    case 'r': srcreg = bitval[bitr]; srcgather = 1; srcpos = bitpos[bitr]; break;
+	    case 'R': srcreg = bitval[bitR]; srcgather = 1; srcpos = bitpos[bitR]; break;
+	    default: abort();
+	    }
+	    switch (opcstr[pos]) {
+	    case 'p': srcmode = Apdi; pos++; break;
+	    case 'P': srcmode = Aipi; pos++; break;
+	    }
+	    break;
+	case 'L':
+	    srcmode = absl;
+	    break;
+	case '#':
+	    switch (opcstr[pos++]) {
+	    case 'z': srcmode = imm; break;
+	    case '0': srcmode = imm0; break;
+	    case '1': srcmode = imm1; break;
+	    case '2': srcmode = imm2; break;
+	    case 'i': srcmode = immi; srcreg = (uae_s32)(uae_s8)bitval[biti];
+		if (CPU_EMU_SIZE < 4) {
+		    /* Used for branch instructions */
+		    srctype = 1;
+		    srcgather = 1;
+		    srcpos = bitpos[biti];
+		}
+		break;
+	    case 'j': srcmode = immi; srcreg = bitval[bitj];
+		if (CPU_EMU_SIZE < 3) {
+		    /* 1..8 for ADDQ/SUBQ and rotshi insns */
+		    srcgather = 1;
+		    srctype = 3;
+		    srcpos = bitpos[bitj];
+		}
+		break;
+	    case 'J': srcmode = immi; srcreg = bitval[bitJ];
+		if (CPU_EMU_SIZE < 5) {
+		    /* 0..15 */
+		    srcgather = 1;
+		    srctype = 2;
+		    srcpos = bitpos[bitJ];
+		}
+		break;
+	    case 'k': srcmode = immi; srcreg = bitval[bitk];
+		if (CPU_EMU_SIZE < 3) {
+		    srcgather = 1;
+		    srctype = 4;
+		    srcpos = bitpos[bitk];
+		}
+		break;
+	    case 'K': srcmode = immi; srcreg = bitval[bitK];
+		if (CPU_EMU_SIZE < 5) {
+		    /* 0..15 */
+		    srcgather = 1;
+		    srctype = 5;
+		    srcpos = bitpos[bitK];
+		}
+		break;
+	    case 'p': srcmode = immi; srcreg = bitval[bitK];
+		if (CPU_EMU_SIZE < 5) {
+		    /* 0..3 */
+		    srcgather = 1;
+		    srctype = 7;
+		    srcpos = bitpos[bitp];
+		}
+		break;
+	    default: abort();
+	    }
+	    break;
+	case 'd':
+	    srcreg = bitval[bitD];
+	    srcmode = mode_from_mr(bitval[bitd],bitval[bitD]);
+	    if (srcmode == am_illg)
+		continue;
+	    if (CPU_EMU_SIZE < 2 &&
+		(srcmode == Areg || srcmode == Dreg || srcmode == Aind
+		 || srcmode == Ad16 || srcmode == Ad8r || srcmode == Aipi
+		 || srcmode == Apdi))
+		{
+		    srcgather = 1; srcpos = bitpos[bitD];
+		}
+	    if (opcstr[pos] == '[') {
+		pos++;
+		if (opcstr[pos] == '!') {
+		    /* exclusion */
+		    do {
+			pos++;
+			if (mode_from_str(opcstr+pos) == srcmode)
+			    goto nomatch;
+			pos += 4;
+		    } while (opcstr[pos] == ',');
+		    pos++;
+		} else {
+		    if (opcstr[pos+4] == '-') {
+			/* replacement */
+			if (mode_from_str(opcstr+pos) == srcmode)
+			    srcmode = mode_from_str(opcstr+pos+5);
+			else
+			    goto nomatch;
+			pos += 10;
+		    } else {
+			/* normal */
+			while(mode_from_str(opcstr+pos) != srcmode) {
+			    pos += 4;
+			    if (opcstr[pos] == ']')
+				goto nomatch;
+			    pos++;
+			}
+			while(opcstr[pos] != ']') pos++;
+			pos++;
+			break;
+		    }
+		}
+	    }
+	    /* Some addressing modes are invalid as destination */
+	    if (srcmode == imm || srcmode == PC16 || srcmode == PC8r)
+		goto nomatch;
+	    break;
+	case 's':
+	    srcreg = bitval[bitS];
+	    srcmode = mode_from_mr(bitval[bits],bitval[bitS]);
+
+	    if (srcmode == am_illg)
+		continue;
+	    if (CPU_EMU_SIZE < 2 &&
+		(srcmode == Areg || srcmode == Dreg || srcmode == Aind
+		 || srcmode == Ad16 || srcmode == Ad8r || srcmode == Aipi
+		 || srcmode == Apdi))
+		{
+		    srcgather = 1; srcpos = bitpos[bitS];
+		}
+	    if (opcstr[pos] == '[') {
+		pos++;
+		if (opcstr[pos] == '!') {
+		    /* exclusion */
+		    do {
+			pos++;
+			if (mode_from_str(opcstr+pos) == srcmode)
+			    goto nomatch;
+			pos += 4;
+		    } while (opcstr[pos] == ',');
+		    pos++;
+		} else {
+		    if (opcstr[pos+4] == '-') {
+			/* replacement */
+			if (mode_from_str(opcstr+pos) == srcmode)
+			    srcmode = mode_from_str(opcstr+pos+5);
+			else
+			    goto nomatch;
+			pos += 10;
+		    } else {
+			/* normal */
+			while(mode_from_str(opcstr+pos) != srcmode) {
+			    pos += 4;
+			    if (opcstr[pos] == ']')
+				goto nomatch;
+			    pos++;
+			}
+			while(opcstr[pos] != ']') pos++;
+			pos++;
+		    }
+		}
+	    }
+	    break;
+	default: abort();
+	}
+	/* safety check - might have changed */
+	if (srcmode != Areg && srcmode != Dreg && srcmode != Aind
+	    && srcmode != Ad16 && srcmode != Ad8r && srcmode != Aipi
+	    && srcmode != Apdi && srcmode != immi)
+	    {
+		srcgather = 0;
+	    }
+	if (srcmode == Areg && sz == sz_byte)
+	    goto nomatch;
+
+	if (opcstr[pos] != ',')
+	    goto endofline;
+	pos++;
+
+	/* parse the destination address */
+	usedst = 1;
+	switch (opcstr[pos++]) {
+	case 'D':
+	    destmode = Dreg;
+	    switch (opcstr[pos++]) {
+	    case 'r': destreg = bitval[bitr]; dstgather = 1; dstpos = bitpos[bitr]; break;
+	    case 'R': destreg = bitval[bitR]; dstgather = 1; dstpos = bitpos[bitR]; break;
+	    default: abort();
+	    }
+            if (dstpos < 0 || dstpos >= 32)
+		abort ();
+	    break;
+	case 'A':
+	    destmode = Areg;
+	    switch (opcstr[pos++]) {
+	    case 'r': destreg = bitval[bitr]; dstgather = 1; dstpos = bitpos[bitr]; break;
+	    case 'R': destreg = bitval[bitR]; dstgather = 1; dstpos = bitpos[bitR]; break;
+	    case 'x': destreg = 0; dstgather = 0; dstpos = 0; break;
+	    default: abort();
+	    }
+            if (dstpos < 0 || dstpos >= 32)
+		abort ();
+	    switch (opcstr[pos]) {
+	    case 'p': destmode = Apdi; pos++; break;
+	    case 'P': destmode = Aipi; pos++; break;
+	    }
+	    break;
+	case 'L':
+	    destmode = absl;
+	    break;
+	case '#':
+	    switch (opcstr[pos++]) {
+	    case 'z': destmode = imm; break;
+	    case '0': destmode = imm0; break;
+	    case '1': destmode = imm1; break;
+	    case '2': destmode = imm2; break;
+	    case 'i': destmode = immi; destreg = (uae_s32)(uae_s8)bitval[biti]; break;
+	    case 'j': destmode = immi; destreg = bitval[bitj]; break;
+	    case 'J': destmode = immi; destreg = bitval[bitJ]; break;
+	    case 'k': destmode = immi; destreg = bitval[bitk]; break;
+	    case 'K': destmode = immi; destreg = bitval[bitK]; break;
+	    default: abort();
+	    }
+	    break;
+	case 'd':
+	    destreg = bitval[bitD];
+	    destmode = mode_from_mr(bitval[bitd],bitval[bitD]);
+	    if (destmode == am_illg)
+		continue;
+	    if (CPU_EMU_SIZE < 1 &&
+		(destmode == Areg || destmode == Dreg || destmode == Aind
+		 || destmode == Ad16 || destmode == Ad8r || destmode == Aipi
+		 || destmode == Apdi))
+		{
+		    dstgather = 1; dstpos = bitpos[bitD];
+		}
+
+	    if (opcstr[pos] == '[') {
+		pos++;
+		if (opcstr[pos] == '!') {
+		    /* exclusion */
+		    do {
+			pos++;
+			if (mode_from_str(opcstr+pos) == destmode)
+			    goto nomatch;
+			pos += 4;
+		    } while (opcstr[pos] == ',');
+		    pos++;
+		} else {
+		    if (opcstr[pos+4] == '-') {
+			/* replacement */
+			if (mode_from_str(opcstr+pos) == destmode)
+			    destmode = mode_from_str(opcstr+pos+5);
+			else
+			    goto nomatch;
+			pos += 10;
+		    } else {
+			/* normal */
+			while(mode_from_str(opcstr+pos) != destmode) {
+			    pos += 4;
+			    if (opcstr[pos] == ']')
+				goto nomatch;
+			    pos++;
+			}
+			while(opcstr[pos] != ']') pos++;
+			pos++;
+			break;
+		    }
+		}
+	    }
+	    /* Some addressing modes are invalid as destination */
+	    if (destmode == imm || destmode == PC16 || destmode == PC8r)
+		goto nomatch;
+	    break;
+	case 's':
+	    destreg = bitval[bitS];
+	    destmode = mode_from_mr(bitval[bits],bitval[bitS]);
+
+	    if (destmode == am_illg)
+		continue;
+	    if (CPU_EMU_SIZE < 1 &&
+		(destmode == Areg || destmode == Dreg || destmode == Aind
+		 || destmode == Ad16 || destmode == Ad8r || destmode == Aipi
+		 || destmode == Apdi))
+		{
+		    dstgather = 1; dstpos = bitpos[bitS];
+		}
+
+	    if (opcstr[pos] == '[') {
+		pos++;
+		if (opcstr[pos] == '!') {
+		    /* exclusion */
+		    do {
+			pos++;
+			if (mode_from_str(opcstr+pos) == destmode)
+			    goto nomatch;
+			pos += 4;
+		    } while (opcstr[pos] == ',');
+		    pos++;
+		} else {
+		    if (opcstr[pos+4] == '-') {
+			/* replacement */
+			if (mode_from_str(opcstr+pos) == destmode)
+			    destmode = mode_from_str(opcstr+pos+5);
+			else
+			    goto nomatch;
+			pos += 10;
+		    } else {
+			/* normal */
+			while(mode_from_str(opcstr+pos) != destmode) {
+			    pos += 4;
+			    if (opcstr[pos] == ']')
+				goto nomatch;
+			    pos++;
+			}
+			while(opcstr[pos] != ']') pos++;
+			pos++;
+		    }
+		}
+	    }
+	    break;
+	default: abort();
+	}
+	/* safety check - might have changed */
+	if (destmode != Areg && destmode != Dreg && destmode != Aind
+	    && destmode != Ad16 && destmode != Ad8r && destmode != Aipi
+	    && destmode != Apdi)
+	    {
+		dstgather = 0;
+	    }
+
+	if (destmode == Areg && sz == sz_byte)
+	    goto nomatch;
+#if 0
+	if (sz == sz_byte && (destmode == Aipi || destmode == Apdi)) {
+	    dstgather = 0;
+	}
+#endif
+      endofline:
+	/* now, we have a match */
+	if (table68k[opc].mnemo != i_ILLG)
+	    fprintf(stderr, "UAE: Double match: %x: %s\n", opc, opcstr);
+	if (find == -1) {
+	    for (find = 0;; find++) {
+		if (strcmp(mnemonic, lookuptab[find].name) == 0) {
+		    table68k[opc].mnemo = lookuptab[find].mnemo;
+		    break;
+		}
+		if (strlen(lookuptab[find].name) == 0) abort();
+	    }
+	}
+	else {
+	    table68k[opc].mnemo = lookuptab[find].mnemo;
+	}
+	table68k[opc].cc = bitval[bitc];
+	if (table68k[opc].mnemo == i_BTST
+	    || table68k[opc].mnemo == i_BSET
+	    || table68k[opc].mnemo == i_BCLR
+	    || table68k[opc].mnemo == i_BCHG)
+	    {
+		sz = destmode == Dreg ? sz_long : sz_byte;
+	    }
+	table68k[opc].size = sz;
+	table68k[opc].sreg = srcreg;
+	table68k[opc].dreg = destreg;
+	table68k[opc].smode = srcmode;
+	table68k[opc].dmode = destmode;
+	table68k[opc].spos = srcgather ? srcpos : -1;
+	table68k[opc].dpos = dstgather ? dstpos : -1;
+	table68k[opc].suse = usesrc;
+	table68k[opc].duse = usedst;
+	table68k[opc].stype = srctype;
+	table68k[opc].plev = id.plevel;
+	table68k[opc].clev = id.cpulevel;
+#if 0
+	for (i = 0; i < 5; i++) {
+	    table68k[opc].flaginfo[i].flagset = id.flaginfo[i].flagset;
+	    table68k[opc].flaginfo[i].flaguse = id.flaginfo[i].flaguse;
+	}
+#endif
+	table68k[opc].flagdead = flagdead;
+	table68k[opc].flaglive = flaglive;
+	table68k[opc].isjmp = isjmp;
+      nomatch:
+	/* FOO! */;
+    }
+}
+
+
+void read_table68k (void)
+{
+    int i;
+
+    if(table68k == NULL)
+    table68k = (struct instr *)xmalloc (65536 * sizeof (struct instr));
+    for (i = 0; i < 65536; i++) {
+	table68k[i].mnemo = i_ILLG;
+	table68k[i].handler = -1;
+    }
+    for (i = 0; i < n_defs68k; i++) {
+	build_insn (i);
+    }
+}
+
+static int mismatch;
+
+static void handle_merges (long int opcode)
+{
+    uae_u16 smsk = 0;
+    uae_u16 dmsk;
+    int sbitdst = 0, dstend;
+    int srcreg, dstreg;
+
+    if (table68k[opcode].spos == -1) {
+	sbitdst = 1; smsk = 0;
+    } else {
+	switch (table68k[opcode].stype) {
+	 case 0:
+	    smsk = 7; sbitdst = 8; break;
+	 case 1:
+	    smsk = 255; sbitdst = 256; break;
+	 case 2:
+	    smsk = 15; sbitdst = 16; break;
+	 case 3:
+	    smsk = 7; sbitdst = 8; break;
+	 case 4:
+	    smsk = 7; sbitdst = 8; break;
+	 case 5:
+	    smsk = 63; sbitdst = 64; break;
+	 case 7:
+	    smsk = 3; sbitdst = 4; break;
+	 default:
+	    smsk = 0; sbitdst = 0;
+	    abort();
+	    break;
+	}
+	smsk <<= table68k[opcode].spos;
+    }
+    if (table68k[opcode].dpos == -1) {
+	dstend = 1; dmsk = 0;
+    } else {
+	dmsk = 7 << table68k[opcode].dpos;
+	dstend = 8;
+    }
+    for (srcreg=0; srcreg < sbitdst; srcreg++) {
+	for (dstreg=0; dstreg < dstend; dstreg++) {
+	    uae_u16 code = opcode;
+
+	    code = (code & ~smsk) | (srcreg << table68k[opcode].spos);
+	    code = (code & ~dmsk) | (dstreg << table68k[opcode].dpos);
+
+	    /* Check whether this is in fact the same instruction.
+	     * The instructions should never differ, except for the
+	     * Bcc.(BW) case. */
+	    if (table68k[code].mnemo != table68k[opcode].mnemo
+		|| table68k[code].size != table68k[opcode].size
+		|| table68k[code].suse != table68k[opcode].suse
+		|| table68k[code].duse != table68k[opcode].duse)
+	    {
+		mismatch++; continue;
+	    }
+	    if (table68k[opcode].suse
+		&& (table68k[opcode].spos != table68k[code].spos
+		    || table68k[opcode].smode != table68k[code].smode
+		    || table68k[opcode].stype != table68k[code].stype))
+	    {
+		mismatch++; continue;
+	    }
+	    if (table68k[opcode].duse
+		&& (table68k[opcode].dpos != table68k[code].dpos
+		    || table68k[opcode].dmode != table68k[code].dmode))
+	    {
+		mismatch++; continue;
+	    }
+
+	    if (code != opcode)
+		table68k[code].handler = opcode;
+	}
+    }
+}
+
+void do_merges (void)
+{
+    long int opcode;
+    int nr = 0;
+    mismatch = 0;
+    for (opcode = 0; opcode < 65536; opcode++) {
+	if (table68k[opcode].handler != -1 || table68k[opcode].mnemo == i_ILLG)
+	    continue;
+	nr++;
+	handle_merges (opcode);
+    }
+    nr_cpuop_funcs = nr;
+}
+
+int get_no_mismatches (void)
+{
+    return mismatch;
+}
diff --git a/src/core/uae/readcpu.h b/src/core/uae/readcpu.h
new file mode 100644
index 0000000..2b9614a
--- /dev/null
+++ b/src/core/uae/readcpu.h
@@ -0,0 +1,108 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: readcpu.h 2681 2007-11-20 18:01:02Z roms $ */
+
+ENUMDECL {
+  Dreg, Areg, Aind, Aipi, Apdi, Ad16, Ad8r,
+  absw, absl, PC16, PC8r, imm, imm0, imm1, imm2, immi, am_unknown, am_illg
+} ENUMNAME (amodes);
+
+ENUMDECL {
+	i_MOVEQ, i_ADDQ, i_SUBQ,
+	i_CMPI, i_ADDI, i_SUBI,
+	i_ORI, i_ANDI, i_EORI,
+
+    i_ILLG,
+    i_OR, i_AND, i_EOR, i_ORSR, i_ANDSR, i_EORSR,
+    i_SUB, i_SUBA, i_SUBX, i_SBCD,
+    i_ADD, i_ADDA, i_ADDX, i_ABCD,
+    i_NEG, i_NEGX, i_NBCD, i_CLR, i_NOT, i_TST,
+    i_BTST, i_BCHG, i_BCLR, i_BSET,
+    i_CMP, i_CMPM, i_CMPA,
+    i_MVPRM, i_MVPMR, i_MOVE, i_MOVEA, i_MVSR2, i_MV2SR,
+    i_SWAP, i_EXG, i_EXT, i_MVMEL, i_MVMLE,
+    i_TRAP, i_MVR2USP, i_MVUSP2R, i_RESET, i_NOP, i_STOP, i_RTE, i_RTD,
+    i_LINK, i_UNLK,
+    i_RTS, i_TRAPV, i_RTR,
+    i_JSR, i_JMP, i_BSR, i_Bcc,
+    i_LEA, i_PEA, i_DBcc, i_Scc,
+    i_DIVU, i_DIVS, i_MULU, i_MULS,
+    i_ASR, i_ASL, i_LSR, i_LSL, i_ROL, i_ROR, i_ROXL, i_ROXR,
+    i_ASRW, i_ASLW, i_LSRW, i_LSLW, i_ROLW, i_RORW, i_ROXLW, i_ROXRW,
+    i_CHK,i_CHK2,
+    i_MOVEC2, i_MOVE2C, i_CAS, i_CAS2, i_DIVL, i_MULL,
+    i_BFTST,i_BFEXTU,i_BFCHG,i_BFEXTS,i_BFCLR,i_BFFFO,i_BFSET,i_BFINS,
+    i_PACK, i_UNPK, i_TAS, i_BKPT, i_CALLM, i_RTM, i_TRAPcc, i_MOVES,
+    i_FPP, i_FDBcc, i_FScc, i_FTRAPcc, i_FBcc, i_FSAVE, i_FRESTORE,
+    i_CINVL, i_CINVP, i_CINVA, i_CPUSHL, i_CPUSHP, i_CPUSHA, i_MOVE16,
+    i_MMUOP
+} ENUMNAME (instrmnem);
+
+extern struct mnemolookup {
+    instrmnem mnemo;
+    const char *name;
+} lookuptab[];
+
+ENUMDECL {
+    sz_byte, sz_word, sz_long
+} ENUMNAME (wordsizes);
+
+ENUMDECL {
+    fa_set, fa_unset, fa_zero, fa_one, fa_dontcare, fa_unknown, fa_isjmp,
+    fa_isbranch
+} ENUMNAME (flagaffect);
+
+ENUMDECL {
+    fu_used, fu_unused, fu_maybecc, fu_unknown, fu_isjmp
+} ENUMNAME (flaguse);
+
+ENUMDECL {
+    bit0, bit1, bitc, bitC, bitf, biti, bitI, bitj, bitJ, bitk, bitK,
+    bits, bitS, bitd, bitD, bitr, bitR, bitz, bitp, lastbit
+} ENUMNAME (bitvals);
+
+struct instr_def {
+    unsigned int bits;
+    int n_variable;
+    char bitpos[16];
+    unsigned int mask;
+    int cpulevel;
+    int plevel;
+    struct {
+	unsigned int flaguse:3;
+	unsigned int flagset:3;
+    } flaginfo[5];
+    unsigned char sduse;
+    const char *opcstr;
+};
+
+extern struct instr_def defs68k[];
+extern int n_defs68k;
+
+extern struct instr {
+    long int handler;
+    unsigned char dreg;
+    unsigned char sreg;
+    signed char dpos;
+    signed char spos;
+    unsigned char sduse;
+    int flagdead:8, flaglive:8;
+    unsigned int mnemo:8;
+    unsigned int cc:4;
+    unsigned int plev:2;
+    unsigned int size:2;
+    unsigned int smode:5;
+    unsigned int stype:3;
+    unsigned int dmode:5;
+    unsigned int suse:1;
+    unsigned int duse:1;
+    unsigned int unused1:1;
+    unsigned int clev:3;
+    unsigned int isjmp:1;
+    unsigned int unused2:4;
+} *table68k;
+
+extern void read_table68k (void);
+extern void do_merges (void);
+extern int get_no_mismatches (void);
+extern int nr_cpuop_funcs;
+
diff --git a/src/core/uae/stamp b/src/core/uae/stamp
new file mode 100644
index 0000000..e69de29
diff --git a/src/core/uae/sysconfig.h b/src/core/uae/sysconfig.h
new file mode 100644
index 0000000..9f71a4b
--- /dev/null
+++ b/src/core/uae/sysconfig.h
@@ -0,0 +1,138 @@
+/* sysconfig.h.  Generated automatically by configure.  */
+/* sysconfig.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if on AIX 3.
+   System headers sometimes define this.
+   We just want to avoid a redefinition error message.  */
+#ifndef _ALL_SOURCE
+/* #undef _ALL_SOURCE */
+#endif
+
+/* Define to empty if the keyword does not work.  */
+/* #undef const */
+
+/* Define if your struct stat has st_blocks.  */
+#define HAVE_ST_BLOCKS 1
+
+/* Define if utime(file, NULL) sets file's timestamp to the present.  */
+#define HAVE_UTIME_NULL 1
+
+/* Define as __inline if that's what the C compiler calls it.  */
+/* #undef inline */
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+/* #undef mode_t */
+
+/* Define to `long' if <sys/types.h> doesn't define.  */
+/* #undef off_t */
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+/* #undef pid_t */
+
+/* Define if you need to in order for stat and other things to work.  */
+/* #undef _POSIX_SOURCE */
+
+/* Define as the return type of signal handlers (int or void).  */
+#define RETSIGTYPE void
+
+/* Define if you have the ANSI C header files.  */
+#define STDC_HEADERS 1
+
+/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define if your <sys/time.h> declares struct tm.  */
+/* #undef TM_IN_SYS_TIME */
+
+/* The number of bytes in a char.  */
+#define SIZEOF_CHAR 1
+
+/* The number of bytes in a int.  */
+#define SIZEOF_INT 4
+
+/* The number of bytes in a long.  */
+#define SIZEOF_LONG 4
+
+/* The number of bytes in a long long.  */
+#define SIZEOF_LONG_LONG 8
+
+/* The number of bytes in a short.  */
+#define SIZEOF_SHORT 2
+
+/* Define if you have the gettimeofday function.  */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define if you have the mkdir function.  */
+#define HAVE_MKDIR 1
+
+/* Define if you have the rmdir function.  */
+#define HAVE_RMDIR 1
+
+/* Define if you have the select function.  */
+#define HAVE_SELECT 1
+
+/* Define if you have the statfs function.  */
+#define HAVE_STATFS 1
+
+/* Define if you have the strerror function.  */
+#define HAVE_STRERROR 1
+
+/* Define if you have the strstr function.  */
+#define HAVE_STRSTR 1
+
+/* Define if you have the <dirent.h> header file.  */
+#define HAVE_DIRENT_H 1
+
+/* Define if you have the <fcntl.h> header file.  */
+#define HAVE_FCNTL_H 1
+
+/* Define if you have the <linux/joystick.h> header file.  */
+/* #undef HAVE_LINUX_JOYSTICK_H */
+
+/* Define if you have the <ndir.h> header file.  */
+/* #undef HAVE_NDIR_H */
+
+/* Define if you have the <string.h> header file.  */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <strings.h> header file.  */
+#define HAVE_STRINGS_H 1
+
+/* Define if you have the <sys/dir.h> header file.  */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define if you have the <sys/mount.h> header file.  */
+#define HAVE_SYS_MOUNT_H 1
+
+/* Define if you have the <sys/ndir.h> header file.  */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define if you have the <sys/param.h> header file.  */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define if you have the <sys/stat.h> header file.  */
+#define HAVE_SYS_STAT_H 1
+
+/* Define if you have the <sys/statfs.h> header file.  */
+/* #undef HAVE_SYS_STATFS_H */
+
+/* Define if you have the <sys/statvfs.h> header file.  */
+/* #undef HAVE_SYS_STATVFS_H */
+
+/* Define if you have the <sys/time.h> header file.  */
+#define HAVE_SYS_TIME_H 1
+
+/* Define if you have the <sys/types.h> header file.  */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define if you have the <sys/vfs.h> header file.  */
+#define HAVE_SYS_VFS_H 1
+
+/* Define if you have the <unistd.h> header file.  */
+#define HAVE_UNISTD_H 1
+
+/* Define if you have the <utime.h> header file.  */
+#define HAVE_UTIME_H 1
+
+/* Define if you have the <values.h> header file.  */
+#define HAVE_VALUES_H 1
diff --git a/src/core/uae/sysdeps.h b/src/core/uae/sysdeps.h
new file mode 100644
index 0000000..0d43eed
--- /dev/null
+++ b/src/core/uae/sysdeps.h
@@ -0,0 +1,198 @@
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * Try to include the right system headers and get other system-specific
+  * stuff right & other collected kludges.
+  *
+  * If you think about modifying this, think twice. Some systems rely on
+  * the exact order of the #include statements. That's also the reason
+  * why everything gets included unconditionally regardless of whether
+  * it's actually needed by the .c file.
+  *
+  * Copyright 1996, 1997 Bernd Schmidt
+  * $Id: sysdeps.h 2556 2007-06-24 05:05:05Z kevinkofler $
+  */
+
+#ifdef _MSC_VER
+#pragma warning( disable : 4142 )
+#endif
+
+#define REGPARAM
+#define REGPARAM2
+
+
+// This portion copied from the ld-tigcc generic.h
+// Copyright (C) 2002-2004 Sebastian Reichelt
+// licensed under the GPL
+
+// Attempt to auto-detect I1, I2, I4, SI1, SI2 and SI4 based on <limits.h>.
+// It is a good idea to double-check these definitions on every new system
+// you compile on.
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <limits.h>
+
+// Make sure that the character types take exactly 1 byte.
+#if UCHAR_MAX != 0xFF
+#error Need 1-byte unsigned char type.
+#endif /* UCHAR_MAX != 0xFF */
+#if SCHAR_MIN != (-0x80) || SCHAR_MAX != 0x7F
+#error Need 1-byte signed char type.
+#endif /* UCHAR_MAX != 0xFF */
+
+// Unsigned types.
+typedef unsigned char uae_u8;
+
+#if USHRT_MAX == 0xFFFF
+typedef unsigned short uae_u16;
+#elif UINT_MAX == 0xFFFF
+typedef unsigned int uae_u16;
+#elif ULONG_MAX == 0xFFFF
+typedef unsigned long uae_u16;
+#else /* no 2-byte unsigned int */
+#error No 2-byte unsigned integer type found.
+#endif /* 2-byte unsigned int */
+
+#if ULONG_MAX == 0xFFFFFFFF
+typedef unsigned long uae_u32;
+#elif UINT_MAX == 0xFFFFFFFF
+typedef unsigned int uae_u32;
+#elif ULONG_LONG_MAX == 0xFFFFFFFF || ULLONG_MAX == 0xFFFFFFFF
+typedef unsigned long long uae_u32;
+#else /* no 4-byte unsigned int */
+#error No 4-byte unsigned integer type found.
+#endif /* 4-byte unsigned int */
+
+// Signed types.
+typedef signed char uae_s8;
+
+#if SHRT_MIN == (-0x8000) && SHRT_MAX == 0x7FFF
+typedef short uae_s16;
+#elif INT_MIN == (-0x8000) && INT_MAX == 0x7FFF
+typedef int uae_s16;
+#elif LONG_MIN == (-0x8000) && LONG_MAX == 0x7FFF
+typedef long uae_s16;
+#else /* no 2-byte signed int */
+#error No 2-byte signed integer type found.
+#endif /* 2-byte signed int */
+
+#if LONG_MIN == (-0x80000000) && LONG_MAX == 0x7FFFFFFF
+typedef long uae_s32;
+#elif INT_MIN == (-0x80000000) && INT_MAX == 0x7FFFFFFF
+typedef int uae_s32;
+#elif (LONG_LONG_MIN == (-0x80000000) && LONG_LONG_MAX == 0x7FFFFFFF) \
+      || (LLONG_MIN == (-0x80000000) && LLONG_MAX == 0x7FFFFFFF)
+typedef long long uae_s32;
+#else /* no 4-byte signed int */
+#error No 4-byte signed integer type found.
+#endif /* 4-byte signed int */
+
+typedef uae_u32 uaecptr;
+
+#undef uae_s64
+#undef uae_u64
+
+// This part coded by Kevin Kofler. Copyright (C) Kevin Kofler, 2005.
+// This is hard to do right because too long numbers might cause a parse error.
+#if defined(ULONG_LONG_MAX) || defined(ULLONG_MAX)
+#if ULONG_LONG_MAX == 0xFFFFFFFFFFFFFFFFll || ULLONG_MAX == 0xFFFFFFFFFFFFFFFFll
+#define uae_s64 long long
+#define uae_u64 unsigned long long
+#define VAL64(a) (a ## LL)
+#define UVAL64(a) (a ## uLL)
+#endif
+#endif
+
+#ifndef uae_u64
+#if defined(_MSC_VER)
+#define uae_s64 __int64
+#define uae_u64 unsigned __int64
+#define VAL64(a) (a)
+#define UVAL64(a) (a)
+#elif ULONG_MAX > 0xFFFFFFFF
+#if ULONG_MAX == 0xFFFFFFFFFFFFFFFF
+#define uae_s64 long
+#define uae_u64 unsigned long
+#define VAL64(a) (a ## l)
+#define UVAL64(a) (a ## ul)
+#endif
+#endif
+#endif
+
+#ifdef HAVE_STRDUP
+#define my_strdup strdup
+#else
+extern char *my_strdup (const char*s);
+#endif
+
+#include <stddef.h>
+extern void *xmalloc(size_t);
+extern void *xcalloc(size_t, size_t);
+
+/* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known
+ * to have problems, and it's likely that other compilers choke too. */
+#ifdef __GNUC__
+#define ENUMDECL typedef enum
+#define ENUMNAME(name) name
+
+/* While we're here, make abort more useful.  */
+#define abort() \
+  do { \
+    fprintf (stderr, "UAE: Internal error; file %s, line %d\n", __FILE__, __LINE__); \
+    (abort) (); \
+} while (0)
+#else
+#define ENUMDECL enum
+#define ENUMNAME(name) ; typedef int name
+#endif
+
+#ifdef X86_ASSEMBLY
+#define ASM_SYM_FOR_FUNC(a) __asm__(a)
+#else
+#define ASM_SYM_FOR_FUNC(a)
+#endif
+
+#if defined USE_COMPILER
+#undef NO_PREFETCH_BUFFER
+#undef NO_EXCEPTION_3
+#define NO_EXCEPTION_3
+#define NO_PREFETCH_BUFFER
+#endif
+
+#ifndef STATIC_INLINE
+#if __GNUC__ - 1 > 1 && __GNUC_MINOR__ - 1 >= 0
+#define STATIC_INLINE static __inline__ __attribute__ ((always_inline))
+#define NOINLINE __attribute__ ((noinline))
+#else
+#define STATIC_INLINE static __inline__
+#define NOINLINE
+#endif
+#endif
+
+#ifdef _MSC_VER
+#define __inline__ __inline
+#endif
+
+/* Every Amiga hardware clock cycle takes this many "virtual" cycles.  This
+   used to be hardcoded as 1, but using higher values allows us to time some
+   stuff more precisely.
+   512 is the official value from now on - it can't change, unless we want
+   _another_ config option "finegrain2_m68k_speed".
+
+   We define this value here rather than in events.h so that gencpu.c sees
+   it.  */
+#define CYCLE_UNIT 1 /* (TiEmu patch, was 512) */
+
+/* This one is used by cfgfile.c.  We could reduce the CYCLE_UNIT back to 1,
+   I'm not 100% sure this code is bug free yet.  */
+#define OFFICIAL_CYCLE_UNIT 1 /* (TiEmu patch, was 512) */
+
+/*
+ * You can specify numbers from 0 to 5 here. It is possible that higher
+ * numbers will make the CPU emulation slightly faster, but if the setting
+ * is too high, you will run out of memory while compiling.
+ * Best to leave this as it is.
+ */
+#define CPU_EMU_SIZE 0
diff --git a/src/core/uae/table68k b/src/core/uae/table68k
new file mode 100644
index 0000000..4d6c58a
--- /dev/null
+++ b/src/core/uae/table68k
@@ -0,0 +1,260 @@
+% 0: bit 0
+% 1: bit 1
+% c: condition code
+% C: condition codes, except F
+% f: direction
+% i: immediate
+% I: immediate, except 00 and ff
+% j: immediate 1..8
+% J: immediate 0..15
+% k: immediate 0..7
+% K: immediate 0..63
+% p: immediate 0..3 (CINV and CPUSH: cache field)
+% s: source mode
+% S: source reg
+% d: dest mode
+% D: dest reg
+% r: reg
+% z: size
+%
+% Actually, a sssSSS may appear as a destination, and
+% vice versa. The only difference between sssSSS and
+% dddDDD are the valid addressing modes. There is
+% no match for immediate and pc-rel. addressing modes
+% in case of dddDDD.
+%
+% Arp: --> -(Ar)
+% ArP: --> (Ar)+
+% L: (xxx.L)
+%
+% Fields on a line: 
+% 16 chars bitpattern : 
+% CPU level / privildge level :
+%   CPU level 0: 68000
+%             1: 68010
+%             2: 68020
+%   privilege level 0: not privileged
+%                   1: unprivileged only on 68000 (check regs.s)
+%                   2: privileged                 (check regs.s)
+%                   3: privileged if size == word (check regs.s)
+% Flags set by instruction: XNZVC :
+% Flags used by instruction: XNZVC :
+%   - means flag unaffected / unused
+%   0 means flag reset
+%   1 means flag set
+%   ? means programmer was too lazy to check or instruction may trap
+%   + means instruction is conditional branch 
+%     everything else means flag set/used
+%   / means instruction is unconditional branch/call
+%   x means flag is unknown and well-behaved programs shouldn't check it
+% srcaddr status destaddr status :
+%   bitmasks of
+%   1 means fetched
+%   2 means stored
+%   4 means jump offset
+%   8 means jump address
+% instruction
+%
+
+0000 0000 0011 1100:00:XNZVC:XNZVC:10: ORSR.B  #1
+0000 0000 0111 1100:02:?????:?????:10: ORSR.W  #1
+0000 0zz0 11ss sSSS:20:?????:?????:11: CHK2.z  #1,s[!Dreg,Areg,Aipi,Apdi,Immd]
+0000 0000 zzdd dDDD:00:-NZ00:-----:13: ORI.z   #z,d[!Areg]
+0000 0010 0011 1100:00:XNZVC:XNZVC:10: ANDSR.B #1
+0000 0010 0111 1100:02:?????:?????:10: ANDSR.W #1
+0000 0010 zzdd dDDD:00:-NZ00:-----:13: ANDI.z  #z,d[!Areg]
+0000 0100 zzdd dDDD:00:XNZVC:-----:13: SUBI.z  #z,d[!Areg]
+0000 0110 zzdd dDDD:00:XNZVC:-----:13: ADDI.z  #z,d[!Areg]
+0000 0110 11ss sSSS:20:?????:?????:10: CALLM   s[!Dreg,Areg,Aipi,Apdi,Immd]
+0000 0110 11ss sSSS:20:?????:?????:10: RTM     s[Dreg,Areg]
+0000 1000 00ss sSSS:00:--Z--:-----:11: BTST    #1,s[!Areg]
+0000 1000 01ss sSSS:00:--Z--:-----:13: BCHG    #1,s[!Areg,Immd]
+0000 1000 10ss sSSS:00:--Z--:-----:13: BCLR    #1,s[!Areg,Immd]
+0000 1000 11ss sSSS:00:--Z--:-----:13: BSET    #1,s[!Areg,Immd]
+0000 1010 0011 1100:00:XNZVC:XNZVC:10: EORSR.B #1
+0000 1010 0111 1100:02:?????:?????:10: EORSR.W #1
+0000 1010 zzdd dDDD:00:-NZ00:-----:13: EORI.z  #z,d[!Areg]
+0000 1100 zzss sSSS:00:-NZVC:-----:11: CMPI.z  #z,s[!Areg,Immd]
+
+0000 1010 11ss sSSS:20:?????:?????:13: CAS.B   #1,s[!Dreg,Areg,Immd,PC8r,PC16]
+0000 1100 11ss sSSS:20:?????:?????:13: CAS.W   #1,s[!Dreg,Areg,Immd,PC8r,PC16]
+0000 1100 1111 1100:20:?????:?????:10: CAS2.W  #2
+0000 1110 zzss sSSS:22:?????:?????:13: MOVES.z #1,s[!Dreg,Areg,Immd,PC8r,PC16]
+0000 1110 11ss sSSS:20:?????:?????:13: CAS.L   #1,s[!Dreg,Areg,Immd,PC8r,PC16]
+0000 1110 1111 1100:20:?????:?????:10: CAS2.L  #2
+
+0000 rrr1 00dd dDDD:00:-----:-----:12: MVPMR.W d[Areg-Ad16],Dr
+0000 rrr1 01dd dDDD:00:-----:-----:12: MVPMR.L d[Areg-Ad16],Dr
+0000 rrr1 10dd dDDD:00:-----:-----:12: MVPRM.W Dr,d[Areg-Ad16]
+0000 rrr1 11dd dDDD:00:-----:-----:12: MVPRM.L Dr,d[Areg-Ad16]
+0000 rrr1 00ss sSSS:00:--Z--:-----:11: BTST    Dr,s[!Areg]
+0000 rrr1 01ss sSSS:00:--Z--:-----:13: BCHG    Dr,s[!Areg,Immd]
+0000 rrr1 10ss sSSS:00:--Z--:-----:13: BCLR    Dr,s[!Areg,Immd]
+0000 rrr1 11ss sSSS:00:--Z--:-----:13: BSET    Dr,s[!Areg,Immd]
+
+0001 DDDd ddss sSSS:00:-NZ00:-----:12: MOVE.B  s,d[!Areg]
+0010 DDDd ddss sSSS:00:-----:-----:12: MOVEA.L s,d[Areg]
+0010 DDDd ddss sSSS:00:-NZ00:-----:12: MOVE.L  s,d[!Areg]
+0011 DDDd ddss sSSS:00:-----:-----:12: MOVEA.W s,d[Areg]
+0011 DDDd ddss sSSS:00:-NZ00:-----:12: MOVE.W  s,d[!Areg]
+
+0100 0000 zzdd dDDD:00:XxZxC:X-Z--:30: NEGX.z  d[!Areg]
+0100 0000 11dd dDDD:01:?????:?????:10: MVSR2.W d[!Areg]
+0100 0010 zzdd dDDD:00:-0100:-----:20: CLR.z   d[!Areg]
+0100 0010 11dd dDDD:10:?????:?????:10: MVSR2.B d[!Areg]
+0100 0100 zzdd dDDD:00:XNZVC:-----:30: NEG.z   d[!Areg]
+0100 0100 11ss sSSS:00:XNZVC:-----:10: MV2SR.B s[!Areg]
+0100 0110 zzdd dDDD:00:-NZ00:-----:30: NOT.z   d[!Areg]
+0100 0110 11ss sSSS:02:?????:?????:10: MV2SR.W s[!Areg]
+0100 1000 0000 1rrr:20:-----:-----:31: LINK.L  Ar,#2
+0100 1000 00dd dDDD:00:X?Z?C:X-Z--:30: NBCD.B  d[!Areg]
+0100 1000 0100 1kkk:20:?????:?????:10: BKPT    #k
+0100 1000 01ss sSSS:00:-NZ00:-----:30: SWAP.W  s[Dreg]         
+0100 1000 01ss sSSS:00:-----:-----:00: PEA.L   s[!Dreg,Areg,Aipi,Apdi,Immd]
+0100 1000 10dd dDDD:00:-NZ00:-----:30: EXT.W   d[Dreg]         
+0100 1000 10dd dDDD:00:-----:-----:02: MVMLE.W #1,d[!Dreg,Areg,Aipi]
+0100 1000 11dd dDDD:00:-NZ00:-----:30: EXT.L   d[Dreg]         
+0100 1000 11dd dDDD:00:-----:-----:02: MVMLE.L #1,d[!Dreg,Areg,Aipi]
+0100 1001 11dd dDDD:00:-NZ00:-----:30: EXT.B   d[Dreg]         
+0100 1010 zzss sSSS:00:-NZ00:-----:10: TST.z   s
+0100 1010 11dd dDDD:00:?????:?????:30: TAS.B   d[!Areg]
+0100 1010 1111 1100:00:?????:?????:00: ILLEGAL
+0100 1100 00ss sSSS:20:-NZVC:-----:13: MULL.L  #1,s[!Areg]
+0100 1100 01ss sSSS:20:?????:?????:13: DIVL.L  #1,s[!Areg]
+0100 1100 10ss sSSS:00:-----:-----:01: MVMEL.W #1,s[!Dreg,Areg,Apdi,Immd]
+0100 1100 11ss sSSS:00:-----:-----:01: MVMEL.L #1,s[!Dreg,Areg,Apdi,Immd]
+0100 1110 0100 JJJJ:00:-----:XNZVC:10: TRAP    #J
+0100 1110 0101 0rrr:00:-----:-----:31: LINK.W  Ar,#1
+0100 1110 0101 1rrr:00:-----:-----:30: UNLK.L  Ar
+0100 1110 0110 0rrr:02:-----:-----:10: MVR2USP.L Ar
+0100 1110 0110 1rrr:02:-----:-----:20: MVUSP2R.L Ar
+0100 1110 0111 0000:02:-----:-----:00: RESET
+0100 1110 0111 0001:00:-----:-----:00: NOP
+0100 1110 0111 0010:02:XNZVC:-----:10: STOP    #1
+0100 1110 0111 0011:02:XNZVC:-----:00: RTE
+0100 1110 0111 0100:00:?????:?????:10: RTD     #1
+0100 1110 0111 0101:00:-----:-----:00: RTS
+0100 1110 0111 0110:00:-----:XNZVC:00: TRAPV
+0100 1110 0111 0111:00:XNZVC:-----:00: RTR
+0100 1110 0111 1010:12:?????:?????:10: MOVEC2  #1
+0100 1110 0111 1011:12:?????:?????:10: MOVE2C  #1
+0100 1110 10ss sSSS:00://///://///:80: JSR.L   s[!Dreg,Areg,Aipi,Apdi,Immd]
+0100 rrr1 00ss sSSS:00:?????:?????:11: CHK.L   s[!Areg],Dr
+0100 rrr1 10ss sSSS:00:?????:?????:11: CHK.W   s[!Areg],Dr
+0100 1110 11ss sSSS:00://///://///:80: JMP.L   s[!Dreg,Areg,Aipi,Apdi,Immd]
+0100 rrr1 11ss sSSS:00:-----:-----:02: LEA.L   s[!Dreg,Areg,Aipi,Apdi,Immd],Ar
+
+0101 jjj0 01dd dDDD:00:-----:-----:13: ADDA.W  #j,d[Areg]
+0101 jjj0 10dd dDDD:00:-----:-----:13: ADDA.L  #j,d[Areg]
+0101 jjj0 zzdd dDDD:00:XNZVC:-----:13: ADDQ.z  #j,d[!Areg]
+0101 jjj1 01dd dDDD:00:-----:-----:13: SUBA.W  #j,d[Areg]
+0101 jjj1 10dd dDDD:00:-----:-----:13: SUBA.L  #j,d[Areg]
+0101 jjj1 zzdd dDDD:00:XNZVC:-----:13: SUBQ.z  #j,d[!Areg]
+0101 cccc 1100 1rrr:00:-----:-++++:31: DBcc.W  Dr,#1
+0101 cccc 11dd dDDD:00:-----:-++++:20: Scc.B   d[!Areg]
+0101 cccc 1111 1010:20:?????:?????:10: TRAPcc  #1
+0101 cccc 1111 1011:20:?????:?????:10: TRAPcc  #2
+0101 cccc 1111 1100:20:?????:?????:00: TRAPcc
+
+% Bxx.L is 68020 only, but setting the CPU level to 2 would give illegal
+% instruction exceptions when compiling a 68000 only emulation, which isn't
+% what we want either.
+0110 0001 0000 0000:00://///://///:40: BSR.W   #1
+0110 0001 IIII IIII:00://///://///:40: BSR.B   #i
+0110 0001 1111 1111:00://///://///:40: BSR.L   #2
+0110 CCCC 0000 0000:00:-----:-++++:40: Bcc.W   #1
+0110 CCCC IIII IIII:00:-----:-++++:40: Bcc.B   #i
+0110 CCCC 1111 1111:00:-----:-++++:40: Bcc.L   #2
+
+0111 rrr0 iiii iiii:00:-NZ00:-----:12: MOVEQ   #i,Dr
+
+1000 rrr0 zzss sSSS:00:-NZ00:-----:13: OR.z    s[!Areg],Dr
+1000 rrr0 11ss sSSS:00:?????:?????:13: DIVU.W  s[!Areg],Dr
+1000 rrr1 00dd dDDD:00:XxZxC:X-Z--:13: SBCD.B  d[Dreg],Dr      
+1000 rrr1 00dd dDDD:00:XxZxC:X-Z--:13: SBCD.B  d[Areg-Apdi],Arp      
+1000 rrr1 zzdd dDDD:00:-NZ00:-----:13: OR.z    Dr,d[!Areg,Dreg]
+1000 rrr1 01dd dDDD:20:?????:?????:12: PACK    d[Dreg],Dr      
+1000 rrr1 01dd dDDD:20:?????:?????:12: PACK    d[Areg-Apdi],Arp      
+1000 rrr1 10dd dDDD:20:?????:?????:12: UNPK    d[Dreg],Dr      
+1000 rrr1 10dd dDDD:20:?????:?????:12: UNPK    d[Areg-Apdi],Arp      
+1000 rrr1 11ss sSSS:00:?????:?????:13: DIVS.W  s[!Areg],Dr
+
+1001 rrr0 zzss sSSS:00:XNZVC:-----:13: SUB.z   s,Dr
+1001 rrr0 11ss sSSS:00:-----:-----:13: SUBA.W  s,Ar
+1001 rrr1 zzdd dDDD:00:XNZVC:X-Z--:13: SUBX.z  d[Dreg],Dr      
+1001 rrr1 zzdd dDDD:00:XNZVC:X-Z--:13: SUBX.z  d[Areg-Apdi],Arp      
+1001 rrr1 zzdd dDDD:00:XNZVC:-----:13: SUB.z   Dr,d[!Areg,Dreg]
+1001 rrr1 11ss sSSS:00:-----:-----:13: SUBA.L  s,Ar
+
+1011 rrr0 zzss sSSS:00:-NZVC:-----:11: CMP.z   s,Dr
+1011 rrr0 11ss sSSS:00:-NZVC:-----:11: CMPA.W  s,Ar
+1011 rrr1 11ss sSSS:00:-NZVC:-----:11: CMPA.L  s,Ar
+1011 rrr1 zzdd dDDD:00:-NZVC:-----:11: CMPM.z  d[Areg-Aipi],ArP
+1011 rrr1 zzdd dDDD:00:-NZ00:-----:13: EOR.z   Dr,d[!Areg]
+
+1100 rrr0 zzss sSSS:00:-NZ00:-----:13: AND.z   s[!Areg],Dr
+1100 rrr0 11ss sSSS:00:-NZ00:-----:13: MULU.W  s[!Areg],Dr
+1100 rrr1 00dd dDDD:00:XxZxC:X-Z--:13: ABCD.B  d[Dreg],Dr      
+1100 rrr1 00dd dDDD:00:XxZxC:X-Z--:13: ABCD.B  d[Areg-Apdi],Arp      
+1100 rrr1 zzdd dDDD:00:-NZ00:-----:13: AND.z   Dr,d[!Areg,Dreg]
+1100 rrr1 01dd dDDD:00:-----:-----:33: EXG.L   Dr,d[Dreg]      
+1100 rrr1 01dd dDDD:00:-----:-----:33: EXG.L   Ar,d[Areg]            
+1100 rrr1 10dd dDDD:00:-----:-----:33: EXG.L   Dr,d[Areg]      
+1100 rrr1 11ss sSSS:00:-NZ00:-----:13: MULS.W  s[!Areg],Dr
+
+1101 rrr0 zzss sSSS:00:XNZVC:-----:13: ADD.z   s,Dr
+1101 rrr0 11ss sSSS:00:-----:-----:13: ADDA.W  s,Ar
+1101 rrr1 zzdd dDDD:00:XNZVC:X-Z--:13: ADDX.z  d[Dreg],Dr      
+1101 rrr1 zzdd dDDD:00:XNZVC:X-Z--:13: ADDX.z  d[Areg-Apdi],Arp      
+1101 rrr1 zzdd dDDD:00:XNZVC:-----:13: ADD.z   Dr,d[!Areg,Dreg]
+1101 rrr1 11ss sSSS:00:-----:-----:13: ADDA.L  s,Ar
+
+1110 jjjf zz00 0RRR:00:XNZVC:-----:13: ASf.z   #j,DR
+1110 jjjf zz00 1RRR:00:XNZ0C:-----:13: LSf.z   #j,DR
+1110 jjjf zz01 0RRR:00:XNZ0C:X----:13: ROXf.z  #j,DR
+1110 jjjf zz01 1RRR:00:-NZ0C:-----:13: ROf.z   #j,DR
+1110 rrrf zz10 0RRR:00:XNZVC:X----:13: ASf.z   Dr,DR
+1110 rrrf zz10 1RRR:00:XNZ0C:X----:13: LSf.z   Dr,DR
+1110 rrrf zz11 0RRR:00:XNZ0C:X----:13: ROXf.z  Dr,DR
+1110 rrrf zz11 1RRR:00:-NZ0C:-----:13: ROf.z   Dr,DR
+1110 000f 11dd dDDD:00:XNZVC:-----:13: ASfW.W  d[!Dreg,Areg]
+1110 001f 11dd dDDD:00:XNZ0C:-----:13: LSfW.W  d[!Dreg,Areg]
+1110 010f 11dd dDDD:00:XNZ0C:X----:13: ROXfW.W d[!Dreg,Areg]
+1110 011f 11dd dDDD:00:-NZ0C:-----:13: ROfW.W  d[!Dreg,Areg]
+
+1110 1000 11ss sSSS:20:?????:?????:11: BFTST   #1,s[!Areg,Apdi,Aipi,Immd]
+1110 1001 11ss sSSS:20:?????:?????:11: BFEXTU  #1,s[!Areg,Apdi,Aipi,Immd]
+1110 1010 11ss sSSS:20:?????:?????:13: BFCHG   #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]
+1110 1011 11ss sSSS:20:?????:?????:11: BFEXTS  #1,s[!Areg,Apdi,Aipi,Immd]
+1110 1100 11ss sSSS:20:?????:?????:13: BFCLR   #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]
+1110 1101 11ss sSSS:20:?????:?????:11: BFFFO   #1,s[!Areg,Apdi,Aipi,Immd]
+1110 1110 11ss sSSS:20:?????:?????:13: BFSET   #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]
+1110 1111 11ss sSSS:20:?????:?????:13: BFINS   #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]
+
+% floating point co processor
+1111 0010 00ss sSSS:30:?????:?????:11: FPP      #1,s
+1111 0010 01ss sSSS:30:?????:?????:11: FDBcc    #1,s[Areg-Dreg]
+1111 0010 01ss sSSS:30:?????:?????:11: FScc     #1,s[!Areg,Immd,PC8r,PC16]
+1111 0010 0111 1010:30:?????:?????:10: FTRAPcc  #1
+1111 0010 0111 1011:30:?????:?????:10: FTRAPcc  #2
+1111 0010 0111 1100:30:?????:?????:00: FTRAPcc
+1111 0010 10KK KKKK:30:?????:?????:11: FBcc     #K,#1
+1111 0010 11KK KKKK:30:?????:?????:11: FBcc     #K,#2
+1111 0011 00ss sSSS:32:?????:?????:20: FSAVE    s[!Dreg,Areg,Aipi,Immd,PC8r,PC16]
+1111 0011 01ss sSSS:32:?????:?????:10: FRESTORE s[!Dreg,Areg,Apdi,Immd]
+
+1111 0101 iiii iSSS:40:?????:?????:11: MMUOP    #i,s
+
+% 68040 instructions
+1111 0100 pp00 1rrr:42:-----:-----:02: CINVL    #p,Ar
+1111 0100 pp01 0rrr:42:-----:-----:02: CINVP    #p,Ar
+1111 0100 pp01 1rrr:42:-----:-----:00: CINVA    #p
+1111 0100 pp10 1rrr:42:-----:-----:02: CPUSHL   #p,Ar
+1111 0100 pp11 0rrr:42:-----:-----:02: CPUSHP   #p,Ar
+1111 0100 pp11 1rrr:42:-----:-----:00: CPUSHA   #p
+% destination register number is encoded in the following word
+1111 0110 0010 0rrr:40:-----:-----:12: MOVE16   ArP,AxP
+1111 0110 00ss sSSS:40:-----:-----:12: MOVE16   s[Dreg-Aipi],L
+1111 0110 00dd dDDD:40:-----:-----:12: MOVE16   L,d[Areg-Aipi]
+1111 0110 00ss sSSS:40:-----:-----:12: MOVE16   s[Aind],L
+1111 0110 00dd dDDD:40:-----:-----:12: MOVE16   L,d[Aipi-Aind]
diff --git a/src/core/uae/uae.dsp b/src/core/uae/uae.dsp
new file mode 100644
index 0000000..74fe6dd
--- /dev/null
+++ b/src/core/uae/uae.dsp
@@ -0,0 +1,63 @@
+# Microsoft Developer Studio Project File - Name="uae" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=uae - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "uae.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "uae.mak" CFG="uae - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "uae - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "uae - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF  "$(CFG)" == "uae - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+
+!ELSEIF  "$(CFG)" == "uae - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "uae___Win32_Debug"
+# PROP BASE Intermediate_Dir "uae___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+
+!ENDIF 
+
+# Begin Target
+
+# Name "uae - Win32 Release"
+# Name "uae - Win32 Debug"
+# End Target
+# End Project
diff --git a/src/core/uae/uae.dsw b/src/core/uae/uae.dsw
new file mode 100644
index 0000000..c2b04d8
--- /dev/null
+++ b/src/core/uae/uae.dsw
@@ -0,0 +1,74 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "build68k"=.\build68k.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "gencpu"=.\gencpu.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name build68k
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libuae"=.\libuae.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name gencpu
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "uae"=.\uae.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libuae
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/src/core/uae/uconfig.h b/src/core/uae/uconfig.h
new file mode 100644
index 0000000..4ab567c
--- /dev/null
+++ b/src/core/uae/uconfig.h
@@ -0,0 +1,78 @@
+ /* 
+  * UAE - The Un*x Amiga Emulator
+  * 
+  * User configuration options
+  *
+  * Copyright 1995 - 1998 Bernd Schmidt
+  * $Id: uconfig.h 1380 2005-05-25 09:11:02Z roms $
+  */
+
+/*
+ * Please note: Many things are configurable with command line parameters,
+ * and you can put anything you can pass on the command line into a 
+ * configuration file ~/.uaerc. Please read the documentation for more
+ * information.
+ * 
+ * NOTE NOTE NOTE
+ * Whenever you change something in this file, you have to "make clean"
+ * afterwards.
+ * Don't remove the '#' signs. If you want to enable something, move it out
+ * of the C comment block, if you want to disable something, move it inside
+ * the block.
+ */
+
+/*
+ * When USE_COMPILER is defined, a m68k->i386 instruction compiler will be
+ * used. This is experimental. It has only been tested on a Linux/i386 ELF
+ * machine, although it might work on other i386 Unices.
+ * This is supposed to speed up application programs. It will not work very
+ * well for hardware bangers like games and demos, in fact it will be much
+ * slower. It can also be slower for some applications and/or benchmarks.
+ * It needs a lot of tuning. Please let me know your results with this.
+ * The second define, RELY_ON_LOADSEG_DETECTION, decides how the compiler 
+ * tries to detect self-modifying code. If it is not set, the first bytes
+ * of every compiled routine are used as checksum before executing the
+ * routine. If it is set, the UAE filesystem will perform some checks to 
+ * detect whether an executable is being loaded. This is less reliable
+ * (it won't work if you don't use the harddisk emulation, so don't try to
+ * use floppies or even the RAM disk), but much faster.
+ *
+ * @@@ NOTE: This option is unfortunately broken in this version. Don't
+ * try to use it. @@@
+ *
+#define USE_COMPILER
+#define RELY_ON_LOADSEG_DETECTION
+ */
+
+/*
+ * Set USER_PROGRAMS_BEHAVE to 1 or 2 to indicate that you are only running
+ * non-hardware banging programs which leave all the dirty work to the
+ * Kickstart. This affects the compiler. Any program that is _not_ in the ROM
+ * (i.e. everything but the Kickstart) will use faster memory access 
+ * functions.
+ * There is of course the problem that the Amiga doesn't really distinguish
+ * between user programs and the kernel. Not all of the OS is in the ROM,
+ * e.g. the parallel.device is on the disk and gets loaded into RAM at least
+ * with Kickstart 1.3 (don't know about newer Kickstarts). So you probably
+ * can't print, and some other stuff may also fail to work.
+ * A useless option, really, given the way lots of Amiga software is written.
+#define USER_PROGRAMS_BEHAVE 0
+ */
+
+/***************************************************************************
+ * Operating system/machine specific options
+ * Configure these for your CPU. The default settings should work on any
+ * machine, but may not give optimal performance everywhere.
+ * (These don't do very much yet, except HAVE_RDTSC
+ */
+
+/*
+ * Define this on PPro's, K6's and maybe other non-x86 CPUs.
+#define MULTIPLICATION_PROFITABLE
+ */
+
+/*
+ * PPros don't like branches. With this option, UAE tries to avoid them in some
+ * places.
+#define BRANCHES_ARE_EXPENSIVE
+ */
diff --git a/src/core/uae/xmalloc.c b/src/core/uae/xmalloc.c
new file mode 100644
index 0000000..0fde2e5
--- /dev/null
+++ b/src/core/uae/xmalloc.c
@@ -0,0 +1,32 @@
+ /*
+  * UAE - The Un*x Amiga Emulator
+  *
+  * Various stuff missing in some OSes.
+  *
+  * Copyright 1997 Bernd Schmidt
+  */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "sysdeps.h"
+
+void *xmalloc(size_t n)
+{
+    void *a = malloc (n);
+    if (a == NULL) {
+	fprintf (stderr, "virtual memory exhausted\n");
+	abort ();
+    }
+    return a;
+}
+
+void *xcalloc (size_t n, size_t size)
+{
+    void *a = calloc (n, size);
+    if (a == NULL) {
+	fprintf (stderr, "virtual memory exhausted\n");
+	abort ();
+    }
+    return a;
+}
diff --git a/src/gui/about.c b/src/gui/about.c
new file mode 100644
index 0000000..a77a3c2
--- /dev/null
+++ b/src/gui/about.c
@@ -0,0 +1,126 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: about.c 2444 2007-04-15 08:29:34Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (C) 1999-2005  Romain Lievin
+ *  Copyright (C) 2005 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/* HAVE_CONFIG_H */
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "about.h"
+#include "paths.h"
+#include "version.h"
+#include "tilibs.h"
+#include "engine.h"
+#include "support.h"
+
+static const char* authors[] =  
+{
+	"Romain Lievin (Linux/Win32) <roms at tilp.info>", 
+	"Kevin Kofler  (gdb & Linux/Win32) <kevin at tigcc.ticalc.org>", 
+	"Christian Walther (Mac OS-X) <cwalther at gmx.ch>",
+	NULL 
+};
+
+static const char* documenters[] = 
+{
+	"Romain Lievin (Linux/Win32) <roms at tilp.info>", 
+	NULL
+};
+
+static const char* artists[] = 
+{
+	"Jaime Fernando Meza Meza (icon & skin design)",
+	"hibou/hiboo (logo)",
+	NULL
+};
+
+gint display_about_dbox(void)
+{
+	GtkWidget* widget;
+	GtkAboutDialog* dlg;
+	GdkPixbuf *pix;
+
+	struct stat stbuf;
+	FILE *fd;
+	gchar *filename;
+	int len = 0;
+	gchar buffer[32768];
+	gchar *version;
+
+#ifdef _MSC_VER /* MSVC builds. MinGW builds use Linux file structures. */
+	filename = g_strconcat(inst_paths.base_dir, "License.txt", NULL);
+#else				/*  */
+	filename = g_strconcat(inst_paths.base_dir, "COPYING", NULL);
+#endif				/*  */
+
+	if (access(filename, F_OK) == 0) 
+	{
+		if (stat(filename, &stbuf) != -1) 
+		{
+			len = stbuf.st_size;
+		}
+		if ((fd = fopen(filename, "r")) != NULL) 
+		{
+			memset(buffer, 0, sizeof(buffer));
+			len = fread(buffer, 1, len, fd);
+			fclose(fd);
+		}
+	}
+
+	version = g_strdup_printf(_("Framework version (cables=%s, files=%s, calcs=%s, conv=%s)"),
+	     ticables_version_get(), tifiles_version_get(), ticalcs_version_get(), ticonv_version_get());
+
+	//---
+
+	widget = gtk_about_dialog_new();
+	dlg = GTK_ABOUT_DIALOG(widget);
+	pix = create_pixbuf("logo.xpm");
+
+	gtk_about_dialog_set_name(dlg, "TiEmu - Ti Emulator - ");
+	gtk_about_dialog_set_version(dlg, TIEMU_VERSION);
+	gtk_about_dialog_set_comments(dlg, version);
+	gtk_about_dialog_set_copyright(dlg, "Copyright (c) 1999-2007 The TiEmu Team");
+	gtk_about_dialog_set_license(dlg, buffer);
+	gtk_about_dialog_set_website(dlg, "http://lpg.ticalc.org/prj_tiemu");
+	gtk_about_dialog_set_authors(dlg, authors);
+	gtk_about_dialog_set_documenters(dlg, documenters);
+	gtk_about_dialog_set_artists(dlg, artists);
+	gtk_about_dialog_set_logo(dlg, pix);
+
+	g_signal_connect_swapped(dlg, "response",
+		G_CALLBACK(gtk_widget_destroy), dlg);
+
+	//gtk_show_about_dialog(NULL, "");
+	gtk_widget_show_all(widget);
+
+	return 0;
+}
+
+
diff --git a/src/gui/about.h b/src/gui/about.h
new file mode 100644
index 0000000..46dc3f7
--- /dev/null
+++ b/src/gui/about.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: about.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint display_about_dbox();
diff --git a/src/gui/calc/calc.c b/src/gui/calc/calc.c
new file mode 100644
index 0000000..07dd98e
--- /dev/null
+++ b/src/gui/calc/calc.c
@@ -0,0 +1,814 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: calc.c 2729 2007-12-16 15:29:16Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2005, Julien Blache
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#ifdef __WIN32__
+#include <io.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "skinops.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "tie_error.h"
+#include "calc.h"
+#include "dbg_all.h"
+#include "screenshot.h"
+#include "keymap.h"
+#include "logging.h"
+#include "gscales.h"
+
+#define ALLOW_RESIZE_WIN32
+
+GtkWidget *main_wnd = NULL;
+gboolean explicit_destroy = 0;
+GtkWidget *area = NULL;
+
+SKIN_INFOS skin_infos = { 0 };
+
+extern GdkPixbuf*	lcd_mem;
+extern GdkPixbuf*	lcd;
+extern GdkPixmap*	pixmap;
+
+extern Pc2TiKey*    kbd_keymap;
+extern const char*	skn_keymap;
+extern const char	sknKey92[];
+extern const char	sknKey89[];
+
+extern uint32_t*	lcd_bytmap;
+
+extern LCD_INFOS	li;
+extern float		sf;	// scaling factor
+
+extern LCD_RECT		ls;
+extern LCD_RECT		lr;
+extern SKN_RECT		sr;
+extern WND_RECT		wr;
+
+static guint tid = -1;
+
+extern int			shot_cnt;
+extern int			skip_cnt;
+
+// part 1: set scale factor
+static void set_scale(int view_mode)
+{
+	if(view_mode == VIEW_NORMAL)
+	{
+		options.scale = sf = 1.0;
+	}
+	else if(view_mode == VIEW_LARGE)
+	{
+		options.scale = sf = 2.0;
+	}
+	else if(view_mode == VIEW_FULL)
+	{
+		GdkScreen* screen = gdk_screen_get_default();
+		gint sw = gdk_screen_get_width(screen);
+		gint sh = gdk_screen_get_height(screen);
+
+		sf = (float)sw / lr.w;
+		sf = (float)sh / lr.h;
+		//printf("%i %i %f\n", sw, lr.w, sf);
+		//printf("%i %i %f\n", sh, lr.h, sf);
+
+		options.scale = sf = (float)1.0;	// restricted to 3.0, too CPU intensive !
+	}
+}
+
+// part 2: compute sizes
+static void set_infos(void)	// set window & lcd sizes
+{
+	// LCD rectangle (source: skin)
+	ls.x = (int)(sf * skin_infos.lcd_pos.left); 
+	ls.y = (int)(sf * skin_infos.lcd_pos.top);
+	ls.w = (int)(sf * tihw.lcd_w);
+	ls.h = (int)(sf * tihw.lcd_h);
+
+	// LCD rectangle (target: window)
+	if(options.skin) 
+	{
+		lr.x = ls.x; 
+		lr.y = ls.y;
+	}
+	else 
+	{
+		lr.x = 0;
+		lr.y = 0;
+	}  
+	lr.w = (int)(sf * tihw.lcd_w);
+	lr.h = (int)(sf * tihw.lcd_h);
+
+
+	// SKN rectangle
+	sr.x = sr.y = 0;
+	sr.w = (int)(sf * skin_infos.width);
+	sr.h = (int)(sf * skin_infos.height);
+
+	// WND rectangle (= LCD or SKN depending on w/ or w/o skin)
+	wr.x = wr.y = 0;
+	if(options.skin)
+	{
+		wr.w = sr.w;
+		wr.h = sr.h;
+	}
+	else
+	{
+		wr.w = lr.w;
+		wr.h = lr.h;
+	}
+
+#if 0
+	printf("LCD src: %3i %3i %3i %3i\n", ls.x, ls.y, ls.w, ls.h);
+	printf("LCD dst: %3i %3i %3i %3i\n", lr.x, lr.y, lr.w, lr.h);
+	printf("SKN    : %3i %3i %3i %3i\n", sr.x, sr.y, sr.w, sr.h);
+	printf("WND    : %3i %3i %3i %3i\n", wr.x, wr.y, wr.w, wr.h);
+#endif
+}
+
+// part 3: set changes on window
+static void set_window(int full_redraw) 
+{
+	if(main_wnd->window == NULL)
+		return;
+
+	// resize window and drawing area
+	if(full_redraw)
+		gtk_window_resize(GTK_WINDOW(main_wnd), wr.w, wr.h);
+	
+#if defined(__WIN32__) && defined(ALLOW_RESIZE_WIN32)
+	if(!full_redraw)
+		gdk_window_resize(main_wnd->window, wr.w, wr.h);
+#endif
+
+	// reallocate backing pixmap
+	if(pixmap != NULL)
+	{
+		// free current backing pixmap
+		g_object_unref(pixmap);
+		pixmap = NULL;
+
+		// and allocate a new one
+		pixmap = gdk_pixmap_new(main_wnd->window, wr.w, wr.h, -1);
+		if(pixmap == NULL)
+		{
+			gchar *s = g_strdup_printf("unable to create backing pixmap.\n");
+			tiemu_error(0, s);
+			g_free(s);
+			return;
+		}
+	}
+}
+
+static void set_constraints(void)
+{
+	// Allows resizing of window with a constant aspect ratio.
+	// This is the right way as used under Linux. 
+        // Does not work under Windows thus not enabled.
+
+#if !defined(__WIN32__) || !defined(ALLOW_RESIZE_WIN32)
+	if(1)
+	{
+		GdkGeometry geom = { -1 };
+		GdkWindowHints mask = GDK_HINT_MIN_SIZE | GDK_HINT_ASPECT;
+		double r = (float)wr.w / wr.h;
+
+		geom.min_width = 100;
+		geom.min_height = 100;
+
+		geom.min_aspect = r;
+		geom.max_aspect = r;
+		gtk_window_set_geometry_hints(GTK_WINDOW(main_wnd), 
+					      area, &geom, mask);
+				
+		//printf("set_constraints: %i %i %1.2f\n", wr.w, wr.h, r);		
+	}
+#endif
+}
+
+// Main wnd by loading glade xml file or by executing glade generated code
+gint display_main_wnd(void)
+{
+	GladeXML *xml;
+	gchar *title;
+
+	xml = glade_xml_new
+		(tilp_paths_build_glade("calc-2.glade"), "calc_wnd",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	main_wnd = glade_xml_get_widget(xml, "calc_wnd");
+	area = glade_xml_get_widget(xml, "drawingarea1");
+
+	gtk_window_move(GTK_WINDOW(main_wnd), options3.calc.rect.x, options3.calc.rect.y);
+	set_constraints();
+	gtk_widget_realize(main_wnd);	// set drawing area valid
+
+	// set window title (useful for TIGCC-IDE for instance)
+	// Note: lpWindowName is "TiEmu (%s)" and lpClassName is "gdkWindowToplevel"
+	title = g_strdup_printf("TiEmu (%s)", ti68k_calctype_to_string(tihw.calc_type));
+	gtk_window_set_title(GTK_WINDOW(main_wnd), title);
+	g_free(title);
+
+	return 0;
+}
+
+extern void on_exit_without_saving_state1_activate(GtkMenuItem* item, gpointer data);
+
+GLADE_CB void
+on_calc_wnd_destroy                    (GtkObject       *object,
+                                        gpointer         user_data)
+{
+	// Uninstall LCD refresh (to avoid earlier use of main_wnd by hid_lcd_update)
+    g_source_remove(tid);
+
+	// When GTK called this signal, the widget has already been destroy
+	// thus set the pointer to a valid value, ie NULL .
+	main_wnd = NULL;
+
+	if(!explicit_destroy)
+		on_exit_without_saving_state1_activate(NULL, NULL);
+}
+
+extern void redraw_skin(void);
+
+GLADE_CB gboolean
+on_drawingarea1_configure_event        (GtkWidget       *widget,
+                                        GdkEventConfigure *event,
+                                        gpointer         user_data)
+{
+	float factor;
+	
+	// compute scaling factor
+	if(options.skin)	
+		factor = (float)event->width / (float)skin_infos.width;
+	else
+		factor = (float)event->width / (float)tihw.lcd_w;
+
+#if 0
+	printf("on_drawingarea1_configure_event:  x y w h = %i %i %i %i\n", 
+		event->x, event->y, event->width, event->height);
+	printf("on_drawingarea1_configure_event: f = %1.2f\n", factor);
+#endif
+
+	// if normal or large view then exits
+	if((factor == 1.0) || (factor == 2.0))
+		return FALSE;
+
+	// set scaling factor
+	options.scale = sf = factor;
+	options.view = VIEW_CUSTOM;
+
+	// compute sizes
+	set_infos();
+
+	// and set window size
+	set_window(0);
+	redraw_skin();
+
+    return FALSE;
+}
+
+GLADE_CB gboolean
+on_drawingarea1_expose_event           (GtkWidget       *widget,
+                                        GdkEventExpose  *event,
+                                        gpointer         user_data)
+{
+    gdk_draw_pixmap(
+        widget->window,
+		widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+		pixmap,
+		event->area.x, event->area.y,
+		event->area.x, event->area.y,
+		event->area.width, event->area.height);
+
+	return FALSE;
+}
+
+static int match_skin(int calc_type)
+{
+	SKIN_INFOS *sk = &skin_infos;
+	int ok;
+	gchar *skin_name, *s;
+
+	s = g_strdup(ti68k_calctype_to_string(calc_type));
+	skin_name = g_ascii_strdown(s, strlen(s));
+	g_free(s);
+
+	if(!strcmp(skin_name, "ti92+"))
+		skin_name[4] = '\0';
+
+#ifdef __IPAQ__
+	s = g_strconcat("ipaq_", skin_name, NULL);
+	g_free(skin_name);
+	skin_name = s;
+#endif
+
+	// filename is "", load default skin
+	if(!strcmp(g_basename(options.skin_file), ""))
+	{
+		g_free(options.skin_file);
+		options.skin_file = g_strdup_printf("%s%s.skn", 
+					    inst_paths.skin_dir, skin_name);
+		g_free(skin_name);
+		return -1;
+	}
+
+	// load skin header
+	if(skin_read_header(sk, options.skin_file) == -1)
+	{
+		g_free(options.skin_file);
+      	options.skin_file = g_strdup_printf("%s%s.skn", 
+					    inst_paths.skin_dir, skin_name);
+	    g_free(skin_name);
+	    return -1;
+	}
+
+	// is skin compatible
+	switch(tihw.calc_type)
+	{
+	    case TI92:
+	    case TI92p:
+            ok = !strcmp((const char *)sk->calc, SKIN_TI92) || !strcmp((const char *)sk->calc, SKIN_TI92P);
+		break;
+	    case TI89:
+	    ok = !strcmp((const char *)sk->calc, SKIN_TI89);
+		break;
+	    case TI89t:
+	    ok = !strcmp((const char *)sk->calc, SKIN_TI89T);
+		break;
+	    case V200:
+	    ok = !strcmp((const char *)sk->calc, SKIN_V200);
+		break;
+	    default: 
+	    ok = 0;
+		break;
+	}
+
+	if(!ok)
+	{
+		g_free(options.skin_file);
+      	options.skin_file = g_strdup_printf("%s%s.skn", 
+			inst_paths.skin_dir, skin_name);
+
+	    //tiemu_error(0, _("skin incompatible with the current calc model. Falling back to default skin."));
+	    g_free(skin_name);
+		return -1;
+	}
+
+    g_free(skin_name);
+	return 0;
+}
+
+static int match_keymap(int calc_type)
+{
+	gchar *keys_name, *s;
+    int ct, ok;
+
+	s = g_strdup(ti68k_calctype_to_string(calc_type));
+	keys_name = g_ascii_strdown(s, strlen(s));
+
+	if(!strcmp(keys_name, "ti92+") || !strcmp(keys_name, "ti89t"))
+		keys_name[4] = '\0';
+	if(!strcmp(keys_name, "v200plt"))
+		strcpy(keys_name, "ti92");
+
+	// filename is "", load default keymap
+	if(!strcmp(g_basename(options.keys_file), ""))
+	{
+		g_free(options.keys_file);
+		options.keys_file = g_strdup_printf("%s%s.map", 
+					    inst_paths.skin_dir, keys_name);
+	}
+
+	// load keymap header
+    ct = keymap_read_header(options.keys_file);
+	if(ct == -1)
+	{
+		g_free(options.keys_file);
+      	options.keys_file = g_strdup_printf("%s%s.map", 
+					    inst_paths.skin_dir, keys_name);
+	    g_free(keys_name);
+	    return -1;
+	}
+
+    // is keymap compatible
+	switch(tihw.calc_type)
+	{
+	    case TI92:
+		case TI92p:
+        case V200:
+            ok = (ct == TI92) || (ct == TI92p) || (ct == V200);
+		break;
+	    case TI89:
+        case TI89t:
+            ok = (ct == TI89) || (ct == TI89t);
+		break;
+	    default: 
+            ok = 0;
+		break;
+	}
+
+	if(!ok)
+	{
+		g_free(options.keys_file);
+      	options.keys_file = g_strdup_printf("%s%s.map", 
+			inst_paths.skin_dir, keys_name);
+
+	    //tiemu_error(0, _("keymap incompatible with the current calc model. Falling back to default keymap."));
+	    g_free(keys_name);
+		return -1;
+	}
+
+    g_free(keys_name);
+	return 0;
+}
+
+G_LOCK_EXTERN(lcd_flag);
+extern volatile int lcd_flag;
+extern volatile int debugger;
+
+static gint hid_refresh (gpointer data)
+{
+    if(lcd_flag || (tihw.hw_type >= HW2))
+    {
+		// TI92+: jackycar, TI89: baballe
+	    hid_update_lcd();
+        G_LOCK(lcd_flag);
+        lcd_flag = 0;
+        G_UNLOCK(lcd_flag);
+
+		if(tihw.hw_type >= HW2)
+			lcd_hook_hw2(TRUE);
+    }
+
+    return TRUE;
+}
+
+void compute_convtable(void);
+void compute_grayscale(void);
+
+extern void dnd_init(void);
+extern void dnd_exit(void);
+
+int  hid_init(void)
+{
+    // Found a PC keyboard keymap
+    match_keymap(tihw.calc_type);
+
+    // Load kbd keymap
+    if(keymap_load(options.keys_file) == -1)
+    {
+	    gchar *s = g_strdup_printf("unable to load this keymap: <%s>\n", options.keys_file);
+	    tiemu_error(0, s);
+	    g_free(s);
+	    return -1;
+    }
+
+    // Found a skin
+	match_skin(tihw.calc_type);
+
+    // Load skin (2 parts)
+    if(skin_load(&skin_infos, options.skin_file) == -1) 
+    {
+	    gchar *s = g_strdup_printf("unable to load this skin: <%s>\n", options.skin_file);
+	    tiemu_error(0, s);
+	    g_free(s);
+	    return -1;
+    }
+  
+	// Set skin keymap depending on calculator type
+    switch(tihw.calc_type)
+    {
+    case TI92:
+    case TI92p:
+    case V200:
+        skn_keymap = sknKey92;
+        break;
+    case TI89:
+    case TI89t:
+      	skn_keymap = sknKey89;
+        break;
+    default:
+        {
+	  	gchar *s = g_strdup_printf("no skin found for this calc\n");
+	  	tiemu_error(0, s);
+	  	g_free(s);
+	  	return -1;
+        }
+	}
+
+	// Set window/LCD sizes
+	sf = options.scale;
+	set_scale(options.view);
+	set_infos();
+
+    // Allocate the TI screen buffer
+	lcd_bytmap = (uint32_t *)malloc(LCDMEM_W * LCDMEM_H);
+
+    // Allocate the lcd pixbuf
+    lcd_mem = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, LCDMEM_W, LCDMEM_H);
+    if(lcd_mem == NULL)
+    {
+        gchar *s = g_strdup_printf("unable to create LCD pixbuf.\n");
+	    tiemu_error(0, s);
+	    g_free(s);
+	    return -1;
+    }
+
+	// Used by TI89 (the LCD view is clipped from memory view)
+	lcd = gdk_pixbuf_new_subpixbuf(lcd_mem, 0, 0, tihw.lcd_w, tihw.lcd_h);
+    
+	// Constants for LCD update (speed-up)
+    li.n_channels = gdk_pixbuf_get_n_channels (lcd_mem);
+	li.width = gdk_pixbuf_get_width (lcd_mem);
+	li.height = gdk_pixbuf_get_height (lcd_mem);
+	li.rowstride = gdk_pixbuf_get_rowstride (lcd_mem);
+	li.pixels = gdk_pixbuf_get_pixels (lcd_mem);
+
+	// Create main window
+	display_main_wnd();
+
+    // Allocate the backing pixmap (used for drawing and refresh)
+    pixmap = gdk_pixmap_new(main_wnd->window, wr.w, wr.h, -1);
+    if(pixmap == NULL)
+    {
+        gchar *s = g_strdup_printf("unable to create backing pixmap.\n");
+	    tiemu_error(0, s);
+	    g_free(s);
+	    return -1;
+    }
+    
+    // Draw the skin and compute grayscale palette
+	set_window(1);
+	redraw_skin();
+  	compute_grayscale();
+
+    // Init the planar/chunky conversion table for LCD
+  	compute_convtable();
+
+    // Install LCD refresh: 100 FPS (10 ms)
+    tid = g_timeout_add((params.lcd_rate == -1) ? 50 : params.lcd_rate, 
+		(GtkFunction)hid_refresh, NULL);
+
+	explicit_destroy = 0;
+	gtk_widget_show(main_wnd);	// show wnd here
+
+	if(options.view == VIEW_FULL)
+		gdk_window_fullscreen(main_wnd->window);
+	
+	lcd_planes[0] = tihw.lcd_adr;
+	lcd_planebufs[0] = &tihw.ram[tihw.lcd_adr];
+	ngc = 1;
+	lcd_changed = 1;
+
+	dnd_init();
+
+    return 0;
+}
+
+int  hid_exit(void)
+{
+
+    // Uninstall LCD refresh
+    g_source_remove(tid);
+
+	// Release resources
+    if(lcd_mem != NULL)
+    {
+        g_object_unref(lcd_mem);
+        lcd_mem = NULL;
+		g_object_unref(lcd);
+		lcd = NULL;
+    }
+
+    if(pixmap != NULL)
+    {
+        g_object_unref(pixmap);
+        pixmap = NULL;
+    }
+
+    // Destroy window
+	if(main_wnd)
+	{
+		explicit_destroy = !0;
+		gtk_widget_destroy(main_wnd);
+	}		
+
+    return 0;
+}
+
+void hid_lcd_rate_set(void)
+{
+	g_source_remove(tid);
+
+	tid = g_timeout_add((params.lcd_rate == -1) ? 50 : params.lcd_rate, 
+		(GtkFunction)hid_refresh, NULL);
+}
+
+int hid_switch_with_skin(void)
+{
+    options.skin = 1;
+	set_infos();
+	set_constraints();
+	set_window(1);
+	redraw_skin();
+
+    return 0;
+}
+
+int hid_switch_without_skin(void)
+{
+    options.skin = 0;
+	set_infos();
+	set_constraints();
+	set_window(1);
+	redraw_skin();
+
+    return 0;
+}
+
+int hid_change_skin(const char *filename)
+{
+    int ret1, ret2;
+	
+	ret1 = hid_exit();
+	ret2 = hid_init();
+	
+	return ret1 | ret2;
+}
+
+int hid_switch_fullscreen(void)
+{
+	if(options.view != VIEW_FULL)
+	{
+		set_scale(options.view = VIEW_FULL);
+		set_infos();
+		set_window(1);
+		redraw_skin();
+		gdk_window_fullscreen(main_wnd->window);
+	}
+
+	return 0;
+}
+
+int hid_switch_normal_view(void)
+{
+	if(options.view != VIEW_NORMAL)
+	{
+		set_scale(options.view = VIEW_NORMAL);
+		set_infos();
+		set_window(1);
+		redraw_skin();
+		gdk_window_unfullscreen(main_wnd->window);
+	}
+
+    return 0;
+}
+
+int hid_switch_large_view(void)
+{
+	if(options.view != VIEW_LARGE)
+	{
+		set_scale(options.view = VIEW_LARGE);		
+		set_infos();
+		set_window(1);
+		redraw_skin();
+		gdk_window_unfullscreen(main_wnd->window);
+	}
+
+    return 0;
+}
+
+int  hid_screenshot_burst(void)
+{
+	shot_cnt = options2.shots;
+	skip_cnt = options2.skips;
+
+	return 0;
+}
+
+int  hid_screenshot_single(void)
+{
+	gchar *outfile;
+	gchar *ext = "";
+	gchar *type = "";
+
+	GdkPixbuf *pixbuf = { 0 };
+	gboolean result = FALSE;
+	GError *error = NULL;
+
+	switch(options2.format) 
+	{
+		case IMG_JPG: ext = "jpg"; type = "jpeg"; break;
+		case IMG_PNG: ext = "png"; type = "png";  break;
+		case IMG_ICO: ext = "ico"; type = "ico";  break;
+ 		case IMG_EPS: ext = "eps"; type = "eps";  break;
+ 		case IMG_PDF: ext = "pdf"; type = "pdf";  break;
+		case IMG_BMP: ext = "bmp"; type = "bmp";  break;
+		default: ext = "png"; type = "png";  break;
+	}
+  
+	outfile = g_strdup_printf("%s%s%s%03i.%s", options2.folder, G_DIR_SEPARATOR_S,
+		options2.file, options2.counter, ext);
+	tiemu_info(_("screenshot to %s... "), outfile);
+
+	if((options2.size == IMG_LCD) && (options2.type == IMG_BW)) 
+	{
+		// get pixbuf from TI memory (LCD buffer)
+		pixbuf = hid_copy_lcd();
+	} 
+	else if((options2.size == IMG_LCD) && (options2.type == IMG_COL)) 
+	{
+        // get pixbuf from grayscale lcd
+		pixbuf = gdk_pixbuf_copy(lcd);
+	} 
+	else if((options2.size == IMG_SKIN) && (options2.type == IMG_COL))
+	{
+		// get pixbuf from backing pixmap
+		pixbuf = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, 0, 0, 0, wr.w, wr.h);
+	}
+	else
+	{
+		tiemu_warning(_("unsupported screenshot options combination, screenshot aborted."));
+		return 0;
+       }
+
+	switch (options2.format)
+	{
+	case IMG_EPS:
+		result = tiemu_screen_write_eps(outfile, pixbuf, &error);
+		break;
+	case IMG_PDF:
+		result = tiemu_screen_write_pdf(outfile, pixbuf, &error);
+		break;
+	default:
+		result = gdk_pixbuf_save(pixbuf, outfile, type, &error, NULL);
+		break;
+	}
+
+	if(options2.clipboard)
+	{
+		GtkClipboard *clipboard;
+
+		clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+		gtk_clipboard_set_image(clipboard, pixbuf);
+	}
+
+	if (result == FALSE) 
+	{
+		tiemu_warning(_("failed to save pixbuf file: %s: %s"), outfile, error->message);
+		g_error_free(error);
+	}
+	g_object_unref(pixbuf);
+
+	tiemu_info(_("done!"));
+	options2.counter++;
+
+	return 0;
+}
+
+GLADE_CB gboolean
+on_calc_wnd_window_state_event         (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    return FALSE;
+}
diff --git a/src/gui/calc/calc.h b/src/gui/calc/calc.h
new file mode 100644
index 0000000..750808b
--- /dev/null
+++ b/src/gui/calc/calc.h
@@ -0,0 +1,88 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: calc.h 1977 2006-02-18 13:13:31Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __CALC_H__
+#define __CALC_H__
+
+#include <stdint.h>
+#include "struct.h"
+
+/* Variables */
+
+extern GtkWidget *main_wnd;
+
+/* Functions */
+
+int hid_init(void);
+int hid_exit(void);
+
+void hid_lcd_rate_set(void);
+
+int hid_update_keys(void);
+int hid_update_lcd(void);
+
+int hid_switch_with_skin(void);
+int hid_switch_without_skin(void);
+int hid_change_skin(const char *filename);
+
+int hid_switch_fullscreen(void);
+int hid_switch_unfullscreen(void);
+
+int hid_switch_normal_view(void);
+int hid_switch_large_view(void);
+
+void hid_set_callbacks(void);
+
+int hid_screenshot_single(void);
+int hid_screenshot_burst(void);
+
+int hid_popup_menu(void);
+
+GdkPixbuf* hid_copy_lcd(void);
+
+/* Private Types */
+
+typedef struct
+{
+    uint8_t r;
+    uint8_t g;
+    uint8_t b;
+} RGB;
+
+typedef struct
+{
+	int 	width;
+	int 	height;
+	int 	rowstride;
+	int 	n_channels;
+	guchar*	pixels;
+	gulong*	pixels2;
+} LCD_INFOS;
+
+typedef GdkRect LCD_RECT;
+typedef GdkRect SKN_RECT;
+typedef GdkRect WND_RECT;
+
+#endif
diff --git a/src/gui/calc/dnd.c b/src/gui/calc/dnd.c
new file mode 100644
index 0000000..8ef1bd5
--- /dev/null
+++ b/src/gui/calc/dnd.c
@@ -0,0 +1,185 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: calc.c 2279 2006-11-22 19:47:12Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2006, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <string.h>
+
+#include "support.h"
+#include "tilibs.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "calc.h"
+#include "engine.h"
+#include "fs_misc.h"
+#include "romversion.h"
+
+void dnd_init(void)
+{
+	extern GtkWidget *main_wnd;
+
+	gtk_drag_dest_set (main_wnd, 0, NULL, 0, 0);
+}
+
+GLADE_CB gboolean
+on_calc_wnd_drag_drop              (GtkWidget       *widget,
+                                        GdkDragContext  *context,
+                                        gint             x,
+                                        gint             y,
+                                        guint            time,
+                                        gpointer         user_data)
+{
+	if (context->targets)
+    {
+      gtk_drag_get_data (widget, context, 
+			 GDK_POINTER_TO_ATOM (context->targets->data), 
+			 time);
+      return TRUE;
+    }
+
+	return FALSE;
+}
+
+extern int import_romversion(const char *filename);
+
+GLADE_CB void
+on_calc_wnd_drag_data_received     (GtkWidget       *widget,
+                                        GdkDragContext  *context,
+                                        gint             x,
+                                        gint             y,
+                                        GtkSelectionData *data,
+                                        guint            info,
+                                        guint            time,
+                                        gpointer         user_data)
+{
+	gchar **filenames = NULL;
+
+	if ((data->length >= 0) && (data->format == 8))
+    {
+		gchar *tok, *str = data->data;
+		gchar **uris, **p;
+		guint length;
+		gchar *fn;
+
+		g_print ("Received \"%s\"\n", str);
+
+		// is this an URI?
+		if(g_ascii_strncasecmp(str, "file://", 7))
+			gtk_drag_finish (context, FALSE, FALSE, time);
+
+		// tails '\r\n' termination
+		if ((tok = strrchr(str, '\r')) || (tok = strrchr(str, '\n')))
+			*tok = '\0';
+
+		// split if several filenames
+		uris = g_strsplit(str, "\r\n", 0);
+		length =  g_strv_length(uris);
+		printf("uris size = %u\n", length);
+
+		// convert URIs to filenames
+		for(p = uris; *p; p++)
+		{
+			// is this an URI?
+			if (!g_ascii_strncasecmp(*p, "file://", 7)) 
+			{
+				GError *error = NULL;
+				gchar *fn;
+				gchar *tok;
+
+				// convert URI to filename
+				fn = g_filename_from_uri(*p, NULL, &error);
+				if(fn == NULL)
+				{
+					fprintf(stderr, "DnD error: %s\n", error ? error->message : "g_filename_from_uri error");
+					g_strfreev(uris);
+
+					goto ocwwdr_end;
+				}
+
+				// tails string
+				if ((tok = strchr(fn, '\r')) || (tok = strchr(fn, '\n')))
+					*tok = '\0';
+
+				// debug
+				printf("fn = <%s>\n", fn);
+				g_free(*p);
+				*p = fn;
+			}
+		}
+
+		// we have got our filenames...
+		filenames = uris;
+		fn = filenames[0];
+
+		// let's them process!
+		if((length == 1) && !strcmp(tifiles_fext_get(fn), "skn"))
+		{
+			// Load new skin (fs_misc.c)
+			g_free(options.skin_file);
+			options.skin_file = g_strdup(fn);
+
+			hid_change_skin(options.skin_file);
+		}
+		else if(length == 1 && (!strcmp(tifiles_fext_get(fn), "rom") || 
+				ti68k_is_a_rom_file(fn) || ti68k_is_a_tib_file(fn)))
+		{
+			{
+				// Add rom to wizard
+				if(!engine_is_stopped()) engine_stop();
+				import_romversion(fn);
+				display_romversion_dbox(FALSE);
+				engine_start();
+			}
+		}
+		else if((length == 1) && !strcmp(tifiles_fext_get(fn), "sav"))
+		{
+			// Load save state
+			engine_stop();
+			fs_load_state(fn);
+			engine_start();
+		}
+		else if(tifiles_file_is_ti(fn) && 
+				(tifiles_calc_is_ti9x(tifiles_file_get_model(fn)) ||
+					tifiles_file_is_tigroup(fn))) 
+		{
+			// Send one or more file (fs_misc.c)
+			if(engine_is_stopped()) goto ocwwdr_end;
+
+			engine_stop();
+			fs_send_files(filenames);
+			engine_start();
+		}
+
+      gtk_drag_finish (context, TRUE, FALSE, time);
+	  g_strfreev(filenames);
+      return;
+    }
+  
+ocwwdr_end:
+	g_strfreev(filenames);
+	gtk_drag_finish (context, FALSE, FALSE, time);
+}
diff --git a/src/gui/calc/keyboard.c b/src/gui/calc/keyboard.c
new file mode 100644
index 0000000..dbc34f8
--- /dev/null
+++ b/src/gui/calc/keyboard.c
@@ -0,0 +1,290 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: keyboard.c 2681 2007-11-20 18:01:02Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2005, Christian Walther (patches for Mac OS-X port)
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "skinops.h"
+#include "keydefs.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "popup.h"
+#include "screenshot.h"
+#include "fs_misc.h"
+#include "calc.h"
+#include "keymap.h"
+#include "dbg_all.h"
+#include "keypress.h"
+#include "dboxes.h"
+
+Pc2TiKey*       kbd_keymap = keymap;
+const char*     skn_keymap;
+
+extern SKIN_INFOS skin_infos;
+
+static int hwkey_to_tikey(guint16 hardware_keycode, int action)
+{
+    int i;		
+
+    for(i = 0; i < KEYMAP_MAX; i++)
+    {
+        int ti_key, modifier;
+
+        if(kbd_keymap[i].pc_key == hardware_keycode)
+        {
+            ti_key = kbd_keymap[i].ti_key;
+            modifier = kbd_keymap[i].modifier;
+
+			if(options.kbd_dbg)
+			{
+				gchar *str;
+
+				str = g_strdup_printf("%s:%s,%s\n",
+						keymap_value_to_string(pckeys, hardware_keycode),
+						keymap_value_to_string(tikeys, ti_key),
+						keymap_value_to_string(tikeys, modifier));
+				msg_box1(_("Information"), str);
+				g_free(str);
+			}
+
+			if(modifier != -1)
+			{
+                ti68k_kbd_set_key(modifier, action);
+				kp_recording_key(modifier, action);
+			}
+
+            ti68k_kbd_set_key(ti_key, action);
+			kp_recording_key(ti_key, action);
+
+            return !0;
+        }
+    }
+
+    return 0;
+}
+
+/* 
+   Converts the mouse position into a TIKEY_xx code
+   Checks if the mouse cursor is within a rectangle defined in 
+   the key_pos array
+*/
+static int pos_to_key(int x, int y) 
+{
+  	int i;
+  	RECT *kp = skin_infos.keys_pos;
+    int nkeys = sizeof(skin_infos.keys_pos) / sizeof(RECT);
+	extern float sf;
+  
+  	for(i = 0; i < nkeys; i++)
+    {
+      	if((x >= sf*kp[i].left) && (x < sf*kp[i].right) && 
+	 	   (y >= sf*kp[i].top) && (y < sf*kp[i].bottom)) 
+		{
+			if(options.kbd_dbg)
+				printf("tikey = %02x (%s)\n", skn_keymap[i], keymap_value_to_string(tikeys, skn_keymap[i]));		
+
+			return skn_keymap[i];
+		}
+    }
+  
+  	return -1;
+}
+
+#ifdef __IPAQ__
+/*
+	Check if the mouse cursor is within the LCD rectangle.
+*/
+static int pos_to_mnu(int x, int y)
+{
+	extern LCD_RECT		lr;
+
+	if((x >= lr.x) && (x <= lr.x + lr.w) && 
+		(y >= lr.y) && (y <= lr.y + lr.h))
+		return !0;
+
+	return 0;
+}
+#endif /* __IPAQ__ */
+
+// raise the main popup menu
+static void
+do_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
+{
+	GtkWidget *menu;
+	int event_button, event_time;
+
+	menu = display_popup_menu();
+
+	if (event)
+    {
+      event_button = event->button;
+      event_time = event->time;
+    }
+	else
+    {
+      event_button = 0;
+      event_time = gtk_get_current_event_time ();
+    }
+
+	gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 
+                  event_button, event_time);
+	gtk_widget_show(menu);
+}
+
+GLADE_CB gboolean
+on_calc_wnd_button_press_event     (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    if(event->type != GDK_BUTTON_PRESS)
+        return FALSE;
+
+	if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
+    {
+		do_popup_menu(widget, event);
+		return TRUE;
+	}
+
+    if(event->button == 1)
+    {
+        int key = pos_to_key((int)event->x, (int)event->y);
+        if(key >= 0)
+		{
+			ti68k_kbd_set_key(key, 1);
+			kp_recording_key(key, 1);
+			return TRUE;
+		}
+    }
+
+#ifdef __IPAQ__
+	if(event->button == 1)
+	{
+		printf(".");
+		if(pos_to_mnu((int)event->x, (int)event->y))
+		{
+			do_popup_menu(widget, event);
+			return TRUE;
+		}
+	}
+#endif
+
+	return FALSE;
+}
+
+GLADE_CB gboolean
+on_calc_wnd_button_release_event     (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    if(event->type != GDK_BUTTON_RELEASE)
+        return FALSE;
+
+    if(event->button == 1)
+    {
+        int key = pos_to_key((int)event->x, (int)event->y);
+        if(key < 0)
+            return FALSE;
+	    
+      	ti68k_kbd_set_key(key, 0);
+		kp_recording_key(key, 0);
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+GLADE_CB gboolean
+on_calc_wnd_key_press_event        (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data)
+{
+#if 0
+	printf("<hwkey=%04x (%c), key=%04x (%c), state=%04x>\n", 
+		event->hardware_keycode, event->hardware_keycode, 
+		event->keyval, event->keyval, event->state );
+#endif
+#if 0
+	printf("KeyEvent:\n");
+	printf(" type:		%i\n", event->type);
+	printf(" window:	%p\n", event->window);
+	printf(" send_event: %i\n", event->send_event);
+	printf(" time:		%ul\n", event->time);
+	printf(" state:		%u\n", event->state);
+	printf(" keyval:	%08x\n", event->keyval);
+	printf(" length:	%i\n", event->length);
+	printf(" string:	%s\n", event->string);
+	printf(" hw key:	%04x\n", event->hardware_keycode);
+	printf(" group:		%u\n", event->group);
+#endif
+
+	if(event->keyval == GDK_Pause || (event->keyval == 0xffffff) && (event->hardware_keycode == 0x13))
+	{
+        on_now1_activate(NULL, NULL);
+        return TRUE;
+	}
+        else if(event->keyval == GDK_Menu)
+	{
+		do_popup_menu(widget, NULL);
+		return TRUE;
+	}
+	else  if(event->keyval == GDK_F10)
+    {
+        on_send_file_to_tiemu1_activate(NULL, NULL);
+        return TRUE;
+    }
+    else if(event->keyval == GDK_F11)
+    {
+        on_enter_debugger1_activate(NULL, NULL);
+        return TRUE;
+    }
+    else if(event->keyval == GDK_F12)
+    {
+        on_set_rom1_activate(NULL, NULL);
+        return TRUE;
+    }
+    else
+        return hwkey_to_tikey(event->hardware_keycode, !0) ? TRUE : FALSE;
+
+    return FALSE;
+}
+
+
+GLADE_CB gboolean
+on_calc_wnd_key_release_event      (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data)
+{
+    return hwkey_to_tikey(event->hardware_keycode, 0) ? TRUE : FALSE;
+}
+
diff --git a/src/gui/calc/keymap.c b/src/gui/calc/keymap.c
new file mode 100644
index 0000000..d8a62a9
--- /dev/null
+++ b/src/gui/calc/keymap.c
@@ -0,0 +1,211 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: keymap.c 2610 2007-07-19 21:35:03Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+
+#include "keydefs.h"
+#include "pckeys.h"
+#include "ti68k_int.h"
+#include "keymap.h"
+#include "logging.h"
+
+#ifdef _MSC_VER
+Pc2TiKey keymap[KEYMAP_MAX] = {0};
+#else
+Pc2TiKey keymap[KEYMAP_MAX] = {};
+#endif
+
+// search for key name and return key value (or -1 if not found)
+int keymap_string_to_value(const KeyTuple *array, const char *key_name)
+{
+    KeyTuple *p;
+
+    for(p = (KeyTuple *)array; p->value != -1; p++)
+        if(!strcmp(p->name, key_name))
+            return p->value;
+
+    return -1;
+}
+
+// search for key value and return key name
+const char* keymap_value_to_string(const KeyTuple *array, int key_value)
+{
+    KeyTuple *p;
+
+    for(p = (KeyTuple *)array; p->value != -1; p++)
+        if(key_value == p->value)
+            return p->name;
+
+    return "";
+}
+
+// return calc type or -1
+int keymap_read_header(const char *filename)
+{
+    FILE *f;
+    char line[256] = { 0 };
+
+    // open file
+    f = fopen(filename, "rt");
+    if(f == NULL)
+    {
+        fprintf(stderr, "unable to open keymap file <%s>.\n", filename);
+        return -1;
+    }
+
+    // read first line
+    if (!fgets(line, sizeof(line), f))
+    {
+        fprintf(stderr, "No calc model found !\n");
+        fclose(f);
+        return -1;
+    }
+    line[strlen(line) - 1] = '\0';
+    if(strncmp(line, "Model", strlen("Model")))
+    {
+        fprintf(stderr, "No calc model found !\n");
+        fclose(f);
+        return -1;
+    }
+
+    // close file
+    fclose(f);
+
+    // and convert
+    return ti68k_string_to_calctype(line + 7);
+}
+
+int keymap_load(const char *filename)
+{
+    FILE *f;
+    char line[256];
+    int pckey, tikey, mod;
+    int idx = 0;
+
+    // open file
+    f = fopen(filename, "rt");
+    if(f == NULL)
+    {
+        fprintf(stderr, "unable to open keymap file <%s>.\n", filename);
+        return -1;
+    }
+
+    if (!fgets(line, sizeof(line), f))
+    {
+        fprintf(stderr, "No calc model found !\n");
+        fclose(f);
+        return -1;
+    }
+    line[strlen(line) - 1] = '\0';
+    if(strncmp(line, "Model", strlen("Model")))
+    {
+        fprintf(stderr, "No calc model found !\n");
+        fclose(f);
+        return -1;
+    }
+
+    // parse file
+    while(!feof(f))
+    {
+        gchar **split = { 0 };
+        gchar **split2 = { 0 };
+	char *p;
+
+        // remove cr/lf
+        if (!fgets(line, sizeof(line), f))
+            break;
+        //line[strlen(line) - 2] = '\0';
+	p = strrchr(line, '\r');
+	if(p != NULL) *p = '\0';
+	p = strrchr(line, '\n');
+	if(p != NULL) *p = '\0';
+
+        // skip comments
+        if((line[0] == '#') || (line[0] == '/'))
+            continue;
+
+        // split string
+        split = g_strsplit(line, ":", 2);
+        if((split[0] == NULL) || (split[1] == NULL))
+        {
+            g_strfreev(split);
+            continue;
+        }
+
+        // split sub-string
+        split2 = g_strsplit(split[1], ",", 2);
+        if(split2[0] == NULL)
+        {
+            g_strfreev(split2);
+            continue;
+        }
+
+        // convert key names into values
+        pckey = keymap_string_to_value(pckeys, split[0]);
+        if(pckey == -1)
+        {
+            fprintf(stderr, "Warning: non-existent PC key: <%s>\n", split[0]);
+            g_strfreev(split);
+            continue;
+        }
+
+        tikey = keymap_string_to_value(tikeys, split2[0]);
+        if(tikey == -1)
+        {
+            fprintf(stderr, "Warning: non-existent TI key: <%s>\n", split[1]);
+            g_strfreev(split);
+            continue;
+        }
+
+        if(split2[1] == NULL)
+            mod = -1;
+        else
+            mod = keymap_string_to_value(tikeys, split2[1]);            
+
+        // and store value
+        keymap[idx].pc_key = pckey;
+        keymap[idx].ti_key = tikey;
+        keymap[idx].modifier = mod;
+        idx++;
+
+        // free mem
+        g_strfreev(split);
+        g_strfreev(split2);
+    }
+
+    // close file
+    tiemu_info(_("loading keymap: %s (%i keys)"), g_basename(filename), idx);
+    fclose(f);
+
+    return 0;
+}
diff --git a/src/gui/calc/keymap.h b/src/gui/calc/keymap.h
new file mode 100644
index 0000000..846802e
--- /dev/null
+++ b/src/gui/calc/keymap.h
@@ -0,0 +1,57 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hid.h 557 2004-07-14 08:17:39Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __KBDMAPPER_H__
+#define __KBDMAPPER_H__
+
+#define KEYMAP_MAX  128
+
+// types
+
+typedef struct {
+    int         value;
+    const char  *name;
+} KeyTuple;
+
+typedef struct {
+    int pc_key;     // PC key
+    int ti_key;     // TI key
+    int modifier;   // TI key such as TIKEY_ALPHA
+} Pc2TiKey;
+
+extern Pc2TiKey keymap[KEYMAP_MAX];
+
+extern const KeyTuple tikeys[];
+extern const KeyTuple pckeys[];
+
+// functions
+
+int keymap_string_to_value(const KeyTuple *array, const char *key_name);
+const char* keymap_value_to_string(const KeyTuple *array, int key_value);
+
+int keymap_read_header(const char *filename);
+int keymap_load(const char *filename);
+
+#endif
diff --git a/src/gui/calc/keynames.c b/src/gui/calc/keynames.c
new file mode 100755
index 0000000..eafea0f
--- /dev/null
+++ b/src/gui/calc/keynames.c
@@ -0,0 +1,285 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: keynames.c 2793 2008-05-29 19:41:37Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "keydefs.h"
+#include "pckeys.h"
+
+typedef struct {
+    int         value;
+    const char  *name;
+} KeyTuple;
+
+const KeyTuple tikeys[] = {
+    { TIKEY_DOWN,       "TIKEY_DOWN" },
+    { TIKEY_RIGHT,      "TIKEY_RIGHT" },
+    { TIKEY_UP,         "TIKEY_UP" },
+    { TIKEY_LEFT,       "TIKEY_LEFT" },  
+    { TIKEY_HAND,       "TIKEY_HAND" },
+    { TIKEY_SHIFT,      "TIKEY_SHIFT" },
+    { TIKEY_DIAMOND,    "TIKEY_DIAMOND" },
+    { TIKEY_2ND,        "TIKEY_2ND" },
+    { TIKEY_3,          "TIKEY_3" },
+    { TIKEY_2,          "TIKEY_2" },
+    { TIKEY_1,          "TIKEY_1" },
+    { TIKEY_F8,         "TIKEY_F8" },
+    { TIKEY_W,          "TIKEY_W" },
+    { TIKEY_S,          "TIKEY_S" },
+    { TIKEY_Z,          "TIKEY_Z" },
+    { TIKEY_6,          "TIKEY_6" },
+    { TIKEY_5,          "TIKEY_5" },
+    { TIKEY_4,          "TIKEY_4" },
+    { TIKEY_F3,         "TIKEY_F3" },
+    { TIKEY_E,          "TIKEY_E" },
+    { TIKEY_D,          "TIKEY_D" },
+    { TIKEY_X,          "TIKEY_X" },
+    { TIKEY_9,          "TIKEY_9" },
+    { TIKEY_8,          "TIKEY_8" },
+    { TIKEY_7,          "TIKEY_7" },
+    { TIKEY_F7,         "TIKEY_F7" },
+    { TIKEY_R,          "TIKEY_R" },
+    { TIKEY_F,          "TIKEY_F" },
+    { TIKEY_C,          "TIKEY_C" },
+    { TIKEY_STORE,      "TIKEY_STORE" },
+    { TIKEY_COMMA,      "TIKEY_COMMA" },
+    { TIKEY_PARIGHT,    "TIKEY_PARIGHT" },
+    { TIKEY_PALEFT,     "TIKEY_PALEFT" },
+    { TIKEY_F2,         "TIKEY_F2" },
+    { TIKEY_T,          "TIKEY_T" },
+    { TIKEY_G,          "TIKEY_G"  },
+    { TIKEY_V,          "TIKEY_V" },
+    { TIKEY_SPACE,      "TIKEY_SPACE"},
+    { TIKEY_TAN,        "TIKEY_TAN"},
+    { TIKEY_COS,        "TIKEY_COS" },
+    { TIKEY_SIN,        "TIKEY_SIN" },
+    { TIKEY_F6,         "TIKEY_F6" },
+    { TIKEY_Y,          "TIKEY_Y" },
+    { TIKEY_H,          "TIKEY_H" },
+    { TIKEY_B,          "TIKEY_B" },
+    { TIKEY_DIVIDE,     "TIKEY_DIVIDE"},
+    { TIKEY_P,          "TIKEY_P"}, 
+    { TIKEY_ENTER2,     "TIKEY_ENTER2"}, 
+    { TIKEY_LN,         "TIKEY_LN" },
+    { TIKEY_F1,         "TIKEY_F1" },
+    { TIKEY_U,          "TIKEY_U" },
+    { TIKEY_J,          "TIKEY_J" },
+    { TIKEY_N,          "TIKEY_N" },
+    { TIKEY_POWER,      "TIKEY_POWER"},
+    { TIKEY_MULTIPLY,   "TIKEY_MULTIPLY" },
+    { TIKEY_APPS,       "TIKEY_APPS" },
+    { TIKEY_CLEAR,      "TIKEY_CLEAR" },
+    { TIKEY_F5,         "TIKEY_F5"  },
+    { TIKEY_I,          "TIKEY_I" },
+    { TIKEY_K,          "TIKEY_K" },
+    { TIKEY_M,          "TIKEY_M" },
+    { TIKEY_EQUALS,     "TIKEY_EQUALS"},
+    { TIKEY_NU,         "TIKEY_NU"}, 
+    { TIKEY_ESCAPE,     "TIKEY_ESCAPE"}, 
+    { TIKEY_MODE,       "TIKEY_MODE"}, 
+    { TIKEY_PLUS,       "TIKEY_PLUS"}, 
+    { TIKEY_O,          "TIKEY_O" },
+    { TIKEY_L,          "TIKEY_L" },
+    { TIKEY_THETA,      "TIKEY_THETA" },
+    { TIKEY_BACKSPACE,  "TIKEY_BACKSPACE" },
+    { TIKEY_NEGATE,     "TIKEY_NEGATE"}, 
+    { TIKEY_PERIOD,     "TIKEY_PERIOD" },
+    { TIKEY_0,          "TIKEY_0" },
+    { TIKEY_F4,         "TIKEY_F4" },
+    { TIKEY_Q,          "TIKEY_Q" },
+    { TIKEY_A,          "TIKEY_A" },
+    { TIKEY_ENTER1,     "TIKEY_ENTER1"}, 
+    { TIKEY_MINUS,      "TIKEY_MINUS"},
+    { TIKEY_ON,         "TIKEY_ON"},
+    { TIKEY_ALPHA,      "TIKEY_ALPHA" },
+    { TIKEY_EE,         "TIKEY_EE"  },
+    { TIKEY_CATALOG,    "TIKEY_CATALOG" },
+    { TIKEY_HOME,       "TIKEY_HOME" },
+    { TIKEY_PIPE,       "TIKEY_PIPE" },
+    { TIKEY_VOID,       "TIKEY_VOID"},
+    { -1, "" },
+};
+
+const KeyTuple pckeys[] = {
+	{ PCKEY_LBUTTON, "PCKEY_LBUTTON" },
+	{ PCKEY_RBUTTON, "PCKEY_RBUTTON" },
+	{ PCKEY_CANCEL, "PCKEY_CANCEL" },
+	{ PCKEY_MBUTTON, "PCKEY_MBUTTON" },
+	{ PCKEY_BACK, "PCKEY_BACK" },
+	{ PCKEY_TAB, "PCKEY_TAB" },
+	{ PCKEY_CLEAR, "PCKEY_CLEAR" },
+	{ PCKEY_RETURN, "PCKEY_RETURN" },
+	{ PCKEY_SHIFT_L, "PCKEY_SHIFT_L" },
+	{ PCKEY_CONTROL_L, "PCKEY_CONTROL_L" },
+#ifndef __MACOSX__
+/* FIXME: We need the key codes for these on OS X. */
+	{ PCKEY_SHIFT_R, "PCKEY_SHIFT_R" },
+	{ PCKEY_CONTROL_R, "PCKEY_CONTROL_R" },
+#endif
+	{ PCKEY_MENU, "PCKEY_MENU" },
+	{ PCKEY_PAUSE, "PCKEY_PAUSE" },
+	{ PCKEY_CAPITAL, "PCKEY_CAPITAL" },
+	{ PCKEY_ESCAPE, "PCKEY_ESCAPE" },
+	{ PCKEY_SPACE, "PCKEY_SPACE" },
+	{ PCKEY_PRIOR, "PCKEY_PRIOR" },
+	{ PCKEY_NEXT, "PCKEY_NEXT" },
+	{ PCKEY_END, "PCKEY_END" },
+	{ PCKEY_HOME, "PCKEY_HOME" },
+	{ PCKEY_LEFT, "PCKEY_LEFT" },
+	{ PCKEY_UP, "PCKEY_UP" },
+	{ PCKEY_RIGHT, "PCKEY_RIGHT" },
+	{ PCKEY_DOWN, "PCKEY_DOWN" },
+	{ PCKEY_SELECT, "PCKEY_SELECT" },
+	{ PCKEY_PRINT, "PCKEY_PRINT" },
+	{ PCKEY_EXECUTE, "PCKEY_EXECUTE" },
+	{ PCKEY_SNAPSHOT, "PCKEY_SNAPSHOT" },
+	{ PCKEY_INSERT, "PCKEY_INSERT" },
+	{ PCKEY_DELETE, "PCKEY_DELETE" },
+	{ PCKEY_HELP, "PCKEY_HELP" },
+	{ PCKEY_0, "PCKEY_0" },
+	{ PCKEY_1, "PCKEY_1" },
+	{ PCKEY_2, "PCKEY_2" },
+	{ PCKEY_3, "PCKEY_3" },
+	{ PCKEY_4, "PCKEY_4" },
+	{ PCKEY_5, "PCKEY_5" },
+	{ PCKEY_6, "PCKEY_6" },
+	{ PCKEY_7, "PCKEY_7" },
+	{ PCKEY_8, "PCKEY_8" },
+	{ PCKEY_9, "PCKEY_9" },
+	{ PCKEY_A, "PCKEY_A" },
+	{ PCKEY_B, "PCKEY_B" },
+	{ PCKEY_C, "PCKEY_C" },
+	{ PCKEY_D, "PCKEY_D" },
+	{ PCKEY_E, "PCKEY_E" },
+	{ PCKEY_F, "PCKEY_F" },
+	{ PCKEY_G, "PCKEY_G" },
+	{ PCKEY_H, "PCKEY_H" },
+	{ PCKEY_I, "PCKEY_I" },
+	{ PCKEY_J, "PCKEY_J" },
+	{ PCKEY_K, "PCKEY_K" },
+	{ PCKEY_L, "PCKEY_L" },
+	{ PCKEY_M, "PCKEY_M" },
+	{ PCKEY_N, "PCKEY_N" },
+	{ PCKEY_O, "PCKEY_O" },
+	{ PCKEY_P, "PCKEY_P" },
+	{ PCKEY_Q, "PCKEY_Q" },
+	{ PCKEY_R, "PCKEY_R" },
+	{ PCKEY_S, "PCKEY_S" },
+	{ PCKEY_T, "PCKEY_T" },
+	{ PCKEY_U, "PCKEY_U" },
+	{ PCKEY_V, "PCKEY_V" },
+	{ PCKEY_W, "PCKEY_W" },
+	{ PCKEY_X, "PCKEY_X" },
+	{ PCKEY_Y, "PCKEY_Y" },
+	{ PCKEY_Z, "PCKEY_Z" },
+	{ PCKEY_STARTKEY, "PCKEY_STARTKEY" },
+	{ PCKEY_CONTEXTKEY, "PCKEY_CONTEXTKEY" },
+	{ PCKEY_NUMPAD0, "PCKEY_NUMPAD0" },
+	{ PCKEY_NUMPAD1, "PCKEY_NUMPAD1" },
+	{ PCKEY_NUMPAD2, "PCKEY_NUMPAD2" },
+	{ PCKEY_NUMPAD3, "PCKEY_NUMPAD3" },
+	{ PCKEY_NUMPAD4, "PCKEY_NUMPAD4" },
+	{ PCKEY_NUMPAD5, "PCKEY_NUMPAD5" },
+	{ PCKEY_NUMPAD6, "PCKEY_NUMPAD6" },
+	{ PCKEY_NUMPAD7, "PCKEY_NUMPAD7" },
+	{ PCKEY_NUMPAD8, "PCKEY_NUMPAD8" },
+	{ PCKEY_NUMPAD9, "PCKEY_NUMPAD9" },
+	{ PCKEY_MULTIPLY, "PCKEY_MULTIPLY" },
+	{ PCKEY_ADD, "PCKEY_ADD" },
+	{ PCKEY_SEPARATOR, "PCKEY_SEPARATOR" },
+	{ PCKEY_SUBTRACT, "PCKEY_SUBTRACT" },
+	{ PCKEY_DECIMAL, "PCKEY_DECIMAL" },
+	{ PCKEY_DIVIDE, "PCKEY_DIVIDE" },
+	{ PCKEY_F1, "PCKEY_F1" },
+	{ PCKEY_F2, "PCKEY_F2" },
+	{ PCKEY_F3, "PCKEY_F3" },
+	{ PCKEY_F4, "PCKEY_F4" },
+	{ PCKEY_F5, "PCKEY_F5" },
+	{ PCKEY_F6, "PCKEY_F6" },
+	{ PCKEY_F7, "PCKEY_F7" },
+	{ PCKEY_F8, "PCKEY_F8" },
+	{ PCKEY_F9, "PCKEY_F9" },
+	{ PCKEY_F10, "PCKEY_F10" },
+	{ PCKEY_F11, "PCKEY_F11" },
+	{ PCKEY_F12, "PCKEY_F12" },
+	{ PCKEY_F13, "PCKEY_F13" },
+	{ PCKEY_F14, "PCKEY_F14" },
+	{ PCKEY_F15, "PCKEY_F15" },
+	{ PCKEY_F16, "PCKEY_F16" },
+	{ PCKEY_F17, "PCKEY_F17" },
+	{ PCKEY_F18, "PCKEY_F18" },
+	{ PCKEY_F19, "PCKEY_F19" },
+	{ PCKEY_F20, "PCKEY_F20" },
+	{ PCKEY_F21, "PCKEY_F21" },
+	{ PCKEY_F22, "PCKEY_F22" },
+	{ PCKEY_F23, "PCKEY_F23" },
+	{ PCKEY_F24, "PCKEY_F24" },
+	{ PCKEY_NUMLOCK, "PCKEY_NUMLOCK" },
+	{ PCKEY_OEM_SCROLL, "PCKEY_OEM_SCROLL" },
+	{ PCKEY_OEM_1, "PCKEY_OEM_1" },
+	{ PCKEY_OEM_PLUS, "PCKEY_OEM_PLUS" },
+	{ PCKEY_OEM_COMMA, "PCKEY_OEM_COMMA" },
+	{ PCKEY_OEM_MINUS, "PCKEY_OEM_MINUS" },
+	{ PCKEY_OEM_PERIOD, "PCKEY_OEM_PERIOD" },
+	{ PCKEY_OEM_2, "PCKEY_OEM_2" },
+	{ PCKEY_OEM_3, "PCKEY_OEM_3" },
+	{ PCKEY_OEM_4, "PCKEY_OEM_4" },
+	{ PCKEY_OEM_5, "PCKEY_OEM_5" },
+	{ PCKEY_OEM_6, "PCKEY_OEM_6" },
+	{ PCKEY_OEM_7, "PCKEY_OEM_7" },
+	{ PCKEY_OEM_8, "PCKEY_OEM_8" },
+	{ PCKEY_ICO_F17, "PCKEY_ICO_F17" },
+	{ PCKEY_ICO_F18, "PCKEY_ICO_F18" },
+	{ PCKEY_OEM102, "PCKEY_OEM102" },
+	{ PCKEY_ICO_HELP, "PCKEY_ICO_HELP" },
+	{ PCKEY_ICO_00, "PCKEY_ICO_00" },
+	{ PCKEY_ICO_CLEAR, "PCKEY_ICO_CLEAR" },
+	{ PCKEY_OEM_RESET, "PCKEY_OEM_RESET" },
+	{ PCKEY_OEM_JUMP, "PCKEY_OEM_JUMP" },
+	{ PCKEY_OEM_PA1, "PCKEY_OEM_PA1" },
+	{ PCKEY_OEM_PA2, "PCKEY_OEM_PA2" },
+	{ PCKEY_OEM_PA3, "PCKEY_OEM_PA3" },
+	{ PCKEY_OEM_WSCTRL, "PCKEY_OEM_WSCTRL" },
+	{ PCKEY_OEM_CUSEL, "PCKEY_OEM_CUSEL" },
+	{ PCKEY_OEM_ATTN, "PCKEY_OEM_ATTN" },
+	{ PCKEY_OEM_FINNISH, "PCKEY_OEM_FINNISH" },
+	{ PCKEY_OEM_COPY, "PCKEY_OEM_COPY" },
+	{ PCKEY_OEM_AUTO, "PCKEY_OEM_AUTO" },
+	{ PCKEY_OEM_ENLW, "PCKEY_OEM_ENLW" },
+	{ PCKEY_OEM_BACKTAB, "PCKEY_OEM_BACKTAB" },
+	{ PCKEY_ATTN, "PCKEY_ATTN" },
+	{ PCKEY_CRSEL, "PCKEY_CRSEL" },
+	{ PCKEY_EXSEL, "PCKEY_EXSEL" },
+	{ PCKEY_EREOF, "PCKEY_EREOF" },
+	{ PCKEY_PLAY, "PCKEY_PLAY" },
+	{ PCKEY_ZOOM, "PCKEY_ZOOM" },
+	{ PCKEY_NONAME, "PCKEY_NONAME" },
+	{ PCKEY_PA1, "PCKEY_PA1" },
+	{ PCKEY_OEM_CLEAR, "PCKEY_OEM_CLEAR" },
+    { -1, "" },
+};
diff --git a/src/gui/calc/keypress.c b/src/gui/calc/keypress.c
new file mode 100644
index 0000000..791dac0
--- /dev/null
+++ b/src/gui/calc/keypress.c
@@ -0,0 +1,124 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: keyboard.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "intl.h"
+#include "struct.h"
+#include "tie_error.h"
+#include "keymap.h"
+
+static FILE *f_rec = NULL;
+static FILE *f_ply = NULL;
+
+static GTimer* timer = NULL;
+
+int kp_recording_stop(void)
+{
+	fclose(f_rec);
+	f_rec = NULL;
+
+	g_timer_destroy(timer);
+	timer = NULL;
+
+	return 0;
+}
+
+int kp_recording_start(const char *filename)
+{
+	if(f_rec)
+		kp_recording_stop();
+
+	f_rec = fopen(filename, "wt");
+	if(f_rec == NULL)
+	{
+		tiemu_err(0, _("Can't open file."));
+		return -1;
+	}
+
+	timer = g_timer_new();
+	g_timer_start(timer);
+
+	return 0;
+}
+
+int kp_playing_stop(void)
+{
+	fclose(f_ply);
+	f_ply = NULL;
+
+	return 0;
+}
+
+int kp_playing_start(const char *filename)
+{
+	if(f_ply)
+		kp_playing_stop();
+
+	f_ply = fopen(filename, "rt");
+	if(f_ply == NULL)
+	{
+		tiemu_err(0, _("Can't open file."));
+		return -1;
+	}
+
+	return 0;
+}
+
+int kp_recording_key(int key, int action)
+{
+	if(options.kp_rec_enabled && f_rec)
+	{
+		fprintf(f_rec, "%f:%s=%i\n", 
+			g_timer_elapsed(timer, NULL), 
+			keymap_value_to_string(tikeys, key), 
+			action);
+	}
+
+	return 0;
+}
+
+int kp_playing_key(int *key, int *action)
+{
+	double time;
+	char line[256];
+	char **split;
+
+	if(f_ply == NULL) return -1;
+	if(feof(f_ply)) return -1;
+
+	fgets(line, sizeof(line), f_ply);
+	split = g_strsplit_set(line, ":=", 3);
+
+	if(!split[0] || !split[1] || !split[2])
+		return -1;
+
+	sscanf(split[0], "%f", &time);
+	*key = keymap_string_to_value(tikeys, split[1]);
+	*action = (split[2][0] == '1') ? 1 : 0;	
+
+	return 0;
+}
diff --git a/src/gui/calc/keypress.h b/src/gui/calc/keypress.h
new file mode 100644
index 0000000..494cdfb
--- /dev/null
+++ b/src/gui/calc/keypress.h
@@ -0,0 +1,33 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: calc.h 1977 2006-02-18 13:13:31Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __KEYPRESS_H__
+#define __KEYPRESS_H__
+
+int  kp_recording_start(const char *filename);
+int  kp_recording_stop(void);
+int kp_recording_key(int key, int action);
+
+int  kp_playing_start(const char *filename);
+int  kp_playing_stop(void);
+int kp_playing_key(int *key, int *action);
+
+#endif
diff --git a/src/gui/calc/pckeys.h b/src/gui/calc/pckeys.h
new file mode 100644
index 0000000..a8a7e3e
--- /dev/null
+++ b/src/gui/calc/pckeys.h
@@ -0,0 +1,496 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: hid.h 557 2004-07-14 08:17:39Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __PCKEYS_H__
+#define __PCKEYS_H__
+
+#if defined(__WIN32__)
+// List taken from <http://math.msu.su/~vfnik/WinApi/other/virtualkeycodes.html>
+
+#define PCKEY_LBUTTON 0x1
+#define PCKEY_RBUTTON 0x2
+#define PCKEY_CANCEL 0x3
+#define PCKEY_MBUTTON 0x4
+#define PCKEY_BACK 0x8
+#define PCKEY_TAB 0x9
+#define PCKEY_CLEAR 0xC
+#define PCKEY_RETURN 0xD
+#define PCKEY_SHIFT_L 0x10
+#define PCKEY_CONTROL_L 0x11
+#define PCKEY_MENU 0x12
+#define PCKEY_PAUSE 0x13
+#define PCKEY_CAPITAL 0x14
+#define PCKEY_ESCAPE 0x1B
+#define PCKEY_SPACE 0x20
+#define PCKEY_PRIOR 0x21
+#define PCKEY_NEXT 0x22
+#define PCKEY_END 0x23
+#define PCKEY_HOME 0x24
+#define PCKEY_LEFT 0x25
+#define PCKEY_UP 0x26
+#define PCKEY_RIGHT 0x27
+#define PCKEY_DOWN 0x28
+#define PCKEY_SELECT 0x29
+#define PCKEY_PRINT 0x2A
+#define PCKEY_EXECUTE 0x2B
+#define PCKEY_SNAPSHOT 0x2C
+#define PCKEY_INSERT 0x2D
+#define PCKEY_DELETE 0x2E
+#define PCKEY_HELP 0x2F
+#define PCKEY_0 0x30
+#define PCKEY_1 0x31
+#define PCKEY_2 0x32
+#define PCKEY_3 0x33
+#define PCKEY_4 0x34
+#define PCKEY_5 0x35
+#define PCKEY_6 0x36
+#define PCKEY_7 0x37
+#define PCKEY_8 0x38
+#define PCKEY_9 0x39
+#define PCKEY_A 0x41
+#define PCKEY_B 0x42
+#define PCKEY_C 0x43
+#define PCKEY_D 0x44
+#define PCKEY_E 0x45
+#define PCKEY_F 0x46
+#define PCKEY_G 0x47
+#define PCKEY_H 0x48
+#define PCKEY_I 0x49
+#define PCKEY_J 0x4A
+#define PCKEY_K 0x4B
+#define PCKEY_L 0x4C
+#define PCKEY_M 0x4D
+#define PCKEY_N 0x4E
+#define PCKEY_O 0x4F
+#define PCKEY_P 0x50
+#define PCKEY_Q 0x51
+#define PCKEY_R 0x52
+#define PCKEY_S 0x53
+#define PCKEY_T 0x54
+#define PCKEY_U 0x55
+#define PCKEY_V 0x56
+#define PCKEY_W 0x57
+#define PCKEY_X 0x58
+#define PCKEY_Y 0x59
+#define PCKEY_Z 0x5A
+#define PCKEY_STARTKEY 0x5B
+#define PCKEY_CONTEXTKEY 0x5D
+#define PCKEY_NUMPAD0 0x60
+#define PCKEY_NUMPAD1 0x61
+#define PCKEY_NUMPAD2 0x62
+#define PCKEY_NUMPAD3 0x63
+#define PCKEY_NUMPAD4 0x64
+#define PCKEY_NUMPAD5 0x65
+#define PCKEY_NUMPAD6 0x66
+#define PCKEY_NUMPAD7 0x67
+#define PCKEY_NUMPAD8 0x68
+#define PCKEY_NUMPAD9 0x69
+#define PCKEY_MULTIPLY 0x6A
+#define PCKEY_ADD 0x6B
+#define PCKEY_SEPARATOR 0x6C
+#define PCKEY_SUBTRACT 0x6D
+#define PCKEY_DECIMAL 0x6E
+#define PCKEY_DIVIDE 0x6F
+#define PCKEY_F1 0x70
+#define PCKEY_F2 0x71
+#define PCKEY_F3 0x72
+#define PCKEY_F4 0x73
+#define PCKEY_F5 0x74
+#define PCKEY_F6 0x75
+#define PCKEY_F7 0x76
+#define PCKEY_F8 0x77
+#define PCKEY_F9 0x78
+#define PCKEY_F10 0x79
+#define PCKEY_F11 0x7A
+#define PCKEY_F12 0x7B
+#define PCKEY_F13 0x7C
+#define PCKEY_F14 0x7D
+#define PCKEY_F15 0x7E
+#define PCKEY_F16 0x7F
+#define PCKEY_F17 0x80
+#define PCKEY_F18 0x81
+#define PCKEY_F19 0x82
+#define PCKEY_F20 0x83
+#define PCKEY_F21 0x84
+#define PCKEY_F22 0x85
+#define PCKEY_F23 0x86
+#define PCKEY_F24 0x87
+#define PCKEY_NUMLOCK 0x90
+#define PCKEY_OEM_SCROLL 0x91
+#define PCKEY_SHIFT_R 0xa1
+#define PCKEY_CONTROL_R 0xa3
+#define PCKEY_OEM_1 0xBA
+#define PCKEY_OEM_PLUS 0xBB
+#define PCKEY_OEM_COMMA 0xBC
+#define PCKEY_OEM_MINUS 0xBD
+#define PCKEY_OEM_PERIOD 0xBE
+#define PCKEY_OEM_2 0xBF
+#define PCKEY_OEM_3 0xC0
+#define PCKEY_OEM_4 0xDB
+#define PCKEY_OEM_5 0xDC
+#define PCKEY_OEM_6 0xDD
+#define PCKEY_OEM_7 0xDE
+#define PCKEY_OEM_8 0xDF
+#define PCKEY_ICO_F17 0xE0
+#define PCKEY_ICO_F18 0xE1
+#define PCKEY_OEM102 0xE2
+#define PCKEY_ICO_HELP 0xE3
+#define PCKEY_ICO_00 0xE4
+#define PCKEY_ICO_CLEAR 0xE6
+#define PCKEY_OEM_RESET 0xE9
+#define PCKEY_OEM_JUMP 0xEA
+#define PCKEY_OEM_PA1 0xEB
+#define PCKEY_OEM_PA2 0xEC
+#define PCKEY_OEM_PA3 0xED
+#define PCKEY_OEM_WSCTRL 0xEE
+#define PCKEY_OEM_CUSEL 0xEF
+#define PCKEY_OEM_ATTN 0xF0
+#define PCKEY_OEM_FINNISH 0xF1
+#define PCKEY_OEM_COPY 0xF2
+#define PCKEY_OEM_AUTO 0xF3
+#define PCKEY_OEM_ENLW 0xF4
+#define PCKEY_OEM_BACKTAB 0xF5
+#define PCKEY_ATTN 0xF6
+#define PCKEY_CRSEL 0xF7
+#define PCKEY_EXSEL 0xF8
+#define PCKEY_EREOF 0xF9
+#define PCKEY_PLAY 0xFA
+#define PCKEY_ZOOM 0xFB
+#define PCKEY_NONAME 0xFC
+#define PCKEY_PA1 0xFD
+#define PCKEY_OEM_CLEAR 0xFE
+
+#elif defined(__LINUX__)
+// List manually written
+#define PCKEY_LBUTTON -2 //Don't use -1, because that's used as the end-of-list marker!
+#define PCKEY_RBUTTON -2
+#define PCKEY_MBUTTON -2
+#define PCKEY_CANCEL -2
+
+#define PCKEY_BACK 0x16
+#define PCKEY_TAB 0x17
+#define PCKEY_CLEAR 0xff
+#define PCKEY_RETURN 0x24
+#define PCKEY_SHIFT_L 0x32
+#define PCKEY_CONTROL_L 0x25
+#define PCKEY_SHIFT_R 0x3e
+#define PCKEY_CONTROL_R 0x6d
+#define PCKEY_MENU 0x40
+#define PCKEY_PAUSE 0x6E
+#define PCKEY_CAPITAL 0x42
+#define PCKEY_ESCAPE 0x09
+#define PCKEY_SPACE 0x41
+#define PCKEY_PRIOR 0x63
+#define PCKEY_NEXT 0x69
+#define PCKEY_END 0x67
+#define PCKEY_HOME 0x61
+#define PCKEY_LEFT 0x64
+#define PCKEY_UP 0x62
+#define PCKEY_RIGHT 0x66
+#define PCKEY_DOWN 0x68
+#define PCKEY_SELECT 0x29
+#define PCKEY_PRINT 0x6F
+#define PCKEY_EXECUTE 0xff
+#define PCKEY_SNAPSHOT 0x6F
+#define PCKEY_INSERT 0x6A
+#define PCKEY_DELETE 0x6B
+#define PCKEY_HELP 0xff
+#define PCKEY_0 0x13
+#define PCKEY_1 0x0A
+#define PCKEY_2 0x0B
+#define PCKEY_3 0x0C
+#define PCKEY_4 0x0D
+#define PCKEY_5 0x0E
+#define PCKEY_6 0x0F
+#define PCKEY_7 0x10
+#define PCKEY_8 0x11
+#define PCKEY_9 0x12
+#define PCKEY_A 0x26
+#define PCKEY_B 0x38
+#define PCKEY_C 0x36
+#define PCKEY_D 0x28
+#define PCKEY_E 0x1A
+#define PCKEY_F 0x29
+#define PCKEY_G 0x2A
+#define PCKEY_H 0x2B
+#define PCKEY_I 0x1F
+#define PCKEY_J 0x2C
+#define PCKEY_K 0x2D
+#define PCKEY_L 0x2E
+#define PCKEY_M 0x3A
+#define PCKEY_N 0x39
+#define PCKEY_O 0x20
+#define PCKEY_P 0x21
+#define PCKEY_Q 0x18
+#define PCKEY_R 0x1B
+#define PCKEY_S 0x27
+#define PCKEY_T 0x1C
+#define PCKEY_U 0x1E
+#define PCKEY_V 0x37
+#define PCKEY_W 0x19
+#define PCKEY_X 0x35
+#define PCKEY_Y 0x1D
+#define PCKEY_Z 0x34
+#define PCKEY_STARTKEY 0x5B
+#define PCKEY_CONTEXTKEY 0x5D
+#define PCKEY_NUMPAD0 0x5A
+#define PCKEY_NUMPAD1 0x57
+#define PCKEY_NUMPAD2 0x58
+#define PCKEY_NUMPAD3 0x59
+#define PCKEY_NUMPAD4 0x53
+#define PCKEY_NUMPAD5 0x54
+#define PCKEY_NUMPAD6 0x55
+#define PCKEY_NUMPAD7 0x4F
+#define PCKEY_NUMPAD8 0x50
+#define PCKEY_NUMPAD9 0x51
+#define PCKEY_MULTIPLY 0x3F
+#define PCKEY_ADD 0x56
+#define PCKEY_SEPARATOR 0x6C
+#define PCKEY_SUBTRACT 0x52
+#define PCKEY_DECIMAL 0x5B
+#define PCKEY_DIVIDE 0x70
+#define PCKEY_F1 0x43
+#define PCKEY_F2 0x44
+#define PCKEY_F3 0x45
+#define PCKEY_F4 0x46
+#define PCKEY_F5 0x47
+#define PCKEY_F6 0x48
+#define PCKEY_F7 0x49
+#define PCKEY_F8 0x4A
+#define PCKEY_F9 0x4B
+#define PCKEY_F10 0x4C
+#define PCKEY_F11 0x5F
+#define PCKEY_F12 0x60
+#define PCKEY_F13 0xff
+#define PCKEY_F14 0xff
+#define PCKEY_F15 0xff
+#define PCKEY_F16 0xff
+#define PCKEY_F17 0xff
+#define PCKEY_F18 0xff
+#define PCKEY_F19 0xff
+#define PCKEY_F20 0xff
+#define PCKEY_F21 0xff
+#define PCKEY_F22 0xff
+#define PCKEY_F23 0xff
+#define PCKEY_F24 0xff
+#define PCKEY_NUMLOCK 0x4D
+#define PCKEY_OEM_SCROLL 0x4E
+#define PCKEY_OEM_1 0x2F
+#define PCKEY_OEM_PLUS 0x15
+#define PCKEY_OEM_COMMA 0x3B
+#define PCKEY_OEM_MINUS 0x14
+#define PCKEY_OEM_PERIOD 0x3C
+#define PCKEY_OEM_2 0x3D
+#define PCKEY_OEM_3 0x31
+#define PCKEY_OEM_4 0x22
+#define PCKEY_OEM_5 0x33
+#define PCKEY_OEM_6 0x23
+#define PCKEY_OEM_7 0x30
+#define PCKEY_OEM_8 0xff
+#define PCKEY_ICO_F17 0xff
+#define PCKEY_ICO_F18 0xff
+#define PCKEY_OEM102 0x5E
+#define PCKEY_ICO_HELP 0xff
+#define PCKEY_ICO_00 0xff
+#define PCKEY_ICO_CLEAR 0xff
+#define PCKEY_OEM_RESET 0xff
+#define PCKEY_OEM_JUMP 0xff
+#define PCKEY_OEM_PA1 0xff
+#define PCKEY_OEM_PA2 0xff
+#define PCKEY_OEM_PA3 0xff
+#define PCKEY_OEM_WSCTRL 0xff
+#define PCKEY_OEM_CUSEL 0xff
+#define PCKEY_OEM_ATTN 0xFf
+#define PCKEY_OEM_FINNISH 0xFf
+#define PCKEY_OEM_COPY 0xFf
+#define PCKEY_OEM_AUTO 0xFf
+#define PCKEY_OEM_ENLW 0xFf
+#define PCKEY_OEM_BACKTAB 0xff
+#define PCKEY_ATTN 0xFf
+#define PCKEY_CRSEL 0xFf
+#define PCKEY_EXSEL 0xFf
+#define PCKEY_EREOF 0xFf
+#define PCKEY_PLAY 0xFf
+#define PCKEY_ZOOM 0xFf
+#define PCKEY_NONAME 0xFf
+#define PCKEY_PA1 0xFf
+#define PCKEY_OEM_CLEAR 0xFf
+
+#elif defined(__MACOSX__)
+// List manually written by Christian Walther
+#define PCKEY_LBUTTON -2
+#define PCKEY_RBUTTON -2
+#define PCKEY_MBUTTON -2
+#define PCKEY_CANCEL -2
+
+#define PCKEY_BACK 59
+#define PCKEY_TAB 56
+#define PCKEY_CLEAR 0xff
+#define PCKEY_RETURN 44
+#define PCKEY_SHIFT_L 64
+#define PCKEY_CONTROL_L 0x43
+#define PCKEY_MENU 0x42 //option
+#define PCKEY_PAUSE 121
+#define PCKEY_CAPITAL 65
+#define PCKEY_ESCAPE 61
+#define PCKEY_SPACE 57
+#define PCKEY_PRIOR 124
+#define PCKEY_NEXT 129
+#define PCKEY_END 127
+#define PCKEY_HOME 123
+#define PCKEY_LEFT 0x83
+#define PCKEY_UP 0x86
+#define PCKEY_RIGHT 0x84
+#define PCKEY_DOWN 0x85
+#define PCKEY_SELECT 0xff
+#define PCKEY_PRINT 0xff
+#define PCKEY_EXECUTE 0xff
+#define PCKEY_SNAPSHOT 113
+#define PCKEY_INSERT 122
+#define PCKEY_DELETE 125
+#define PCKEY_HELP 0xff
+#define PCKEY_0 37
+#define PCKEY_1 26
+#define PCKEY_2 27
+#define PCKEY_3 28
+#define PCKEY_4 29
+#define PCKEY_5 31
+#define PCKEY_6 30
+#define PCKEY_7 34
+#define PCKEY_8 36
+#define PCKEY_9 33
+#define PCKEY_A 8
+#define PCKEY_B 19
+#define PCKEY_C 16
+#define PCKEY_D 10
+#define PCKEY_E 22
+#define PCKEY_F 11
+#define PCKEY_G 13
+#define PCKEY_H 12
+#define PCKEY_I 42
+#define PCKEY_J 46
+#define PCKEY_K 48
+#define PCKEY_L 45
+#define PCKEY_M 54
+#define PCKEY_N 53
+#define PCKEY_O 39
+#define PCKEY_P 43
+#define PCKEY_Q 20
+#define PCKEY_R 23
+#define PCKEY_S 9
+#define PCKEY_T 25
+#define PCKEY_U 40
+#define PCKEY_V 17
+#define PCKEY_W 21
+#define PCKEY_X 15
+#define PCKEY_Y 24
+#define PCKEY_Z 14
+#define PCKEY_STARTKEY 0x3f //command
+#define PCKEY_CONTEXTKEY 0xff
+#define PCKEY_NUMPAD0 90
+#define PCKEY_NUMPAD1 91
+#define PCKEY_NUMPAD2 92
+#define PCKEY_NUMPAD3 93
+#define PCKEY_NUMPAD4 94
+#define PCKEY_NUMPAD5 95
+#define PCKEY_NUMPAD6 96
+#define PCKEY_NUMPAD7 97
+#define PCKEY_NUMPAD8 99
+#define PCKEY_NUMPAD9 100
+#define PCKEY_MULTIPLY 75
+#define PCKEY_ADD 77
+#define PCKEY_SEPARATOR 0xff
+#define PCKEY_SUBTRACT 86
+#define PCKEY_DECIMAL 73
+#define PCKEY_DIVIDE 83
+#define PCKEY_F1 130
+#define PCKEY_F2 128
+#define PCKEY_F3 107
+#define PCKEY_F4 126
+#define PCKEY_F5 104
+#define PCKEY_F6 105
+#define PCKEY_F7 106
+#define PCKEY_F8 108
+#define PCKEY_F9 109
+#define PCKEY_F10 117
+#define PCKEY_F11 111
+#define PCKEY_F12 119
+#define PCKEY_F13 0xff
+#define PCKEY_F14 0xff
+#define PCKEY_F15 0xff
+#define PCKEY_F16 0xff
+#define PCKEY_F17 0xff
+#define PCKEY_F18 0xff
+#define PCKEY_F19 0xff
+#define PCKEY_F20 0xff
+#define PCKEY_F21 0xff
+#define PCKEY_F22 0xff
+#define PCKEY_F23 0xff
+#define PCKEY_F24 0xff
+#define PCKEY_NUMLOCK 79
+#define PCKEY_OEM_SCROLL 115
+#define PCKEY_OEM_1 0x31
+#define PCKEY_OEM_PLUS 0x20
+#define PCKEY_OEM_COMMA 51
+#define PCKEY_OEM_MINUS 0x23
+#define PCKEY_OEM_PERIOD 55
+#define PCKEY_OEM_2 0x34
+#define PCKEY_OEM_3 0x12
+#define PCKEY_OEM_4 0x29
+#define PCKEY_OEM_5 0x32
+#define PCKEY_OEM_6 0x26
+#define PCKEY_OEM_7 0x2f
+#define PCKEY_OEM_8 0xff
+#define PCKEY_ICO_F17 0xff
+#define PCKEY_ICO_F18 0xff
+#define PCKEY_OEM102 58
+#define PCKEY_ICO_HELP 0xff
+#define PCKEY_ICO_00 0xff
+#define PCKEY_ICO_CLEAR 0xff
+#define PCKEY_OEM_RESET 0xff
+#define PCKEY_OEM_JUMP 0xff
+#define PCKEY_OEM_PA1 0xff
+#define PCKEY_OEM_PA2 0xff
+#define PCKEY_OEM_PA3 0xff
+#define PCKEY_OEM_WSCTRL 0xff
+#define PCKEY_OEM_CUSEL 0xff
+#define PCKEY_OEM_ATTN 0xFf
+#define PCKEY_OEM_FINNISH 0xFf
+#define PCKEY_OEM_COPY 0xFf
+#define PCKEY_OEM_AUTO 0xFf
+#define PCKEY_OEM_ENLW 0xFf
+#define PCKEY_OEM_BACKTAB 0xff
+#define PCKEY_ATTN 0xFf
+#define PCKEY_CRSEL 0xFf
+#define PCKEY_EXSEL 0xFf
+#define PCKEY_EREOF 0xFf
+#define PCKEY_PLAY 0xFf
+#define PCKEY_ZOOM 0xFf
+#define PCKEY_NONAME 0xFf
+#define PCKEY_PA1 0xFf
+#define PCKEY_OEM_CLEAR 0xFf
+#endif
+
+#endif
diff --git a/src/gui/calc/popup.c b/src/gui/calc/popup.c
new file mode 100644
index 0000000..0a184ad
--- /dev/null
+++ b/src/gui/calc/popup.c
@@ -0,0 +1,870 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: popup.c 2840 2009-05-08 20:43:47Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
+
+#include "intl.h"
+#include "support.h"
+#include "struct.h"
+#include "version.h"
+#include "popup.h"
+#include "paths.h"
+#include "engine.h"
+#include "fs_misc.h"
+#include "device.h"
+#include "rcfile.h"
+#include "dboxes.h"
+#include "romversion.h"
+#include "calc.h"
+#include "release.h"
+#include "about.h"
+#include "infos.h"
+#include "manpage.h"
+#include "scroptions.h"
+#include "tie_error.h"
+#include "dbg_all.h"
+#include "quicksend.h"
+#include "filesel.h"
+#include "keypress.h"
+#ifndef NO_SOUND
+#include "audio.h"
+#endif
+
+#include "ti68k_int.h"
+#include "ti68k_def.h"
+
+GLADE_CB void
+on_popup_menu_header                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	fprintf(stdout, _("* TiEmu version %s (cables=%s, files=%s, calcs=%s, conv=%s)"),
+	     TIEMU_VERSION, 
+		 ticables_version_get(), tifiles_version_get(), ticalcs_version_get(), ticonv_version_get());
+}
+
+/* menu part 1 (link) */
+
+GLADE_CB void
+on_send_file_to_tiemu1_activate     (GtkMenuItem     *menuitem,
+                                     gpointer         user_data)
+{
+	if(engine_is_stopped()) return;
+
+	engine_stop();
+
+	if(!options.qs_enabled)
+		display_send_files_dbox();
+	else if(options.qs_enabled && options.qs_file && strlen(options.qs_file))
+		fs_send_file(options.qs_file);
+
+	engine_start();
+}
+
+GLADE_CB void
+on_recv_file_from_tiemu1_activate     (GtkMenuItem     *menuitem,
+                                       gpointer         user_data)
+{
+	int active;
+	if(engine_is_stopped()) return;
+	active = GTK_CHECK_MENU_ITEM(menuitem)->active;
+#ifndef NO_SOUND
+	if (active)
+		audio_disable();
+#endif
+	params.recv_file = active;
+}
+
+GLADE_CB void
+on_emulate_sound1_activate     (GtkMenuItem     *menuitem,
+                                gpointer         user_data)
+{
+#ifndef NO_SOUND
+	int active;
+	if(engine_is_stopped()) return;
+	active = GTK_CHECK_MENU_ITEM(menuitem)->active;
+	if (active) {
+		params.recv_file = 0;
+		audio_enable();
+	} else
+		audio_disable();
+#endif
+}
+
+
+GLADE_CB void
+on_debug_file_with_tiemu1_activate     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	if(engine_is_stopped()) return;
+
+	engine_stop();
+#ifndef NO_GDB
+	display_debug_dbox();
+#endif
+	engine_start();
+}
+
+
+GLADE_CB void
+on_link_cable1_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	if(engine_is_stopped()) return;
+
+	engine_stop();
+	display_device_dbox();
+	engine_start();
+}
+
+GLADE_CB void
+on_quick_send1_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	if(engine_is_stopped()) return;
+
+	engine_stop();
+	display_quicksend_dbox();
+	engine_start();
+}
+
+/* menu part 2 (config & state) */
+
+void window_get_rect(GtkWidget *widget, GdkRect *rect);
+
+GLADE_CB void
+on_save_config1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	// save main window position
+	window_get_rect(main_wnd, &options3.calc.rect);
+
+	//write config
+	rcfile_write();
+
+#ifdef __WIN32__
+  	msg_box1(_("Information"), 
+	  _("Configuration file saved (in tiemu.ini)."));
+#else
+	msg_box1(_("Information"), 
+	  _("Configuration file saved (in ~/.tiemu)."));
+#endif
+}
+
+
+GLADE_CB void
+on_load_config1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	rcfile_read();
+
+  	msg_box1(_("Information"), _("Configuration file loaded."));
+}
+
+
+GLADE_CB void
+on_load_state_image1_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	engine_stop();
+	display_load_state_dbox();
+	engine_start();
+}
+
+
+GLADE_CB void
+on_save_state_image1_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	engine_stop();
+	display_save_state_dbox();
+	engine_start();
+}
+
+
+GLADE_CB void
+on_revert_to_saved_state1_activate     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	engine_stop();
+	ti68k_state_load(params.sav_file);
+  	engine_start();
+}
+
+void
+on_quick_save_state_image1_activate    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	gchar *basename;
+	gchar *dot;
+
+	// build name
+	basename = g_path_get_basename(params.rom_file);
+	dot = strrchr(basename, '.');
+	if(dot != NULL)
+		*dot = '\0';
+
+	// set path
+	g_free(params.sav_file);
+	params.sav_file = g_strconcat(inst_paths.img_dir, basename, ".sav", NULL);
+	g_free(basename);
+
+	// save state
+	ti68k_state_save(params.sav_file);
+}
+
+/* menu part 3 (debug) */
+
+GLADE_CB void
+on_enter_debugger1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+#ifndef __IPAQ__
+    if(dbg_on) return;
+	if(!dbg_load) return;
+
+	engine_stop();
+    ti68k_debug_break();
+	engine_start();
+#endif
+}
+
+GLADE_CB void
+on_reset_calc1_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	engine_stop();
+	switch (msg_box3(_("Question"), _("Clear RAM?"), GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_CANCEL)) {
+	  case BUTTON1:
+	    memset(tihw.ram, 0, tihw.ram_size);
+	  case BUTTON2:
+	    ti68k_reset();
+	    if (dbg_on)
+	      gtk_debugger_close();
+	    else {
+	      default:
+	        engine_start();
+	    }
+	}
+}
+
+/* menu part 4 (images) */
+
+GLADE_CB void
+on_upgrade_calc1_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	engine_stop();
+  	display_set_tib_dbox();
+	engine_start();
+}
+
+
+GLADE_CB void
+on_set_rom1_activate                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	engine_stop();
+	display_romversion_dbox (FALSE);
+	engine_start();
+}
+
+/* menu part 5.1 (emulator options) */
+
+GLADE_CB void
+on_restrict_to_actual_speed1_activate  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	int engine_was_stopped = engine_is_stopped();
+	engine_stop();
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+    	params.restricted = 0;
+  	else
+    	params.restricted = 1;
+	if (!engine_was_stopped) engine_start();
+}
+
+GLADE_CB void
+on_hw_protection1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+    	params.hw_protect = 0;
+  	else
+    	params.hw_protect = 1;
+}
+
+GLADE_CB void
+on_high_lcd_update1_activate           (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	params.lcd_rate = 25;
+	hid_lcd_rate_set();
+}
+
+GLADE_CB void
+on_med_lcd_update1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	params.lcd_rate = 55;
+	hid_lcd_rate_set();
+}
+
+GLADE_CB void
+on_low_lcd_update1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	params.lcd_rate = 85;
+	hid_lcd_rate_set();
+}
+
+GLADE_CB void
+on_normal_view1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	if(GTK_CHECK_MENU_ITEM(menuitem)->active == TRUE) 
+		hid_switch_normal_view();
+}
+
+
+GLADE_CB void
+on_large_view1_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	if(GTK_CHECK_MENU_ITEM(menuitem)->active == TRUE) 
+		hid_switch_large_view();
+}
+
+
+GLADE_CB void
+on_full_view1_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	if(GTK_CHECK_MENU_ITEM(menuitem)->active == TRUE) 
+		hid_switch_fullscreen();
+}
+
+GLADE_CB void
+on_custom_view1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+}
+
+/* menu part 5.2 (skin options) */
+
+GLADE_CB void
+on_no_skin1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+#ifndef __IPAQ__
+	hid_switch_without_skin();
+#endif
+}
+
+
+GLADE_CB void
+on_default_skin1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+#ifndef __IPAQ__
+	hid_switch_with_skin();
+#endif
+}
+
+
+GLADE_CB void
+on_set_skin1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	display_skin_dbox();
+}
+
+/* menu part 5.3 (screenshot options) */
+
+GLADE_CB void
+on_now1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	if(options2.shots > 1)
+		hid_screenshot_burst();
+	else
+		hid_screenshot_single();
+}
+
+
+GLADE_CB void
+on_screen_options1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	display_scroptions_dbox();
+}
+
+GLADE_CB void
+on_copy_to_clipboard1_activate        (GtkMenuItem     *menuitem,
+                                       gpointer         user_data)
+{
+	options2.clipboard = GTK_CHECK_MENU_ITEM(menuitem)->active ? 1 : 0;
+}
+
+/* menu part 5.4 (key press options) */
+
+GLADE_CB void
+on_setup_recording1_activate             (GtkMenuItem     *menuitem,
+                                          gpointer         user_data)
+{
+	const gchar *filename = create_fsel(inst_paths.base_dir, "keypress.txt", "*.txt", TRUE);
+	if (!filename)
+		return;
+
+	g_free(options.kp_rec_file);
+	options.kp_rec_file = g_strdup(filename);
+}
+
+GLADE_CB void
+on_start_recording1_activate             (GtkMenuItem     *menuitem,
+                                          gpointer         user_data)
+{
+	if(options.kp_ply_enabled || !options.kp_rec_file) return;
+
+	options.kp_rec_enabled = !options.kp_rec_enabled;
+
+	if(options.kp_rec_enabled)
+		kp_recording_start(options.kp_rec_file);
+	else
+		kp_recording_stop();
+}
+
+GLADE_CB void
+on_setup_playing1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	const gchar *filename = create_fsel(inst_paths.base_dir, NULL, "*.txt", FALSE);
+	if (!filename)
+		return;
+
+	g_free(options.kp_ply_file);
+	options.kp_ply_file = g_strdup(filename);
+}
+
+static gboolean kp_callback(gpointer data)
+{
+	int key, action, ret;
+
+	ret = kp_playing_key(&key, &action);
+	if(ret) 
+	{
+		kp_playing_stop();
+		return FALSE;
+	}
+
+	ti68k_kbd_set_key(key, action);
+	//printf("%i %i\n", key, action);
+
+	return TRUE;
+}
+
+GLADE_CB void
+on_start_playing1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	kp_playing_start(options.kp_ply_file);
+	g_timeout_add(250, kp_callback, NULL);
+}
+
+/* menu part 6 (misc) */
+
+static void go_to_bookmark(const char *link);
+
+GLADE_CB void
+on_help1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	gchar *path = g_strconcat(inst_paths.help_dir, _("Manual_en.html"), NULL);
+
+	go_to_bookmark(path);
+	g_free(path);
+}
+
+
+GLADE_CB void
+on_manpage1_activate                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	display_manpage_dbox();
+}
+
+GLADE_CB void
+on_bookmarks1_activate				   (GtkMenuItem		*menuitem,
+										gpointer		user_data)
+{
+#if GTK_CHECK_VERSION(2,12,0)
+	GtkWidget *dialog;
+	const gchar *message =
+    _("You're using GTK+ >= 2.12 so bookmark support is currently unavailable.");
+  
+	dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+				  GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
+				  message);
+	gtk_dialog_run(GTK_DIALOG(dialog));
+	gtk_widget_destroy(dialog);
+#else
+	GtkTooltipsData* data = gtk_tooltips_data_get(GTK_WIDGET(menuitem)); /* FIXME: deprecated in GTK+ 2.12 */
+	go_to_bookmark(data->tip_text);
+#endif
+}
+
+
+GLADE_CB void
+on_bugreport1_activate				   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	GtkWidget *dialog;
+	const gchar *message =
+    _("There are several ways to get in touch if you encounter a problem with TiEmu or if you have questions, suggestions, bug reports, etc:\n- if you have general questions or problems, please consider the users' mailing list first (http://tiemu-users@list.sf.net).\n- if you want to discuss about TiEmu, you can use the TiEmu forum (http://sourceforge.net/forum/?group_id=23169).\n- for bug reports, use the 'Bug Tracking System' (http://sourceforge.net/tracker/?group_id=23169).\n\nBefore  [...]
+  
+	dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+				  GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
+				  message);
+	gtk_dialog_run(GTK_DIALOG(dialog));
+	gtk_widget_destroy(dialog);
+}
+
+GLADE_CB void
+on_changelog1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	display_release_dbox ();
+}
+
+
+GLADE_CB void
+on_about1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	display_about_dbox ();
+}
+
+
+GLADE_CB void
+on_infos1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	display_infos_dbox();
+}
+
+void exit_main_loop(void);
+
+GLADE_CB void
+on_exit_and_save_state1_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	// stop emulation engine
+	engine_stop();
+
+	// save state
+	on_quick_save_state_image1_activate(NULL, NULL);
+
+	// and config
+	window_get_rect(main_wnd, &options3.calc.rect);
+    rcfile_write();
+
+	// exit
+	exit_main_loop();
+  	gtk_main_quit();
+}
+
+
+GLADE_CB void
+on_exit_without_saving_state1_activate (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+#if 0
+	{
+		//testing...
+		GdkEvent* event = gdk_event_new(GDK_KEY_PRESS);
+
+		event->key.type = GDK_KEY_PRESS;
+		event->key.window = main_wnd->window;
+		event->key.send_event = FALSE;
+		event->key.time = GDK_CURRENT_TIME;
+		event->key.state = GDK_LOCK_MASK;
+		event->key.keyval = -1;
+		event->key.length = 0;
+		event->key.string = "";
+		event->key.hardware_keycode = 0x14;
+		event->key.group = 0;	
+		
+		gdk_event_put(event);
+		while(gtk_events_pending()) gtk_main_iteration_do(FALSE);
+		//gdk_event_free(event);
+	}
+#endif
+
+	exit_main_loop();
+	gtk_main_quit();
+}
+
+typedef void (*VCB) (void);
+extern int reset_disabled;
+
+/*
+  Display the GTK popup menu and configure some items
+*/
+GtkWidget* display_popup_menu(void)
+{
+	GladeXML *xml;
+	GtkWidget *menu;
+	GtkWidget *data;
+	gchar *s;
+  
+	//menu = create_popup_menu();
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("popup-2.glade"), "popup_menu",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	menu = glade_xml_get_widget(xml, "popup_menu");
+
+	// set version
+	data = glade_xml_get_widget(xml, "popup_menu_header");
+	s = g_strdup_printf("TiEmu, version %s", TIEMU_VERSION);
+	gtk_label_set_text(GTK_LABEL(GTK_BIN(data)->child), s);
+	g_free(s);
+
+	// init check buttons
+	data = glade_xml_get_widget(xml, "recv_file_from_tiemu1");
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), params.recv_file);
+	data = glade_xml_get_widget(xml, "emulate_sound1");
+#ifdef NO_SOUND
+	gtk_widget_set_sensitive(data, FALSE);
+#else
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), audio_isactive);
+#endif
+
+	data = glade_xml_get_widget(xml, "restrict1");
+	g_signal_handlers_block_by_func(GTK_OBJECT(data), (VCB)on_restrict_to_actual_speed1_activate, NULL);
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), params.restricted);
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(data), (VCB)on_restrict_to_actual_speed1_activate, NULL);
+
+	data = glade_xml_get_widget(xml, "hw_protection1");
+	g_signal_handlers_block_by_func(GTK_OBJECT(data), (VCB)on_hw_protection1_activate, NULL);
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), params.hw_protect);
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(data), (VCB)on_hw_protection1_activate, NULL);
+
+	// hide the custom view radio button
+	data = glade_xml_get_widget(xml, "custom_view1");
+	gtk_widget_hide(data);
+	data = glade_xml_get_widget(xml, "full_view1");
+	gtk_widget_set_sensitive(data, FALSE);
+
+#ifdef NO_GDB
+	data = glade_xml_get_widget(xml, "debug_file_with_tiemu1");
+	gtk_widget_set_sensitive(data, FALSE);
+#endif
+
+	// init radio buttons
+    switch(options.view)
+    {
+    case VIEW_NORMAL:
+        data = glade_xml_get_widget(xml, "normal_view1");
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), TRUE);
+        break;
+    case VIEW_LARGE:
+        data = glade_xml_get_widget(xml, "large_view1");
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), TRUE);
+        break;
+	case VIEW_FULL:
+		data = glade_xml_get_widget(xml, "full_view1");
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), TRUE);
+		break;
+	case VIEW_CUSTOM:
+		data = glade_xml_get_widget(xml, "custom_view1");
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), TRUE);
+		break;
+    default:
+        break;
+    }
+
+	if(params.lcd_rate >= 10 && params.lcd_rate < 40)
+	{
+		data = glade_xml_get_widget(xml, "high_lcd_update1");
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), TRUE);
+	}
+	else if((params.lcd_rate >= 40 && params.lcd_rate < 70) || params.lcd_rate == -1)
+	{
+		data = glade_xml_get_widget(xml, "med_lcd_update1");
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), TRUE);
+	}
+	else if(params.lcd_rate >= 70 && params.lcd_rate < 100)
+	{
+		data = glade_xml_get_widget(xml, "low_lcd_update1");
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), TRUE);
+	}
+
+	// if debugger is open, blocks some items
+	if(dbg_on || !dbg_load)
+	{
+#ifndef NO_GDB
+		data = glade_xml_get_widget(xml, "send_file_to_tiemu1");
+		gtk_widget_set_sensitive(data, FALSE);
+
+		data = glade_xml_get_widget(xml, "debug_file_with_tiemu1");
+		gtk_widget_set_sensitive(data, FALSE);
+#endif
+
+		data = glade_xml_get_widget(xml, "recv_file_from_tiemu1");
+		gtk_widget_set_sensitive(data, FALSE);
+
+		data = glade_xml_get_widget(xml, "link_cable1");
+		gtk_widget_set_sensitive(data, FALSE);
+
+		data = glade_xml_get_widget(xml, "upgrade_calc1");
+		gtk_widget_set_sensitive(data, FALSE);
+
+		data = glade_xml_get_widget(xml, "set_rom1");
+		gtk_widget_set_sensitive(data, FALSE);
+
+		if (reset_disabled)
+		{
+			data = glade_xml_get_widget(xml, "reset_calc1");
+			gtk_widget_set_sensitive(data, FALSE);
+		}
+
+		data = glade_xml_get_widget(xml, "calculator_state1");
+		gtk_widget_set_sensitive(data, FALSE);
+	}
+
+	data = glade_xml_get_widget(xml, "start_recording1");
+	g_signal_handlers_block_by_func(GTK_OBJECT(data), (VCB)on_start_recording1_activate, NULL);
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), options.kp_rec_enabled);
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(data), (VCB)on_start_recording1_activate, NULL);
+
+	data = glade_xml_get_widget(xml, "start_playing1");
+	g_signal_handlers_block_by_func(GTK_OBJECT(data), (VCB)on_start_playing1_activate, NULL);
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), options.kp_ply_enabled);
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(data), (VCB)on_start_playing1_activate, NULL);
+
+	data = glade_xml_get_widget(xml, "copy_to_clipboard1");
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), options2.clipboard);
+
+	return menu;
+}
+
+
+/* */
+
+static void go_to_bookmark(const char *link)
+{
+#ifdef __WIN32__
+	HINSTANCE hInst;
+
+	// Windows do the whole work for us, let's go...
+	hInst = ShellExecute(NULL, "open", link, NULL, NULL, SW_SHOWNORMAL);
+	if((int)hInst <= 32)
+	{
+		msg_box1(_("Error"), _("Unable to run ShellExecute extension."));
+	}
+#else
+	// Kevin's list:
+	// These ones should be first, as they will honor the user's choice rather
+	// than guessing an arbitrary one:
+	// * /usr/bin/xdg-open (runs the default browser of the desktop environment
+	// currently in use, this is the best solution)
+	// * /usr/bin/gnome-open (GNOME 2.6+ default browser, user-configurable)
+	// Distro-specific browser wrapper scripts:
+	// * /usr/bin/sensible-browser (Debian's browser script)
+	// * /usr/bin/htmlview (old RHL/Fedora default browser script, current
+	// versions will honor the GNOME browser preference)
+	// Fallback to a hardcoded list of browsers:
+	// * /usr/bin/firefox (Mozilla Firefox)
+	// * /usr/bin/seamonkey (Seamonkey)
+	// * /usr/bin/konqueror (Konqueror)
+	// * /usr/bin/mozilla (old Mozilla Suite)
+	//
+	gboolean result;
+	char *apps[] = { 
+			"/usr/bin/xdg-open",
+			"/usr/bin/gnome-open",
+			"/usr/bin/sensible-browser",
+			"/usr/bin/htmlview",
+			"/usr/bin/firefox",
+			"/usr/bin/seamonkey",
+			"/usr/bin/konqueror",
+			"/usr/bin/mozilla",
+	};
+	gint i, n;
+
+	n = sizeof(apps) / sizeof(char *);
+	for(i = 0; i < n; i++)
+	{
+		gchar **argv = g_malloc0(3 * sizeof(gchar *));
+
+		argv[0] = g_strdup(apps[i]);
+		argv[1] = g_strdup(link);
+		argv[2] = NULL;
+
+		result = g_spawn_async(NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
+		g_strfreev(argv);
+
+		if(result != FALSE)
+			break;
+	}
+
+	if (i == n) 
+	{
+		msg_box1(_("Error"), _("Spawn error: do you have Firefox installed?"));
+	} 
+#endif
+	else 
+	{
+		GtkWidget *dialog;
+		GTimer *timer;
+		const gchar *message = "A web browser has been launched: this may take a while before it appears. If it is already launched, the page will be opened in the existing frame.";
+
+		dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+					   GTK_MESSAGE_INFO,
+					   GTK_BUTTONS_CLOSE, message);
+		g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
+					 G_CALLBACK(gtk_widget_destroy),
+					 GTK_OBJECT(dialog));
+		gtk_widget_show_all(GTK_WIDGET(dialog));
+		
+		while(gtk_events_pending()) gtk_main_iteration();
+		for(timer = g_timer_new(); g_timer_elapsed(timer, NULL) < 3.0;);
+
+		g_timer_destroy(timer);
+		gtk_widget_destroy(GTK_WIDGET(dialog));
+	}
+}
diff --git a/src/gui/calc/popup.h b/src/gui/calc/popup.h
new file mode 100644
index 0000000..9ce560e
--- /dev/null
+++ b/src/gui/calc/popup.h
@@ -0,0 +1,189 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: popup.h 2822 2009-05-04 20:46:56Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "support.h"
+
+GtkWidget* display_popup_menu(void);
+
+GLADE_CB void
+on_popup_menu_cancel                   (GtkMenuShell    *menushell,
+                                        gpointer         user_data);
+
+GLADE_CB gboolean
+on_popup_menu_button_press_event       (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+GLADE_CB gboolean
+on_popup_menu_key_press_event          (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_popup_menu_header                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_send_file_to_tiemu1_activate     (GtkMenuItem     *menuitem,
+                                     gpointer         user_data);
+
+GLADE_CB void
+on_recv_file_from_tiemu1_activate     (GtkMenuItem     *menuitem,
+                                       gpointer         user_data);
+
+GLADE_CB void
+on_link_cable1_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_save_config1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_load_config1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_load_state_image1_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_save_state_image1_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_revert_to_saved_state1_activate     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_quick_save_state_image1_activate    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_enter_debugger1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_reset_calc1_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_set_rom1_activate                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_restrict_to_actual_speed1_activate  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_sync1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_number_of_colors1_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_2_colors1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_4_colors1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_7_colors1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_blurry1_activate                    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_normal_view__1x_1_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_large_view__x2_1_activate           (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_full_screen1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_none1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_skin1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_set_skin1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_now__1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_rbm_options1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_help3_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_manpage1_activate                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_changelog1_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_about1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_infos1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_exit1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_exit_without_saving_state1_activate (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_now1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
diff --git a/src/gui/calc/screen.c b/src/gui/calc/screen.c
new file mode 100644
index 0000000..d9439c1
--- /dev/null
+++ b/src/gui/calc/screen.c
@@ -0,0 +1,390 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: screen.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <string.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "skinops.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "tie_error.h"
+#include "calc.h"
+#include "gscales.h"
+
+/* Types */
+
+#define BPP 8               // 8 bits per pixel
+#define NGS 16              // number of gray scales (contrast level)
+
+#define SCREEN_ON   (!0)
+#define SCREEN_OFF	0
+
+/* Variables */
+
+extern GtkWidget *main_wnd;
+extern GtkWidget *area;
+
+extern SKIN_INFOS skin_infos;
+
+GdkPixbuf *lcd_mem = NULL;
+GdkPixbuf *lcd = NULL;
+GdkPixmap *pixmap = NULL;
+
+uint32_t*	lcd_bytmap;				// LCD buffer (color-mapped as grayscale)
+
+LCD_INFOS	li;
+float		sf;	// scaling factor
+
+LCD_RECT	ls;	// LCD rectangle in skin
+LCD_RECT	lr;	// LCD rectangle in window
+SKN_RECT	sr;	// skin rectangle
+union {
+  WND_RECT wr;
+  GdkRectangle gr;
+}	wr;	// window rectangle
+
+static uint32_t convtab[512];      	// planar to chunky conversion table
+static RGB      grayscales[16];		// gray scales rgb values (colormap)
+static int		lcd_state = -1;     // screen state
+
+static int contrast = NGS;          // current contrast level
+static int old_contrast = 0;        // previous contrast level
+static int new_contrast = NGS;		// new contrast level
+
+static int max_plane = 0;         	// number of grayscales to emulate
+
+int shot_cnt = 0;					// number of captures
+int	skip_cnt = 0;					// number of frames to skip
+
+/* Compute conversion table */
+void compute_convtable(void) 
+{
+  	int i, j;
+  	uint8_t k;
+  	uint8_t *tab = (uint8_t *)convtab;
+
+  	for(i=0, j=0; i<256; i++) 
+    {
+      	for(k = 1<<7; k; k>>=1)
+		{
+			tab[j++] = (i & k) ? 1 : 0;
+		}
+    }
+}
+
+/* The value v is between l and h and can not be outside */
+#define filter(v, l, h) (v<l ? l : (v>h ? h : v))
+
+/* Computes the 16 grays level colors */
+void compute_grayscale(void)
+{
+  	int i;
+  	int sr, sg, sb;
+  	int er, eg, eb;
+  	int r, g ,b;
+    uint32_t white = skin_infos.lcd_white;  // 0xcfe0ce
+    uint32_t black = skin_infos.lcd_black;  // 0x222e31
+
+	//printf("# planes: %i | contrast: %i\n", max_plane, contrast);
+
+	// Compute RBG bsaic values
+  	sr = (white & 0xff0000) >> 8;
+  	sg = (white & 0x00ff00);
+  	sb = (white & 0x0000ff) << 8;
+  	
+  	er = (black & 0xff0000) >> 8;
+  	eg = (black & 0x00ff00);
+  	eb = (black & 0x0000ff) << 8;
+
+	// Compute RGB values tuned with contrast
+  	if(contrast < NGS) 
+    {
+      	sr = sr - (sr-er) * (NGS - contrast)/NGS;
+      	sg = sg - (sg-eg) * (NGS - contrast)/NGS;
+      	sb = sb - (sb-eb) * (NGS - contrast)/NGS;
+    }
+  	else 
+    {
+      	er = er - (er-sr)*(contrast - NGS)/NGS;
+      	eg = eg - (eg-sg)*(contrast - NGS)/NGS;
+      	eb = eb - (eb-sb)*(contrast - NGS)/NGS;
+    }
+
+	//printf("a: %02x%02x%02x | %02x%02x%02x\n", sr>>8, sg>>8, sb>>8, er>>8, eg>>8, eb>>8);
+  
+  	r = sr;
+  	g = sg;
+  	b = sb;
+
+  	if(lcd_state) 
+    {
+      	for(i = 0; i <= (max_plane+1); i++) 
+		{
+	  		grayscales[i].r = filter(r, 0x0000, 0xfff0) >> 8;
+	  		grayscales[i].g = filter(g, 0x0000, 0xff00) >> 8;
+	  		grayscales[i].b = filter(b, 0x0000, 0xff00) >> 8;
+
+	  		r -= ((sr-er) / (max_plane+1));
+	  		g -= ((sg-eg) / (max_plane+1));
+	  		b -= ((sb-eb) / (max_plane+1));
+		}
+    }
+
+	// Compute grayscale palette
+	if(!max_plane)
+		return;
+	
+	for(i = 0; i <= max_plane; i++)
+	{
+		grayscales[i].r = ((sr-er)/max_plane * (max_plane-i) + er) >> 8;
+		grayscales[i].g = ((sg-eg)/max_plane * (max_plane-i) + eg) >> 8;
+		grayscales[i].b = ((sb-eb)/max_plane * (max_plane-i) + eb) >> 8;
+	}
+}
+
+/* Redraw the skin into window but don't reload skin file */
+void redraw_skin(void) 
+{
+	// no skin ?
+  	if(!options.skin) 
+    	return;
+
+	// scale image
+	g_object_unref(skin_infos.image);
+	skin_infos.image = gdk_pixbuf_scale_simple(skin_infos.raw, wr.wr.w, wr.wr.h, GDK_INTERP_NEAREST);
+
+	// and draw image into pixmap (next, into window on expose event)
+    gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
+		  skin_infos.image, 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_NONE, 0, 0);
+	gdk_window_invalidate_rect(main_wnd->window, &wr.gr, FALSE);
+}
+
+/* Redraw the lcd only */
+void redraw_lcd(void) 
+{
+	if(!pixmap)
+		return;
+
+	// scale image
+	g_object_unref(skin_infos.image);
+	skin_infos.image = 
+		gdk_pixbuf_scale_simple(skin_infos.raw, sr.w, sr.h, GDK_INTERP_NEAREST);
+
+	// and draw
+	gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
+		  skin_infos.image, ls.x, ls.y, lr.x, lr.y, lr.w, lr.h, GDK_RGB_DITHER_NONE, 0, 0);
+	gtk_widget_queue_draw_area(area, lr.x, lr.y, lr.w, lr.h);
+}
+
+// gray plane sequences in relation with gscales.c
+const int gp_seq[9][8] = {			
+	{ -1 },						// unused
+	{ 0, -1 },					// b&w		(1 plane)
+	{ -1 },						// unused
+	{ 0, 0, 1, -1 },			// 4 colors (2 planes)
+	{ -1 },						// unused
+	{ -1 },						// unused
+	{ -1 },						// unused
+	{ 2, 0, 1, 0, 1, 0, -1 },	// 7 colors (3 planes)
+	{ 1, 0, 2, 0, 0, 1, 0, -1 },// 8 colors (3 planes)
+};
+
+/* Update LCD screen part */
+int hid_update_lcd(void)
+{
+	int i, j, k, l;
+	uint8_t *lcd_bitmap = &tihw.ram[tihw.lcd_adr];	
+	uint8_t *lcd_buf = (uint8_t *)lcd_bytmap;	
+	GdkRect src;
+	guchar *p;
+
+	tihw.lcd_ptr = (char *) &tihw.ram[tihw.lcd_adr];	
+
+    if(!pixmap || !lcd_mem || !tihw.lcd_ptr)
+        return 0;
+
+	// Check for LCD state change (from TI HW)
+	if(lcd_state != tihw.on_off)
+	{
+		lcd_state = tihw.on_off;
+		lcd_changed = 1;
+
+		if(!lcd_state)
+			redraw_lcd();	// to clear LCD
+	}
+
+	// Check for contrast change (from TI HW)
+	if(contrast != tihw.contrast)
+	{
+		gint c = contrast = tihw.contrast;
+
+		new_contrast = (c + old_contrast) / 2;
+  		old_contrast = c;
+
+		compute_grayscale();
+
+		lcd_changed = 1;
+	}
+
+	// Check for gray plane change (menu/hw)
+    if(max_plane != ngc) 
+    {
+		max_plane = ngc;
+		compute_grayscale();
+    }
+
+	// LCD off or unchanged: don't refresh !
+	if(!lcd_state || !lcd_changed)
+		return 0;
+
+	// Reset LCD changed flag.
+	lcd_changed = 0;
+
+	// Convert the bitmap screen to a bytemap screen and grayscalize
+	memset(lcd_bytmap, 0, LCDMEM_H*LCDMEM_W);	
+	for(l = 0; l < 8; l++)
+	{
+		int pp = gp_seq[ngc][l];
+		if(pp == -1) break;
+
+		lcd_bitmap = lcd_planebufs[pp];
+
+		for(j = 0, k = 0; k < LCDMEM_H; k++)
+		{
+			for(i = 0; i < LCDMEM_W/8; i++, lcd_bitmap++) 
+			{
+				lcd_bytmap[j++] += convtab[(*lcd_bitmap << 1)  ];
+				lcd_bytmap[j++] += convtab[(*lcd_bitmap << 1)+1];
+			}
+		}
+    }
+
+    if(1)
+	{
+		// Copy LCD from buffer to pixbuf
+		for(j = 0; j < LCDMEM_H; j++)
+		{
+			for (i = 0; i < LCDMEM_W; i++) 
+			{
+				p = li.pixels + j * li.rowstride + i * li.n_channels;
+				
+				p[0] = grayscales[*lcd_buf].r;
+				p[1] = grayscales[*lcd_buf].g;
+				p[2] = grayscales[*lcd_buf].b;
+				lcd_buf++;
+			}
+		}
+
+        // Set region to update
+        src.x = src.y = 0;
+		src.w = (tihw.log_w > tihw.lcd_w) ? tihw.lcd_w : tihw.log_w;
+		src.h = (tihw.log_h > tihw.lcd_h) ? tihw.lcd_h : tihw.log_h;
+
+		// Copy surface into window
+		if(sf)
+		{
+			src.w = (int)(sf * src.w);
+			src.h = (int)(sf * src.h);
+
+			// scale image
+			g_object_unref(skin_infos.image);
+			skin_infos.image = gdk_pixbuf_scale_simple(lcd, lr.w, lr.h, GDK_INTERP_NEAREST);
+
+			// and draw image into pixmap (next, into window on expose event)
+			gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
+			 skin_infos.image, src.x, src.y, lr.x, lr.y, src.w, src.h,
+			  GDK_RGB_DITHER_NONE, 0, 0);
+			gtk_widget_queue_draw_area(area, lr.x, lr.y, src.w, src.h);
+		}
+		else
+		{
+			// and draw image into pixmap (next, into window on expose event)
+			gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
+			  lcd_mem, src.x, src.y, lr.x, lr.y, src.w, src.h,
+			  GDK_RGB_DITHER_NONE, 0, 0);
+			gtk_widget_queue_draw_area(area, lr.x, lr.y, src.w, src.h);
+		}
+    }
+
+	// Screen shot
+	if(!--skip_cnt && shot_cnt > 0)
+	{
+		skip_cnt = options2.skips;
+
+		hid_screenshot_single();
+		shot_cnt--;
+	}
+
+    return -1;
+}
+
+// Copy LCD pixuf into B&W pixbuf
+GdkPixbuf* hid_copy_lcd(void)
+{
+	int i, j, k;
+	uint8_t *lcd_bitmap = &tihw.ram[tihw.lcd_adr];	
+	uint8_t *lcd_buf = (uint8_t *)lcd_bytmap;
+	guchar *p;
+
+	tihw.lcd_ptr = (char *) &tihw.ram[tihw.lcd_adr];	
+
+	// convert the bitmap screen to a bytemap screen and grayscalize
+	memset(lcd_bytmap, 0, LCDMEM_H*LCDMEM_W);	
+	for(j = 0, k = 0; k < LCDMEM_H; k++)
+	{
+		for(i = 0; i < LCDMEM_W/8; i++, lcd_bitmap++) 
+		{
+			lcd_bytmap[j++] = convtab[(*lcd_bitmap << 1)  ];
+			lcd_bytmap[j++] = convtab[(*lcd_bitmap << 1)+1];
+		}
+	}
+
+	// and copy
+	for(j = 0; j < LCDMEM_H; j++)
+	{
+		for (i = 0; i < LCDMEM_W; i++) 
+		{
+			p = li.pixels + j * li.rowstride + i * li.n_channels;
+			
+			p[0] = *lcd_buf ? 0x00: 0xff;
+			p[1] = *lcd_buf ? 0x00: 0xff;
+			p[2] = *lcd_buf ? 0x00: 0xff;
+			lcd_buf++;
+		}
+	}
+
+	return gdk_pixbuf_new_subpixbuf(lcd_mem, 0, 0, tihw.lcd_w, tihw.lcd_h);
+}
diff --git a/src/gui/calc/skinkeys.c b/src/gui/calc/skinkeys.c
new file mode 100644
index 0000000..902501b
--- /dev/null
+++ b/src/gui/calc/skinkeys.c
@@ -0,0 +1,79 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: skinkeys.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "keydefs.h" // in core/ti_hw
+
+/*
+  Key mapping for skins
+*/
+
+const char sknKey92[] = 
+{
+    TIKEY_HAND,
+    TIKEY_F1, TIKEY_F2, TIKEY_F3, TIKEY_F4, TIKEY_F5, TIKEY_F6, TIKEY_F7,
+    TIKEY_F8,
+    TIKEY_Q, TIKEY_W, TIKEY_E, TIKEY_R, TIKEY_T, TIKEY_Y, TIKEY_U, TIKEY_I,
+    TIKEY_O,
+    TIKEY_P,
+    TIKEY_A, TIKEY_S, TIKEY_D, TIKEY_F, TIKEY_G, TIKEY_H, TIKEY_J, TIKEY_K,
+    TIKEY_L,
+    TIKEY_Z, TIKEY_X, TIKEY_C, TIKEY_V, TIKEY_B, TIKEY_N, TIKEY_M,
+    TIKEY_THETA,
+    TIKEY_SHIFT, TIKEY_ON, TIKEY_DIAMOND, TIKEY_2ND, TIKEY_STORE,
+    TIKEY_SPACE,
+    TIKEY_EQUALS,
+    TIKEY_BACKSPACE, TIKEY_ENTER1, TIKEY_2ND, TIKEY_ESCAPE, TIKEY_MODE,
+    TIKEY_CLEAR,
+    TIKEY_LN,
+    TIKEY_APPS, TIKEY_ENTER2, TIKEY_LEFT, TIKEY_RIGHT, TIKEY_UP,
+    TIKEY_DOWN,
+    TIKEY_SIN, TIKEY_COS, TIKEY_TAN, TIKEY_POWER, TIKEY_PALEFT,
+    TIKEY_PARIGHT,
+    TIKEY_COMMA,
+    TIKEY_DIVIDE, TIKEY_7, TIKEY_8, TIKEY_9, TIKEY_MULTIPLY, TIKEY_4,
+    TIKEY_5, TIKEY_6,
+    TIKEY_MINUS,
+    TIKEY_1, TIKEY_2, TIKEY_3, TIKEY_PLUS, TIKEY_0, TIKEY_PERIOD, TIKEY_NEGATE,
+    TIKEY_ENTER1
+};
+
+const char sknKey89[] = 
+{
+    TIKEY_F1, TIKEY_F2, TIKEY_F3, TIKEY_F4, TIKEY_F5,
+    TIKEY_2ND, TIKEY_SHIFT, TIKEY_ESCAPE, TIKEY_LEFT, TIKEY_RIGHT,
+    TIKEY_UP, TIKEY_DOWN, TIKEY_DIAMOND, TIKEY_ALPHA, TIKEY_APPS,
+    TIKEY_HOME, TIKEY_MODE, TIKEY_CATALOG, TIKEY_BACKSPACE, TIKEY_CLEAR,
+    TIKEY_X, TIKEY_Y, TIKEY_Z, TIKEY_T, TIKEY_POWER,
+    TIKEY_EQUALS, TIKEY_PALEFT, TIKEY_PARIGHT, TIKEY_COMMA, TIKEY_DIVIDE,
+    TIKEY_PIPE, TIKEY_7, TIKEY_8, TIKEY_9, TIKEY_MULTIPLY,
+    TIKEY_EE, TIKEY_4, TIKEY_5, TIKEY_6, TIKEY_MINUS,
+    TIKEY_STORE, TIKEY_1, TIKEY_2, TIKEY_3, TIKEY_PLUS,
+    TIKEY_ON, TIKEY_0, TIKEY_PERIOD, TIKEY_NEGATE, TIKEY_ENTER1
+};
diff --git a/src/gui/calc/skinops.c b/src/gui/calc/skinops.c
new file mode 100644
index 0000000..bd8b1b9
--- /dev/null
+++ b/src/gui/calc/skinops.c
@@ -0,0 +1,469 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: skinops.c 2440 2007-04-15 00:43:07Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#include <math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "skinops.h"
+#include "logging.h"
+
+/*
+	Determine skin type
+*/
+int skin_get_type(SKIN_INFOS *si, const char *filename)
+{
+	FILE *fp;
+	char str[17];
+
+	fp = fopen(filename, "rb");
+  	if (fp == NULL)
+    {
+      	fprintf(stderr, "Unable to open this file: <%s>\n", filename);
+      	return -1;
+    }
+
+	memset(str, 0, sizeof(str));
+	fread(str, 16, 1, fp);
+
+	if(!strncmp(str, "TiEmu v2.00", 16))
+		si->type = SKIN_TYPE_TIEMU;
+	else if(!strncmp(str, "VTIv2.1 ", 8))
+		si->type = SKIN_TYPE_OLD_VTI;
+	else if(!strncmp(str, "VTIv2.5 ", 8))
+		si->type = SKIN_TYPE_VTI;
+	else
+  	{
+  		fprintf(stderr, "Bad skin format\n");
+      	return -1;
+  	}
+
+	return 0;
+}
+
+/*
+	Read VTi skin informations (header)
+*/
+int skin_read_header_vti(SKIN_INFOS *si, const char *filename)
+{
+	FILE *fp;
+	char str[9];
+	uint32_t length;
+	int i;
+	uint32_t calc;
+
+	/* open file */
+	fp = fopen(filename, "rb");
+  	if (fp == NULL)
+    {
+      	fprintf(stderr, "Unable to open this file: <%s>\n", filename);
+      	return -1;
+    }
+ 
+	/* signature */
+	memset(str, 0, sizeof(str));
+	fread(str, 8, 1, fp);
+
+  	if(strncmp(str, "VTIv2.", 6))
+  	{
+  		fprintf(stderr, "Bad VTi skin format\n");
+      	return -1;
+  	}
+
+	/* Skin name and author */
+	length = 64;
+  	si->name = (char *)malloc(length + 1);
+	if (si->name == NULL)
+		return -1;
+
+	memset(si->name, 0, length + 1);
+	fread(si->name, length, 1, fp);
+
+	if(si->type == SKIN_TYPE_VTI)
+	{
+		si->author = (char *)malloc(length + 1);
+      	if (si->author == NULL)
+			return -1;
+
+      	memset(si->author, 0, length + 1);
+      	fread(si->author, length, 1, fp);
+	}
+
+	/* types & colors*/
+	fread(&calc, 1, sizeof(calc), fp);
+	switch(calc)
+	{
+	case 89: strcpy(si->calc, SKIN_TI89); break;
+	case 92: strcpy(si->calc, SKIN_TI92); break;
+	case 94: strcpy(si->calc, SKIN_TI92P); break;
+	default: return -1;
+	}
+
+	fread(&si->colortype, 4, 1, fp);
+  	fread(&si->lcd_white, 4, 1, fp);
+  	fread(&si->lcd_black, 4, 1, fp);
+
+	/* lcd position */
+  	fread(&si->lcd_pos.left, 4, 1, fp);
+  	fread(&si->lcd_pos.top, 4, 1, fp);
+  	fread(&si->lcd_pos.right, 4, 1, fp);
+  	fread(&si->lcd_pos.bottom, 4, 1, fp);
+
+	/* keys */
+	length = 80;
+	for (i = 0; i < (int)length; i++)
+    {
+      	fread(&si->keys_pos[i].left, 4, 1, fp);
+      	fread(&si->keys_pos[i].top, 4, 1, fp);
+      	fread(&si->keys_pos[i].right, 4, 1, fp);
+      	fread(&si->keys_pos[i].bottom, 4, 1, fp);
+    }
+
+	// VTi skins are always Little-Endian
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+	{
+		si->colortype = GUINT32_SWAP_LE_BE(si->colortype);
+		si->lcd_white = GUINT32_SWAP_LE_BE(si->lcd_white);
+		si->lcd_black = GUINT32_SWAP_LE_BE(si->lcd_black);
+      
+		si->lcd_pos.top = GUINT32_SWAP_LE_BE(si->lcd_pos.top);
+		si->lcd_pos.left = GUINT32_SWAP_LE_BE(si->lcd_pos.left);
+		si->lcd_pos.bottom = GUINT32_SWAP_LE_BE(si->lcd_pos.bottom);
+		si->lcd_pos.right = GUINT32_SWAP_LE_BE(si->lcd_pos.right);
+
+		for (i = 0; i < (int)length; i++)
+		{
+			si->keys_pos[i].top = GUINT32_SWAP_LE_BE(si->keys_pos[i].top);
+			si->keys_pos[i].bottom = GUINT32_SWAP_LE_BE(si->keys_pos[i].bottom);
+			si->keys_pos[i].left = GUINT32_SWAP_LE_BE(si->keys_pos[i].left);
+			si->keys_pos[i].right = GUINT32_SWAP_LE_BE(si->keys_pos[i].right);
+		}
+	}
+#endif
+
+	si->jpeg_offset = ftell(fp);
+
+	fclose(fp);
+	return 0;
+}
+
+/*
+	Read TiEmu skin informations (header)
+*/
+int skin_read_header_tiemu(SKIN_INFOS *si, const char *filename)
+{
+	FILE *fp;
+  	int i;
+  	uint32_t endian;
+  	uint32_t jpeg_offset;
+  	uint32_t length;
+	char str[17];
+
+	fp = fopen(filename, "rb");
+  	if (fp == NULL)
+    {
+      	fprintf(stderr, "Unable to open this file: <%s>\n", filename);
+      	return -1;
+    }
+ 
+	/* signature & offsets */
+	fread(str, 16, 1, fp);
+  	if (strncmp(str, "TiEmu v2.00", 16))
+  	{
+  		fprintf(stderr, "Bad TiEmu skin format\n");
+      	return -1;
+  	}
+  	fread(&endian, 4, 1, fp);
+  	fread(&jpeg_offset, 4, 1, fp);
+
+	if (endian != ENDIANNESS_FLAG)
+		jpeg_offset = GUINT32_SWAP_LE_BE(jpeg_offset);
+
+	/* Skin name */
+  	fread(&length, 4, 1, fp);
+	if (endian != ENDIANNESS_FLAG)
+		length = GUINT32_SWAP_LE_BE(length);
+
+  	if (length > 0)
+    {
+      	si->name = (char *)malloc(length + 1);
+	    if (si->name == NULL)
+			return -1;
+
+	    memset(si->name, 0, length + 1);
+	    fread(si->name, length, 1, fp);
+    }
+	
+	/* Skin author */
+  	fread(&length, 4, 1, fp);
+	if (endian != ENDIANNESS_FLAG)
+		length = GUINT32_SWAP_LE_BE(length);
+
+  	if (length > 0)
+    {
+      	si->author = (char *)malloc(length + 1);
+      	if (si->author == NULL)
+			return -1;
+
+      	memset(si->author, 0, length + 1);
+      	fread(si->author, length, 1, fp);
+    }
+
+	/* LCD colors */
+  	fread(&si->colortype, 4, 1, fp);
+  	fread(&si->lcd_white, 4, 1, fp);
+  	fread(&si->lcd_black, 4, 1, fp);
+
+   	/* Calc type */
+  	fread(si->calc, 8, 1, fp);
+
+  	/* LCD position */
+  	fread(&si->lcd_pos.left, 4, 1, fp);
+  	fread(&si->lcd_pos.top, 4, 1, fp);
+  	fread(&si->lcd_pos.right, 4, 1, fp);
+  	fread(&si->lcd_pos.bottom, 4, 1, fp);
+
+	/* Number of RECT struct to read */
+  	fread(&length, 4, 1, fp);
+	if (endian != ENDIANNESS_FLAG)
+		length = GUINT32_SWAP_LE_BE(length);
+
+  	if (length > SKIN_KEYS)
+    		return -1;
+
+  	for (i = 0; i < (int)length; i++)
+    {
+      	fread(&si->keys_pos[i].left, 4, 1, fp);
+      	fread(&si->keys_pos[i].top, 4, 1, fp);
+      	fread(&si->keys_pos[i].right, 4, 1, fp);
+      	fread(&si->keys_pos[i].bottom, 4, 1, fp);
+    }
+
+	if (endian != ENDIANNESS_FLAG)
+	{
+		si->colortype = GUINT32_SWAP_LE_BE(si->colortype);
+		si->lcd_white = GUINT32_SWAP_LE_BE(si->lcd_white);
+		si->lcd_black = GUINT32_SWAP_LE_BE(si->lcd_black);
+      
+		si->lcd_pos.top = GUINT32_SWAP_LE_BE(si->lcd_pos.top);
+		si->lcd_pos.left = GUINT32_SWAP_LE_BE(si->lcd_pos.left);
+		si->lcd_pos.bottom = GUINT32_SWAP_LE_BE(si->lcd_pos.bottom);
+		si->lcd_pos.right = GUINT32_SWAP_LE_BE(si->lcd_pos.right);
+
+		for (i = 0; i < (int)length; i++)
+		{
+			si->keys_pos[i].top = GUINT32_SWAP_LE_BE(si->keys_pos[i].top);
+			si->keys_pos[i].bottom = GUINT32_SWAP_LE_BE(si->keys_pos[i].bottom);
+			si->keys_pos[i].left = GUINT32_SWAP_LE_BE(si->keys_pos[i].left);
+			si->keys_pos[i].right = GUINT32_SWAP_LE_BE(si->keys_pos[i].right);
+		}
+	}
+
+	si->jpeg_offset = ftell(fp);
+    	
+    fclose(fp);
+    return 0;
+}
+
+int skin_read_header(SKIN_INFOS *si, const char *filename)
+{
+	if(skin_get_type(si, filename) == -1)
+		return -1;
+
+	switch(si->type)
+	{
+	case SKIN_TYPE_TIEMU:   return skin_read_header_tiemu(si, filename);
+	case SKIN_TYPE_VTI:     return skin_read_header_vti(si, filename);
+	case SKIN_TYPE_OLD_VTI: return skin_read_header_vti(si, filename);
+	default: return -1;
+	}
+
+	return 0;
+}
+
+/*
+	Read skin image (pure jpeg data)
+*/
+int skin_read_image(SKIN_INFOS *si, const char *filename)
+{
+    FILE *fp = NULL;	
+	int i;
+	int sw, sh;
+    int lw, lh;
+	float rw, rh, r;
+	double s;
+	int lcd_w, lcd_h;
+
+	GdkPixbufLoader *loader;
+	GError *error = NULL;
+	gboolean result;
+	guchar *buf;
+	gsize count;
+	struct stat st;
+
+	// set lcd size
+	if(!strcmp(si->calc, SKIN_TI89) || !strcmp(si->calc, SKIN_TI89T))
+	{
+		lcd_w = 160;
+		lcd_h = 100;
+	} 
+	else
+	{
+		lcd_w = 240;
+		lcd_h = 128;
+	}
+  
+    fp = fopen(filename, "rb");
+  	if (fp == NULL)
+    {
+    	fprintf(stderr, "Unable to open this file: <%s>\n", filename);
+    	return -1;
+    }
+    	
+    // Extract image from skin
+	fseek(fp, si->jpeg_offset, SEEK_SET);
+	fstat(fileno(fp), &st);
+	count = st.st_size - si->jpeg_offset;
+
+	buf = g_malloc(count * sizeof(guchar));
+	count = fread(buf, sizeof(guchar), count, fp);
+	
+	// Feed the pixbuf loader with our jpeg data
+	loader = gdk_pixbuf_loader_new();	
+	result = gdk_pixbuf_loader_write(loader, buf, count, &error);
+	if(result == FALSE)
+	{
+		fprintf(stderr, "Failed to load pixbuf file: %s\n", filename);
+		g_error_free(error);
+
+		return -1;
+	}
+    
+	result = gdk_pixbuf_loader_close(loader, &error);
+	if(result == FALSE)
+	{
+		fprintf(stderr, "Failed to close pixbuf file: %s\n", filename);
+		g_error_free(error);
+
+		return -1;
+	}
+	
+    // and get the pixbuf
+	si->raw = gdk_pixbuf_loader_get_pixbuf(loader);
+	if(si->raw == NULL)
+	{
+		fprintf(stderr, "Failed to load pixbuf file: %s\n", filename);
+		g_error_free(error);
+
+		return -1;
+    }
+
+	// Rescale image to a fixed LCD size but keep original image (avoid resolution lost)
+    sw = gdk_pixbuf_get_width(si->raw);
+    sh = gdk_pixbuf_get_height(si->raw);
+
+	lw = si->lcd_pos.right - si->lcd_pos.left;
+	lh = si->lcd_pos.bottom - si->lcd_pos.top;
+
+	rw = (float)lw / lcd_w;
+	rh = (float)lh / lcd_h;
+
+	r = (rw < rh) ? rw : rh;
+	si->s = s = ceil(10 * r) / 10.0;
+
+	//printf("image :<%i x %i>\n", sw, sh);
+	//printf("lcd : <%i x %i>\n", lw, lh);
+	//printf("ratios : <%2.2f x %2.2f> => %2.1f\n", rw, rh, s);
+    
+	if(si->image)
+		g_object_unref(si->image);
+    si->image = gdk_pixbuf_scale_simple(si->raw, (int)(sw/s), (int)(sh/s), GDK_INTERP_NEAREST);
+
+    // Get new skin size
+    si->width = gdk_pixbuf_get_width(si->image);
+    si->height = gdk_pixbuf_get_height(si->image);
+
+	// Rescale all coords
+	si->lcd_pos.left = (long)(si->lcd_pos.left / s);
+	si->lcd_pos.right = (long)(si->lcd_pos.right / s);
+	si->lcd_pos.top = (long)(si->lcd_pos.top / s);
+	si->lcd_pos.bottom = (long)(si->lcd_pos.bottom / s);
+
+	for (i = 0; i < SKIN_KEYS; i++) 
+	{
+      	si->keys_pos[i].left = (long)(si->keys_pos[i].left / s);
+      	si->keys_pos[i].top = (long)(si->keys_pos[i].top / s);
+      	si->keys_pos[i].right = (long)(long)(si->keys_pos[i].right / s);
+      	si->keys_pos[i].bottom = (long)(long)(si->keys_pos[i].bottom / s);
+    }
+
+   	return 0;
+}
+
+/* Load a skin (TiEmu v2.00 only) */
+int skin_load(SKIN_INFOS *si, const char *filename)
+{
+  	int ret = 0;
+
+  	ret = skin_read_header(si, filename);
+	if(ret)
+		return ret;
+
+  	ret = skin_read_image(si, filename);
+	if(ret)
+		return ret;
+
+	if(!ret)
+   		tiemu_info(_("loading skin: %s (%d x %d)"), g_basename(filename), si->width, si->height);
+  
+  	return ret;
+}
+
+/* Unload skin by freeing allocated memory */
+int skin_unload(SKIN_INFOS *si)
+{
+    if(si->image != NULL)
+    {
+        g_object_unref(si->image);
+        si->image = NULL;
+    }
+
+  	free(si->name);
+  	free(si->author);
+
+  	memset(si, 0, sizeof(SKIN_INFOS));
+  
+  	return 0;
+}
diff --git a/src/gui/calc/skinops.h b/src/gui/calc/skinops.h
new file mode 100644
index 0000000..cb59c81
--- /dev/null
+++ b/src/gui/calc/skinops.h
@@ -0,0 +1,137 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: skinops.h 2031 2006-03-25 14:47:33Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/* 
+   Most of these definitions and code comes from the JB's SkinEdit
+   which is based on TiEmu skin code. TiEmu skin code is also based on
+   VTi's skin code.
+*/
+
+#ifndef __SKINLOADER_H__
+#define __SKINLOADER_H__
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdint.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+/***************/
+/* Definitions */
+/***************/
+
+#define LCD_COLORTYPE_LOW    0
+#define LCD_COLORTYPE_HIGH   1
+#define LCD_COLORTYPE_CUSTOM 2
+
+#define LCD_HI_WHITE 0xb0ccae
+#define LCD_HI_BLACK 0x8a6f53
+
+#define LCD_LOW_WHITE 0xcfe0cc
+#define LCD_LOW_BLACK 0x222e31
+
+#define MAX_COLORS (256 - 16)		// we need to keep 16 colors for grayscales
+#define SKIN_KEYS  80
+
+#define SKIN_TI73   "TI-73"
+#define SKIN_TI82   "TI-82"
+#define SKIN_TI83   "TI-83"
+#define SKIN_TI83P  "TI-83+"
+#define SKIN_TI85   "TI-85"
+#define SKIN_TI86   "TI-86"
+#define SKIN_TI89   "TI-89"
+#define SKIN_TI92   "TI-92"
+#define SKIN_TI92P  "TI-92+"
+#define SKIN_V200   "V200PLT"
+#define SKIN_TI89T  "TI-89TM"
+
+#define SKIN_TYPE_TIEMU   10
+#define SKIN_TYPE_VTI     2
+#define SKIN_TYPE_OLD_VTI 1
+#define SKIN_TYPE_NEW     0
+
+#define ENDIANNESS_FLAG 0xfeedbabe
+#define TIEMU_SKIN_ID   "TiEmu v2.00"
+
+/*********/
+/* Types */
+/*********/
+
+#if !defined(__WIN32__)	// already defined by Windows
+typedef struct
+{
+  uint32_t left;
+  uint32_t top;
+  uint32_t right;
+  uint32_t bottom;
+} RECT;
+#elif defined(__MINGW32__)
+#include <windef.h>
+#endif
+
+typedef struct
+{
+  int type;
+
+  GdkPixbuf *image;
+
+  unsigned int width;
+  unsigned int height;
+
+  GdkPixbuf *raw;	// raw jpeg image
+  double	s;		// scaling factor
+
+  unsigned char calc[9];
+  uint32_t colortype;
+
+  uint32_t lcd_black;
+  uint32_t lcd_white;
+
+  unsigned char *name;
+  unsigned char *author;
+
+  RECT lcd_pos;
+  RECT keys_pos[SKIN_KEYS];
+
+  long	jpeg_offset;
+
+} SKIN_INFOS;
+
+extern SKIN_INFOS skin_infos;
+
+/*************/
+/* Functions */
+/*************/
+
+int skin_load(SKIN_INFOS *infos, const char *filename);
+int skin_unload(SKIN_INFOS *infos);
+
+int skin_read_header(SKIN_INFOS *infos, const char* filename);
+int skin_read_image (SKIN_INFOS *infos, const char* filename);
+
+
+#endif
diff --git a/src/gui/dboxes.c b/src/gui/dboxes.c
new file mode 100644
index 0000000..2415cb1
--- /dev/null
+++ b/src/gui/dboxes.c
@@ -0,0 +1,244 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dboxes.c 2753 2007-12-30 23:14:15Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *  Copyright (C) 1999-2004  Romain Lievin
+ *  Copyright (C) 2007  Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <string.h>
+
+#include "intl.h"
+#include "dboxes.h"
+#include "support.h"
+#include "paths.h"
+
+static gint ret_val = 0;
+
+static gint str2msg(const char *title)
+{
+	gint msg_type = GTK_MESSAGE_INFO;
+
+	if (!strcmp(title, _("Information")))
+		msg_type = GTK_MESSAGE_INFO;
+	else if (!strcmp(title, _("Warning")))
+		msg_type = GTK_MESSAGE_WARNING;
+	else if (!strcmp(title, _("Question")))
+		msg_type = GTK_MESSAGE_QUESTION;
+	else if (!strcmp(title, _("Error")))
+		msg_type = GTK_MESSAGE_ERROR;
+	else
+		msg_type = GTK_MESSAGE_INFO;
+
+	return msg_type;
+}
+
+int msg_box1(const char *title, const char *message)
+{
+	GtkWidget *dialog, *label;
+	gint result;
+	gint msg_type;
+
+	msg_type = str2msg(title);
+	if (msg_type != -1) 
+	{
+		dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+					   msg_type, GTK_BUTTONS_CLOSE,
+					   message);
+		gtk_dialog_run(GTK_DIALOG(dialog));
+	} 
+	else 
+	{
+		dialog = gtk_dialog_new_with_buttons(title, GTK_WINDOW(NULL),
+						(GtkDialogFlags)
+						(GTK_DIALOG_MODAL),
+						GTK_STOCK_OK,
+						GTK_RESPONSE_OK, NULL);
+		gtk_dialog_set_default_response(GTK_DIALOG(dialog),
+						GTK_RESPONSE_OK);
+		label = gtk_label_new(message);
+		gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label);
+		gtk_widget_show(label);
+
+		result = gtk_dialog_run(GTK_DIALOG(dialog));
+		switch (result) 
+		{
+		case GTK_RESPONSE_OK:
+			break;
+		default:
+			break;
+		}
+	}
+	gtk_widget_destroy(dialog);
+
+	return 0;
+}
+
+gint msg_box2(const char *title, const char *message)
+{
+	GtkWidget *dialog;
+	gint result;
+	gint msg_type;
+
+	msg_type = str2msg(title);
+	dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, msg_type,
+				   GTK_BUTTONS_OK_CANCEL, message);
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dialog), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+	gtk_dialog_set_default_response(GTK_DIALOG(dialog),
+					GTK_RESPONSE_CANCEL);
+
+	result = gtk_dialog_run(GTK_DIALOG(dialog));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		gtk_widget_destroy(dialog);
+		return BUTTON1;
+		break;
+	default:
+		gtk_widget_destroy(dialog);
+		return BUTTON2;
+		break;
+	}
+
+	return 0;
+}
+
+gint msg_box3(const char *title, const char *message, const char *button1,
+	      const char *button2, const char *button3)
+{
+	GtkWidget *dialog;
+	gint result;
+	gint msg_type;
+
+	msg_type = str2msg(title);
+	dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, msg_type,
+				   GTK_BUTTONS_NONE, message);
+	gtk_dialog_add_button(GTK_DIALOG(dialog), button1, GTK_RESPONSE_YES);
+	gtk_dialog_add_button(GTK_DIALOG(dialog), button2, GTK_RESPONSE_NO);
+	gtk_dialog_add_button(GTK_DIALOG(dialog), button3, GTK_RESPONSE_CANCEL);
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dialog), GTK_RESPONSE_YES,
+	                                        GTK_RESPONSE_NO, GTK_RESPONSE_CANCEL, -1);
+
+	gtk_dialog_set_default_response(GTK_DIALOG(dialog),
+					GTK_RESPONSE_CANCEL);
+
+	result = gtk_dialog_run(GTK_DIALOG(dialog));
+	switch (result) 
+	{
+	case GTK_RESPONSE_YES:
+		gtk_widget_destroy(dialog);
+		return BUTTON1;
+		break;
+	case GTK_RESPONSE_NO:
+		gtk_widget_destroy(dialog);
+		return BUTTON2;
+		break;
+	default:
+		gtk_widget_destroy(dialog);
+		return BUTTON3;
+		break;
+	}
+	
+	return 0;
+}
+
+gint msg_box4(const char *title, const char *message)
+{
+	GtkWidget *dialog;
+	gint result;
+	gint msg_type;
+
+	msg_type = str2msg(title);
+	dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, msg_type,
+				   GTK_BUTTONS_NONE, message);
+	gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_GO_FORWARD, GTK_RESPONSE_OK);
+	gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dialog), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+
+	gtk_dialog_set_default_response(GTK_DIALOG(dialog),
+					GTK_RESPONSE_CANCEL);
+
+	result = gtk_dialog_run(GTK_DIALOG(dialog));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		gtk_widget_destroy(dialog);
+		return BUTTON1;
+		break;
+	default:
+		gtk_widget_destroy(dialog);
+		return BUTTON2;
+		break;
+	}
+
+	return 0;
+}
+
+
+/* Create the dialog box entry and wait */
+char *msg_entry(const char *title, const char *message, const char *content)
+{
+	GladeXML *xml;
+	GtkWidget *data;
+	GtkWidget *dbox;
+	GtkWidget *entry = NULL;
+	gchar *ret = NULL;
+	gint result;
+	ret_val = 0;
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("user_boxes-2.glade"), "entry_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error("dboxes.c: GUI loading failed !\n");
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = data = glade_xml_get_widget(xml, "entry_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+	gtk_window_set_title(GTK_WINDOW(data), title);
+
+	data = glade_xml_get_widget(xml, "frame1");
+	gtk_frame_set_label(GTK_FRAME(data), message);
+
+	data = glade_xml_get_widget(xml, "entry1");
+	entry = GTK_WIDGET(data);
+	gtk_entry_set_text(GTK_ENTRY(data), content);
+
+	gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1);
+
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		ret = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
+		break;
+	default:
+		break;
+	}
+	gtk_widget_destroy(dbox);
+
+	return ret;
+}
diff --git a/src/gui/dboxes.h b/src/gui/dboxes.h
new file mode 100644
index 0000000..3356e84
--- /dev/null
+++ b/src/gui/dboxes.h
@@ -0,0 +1,43 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dboxes.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __DBOXES_H__
+#define __DBOXES_H__
+
+#include <gtk/gtk.h>
+
+#define BUTTON1  1
+#define BUTTON2  2
+#define BUTTON3  3
+
+int msg_box1(const gchar * title, const gchar * message);
+int msg_box2(const char *title, const char *message);
+int msg_box3(const char *title, const char *message,
+			 const char *button1, const char *button2, const char *button3);
+int msg_box4(const char *title, const char *message);
+char *msg_entry(const char *title, const char *message, const char *content);
+
+#endif
diff --git a/src/gui/debugger/dbg_all.c b/src/gui/debugger/dbg_all.c
new file mode 100644
index 0000000..67fef22
--- /dev/null
+++ b/src/gui/debugger/dbg_all.c
@@ -0,0 +1,263 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_all.c 2832 2009-05-08 10:56:40Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2008, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#ifdef __WIN32__
+#include <gdk/gdk.h>
+#include <gdk/gdkwin32.h>
+#endif
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
+
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_all.h"
+#include "dbg_wnds.h"
+#include "dbg_dock.h"
+#include "support.h"
+#include "paths.h"
+#include "engine.h"
+#include "dboxes.h"
+#ifndef NO_GDB
+#include "gdbcall.h"
+
+void gdbtk_hide_insight(void);
+void gdbtk_show_insight(void);
+void delete_command(void *, int);
+void symbol_file_clear(int);
+void gdbtk_clear_file(void);
+void exec_build_section_table(void);
+
+gchar *symfile;
+#endif
+
+int dbg_on = 0;
+int dbg_load = 0;
+
+/* Functions applicable to the whole debugger */
+
+// create windows but don't show them yet
+void gtk_debugger_preload(void)
+{
+	WND_TMR_START();
+
+	dbgw.regs  = dbgregs_create_window();
+	dbgw.mem   = dbgmem_create_window();
+	dbgw.bkpts = dbgbkpts_create_window();
+	dbgw.pclog = dbgpclog_create_window();
+    dbgw.stack = dbgstack_create_window();
+	dbgw.heap  = dbgheap_create_window();
+	dbgw.iop   = dbgiop_create_window();
+	dbgw.code  = dbgcode_create_window();
+	if(options3.dbg_dock)	//must be launched as last
+		dbgw.dock  = dbgdock_create_window();
+
+	dbg_load = !0;
+
+	WND_TMR_STOP("Debugger Preload Time");
+}
+
+void gtk_debugger_refresh(void)
+{	
+	WND_TMR_START();
+
+	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.regs))
+		dbgregs_refresh_window();
+	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.mem))
+		dbgmem_refresh_window();
+	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.bkpts))
+		dbgbkpts_refresh_window();
+	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.pclog))
+		dbgpclog_refresh_window();
+	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.code))
+		dbgcode_refresh_window();
+    if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.stack))
+		dbgstack_refresh_window();
+	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.heap))
+		dbgheap_refresh_window();
+	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.iop))
+		dbgiop_refresh_window();
+
+	WND_TMR_STOP("Debugger Refresh Time");
+	printf("\n");
+}
+
+void gtk_debugger_display(void)
+{
+	WND_TMR_START();
+
+	// display debugger windows (if not)
+	if(options3.dbg_dock)
+	{
+		dbgdock_display_window();
+		dbgiop_display_window();
+		dbgpclog_display_window();
+	}
+	else
+	{
+		dbgregs_display_window();
+		dbgmem_display_window();
+		dbgbkpts_display_window();
+		dbgpclog_display_window();
+		dbgstack_display_window();
+		dbgheap_display_window();
+		dbgiop_display_window();
+		dbgcode_display_window();	// the last has focus	
+	}
+
+	WND_TMR_STOP("Display Time");
+}
+
+// show previously created window
+int gtk_debugger_enter(int context)
+{
+#ifndef NO_GDB
+	gint type, id, mode;
+
+	if (!dbg_on) gdbtk_show_insight();
+#endif
+
+	// debugger is open
+	dbg_on = !0;
+
+    // show breakpoint source (modal)
+    switch(context)
+    {
+    case DBG_TRACE:
+        break;
+    case DBG_BREAK:
+        break;
+    }
+
+    // display debugger windows (if not)
+	gtk_debugger_display();
+	gtk_debugger_refresh();
+
+	// enable the debugger if GDB disabled it
+	if (!options3.dbg_dock && !GTK_WIDGET_SENSITIVE(dbgw.regs))
+		gtk_debugger_enable();
+
+	// handle automatic debugging requests
+#ifndef NO_GDB
+	if (symfile)
+	{
+		// get context
+		ti68k_bkpt_get_cause(&type, &mode, &id);
+
+		if(type == BK_TYPE_PGMENTRY)
+		{
+			uint16_t handle, offset;
+			uint32_t pc;
+
+			ti68k_bkpt_get_pgmentry_offset(id, &handle, &offset);
+			ti68k_bkpt_del_pgmentry(handle);
+			if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.bkpts))
+				dbgbkpts_refresh_window();
+
+			delete_command(NULL, 0);
+			symbol_file_clear(0);
+			gdbtk_clear_file ();
+			ti68k_register_get_pc(&pc);
+			pc -= offset-2;
+			gdb_add_symbol_file(symfile, pc);
+			g_free (symfile);
+			symfile = NULL;
+			exec_build_section_table();
+
+			ti68k_unprotect_64KB_range(pc);
+
+			gdb_hbreak("__main");
+		}
+	}
+#endif
+
+	return 0;
+}
+
+void gtk_debugger_close (void)
+{
+#ifndef NO_GDB
+	// hide all windows
+	gdbtk_hide_insight();
+	dbg_on = 0;
+	if(options3.dbg_dock)
+		dbgdock_hide_all(!0);
+	else
+		dbgwnds_hide_all(!0);
+
+    // and restarts the emulator
+	ti68k_bkpt_set_cause(0, 0, 0);
+	dbgbkpts_erase_context();
+
+    if (engine_is_stopped()) gdbcall_continue();
+#else
+	// hide all windows
+	dbg_on = 0;
+	if(options3.dbg_dock)
+		dbgdock_hide_all(!0);
+	else
+		dbgwnds_hide_all(!0);
+
+    // and restarts the emulator
+	ti68k_bkpt_set_cause(0, 0, 0);
+	dbgbkpts_erase_context();
+
+    engine_start();
+#endif
+}
+
+static gint close_debugger_wrapper(gpointer data)
+{
+	gtk_debugger_close();
+	return FALSE;
+}
+
+void gtk_debugger_close_async (void)
+{
+	g_idle_add(close_debugger_wrapper, NULL);
+}
+
+void gtk_debugger_disable(void)
+{
+	if(options3.dbg_dock)
+		dbgdock_set_sensitivity(FALSE);
+	else
+		dbgwnds_set_sensitivity(FALSE);
+}
+
+void gtk_debugger_enable(void)
+{
+	if(options3.dbg_dock)
+		dbgdock_set_sensitivity(TRUE);
+	else
+		dbgwnds_set_sensitivity(TRUE);
+}
diff --git a/src/gui/debugger/dbg_all.h b/src/gui/debugger/dbg_all.h
new file mode 100644
index 0000000..ad8f99d
--- /dev/null
+++ b/src/gui/debugger/dbg_all.h
@@ -0,0 +1,56 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_all.h 2832 2009-05-08 10:56:40Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __DBG_ALL_H__
+#define __DBG_ALL_H__
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+/* Variables */
+
+extern int dbg_on;
+extern int dbg_load;
+extern gchar *symfile;
+
+/* Functions */
+
+void gtk_debugger_preload(void);
+void gtk_debugger_display(void);
+void gtk_debugger_refresh(void);
+
+void gtk_debugger_disable(void);
+void gtk_debugger_enable(void);
+
+int  gtk_debugger_enter(int context);
+void gtk_debugger_close(void);
+void gtk_debugger_close_async(void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/gui/debugger/dbg_bits.c b/src/gui/debugger/dbg_bits.c
new file mode 100644
index 0000000..487d48b
--- /dev/null
+++ b/src/gui/debugger/dbg_bits.c
@@ -0,0 +1,117 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_data.c 2385 2007-03-12 21:04:20Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "ti68k_int.h"
+#include "support.h"
+#include "dbg_bkpts.h"
+
+static GladeXML *xml;
+
+gint dbgbits_display_dbox(uint32_t *address, uint8_t *checks, uint8_t *states)
+{
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+	gchar *str;
+	gint i;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_bits-2.glade"), "dbgbits_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgbits_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+
+	data = glade_xml_get_widget(xml, "entry4");
+	str = g_strdup_printf("0x%06x", *address);
+	gtk_entry_set_text(GTK_ENTRY(data), str);
+	g_free(str);
+
+	for(i = 0; i < 8; i++)
+	{
+		str = g_strdup_printf("checkbutton1%i", i);
+		data = glade_xml_get_widget(xml, str);
+		g_free(str);
+
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), *checks & (1 << i));
+	}
+
+	for(i = 0; i < 8; i++)
+	{
+		str = g_strdup_printf("checkbutton2%i", i);
+		data = glade_xml_get_widget(xml, str);
+		g_free(str);
+
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), *states & (1 << i));
+	}
+
+loop:
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		data = glade_xml_get_widget(xml, "entry4");
+		str = (gchar *)gtk_entry_get_text(GTK_ENTRY(data));
+		result = sscanf(str, "%x", address);
+		if(result < 1)
+			goto loop;
+
+		for(*checks = i = 0; i < 8; i++)
+		{
+			str = g_strdup_printf("checkbutton1%i", i);
+			data = glade_xml_get_widget(xml, str);
+			g_free(str);
+
+			*checks |= (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data)) << i);
+		}
+
+		for(*states = i = 0; i < 8; i++)
+		{
+			str = g_strdup_printf("checkbutton2%i", i);
+			data = glade_xml_get_widget(xml, str);
+			g_free(str);
+
+			*states |= (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data)) << i);
+		}
+
+		gtk_widget_destroy(dbox);
+		return 0;
+	default:
+		gtk_widget_destroy(dbox);
+		return -1;
+	}	
+
+	return 0;
+}
diff --git a/src/gui/debugger/dbg_bits.h b/src/gui/debugger/dbg_bits.h
new file mode 100644
index 0000000..2268a88
--- /dev/null
+++ b/src/gui/debugger/dbg_bits.h
@@ -0,0 +1,26 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_data.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint dbgbits_display_dbox(uint32_t *, uint8_t *, uint8_t *);
diff --git a/src/gui/debugger/dbg_bkpts.c b/src/gui/debugger/dbg_bkpts.c
new file mode 100644
index 0000000..b16d7bf
--- /dev/null
+++ b/src/gui/debugger/dbg_bkpts.c
@@ -0,0 +1,941 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_bkpts.c 2825 2009-05-06 19:48:47Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <string.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+#include "bkpts.h"
+#include "handles.h"
+
+static GladeXML *xml = NULL;
+static GtkWidget *wnd = NULL;
+
+enum { 
+	    COL_SYMBOL, COL_TYPE, COL_STATUS, COL_START, COL_END, COL_MODE,
+		COL_DATA, COL_FONT
+};
+#define CLIST_NVCOLS	(6)		// 7 visible columns
+#define CLIST_NCOLS		(8)		// 7 real columns
+
+static GtkListStore* clist_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkListStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+    const gchar *text[CLIST_NVCOLS] = { 
+		_("Symbol"), _("Type"), _("Status"), _("Start"), _("End"), _("Mode")
+    };
+    gint i;
+	
+	store = gtk_list_store_new(CLIST_NCOLS,
+				G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+				G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+  
+	for(i = COL_SYMBOL; i <= COL_MODE; i++)
+	{
+		renderer = gtk_cell_renderer_text_new();
+		gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i,
+			"font", COL_FONT,
+			NULL);
+	}
+    
+    for (i = 0; i < CLIST_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
+
+	return store;
+}
+
+static GList** bkpts_mem_access[6] = {
+	&bkpts.mem_rb, &bkpts.mem_rw, &bkpts.mem_rl, 
+	&bkpts.mem_wb, &bkpts.mem_ww, &bkpts.mem_wl, 
+};
+static  GList** bkpts_mem_range[2] = { 
+	&bkpts.mem_rng_r, &bkpts.mem_rng_w,
+};
+static const int bkpts_memacc_rw[6] = {
+    BK_READ_BYTE, BK_READ_WORD, BK_READ_LONG,
+    BK_WRITE_BYTE, BK_WRITE_WORD, BK_WRITE_LONG, 
+};
+static const int bkpts_memrng_rw[2] = {
+	BK_READ, BK_WRITE
+};
+
+static void clist_populate(GtkListStore *store)
+{
+	GList *l;
+    GtkTreeIter iter, iter2;
+	gint i;
+
+	GtkTreeModel *model = GTK_TREE_MODEL(store);
+	gboolean valid, valid2, removed;
+	uint32_t mode, mode2;
+
+	// Code breakpoints
+	for(l = bkpts.code; l != NULL; l = g_list_next(l))
+	{
+		uint32_t addr = GPOINTER_TO_INT(l->data);
+		gchar *str;
+		
+		str = g_strdup_printf("0x%06x", BKPT_ADDR(addr));
+		
+		gtk_list_store_append(store, &iter);
+
+		gtk_list_store_set(store, &iter, 
+		COL_SYMBOL, str, 
+		COL_TYPE, ti68k_bkpt_type_to_string(BK_TYPE_CODE),
+		COL_STATUS, BKPT_IS_ENABLED(addr) ? _("enabled") : _("disabled"),
+		COL_START, str,
+		COL_END, "",		
+        COL_MODE, BKPT_IS_TMP(addr) ? _("one-shot") : "",
+		COL_DATA, l->data,
+		-1);
+/*
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+*/		
+		g_free(str);
+	}
+
+	// Vector breakpoints
+	for(l = bkpts.exception; l != NULL; l = g_list_next(l))
+	{
+		gint n = GPOINTER_TO_INT(l->data);
+		gchar *str1, *str2;
+		gint bn = BKPT_ADDR(n);
+		
+		str1 = g_strdup_printf("#%i - %s", bn, ti68k_exception_to_string(bn));
+		str2 = g_strdup_printf("0x%06x", 4 * bn);
+		
+		gtk_list_store_append(store, &iter);
+		gtk_list_store_set(store, &iter, 
+		COL_SYMBOL, str1, 
+		COL_TYPE, ti68k_bkpt_type_to_string(BK_TYPE_EXCEPTION),
+		COL_STATUS, BKPT_IS_ENABLED(n) ? _("enabled") : _("disabled"),
+		COL_START, str2,
+		COL_END, "",		
+		COL_MODE, "",
+		COL_DATA, l->data,
+		-1);
+/*
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+*/		
+		g_free(str1);
+		g_free(str2);
+	}
+	
+	// Memory access breakpoints
+	for(i = 0; i < 6; i++)
+	{
+		for(l = *bkpts_mem_access[i]; l != NULL; l = g_list_next(l))
+		{
+			uint32_t addr = GPOINTER_TO_INT(l->data);
+			gchar *str;
+			
+			str = g_strdup_printf("0x%06x", BKPT_ADDR(addr));
+			
+			gtk_list_store_append(store, &iter);
+			gtk_list_store_set(store, &iter, 
+			COL_SYMBOL, str, 
+			COL_TYPE, ti68k_bkpt_type_to_string(BK_TYPE_ACCESS),
+			COL_STATUS, BKPT_IS_ENABLED(addr) ? _("enabled") : _("disabled"),
+			COL_START, str,
+			COL_END, "",
+            COL_MODE, ti68k_bkpt_mode_to_string(BK_TYPE_ACCESS, bkpts_memacc_rw[i]),
+			COL_DATA, l->data,
+			-1);
+/*
+			if(options3.dbg_font_type)
+				gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+*/			
+			g_free(str);
+		}
+	}
+	
+	// Memory range breakpoints
+	for(i = 0; i < 2; i++)
+	{
+		for(l = *(bkpts_mem_range[i]); l != NULL; l = g_list_next(l))
+		{
+			ADDR_RANGE *s = l->data;
+			gchar *str1, *str2;
+			
+			str1 = g_strdup_printf("0x%06x", BKPT_ADDR(s->val1));
+			str2 = g_strdup_printf("0x%06x", BKPT_ADDR(s->val2));
+			
+			gtk_list_store_append(store, &iter);
+			gtk_list_store_set(store, &iter, 
+			COL_SYMBOL, str1, 
+			COL_TYPE, ti68k_bkpt_type_to_string(BK_TYPE_RANGE),
+			COL_STATUS, BKPT_IS_ENABLED(s->val1) ? _("enabled") : _("disabled"),
+			COL_START, str1,
+			COL_END, str2,
+            COL_MODE, ti68k_bkpt_mode_to_string(BK_TYPE_RANGE, bkpts_memrng_rw[i]),
+			COL_DATA, l->data,
+			-1);
+/*
+			if(options3.dbg_font_type)
+				gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+*/			
+			g_free(str1);
+			g_free(str2);
+		}
+	}
+	
+	// Bit change breakpoints
+	for(l = bkpts.bits; l != NULL; l = g_list_next(l))
+	{
+		ADDR_BIT *s = l->data;
+		gchar *str;
+
+		str = g_strdup_printf("0x%06x", BKPT_ADDR(s->addr));
+
+		gtk_list_store_append(store, &iter);
+			gtk_list_store_set(store, &iter, 
+			COL_SYMBOL, str, 
+			COL_TYPE, ti68k_bkpt_type_to_string(BK_TYPE_BIT),
+			COL_STATUS, BKPT_IS_ENABLED(s->addr) ? _("enabled") : _("disabled"),
+			COL_START, str,
+			COL_END, "",
+            COL_MODE, "",
+			COL_DATA, l->data,
+			-1);
+/*
+			if(options3.dbg_font_type)
+				gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+*/
+		g_free(str);
+	}
+
+	// parse list to merge informations: ugly/heavy code !
+	for(valid = gtk_tree_model_get_iter_first(model, &iter);
+        valid; 
+        valid = gtk_tree_model_iter_next(model, &iter))
+    {
+		gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+
+		gtk_tree_model_get(model, &iter, 
+				COL_SYMBOL, &row_text[COL_SYMBOL], 
+				COL_TYPE, &row_text[COL_TYPE], 
+				COL_START, &row_text[COL_START], 
+				COL_END, &row_text[COL_END],
+				COL_MODE, &row_text[COL_MODE],
+				-1);
+		mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+
+		memcpy(&iter2, &iter, sizeof(GtkTreeIter));
+		for(valid2 = gtk_tree_model_iter_next(model, &iter2);
+			valid2; 
+			removed = FALSE)
+		{
+				gchar** row_text2 = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+
+				gtk_tree_model_get(model, &iter2, 
+				COL_SYMBOL, &row_text2[COL_SYMBOL], 
+				COL_TYPE, &row_text2[COL_TYPE], 
+				COL_START, &row_text2[COL_START], 
+				COL_END, &row_text2[COL_END],
+				COL_MODE, &row_text2[COL_MODE],
+				-1);
+				mode2 = ti68k_string_to_bkpt_mode(row_text2[COL_MODE]);
+
+				if(!strcmp(row_text2[COL_TYPE], _("access")) || !strcmp(row_text2[COL_TYPE], _("range")))
+				{
+					if(!strcmp(row_text[COL_START], row_text2[COL_START]) && !strcmp(row_text[COL_END], row_text2[COL_END]))
+					{
+						if( ((mode & BK_READ) && (mode2 & BK_WRITE)) || ((mode & BK_WRITE) && (mode2 & BK_READ)) )
+						{
+							const gchar *new_str;
+							
+							new_str = ti68k_bkpt_mode_to_string(0, mode | BK_RW);
+							gtk_list_store_set(store, &iter, COL_MODE, new_str, -1);
+
+							valid2 = gtk_list_store_remove(store, &iter2);
+							removed = TRUE;
+						}						
+					}
+				}
+
+				g_strfreev(row_text2);
+
+				if(!removed)
+					valid2 = gtk_tree_model_iter_next(model, &iter2);
+		}		
+
+		g_strfreev(row_text);
+	}
+
+	// Prgm entry breakpoints
+	for(l = bkpts.pgmentry; l != NULL; l = g_list_next(l))
+	{
+		uint32_t addr = GPOINTER_TO_INT(l->data);
+		gchar *str;
+		
+		str = g_strdup_printf("#%04x", BKPT_ADDR(addr) >> 16);
+		
+		gtk_list_store_append(store, &iter);
+
+		gtk_list_store_set(store, &iter, 
+		COL_SYMBOL, str, 
+		COL_TYPE, ti68k_bkpt_type_to_string(BK_TYPE_PGMENTRY),
+		COL_STATUS, BKPT_IS_ENABLED(addr) ? _("enabled") : _("disabled"),
+		COL_START, str,
+		COL_END, "",		
+        COL_MODE, BKPT_IS_TMP(addr) ? _("one-shot") : "",
+		COL_DATA, l->data,
+		-1);
+/*
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+*/		
+		g_free(str);
+	}
+}
+
+static GtkListStore *store = NULL;
+
+/*
+	Display registers window
+*/
+GtkWidget* dbgbkpts_create_window(void)
+{
+	GtkWidget *dbox;
+    GtkWidget *data;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_bkpts-2.glade"), "dbgbkpts_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgbkpts_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+	
+	data = glade_xml_get_widget(xml, "treeview1");
+    store = clist_create(data);
+	clist_populate(store);
+
+	gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
+
+	return wnd = dbox;
+}
+
+GtkWidget* dbgbkpts_display_window(void)
+{
+#ifdef WND_STATE
+	if(!options3.bkpts.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(wnd), options3.bkpts.rect.w, options3.bkpts.rect.h);
+		gtk_window_move(GTK_WINDOW(wnd), options3.bkpts.rect.x, options3.bkpts.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(wnd));
+#endif
+
+	if(!GTK_WIDGET_VISIBLE(dbgw.bkpts) && !options3.bkpts.closed)
+		gtk_widget_show(wnd);
+
+	return wnd;
+}
+
+void dbgbkpts_refresh_window(void)
+{
+	WND_TMR_START();
+
+	if(!options3.bkpts.closed)
+	{
+		gtk_list_store_clear(store);
+		clist_populate(store);
+
+		display_dbgcause_dbox2(glade_get("statusbar1"));
+	}
+
+	WND_TMR_STOP("Breakpoints Refresh Time");
+}
+
+void dbgbkpts_erase_context(void)
+{
+	display_dbgcause_dbox2(glade_get("statusbar1"));
+}
+
+static GtkWidget* display_dbgbkpts_popup_menu(void)
+{
+	GladeXML *xml;
+	GtkWidget *data;
+  
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("dbg_bkpts-2.glade"), "dbgbkpts_popup",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("dbg_bkpts-2.glade: GUI loading failed !\n"));
+	glade_xml_signal_autoconnect(xml);
+
+	data = glade_xml_get_widget(xml, "dbgbkpts_popup");
+
+	return data;
+}
+
+/* Add bkpt */
+GLADE_CB void
+dbgbkpts_button1_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkWidget *menu;
+	guint butt = 0;
+	guint32 time;
+
+	time = gtk_get_current_event_time();
+	menu = display_dbgbkpts_popup_menu();
+	gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, butt, time);
+	gtk_widget_show(menu);
+}
+
+/* Remove bkpt */
+GLADE_CB void
+dbgbkpts_button2_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    GtkWidget *list = GTK_WIDGET(button);   // arg are swapped, why ?
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+	
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	for (l = gtk_tree_selection_get_selected_rows(selection, &model);
+	     l != NULL; l = l->next) 
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+        gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+        uint32_t n, type, min, max, mode;
+			
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, 
+            COL_SYMBOL, &row_text[COL_SYMBOL], 
+            COL_TYPE, &row_text[COL_TYPE], 
+            COL_START, &row_text[COL_START], 
+            COL_END, &row_text[COL_END],
+            COL_MODE, &row_text[COL_MODE],
+            -1);
+		
+        type = ti68k_string_to_bkpt_type(row_text[COL_TYPE]);
+        switch(type)
+        {
+        case BK_TYPE_CODE:
+            sscanf(row_text[COL_START], "%x", &min);
+            ti68k_bkpt_del_address(min);
+			dbgcode_refresh_window();
+            break;
+        case BK_TYPE_EXCEPTION:
+            sscanf(row_text[COL_SYMBOL], "#%i", &n);
+            ti68k_bkpt_del_exception(n);
+            break;
+        case BK_TYPE_ACCESS:
+            mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            ti68k_bkpt_del_access(min, mode);
+            break;
+        case BK_TYPE_RANGE:
+            mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            sscanf(row_text[COL_END], "%x", &max);
+            ti68k_bkpt_del_range(min, max, mode);
+            break;
+		case BK_TYPE_PGMENTRY:
+			sscanf(row_text[COL_SYMBOL], "#%04x", &n);
+			ti68k_bkpt_del_pgmentry((uint16_t)n);
+			break;
+		case BK_TYPE_BIT:
+			mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            ti68k_bkpt_del_bits(min);
+        }
+        g_strfreev(row_text);
+    }
+
+	// free selection
+	g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+	g_list_free (l);
+
+    dbgbkpts_refresh_window();
+}
+
+
+/* Disable bkpt */
+GLADE_CB void
+dbgbkpts_button3_clicked                     (GtkButton       *button,
+                                              GtkWidget       *widget,
+                                              gpointer         user_data)
+{
+	GtkWidget *list = GTK_WIDGET(button);   // arg are swapped, why ?
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+	
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	for (l = gtk_tree_selection_get_selected_rows(selection, &model);
+	     l != NULL; l = l->next) 
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+        gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+        uint32_t n, type, min, max, mode;
+			
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, 
+            COL_SYMBOL, &row_text[COL_SYMBOL], 
+            COL_TYPE, &row_text[COL_TYPE], 
+            COL_START, &row_text[COL_START], 
+            COL_END, &row_text[COL_END],
+            COL_MODE, &row_text[COL_MODE],
+            -1);
+		
+        type = ti68k_string_to_bkpt_type(row_text[COL_TYPE]);
+        switch(type)
+        {
+        case BK_TYPE_CODE:
+            sscanf(row_text[COL_START], "%x", &min);
+            {
+              uint32_t addr = BKPT_ADDR(min);
+              ti68k_bkpt_set_address(addr, BKPT_DISABLE(min));
+            }
+            break;
+        case BK_TYPE_EXCEPTION:
+            sscanf(row_text[COL_SYMBOL], "#%i", &n);
+            {
+              uint32_t addr = BKPT_ADDR(n);
+              ti68k_bkpt_set_exception(addr, BKPT_DISABLE(n));
+            }
+            break;
+        case BK_TYPE_ACCESS:
+            mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            {
+              uint32_t addr = BKPT_ADDR(min);
+              ti68k_bkpt_set_access(addr, mode, BKPT_DISABLE(min));
+            }
+            break;
+        case BK_TYPE_RANGE:
+            mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            sscanf(row_text[COL_END], "%x", &max);
+            {
+              uint32_t addr1 = BKPT_ADDR(min);
+              uint32_t addr2 = BKPT_ADDR(max);
+              ti68k_bkpt_set_range(addr1, addr2, mode,
+                                   BKPT_DISABLE(min), BKPT_DISABLE(max));
+            }
+            break;
+        case BK_TYPE_PGMENTRY:
+            //sscanf(row_text[COL_SYMBOL], "#%04x", &n);
+            //{
+            //  uint32_t addr = BKPT_ADDR(n);
+            //  ti68k_bkpt_set_pgmentry(addr, BKPT_DISABLE(n));
+            //}
+            break;
+		case BK_TYPE_BIT:
+			mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            {
+              uint32_t addr = BKPT_ADDR(min);
+              ti68k_bkpt_set_bits(addr, BKPT_DISABLE(addr));
+            }
+			break;
+
+        }
+        g_strfreev(row_text);
+    }
+
+	// free selection
+	g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+	g_list_free (l);
+
+    dbgbkpts_refresh_window();
+}
+
+
+/* Enable bkpt */
+GLADE_CB void
+dbgbkpts_button4_clicked                     (GtkButton       *button,
+                                              gpointer         user_data)
+{
+	GtkWidget *list = GTK_WIDGET(button);   // arg are swapped, why ?
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+	
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	for (l = gtk_tree_selection_get_selected_rows(selection, &model);
+	     l != NULL; l = l->next) 
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+        gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+        uint32_t n, type, min, max, mode;
+			
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, 
+            COL_SYMBOL, &row_text[COL_SYMBOL], 
+            COL_TYPE, &row_text[COL_TYPE], 
+            COL_START, &row_text[COL_START], 
+            COL_END, &row_text[COL_END],
+            COL_MODE, &row_text[COL_MODE],
+            -1);
+		
+        type = ti68k_string_to_bkpt_type(row_text[COL_TYPE]);
+        switch(type)
+        {
+        case BK_TYPE_CODE:
+            sscanf(row_text[COL_START], "%x", &min);
+            {
+              uint32_t addr = BKPT_ADDR(min);
+              ti68k_bkpt_set_address(addr, BKPT_ENABLE(min));
+            }
+            break;
+        case BK_TYPE_EXCEPTION:
+            sscanf(row_text[COL_SYMBOL], "#%i", &n);
+            {
+              uint32_t addr = BKPT_ADDR(n);
+              ti68k_bkpt_set_exception(addr, BKPT_ENABLE(n));
+            }
+            break;
+        case BK_TYPE_ACCESS:
+            mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            {
+              uint32_t addr = BKPT_ADDR(min);
+              ti68k_bkpt_set_access(addr, mode, BKPT_ENABLE(min));
+            }
+            break;
+        case BK_TYPE_RANGE:
+            mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            sscanf(row_text[COL_END], "%x", &max);
+            {
+              uint32_t addr1 = BKPT_ADDR(min);
+              uint32_t addr2 = BKPT_ADDR(max);
+              ti68k_bkpt_set_range(addr1, addr2, mode,
+                                   BKPT_ENABLE(min), BKPT_ENABLE(max));
+            }
+            break;
+        case BK_TYPE_PGMENTRY:
+            //sscanf(row_text[COL_SYMBOL], "#%04x", &n);
+            //{
+            //  uint32_t addr = BKPT_ADDR(n);
+            //  ti68k_bkpt_set_pgmentry(addr, BKPT_ENABLE(n));
+            //}
+            break;
+		case BK_TYPE_BIT:
+			mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &min);
+            {
+              uint32_t addr = BKPT_ADDR(min);
+              ti68k_bkpt_set_bits(addr, BKPT_ENABLE(addr));
+            }
+			break;
+        }
+        g_strfreev(row_text);
+    }
+
+	// free selection
+	g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+	g_list_free (l);
+
+    dbgbkpts_refresh_window();
+}
+
+
+/* Go to bkpt address */
+GLADE_CB void
+dbgbkpts_button5_clicked                     (GtkButton       *button,
+                                              gpointer         user_data)
+{
+	GtkWidget *list = GTK_WIDGET(button);   // arg are swapped, why ?
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+	
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	l = gtk_tree_selection_get_selected_rows(selection, &model);
+	if(l != NULL)
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+        gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+        uint32_t type, min, n, addr;
+			
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, 
+            COL_SYMBOL, &row_text[COL_SYMBOL], 
+            COL_TYPE, &row_text[COL_TYPE], 
+            COL_START, &row_text[COL_START], 
+            COL_END, &row_text[COL_END],
+            COL_MODE, &row_text[COL_MODE],
+            -1);
+		
+		type = ti68k_string_to_bkpt_type(row_text[COL_TYPE]);
+		switch(type)
+        {
+        case BK_TYPE_CODE:
+            sscanf(row_text[COL_START], "%x", &min);
+			addr = BKPT_ADDR(min);
+          	dbgcode_disasm_at(addr);
+            break;
+        case BK_TYPE_EXCEPTION:
+            sscanf(row_text[COL_SYMBOL], "#%i", &n);
+			dbgcode_disasm_at(mem_rd_long(4*n));
+            break;
+        case BK_TYPE_ACCESS:
+		case BK_TYPE_RANGE:
+		case BK_TYPE_BIT:
+            sscanf(row_text[COL_START], "%x", &min);
+            addr = BKPT_ADDR(min);
+            dbgmem_add_tab(addr);
+            break;
+        case BK_TYPE_PGMENTRY:
+			{
+				gpointer data;
+				uint16_t handle, offset;
+
+				gtk_tree_model_get(model, &iter, COL_DATA, &data, -1);
+
+				handle = GPOINTER_TO_INT(data) >> 16;
+				offset = GPOINTER_TO_INT(data) & 0xffff;
+				addr = heap_deref(handle) + offset;
+
+				dbgcode_disasm_at(addr);
+			}
+            break;
+        }
+        g_strfreev(row_text);
+    }
+
+	// free selection
+	g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+	g_list_free (l);
+}
+
+GLADE_CB gboolean
+on_treeview2_button_press_event        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+    GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkTreePath *path;
+	GtkTreeViewColumn *column;
+    GtkTreeIter iter;
+    gboolean ret;
+
+    if (event->type != GDK_2BUTTON_PRESS)	// double-click ?
+		return FALSE;
+	else
+	{
+		// retrieve selection
+		gint tx = (gint) event->x;
+	    gint ty = (gint) event->y;
+	    gint cx, cy;
+		gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+		uint32_t type;
+		gpointer data;
+		
+        ret = gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, &cy);
+        if(ret == FALSE)
+            return FALSE;
+
+		if (!gtk_tree_model_get_iter(model, &iter, path))
+		    return FALSE;
+        gtk_tree_path_free(path);
+
+        gtk_tree_model_get(model, &iter, 
+            COL_SYMBOL, &row_text[COL_SYMBOL], 
+            COL_TYPE, &row_text[COL_TYPE], 
+            COL_START, &row_text[COL_START], 
+            COL_END, &row_text[COL_END],
+            COL_MODE, &row_text[COL_MODE],
+			COL_DATA, &data,
+            -1);
+		
+        type = ti68k_string_to_bkpt_type(row_text[COL_TYPE]);
+		if(type == BK_TYPE_CODE)
+		{
+			uint32_t old_addr, new_addr;
+
+			sscanf(row_text[COL_START], "%x", &old_addr);
+			new_addr = old_addr;
+
+			if(display_dbgmem_address(&new_addr) == -1)
+				return TRUE;
+
+			ti68k_bkpt_set_address(old_addr, new_addr);			
+			dbgbkpts_refresh_window();
+			dbgcode_refresh_window();
+		}
+		if((type == BK_TYPE_ACCESS) || (type == BK_TYPE_RANGE))
+		{
+			uint32_t old_min, old_max;
+			uint32_t new_min, new_max;
+			uint32_t new_type;
+			uint32_t old_mode, new_mode;
+
+            old_mode = ti68k_string_to_bkpt_mode(row_text[COL_MODE]);
+            sscanf(row_text[COL_START], "%x", &old_min);
+            sscanf(row_text[COL_END], "%x", &old_max);
+
+            new_type = type; new_mode = old_mode; new_min = old_min; new_max = old_max;
+			if(dbgdata_display_dbox(&new_mode, &new_type, &new_min, &new_max) == -1)
+				return TRUE;
+
+			if(type != new_type)
+				return TRUE;
+
+			if(new_type == BK_TYPE_ACCESS)
+			{
+				ti68k_bkpt_del_access(old_min, old_mode);
+				ti68k_bkpt_add_access(new_min, new_mode);
+				//ti68k_bkpt_set_access(old_min, mode, new_min);
+			}
+			else if(new_type == BK_TYPE_RANGE)
+			{
+				ti68k_bkpt_del_range(old_min, old_max, old_mode);
+				ti68k_bkpt_add_range(new_min, new_max, new_mode);
+				//ti68k_bkpt_set_range(old_min, old_max, mode, new_min, new_max);
+			}
+			dbgbkpts_refresh_window();
+		}
+		if(type == BK_TYPE_BIT)
+		{
+			uint32_t old_addr;
+			ADDR_BIT *s = (ADDR_BIT *)data;
+
+			sscanf(row_text[COL_START], "%x", &old_addr);
+
+			if(dbgbits_display_dbox(&s->addr, &s->checks, &s->states) == -1)
+				return TRUE;
+
+			dbgbkpts_refresh_window();
+		}
+
+		g_strfreev(row_text);
+                
+		return TRUE;
+    }
+
+    return FALSE;
+}
+
+GLADE_CB void
+dbgbkpts_bit_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	uint32_t addr = 0;
+	uint8_t checks = 0, states = 0xff;
+
+	if(dbgbits_display_dbox(&addr, &checks, &states) != 0)
+		return;
+
+	ti68k_bkpt_add_bits(addr, checks, states);
+
+	dbgbkpts_refresh_window();
+}
+
+GLADE_CB void
+dbgbkpts_data_activate                    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	uint32_t mode, type=-1, min, max;
+
+	// fill infos
+	if(dbgdata_display_dbox(&mode, &type, &min, &max) != 0)
+		return;
+
+	// add breakpoint
+	if(type == BK_TYPE_ACCESS)
+		ti68k_bkpt_add_access(min, mode) ;
+	else if(type == BK_TYPE_RANGE)
+		ti68k_bkpt_add_range(min, max, mode);
+
+	// and refresh
+	dbgbkpts_refresh_window();
+}
+
+
+GLADE_CB void
+dbgbkpts_vector_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	dbgvectors_display_dbox();
+}
+
+GLADE_CB void
+dbgbkpts_prgmentry1_activate           (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	dbgentry_display_dbox();
+}
+
+
diff --git a/src/gui/debugger/dbg_bkpts.h b/src/gui/debugger/dbg_bkpts.h
new file mode 100644
index 0000000..86a0be2
--- /dev/null
+++ b/src/gui/debugger/dbg_bkpts.h
@@ -0,0 +1,40 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_bkpts.h 2713 2007-12-14 21:03:03Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+GtkWidget* dbgbkpts_create_window(void);
+GtkWidget* dbgbkpts_display_window(void);
+void dbgbkpts_refresh_window(void);
+void dbgbkpts_erase_context(void);
+
+typedef struct 
+{
+	gint mode;
+	gint type;
+	gint min;
+	gint max;
+} DBG_DATA_INIT;
diff --git a/src/gui/debugger/dbg_cause.c b/src/gui/debugger/dbg_cause.c
new file mode 100644
index 0000000..0d6904e
--- /dev/null
+++ b/src/gui/debugger/dbg_cause.c
@@ -0,0 +1,343 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_cause.c 2713 2007-12-14 21:03:03Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "ti68k_int.h"
+#include "dbg_code.h"
+
+gint dbgcause1_display_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *label;
+	gint result;
+	gchar *str;
+	gint type, id, mode;
+	uint32_t value, min, max;
+
+    // get context
+	ti68k_bkpt_get_cause(&type, &mode, &id);
+    if(!type && !mode)
+        return 0;
+	
+    // load GUI
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_cause-2.glade"), "dbgcause1_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgcause1_dbox");
+
+	// set PC
+	label = glade_xml_get_widget(xml, "label21");
+	ti68k_register_get_pc(&value);
+	str = g_strdup_printf("0x%06x", value);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+	// set type
+	label = glade_xml_get_widget(xml, "label22");
+	str = g_strdup_printf("%s", ti68k_bkpt_type_to_string(type));
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+	// set mode
+	label = glade_xml_get_widget(xml, "label23");
+	str = g_strdup_printf("%s", ti68k_bkpt_mode_to_string(type, mode));
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+	// set id
+	label = glade_xml_get_widget(xml, "label24");
+	str = g_strdup_printf("%i", id);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+	// set target
+	label = glade_xml_get_widget(xml, "label25");
+	switch(type)
+	{
+	case BK_TYPE_ACCESS:
+		ti68k_bkpt_get_access(id, &min, mode);
+		str = g_strdup_printf("0x%06x", min);
+		break;
+	case BK_TYPE_RANGE:
+		ti68k_bkpt_get_range(id, &min, &max, mode);
+		str = g_strdup_printf("0x%06x-0x%06x", min, max);
+		break;
+	default:
+		str = g_strdup("n/a");
+		break;
+	}
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) {
+	case GTK_RESPONSE_OK:
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
+
+gint dbgcause2_display_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *label;
+	gint result;
+	gchar *str;
+	gint type, id, mode;
+	uint32_t sp;
+	uint32_t pc;
+	uint32_t sr;
+
+    // get context
+	ti68k_bkpt_get_cause(&type, &mode, &id);
+    if(!type && !mode && !id)
+        return 0;
+	
+    // load GUI
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_cause-2.glade"), "dbgcause2_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgcause2_dbox");
+
+	// set exception type
+	label = glade_xml_get_widget(xml, "label41");
+	gtk_label_set_text(GTK_LABEL(label), ti68k_exception_to_string(mode));
+
+	// set id
+	label = glade_xml_get_widget(xml, "label42");
+	str = g_strdup_printf("%i", id);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+	// set pushed PC
+	ti68k_register_get_sp(&sp);
+	sr = mem_rd_long(sp);
+	str = g_strdup_printf("%04x", sr);
+	label = glade_xml_get_widget(xml, "label43");
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+	// set pushed SR
+	ti68k_register_get_sp(&sp);
+	pc = mem_rd_long(sp+2);
+	str = g_strdup_printf("%06x", pc);
+	label = glade_xml_get_widget(xml, "label44");
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) {
+	case GTK_RESPONSE_OK:
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
+
+gint display_dbgcause_dbox()
+{
+	gint type, id, mode;
+
+    // get context
+	ti68k_bkpt_get_cause(&type, &mode, &id);
+    if(!type && !mode && !id)
+        return 0;
+
+	// exception or code/mem ?
+	if(type == BK_TYPE_EXCEPTION)
+		dbgcause2_display_dbox();
+	else
+		dbgcause1_display_dbox();
+
+	return 0;
+}
+
+gint display_dbgcause_dbox2(GtkWidget *sb)
+{
+	gint type, id, mode;
+	guint sb_id;
+	gchar *str = NULL;
+
+    // get context
+	ti68k_bkpt_get_cause(&type, &mode, &id);
+    if(!type && !mode && !id)
+	{
+		str = g_strdup("");
+		sb_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(sb), str);
+		gtk_statusbar_push(GTK_STATUSBAR(sb), sb_id, str);
+		g_free(str);
+
+        return 0;
+	}
+
+	// user break
+	if(!type && !mode)
+	{
+		uint32_t value;
+
+		ti68k_register_get_pc(&value);
+		str = g_strdup_printf("User break (PC=$%06x)", value);
+	}
+
+	// exception or code/mem ?
+	else if(type == BK_TYPE_EXCEPTION)
+	{
+		// exception
+		uint32_t sp;
+		uint32_t pc;
+		uint32_t sr;
+
+		ti68k_register_get_sp(&sp);
+		sr = mem_rd_long(sp);
+
+		ti68k_register_get_sp(&sp);
+		pc = mem_rd_long(sp+2);
+
+		str = g_strdup_printf("type=<%s>, id=#%i, SR=%04x, PC=%06x", 
+			ti68k_exception_to_string(mode), id, sr, pc);
+	}
+	else if(type == BK_TYPE_CODE)
+	{
+		// code
+		uint32_t value;
+
+		ti68k_register_get_pc(&value);
+		str = g_strdup_printf("type=<%s>, id=#%i, PC=$%06x", 
+			ti68k_bkpt_type_to_string(type), id, value);
+	}
+	else if((type == BK_TYPE_ACCESS) || (type ==BK_TYPE_RANGE))
+	{
+		// mem access or range
+		uint32_t value, min, max;
+		gchar *str1, *str2;
+
+		value = ti68k_debug_get_old_pc();
+		str1 = g_strdup_printf("type=<%s>, id=#%i, mode=<%s>, PC=$%06x", 
+			ti68k_bkpt_type_to_string(type), id, 
+			ti68k_bkpt_mode_to_string(type, mode), value);
+	
+		switch(type)
+		{
+
+		case BK_TYPE_ACCESS:
+			ti68k_bkpt_get_access(id, &min, mode);
+			str2 = g_strdup_printf("mem=$%06x", min);
+			break;
+		case BK_TYPE_RANGE:
+			ti68k_bkpt_get_range(id, &min, &max, mode);
+			str2 = g_strdup_printf("mem=$%06x-$%06x", min, max);
+			break;
+		default:
+			str2 = g_strdup("n/a");
+			break;
+		}
+
+		str = g_strconcat(str1, ", ", str2, NULL);
+		g_free(str1);
+		g_free(str2);
+	}
+	else if(type == BK_TYPE_PROTECT)
+	{
+		uint32_t value;
+
+		ti68k_register_get_pc(&value);
+
+		switch(bkpts.id)
+		{
+		case 1:
+			str = g_strdup_printf("hw protection violation: FLASH execution at $%06x. Execution allowed until $%06x.", value, 0x390000+tihw.archive_limit*0x10000);
+			break;
+		case 2:
+			str = g_strdup_printf("hw protection violation: RAM execution at $%06x.", value);
+			break;
+		case 3:
+			str = g_strdup_printf("hw protection violation: FLASH execution at $%06x. Execution allowed until $%06x.", value, tihw.rom_base + 0x10000 + tihw.io2[0x13]*0x10000);
+			break;
+		default: 
+			str = g_strdup("bug !"); 
+			break;
+		}
+	}
+	else if(type == BK_TYPE_PGMENTRY)
+	{
+		uint16_t handle;
+		uint32_t pc;
+
+		ti68k_register_get_pc(&pc);		
+		ti68k_bkpt_get_pgmentry(id, &handle);
+
+		str = g_strdup_printf("type=<%s>, id=#%i, handle=$%04x, PC=$%06x", 
+			ti68k_bkpt_type_to_string(type), id, handle, pc);
+	}
+	else if(type == BK_TYPE_BIT)
+	{
+		uint32_t value, addr;
+		uint8_t checks, states;
+
+		value = ti68k_debug_get_old_pc();
+		ti68k_bkpt_get_bits(id, &addr, &checks, &states);
+		str = g_strdup_printf("type=<%s>, id=#%i, PC=$%06x, ($%06x)=#$%02x", 
+			ti68k_bkpt_type_to_string(type), id, value, addr, mem_rd_byte(addr));
+	}
+	else
+	{
+		str = g_strdup("bug !");
+	}
+
+	sb_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(sb), str);
+	gtk_statusbar_push(GTK_STATUSBAR(sb), sb_id, str);
+	g_free(str);
+
+	return 0;
+}
diff --git a/src/gui/debugger/dbg_cause.h b/src/gui/debugger/dbg_cause.h
new file mode 100644
index 0000000..5bfc03b
--- /dev/null
+++ b/src/gui/debugger/dbg_cause.h
@@ -0,0 +1,31 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_cause.h 2713 2007-12-14 21:03:03Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+gint display_dbgcause_dbox(void);
+gint display_dbgcause_dbox2(GtkWidget *sb);
+gint erase_dbgcause_dbox2(GtkWidget *sb);
diff --git a/src/gui/debugger/dbg_code.c b/src/gui/debugger/dbg_code.c
new file mode 100644
index 0000000..c44b258
--- /dev/null
+++ b/src/gui/debugger/dbg_code.c
@@ -0,0 +1,1263 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_code.c 2825 2009-05-06 19:48:47Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2008, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk/gdkkeysyms.h>
+#include <string.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+#include "dbg_all.h"
+#include "dbg_romcall.h"
+#include "engine.h"
+#include "logger/log_link.h"
+#include "popup.h"
+
+gint reset_disabled = FALSE;
+
+//#define FIXED_SIZE
+//#define RUN_DBG_OPEN
+
+enum { 
+	    COL_ICON, COL_ADDR, COL_OPCODE, COL_OPERAND,
+        COL_HEXADDR, COL_FONT,
+};
+#define CLIST_NVCOLS	(4)		// 4 visible columns
+#define CLIST_NCOLS		(6)		// 7 real columns
+
+#ifdef FIXED_SIZE
+#define NLINES      10
+#else
+static gint NLINES = 10;
+#endif
+
+GladeXML *xml = NULL;
+
+static GtkListStore* clist_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkListStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+    const gchar *text[CLIST_NVCOLS] = { "  ", _("Address"), _("Opcode"), _("Operand") };
+    gint i;
+	
+	store = gtk_list_store_new(CLIST_NCOLS,
+				GDK_TYPE_PIXBUF, 
+                G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+                G_TYPE_INT, G_TYPE_STRING,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+  
+  	renderer = gtk_cell_renderer_pixbuf_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[COL_ICON], renderer, 
+            "pixbuf", COL_ICON,
+			NULL);
+  
+	for(i = COL_ADDR; i <= COL_OPERAND; i++)
+	{
+		renderer = gtk_cell_renderer_text_new();
+		set_renderer_pad(renderer);
+		gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i,
+			"font", COL_FONT,
+			NULL);
+	}
+    
+    for (i = 0; i < CLIST_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+#if 0
+		gtk_tree_view_column_set_resizable(col, FALSE);
+		gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED);
+		gtk_tree_view_column_set_fixed_width(col, 100);
+		gtk_tree_view_set_fixed_height_mode(view, TRUE);		
+#endif
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+
+	return store;
+}
+
+static void clist_populate(GtkListStore *store, uint32_t addr)
+{
+    GtkTreeIter iter;
+    GdkPixbuf *pix;
+    gint i;
+    uint32_t pc = ti68k_debug_get_pc();
+
+	/* We can't start disassembling stuff before GDB is even loaded, and in the
+	   cases where we have GDB running, but not the debugger, it's just a waste
+	   of time. */
+	if (!dbg_on) return;
+
+    for(i = 0; i < NLINES; i++)
+    {
+        gchar *output;
+        int offset;
+		gchar** split;
+        gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+        uint32_t value;
+        
+        // disassemble at 'addr' address into 'output' and returns offset to the
+        // next instruction address
+        offset = ti68k_debug_disassemble(addr, &output);
+
+        split = g_strsplit(output, " ", 3);
+		g_free(output);
+
+		row_text[0] = g_strdup(split[0]);
+		sscanf(row_text[0], "%x", &value);
+        if(split[1] == NULL)
+            row_text[1] = g_strdup("");
+		else
+			row_text[1] = g_strdup(split[1]);
+		if(split[2] == NULL)
+            row_text[2] = g_strdup("");
+		else
+			row_text[2] = g_strdup(split[2]);
+
+		if((g_list_find(bkpts.code, GINT_TO_POINTER(addr)) != NULL) && (addr != pc) ||
+			(g_list_find(bkpts.code, GINT_TO_POINTER(addr | BKPT_TMP_MASK)) != NULL) && (addr != pc))
+            pix = create_pixbuf("bkpt.xpm");
+		else if((g_list_find(bkpts.code, GINT_TO_POINTER(addr)) != NULL) && (addr == pc) ||
+			(g_list_find(bkpts.code, GINT_TO_POINTER(addr | BKPT_TMP_MASK)) != NULL) && (addr == pc))
+			pix = create_pixbuf("run_2.xpm");
+		else if(addr == pc)
+			pix = create_pixbuf("run_1.xpm");
+        else
+            pix = create_pixbuf("void.xpm");
+
+        gtk_list_store_append(store, &iter);
+	    gtk_list_store_set(store, &iter, 
+        COL_ICON, pix,
+	    COL_ADDR, row_text[0], 
+		COL_OPCODE, row_text[1],
+        COL_OPERAND, row_text[2],
+        COL_HEXADDR, value,
+		-1);
+
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+
+        addr += offset;
+        g_strfreev(split);
+		g_strfreev(row_text);
+		g_object_unref(pix);
+    }
+}
+
+static void cyccnt_refresh(GtkWidget *l1, GtkWidget *l2)
+{
+	unsigned int count, diff;
+	gchar *str1, *str2;
+
+	count = ti68k_get_cycle_count(0, &diff);
+	str1 = g_strdup_printf("%u", count);
+	str2 = g_strdup_printf("%2u", diff);
+
+	gtk_label_set_text(GTK_LABEL(l1), str1);
+	gtk_label_set_text(GTK_LABEL(l2), str2);
+
+	g_free(str1);
+	g_free(str2);
+}
+
+static void clist_refresh(GtkListStore *store, gboolean reload)
+{
+    GtkTreeModel *model = GTK_TREE_MODEL(store);
+    gboolean valid;
+    GtkTreeIter iter;
+
+    uint32_t addr;
+    uint32_t pc, old_pc;
+    int found = 0;
+
+    const int offset = 3;   // 3 instructions are still visible
+    uint32_t addr3;
+    gint i;
+
+	// Data/Bit bkpt encounter after instruction execution so take care of this
+	addr3 = pc = ti68k_debug_get_pc();
+	old_pc = ti68k_debug_get_old_pc();
+
+    // check for refresh (search for pc)
+    for(valid = gtk_tree_model_get_iter_first(model, &iter), i = 0;
+        valid; 
+        valid = gtk_tree_model_iter_next(model, &iter), i++)
+    {
+        gchar *str;
+
+        gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+        sscanf(str, "%x", &addr);
+
+        if(i == offset)
+            addr3 = addr;
+
+        if(addr == pc)
+            found = i+1;
+
+        g_free(str);
+    }
+
+	// pc not found, erase and populate
+    if(!found && reload)
+    {
+        gtk_list_store_clear(store);
+		//printf("%06x %06x %i\n", old_pc, pc, abs(old_pc - pc));
+        clist_populate(store, abs((old_pc - pc)) > 8 ? pc : old_pc);
+    }
+
+    // repopulate so that 3 instructions are still visible at the bottom of the list
+    if(found && reload)
+    {
+        if(NLINES - found < offset)
+        {
+            gtk_list_store_clear(store);
+            clist_populate(store, addr3);
+        }
+    }
+
+    // look for pc and matching bkpt
+    for(valid = gtk_tree_model_get_iter_first(model, &iter);
+        valid; 
+        valid = gtk_tree_model_iter_next(model, &iter))
+    {
+        GdkPixbuf *pix;
+        gchar *str;
+
+        gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+        sscanf(str, "%x", &addr);
+
+        if(((g_list_find(bkpts.code, GINT_TO_POINTER(addr)) != NULL) && (addr != pc) ||
+			(g_list_find(bkpts.code, GINT_TO_POINTER(addr | BKPT_TMP_MASK)) != NULL) && (addr != pc)))
+            pix = create_pixbuf("bkpt.xpm");
+		else if(((g_list_find(bkpts.code, GINT_TO_POINTER(addr)) != NULL) && (addr == pc) ||
+			(g_list_find(bkpts.code, GINT_TO_POINTER(addr | BKPT_TMP_MASK)) != NULL) && (addr == pc)))
+            pix = create_pixbuf("run_2.xpm");
+		else if(addr == pc)
+			pix = create_pixbuf("run_1.xpm");
+        else
+            pix = create_pixbuf("void.xpm");
+
+        gtk_list_store_set(store, &iter, COL_ICON, pix, -1);
+        g_free(str);
+		g_object_unref(pix);
+    }
+
+	// update cycle counter
+	cyccnt_refresh(glade_get("label3"), glade_get("label4"));
+}
+
+static GtkWidget *list;
+static GtkListStore *store;
+
+typedef struct {
+	GtkWidget *b1;
+	GtkWidget *b2;
+	GtkWidget *b3;
+	GtkWidget *b4;
+	GtkWidget *b5;
+	GtkWidget *b6;
+	GtkWidget *b7;
+} TB;
+static TB tb;
+
+typedef struct {
+    GtkWidget *m1;
+    GtkWidget *m2;
+    GtkWidget *m3;
+    GtkWidget *m4;
+    GtkWidget *m5;
+	GtkWidget *m6;
+	GtkWidget *m8;
+} MI;
+static MI mi;
+
+static void tb_set_states(int s1, int s2, int s3, int s4, int s5, int s6, int s7, int s8)
+{
+	gtk_widget_set_sensitive(tb.b1, s1);
+	gtk_widget_set_sensitive(tb.b2, s2);
+	gtk_widget_set_sensitive(tb.b3, s3);
+	gtk_widget_set_sensitive(tb.b4, s4);
+	gtk_widget_set_sensitive(tb.b5, s5);
+	gtk_widget_set_sensitive(tb.b6, s6);
+	gtk_widget_set_sensitive(tb.b7, s7);
+
+    gtk_widget_set_sensitive(mi.m1, s1);
+	gtk_widget_set_sensitive(mi.m2, s2);
+	gtk_widget_set_sensitive(mi.m3, s3);
+	gtk_widget_set_sensitive(mi.m4, s4);
+	gtk_widget_set_sensitive(mi.m5, s5);
+	gtk_widget_set_sensitive(mi.m6, s6);
+	gtk_widget_set_sensitive(mi.m8, s8);
+}
+
+/*
+	Display source code window
+*/
+
+extern int update_submenu(GtkWidget*, gpointer);	//dbg_wnds.c
+
+GtkWidget* dbgcode_create_window(void)
+{
+	GtkWidget *dbox;
+    GtkWidget *data;	
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_code-2.glade"), "dbgcode_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "dbgcode_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+	g_object_set(G_OBJECT(dbox), "allow-shrink", TRUE, NULL);
+
+	/*
+	{
+		GtkStyle *copy;
+
+		GtkStyle *style = gtk_rc_get_style(dbox);
+		printf("=>> %i\n", style->ythickness);
+
+		copy =  gtk_style_copy(style);
+		gtk_style_detach(style);
+
+		style->ythickness = 0;
+
+		gtk_widget_realize(dbox);
+		gtk_style_attach(copy, dbox);		
+	}
+	*/
+
+    data = glade_xml_get_widget(xml, "windows1_menu");
+    g_signal_connect(G_OBJECT(data), "map", G_CALLBACK(update_submenu), NULL);
+
+	tb.b1 = glade_xml_get_widget(xml, "button1");
+	tb.b2 = glade_xml_get_widget(xml, "button2");
+	tb.b3 = glade_xml_get_widget(xml, "button3");
+	tb.b4 = glade_xml_get_widget(xml, "button4");
+	tb.b5 = glade_xml_get_widget(xml, "button5");
+	tb.b6 = glade_xml_get_widget(xml, "button6");
+	tb.b7 = glade_xml_get_widget(xml, "button7");
+
+    mi.m1 = glade_xml_get_widget(xml, "run1");
+    mi.m2 = glade_xml_get_widget(xml, "step1");
+    mi.m3 = glade_xml_get_widget(xml, "step_over1");
+	mi.m4 = glade_xml_get_widget(xml, "step_out1");
+    mi.m5 = glade_xml_get_widget(xml, "run_to_cursor1");
+    mi.m6 = glade_xml_get_widget(xml, "break1");
+    mi.m8 = glade_xml_get_widget(xml, "quit1");
+
+	list = glade_xml_get_widget(xml, "treeview1");
+    store = clist_create(list);
+	clist_populate(store, ti68k_debug_get_pc());
+
+	gtk_tree_view_expand_all(GTK_TREE_VIEW(list));
+	gtk_widget_show(list);
+
+	data = glade_xml_get_widget(xml, "progressbar1");
+	gtk_widget_hide(data);
+
+	dbgromcall_create_window(xml);
+	dbgromcall_refresh_window();
+
+	return dbox;
+}
+
+GtkWidget* dbgcode_display_window(void)
+{
+#ifdef WND_STATE
+	if(!options3.code.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(dbgw.code), options3.code.rect.w, options3.code.rect.h);
+		gtk_window_move(GTK_WINDOW(dbgw.code), options3.code.rect.x, options3.code.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(dbgw.code));
+#endif
+
+	gtk_widget_set_sensitive(list, TRUE);	
+	tb_set_states(1, 1, 1, 1, 1, 0, 1, 1);
+	reset_disabled = FALSE;
+	gtk_debugger_enable();
+
+	gtk_widget_show(dbgw.code);
+
+    return dbgw.code;
+}
+
+void dbgcode_refresh_window(void)
+{
+	WND_TMR_START();
+
+	if(!options3.code.closed)
+	{
+		gtk_list_store_clear(store);
+		clist_refresh(store, TRUE);
+	}
+
+	WND_TMR_STOP("Code Refresh Time");
+}
+
+void dbgcode_disasm_at(uint32_t addr)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreePath *path;
+	//GtkTreeViewColumn *column;
+
+    gtk_list_store_clear(store);
+    clist_populate(store, addr);
+
+	//set selection
+	path = gtk_tree_path_new_from_string("0");
+    gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+	//gtk_tree_view_row_activated(view, path, column);        // show selection
+    gtk_tree_path_free(path);
+}
+
+
+GLADE_CB void
+on_run1_activate                       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+#ifdef RUN_DBG_OPEN
+	tb_set_states(0, 0, 0, 0, 0, 1, 0, 0);
+	reset_disabled = TRUE;
+    gtk_widget_set_sensitive(list, FALSE);
+    gtk_debugger_disable();
+
+	ti68k_debug_step();	// skip possible current bkpt
+    engine_start();
+#else
+	gtk_debugger_close();
+#endif
+}
+
+
+GLADE_CB void
+on_step1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	ti68k_debug_step();
+
+	clist_refresh(store, TRUE);
+    dbgregs_refresh_window();
+	dbgpclog_refresh_window();
+    dbgmem_refresh_window();
+	dbgstack_refresh_window();
+	dbgheap_refresh_window();
+}
+
+
+GLADE_CB void
+on_step_over1_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	tb_set_states(0, 0, 0, 0, 0, 1, 0, 0);
+	reset_disabled = TRUE;
+    ti68k_debug_step_over();
+	tb_set_states(1, 1, 1, 1, 1, 0, 1, 1);
+	reset_disabled = FALSE;
+
+	clist_refresh(store, TRUE);
+    dbgregs_refresh_window();
+	dbgpclog_refresh_window();
+    dbgmem_refresh_window();
+	dbgstack_refresh_window();
+	dbgheap_refresh_window();
+}
+
+GLADE_CB void
+on_step_out1_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    ti68k_debug_step_out();
+
+	clist_refresh(store, TRUE);
+    dbgregs_refresh_window();
+	dbgpclog_refresh_window();
+    dbgmem_refresh_window();
+	dbgstack_refresh_window();
+	dbgheap_refresh_window();
+}
+
+
+GLADE_CB void
+on_run_to_cursor1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    gboolean valid;
+    gchar *str;
+    uint32_t addr;
+
+    selection = gtk_tree_view_get_selection(view);
+    valid = gtk_tree_selection_get_selected(selection, NULL, &iter);
+	if(!valid) return;
+
+    // Get address to go
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &addr);
+
+	tb_set_states(0, 0, 0, 0, 0, 1, 0, 0);
+	reset_disabled = TRUE;
+    gtk_debugger_disable();
+
+    ti68k_debug_skip(addr);
+    gtk_tree_selection_unselect_iter(selection, &iter);
+
+	tb_set_states(1, 1, 1, 1, 1, 0, 1, 1);
+	reset_disabled = FALSE;
+    gtk_debugger_enable();
+    
+	clist_refresh(store, FALSE);
+    dbgregs_refresh_window();
+	dbgpclog_refresh_window();
+    dbgmem_refresh_window();
+	dbgstack_refresh_window();
+	dbgheap_refresh_window();
+}
+
+
+GLADE_CB void
+on_break1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    // Mode 1 is fastest
+#ifdef RUN_DBG_OPEN
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+
+    engine_stop();
+    gtk_widget_set_sensitive(list, TRUE);
+	tb_set_states(1, 1, 1, 1, 1, 0, 1, 1);
+	reset_disabled = FALSE;
+    gtk_debugger_enable();
+    clist_refresh(store, TRUE);
+#else
+    ti68k_debug_break();
+#endif
+}
+
+
+// Toggle breakpoint
+GLADE_CB void
+dbgcode_button6_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    gboolean valid;
+    gchar *str;
+    uint32_t addr;
+
+    selection = gtk_tree_view_get_selection(view);
+    valid = gtk_tree_selection_get_selected(selection, NULL, &iter);
+	if(!valid) return;
+
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &addr);
+
+    if(g_list_find(bkpts.code, GINT_TO_POINTER(addr)) == NULL)
+        ti68k_bkpt_add_address(addr);
+    else
+        ti68k_bkpt_del_address(addr);
+
+    clist_refresh(store, FALSE);
+    dbgbkpts_refresh_window();
+}
+
+// Toggle tmp breakpoint
+GLADE_CB void
+dbgcode_button7_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    gboolean valid;
+    gchar *str;
+    uint32_t addr;
+
+    selection = gtk_tree_view_get_selection(view);
+    valid = gtk_tree_selection_get_selected(selection, NULL, &iter);
+	if(!valid) return;
+
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &addr);
+
+    if(g_list_find(bkpts.code, GINT_TO_POINTER(addr | BKPT_TMP_MASK)) == NULL)
+        ti68k_bkpt_add_address(addr | BKPT_TMP_MASK);
+    else
+        ti68k_bkpt_del_address(addr | BKPT_TMP_MASK);
+
+    clist_refresh(store, FALSE);
+    dbgbkpts_refresh_window();
+}
+
+// Reset cycle counter
+GLADE_CB void
+dbgcode_button8_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	ti68k_get_cycle_count(!0, NULL);
+	gtk_label_set_text(GTK_LABEL(glade_get("label3")), "0");
+}
+
+GLADE_CB void
+on_save1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	on_quick_save_state_image1_activate(NULL, NULL);
+}
+
+
+GLADE_CB void
+on_revert1_activate                    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	ti68k_state_load(params.sav_file);
+	gtk_debugger_refresh();
+}
+
+/***** Popup menu *****/
+
+/*
+	Display popup menu (right click)
+*/
+static GtkWidget* display_dbgcode_popup_menu(void)
+{
+	GladeXML *xml;
+	GtkWidget *menu;
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("dbg_code-2.glade"), "dbgcode_popup",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	menu = glade_xml_get_widget(xml, "dbgcode_popup");
+	return menu;
+}
+
+GLADE_CB gboolean
+on_treeview1_button_press_event        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    switch (event->type) 
+    {
+    case GDK_BUTTON_PRESS:	// third button clicked
+	    if (event->button == 3) 
+        {
+            GdkEventButton *bevent;
+            GtkWidget *menu;
+
+		    bevent = (GdkEventButton *) (event);
+            menu = display_dbgcode_popup_menu();
+
+		    gtk_menu_popup(GTK_MENU(menu),
+				       NULL, NULL, NULL, NULL,
+				       bevent->button, bevent->time);
+	        gtk_widget_show(menu);
+
+		    return TRUE;
+	    }
+	    break;
+    default:
+        break;
+    }
+
+    return FALSE;
+}
+
+static int export_disasm_to_file(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+    GtkTreeIter iter;
+    gchar *str;
+    uint32_t addr, start;
+    gchar *output;
+    int offset;
+	int i, j;
+
+	FILE *f;
+	gchar **split;
+
+    // starting address
+    gtk_tree_model_get_iter_first(model, &iter);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &start);
+
+#ifdef __WIN32__
+	f = fopen("C:\\disasm.txt", "a+t");
+#else
+	f = fopen("/tmp/disasm.txt", "a+t");
+#endif
+	if(f == NULL)
+		return -1;
+
+	addr = start;
+	for(i = 0; i < NLINES; i++)
+	{
+		offset = ti68k_debug_disassemble(addr, &output);
+		addr += offset;
+
+		split = g_strsplit(output, " ", 3);
+		g_free(output);
+
+		fprintf(f, "%s\t%s", split[0], split[1]);
+		for(j=10-strlen(split[1]); j >= 0; j--)
+			fprintf(f, " ");
+		fprintf(f, "\t%s", split[2]);
+		for(j=16-strlen(split[2]); j >= 0; j--)
+			fprintf(f, " ");
+		fprintf(f, "\t;\n");
+		g_strfreev(split);
+	}
+
+	fclose(f);
+
+	return 0;
+}
+
+// used to implement accelerator keys
+GLADE_CB void
+on_go_to_address1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+GLADE_CB void
+on_set_tmp_bkpt1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+GLADE_CB void
+on_set_breakpoint1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB void
+on_set_pc_to_selection1_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+GLADE_CB gboolean
+on_treeview1_key_press_event           (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data)
+{
+    GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    GtkTreePath *path;
+    gboolean valid;
+    gchar *str;
+    gchar *row;
+    gint row_idx, row_max;
+    uint32_t addr, start;
+    gchar *output;
+    int offset;
+
+    // starting address
+    gtk_tree_model_get_iter_first(model, &iter);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &start);
+
+    // current address
+    selection = gtk_tree_view_get_selection(view);
+    valid = gtk_tree_selection_get_selected(selection, NULL, &iter);
+    if(valid)
+    {
+        gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+        sscanf(str, "%x", &addr);
+
+        row = gtk_tree_model_get_string_from_iter(model, &iter);
+        sscanf(row, "%i", &row_idx);
+        row_max = gtk_tree_model_iter_n_children(model, NULL) - 1;
+    }
+    else
+        row_idx = row_max = -1;
+
+    // bind our key
+	switch(event->keyval) 
+	{
+	case GDK_F1:
+		str = g_strdup_printf("%i", row_idx+1);
+        path = gtk_tree_path_new_from_string(str);	// restore selection
+		g_free(str);
+        gtk_tree_selection_select_path(selection, path);
+		on_set_pc_to_selection1_activate(NULL, user_data);
+		return FALSE;
+
+	case GDK_F2:
+		on_set_breakpoint1_activate(NULL, NULL);
+		return FALSE;
+
+	case GDK_F3:
+		on_set_tmp_bkpt1_activate(NULL, NULL);
+		return FALSE;
+	
+	case GDK_F4:
+		on_run_to_cursor1_activate(NULL, NULL);
+		return FALSE;
+
+	case GDK_F5:
+		on_run1_activate(NULL, NULL);
+		return FALSE;
+
+	case GDK_F6:
+		on_set_pc_to_selection1_activate(NULL, user_data);
+		return FALSE;
+
+	case GDK_F7:
+		on_step1_activate(NULL, NULL);
+		return FALSE;
+
+	case GDK_F8:
+		on_step_over1_activate(NULL, NULL);
+		return FALSE;
+
+	case GDK_F9:
+		on_step_out1_activate(NULL, NULL);
+		return FALSE;
+
+	case GDK_d:
+		export_disasm_to_file(widget);
+		return FALSE;
+
+	case GDK_G:
+	case GDK_g:
+		on_go_to_address1_activate(NULL, user_data);
+		return TRUE;
+
+    case GDK_Up:
+        if(row_max == -1)
+            break;
+
+        if(row_idx > 0)
+            break;
+
+        gtk_list_store_clear(store);
+        clist_populate(store, addr - 2);
+        return FALSE;
+
+    case GDK_Down:
+        if(row_max == -1)
+            break;
+
+        if(row_idx < row_max)
+            break;
+
+        offset = ti68k_debug_disassemble(start, &output);
+		g_free(output);
+
+        gtk_list_store_clear(store);
+        clist_populate(store, start + offset);
+    
+        str = g_strdup_printf("%i", row_max);
+        path = gtk_tree_path_new_from_string(str);	// restore selection
+		g_free(str);
+        gtk_tree_selection_select_path(selection, path);
+
+        return TRUE;
+
+    case GDK_Page_Up:
+        if(row_max == -1)
+            break;
+
+        if(row_idx > 0)
+            break;
+
+        gtk_list_store_clear(store);
+        clist_populate(store, addr - 0x10);
+
+		path = gtk_tree_path_new_from_string("0");
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+
+        return TRUE;
+
+    case GDK_Page_Down:
+        if(row_max == -1)
+            break;
+
+        if(row_idx < row_max)
+            break;
+
+        gtk_list_store_clear(store);
+        clist_populate(store, addr/* + 0x10*/);
+
+		str = g_strdup_printf("%i", row_max);
+        path = gtk_tree_path_new_from_string(str);	// restore selection
+		g_free(str);
+        gtk_tree_selection_select_path(selection, path);
+
+        return TRUE;
+
+	default:
+		return FALSE;
+	}
+
+	return FALSE;
+}
+
+// note: user_data data passing has been manually added to Glade file
+GLADE_CB void
+on_go_to_address1_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    uint32_t addr = 0;
+
+    if(display_dbgmem_address(&addr) == -1)
+		return;
+
+    gtk_list_store_clear(store);
+    clist_populate(store, addr);
+}
+
+
+GLADE_CB void
+on_go_to_pc1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    clist_refresh(store, TRUE);
+}
+
+
+GLADE_CB void
+on_set_breakpoint1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    dbgcode_button6_clicked(NULL, NULL);
+}
+
+
+GLADE_CB void
+on_set_tmp_bkpt1_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    dbgcode_button7_clicked(NULL, NULL);
+}
+
+
+GLADE_CB void
+on_set_pc_to_selection1_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    //GtkWidget *list = GTK_WIDGET(user_data);
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    gboolean valid;
+    gchar *str;
+    uint32_t addr;
+
+    selection = gtk_tree_view_get_selection(view);
+    valid = gtk_tree_selection_get_selected(selection, NULL, &iter);
+	if(!valid) return;
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &addr);
+
+    ti68k_register_set_pc(addr);
+    dbgcode_refresh_window();
+    dbgregs_refresh_window();
+}
+
+GLADE_CB void
+on_view_memory1_activate       (GtkMenuItem     *menuitem,
+                                gpointer         user_data)
+{
+    //GtkWidget *list = GTK_WIDGET(user_data);
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    gboolean valid;
+    gchar *str;
+    uint32_t addr;
+
+    selection = gtk_tree_view_get_selection(view);
+    valid = gtk_tree_selection_get_selected(selection, NULL, &iter);
+	if(!valid) return;
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &addr);
+    dbgmem_add_tab(addr);
+}
+
+GLADE_CB void
+on_treeview1_size_allocate             (GtkWidget       *widget,
+                                        GdkRectangle    *allocation,
+                                        gpointer         user_data)
+{
+#ifndef FIXED_SIZE
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreePath *path;
+	GdkRectangle rect;
+	static int old = 0;
+
+	path = gtk_tree_path_new_from_string("0");
+	gtk_tree_view_get_background_area(view, path, NULL, &rect);
+	gtk_tree_path_free(path);
+
+	//printf("allocation: %i %i / rect: %i %i\n", allocation->width, allocation->height, rect.width, rect.height);
+
+	if(rect.height == 0)
+		NLINES = 1;	// at least 1 line in the window
+	else
+		NLINES = allocation->height / rect.height - 2;
+	//printf("#lines: %i (%i %i)\n", NLINES, allocation->height, rect.height);
+
+	if(old != NLINES)
+	{	
+		gtk_list_store_clear(store);
+		clist_refresh(store, TRUE);
+	}
+
+	old = NLINES;
+#endif
+}
+
+void gdbcallback_disable_debugger(void)
+{
+	if (dbg_on)
+	{
+		tb_set_states(0, 0, 0, 0, 0, 1, 0, 0);
+		gtk_widget_set_sensitive(list, FALSE);
+		gtk_debugger_disable();
+		reset_disabled = TRUE;
+	}
+}
+
+void gdbcallback_enable_debugger(void)
+{
+	if (dbg_on)
+	{
+		gtk_widget_set_sensitive(list, TRUE);
+		tb_set_states(1, 1, 1, 1, 1, 0, 1, 1);
+		gtk_debugger_enable();
+		reset_disabled = FALSE;
+	}
+}
+
+void gdbcallback_refresh_debugger(void)
+{
+	if (dbg_on)
+	{
+		dbgcode_refresh_window();
+		dbgregs_refresh_window();
+		dbgpclog_refresh_window();
+		dbgmem_refresh_window();
+		dbgstack_refresh_window();
+		dbgheap_refresh_window();
+
+		// force refresh !
+		while(gtk_events_pending()) gtk_main_iteration_do(FALSE);
+	}
+}
+
+int dbgcode_quit_enabled(void)
+{
+	return GTK_WIDGET_SENSITIVE(mi.m8);
+}
+
+static int close_debugger_wrapper(gpointer data)
+{
+	gtk_debugger_close();
+	return FALSE;
+}
+
+int gdbcallback_close_debugger(void *clientdata, void *interp, int argc, const char **argv)
+{
+	if (dbg_on && dbgcode_quit_enabled()) g_idle_add(close_debugger_wrapper, NULL);
+	return 0;
+}
+
+GLADE_CB void
+on_linkport1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	display_loglink_dbox();
+}
+
+// Font change
+
+static GtkWidget *font;
+static gint tmp_type;
+static gchar *tmp_name;
+
+GLADE_CB void
+on_font_activate                       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	gpointer data;
+	gint result;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_code-2.glade"), "dbgcode_font", PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgcode_font");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+	font = glade_xml_get_widget(xml, "label5");
+
+	tmp_type = options3.dbg_font_type;
+	tmp_name = g_strdup(options3.dbg_font_name);
+
+	if(!tmp_type)
+	{
+		data = glade_xml_get_widget(xml, "radiobutton4");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		data = glade_xml_get_widget(xml, "button9");
+		gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE);
+	}
+	else
+	{
+		data = glade_xml_get_widget(xml, "radiobutton6");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		if(options3.dbg_font_name)
+			gtk_label_set_text(GTK_LABEL(font), tmp_name);
+		data = glade_xml_get_widget(xml, "button9");
+		gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
+	}
+
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		options3.dbg_font_type = tmp_type;
+		if(tmp_name)
+		{
+			g_free(options3.dbg_font_name);
+			options3.dbg_font_name = g_strdup(tmp_name);
+		}
+
+		gtk_debugger_refresh();
+
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+	return;
+}
+
+GLADE_CB void
+on_radiobutton4_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	PangoContext *context;
+	PangoFontDescription *desc;
+
+	context = gtk_widget_get_pango_context(GTK_WIDGET(button));
+	desc = pango_context_get_font_description(context);
+	gtk_label_set_text(GTK_LABEL(font), pango_font_description_to_string(desc));
+
+	gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
+	tmp_type = 0;
+}
+
+GLADE_CB void
+on_radiobutton6_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	if(tmp_name)
+		gtk_label_set_text(GTK_LABEL(font), tmp_name);
+
+	gtk_widget_set_sensitive(GTK_WIDGET(button), TRUE);
+	tmp_type = 1;
+}
+
+GLADE_CB void
+on_dbgcode_button9_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	gint result;
+	GtkWidget *dlg;
+	gchar *str;
+	
+	dlg = gtk_font_selection_dialog_new(_("Choose font..."));
+	if(tmp_name)
+		gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(dlg), tmp_name);
+	result = gtk_dialog_run(GTK_DIALOG(dlg));	
+
+	switch (result) 
+	{ 
+	case GTK_RESPONSE_OK:
+		str = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(dlg));
+		g_free(tmp_name);
+		tmp_name = g_strdup(str);
+		gtk_label_set_text(GTK_LABEL(font), str);
+		g_free(str);
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dlg);
+}
diff --git a/src/gui/debugger/dbg_code.h b/src/gui/debugger/dbg_code.h
new file mode 100644
index 0000000..e7963cb
--- /dev/null
+++ b/src/gui/debugger/dbg_code.h
@@ -0,0 +1,36 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_code.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+extern gint reset_disabled;
+
+GtkWidget* dbgcode_create_window(void);
+GtkWidget* dbgcode_display_window(void);
+void dbgcode_refresh_window(void);
+int dbgcode_quit_enabled(void);
+
+void dbgcode_disasm_at(uint32_t addr);
diff --git a/src/gui/debugger/dbg_data.c b/src/gui/debugger/dbg_data.c
new file mode 100644
index 0000000..2b32356
--- /dev/null
+++ b/src/gui/debugger/dbg_data.c
@@ -0,0 +1,225 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_data.c 2753 2007-12-30 23:14:15Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "ti68k_int.h"
+#include "support.h"
+#include "dbg_bkpts.h"
+
+static GladeXML *xml;
+
+gint dbgdata_display_dbox(gint *mode, gint *type, uint32_t *start, uint32_t *stop)
+{
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+
+	G_CONST_RETURN gchar *sc_start, *sc_stop;
+	gchar *s_start, *s_stop;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_data-2.glade"), "dbgdata_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgdata_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+
+	data = glade_xml_get_widget(xml, "radiobutton20");
+	g_signal_emit_by_name(G_OBJECT(data), "toggled");
+
+	// set type
+	if(*type == -1)
+	{
+		// skip box preset step
+	}
+	else 
+	{
+		data = glade_xml_get_widget(xml, "radiobutton10");
+		if(*mode & BK_READ)
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+
+		data = glade_xml_get_widget(xml, "radiobutton11");
+		if(*mode & BK_WRITE)
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+
+		data = glade_xml_get_widget(xml, "radiobutton12");
+		if((*mode & BK_READ) && (*mode & BK_WRITE))
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+
+		if(*type == BK_TYPE_ACCESS)
+		{
+			data = glade_xml_get_widget(xml, "radiobutton20");
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+
+			data = glade_xml_get_widget(xml, "comboboxentry1");
+			if(*mode & BK_BYTE)
+				gtk_combo_box_set_active(GTK_COMBO_BOX(data), 0);
+			else if(*mode & BK_WORD)
+				gtk_combo_box_set_active(GTK_COMBO_BOX(data), 1);
+			else if(*mode & BK_LONG)
+				gtk_combo_box_set_active(GTK_COMBO_BOX(data), 2);
+
+			data = glade_xml_get_widget(xml, "entry3");
+			s_start = g_strdup_printf("0x%06x", *start);
+			gtk_entry_set_text(GTK_ENTRY(data), s_start);
+			g_free(s_start);
+		}
+		else if(*type == BK_TYPE_RANGE)
+		{
+			data = glade_xml_get_widget(xml, "radiobutton21");
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+
+			data = glade_xml_get_widget(xml, "entry1");
+			s_start = g_strdup_printf("0x%06x", *start);
+			gtk_entry_set_text(GTK_ENTRY(data), s_start);
+			g_free(s_start);
+
+			data = glade_xml_get_widget(xml, "entry2");
+			s_stop = g_strdup_printf("0x%06x", *stop);
+			gtk_entry_set_text(GTK_ENTRY(data), s_stop);
+			g_free(s_stop);
+		}
+	}
+
+loop:
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) {
+	case GTK_RESPONSE_OK:
+		sc_start = sc_stop = "";
+
+		// Retrieve settings from fields
+		data = glade_xml_get_widget(xml, "radiobutton10");
+		if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data)))
+			*mode = BK_READ;
+		data = glade_xml_get_widget(xml, "radiobutton11");
+		if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data)))
+			*mode = BK_WRITE;
+		data = glade_xml_get_widget(xml, "radiobutton12");
+		if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data)))
+			*mode = BK_READ | BK_WRITE;
+
+		data = glade_xml_get_widget(xml, "radiobutton20");
+		if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data)))
+			*type = BK_TYPE_ACCESS;
+
+		data = glade_xml_get_widget(xml, "radiobutton21");
+		if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data)))
+			*type = BK_TYPE_RANGE;
+	
+		if(*type == BK_TYPE_ACCESS)
+		{
+			data = glade_xml_get_widget(xml, "comboboxentry1");
+			switch(gtk_combo_box_get_active(GTK_COMBO_BOX(data)))
+			{
+			case 0: *mode |= BK_BYTE; break;
+			case 1: *mode |= BK_WORD; break;
+			case 2: *mode |= BK_LONG; break;
+			}
+
+			data = glade_xml_get_widget(xml, "entry3");
+			sc_start = sc_stop = gtk_entry_get_text(GTK_ENTRY(data));
+		} 
+		else if(*type == BK_TYPE_RANGE)
+		{
+			data = glade_xml_get_widget(xml, "entry1");
+			sc_start = gtk_entry_get_text(GTK_ENTRY(data));
+
+			data = glade_xml_get_widget(xml, "entry2");
+			sc_stop = gtk_entry_get_text(GTK_ENTRY(data));			
+		}
+
+		// Convert values and check
+		result = sscanf(sc_start, "%x", start);
+		if(result < 1)
+			goto loop;
+
+		result = sscanf(sc_stop, "%x", stop);
+		if((result < 1) && (*type == 2))
+			goto loop;
+
+		if((*start > *stop) && (*type == 2))
+			goto loop;
+
+		gtk_widget_destroy(dbox);
+		return 0;
+	default:
+		gtk_widget_destroy(dbox);
+		return -1;
+	}	
+
+	return 0;
+}
+
+
+GLADE_CB void
+on_radiobutton20_toggled               (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	GtkWidget *data;
+
+	data = glade_xml_get_widget(xml, "optionmenu1");
+	gtk_widget_set_sensitive(data, TRUE);
+	data = glade_xml_get_widget(xml, "entry3");
+	gtk_widget_set_sensitive(data, TRUE);
+
+	data = glade_xml_get_widget(xml, "entry1");
+	gtk_widget_set_sensitive(data, FALSE);
+	data = glade_xml_get_widget(xml, "entry2");
+	gtk_widget_set_sensitive(data, FALSE);
+}
+
+GLADE_CB void
+on_radiobutton21_toggled               (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	GtkWidget *data;
+
+	data = glade_xml_get_widget(xml, "optionmenu1");
+	gtk_widget_set_sensitive(data, FALSE);
+	data = glade_xml_get_widget(xml, "entry3");
+	gtk_widget_set_sensitive(data, FALSE);
+
+	data = glade_xml_get_widget(xml, "entry1");
+	gtk_widget_set_sensitive(data, TRUE);
+	data = glade_xml_get_widget(xml, "entry2");
+	gtk_widget_set_sensitive(data, TRUE);
+}
+
+
+
diff --git a/src/gui/debugger/dbg_data.h b/src/gui/debugger/dbg_data.h
new file mode 100644
index 0000000..864f696
--- /dev/null
+++ b/src/gui/debugger/dbg_data.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_data.h 2601 2007-07-14 08:49:30Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint dbgdata_display_dbox(uint32_t *, uint32_t *, uint32_t *, uint32_t *);
diff --git a/src/gui/debugger/dbg_dock.c b/src/gui/debugger/dbg_dock.c
new file mode 100644
index 0000000..c64bf97
--- /dev/null
+++ b/src/gui/debugger/dbg_dock.c
@@ -0,0 +1,172 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_code.c 2680 2007-11-19 20:53:09Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+	This unit needs some explanations due to some tricks...
+
+	Up to TiEmu v3.02, it was designed with a multi-windows system.
+	Starting at v3.03, a dock has been added 
+
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk/gdkkeysyms.h>
+#include <string.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+#include "dbg_dock.h"
+
+DbgHandleBoxes dbghb = { 0 };
+
+static GtkWidget* gtk_widget_get_child_(GtkWidget* widget)
+{
+	GtkWidget *child = gtk_bin_get_child(GTK_BIN(widget));
+	return child;
+}
+
+static void gtk_widget_reparent_(GtkWidget* dst, GtkWidget* src)
+{
+	GtkWidget *child = gtk_widget_get_child_(src);
+
+#if 1
+	gtk_widget_reparent(child, dst);
+#else
+	gtk_widget_ref(child);
+    gtk_container_remove(GTK_CONTAINER(src), child);
+    gtk_container_add(GTK_CONTAINER(dst), child);
+    gtk_widget_unref(child);
+#endif
+}
+
+GtkWidget* dbgdock_create_window(void)
+{
+	GladeXML  *xml;
+	GtkWidget *dbox;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_dock-2.glade"), "dbgdock_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "dbgdock_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+	dbghb.stack = glade_xml_get_widget(xml, "frame1");
+	dbghb.regs  = glade_xml_get_widget(xml, "frame2");
+	dbghb.bkpts = glade_xml_get_widget(xml, "frame3");
+	dbghb.code  = glade_xml_get_widget(xml, "frame4");
+	dbghb.mem   = glade_xml_get_widget(xml, "frame5");
+	dbghb.heap  = glade_xml_get_widget(xml, "frame6");
+
+	// re-attach window childs to dock and destroy parent window
+	gtk_widget_reparent_(dbghb.stack, dbgw.stack);
+	gtk_widget_reparent_(dbghb.regs,  dbgw.regs);
+	gtk_widget_reparent_(dbghb.bkpts, dbgw.bkpts);
+	gtk_widget_reparent_(dbghb.code,  dbgw.code);
+	gtk_widget_reparent_(dbghb.mem,   dbgw.mem);
+	gtk_widget_reparent_(dbghb.heap,  dbgw.heap);
+
+	// set them as 'open'
+	options3.stack.closed = 0;
+	options3.regs.closed = 0;
+	options3.bkpts.closed = 0;
+	options3.code.closed = 0;
+	options3.mem.closed = 0;
+	options3.heap.closed = 0;
+
+	gtk_widget_destroy(dbgw.stack);
+	dbgw.stack = NULL;
+	gtk_widget_destroy(dbgw.regs);
+	dbgw.regs = NULL;
+	gtk_widget_destroy(dbgw.bkpts);
+	dbgw.bkpts = NULL;
+	gtk_widget_destroy(dbgw.mem);
+	dbgw.mem = NULL;
+	gtk_widget_destroy(dbgw.heap);
+	dbgw.heap = NULL;
+#if 0	// has to be fixed...
+	gtk_widget_destroy(dbgw.code);
+	dbgw.code = NULL;
+#endif
+
+	return dbox;
+}
+
+GtkWidget* dbgdock_display_window(void)
+{
+	gtk_widget_show(dbgw.dock);
+    return dbgw.dock;
+}
+
+void dbgdock_refresh_window(void)
+{
+	return;
+}
+
+void dbgdock_set_sensitivity(int state)
+{
+    gtk_widget_set_sensitive(dbghb.regs, state);
+    gtk_widget_set_sensitive(dbghb.bkpts, state);
+    gtk_widget_set_sensitive(dbghb.mem, state);
+    gtk_widget_set_sensitive(dbghb.stack, state);
+    gtk_widget_set_sensitive(dbghb.heap, state);
+}
+
+void dbgdock_show_all(int all)
+{
+	if(!GTK_WIDGET_VISIBLE(dbgw.dock) && all)
+        gtk_widget_show(dbgw.dock);
+
+	if(GTK_WIDGET_VISIBLE(dbgw.iop))
+        gtk_window_iconify(GTK_WINDOW(dbgw.iop));
+	if(GTK_WIDGET_VISIBLE(dbgw.pclog))
+        gtk_window_iconify(GTK_WINDOW(dbgw.pclog));
+}
+
+void dbgdock_hide_all(int all)
+{
+	if(GTK_WIDGET_VISIBLE(dbgw.dock) && all)
+        gtk_widget_hide(dbgw.dock);
+
+    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
+        gtk_widget_hide(dbgw.pclog);
+	if(GTK_WIDGET_VISIBLE(dbgw.iop))
+        gtk_widget_hide(dbgw.iop);
+}
diff --git a/src/gui/debugger/dbg_dock.h b/src/gui/debugger/dbg_dock.h
new file mode 100644
index 0000000..b02e62c
--- /dev/null
+++ b/src/gui/debugger/dbg_dock.h
@@ -0,0 +1,46 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_code.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+typedef struct {
+	GtkWidget *mem;
+	GtkWidget *regs;
+	GtkWidget *bkpts;
+	GtkWidget *code;
+	GtkWidget *pclog;
+	GtkWidget *stack;
+	GtkWidget *heap;
+} DbgHandleBoxes;
+extern DbgHandleBoxes dbghb;
+
+GtkWidget* dbgdock_create_window(void);
+GtkWidget* dbgdock_display_window(void);
+
+void dbgdock_set_sensitivity(int state);
+
+void dbgdock_show_all(int all);
+void dbgdock_hide_all(int all);
diff --git a/src/gui/debugger/dbg_entry.c b/src/gui/debugger/dbg_entry.c
new file mode 100644
index 0000000..042b1c9
--- /dev/null
+++ b/src/gui/debugger/dbg_entry.c
@@ -0,0 +1,233 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_entry.c 2753 2007-12-30 23:14:15Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "dbg_entry.h"
+#include "dbg_bkpts.h"
+
+enum { 
+	    COL_NAME, COL_HANDLE, COL_CHECK, COL_VISIBLE,
+};
+#define CTREE_NVCOLS	(1)		// 1 visible columns
+#define CTREE_NCOLS		(4)		// 1 real columns
+
+static GList *sel = NULL;
+
+static void renderer_toggled			   (GtkCellRendererToggle *cell_renderer,
+                                            const gchar *path_string,
+                                            gpointer user_data)
+{
+	GtkWidget *tree = user_data;
+	GtkTreeView *view = GTK_TREE_VIEW(tree);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkTreeStore *store = GTK_TREE_STORE(model);
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	gboolean check;
+	gint handle;
+
+	path = gtk_tree_path_new_from_string(path_string);
+	if(!path)
+		return;
+
+	if (!gtk_tree_model_get_iter(model, &iter, path))
+		return;
+
+	gtk_tree_model_get(model, &iter, COL_CHECK, &check, COL_HANDLE, &handle, -1);	
+	check = !check;
+	gtk_tree_store_set(store, &iter, COL_CHECK, check, COL_HANDLE, &handle, -1);
+
+	if(check)
+		sel = g_list_append(sel, GINT_TO_POINTER((uint32_t)handle));
+	else
+		sel = g_list_remove(sel, GINT_TO_POINTER((uint32_t)handle));
+
+	gtk_tree_path_free(path);
+}
+
+static GtkTreeStore* ctree_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeViewColumn *column;
+	GtkTreeSelection *selection;
+
+    const gchar *text[CTREE_NVCOLS] = { _("Name") };
+    gint i;
+	
+	store = gtk_tree_store_new(CTREE_NCOLS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, -1);
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, FALSE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+
+	column = gtk_tree_view_column_new();
+	gtk_tree_view_append_column(view, column);
+	gtk_tree_view_column_set_title(column, text[COL_NAME]);
+  
+	renderer = gtk_cell_renderer_toggle_new();
+	gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), renderer, FALSE);
+	gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
+					    renderer, "active", COL_CHECK, "visible", COL_VISIBLE, NULL);
+	g_signal_connect(G_OBJECT(renderer), "toggled", G_CALLBACK(renderer_toggled), widget);
+
+	renderer = gtk_cell_renderer_text_new();
+	gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), renderer, FALSE);	
+	gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
+					    renderer, "text", COL_NAME, NULL);
+
+   
+    for (i = 0; i < CTREE_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+
+	return store;
+}
+
+static void ctree_populate(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkTreeStore *store = GTK_TREE_STORE(model);
+	gint i, j;
+	GNode *tree;
+	uint16_t handle;
+
+	// Parse VAT
+	vat_parse(&tree);
+
+	// Retrieve breakpoint
+	if(ti68k_bkpt_get_pgmentry(0, &handle))
+		handle = -1;
+
+	// and show it
+	for (i = 0; i < (int)g_node_n_children(tree); i++) 
+	{
+		GNode *fol_node = g_node_nth_child(tree, i);
+		VatSymEntry *vse = (VatSymEntry *)fol_node->data;
+		GtkTreeIter fol_iter;
+
+		gtk_tree_store_append(store, &fol_iter, NULL);
+		gtk_tree_store_set(store, &fol_iter, 
+			COL_NAME, vse->name, COL_HANDLE, vse->handle, 
+			COL_CHECK, FALSE, COL_VISIBLE, FALSE,
+			-1);
+
+		for(j = 0; j < (int)g_node_n_children(fol_node); j++)
+		{
+			GNode *var_node = g_node_nth_child(fol_node, j);
+			VatSymEntry *vse = (VatSymEntry *)var_node->data;
+			GtkTreeIter var_iter;
+
+			gtk_tree_store_append(store, &var_iter, &fol_iter);
+			gtk_tree_store_set(store, &var_iter, 
+				COL_NAME, vse->name, COL_HANDLE, vse->handle, 
+				COL_CHECK, (vse->handle == handle), COL_VISIBLE, TRUE,
+				-1);
+		}
+	}
+
+	gtk_tree_view_expand_all(view);
+
+	// Free copy of VAT
+	vat_free(&tree);
+}
+
+static void ctree_get_selection(void)
+{
+	GList *ptr;
+
+	// clear bkpt list
+	ti68k_bkpt_clear_pgmentry();
+
+	// create new one
+	for(ptr = sel; ptr != NULL; ptr = g_list_next(ptr))
+		ti68k_bkpt_add_pgmentry((uint16_t)(GPOINTER_TO_INT(ptr->data)));
+
+	// free data
+	g_list_free(sel);
+	sel = NULL;
+}
+
+gint dbgentry_display_dbox(void)
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_entry-2.glade"), "dbgentry_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgentry_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+	//gtk_window_resize(GTK_WINDOW(dbox), 320, 240);
+		
+	data = glade_xml_get_widget(xml, "treeview1");
+    ctree_create(data);
+	ctree_populate(data);	
+	
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		ctree_get_selection();
+		dbgbkpts_refresh_window();
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
diff --git a/src/gui/debugger/dbg_entry.h b/src/gui/debugger/dbg_entry.h
new file mode 100644
index 0000000..6f3b817
--- /dev/null
+++ b/src/gui/debugger/dbg_entry.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint dbgentry_display_dbox();
diff --git a/src/gui/debugger/dbg_heap.c b/src/gui/debugger/dbg_heap.c
new file mode 100644
index 0000000..6a3dc70
--- /dev/null
+++ b/src/gui/debugger/dbg_heap.c
@@ -0,0 +1,279 @@
+ /* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_heap.c 2825 2009-05-06 19:48:47Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+#include "handles.h"
+
+enum { 
+	    COL_ID, COL_ADDR, COL_SIZE, COL_FONT,
+};
+#define CLIST_NVCOLS	(3)		// visible columns
+#define CLIST_NCOLS		(4)		// real columns
+
+static GtkListStore* clist_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkListStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+    const gchar *text[CLIST_NVCOLS] = { _("Id"), _("Address"), _("Size") };
+    gint i;
+	
+	store = gtk_list_store_new(CLIST_NCOLS,
+				G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+  
+	for(i = COL_ID; i <= COL_SIZE; i++)
+	{
+		renderer = gtk_cell_renderer_text_new();
+		set_renderer_pad(renderer);
+		gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i,
+			"font", COL_FONT,
+			NULL);
+	}
+    
+    for (i = 0; i < CLIST_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+
+	return store;
+}
+
+static void clist_populate(GtkListStore *store)
+{
+    int i;
+
+    for(i = 1; i < HEAP_MAX_SIZE; i++)
+    {
+        GtkTreeIter iter;
+        uint32_t addr;
+		uint16_t size;
+        gchar** row_text;
+
+		heap_get_block_addr_and_size(i, &addr, &size);
+		if (!addr)
+			continue;
+
+        row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+		row_text[0] = g_strdup_printf("%02x (%i):", i, i);
+		row_text[1] = g_strdup_printf("%06x", addr);
+		row_text[2] = g_strdup_printf("%i", size);
+    
+        gtk_list_store_append(store, &iter);
+		gtk_list_store_set(store, &iter, 
+		COL_ID, row_text[0], COL_ADDR, row_text[1], COL_SIZE, row_text[2],
+		-1);
+
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+		
+		g_strfreev(row_text);
+    }
+}
+
+static void clist_refresh(GtkListStore *store)
+{
+	gtk_list_store_clear(store);
+	clist_populate(store);
+}
+
+static GtkListStore *store = NULL;
+
+/*
+	Display registers window
+*/
+GtkWidget* dbgheap_create_window(void)
+{
+	GladeXML *xml = NULL;
+	GtkWidget *dbox;
+    GtkWidget *data;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_heap-2.glade"), "dbgheap_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgheap_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+	data = glade_xml_get_widget(xml, "treeview1");
+    store = clist_create(data);
+	clist_populate(store);
+
+	gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
+
+	return dbox;
+}
+
+GtkWidget* dbgheap_display_window(void)
+{
+#ifdef WND_STATE
+	if(!options3.heap.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(dbgw.heap), options3.heap.rect.w, options3.heap.rect.h);
+		gtk_window_move(GTK_WINDOW(dbgw.heap), options3.heap.rect.x, options3.heap.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(dbgw.heap));
+#endif
+
+	if(!GTK_WIDGET_VISIBLE(dbgw.heap) && !options3.heap.closed)
+		gtk_widget_show(dbgw.heap);
+
+	return dbgw.heap;
+}
+
+void dbgheap_refresh_window(void)
+{
+	if(!options3.heap.closed)
+	{
+		clist_refresh(store);
+	}
+}
+
+static GtkWidget* display_dbgheap_popup_menu(void);
+static uint32_t value = 0;
+
+GLADE_CB gboolean
+on_heap_button_press_event        (GtkWidget       *widget,
+                                    GdkEventButton  *event,
+                                    gpointer         user_data)
+{
+	GtkWidget *list = GTK_WIDGET(widget);
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	l = gtk_tree_selection_get_selected_rows(selection, &model);
+	if(l != NULL)
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+		gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+		
+		// get address
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, COL_ADDR, &row_text[COL_ADDR], -1);
+
+		// show tab
+		sscanf(row_text[COL_ADDR], "%x", &value);
+
+		g_strfreev(row_text);
+	}
+
+	if (l && event->type == GDK_2BUTTON_PRESS)
+	{	
+		dbgmem_add_tab(value);
+
+		g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+		g_list_free (l);
+
+		return TRUE;
+	}
+	else if(l && event->button == 3)
+	{
+		GdkEventButton *bevent;
+        GtkWidget *menu;  
+
+        // popup menu
+       	bevent = (GdkEventButton *) (event);
+        menu = display_dbgheap_popup_menu();
+
+		gtk_menu_popup(GTK_MENU(menu),
+				   NULL, NULL, NULL, NULL,
+				   bevent->button, bevent->time);
+	    gtk_widget_show(menu);
+
+		g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+		g_list_free (l);
+
+		return TRUE;
+	}
+
+    return FALSE;
+}
+
+/***** Popup menu *****/
+
+/*
+	Display popup menu (right click)
+*/
+static GtkWidget* display_dbgheap_popup_menu(void)
+{
+	GladeXML *xml;
+	GtkWidget *menu;
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("dbg_heap-2.glade"), "dbgheap_popup",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	menu = glade_xml_get_widget(xml, "dbgheap_popup");
+	return menu;
+}
+
+GLADE_CB void
+on_dbgheap_view_memory1_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	dbgmem_add_tab(value);
+}
diff --git a/src/gui/debugger/dbg_heap.h b/src/gui/debugger/dbg_heap.h
new file mode 100644
index 0000000..a56bf9b
--- /dev/null
+++ b/src/gui/debugger/dbg_heap.h
@@ -0,0 +1,31 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+GtkWidget* dbgheap_create_window(void);
+GtkWidget* dbgheap_display_window(void);
+void dbgheap_refresh_window(void);
diff --git a/src/gui/debugger/dbg_iop.c b/src/gui/debugger/dbg_iop.c
new file mode 100644
index 0000000..f8cbb28
--- /dev/null
+++ b/src/gui/debugger/dbg_iop.c
@@ -0,0 +1,474 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_iop.c 2818 2009-05-02 19:46:04Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *Copyright (c) 2001-2003, Romain Lievin
+ *Copyright (c) 2003, Julien Blache
+ *Copyright (c) 2004, Romain Li�vin
+ *Copyright (c) 2005, Romain Li�vin
+ *
+ *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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+#include "iodefs.h"
+
+enum 
+{
+	    COL_NAME, COL_VALUE, COL_ADDR, COL_MASK, 
+		COL_FONT, COL_EDIT, COL_S, COL_BTNVIS, COL_BTNACT,
+};
+#define CTREE_NVCOLS	(4)		// 2 visible columns
+#define CTREE_NCOLS		(9)		// 5 real columns
+
+// return value as string
+static char* rd_mem_as_str(IO_DEF *t)
+{
+	switch(t->size)
+	{
+		case 1: return g_strdup_printf("%02x", mem_rd_byte(t->addr)); break;
+		case 2: return g_strdup_printf("%04x", mem_rd_word(t->addr)); break;
+		case 4: return g_strdup_printf("%08x", mem_rd_long(t->addr)); break;
+		default: return g_strdup("???"); break;
+	}
+	return g_strdup("");
+}
+
+static int rd_bit(IO_DEF *s, int bit_num)
+{
+	switch(s->size)
+	{
+	case 1: return mem_rd_byte(s->addr) & (1 << bit_num);
+	break;
+	case 2: return mem_rd_word(s->addr) & (1 << bit_num);
+	break;
+	case 4: return mem_rd_long(s->addr) & (1 << bit_num);
+	break;
+	}
+
+	return -1;
+}
+
+// check for valid hexadecimal value
+static int validate_value(const char *str, int ndigits)
+{
+	int i;
+	
+	if((int)strlen(str) > ndigits)
+	 	return 0;
+	
+	for(i = 0; (i < ndigits) && (i < (int)strlen(str)); i++)
+	{
+		if(!isxdigit(str[i]))
+			return 0;
+	}
+	
+	return !0;
+}
+
+// called when cell has been edited
+static void renderer_edited(GtkCellRendererText *cell,
+			    const gchar *path_string,
+			    const gchar *new_text, gpointer user_data)
+{
+	GtkWidget *tree = user_data;
+	GtkTreeView *view = GTK_TREE_VIEW(tree);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkTreeStore *store = GTK_TREE_STORE(model);
+
+	GtkTreePath *path = gtk_tree_path_new_from_string(path_string);
+	GtkTreeIter iter, child;
+	
+	IO_DEF *s;
+	gchar *str;
+	uint32_t value;
+	gboolean valid;
+
+	if (!gtk_tree_model_get_iter(model, &iter, path))
+		return;
+		
+	gtk_tree_model_get(model, &iter, COL_VALUE, &str, COL_S, &s, -1);
+	sscanf(str, "%x", &value);
+	g_free(str);
+
+	// change value in memory
+	if(validate_value(new_text, 2 *s->size))
+	{
+		sscanf(new_text, "%x", &value);			
+
+		switch(s->size)
+		{
+		case 1: mem_wr_byte(s->addr, (uint8_t )value); break;
+		case 2: mem_wr_word(s->addr, (uint16_t)value); break;
+		case 4: mem_wr_long(s->addr, (uint32_t)value); break;
+		default: break;
+		}
+	}
+
+	// and change displayed value (don't rely on typed value !)
+	str = rd_mem_as_str(s);
+	gtk_tree_store_set(store, &iter, COL_VALUE, str, -1);
+	g_free(str);
+
+	// update bits (children nodes)
+	for(valid = gtk_tree_model_iter_children(model, &child, &iter);
+        valid; 
+        valid = gtk_tree_model_iter_next(model, &child))
+    {
+		gchar* bit_adr;
+		int	   bit_num;
+
+		gtk_tree_model_get(model, &child, COL_NAME, &str, COL_ADDR, &bit_adr, -1);
+		sscanf(bit_adr, "%i", &bit_num);
+		gtk_tree_store_set(store, &child, COL_BTNACT, rd_bit(s, bit_num), -1);
+	}
+	
+	gtk_tree_path_free(path);
+}
+
+// called when a check button has been toggled
+static void renderer_toggled(GtkCellRendererToggle *cell,
+			     gchar *path_string, gpointer user_data)
+{
+	GtkWidget *tree = user_data;
+	GtkTreeView *view = GTK_TREE_VIEW(tree);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkTreeStore *store = GTK_TREE_STORE(model);
+
+	GtkTreePath *path;
+	GtkTreeIter parent, iter;
+	IO_DEF *s;
+	gboolean state, result;
+	gchar* bit_str;
+	gint bit_num;
+	gchar* str;
+
+	path = gtk_tree_path_new_from_string(path_string);
+
+	if (!gtk_tree_model_get_iter(model, &iter, path))
+		return;
+	if (!gtk_tree_model_get_iter(model, &iter, path))
+		return;
+		
+	gtk_tree_model_get(model, &iter, 
+		COL_BTNACT, &state, 
+		COL_S, &s, 
+		COL_ADDR, &bit_str, 
+		-1);
+
+	// change button state
+	state = !state;
+	sscanf(bit_str, "%i", &bit_num);
+
+	// change value in memory
+	switch(s->size)
+	{
+	case 1:
+		if(state)
+			mem_wr_byte(s->addr, (uint8_t)(mem_rd_byte(s->addr) | (1 << bit_num)));
+		else
+			mem_wr_byte(s->addr, (uint8_t)(mem_rd_byte(s->addr) & ~(1 << bit_num)));
+		break;
+	case 2:
+		if(state)
+			mem_wr_word(s->addr, (uint16_t)(mem_rd_word(s->addr) | (1 << bit_num)));
+		else
+			mem_wr_word(s->addr, (uint16_t)(mem_rd_word(s->addr) & ~(1 << bit_num)));
+		break;
+	case 4:
+		if(state)
+			mem_wr_long(s->addr, mem_rd_long(s->addr) | (1 << bit_num));
+		else
+			mem_wr_long(s->addr, mem_rd_long(s->addr) & ~(1 << bit_num));
+		break;
+	}
+
+	// and change displayed value (parent node)
+	gtk_tree_store_set(store, &iter, COL_BTNACT, state, -1);
+	g_free(bit_str);
+
+	result = gtk_tree_model_iter_parent(model, &parent, &iter);
+	if(result)
+	{
+		str = rd_mem_as_str(s);
+		gtk_tree_store_set(store, &parent, COL_VALUE, str, -1);
+		g_free(str);
+	}
+}
+
+static gboolean select_func(GtkTreeSelection *selection,
+			    GtkTreeModel *model,
+			    GtkTreePath *path,
+			    gboolean path_currently_selected,
+			    gpointer data)
+{
+	return TRUE;
+}
+
+static GtkTreeStore* ctree_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+	GtkTreeViewColumn *column;
+    gint i;
+	
+	store = gtk_tree_store_new(CTREE_NCOLS,
+				G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+				G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_POINTER, 
+				G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, TRUE);
+  
+	// col 1
+	renderer = gtk_cell_renderer_text_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_insert_column_with_attributes(view, -1, 
+            _("Name"), renderer, 
+            "text", COL_NAME,
+			"font", COL_FONT,
+			NULL);
+
+	// col 2
+	column = gtk_tree_view_column_new();
+	gtk_tree_view_append_column(view, column);
+	gtk_tree_view_column_set_title(column, _("Value"));
+
+	renderer = gtk_cell_renderer_toggle_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), renderer, FALSE);
+	gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
+					    renderer,
+					    "active", COL_BTNACT,
+					    "visible", COL_BTNVIS, 
+						NULL);
+	g_signal_connect(G_OBJECT(renderer), "toggled", G_CALLBACK(renderer_toggled), widget);
+
+	renderer = gtk_cell_renderer_text_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), renderer, FALSE);	
+	gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
+					    renderer,
+					    "text", COL_VALUE,
+						"editable", COL_EDIT,
+						"font", COL_FONT, 
+						NULL);	
+	g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(renderer_edited), widget);
+
+	// col 3
+	renderer = gtk_cell_renderer_text_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_insert_column_with_attributes(view, -1, 
+            _("Address"), renderer, 
+            "text", COL_ADDR,
+			"font", COL_FONT,
+			NULL);
+
+	// col 4
+	renderer = gtk_cell_renderer_text_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_insert_column_with_attributes(view, -1, 
+            _("Mask"), renderer, 
+            "text", COL_MASK,
+			"font", COL_FONT,
+			NULL);
+    
+    for (i = 0; i < CTREE_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+	gtk_tree_selection_set_select_function(selection, select_func, NULL, NULL);
+
+	return store;
+}
+
+static void ctree_populate(GtkTreeStore *store)
+{
+	GNode* node0;
+	GtkTreeIter iter0, iter1, iter2;
+	int i, j, k;
+	int result;
+
+	// (re)load I/O ports
+	result = ti68k_debug_load_iodefs(inst_paths.misc_dir);
+	if(result == -1)
+	{
+		gtk_tree_store_clear(store);
+		return;				// already loaded
+	}
+
+	node0 = iodefs_tree();
+	if(node0 == NULL)
+		return;
+
+	// parse sections
+	for (i = 0; i < (int)g_node_n_children(node0); i++) 
+	{
+		GNode *node1 = g_node_nth_child(node0, i);
+		IO_DEF *s = (IO_DEF *)(node1->data);
+
+		gtk_tree_store_append(store, &iter0, NULL);
+		gtk_tree_store_set(store, &iter0, COL_NAME, s->name, -1);
+		if(options3.dbg_font_type)
+			gtk_tree_store_set(store, &iter0, COL_FONT, options3.dbg_font_name, -1);
+
+		// parse registers
+		for (j = 0; j < (int)g_node_n_children(node1); j++) 
+		{
+			GNode *node2 = g_node_nth_child(node1, j);
+			IO_DEF *t = (IO_DEF *)(node2->data);
+
+			gchar **row_text = g_malloc0((CTREE_NCOLS + 1) *sizeof(gchar *));
+
+			row_text[0] = g_strdup(t->name);
+			row_text[1] = rd_mem_as_str(t);
+			row_text[2] = g_strdup_printf("%06x", t->addr);
+			row_text[3] = g_strdup(t->all_bits ? "" : t->bit_str);
+
+			gtk_tree_store_append(store, &iter1, &iter0);
+			gtk_tree_store_set(store, &iter1, 
+					   COL_NAME, row_text[0],
+					   COL_VALUE, row_text[1], 
+					   COL_ADDR,  row_text[2], 
+					   COL_MASK,  row_text[3],
+					   COL_S, (gpointer)t,
+					   COL_EDIT, TRUE,
+					   COL_BTNVIS, FALSE,
+					   COL_BTNACT, FALSE,
+					   -1);
+
+			if(options3.dbg_font_type)
+				gtk_tree_store_set(store, &iter1, COL_FONT, options3.dbg_font_name, -1);
+
+			g_strfreev(row_text);
+
+			// parse bits
+			for(k = t->nbits-1; k >= 0 ; k--)
+			{
+				row_text = g_malloc0((CTREE_NCOLS + 1) *sizeof(gchar *));
+
+				row_text[0] = g_strdup(t->bit_name[k]);
+				row_text[2] = g_strdup_printf("%i", t->bits[k]);
+				gtk_tree_store_append(store, &iter2, &iter1);
+				gtk_tree_store_set(store, &iter2, 
+					COL_NAME, row_text[0],
+					COL_ADDR, row_text[2], 
+					COL_S, (gpointer)t, 
+					COL_EDIT, FALSE,
+					COL_BTNVIS, TRUE,
+					COL_BTNACT, rd_bit(t, t->bits[k]),					
+					-1);
+			}
+		}
+	}
+}
+
+static void ctree_refresh(GtkTreeStore *store)
+{
+	gtk_tree_store_clear(store);
+	ctree_populate(store);
+}
+
+static GtkTreeStore *store;
+
+/*
+	Display io ports window
+*/
+GtkWidget* dbgiop_create_window(void)
+{
+	GladeXML *xml = NULL;
+	GtkWidget *dbox;
+    GtkWidget *data;	
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_ioports-2.glade"), "dbgioports_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgioports_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+	data = glade_xml_get_widget(xml, "treeview1");
+    store = ctree_create(data);
+	ctree_populate(store);
+
+	gtk_tree_view_collapse_all(GTK_TREE_VIEW(data));
+
+	return dbox;
+}
+
+GtkWidget* dbgiop_display_window(void)
+{
+#ifdef WND_STATE
+	if(!options3.iop.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(dbgw.iop), options3.iop.rect.w, options3.iop.rect.h);
+		gtk_window_move(GTK_WINDOW(dbgw.iop), options3.iop.rect.x, options3.iop.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(dbgw.iop));
+#endif
+    
+	if(!GTK_WIDGET_VISIBLE(dbgw.iop) && !options3.iop.closed)
+		gtk_widget_show(dbgw.iop);
+
+	return dbgw.iop;
+}
+
+void dbgiop_refresh_window(void)
+{
+	WND_TMR_START();
+
+	if(!options3.iop.closed)
+	{
+		ctree_refresh(store);
+	}
+
+	WND_TMR_STOP("Iop Refresh Time");
+}
diff --git a/src/gui/debugger/dbg_iop.h b/src/gui/debugger/dbg_iop.h
new file mode 100644
index 0000000..bc04f0f
--- /dev/null
+++ b/src/gui/debugger/dbg_iop.h
@@ -0,0 +1,31 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_iop.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+GtkWidget* dbgiop_create_window(void);
+GtkWidget* dbgiop_display_window(void);
+void dbgiop_refresh_window(void);
diff --git a/src/gui/debugger/dbg_mem.c b/src/gui/debugger/dbg_mem.c
new file mode 100644
index 0000000..fd2005a
--- /dev/null
+++ b/src/gui/debugger/dbg_mem.c
@@ -0,0 +1,1373 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_mem.c 2825 2009-05-06 19:48:47Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006-2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk/gdkkeysyms.h>
+
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+#include "mem_map.h"
+
+#define FORCE_REFRESH
+#define DUMP_SIZE       128
+
+enum { 
+	    COL_ADDR, 
+        COL_0, COL_1, COL_2, COL_3,
+        COL_4, COL_5, COL_6, COL_7,
+        COL_8, COL_9, COL_A, COL_B,
+        COL_C, COL_D, COL_E, COL_F,
+		COL_ASCII,
+
+        COL_S0, COL_S1, COL_S2, COL_S3, // green or white background (selection)
+        COL_S4, COL_S5, COL_S6, COL_S7,
+        COL_S8, COL_S9, COL_SA, COL_SB,
+        COL_SC, COL_SD, COL_SE, COL_SF,
+
+        COL_EDITABLE,   // editable cell
+		COL_GRAY,       // left and right column in gray
+        COL_FONT,       // courier font for everyone
+        COL_COLOR,      // red or black foreground (changes)
+};
+#define CLIST_NVCOLS	(18)
+#define CLIST_NCOLS		(18 + 20)
+
+static gint column2index(GtkWidget *list, GtkTreeViewColumn * column)
+{
+	gint i;
+
+	for (i = 0; i < CLIST_NVCOLS; i++) {
+		GtkTreeViewColumn *col;
+
+		col = gtk_tree_view_get_column(GTK_TREE_VIEW(list), i);
+		if (col == column)
+			return i;
+	}
+
+	return -1;
+}
+
+static void renderer_edited(GtkCellRendererText * cell,
+			    const gchar * path_string,
+			    const gchar * new_text, gpointer user_data)
+{
+    GtkWidget *list = user_data;
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+
+    GtkTreeViewColumn *column;
+    GtkTreeIter iter;
+	GtkTreePath *path;	
+	gint col;
+    gchar *str_addr;
+    gchar *str_data = (char *)new_text;
+    int addr, data, i;
+	gchar *ascii, *utf;
+	gsize bw;
+
+    // get column
+    gtk_tree_view_get_cursor(view, &path, &column);
+    if(!path || !column)
+        return;
+
+    // get iterator
+	if (!gtk_tree_model_get_iter(model, &iter, path))
+		return;
+
+    // get address
+	col = column2index(list, column);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str_addr, COL_ASCII, &ascii, -1);
+
+    // check for new value
+    if((strlen(str_data) % 2) != 0)
+    {
+        gtk_tree_path_free(path);
+        return;
+    }
+
+    for(i = 0; i < (int)strlen(str_data); i++)
+        if(!isxdigit(str_data[i]))
+            {
+                gtk_tree_path_free(path);
+                return;
+            }
+
+    // set new value(s) and update memory
+    for(i = 0; (i < (int)strlen(str_data)/2) && ((col+i) <= COL_F); i++)
+    {
+        char digits[3];
+		int offset = col - COL_0 + i;
+
+        strncpy(digits, &new_text[2*i], 2); 
+        digits[2] = '\0';
+
+        sscanf(str_addr, "%x", &addr);
+        sscanf(digits, "%x", &data);
+		mem_wr_byte(addr + offset, (uint8_t)data);
+
+		// don't rely on typed value
+		data = mem_rd_byte(addr + offset);
+		sprintf(digits, "%02x", data);
+		ascii[offset] = (isprint(data) && !iscntrl(data) ? data : '.');
+
+		gtk_list_store_set(store, &iter, col+i, digits, -1);
+		dbgstack_refresh_window();	// refresh stack, too
+    }
+
+	// and ascii area, too
+	utf = g_locale_to_utf8(ascii, -1, NULL, &bw, NULL);
+	gtk_list_store_set(store, &iter, COL_ASCII, utf, -1);
+
+    g_free(str_addr);
+	gtk_tree_path_free(path);
+}
+
+static void refresh_page(int page, int offset);
+
+static gboolean
+on_treeview_key_press_event            (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data);
+static gboolean
+on_treeview_btn_press_event        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+static GtkWidget* clist_create(GtkListStore **st)
+{
+	GtkWidget *list;
+	GtkTreeView *view;
+	GtkListStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+	
+	const gchar *text[CLIST_NVCOLS] = { 
+            _("Address"), 
+            "+0", "+1", "+2", "+3", "+4", "+5", "+6", "+7",
+            "+8", "+9", "+A", "+B", "+C", "+D", "+E", "+F",
+			"ASCII"
+    };
+    gint i;
+	
+	store = gtk_list_store_new(CLIST_NCOLS,
+				G_TYPE_STRING, 
+                G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+                G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+                G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+                G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+				G_TYPE_STRING,
+
+                GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR,
+                GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR,
+                GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR,
+                GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR, GDK_TYPE_COLOR,
+				G_TYPE_BOOLEAN, GDK_TYPE_COLOR, G_TYPE_STRING, GDK_TYPE_COLOR,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+	list = gtk_tree_view_new_with_model(model);
+	view = GTK_TREE_VIEW(list);
+  
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, TRUE);
+  
+	i = COL_ADDR;
+	renderer = gtk_cell_renderer_text_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i,
+			"font", COL_FONT,
+			"foreground-gdk", COL_GRAY,
+			NULL);
+
+    for (i = COL_0; i <= COL_F; i++)
+    {
+    	renderer = gtk_cell_renderer_text_new();
+		set_renderer_pad(renderer);
+        gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i, 
+			"font", COL_FONT,
+            "editable", COL_EDITABLE,
+            "foreground-gdk", COL_COLOR,
+            "background-gdk", COL_S0 + i - COL_0,
+            NULL);
+
+        g_signal_connect(G_OBJECT(renderer), "edited",
+			 G_CALLBACK(renderer_edited), list);
+    }
+
+	i = COL_ASCII;
+	renderer = gtk_cell_renderer_text_new();
+	set_renderer_pad(renderer);
+	gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i,
+			"font", COL_FONT,
+			"foreground-gdk", COL_GRAY,
+			NULL);
+    
+    for (i = 0; i < CLIST_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+
+    g_signal_connect(G_OBJECT(list), "key_press_event",
+			 G_CALLBACK(on_treeview_key_press_event), list);
+    g_signal_connect(G_OBJECT(list), "button_press_event",
+			 G_CALLBACK(on_treeview_btn_press_event), list);
+
+	*st = store;
+	return list;
+}
+
+static void clist_populate(GtkListStore *store, uint32_t start, int length)
+{
+    GtkTreeIter iter;
+    int i;
+    gchar *str;
+    char ascii[17];
+    uint32_t a;
+	GdkColor gray, black, red, white;
+	gboolean success;
+    GdkColor *color = &black;
+
+    //static uint8_t old[DUMP_SIZE] = { 0 };
+    //static uint8_t *old_ptr;
+
+	gdk_color_parse("DarkGray", &gray);
+	gdk_colormap_alloc_colors(gdk_colormap_get_system(), &gray, 1,
+				  FALSE, FALSE, &success);
+
+	gdk_color_parse("Black", &black);
+	gdk_colormap_alloc_colors(gdk_colormap_get_system(), &black, 1,
+				  FALSE, FALSE, &success);
+
+	gdk_color_parse("Red", &red);
+	gdk_colormap_alloc_colors(gdk_colormap_get_system(), &red, 1,
+				  FALSE, FALSE, &success);
+
+    gdk_color_parse("White", &white);
+	gdk_colormap_alloc_colors(gdk_colormap_get_system(), &white, 1,
+				  FALSE, FALSE, &success);
+
+    //old_ptr = old;
+    for(a = start; a < start+length; a += 0x10)
+    {
+		uint32_t addr = a & 0xffffff;
+		uint8_t mem;
+
+		char *utf;
+		gsize bw;
+
+        gtk_list_store_append(store, &iter);
+
+		str = g_strdup_printf("%06x", addr);
+		gtk_list_store_set(store, &iter, 
+			COL_ADDR, str, 
+			COL_GRAY, &gray,
+			-1);
+		g_free(str);
+
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+		else
+			gtk_list_store_set(store, &iter, COL_FONT, "courier", -1);
+
+		for(i = COL_0; i <= COL_F; i++)
+		{
+			if(addr + (i-COL_0) != 0x60000f)
+				mem = mem_rd_byte(addr + (i-COL_0)); 
+			else
+				mem = 0xff;
+
+			str = g_strdup_printf("%02x", mem);
+			ascii[i-COL_0] = (isprint(mem) && !iscntrl(mem) ? mem : '.');
+/*
+            if(*old_ptr != *mem_ptr)
+            {
+                *old_ptr++ = *mem_ptr;
+                color = &red;
+                printf("$");
+            }
+            else
+            {
+                old_ptr++;
+                color = &black;
+                printf(".");
+            }
+*/
+			gtk_list_store_set(store, &iter, 
+				i, str, 
+				COL_EDITABLE, TRUE, 
+                COL_COLOR, color,
+                i + CLIST_NVCOLS - COL_0, &white,
+				-1);
+
+			g_free(str);            
+        }
+	 
+		ascii[16] = '\0';
+		utf = g_locale_to_utf8(ascii, -1, NULL, &bw, NULL);
+		gtk_list_store_set(store, &iter, COL_ASCII, utf, -1);
+    }
+}
+
+static void clist_refresh(GtkListStore *store, uint32_t start, int length)
+{
+	gtk_list_store_clear(store);
+	clist_populate(store, start, length);
+}
+
+static void notebook_add_page(GtkWidget *notebook, const char* tab_name)
+{
+	GtkListStore *store;
+	GtkWidget *label;
+	GtkWidget *child;
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	gint page = gtk_notebook_get_current_page(nb);
+	uint32_t addr;
+	
+	label = gtk_label_new(tab_name);
+	gtk_widget_show(label);
+
+    child = clist_create(&store);
+
+	// display normal
+	sscanf(tab_name, "%06x", &addr);
+   	clist_populate(store, addr, DUMP_SIZE);
+
+	gtk_widget_show(child);
+
+	gtk_notebook_insert_page(nb, child, label, page);
+	gtk_notebook_set_current_page(nb, page);
+
+    gtk_widget_grab_focus(child);
+}
+
+static GtkWidget *notebook;
+
+/*
+	Display memory window
+*/
+GtkWidget* dbgmem_create_window(void)
+{
+	GladeXML *xml = NULL;
+	GtkWidget *dbox;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_mem-2.glade"), "dbgmem_window",
+		 PACKAGE);
+	if (!xml)
+		g_error("GUI loading failed !\n");
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgmem_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+    notebook = glade_xml_get_widget(xml, "notebook1");
+    gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook));
+    
+	notebook_add_page(notebook, "0x000000");
+
+	return dbox;
+}
+
+GtkWidget* dbgmem_display_window(void)
+{ 
+#ifdef WND_STATE
+	if(!options3.mem.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(dbgw.mem), options3.mem.rect.w, options3.mem.rect.h);
+		gtk_window_move(GTK_WINDOW(dbgw.mem), options3.mem.rect.x, options3.mem.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(dbgw.mem));
+#endif
+
+	if(!GTK_WIDGET_VISIBLE(dbgw.mem) && !options3.mem.closed)
+		gtk_widget_show(dbgw.mem);
+
+    return dbgw.mem;
+}
+
+void dbgmem_refresh_window(void)
+{
+	WND_TMR_START();
+
+	if(!options3.mem.closed)
+	{
+        GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	    gint page = gtk_notebook_get_current_page(nb);
+
+        refresh_page(page, 0);
+	}
+
+	WND_TMR_STOP("Memory Refresh Time");
+}
+
+void dbgmem_add_tab(uint32_t addr)
+{
+    gchar *str;
+	
+	str = g_strdup_printf("%06x", addr);
+	notebook_add_page(notebook, str);
+	g_free(str);
+}
+
+
+GLADE_CB void
+dbgmem_button1_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	uint32_t addr = 0;
+	gchar *str;
+	
+	if(display_dbgmem_address(&addr) == -1)
+		return;
+	
+	str = g_strdup_printf("%06x", addr);
+	notebook_add_page(notebook, str);
+	g_free(str);
+
+	gtk_widget_set_sensitive(GTK_WIDGET(button), 
+		gtk_notebook_get_n_pages(nb) > 1 ? TRUE : FALSE);
+}
+
+GLADE_CB void
+dbgmem_button2_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	gint page = gtk_notebook_get_current_page(nb);
+	
+	if(gtk_notebook_get_n_pages(nb) > 1)
+		gtk_notebook_remove_page(nb, page);
+
+	gtk_widget_set_sensitive(GTK_WIDGET(button), 
+		gtk_notebook_get_n_pages(nb) > 1 ? TRUE : FALSE);
+}
+
+GLADE_CB void
+dbgmem_button3_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	gint page = gtk_notebook_get_current_page(nb);
+
+	refresh_page(page, -0x10);
+}
+
+GLADE_CB void
+dbgmem_button4_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	gint page = gtk_notebook_get_current_page(nb);
+
+	refresh_page(page, +0x10);
+}
+
+GLADE_CB void
+dbgmem_button5_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	gint page = gtk_notebook_get_current_page(nb);
+
+	refresh_page(page, 0);
+}
+
+/***** Mem Map popup menu *****/
+
+static void memmap_menu_activate(GtkMenuItem* menuitem, gpointer user_data)
+{
+	guint32 addr = GPOINTER_TO_INT(user_data);
+	gchar *str;
+	
+	str = g_strdup_printf("%06x", addr);
+	notebook_add_page(notebook, str);
+	g_free(str);
+}
+
+static GtkWidget* memmap_menu(void)
+{
+	GtkWidget *menu;
+	GtkWidget *item;
+	int result;
+	MEM_MAP **ptr, **array = NULL;
+
+
+	menu = gtk_menu_new();
+	g_object_set_data_full(G_OBJECT(menu), "memmap_menu",
+			       gtk_widget_ref(menu),
+			       (GDestroyNotify)g_object_unref);
+
+	// (re)load mem map
+	result = ti68k_debug_load_memmap(inst_paths.misc_dir);
+	if(result == -1)
+	{
+		return menu;
+	}
+
+	array = memmap_array();
+	if(array == NULL)
+		return menu;
+	
+	for(ptr = array; *ptr; ptr++)
+	{
+		MEM_MAP *s = *ptr;
+		char *label;
+
+		label = g_strdup_printf("%06x-%06x : %s", s->addr, s->addr + s->size - 1, s->name);
+
+		item = gtk_menu_item_new_with_label(label);
+		g_object_set_data_full(G_OBJECT(menu), "c_drive",
+					   gtk_widget_ref(item),
+					   (GDestroyNotify)g_object_unref);
+		gtk_widget_show(item);
+
+		gtk_container_add(GTK_CONTAINER(menu), item);
+		g_signal_connect((gpointer)item, "activate",
+					   G_CALLBACK(memmap_menu_activate),
+					   GINT_TO_POINTER(s->addr));
+
+		g_free(label);
+	}
+
+	return menu;
+}
+
+GLADE_CB void
+dbgmem_button6_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkWidget *menu;
+	guint butt = 0;
+	guint32 time;
+
+	time = gtk_get_current_event_time();
+	menu = memmap_menu();
+	gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, butt, time);
+	gtk_widget_show(menu);
+}
+
+GLADE_CB void
+on_notebook1_switch_page               (GtkNotebook     *notebook,
+                                        GtkNotebookPage *page,
+                                        guint            page_num,
+                                        gpointer         user_data)
+{
+	refresh_page(page_num, 0);
+}
+
+/***** Misc *****/
+
+static void refresh_page(int page, int offset)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	GtkWidget *tab;
+	GtkWidget *label;
+	G_CONST_RETURN gchar *text;
+	uint32_t addr, len = DUMP_SIZE;
+
+	GList *l, *elt;
+	GtkWidget *list;
+	GtkTreeView *view;
+	GtkTreeModel *model;
+	GtkListStore *store;
+	gchar *str;
+
+    gint i;
+
+	// retrieve addr by tab name
+	tab = gtk_notebook_get_nth_page(nb, page);
+	label = gtk_notebook_get_tab_label(nb, tab);
+	text = gtk_label_get_text(GTK_LABEL(label));
+
+	// get list pointer (we have 1 child)
+	l = gtk_container_get_children(GTK_CONTAINER(nb));
+	elt = g_list_nth(l, page);
+	list = GTK_WIDGET(elt->data);
+	view = GTK_TREE_VIEW(list);
+	model = gtk_tree_view_get_model(view);
+	store = GTK_LIST_STORE(model);
+
+    // get new address
+	sscanf(text, "%x", &addr);
+	len = DUMP_SIZE;
+
+	addr += offset;
+	addr &= 0xffffff;
+
+    // refresh only if mem changed (speed-up)
+#ifndef FORCE_REFRESH
+    if(!offset)
+    {
+        static uint8_t old_array[DUMP_SIZE] = { 0 };
+        gint diff = 0;
+
+        // can't use memcmp due to banking
+        for(i = 0; i < DUMP_SIZE; i++)
+        {
+			uint8_t old = old_array[i];
+			uint8_t mem = mem_rd_byte(addr + i);
+
+            if(old != mem)
+            {
+                old = mem;
+                diff = !0;
+            }
+        }
+
+        if(!diff) return;
+    }
+#endif
+
+    // refresh tab
+	str = g_strdup_printf("%06x", addr);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+    // and list
+   	clist_refresh(store, addr, len <= DUMP_SIZE ? len : DUMP_SIZE);
+
+    // set column
+	for(i = COL_0; i <= COL_F; i++)
+    {
+        GtkTreeViewColumn *col;
+
+		col = gtk_tree_view_get_column(view, i);
+        str = g_strdup_printf("%X", (addr + i - 1) & 0xf);
+        gtk_tree_view_column_set_title(col, str);
+        g_free(str);
+    }
+}
+
+/***** Popup menu *****/
+
+/*
+	Display popup menu (right click)
+*/
+static GtkWidget* display_dbgmem_popup_menu(void)
+{
+	GladeXML *xml2;
+	GtkWidget *menu;
+
+	xml2 = glade_xml_new
+	    (tilp_paths_build_glade("dbg_mem-2.glade"), "dbgmem_popup",
+	     PACKAGE);
+	if (!xml2)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml2);
+
+	menu = glade_xml_get_widget(xml2, "dbgmem_popup");
+	return menu;
+}
+
+static gboolean
+on_treeview_btn_press_event        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+    GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreePath *path;
+	GtkTreeViewColumn *column;
+    gboolean ret;
+
+    switch (event->type) 
+    {
+    case GDK_BUTTON_PRESS:	// third button clicked
+        if (event->button == 3) 
+        {
+            GdkEventButton *bevent;
+            GtkWidget *menu;
+
+            //--- set cell focus
+            gint tx = (gint) event->x;
+	        gint ty = (gint) event->y;
+	        gint cx, cy;
+
+	        ret = gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, &cy);
+            gtk_tree_view_set_cursor(view, path, column, FALSE);    // select cell
+            gtk_tree_view_row_activated(view, path, column);        // show selection
+            gtk_tree_path_free(path);
+            //printf("%i %i %i %i (%i)\n", tx, ty, cx, cy, ret);
+            //---
+
+		    bevent = (GdkEventButton *) (event);
+            menu = display_dbgmem_popup_menu();
+
+		    gtk_menu_popup(GTK_MENU(menu),
+				       NULL, NULL, NULL, NULL,
+				       bevent->button, bevent->time);
+	        gtk_widget_show(menu);
+
+		    return TRUE;
+	    }
+	    break;
+    default:
+        break;
+    }
+
+    return FALSE;
+}
+
+GLADE_CB void
+on_find1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+    gint page = gtk_notebook_get_current_page(nb);
+	GtkWidget *tab;
+	GtkWidget *label;
+	G_CONST_RETURN gchar *text;
+	uint32_t addr;
+
+	tab = gtk_notebook_get_nth_page(nb, page);
+	label = gtk_notebook_get_tab_label(nb, tab);
+	text = gtk_label_get_text(GTK_LABEL(label));
+    sscanf(text, "%06x", &addr);
+
+    display_dbgmem_search(addr);
+}
+
+
+GLADE_CB void
+on_find_next1_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+
+}
+
+
+GLADE_CB void
+on_go_to_address2_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	gint page = gtk_notebook_get_current_page(nb);
+
+    uint32_t addr = 0;
+	gchar *str;
+	
+	if(display_dbgmem_address(&addr) == -1)
+		return;
+
+    gtk_notebook_remove_page(nb, page);
+	
+	str = g_strdup_printf("%06x", addr);
+	notebook_add_page(notebook, str);
+	g_free(str);
+}
+
+static uint32_t column2address         (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+    gint page = gtk_notebook_get_current_page(nb);
+
+	GList *l, *elt;
+	GtkWidget *list;
+	GtkTreeView *view;
+	GtkTreeModel *model;
+	GtkListStore *store;
+	gchar *str;
+
+    GtkTreePath *path;
+    GtkTreeViewColumn *column;
+    GtkTreeIter iter;
+    gint col;
+    uint32_t addr;
+
+	// get list pointer (we have 1 child)
+	l = gtk_container_get_children(GTK_CONTAINER(nb));
+	elt = g_list_nth(l, page);
+	list = GTK_WIDGET(elt->data);
+	view = GTK_TREE_VIEW(list);
+	model = gtk_tree_view_get_model(view);
+	store = GTK_LIST_STORE(model);
+
+    // get column
+    gtk_tree_view_get_cursor(view, &path, &column);
+    if(!path || !column)
+        return -1;
+
+    // get iterator
+	if (!gtk_tree_model_get_iter(model, &iter, path))
+		return -1;
+
+    // get address
+	col = column2index(list, column);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%06x", &addr);
+
+	return (addr + (col-1));
+}
+
+GLADE_CB void
+on_dissassemble1_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    uint32_t addr = column2address(menuitem, user_data);
+    
+    // populate code at this address
+    dbgcode_disasm_at(addr);
+}
+
+GLADE_CB void
+on_disassemble_indirect1_activate              (GtkMenuItem     *menuitem,
+                                                gpointer         user_data)
+{
+	uint32_t addr = column2address(menuitem, user_data);
+
+	// populate code at the address contained at this address
+	dbgcode_disasm_at(mem_rd_long(addr));
+}
+
+GLADE_CB void
+on_dbgmem_view_memory1_activate                (GtkMenuItem     *menuitem,
+                                                gpointer         user_data)
+{
+	uint32_t addr = column2address(menuitem, user_data);
+	gchar *str;
+
+	// open a new tab at the address contained at this address	
+	str = g_strdup_printf("%06x", mem_rd_long(addr));
+	notebook_add_page(notebook, str);
+	g_free(str);
+}
+
+static void search_next(void);
+
+GLADE_CB gboolean
+on_dbgmem_key_press_event              (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data)
+{
+	GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+
+    switch(event->keyval) 
+	{
+	case GDK_F1:
+		dbgmem_button1_clicked(NULL, NULL);
+		return TRUE;
+	case GDK_F2:
+		dbgmem_button2_clicked(NULL, NULL);
+		return TRUE;
+	case GDK_F3:
+		dbgmem_button3_clicked(NULL, NULL);
+		return TRUE;
+	case GDK_F4:
+		dbgmem_button4_clicked(NULL, NULL);
+		return TRUE;
+	case GDK_F5:
+		dbgmem_button5_clicked(NULL, NULL);
+		return TRUE;
+	case GDK_F6:
+		dbgmem_button6_clicked(NULL, NULL);
+		return TRUE;
+	case GDK_F7:
+		gtk_notebook_next_page(nb);
+		return TRUE;
+	case GDK_F8:
+		gtk_notebook_prev_page(nb);
+		return TRUE;
+	default:
+		return FALSE;
+	}
+
+    return FALSE;
+}
+
+static gboolean
+on_treeview_key_press_event            (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data)
+{
+    GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+    GtkTreeIter iter;
+    GtkTreePath *path;
+    GtkTreeViewColumn *column;
+
+    gchar *str;
+    gchar *row;
+    gint row_idx, row_max;
+    uint32_t min, max;
+    gint n;
+
+    GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	gint page = gtk_notebook_get_current_page(nb);
+
+    // get min address
+    gtk_tree_model_get_iter_first(model, &iter);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &min);
+
+    // get max address
+    n = gtk_tree_model_iter_n_children(model, NULL);
+    gtk_tree_model_iter_nth_child(model, &iter, NULL, n-1);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "%x", &max);
+
+    // retrieve cursor
+    gtk_tree_view_get_cursor(view, &path, &column);
+    if(path == NULL)
+        return FALSE;
+
+    // get row
+    row_idx = row_max = -1;
+    row = gtk_tree_path_to_string(path);
+    sscanf(row, "%i", &row_idx);
+    g_free(row);
+    row_max = gtk_tree_model_iter_n_children(model, NULL) - 1;
+    //printf("row_idx = %i\n", row_idx);
+
+    switch(event->keyval) 
+	{
+    case GDK_Up:
+        if(row_max == -1)
+            break;
+
+        if(row_idx > 0)
+            break;
+
+        refresh_page(page, -0x10);
+
+        return FALSE;
+
+    case GDK_Down:
+        if(row_max == -1)
+            break;
+
+        if(row_idx < row_max)
+            break;
+
+        refresh_page(page, +0x10);
+
+		str = g_strdup_printf("%i", row_max);
+        path = gtk_tree_path_new_from_string(str);
+		g_free(str);
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+        
+        return FALSE;
+
+    case GDK_Page_Up:
+        if(row_max == -1)
+            break;
+
+        if(row_idx > 0)
+            break;
+
+        refresh_page(page, -DUMP_SIZE);
+
+        path = gtk_tree_path_new_from_string("0");
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+
+        return FALSE;
+
+    case GDK_Page_Down:
+        if(row_max == -1)
+            break;
+
+        if(row_idx < row_max)
+            break;
+
+        refresh_page(page, +DUMP_SIZE);
+
+        str = g_strdup_printf("%i", row_max);
+        path = gtk_tree_path_new_from_string(str);
+		g_free(str);
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+
+        return FALSE;
+
+    case GDK_n:
+		search_next();
+		return TRUE;
+
+    case GDK_a:
+    case GDK_A:
+        if(event->state & GDK_CONTROL_MASK)
+        {
+            on_go_to_address2_activate((GtkMenuItem *)widget, user_data);
+            return TRUE;
+        }
+
+    case GDK_f:
+    case GDK_F:
+        if(event->state & GDK_CONTROL_MASK)
+        {
+            on_find1_activate((GtkMenuItem *)widget, user_data);
+            return TRUE;
+        }
+
+	case GDK_plus:
+		dbgmem_button1_clicked(NULL, NULL);
+		return FALSE;
+
+	case GDK_minus:
+		dbgmem_button2_clicked(NULL, NULL);
+		return FALSE;
+
+	default:
+		return FALSE;
+	}
+
+    return FALSE;
+}
+
+/*
+	Type address in a box.
+*/
+gint display_dbgmem_address(uint32_t *addr)
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *entry;
+	gint result;
+	gchar *str;
+	gint ret = -1;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_mem-2.glade"), "dbgmem_address", PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	entry = glade_xml_get_widget(xml, "entry1");
+	str = g_strdup_printf("0x%06x", *addr);
+	gtk_entry_set_text(GTK_ENTRY(entry), str);
+	g_free(str);
+
+	gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1);
+	
+	dbox = glade_xml_get_widget(xml, "dbgmem_address");	
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		str = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
+		sscanf(str, "%x", addr);
+		ret = 0;
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+	return ret;
+}
+
+/*
+    Search string/data
+
+  Note: 'casse' is a French'ized word taken from the English word 'case'. It means 
+  'case sensitive' or in good French 'respect des majuscules'.
+*/
+
+static gint search_engine(char *str, int ascii, int casse, uint32_t *address, int *length)
+{
+    uint8_t *data;
+    uint16_t len;
+    gchar *tmp;
+    gint i;
+    uint32_t addr;
+
+    data = (uint8_t *) g_strdup((gchar *) str);
+    len = strlen((char *) data);
+
+    // ASCII mode ?
+    if(!ascii)
+    {
+        char *p, *q;
+
+        // compact string
+        p = str;
+        q = tmp = g_strdup(str);
+
+        while(*p)
+        {
+            if(*p != ' ')
+                *q++ = *p++;
+            else
+                p++;
+        }
+        *q = '\0';
+
+        // and converts
+        len = strlen(tmp) / 2;
+        for(i = 0; i < len; i++)
+        {
+            char digits[3];
+            unsigned int temp;
+
+            strncpy(digits, &tmp[2*i], 2); 
+            digits[2] = '\0';
+            sscanf(digits, "%02x", &temp);
+            data[i] = temp;
+        }
+
+        g_free(tmp);
+    }
+
+    // search (we don't use memcmp because mem space may be not contiguous)
+    i = 0;
+    for(addr = *address; addr <= 0xffffff; addr++)
+    {
+		if(mem_rd_byte(addr) == data[i])
+            i++;
+        else
+            i = 0;
+
+        if(i == len)
+            break;
+    }
+
+    if(i == len)
+    {
+        *address = addr - len + 1;
+        *length = len;
+        return !0;
+    }
+
+    return 0;
+}
+
+#define IS_BOUNDED(a,v,b) (((a) <= (v)) && ((v) <= (b)))
+
+static gint search_highlight(uint32_t blk_beg, uint32_t blk_end, int state)
+{
+    GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+    gint page = gtk_notebook_get_current_page(nb);
+	GtkWidget *tab;
+	GtkWidget *label;
+	G_CONST_RETURN gchar *text;
+	uint32_t tab_adr, addr, offset;
+    gint i;
+    gint start, stop;
+
+	GList *l, *elt;
+	GtkWidget *list;
+	GtkTreeView *view;
+	GtkTreeModel *model;
+	GtkListStore *store;
+    GtkTreeIter iter;
+    gboolean valid;
+
+    GdkColor white, green;
+	gboolean success;
+
+	gdk_color_parse("White", &white);
+	gdk_colormap_alloc_colors(gdk_colormap_get_system(), &white, 1,
+				  FALSE, FALSE, &success);
+
+	gdk_color_parse("Green", &green);
+	gdk_colormap_alloc_colors(gdk_colormap_get_system(), &green, 1,
+				  FALSE, FALSE, &success);
+
+	// retrieve addr by tab name
+	tab = gtk_notebook_get_nth_page(nb, page);
+	label = gtk_notebook_get_tab_label(nb, tab);
+	text = gtk_label_get_text(GTK_LABEL(label));
+    sscanf(text, "%06x", &tab_adr);
+
+	// get list pointer (we have 1 child)
+	l = gtk_container_get_children(GTK_CONTAINER(nb));
+	elt = g_list_nth(l, page);
+	list = GTK_WIDGET(elt->data);
+	view = GTK_TREE_VIEW(list);
+	model = gtk_tree_view_get_model(view);
+	store = GTK_LIST_STORE(model);
+
+    // scroll mem
+    if(!IS_BOUNDED(tab_adr, blk_beg, tab_adr + DUMP_SIZE))
+    {
+        GtkNotebook *nb = GTK_NOTEBOOK(notebook);
+	    gint page = gtk_notebook_get_current_page(nb);
+
+        offset = (blk_beg - tab_adr) & 0xfffff0;
+        refresh_page(page, offset);
+
+        while(gtk_events_pending()) gtk_main_iteration();
+        tab_adr += offset;
+        tab_adr &= 0xffffff;
+    }
+
+    // change background color
+    for(valid = gtk_tree_model_get_iter_first(model, &iter), addr = tab_adr;
+        valid && (addr - tab_adr < DUMP_SIZE); 
+        valid = gtk_tree_model_iter_next(model, &iter), addr += 0x10)
+    {
+        // clear selection
+        for(i = 0; i < 16; i++)
+            gtk_list_store_set(store, &iter, i + COL_S0, &white, -1);
+
+        if(addr + 16 <= blk_beg)
+            continue;
+
+        if(addr > blk_end)
+            continue;
+
+        start = !addr ? blk_beg : blk_beg % addr;
+        if(start > 15) start = 0;
+
+        stop = !addr ? blk_end : blk_end % addr;
+        if(stop > 15) stop = 16;
+
+        // set selection
+        for(i = start; (i < 16) && (i < stop); i++)
+            gtk_list_store_set(store, &iter, i + COL_S0, &green, -1);
+    }
+
+    return 0;
+}
+
+// searching engine context
+static gchar *old_str = NULL;
+static gint ascii = !0;
+static gint casse = !0;
+static uint32_t blk_adr = 0x000000;
+static gint blk_len = 0;
+
+static void search_next(void)
+{
+    if(search_engine(old_str, ascii, casse, &blk_adr, &blk_len))
+    {
+        search_highlight(blk_adr, blk_adr + blk_len, !0);
+        while(gtk_events_pending()) gtk_main_iteration();
+    }
+
+    blk_adr += blk_len;
+}
+
+gint display_dbgmem_search(uint32_t addr)
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *entry, *check1, *check2;
+	gint result;
+	gchar *str;
+	gint ret = -1;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_mem-2.glade"), "dbgmem_search", PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+    if(old_str == NULL)
+         old_str = g_strdup("");
+
+	entry = glade_xml_get_widget(xml, "entry1");
+	gtk_entry_set_text(GTK_ENTRY(entry), old_str);
+
+    check1 = glade_xml_get_widget(xml, "checkbutton1");    
+    check2 = glade_xml_get_widget(xml, "checkbutton2");
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check2), TRUE);
+
+	dbox = glade_xml_get_widget(xml, "dbgmem_search");
+	/* Find, Find Next, Cancel */
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_APPLY, GTK_RESPONSE_CANCEL,-1);
+	
+    
+    for(result = 0;;)
+    {
+        result = gtk_dialog_run(GTK_DIALOG(dbox));
+
+        if((result == GTK_RESPONSE_CANCEL) || 
+            (result == GTK_RESPONSE_DELETE_EVENT))
+            break;
+
+        if(result == GTK_RESPONSE_OK)
+        {
+            blk_adr = addr;	//0x000000;
+            blk_len = 0;
+        }
+
+        //printf("searching at $%x\n", blk_adr);
+
+        // find first/next
+	    str = (gchar *)gtk_entry_get_text(GTK_ENTRY(entry));
+
+        g_free(old_str);
+        old_str = g_strdup(str);
+
+        ascii = GTK_TOGGLE_BUTTON(check1)->active;
+        casse = GTK_TOGGLE_BUTTON(check2)->active;
+
+        gtk_widget_set_sensitive(entry, FALSE);
+        while(gtk_events_pending()) gtk_main_iteration();
+
+	    if(search_engine(old_str, ascii, casse, &blk_adr, &blk_len))
+        {
+            search_highlight(blk_adr, blk_adr + blk_len, !0);
+            while(gtk_events_pending()) gtk_main_iteration();
+        }
+
+        gtk_widget_set_sensitive(entry, TRUE);
+        while(gtk_events_pending()) gtk_main_iteration();
+
+        blk_adr += blk_len;
+        blk_adr &= 0xffffff;
+	}
+
+	gtk_widget_destroy(dbox);
+	return ret;
+}
diff --git a/src/gui/debugger/dbg_mem.h b/src/gui/debugger/dbg_mem.h
new file mode 100644
index 0000000..0c0ff22
--- /dev/null
+++ b/src/gui/debugger/dbg_mem.h
@@ -0,0 +1,37 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_mem.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+GtkWidget* dbgmem_create_window(void);
+GtkWidget* dbgmem_display_window(void);
+void dbgmem_refresh_window(void);
+
+void dbgmem_add_tab(uint32_t addr);
+
+gint display_dbgmem_address(uint32_t *addr);
+gint display_dbgmem_search(uint32_t addr);
diff --git a/src/gui/debugger/dbg_pclog.c b/src/gui/debugger/dbg_pclog.c
new file mode 100644
index 0000000..d591577
--- /dev/null
+++ b/src/gui/debugger/dbg_pclog.c
@@ -0,0 +1,225 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_pclog.c 2818 2009-05-02 19:46:04Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+
+enum { 
+	    COL_ADDR, COL_FONT
+};
+#define CLIST_NVCOLS	(1)		// 1 visible columns
+#define CLIST_NCOLS		(2)		// 1 real columns
+
+static GtkListStore* clist_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkListStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+    const gchar *text[CLIST_NVCOLS] = { _("Address") };
+    gint i;
+	
+	store = gtk_list_store_new(CLIST_NCOLS,
+				G_TYPE_STRING, G_TYPE_STRING,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+  
+	for(i = COL_ADDR; i <= COL_ADDR; i++)
+	{
+		renderer = gtk_cell_renderer_text_new();
+		set_renderer_pad(renderer);
+		gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+			"font", COL_FONT,
+            "text", i,
+			NULL);
+	}
+    
+    for (i = 0; i < CLIST_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+
+	return store;
+}
+
+static void clist_populate(GtkListStore *store)
+{
+    int i;
+
+    for(i = 0; i < logger.pclog_size; i++)
+    {
+        GtkTreeIter iter;
+        uint32_t addr;
+        gchar *str;
+
+        addr = logger.pclog_buf[(logger.pclog_ptr + i) % logger.pclog_size];
+        str = g_strdup_printf("%06x", addr);
+    
+        gtk_list_store_append(store, &iter);
+		gtk_list_store_set(store, &iter, 
+		COL_ADDR, str, 
+		-1);
+
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+		
+		g_free(str);
+    }
+}
+
+static void clist_refresh(GtkListStore *store)
+{
+	gtk_list_store_clear(store);
+	clist_populate(store);
+}
+
+static GtkListStore *store = NULL;
+
+/*
+	Display registers window
+*/
+GtkWidget* dbgpclog_create_window(void)
+{
+	GladeXML *xml = NULL;
+	GtkWidget *dbox;
+    GtkWidget *data;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_pclog-2.glade"), "dbgpclog_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgpclog_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+	data = glade_xml_get_widget(xml, "treeview1");
+    store = clist_create(data);
+	clist_populate(store);
+
+	gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
+
+	return dbox;
+}
+
+GtkWidget* dbgpclog_display_window(void)
+{
+#ifdef WND_STATE
+	if(!options3.pclog.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(dbgw.pclog), options3.pclog.rect.w, options3.pclog.rect.h);
+		gtk_window_move(GTK_WINDOW(dbgw.pclog), options3.pclog.rect.x, options3.pclog.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(dbgw.pclog));
+#endif
+
+	if(!GTK_WIDGET_VISIBLE(dbgw.pclog) && !options3.pclog.closed)
+		gtk_widget_show(dbgw.pclog);
+
+	return dbgw.pclog;
+}
+
+void dbgpclog_refresh_window(void)
+{
+	WND_TMR_START();
+
+	if(!options3.pclog.closed)
+	{
+		clist_refresh(store);
+	}
+
+	WND_TMR_STOP("Pclog Refresh Time");
+}
+
+GLADE_CB gboolean
+on_pclog_button_press_event        (GtkWidget       *widget,
+                                    GdkEventButton  *event,
+                                    gpointer         user_data)
+{		
+	GtkWidget *list = GTK_WIDGET(widget);
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+
+	// is double click ?
+	if(event->type != GDK_2BUTTON_PRESS)
+		return FALSE;
+	
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	l = gtk_tree_selection_get_selected_rows(selection, &model);
+	if(l != NULL)
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+        gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+        uint32_t addr;
+		
+		// get address
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, COL_ADDR, &row_text[COL_ADDR], -1);
+
+		// populate code
+		sscanf(row_text[COL_ADDR], "%x", &addr);
+		dbgcode_disasm_at(addr);
+
+        g_strfreev(row_text);
+    }
+
+	// free selection
+	g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+	g_list_free (l);
+
+    return FALSE;
+}
diff --git a/src/gui/debugger/dbg_pclog.h b/src/gui/debugger/dbg_pclog.h
new file mode 100644
index 0000000..d167c7f
--- /dev/null
+++ b/src/gui/debugger/dbg_pclog.h
@@ -0,0 +1,31 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+GtkWidget* dbgpclog_create_window(void);
+GtkWidget* dbgpclog_display_window(void);
+void dbgpclog_refresh_window(void);
diff --git a/src/gui/debugger/dbg_regs.c b/src/gui/debugger/dbg_regs.c
new file mode 100644
index 0000000..3babf03
--- /dev/null
+++ b/src/gui/debugger/dbg_regs.c
@@ -0,0 +1,556 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_regs.c 2825 2009-05-06 19:48:47Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004-2005, Romain Li�vin
+ *  Copyright (c) 2007, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <ctype.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+
+#define FLAG_T	15
+#define FLAG_S	13
+#define FLAG_X	4
+#define FLAG_N	3
+#define FLAG_Z	2
+#define FLAG_V	1
+#define FLAG_C	0
+
+typedef struct
+{
+	GtkWidget	*d[8];
+	GtkWidget	*a[8];
+	GtkWidget	*pc;
+	GtkWidget	*sr;
+	GtkWidget	*usp, *ssp;
+
+	GtkWidget	*t, *s, *i;
+	GtkWidget	*x, *n, *z, *v, *c;
+} WidgetRegs;
+
+static WidgetRegs	wregs = { 0 };
+static GdkColor red, black;
+
+static int validate_value(const char *str, int ndigits)
+{
+	int i;
+	
+	if((int)strlen(str) > ndigits)
+	 	return 0;
+	
+	for(i = 0; (i < ndigits) && (i < (int)strlen(str)); i++)
+	{
+		if(!isxdigit(str[i]))
+			return 0;
+	}
+	
+	return !0;
+}
+
+GLADE_CB void
+on_dbgregs_checkbutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+static void change_widget_color(GtkWidget *widget, int changed)
+{
+#if 1
+	gtk_widget_modify_text(widget, GTK_STATE_NORMAL, changed ? &red : &black);
+#endif
+}
+
+static void labels_refresh(void)
+{
+	int i;
+	int changed;
+	uint32_t data, addr;
+	gchar *str;
+
+	// refresh Ax
+	for(i = 0; i < 8; i++)
+	{
+		changed = ti68k_register_get_addr(i, &addr);
+		str = g_strdup_printf("%08x", addr);
+		gtk_entry_set_text(GTK_ENTRY(wregs.a[i]), str);
+		change_widget_color(wregs.a[i], changed);
+		g_free(str);
+	}
+
+	// refresh Dx
+	for(i = 0; i < 8; i++)
+	{
+		changed = ti68k_register_get_data(i, &data);
+		str = g_strdup_printf("%08x", data);
+		gtk_entry_set_text(GTK_ENTRY(wregs.d[i]), str);
+		change_widget_color(wregs.d[i], changed);
+		g_free(str);
+	}
+
+	// refresh misc register
+	changed = ti68k_register_get_pc(&data);
+	str = g_strdup_printf("%06x", data);
+	gtk_entry_set_text(GTK_ENTRY(wregs.pc), str);
+	change_widget_color(wregs.pc, changed);
+	g_free(str);
+
+	changed = ti68k_register_get_usp(&data);
+	str = g_strdup_printf("%06x", data);
+	gtk_entry_set_text(GTK_ENTRY(wregs.usp), str);
+	change_widget_color(wregs.usp, changed);
+	g_free(str);
+
+	changed = ti68k_register_get_ssp(&data);
+	str = g_strdup_printf("%06x", data);
+	gtk_entry_set_text(GTK_ENTRY(wregs.ssp), str);
+	change_widget_color(wregs.ssp, changed);
+	g_free(str);
+
+	changed = ti68k_register_get_sr(&data);
+	str = g_strdup_printf("%04x", data);
+	gtk_entry_set_text(GTK_ENTRY(wregs.sr), str);
+	change_widget_color(wregs.sr, changed);
+	g_free(str);
+
+	// refresh SR
+	ti68k_register_get_sr(&data);
+
+	gtk_spin_button_set_value(GTK_SPIN_BUTTON(wregs.i), (data >> 8) & 7);
+
+	g_signal_handlers_block_by_func(GTK_OBJECT(wregs.t), on_dbgregs_checkbutton_toggled, NULL);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wregs.t), data & (1 << FLAG_T));
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(wregs.t), on_dbgregs_checkbutton_toggled, NULL);
+
+	g_signal_handlers_block_by_func(GTK_OBJECT(wregs.s), on_dbgregs_checkbutton_toggled, NULL);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wregs.s), data & (1 << FLAG_S));
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(wregs.s), on_dbgregs_checkbutton_toggled, NULL);
+
+	g_signal_handlers_block_by_func(GTK_OBJECT(wregs.x), on_dbgregs_checkbutton_toggled, NULL);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wregs.x), data & (1 << FLAG_X));
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(wregs.x), on_dbgregs_checkbutton_toggled, NULL);
+
+	g_signal_handlers_block_by_func(GTK_OBJECT(wregs.n), on_dbgregs_checkbutton_toggled, NULL);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wregs.n), data & (1 << FLAG_N));
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(wregs.n), on_dbgregs_checkbutton_toggled, NULL);
+
+	g_signal_handlers_block_by_func(GTK_OBJECT(wregs.z), on_dbgregs_checkbutton_toggled, NULL);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wregs.z), data & (1 << FLAG_Z));
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(wregs.z), on_dbgregs_checkbutton_toggled, NULL);
+
+	g_signal_handlers_block_by_func(GTK_OBJECT(wregs.v), on_dbgregs_checkbutton_toggled, NULL);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wregs.v), data & (1 << FLAG_V));
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(wregs.v), on_dbgregs_checkbutton_toggled, NULL);
+
+	g_signal_handlers_block_by_func(GTK_OBJECT(wregs.c), on_dbgregs_checkbutton_toggled, NULL);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wregs.c), data & (1 << FLAG_C));
+	g_signal_handlers_unblock_by_func(GTK_OBJECT(wregs.c), on_dbgregs_checkbutton_toggled, NULL);
+}
+
+/*
+	Display registers window
+*/
+GtkWidget* dbgregs_create_window(void)
+{
+	GladeXML *xml = NULL;
+	GtkWidget *dbox;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_regs-2.glade"), "dbgregs2_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgregs2_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+	wregs.d[0] = glade_xml_get_widget(xml, "entry10");
+	wregs.d[1] = glade_xml_get_widget(xml, "entry11");
+	wregs.d[2] = glade_xml_get_widget(xml, "entry12");
+	wregs.d[3] = glade_xml_get_widget(xml, "entry13");
+	wregs.d[4] = glade_xml_get_widget(xml, "entry14");
+	wregs.d[5] = glade_xml_get_widget(xml, "entry15");
+	wregs.d[6] = glade_xml_get_widget(xml, "entry16");
+	wregs.d[7] = glade_xml_get_widget(xml, "entry17");
+
+	wregs.a[0] = glade_xml_get_widget(xml, "entry20");
+	wregs.a[1] = glade_xml_get_widget(xml, "entry21");
+	wregs.a[2] = glade_xml_get_widget(xml, "entry22");
+	wregs.a[3] = glade_xml_get_widget(xml, "entry23");
+	wregs.a[4] = glade_xml_get_widget(xml, "entry24");
+	wregs.a[5] = glade_xml_get_widget(xml, "entry25");
+	wregs.a[6] = glade_xml_get_widget(xml, "entry26");
+	wregs.a[7] = glade_xml_get_widget(xml, "entry27");
+
+	wregs.usp = glade_xml_get_widget(xml, "entry31");
+	wregs.ssp = glade_xml_get_widget(xml, "entry32");
+	wregs.pc = glade_xml_get_widget(xml, "entry33");
+	wregs.sr = glade_xml_get_widget(xml, "entry34");
+
+	wregs.t = glade_xml_get_widget(xml, "checkbutton41");
+	wregs.s = glade_xml_get_widget(xml, "checkbutton42");
+	wregs.i = glade_xml_get_widget(xml, "spinbutton44");
+	wregs.x = glade_xml_get_widget(xml, "checkbutton51");
+	wregs.n = glade_xml_get_widget(xml, "checkbutton52");
+	wregs.z = glade_xml_get_widget(xml, "checkbutton53");
+	wregs.v = glade_xml_get_widget(xml, "checkbutton54");
+	wregs.c = glade_xml_get_widget(xml, "checkbutton55");
+
+	// Change for a fixed size font
+	if(!options3.dbg_font_type && options3.dbg_font_name)
+	{
+		PangoContext *context;
+		PangoFontDescription *desc;
+		const gchar *family;
+		int size;
+		int i;
+		
+		context = gtk_widget_get_pango_context(wregs.pc);
+		desc = pango_context_get_font_description(context);
+		family = pango_font_description_get_family(desc);
+		size = pango_font_description_get_size(desc);
+
+		pango_font_description_set_family(desc, "Courier");
+		pango_font_description_set_size(desc, (int)(size*0.8));
+
+		gtk_widget_modify_font(wregs.pc, desc);
+		gtk_widget_modify_font(wregs.sr, desc);
+		gtk_widget_modify_font(wregs.usp, desc);
+		gtk_widget_modify_font(wregs.ssp, desc);
+		for(i = 0; i < 8; i++)
+		{
+			gtk_widget_modify_font(wregs.d[i], desc);
+			gtk_widget_modify_font(wregs.a[i], desc);
+		}
+	}
+	else
+	{
+		PangoFontDescription *desc;
+		int i;
+
+		desc = pango_font_description_from_string(options3.dbg_font_name);
+
+		gtk_widget_modify_font(wregs.pc, desc);
+		gtk_widget_modify_font(wregs.sr, desc);
+		gtk_widget_modify_font(wregs.usp, desc);
+		gtk_widget_modify_font(wregs.ssp, desc);
+		for(i = 0; i < 8; i++)
+		{
+			gtk_widget_modify_font(wregs.d[i], desc);
+			gtk_widget_modify_font(wregs.a[i], desc);
+		}
+	}
+
+	// Allocate colors
+	{
+		gboolean success;
+
+		gdk_color_parse("Black", &black);
+		gdk_colormap_alloc_colors(gdk_colormap_get_system(), &black, 1,
+				  FALSE, FALSE, &success);
+		gdk_color_parse("Red", &red);
+		gdk_colormap_alloc_colors(gdk_colormap_get_system(), &red, 1,
+				  FALSE, FALSE, &success);
+	}
+
+	return dbox;
+}
+
+GtkWidget* dbgregs_display_window(void)
+{
+#ifdef WND_STATE
+	if(!options3.regs.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(dbgw.regs), options3.regs.rect.w, options3.regs.rect.h);
+		gtk_window_move(GTK_WINDOW(dbgw.regs), options3.regs.rect.x, options3.regs.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(dbgw.regs));
+#endif
+
+	if(!GTK_WIDGET_VISIBLE(dbgw.regs) && !options3.regs.closed)
+		gtk_widget_show(dbgw.regs);
+
+	return dbgw.regs;
+}
+
+void dbgregs_refresh_window(void)
+{
+	WND_TMR_START();
+
+	if(!options3.regs.closed)
+	{
+		labels_refresh();
+	}
+
+	WND_TMR_STOP("Registers Refresh Time");
+}
+
+GLADE_CB gboolean
+on_dbgregs_key_press_event             (GtkWidget       *widget,
+                                        GdkEventKey     *event,
+                                        gpointer         user_data)
+{
+	const gchar *label = gtk_label_get_text(GTK_LABEL(widget));
+	const gchar *text = gtk_entry_get_text(GTK_ENTRY(user_data));
+	uint32_t value;
+	int n = label[1] - '0';
+
+	if(event->keyval != GDK_Return && event->keyval != GDK_KP_Enter)
+		return FALSE;
+
+	if(label[0] == 'A')
+	{
+		if(validate_value(text, 8))
+		{
+			sscanf(text, "%x", &value);			
+			ti68k_register_set_addr(n, value);
+		}
+
+		if((n == 6) || (n == 7))
+			dbgstack_refresh_window();
+	} 
+	else if(label[0] == 'D')
+	{
+		if(validate_value(text, 8))
+		{
+			sscanf(text, "%x", &value);			
+			ti68k_register_set_data(n, value);
+		}
+	}
+	else if(!strcmp(label, "PC="))
+	{
+		if(validate_value(text, 6))
+		{
+			sscanf(text, "%x", &value);			
+			ti68k_register_set_pc(value);
+		}
+	}
+	else if(!strcmp(label, "USP="))
+	{
+		if(validate_value(text, 6))
+		{
+			sscanf(text, "%x", &value);			
+			ti68k_register_set_usp(value);
+		}
+	}
+	else if(!strcmp(label, "SSP="))
+	{
+		if(validate_value(text, 6))
+		{
+			sscanf(text, "%x", &value);			
+			ti68k_register_set_ssp(value);
+		}
+	}
+	else if(!strcmp(label, "SR="))
+	{
+		if(validate_value(text, 4))
+		{
+			sscanf(text, "%x", &value);			
+			ti68k_register_set_sr(value);
+
+			dbgregs_refresh_window();
+            dbgstack_refresh_window();
+		}
+	}
+
+	labels_refresh();
+	return TRUE;
+}
+
+GLADE_CB void
+on_dbgregs_checkbutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	const gchar *label;
+	gboolean state;
+	uint32_t data;
+	gchar *str;
+
+	label = gtk_button_get_label(GTK_BUTTON(togglebutton));
+	state = gtk_toggle_button_get_active(togglebutton);
+
+	ti68k_register_get_sr(&data);
+
+	switch(label[0])
+	{
+	case 'T':
+		data &= ~(1 << FLAG_T);
+		data |= (state << FLAG_T);
+	break;
+	case 'S':
+		data &= ~(1 << FLAG_S);
+		data |= (state << FLAG_S);
+	break;
+	case 'X':
+		data &= ~(1 << FLAG_X);
+		data |= (state << FLAG_X);
+	break;
+	case 'N':
+		data &= ~(1 << FLAG_N);
+		data |= (state << FLAG_N);
+	break;
+	case 'Z':
+		data &= ~(1 << FLAG_Z);
+		data |= (state << FLAG_Z);
+	break;
+	case 'V':
+		data &= ~(1 << FLAG_V);
+		data |= (state << FLAG_V);
+	break;
+	case 'C':
+		data &= ~(1 << FLAG_C);
+		data |= (state << FLAG_C);
+	break;
+	default:
+	return;
+	}
+
+	ti68k_register_set_sr(data);
+
+	str = g_strdup_printf("%04x", data);
+	gtk_entry_set_text(GTK_ENTRY(wregs.sr), str);
+	g_free(str);
+
+	// update usp <=> ssp
+    dbgregs_refresh_window();
+    dbgstack_refresh_window();
+}
+
+
+GLADE_CB void
+on_dbgregs_spinbutton_changed          (GtkEditable     *editable,
+                                        gpointer         user_data)
+{
+	int i;
+	uint32_t data;
+	gchar *str;
+
+	i = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable));
+
+	ti68k_register_get_sr(&data);
+	data &= ~0x700;
+	data |= (i << 8);
+	ti68k_register_set_sr(data);
+
+	str = g_strdup_printf("%04x", data);
+	gtk_entry_set_text(GTK_ENTRY(wregs.sr), str);
+	g_free(str);
+}
+
+static GtkWidget* display_dbgregs_popup_menu(void);
+static uint32_t value = 0;
+
+GLADE_CB gboolean
+on_dbgregs_button_press_event          (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+	if (event->type == GDK_2BUTTON_PRESS)
+	{
+		// select all text
+		gtk_editable_select_region(GTK_EDITABLE(user_data), 0, -1);
+		return TRUE;
+	}
+	else if (event->button == 3)
+    {
+        GdkEventButton *bevent;
+        GtkWidget *menu;  
+		const gchar *label = gtk_label_get_text(GTK_LABEL(widget));
+		const gchar *text;
+		int n = label[1] - '0';
+
+		if(label[0] == 'A')
+			text = gtk_entry_get_text(GTK_ENTRY(wregs.a[n]));
+		else if(label[0] == 'D')
+			text = gtk_entry_get_text(GTK_ENTRY(wregs.d[n]));
+		else if(!strcmp(label, "PC="))
+			text = gtk_entry_get_text(GTK_ENTRY(wregs.pc));
+		else if(!strcmp(label, "USP="))
+			text = gtk_entry_get_text(GTK_ENTRY(wregs.usp));
+		else if(!strcmp(label, "SSP="))
+			text = gtk_entry_get_text(GTK_ENTRY(wregs.ssp));
+
+        sscanf(text, "%x", &value);
+
+        // popup menu
+       	bevent = (GdkEventButton *) (event);
+        menu = display_dbgregs_popup_menu();
+
+		gtk_menu_popup(GTK_MENU(menu),
+				   NULL, NULL, NULL, NULL,
+				   bevent->button, bevent->time);
+	    gtk_widget_show(menu);
+
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+/***** Popup menu *****/
+
+/*
+	Display popup menu (right click)
+*/
+static GtkWidget* display_dbgregs_popup_menu(void)
+{
+	GladeXML *xml;
+	GtkWidget *menu;
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("dbg_regs-2.glade"), "dbgregs_popup",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	menu = glade_xml_get_widget(xml, "dbgregs_popup");
+	return menu;
+}
+
+GLADE_CB void
+on_go_to_address4_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    if(value == -1)
+        return;
+    
+    dbgmem_add_tab(value);
+
+    value = -1;
+}
diff --git a/src/gui/debugger/dbg_regs.h b/src/gui/debugger/dbg_regs.h
new file mode 100644
index 0000000..663a67a
--- /dev/null
+++ b/src/gui/debugger/dbg_regs.h
@@ -0,0 +1,33 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_regs.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+GtkWidget* dbgregs_create_window(void);
+GtkWidget* dbgregs_display_window(void);
+void dbgregs_refresh_window(void);
+
+gint dbgsr_display_dbox(void);
diff --git a/src/gui/debugger/dbg_romcall.c b/src/gui/debugger/dbg_romcall.c
new file mode 100644
index 0000000..6e310cf
--- /dev/null
+++ b/src/gui/debugger/dbg_romcall.c
@@ -0,0 +1,264 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_romcall.c 2591 2007-07-05 11:36:10Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <string.h>
+
+#include "intl.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "romcalls.h"
+#include "dbg_code.h"
+#include "dbg_mem.h"
+
+enum {
+		COL_ID, COL_NAME, COL_ADDR, COL_FULL
+};
+#define CLIST_NVCOLS	(4)		// 3 visible columns
+#define CLIST_NCOLS		(4)		// 3 real columns
+
+#define FONT_NAME	"courier"
+
+enum {
+	SORT_BY_NAME, SORT_BY_ADDR, SORT_BY_ID,
+};
+static gint order = SORT_BY_NAME;
+
+GLADE_CB gboolean    
+on_combo_entry1_match_selected             (GtkEntryCompletion *widget,
+                                            GtkTreeModel *model,
+                                            GtkTreeIter *iter,
+                                            gpointer user_data);
+
+static GtkProgressBar *pbar = NULL;
+
+static void clist_populate(GtkListStore *store)
+{
+	GList *lst, *ptr;
+	gchar *path;
+	gint result;
+	gint i, n;
+	static int old_order = SORT_BY_NAME;
+
+	// (re)load symbols
+	path = g_strconcat(inst_paths.misc_dir, "romcalls.txt", NULL);
+	result = ti68k_debug_load_symbols(path);
+	g_free(path);
+
+	if((result == -4) && (order == old_order))
+		return;				// already loaded
+	else if(result == -3)	// no rom calls
+		gtk_list_store_clear(store);
+
+	// sort rom calls
+	switch(order)
+	{
+	case SORT_BY_NAME: lst = romcalls_sort_by_iname(); break;
+	case SORT_BY_ADDR: lst = romcalls_sort_by_addr(); break;
+	case SORT_BY_ID:   lst = romcalls_sort_by_id(); break;
+	default:lst = romcalls_sort_by_iname(); break;
+	}
+	if(lst == NULL)	
+		return;
+
+	// show progress bar
+	n = g_list_length(lst);
+	if(pbar != NULL)
+		gtk_widget_show(GTK_WIDGET(pbar));
+
+	// fill storage
+	gtk_list_store_clear(store);
+	for(ptr = lst, i=0; ptr != NULL; ptr = g_list_next(ptr), i++)
+	{
+		uint32_t addr = ROMCALL_ADDR(ptr);
+		const gchar *name = ROMCALL_NAME(ptr);
+		int id = ROMCALL_ID(ptr);
+		gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+		GtkTreeIter iter;
+
+		if(!strcmp(name, "unknown") || (name == NULL))
+			continue;
+
+		row_text[0] = g_strdup_printf("#%03x", id);
+		row_text[1] = g_strdup(name);
+		row_text[2] = g_strdup_printf("[$%x]", addr);
+		row_text[3] = g_strdup_printf("%s [$%x] - #%03x", name, addr, id);
+		//printf("<%s>\n", row_text[3]);
+
+		gtk_list_store_append(store, &iter);
+	    gtk_list_store_set(store, &iter, 
+	    COL_ID, row_text[0], 
+		COL_NAME, row_text[1],
+        COL_ADDR, row_text[2],
+		COL_FULL, row_text[3],
+		-1);
+
+		if(!(i % 50))
+		{
+			if(pbar != NULL)
+			{
+				gtk_progress_bar_set_fraction(pbar, (gdouble)i / n);
+				while(gtk_events_pending())	gtk_main_iteration();
+			}
+		}
+
+		g_strfreev(row_text);
+	}
+
+	if(pbar != NULL)
+		gtk_widget_hide(GTK_WIDGET(pbar));
+	old_order = order;
+}
+
+static GtkListStore *store = NULL;
+
+void dbgromcall_create_window(GladeXML *xml)
+{
+	GtkTreeModel *model;
+	GtkComboBox *combo;
+	GtkEntry *entry;
+	GtkEntryCompletion* completion;
+	gpointer data;
+
+	pbar = data = glade_xml_get_widget(xml, "progressbar1");
+	combo = data = glade_xml_get_widget(xml, "comboboxentry1");
+	entry = GTK_ENTRY(GTK_BIN(combo)->child);	
+
+	// create storage
+	store = gtk_list_store_new(CLIST_NCOLS,
+				G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+
+	// and set storage
+	gtk_combo_box_set_model(combo, model);
+	gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(combo), COL_FULL);
+
+	/* --- */
+
+	// set auto-completion
+	completion = gtk_entry_completion_new();
+	gtk_entry_set_completion(entry, completion);
+	gtk_entry_completion_set_model(completion, model);
+	gtk_entry_completion_set_text_column (completion, COL_FULL);
+	g_signal_connect(G_OBJECT(completion), "match-selected", 
+		G_CALLBACK(on_combo_entry1_match_selected), NULL);
+	//gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1);
+}
+
+void dbgromcall_refresh_window(void)
+{
+	clist_populate(store);
+}
+
+void dbgromcall_erase_window(GtkWidget *widget)
+{
+	GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget));
+	GtkListStore *store = GTK_LIST_STORE(model);
+	
+	gtk_list_store_clear(store);
+}
+
+static void goto_romcall(const char *str)
+{
+	gchar *ptr;
+	uint32_t addr;
+	int id;
+
+	ptr = strchr(str, '[');
+	if(ptr != NULL)
+	{
+		int ret = sscanf(ptr, "[$%x] - #%03x ", &addr, &id);
+		if(ret == 2)
+		{
+			if(addr < 0x200000)
+				dbgmem_add_tab(addr & 0xffffff);
+			else
+				dbgcode_disasm_at(addr & 0xffffff);
+		}
+	}
+}
+
+GLADE_CB void
+on_combo_entry1_changed                    (GtkComboBox *combobox,
+                                            gpointer user_data)
+{
+	GtkEntry *entry = GTK_ENTRY(GTK_BIN(combobox)->child);
+
+	gchar *str = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
+	goto_romcall(str);
+	g_free(str);
+}
+
+GLADE_CB gboolean    
+on_combo_entry1_match_selected             (GtkEntryCompletion *completion,
+                                            GtkTreeModel *model,
+                                            GtkTreeIter *iter,
+                                            gpointer user_data)
+{
+	gchar *str;
+
+	gtk_tree_model_get(model, iter, COL_FULL, &str, -1);
+	goto_romcall(str);
+	g_free(str);
+	return FALSE;
+}
+
+
+GLADE_CB void
+on_dbgcode_radiobutton1_toggled        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	// by name
+	order = SORT_BY_NAME;
+	dbgromcall_refresh_window();
+}
+
+GLADE_CB void
+on_dbgcode_radiobutton2_toggled        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	// by addr
+	order = SORT_BY_ADDR;
+	dbgromcall_refresh_window();
+}
+
+GLADE_CB void
+on_dbgcode_radiobutton3_toggled        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	// by id
+	order = SORT_BY_ID;
+	dbgromcall_refresh_window();
+}
diff --git a/src/gui/debugger/dbg_romcall.h b/src/gui/debugger/dbg_romcall.h
new file mode 100644
index 0000000..7702ff5
--- /dev/null
+++ b/src/gui/debugger/dbg_romcall.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+void dbgromcall_create_window(GladeXML *xml);
+void dbgromcall_refresh_window(void);
diff --git a/src/gui/debugger/dbg_stack.c b/src/gui/debugger/dbg_stack.c
new file mode 100644
index 0000000..aa5831a
--- /dev/null
+++ b/src/gui/debugger/dbg_stack.c
@@ -0,0 +1,429 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_stack.c 2825 2009-05-06 19:48:47Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gdk/gdkkeysyms.h>
+#include <stdlib.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+
+enum { 
+	    COL_ADDR, COL_DATA, COL_FONT
+};
+#define CLIST_NVCOLS	(2)		// 1 visible columns
+#define CLIST_NCOLS		(3)		// 1 real columns
+
+#define DUMP_SIZE       10
+
+static GtkListStore* clist_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkListStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+    const gchar *text[CLIST_NVCOLS] = { _("Address"), _("Value") };
+    gint i;
+	
+	store = gtk_list_store_new(CLIST_NCOLS,
+				G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, FALSE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+  
+	for(i = COL_ADDR; i <= COL_DATA; i++)
+	{
+		renderer = gtk_cell_renderer_text_new();
+		set_renderer_pad(renderer);
+		gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i,
+            "font", COL_FONT,
+			NULL);
+	}
+    
+    for (i = 0; i < CLIST_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+
+	return store;
+}
+
+#define	TARGET_SP	1
+#define TARGET_FP	2
+
+static void clist_populate(GtkListStore *store, gint target, gint offset)
+{
+    int i;
+    GtkTreeIter iter;
+    gchar *str;
+
+    uint32_t sp;
+    uint16_t data;
+
+	if(target == TARGET_SP)
+		ti68k_register_get_sp(&sp);
+	else if(target == TARGET_FP)
+		ti68k_register_get_addr(6, &sp);
+
+    for(i = 0+(offset>>1); i < DUMP_SIZE+(offset>>1); i++)
+    {
+        gtk_list_store_append(store, &iter);
+
+        str = g_strdup_printf(/*"0x%06x "*/"(%c%i):", /*sp + 2*i, */i > 0 ? '+' : i < 0 ? '-' : ' ', abs(2*i));
+		gtk_list_store_set(store, &iter, COL_ADDR, str, -1);
+        g_free(str);
+
+		data = mem_rd_word(sp+2*i);	
+		str = g_strdup_printf("%04x", data);
+        gtk_list_store_set(store, &iter, COL_DATA, str, -1);
+        g_free(str);
+
+		if(options3.dbg_font_type)
+			gtk_list_store_set(store, &iter, COL_FONT, options3.dbg_font_name, -1);
+
+    }
+}
+
+static GtkWidget *label;
+static GtkWidget *notebook;
+
+static void clist_refresh(GtkListStore *store, gint target)
+{
+	gtk_list_store_clear(store);
+	clist_populate(store, target, -4);
+
+    if(ti68k_debug_is_supervisor())
+        gtk_label_set_text(GTK_LABEL(label), "SSP");
+    else
+        gtk_label_set_text(GTK_LABEL(label), "USP");
+}
+
+static GtkListStore *store1 = NULL;
+static GtkListStore *store2 = NULL;
+
+/*
+	Display registers window
+*/
+GtkWidget* dbgstack_create_window(void)
+{
+	GladeXML *xml = NULL;
+	GtkWidget *dbox;
+    GtkWidget *data;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_stack-2.glade"), "dbgstack_window",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgstack_window");
+	if(options3.transient)
+		gtk_window_set_transient_for(GTK_WINDOW(dbox), GTK_WINDOW(main_wnd));
+
+	notebook = glade_xml_get_widget(xml, "notebook1");
+    gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook));
+
+	data = glade_xml_get_widget(xml, "treeview1");
+    store1 = clist_create(data);
+	clist_populate(store1, TARGET_SP, 0);
+
+	data = glade_xml_get_widget(xml, "treeview2");
+    store2 = clist_create(data);
+	clist_populate(store2, TARGET_FP, 0);
+
+    label = glade_xml_get_widget(xml, "label2");
+
+	gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
+
+	return dbox;
+}
+
+GtkWidget* dbgstack_display_window(void)
+{
+#ifdef WND_STATE
+	if(!options3.stack.minimized)
+	{
+		gtk_window_resize(GTK_WINDOW(dbgw.stack), options3.stack.rect.w, options3.stack.rect.h);
+		gtk_window_move(GTK_WINDOW(dbgw.stack), options3.stack.rect.x, options3.stack.rect.y);
+	}
+	else
+		gtk_window_iconify(GTK_WINDOW(dbgw.stack));
+#endif
+
+	if(!GTK_WIDGET_VISIBLE(dbgw.stack) && !options3.stack.closed)
+		gtk_widget_show(dbgw.stack);
+
+	return dbgw.stack;
+}
+
+void dbgstack_refresh_window(void)
+{
+	WND_TMR_START();
+
+	if(!options3.stack.closed)
+	{
+		clist_refresh(store1, TARGET_SP);
+		clist_refresh(store2, TARGET_FP);
+	}
+
+	WND_TMR_STOP("Heap Refresh Time");
+}
+
+GLADE_CB gboolean
+on_dbgstack_key_press_event           (GtkWidget       *widget,
+                                       GdkEventKey     *event,
+                                       gpointer         user_data)
+{
+    GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+    GtkTreeIter iter;
+    GtkTreePath *path;
+	
+	gchar *str;
+    gchar *row;
+    gint row_idx, row_max;
+    uint32_t min, max;
+    gint n;
+
+	// get min address
+    gtk_tree_model_get_iter_first(model, &iter);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "(%i)", &min);
+
+    // get max address
+    n = gtk_tree_model_iter_n_children(model, NULL);
+    gtk_tree_model_iter_nth_child(model, &iter, NULL, n-1);
+    gtk_tree_model_get(model, &iter, COL_ADDR, &str, -1);
+    sscanf(str, "(%i)", &max);
+
+	// retrieve cursor
+    gtk_tree_view_get_cursor(view, &path, NULL);
+    if(path == NULL)
+        return FALSE;
+
+	// get row
+    row_idx = row_max = -1;
+    row = gtk_tree_path_to_string(path);
+    sscanf(row, "%i", &row_idx);
+    g_free(row);
+    row_max = gtk_tree_model_iter_n_children(model, NULL) - 1;
+    //printf("row_idx = %i, row_max = %i\n", row_idx, row_max);
+    
+    // bind our key
+	switch(event->keyval) 
+	{
+    case GDK_Up:
+        if(row_max == -1)
+            break;
+        if(row_idx > 0)
+            break;
+
+        gtk_list_store_clear(store);
+        clist_populate(store, TARGET_SP, min-2);
+
+		path = gtk_tree_path_new_from_string("0");
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+
+        return TRUE;
+
+    case GDK_Down:
+        if(row_max == -1)
+            break;
+        if(row_idx < row_max)
+            break;
+
+		gtk_list_store_clear(store);
+        clist_populate(store, TARGET_SP, min+2);
+
+        str = g_strdup_printf("%i", row_max);
+        path = gtk_tree_path_new_from_string(str);
+		g_free(str);
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+
+        return TRUE;
+
+    case GDK_Page_Up:
+        if(row_max == -1)
+            break;
+
+        if(row_idx > 0)
+            break;
+
+		 gtk_list_store_clear(store);
+        clist_populate(store, TARGET_SP, min-10);
+
+		path = gtk_tree_path_new_from_string("0");
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+
+        return TRUE;
+
+    case GDK_Page_Down:
+        if(row_max == -1)
+            break;
+
+        if(row_idx < row_max)
+            break;
+
+        gtk_list_store_clear(store);
+        clist_populate(store, TARGET_SP, min+10);
+
+        str = g_strdup_printf("%i", row_max);
+        path = gtk_tree_path_new_from_string(str);
+		g_free(str);
+        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
+
+        return TRUE;
+
+	default:
+		return FALSE;
+	}
+
+	return FALSE;
+}
+
+static GtkWidget* display_dbgstack_popup_menu(void);
+static uint32_t value = 0;
+
+GLADE_CB gboolean
+on_dbgstack_button_press_event     (GtkWidget       *widget,
+                                    GdkEventButton  *event,
+                                    gpointer         user_data)
+{
+	GtkWidget *list = GTK_WIDGET(widget);
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	l = gtk_tree_selection_get_selected_rows(selection, &model);
+	if(l != NULL)
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+		gchar** row_text = g_malloc0((CLIST_NVCOLS + 1) * sizeof(gchar *));
+		uint16_t hi, lo;
+		
+		// get address
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, COL_DATA, &row_text[COL_DATA], -1);
+		sscanf(row_text[COL_DATA], "%x", &hi);
+
+		if(gtk_tree_model_iter_next(model, &iter) == FALSE)
+			return FALSE;
+		gtk_tree_model_get(model, &iter, COL_DATA, &row_text[COL_DATA], -1);
+		sscanf(row_text[COL_DATA], "%x", &lo);
+
+		value = (hi << 16) | lo;
+
+		g_strfreev(row_text);
+	}
+
+	if (l && event->type == GDK_2BUTTON_PRESS)
+	{	
+		dbgmem_add_tab(value);
+
+		g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+		g_list_free (l);
+
+		return TRUE;
+	}
+	else if(l && event->button == 3)
+	{
+		GdkEventButton *bevent;
+        GtkWidget *menu;  
+
+        // popup menu
+       	bevent = (GdkEventButton *) (event);
+        menu = display_dbgstack_popup_menu();
+
+		gtk_menu_popup(GTK_MENU(menu),
+				   NULL, NULL, NULL, NULL,
+				   bevent->button, bevent->time);
+	    gtk_widget_show(menu);
+
+		g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+		g_list_free (l);
+
+		return TRUE;
+	}
+
+    return FALSE;
+}
+
+/***** Popup menu *****/
+
+/*
+	Display popup menu (right click)
+*/
+static GtkWidget* display_dbgstack_popup_menu(void)
+{
+	GladeXML *xml;
+	GtkWidget *menu;
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("dbg_stack-2.glade"), "dbgstack_popup",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	menu = glade_xml_get_widget(xml, "dbgstack_popup");
+	return menu;
+}
+
+GLADE_CB void
+on_dbgstack_view_memory1_activate      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	dbgmem_add_tab(value);
+}
diff --git a/src/gui/debugger/dbg_stack.h b/src/gui/debugger/dbg_stack.h
new file mode 100644
index 0000000..2d9d1a2
--- /dev/null
+++ b/src/gui/debugger/dbg_stack.h
@@ -0,0 +1,31 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+GtkWidget* dbgstack_create_window(void);
+GtkWidget* dbgstack_display_window(void);
+void dbgstack_refresh_window(void);
diff --git a/src/gui/debugger/dbg_vectors.c b/src/gui/debugger/dbg_vectors.c
new file mode 100644
index 0000000..786b73f
--- /dev/null
+++ b/src/gui/debugger/dbg_vectors.c
@@ -0,0 +1,175 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_vectors.c 2753 2007-12-30 23:14:15Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "ti68k_int.h"
+#include "dbg_bkpts.h"
+
+enum { 
+	    COL_NUMBER, COL_NAME,
+};
+#define CLIST_NVCOLS	(2)		// 2 visible columns
+#define CLIST_NCOLS		(2)		// 2 real columns
+
+static GtkListStore* clist_create(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkListStore *store;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+    const gchar *text[CLIST_NVCOLS] = { _("Number"), _("Name") };
+    gint i;
+	
+	store = gtk_list_store_new(CLIST_NCOLS,
+				G_TYPE_INT, G_TYPE_STRING,
+				-1
+            );
+    model = GTK_TREE_MODEL(store);
+	
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+  
+	for(i = COL_NUMBER; i <= COL_NAME; i++)
+	{
+		renderer = gtk_cell_renderer_text_new();
+		gtk_tree_view_insert_column_with_attributes(view, -1, 
+            text[i], renderer, 
+            "text", i,
+			NULL);
+	}
+    
+    for (i = 0; i < CLIST_NVCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
+
+	return store;
+}
+
+static void clist_populate(GtkWidget *widget)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(widget);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+    GtkTreeIter iter;
+	gint i;
+
+	for(i = 0; i < 128; i++)
+	{
+	    gtk_list_store_append(store, &iter);
+		gtk_list_store_set(store, &iter, 
+		COL_NUMBER, i, 
+		COL_NAME, ti68k_exception_to_string(i),
+		-1);
+	}
+}
+
+static void clist_get_selection(GtkWidget *list)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(list);
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	GList *l;
+	
+	// get selection
+	selection = gtk_tree_view_get_selection(view);
+	for (l = gtk_tree_selection_get_selected_rows(selection, &model);
+	     l != NULL; l = l->next) 
+	{
+		GtkTreeIter iter;
+		GtkTreePath *path = l->data;
+		gint n;
+			
+		gtk_tree_model_get_iter(model, &iter, path);
+		gtk_tree_model_get(model, &iter, COL_NUMBER, &n, -1);
+		
+		ti68k_bkpt_add_exception(n);
+	}
+
+	// free selection
+	g_list_foreach (l, (GFunc)gtk_tree_path_free, NULL);
+	g_list_free (l);
+}
+
+gint dbgvectors_display_dbox(void)
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("dbg_vectors-2.glade"), "dbgvectors_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "dbgvectors_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+	gtk_window_resize(GTK_WINDOW(dbox), 320, 240);
+		
+	data = glade_xml_get_widget(xml, "treeview1");
+    clist_create(data);
+	clist_populate(data);	
+	
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		clist_get_selection(data);
+		dbgbkpts_refresh_window();
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
+
+
+
+
diff --git a/src/gui/debugger/dbg_vectors.h b/src/gui/debugger/dbg_vectors.h
new file mode 100644
index 0000000..aa482b2
--- /dev/null
+++ b/src/gui/debugger/dbg_vectors.h
@@ -0,0 +1,31 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_vectors.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint dbgvectors_display_dbox();
+void dbgvectors_refresh_window(void);
diff --git a/src/gui/debugger/dbg_wnds.c b/src/gui/debugger/dbg_wnds.c
new file mode 100644
index 0000000..0d1c803
--- /dev/null
+++ b/src/gui/debugger/dbg_wnds.c
@@ -0,0 +1,721 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_all.c 2707 2007-12-13 13:18:45Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2008, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#ifdef __WIN32__
+#include <gdk/gdk.h>
+#include <gdk/gdkwin32.h>
+#endif
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
+
+#include "intl.h"
+#include "ti68k_int.h"
+#include "struct.h"
+#include "dbg_wnds.h"
+#include "dbg_all.h"
+#include "dbg_wnds.h"
+#include "support.h"
+#include "paths.h"
+#include "engine.h"
+#include "dboxes.h"
+#include "rcfile.h"
+
+DbgOptions options3;
+DbgWidgets dbgw = { 0 };
+
+// make windows (un-)modifiable
+void dbgwnds_set_sensitivity(int state)
+{
+	if(options3.dbg_dock)
+		return;
+
+    gtk_widget_set_sensitive(dbgw.regs, state);
+    gtk_widget_set_sensitive(dbgw.bkpts, state);
+    gtk_widget_set_sensitive(dbgw.mem, state);
+    gtk_widget_set_sensitive(dbgw.pclog, state);
+    gtk_widget_set_sensitive(dbgw.stack, state);
+    gtk_widget_set_sensitive(dbgw.heap, state);
+	gtk_widget_set_sensitive(dbgw.iop, state);
+}
+
+// minimize all windows
+void dbgwnds_minimize_all(int all)
+{
+	if(options3.dbg_dock)
+		return;
+
+    if(GTK_WIDGET_VISIBLE(dbgw.regs))
+        gtk_window_iconify(GTK_WINDOW(dbgw.regs));
+    if(GTK_WIDGET_VISIBLE(dbgw.bkpts))
+        gtk_window_iconify(GTK_WINDOW(dbgw.bkpts));
+    if(GTK_WIDGET_VISIBLE(dbgw.mem))
+        gtk_window_iconify(GTK_WINDOW(dbgw.mem));
+    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
+        gtk_window_iconify(GTK_WINDOW(dbgw.pclog));
+    if(GTK_WIDGET_VISIBLE(dbgw.code) & all)
+        gtk_window_iconify(GTK_WINDOW(dbgw.code));
+    if(GTK_WIDGET_VISIBLE(dbgw.stack))
+        gtk_window_iconify(GTK_WINDOW(dbgw.stack));
+	if(GTK_WIDGET_VISIBLE(dbgw.heap))
+        gtk_window_iconify(GTK_WINDOW(dbgw.heap));
+	if(GTK_WIDGET_VISIBLE(dbgw.iop))
+        gtk_window_iconify(GTK_WINDOW(dbgw.iop));
+}
+
+// unminimize all windows
+void dbgwnds_unminimize_all(int all)
+{
+	if(options3.dbg_dock)
+		return;
+
+    if(GTK_WIDGET_VISIBLE(dbgw.regs))
+        gtk_window_deiconify(GTK_WINDOW(dbgw.regs));
+    if(GTK_WIDGET_VISIBLE(dbgw.bkpts))
+        gtk_window_deiconify(GTK_WINDOW(dbgw.bkpts));
+    if(GTK_WIDGET_VISIBLE(dbgw.mem))
+        gtk_window_deiconify(GTK_WINDOW(dbgw.mem));
+    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
+        gtk_window_deiconify(GTK_WINDOW(dbgw.pclog));
+    if(GTK_WIDGET_VISIBLE(dbgw.code) & all)
+        gtk_window_deiconify(GTK_WINDOW(dbgw.code));
+    if(GTK_WIDGET_VISIBLE(dbgw.stack))
+        gtk_window_deiconify(GTK_WINDOW(dbgw.stack));
+	if(GTK_WIDGET_VISIBLE(dbgw.heap))
+        gtk_window_deiconify(GTK_WINDOW(dbgw.heap));
+	if(GTK_WIDGET_VISIBLE(dbgw.iop))
+        gtk_window_deiconify(GTK_WINDOW(dbgw.iop));
+}
+
+// show all windows
+void dbgwnds_show_all(int all)
+{
+    if(options3.dbg_dock)
+		return;
+
+    if(!GTK_WIDGET_VISIBLE(dbgw.regs))
+        gtk_widget_show(dbgw.regs);
+    if(!GTK_WIDGET_VISIBLE(dbgw.bkpts))
+        gtk_widget_show(dbgw.bkpts);
+    if(!GTK_WIDGET_VISIBLE(dbgw.mem))
+        gtk_widget_show(dbgw.mem);
+    if(!GTK_WIDGET_VISIBLE(dbgw.pclog))
+        gtk_widget_show(dbgw.pclog);
+    if(!GTK_WIDGET_VISIBLE(dbgw.code) && all)
+        gtk_widget_show(dbgw.code);
+    if(!GTK_WIDGET_VISIBLE(dbgw.stack))
+        gtk_widget_show(dbgw.stack);
+	if(!GTK_WIDGET_VISIBLE(dbgw.heap))
+        gtk_widget_show(dbgw.heap);
+	if(!GTK_WIDGET_VISIBLE(dbgw.iop))
+        gtk_widget_show(dbgw.iop);
+}
+
+// or hide them
+void dbgwnds_hide_all(int all)
+{
+    if(options3.dbg_dock)
+		return;
+
+    if(GTK_WIDGET_VISIBLE(dbgw.regs))
+        gtk_widget_hide(dbgw.regs);
+    if(GTK_WIDGET_VISIBLE(dbgw.bkpts))
+        gtk_widget_hide(dbgw.bkpts);
+    if(GTK_WIDGET_VISIBLE(dbgw.mem))
+        gtk_widget_hide(dbgw.mem);
+    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
+        gtk_widget_hide(dbgw.pclog);
+    if(GTK_WIDGET_VISIBLE(dbgw.code) && all)
+        gtk_widget_hide(dbgw.code);
+    if(GTK_WIDGET_VISIBLE(dbgw.stack))
+        gtk_widget_hide(dbgw.stack);
+	if(GTK_WIDGET_VISIBLE(dbgw.heap))
+        gtk_widget_hide(dbgw.heap);
+	if(GTK_WIDGET_VISIBLE(dbgw.iop))
+        gtk_widget_hide(dbgw.iop);
+}
+
+/* Callbacks */
+
+// callbacks from dbg_code.c (window menu)
+// used to show/hide or minimize/un-minimize windows
+
+GLADE_CB void
+on_registers1_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+        gtk_widget_hide(dbgw.regs);
+  	else
+		gtk_widget_show(dbgw.regs);
+}
+
+
+GLADE_CB void
+on_breakpoints1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+        gtk_widget_hide(dbgw.bkpts);
+  	else
+        gtk_widget_show(dbgw.bkpts);
+}
+
+
+GLADE_CB void
+on_memory1_activate                    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+        gtk_widget_hide(dbgw.mem);
+  	else
+        gtk_widget_show(dbgw.mem);
+}
+
+GLADE_CB void
+on_pc_log1_activate                    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+        gtk_widget_hide(dbgw.pclog);
+  	else
+        gtk_widget_show(dbgw.pclog);
+}
+
+GLADE_CB void
+on_stack_frame1_activate                    (GtkMenuItem     *menuitem,
+                                             gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+        gtk_widget_hide(dbgw.stack);
+  	else
+        gtk_widget_show(dbgw.stack);
+}
+
+GLADE_CB void
+on_heap_frame1_activate                    (GtkMenuItem     *menuitem,
+                                             gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+        gtk_widget_hide(dbgw.heap);
+  	else
+        gtk_widget_show(dbgw.heap);
+}
+
+GLADE_CB void
+on_ioports_frame1_activate                    (GtkMenuItem     *menuitem,
+                                             gpointer         user_data)
+{
+    if(GTK_CHECK_MENU_ITEM(menuitem)->active != TRUE) 
+        gtk_widget_hide(dbgw.iop);
+  	else
+        gtk_widget_show(dbgw.iop);
+}
+
+GLADE_CB void
+on_transient1_activate                 (GtkMenuItem     *menu_item,
+                                        gpointer         user_data)
+{
+	// This make dbg wnd's as children of the main window.
+	// Thus, the taskbar is not filled-up with a lot of windows.
+	options3.transient = GTK_CHECK_MENU_ITEM(menu_item)->active;
+ 
+	msg_box1(_("Warning"), _("You will have to save configuration and restart TiEmu for changes to take effect!"));
+}
+
+GLADE_CB void
+on_dockmode1_activate                  (GtkMenuItem     *menu_item,
+                                        gpointer         user_data)
+{
+	msg_box1(_("Warning"), _("TiEmu is about to restart..."));
+
+#ifndef NO_GDB
+	// In GDB mode, we have to restart the engine here, otherwise
+	// gtk_debugger_close will call gdbcall_continue to do so and never
+	// return.
+	engine_start();
+#endif
+	gtk_debugger_close();
+	// Stop the engine before calling gtk_main_quit.
+	// Otherwise, it will keep running even when it is supposed to have
+	// been stopped by the debugger.
+	engine_stop();
+	if(options3.dbg_dock)
+		gtk_widget_destroy(dbgw.dock);
+
+	options3.dbg_dock = GTK_CHECK_MENU_ITEM(menu_item)->active;	
+
+	gtk_main_quit();
+}
+
+GLADE_CB void
+on_quit1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	gtk_debugger_close();
+}
+
+GLADE_CB void
+on_show_all1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	dbgwnds_show_all(0);
+}
+
+
+GLADE_CB void
+on_hide_all1_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	dbgwnds_hide_all(0);
+}
+
+GLADE_CB void
+on_minimize_all1_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    dbgwnds_minimize_all(0);
+}
+
+
+GLADE_CB void
+on_maximize_all1_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    dbgwnds_unminimize_all(0);
+}
+
+extern void options3_set_default(void);
+
+GLADE_CB void
+on_restore_all1_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	// restore windows with default settings
+	options3_set_default();
+}
+
+// reflects window state in menu
+void update_submenu(GtkWidget *widget, gpointer user_data)
+{
+    GtkMenuShell *shell = GTK_MENU_SHELL(widget);
+    GList *list = shell->children;
+    GList *elt;
+    GtkCheckMenuItem *item;
+
+    // regs
+    elt = g_list_nth(list, 0);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+	if(!options3.dbg_dock)
+	{
+		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_registers1_activate, NULL);
+		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.regs));
+		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_registers1_activate, NULL);
+	}
+	else
+		gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE);
+
+    // bkpts
+    elt = g_list_nth(list, 1);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+	if(!options3.dbg_dock)
+	{
+		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_breakpoints1_activate, NULL);
+		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.bkpts));
+		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_breakpoints1_activate, NULL);
+	}
+	else
+		gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE);
+
+    // mem
+    elt = g_list_nth(list, 2);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+	if(!options3.dbg_dock)
+	{
+		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_memory1_activate, NULL);
+		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.mem));
+		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_memory1_activate, NULL);
+	}
+	else
+		gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE);
+
+    // pclog
+    elt = g_list_nth(list, 3);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+    g_signal_handlers_block_by_func(GTK_OBJECT(item), on_pc_log1_activate, NULL);
+    gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.pclog));
+    g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_pc_log1_activate, NULL);
+
+    // stack
+    elt = g_list_nth(list, 4);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+	if(!options3.dbg_dock)
+	{
+		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_stack_frame1_activate, NULL);
+		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.stack));
+		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_stack_frame1_activate, NULL);
+	}
+	else
+		gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE);
+	
+	// heap
+    elt = g_list_nth(list, 5);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+	if(!options3.dbg_dock)
+	{
+		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_heap_frame1_activate, NULL);
+		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.heap));
+		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_heap_frame1_activate, NULL);
+	}
+	else
+		gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE);
+
+	// ioports
+	elt = g_list_nth(list, 6);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+    g_signal_handlers_block_by_func(GTK_OBJECT(item), on_ioports_frame1_activate, NULL);
+    gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.iop));
+    g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_ioports_frame1_activate, NULL);
+
+	// dock/multi mode
+	elt = g_list_nth(list, 8);
+	item = GTK_CHECK_MENU_ITEM(elt->data);
+    g_signal_handlers_block_by_func(GTK_OBJECT(item), on_dockmode1_activate, NULL);
+    gtk_check_menu_item_set_active(item, options3.dbg_dock);
+    g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_dockmode1_activate, NULL);
+
+	// transient mode
+	elt = g_list_nth(list, 9);
+    item = GTK_CHECK_MENU_ITEM(elt->data);
+    g_signal_handlers_block_by_func(GTK_OBJECT(item), on_transient1_activate, NULL);
+    gtk_check_menu_item_set_active(item, options3.transient);
+    g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_transient1_activate, NULL);
+
+	if(options3.dbg_dock)
+	{
+		int i;
+
+		for(i = 11; i <= 15; i++)
+		{
+			elt = g_list_nth(list, i);
+			gtk_widget_set_sensitive(GTK_WIDGET(elt->data), FALSE);
+		}
+	}
+}
+
+// callbacks from dbg_regs.c
+
+/* 
+	This function exists because GDK retrieves client coordinates, not window ones.
+	(Kevin: GDK uses GetClientRect and ClientToScreen).
+	We need that to save and restore windows position.
+*/
+void window_get_rect(GtkWidget *widget, GdkRect *rect)
+{
+	gtk_window_get_size(GTK_WINDOW(widget), &rect->w, &rect->h);
+
+#ifdef __WIN32__
+	{
+		BOOL bResult;
+		HWND hWnd = GDK_WINDOW_HWND(widget->window);
+		RECT lpRect;
+		GdkRectangle gdkRect;
+
+		bResult = GetWindowRect(hWnd, &lpRect);
+
+		rect->x = lpRect.left;
+		rect->y = lpRect.top;
+
+		// Now obtain and add the offset between GDK and Win32 coordinates
+		// (in the multi-screen case).
+		gdk_screen_get_monitor_geometry(gdk_screen_get_default(), 0, &gdkRect);
+		rect->x += gdkRect.x;
+		rect->y += gdkRect.y;
+	}
+#else
+	gdk_window_get_position(widget->window, &rect->x, &rect->y);
+#endif
+}
+
+GLADE_CB gboolean
+on_dbgregs_window_delete_event         (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide(widget);
+	return TRUE;
+}
+
+GLADE_CB void
+on_dbgregs_window_state_event		   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.regs.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.regs.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.regs.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// callbacks from dbg_pclog.c
+GLADE_CB gboolean
+on_dbgpclog_window_delete_event        (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide(widget);    
+    return TRUE;
+}
+
+GLADE_CB void
+on_dbgpclog_window_state_event		   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.pclog.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.pclog.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.pclog.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// callbacks from dbg_mem.c
+
+GLADE_CB gboolean
+on_dbgmem_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide(widget);    
+    return TRUE;
+}
+
+GLADE_CB void
+on_dbgmem_window_state_event		   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.mem.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.mem.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.mem.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// callbacks from dbg_code.c
+
+GLADE_CB gboolean
+on_dbgcode_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    if (dbgcode_quit_enabled())
+    {
+        gtk_widget_hide(widget);
+        on_quit1_activate(NULL, NULL);    
+    }
+    return TRUE;
+}
+
+GLADE_CB void
+on_dbgcode_window_state_event		   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.code.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.code.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.code.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// callbacks from dbg_bkpts.c
+
+GLADE_CB gboolean
+on_dbgbkpts_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide(widget);
+    return TRUE;
+}
+
+GLADE_CB void
+on_dbgbkpts_window_state_event		   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.bkpts.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.bkpts.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.bkpts.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// callbacks from dbg_stack.c
+GLADE_CB gboolean
+on_dbgstack_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide(widget);    
+    return TRUE;
+}
+
+GLADE_CB void
+on_dbgstack_window_state_event		   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.stack.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.stack.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.stack.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// callbacks from dbg_heap.c
+GLADE_CB gboolean
+on_dbgheap_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide(widget);    
+    return TRUE;
+}
+
+GLADE_CB void
+on_dbgheap_window_state_event		   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.heap.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.heap.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.heap.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// callbacks from dbg_iop.c
+GLADE_CB gboolean
+on_dbgioports_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent         *event,
+                                        gpointer          user_data)
+{
+    gtk_widget_hide(widget);    
+    return TRUE;
+}
+
+GLADE_CB void
+on_dbgioports_window_state_event	   (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+    GdkEventWindowState *wstate = (GdkEventWindowState *)event;
+    GdkWindowState state = wstate->new_window_state;
+    GdkWindowState mask = wstate->changed_mask;
+
+	if(mask & GDK_WINDOW_STATE_WITHDRAWN && dbg_on)
+		options3.iop.closed = (state & GDK_WINDOW_STATE_WITHDRAWN);
+
+	window_get_rect(widget, &options3.iop.rect);
+
+	if(mask & GDK_WINDOW_STATE_ICONIFIED)
+		options3.iop.minimized = state & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+// misc
+
+// Common remplacement for gtk_window_(de)iconify)
+void gtk_window_minimize(GtkWindow *window, gboolean action)
+{
+	if(action)
+		gtk_window_iconify(window);
+	else
+		gtk_window_deiconify(window);
+}
+
+
+/*
+tiTIME profile;
+void profile_start(void)
+{
+	TO_START(profile);
+}
+void profile_stop(const char *str)
+{
+	printf("Duration (%s): %i ms\n", str, TO_CURRENT(profile));
+}
+*/
diff --git a/src/gui/debugger/dbg_wnds.h b/src/gui/debugger/dbg_wnds.h
new file mode 100644
index 0000000..05a78c1
--- /dev/null
+++ b/src/gui/debugger/dbg_wnds.h
@@ -0,0 +1,106 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: dbg_all.h 2707 2007-12-13 13:18:45Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __DBG_WINDOWS_H__
+#define __DBG_WINDOWS_H__
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+#include "dbg_bkpts.h"
+#include "dbg_bits.h"
+#include "dbg_code.h"
+#include "dbg_cause.h"
+#include "dbg_data.h"
+#include "dbg_mem.h"
+#include "dbg_regs.h"
+#include "dbg_vectors.h"
+#include "dbg_pclog.h"
+#include "dbg_stack.h"
+#include "dbg_heap.h"
+#include "dbg_entry.h"
+#include "dbg_iop.h"
+
+// calc.c: calculator window
+extern GtkWidget *main_wnd;
+
+// Save window state
+#define WND_STATE
+#define LINE_PAD	0
+
+/* Definitions */
+
+typedef struct {
+    GtkWidget *mem;
+    GtkWidget *regs;
+    GtkWidget *bkpts;
+    GtkWidget *code;
+    GtkWidget *pclog;
+    GtkWidget *stack;
+	GtkWidget *heap;
+	GtkWidget *iop;
+	GtkWidget *dock;
+} DbgWidgets;
+extern DbgWidgets dbgw;
+
+/* Functions */
+
+void dbgwnds_set_sensitivity(int state);
+
+void dbgwnds_minimize_all(int all);
+void dbgwnds_unminimize_all(int all);
+
+void dbgwnds_show_all(int all);
+void dbgwnds_hide_all(int all);
+
+#define glade_get(s)		glade_xml_get_widget(xml, (s))
+
+/* Macros */
+
+#define set_renderer_pad(renderer)	\
+{ \
+	g_object_set(G_OBJECT(renderer), "xpad", LINE_PAD, NULL); \
+	g_object_set(G_OBJECT(renderer), "ypad", LINE_PAD, NULL); \
+}
+
+//#define MEASURE_WND_TIME
+
+#ifdef MEASURE_WND_TIME
+ #define WND_TMR_START()		GTimer *tmr = g_timer_new();
+ #define WND_TMR_STOP(s)	{	\
+	g_timer_stop(tmr);	\
+	printf("%s: %f\n", s, g_timer_elapsed(tmr, NULL));	\
+	g_timer_destroy(tmr);	\
+}
+#else
+ #define WND_TMR_START()
+ #define WND_TMR_STOP(s)
+#endif
+
+G_END_DECLS
+
+#endif
diff --git a/src/gui/device.c b/src/gui/device.c
new file mode 100644
index 0000000..0be695b
--- /dev/null
+++ b/src/gui/device.c
@@ -0,0 +1,239 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: device.c 1364 2005-07-13 12:08:10Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *  Copyright (C) 1999-2005  Romain Lievin
+ *  Copyright (C) 2007  Kevin Kofler
+ *
+ *  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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <string.h>
+
+#include "intl.h"
+#include "support.h"
+#include "paths.h"
+#include "device.h"
+#include "refresh.h"
+#include "tilibs.h"
+#include "dboxes.h"
+#include "tie_error.h"
+#include "ti68k_int.h"
+
+extern DeviceOptions	linkp;
+static DeviceOptions	tmp;
+static DeviceOptions	old;
+
+static GtkWidget* lbl;
+static GtkWidget* comm_cable;
+static GtkWidget* comm_port;
+
+gint display_device_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+	int err;
+
+	xml = glade_xml_new(tilp_paths_build_glade("device-2.glade"), "device_dbox", PACKAGE);
+	if (!xml)
+		g_error(_("comm.c: GUI loading failed !\n"));
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "device_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+
+	lbl = glade_xml_get_widget(xml, "label7");
+
+	// Cable  
+	data = comm_cable = glade_xml_get_widget(xml, "combobox1");
+	switch (linkp.cable_model) 
+	{
+	case CABLE_NUL:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 0);
+	break;
+
+	case CABLE_GRY:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 1);
+	break;
+		
+	case CABLE_BLK:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 2);
+	break;
+
+	case CABLE_PAR:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 3);
+	break;
+
+	case CABLE_SLV:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 4);
+	break;	
+
+	case CABLE_USB:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 5);
+	break;	
+
+	case CABLE_VTI:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 6);
+	break;
+
+    case CABLE_TIE:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 7);
+	break;
+	
+	case CABLE_ILP:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 8);
+	break;
+
+	default:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 0);
+	break;
+	}
+
+	// Port
+	data = comm_port = glade_xml_get_widget(xml, "combobox2");
+	switch (linkp.cable_port) 
+	{
+	case PORT_0:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 0);
+	break;
+	case PORT_1:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 1);
+	break;
+	case PORT_2:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 2);
+	break;
+	case PORT_3:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 3);
+	break;
+	case PORT_4:
+		gtk_combo_box_set_active(GTK_COMBO_BOX(data), 4);
+	break;
+	}
+
+	// Timeout
+	data = glade_xml_get_widget(xml, "spinbutton_comm_timeout");
+	gtk_spin_button_set_value(GTK_SPIN_BUTTON(data), linkp.cable_timeout);
+	
+	// Delay
+	data = glade_xml_get_widget(xml, "spinbutton_comm_delay");
+	gtk_spin_button_set_value(GTK_SPIN_BUTTON(data), linkp.cable_delay);
+
+	// Data exchange
+	memcpy(&tmp, &linkp, sizeof(DeviceOptions));
+	memcpy(&old, &linkp, sizeof(DeviceOptions));
+	
+	// Loop
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_CANCEL:
+		break;
+	case GTK_RESPONSE_OK:
+		ti68k_linkport_unconfigure();
+
+		data = glade_xml_get_widget(xml, "spinbutton_comm_delay");
+		tmp.cable_delay = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(data));
+
+		data = glade_xml_get_widget(xml, "spinbutton_comm_timeout");
+		tmp.cable_timeout =	gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(data));
+
+		memcpy(&linkp, &tmp, sizeof(DeviceOptions));
+		tmp.calc_model = ti68k_calc_to_libti_calc();
+
+        err = ti68k_linkport_reconfigure();
+		if(err)
+		{
+			// if reconfiguring fails, fallback to null cable & port
+			ti68k_linkport_unconfigure();
+
+			memcpy(&linkp, &old, sizeof(DeviceOptions));
+			tmp.calc_model = ti68k_calc_to_libti_calc();
+
+			ti68k_linkport_reconfigure();
+		}
+		break;
+	case GTK_RESPONSE_HELP:
+		break;
+	default:
+		break;
+	}
+	gtk_widget_destroy(dbox);
+	return 0;
+}
+
+
+GLADE_CB void
+on_device_combobox1_changed            (GtkComboBox     *combobox,
+                                        gpointer         user_data)
+{
+	gint nitem = gtk_combo_box_get_active(combobox);
+	
+	switch(nitem)
+	{
+	case 0: tmp.cable_model = CABLE_NUL; break;
+	case 1: tmp.cable_model = CABLE_GRY; break;
+	case 2: tmp.cable_model = CABLE_BLK; break;
+	case 3:	tmp.cable_model = CABLE_PAR; break;
+	case 4: tmp.cable_model = CABLE_SLV; break;	
+	case 5: tmp.cable_model = CABLE_USB; break;	
+	case 6: tmp.cable_model = CABLE_VTI; break;
+	case 7: tmp.cable_model = CABLE_TIE; break;
+	case 8: tmp.cable_model = CABLE_ILP; break;
+	}
+}
+
+
+GLADE_CB void
+on_device_combobox2_changed            (GtkComboBox     *combobox,
+                                        gpointer         user_data)
+{
+	gint nitem = gtk_combo_box_get_active(combobox);
+	
+	switch(nitem)
+	{
+	case 0: tmp.cable_port = PORT_0; break;
+	case 1: tmp.cable_port = PORT_1; break;
+	case 2: tmp.cable_port = PORT_2; break;
+	case 3: tmp.cable_port = PORT_3; break;
+	case 4: tmp.cable_port = PORT_4; break;
+	}
+}
+
+
+GLADE_CB void
+comm_spinbutton_delay_changed          (GtkEditable     *editable,
+                                        gpointer         user_data)
+{
+  	tmp.cable_delay =
+    		gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(user_data));
+}
+
+
+GLADE_CB void
+comm_spinbutton_timeout_changed        (GtkEditable     *editable,
+                                        gpointer         user_data)
+{
+  	tmp.cable_timeout =
+    		gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(user_data));
+}
diff --git a/src/gui/device.h b/src/gui/device.h
new file mode 100644
index 0000000..e2f241d
--- /dev/null
+++ b/src/gui/device.h
@@ -0,0 +1,3 @@
+#include <gtk/gtk.h>
+
+gint display_device_dbox();
diff --git a/src/gui/filesel.c b/src/gui/filesel.c
new file mode 100644
index 0000000..f65474a
--- /dev/null
+++ b/src/gui/filesel.c
@@ -0,0 +1,742 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: filesel.c 2730 2007-12-16 15:54:33Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  Carbon file dialog code lifted from Systool (LGPL):
+ *  Copyright (c) 2006 Asger Ottar Alstrup, Nicolas Cannasse, Edwin van Rijkom
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/* 
+	Some informations about these file selectors: starting at tifiles2-v0.0.6, we
+	use the 'glib filename encoding' scheme for charset encoding of filenames:
+	- UTF-8 charset on Windows,
+	- locale charset on Linux (usually UTF-8 but this is not always true).
+
+	GTK+ always uses UTF-8 for widgets (label, file selectors, ...) thus some conversions
+	may be needed.
+*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <string.h>
+
+#ifdef __WIN32__
+#include <windows.h>
+#include <wchar.h>
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+	typedef OPENFILENAME OPENFILENAME_MAYALIAS __attribute__((may_alias));
+#else
+	typedef OPENFILENAME OPENFILENAME_MAYALIAS;
+#endif
+#endif
+
+#ifdef HAVE_CARBON_CARBON_H
+#include <Carbon/Carbon.h>
+#endif
+
+#if WITH_KDE
+#include "kde.h"
+#endif
+
+#include "intl.h"
+#include "filesel.h"
+#include "refresh.h"
+#include "struct.h"
+
+/* In case some header happens to define this... */
+#undef HAVE_CARBON_CARBON_H
+
+#ifdef HAVE_CARBON_CARBON_H
+/* Helpers */
+#define PATH_SIZE 2048
+
+static OSStatus GetFSRefFromAEDesc( FSRef *fsRef, AEDesc* theItem ) {
+        OSStatus err = noErr;
+        AEDesc coerceDesc= { 0, NULL };
+        if ( theItem->descriptorType != typeFSRef )     {
+                err = AECoerceDesc( theItem, typeFSRef, &coerceDesc );
+                if ( err == noErr )
+                theItem = &coerceDesc;
+        }
+        if ( err == noErr )
+        err = AEGetDescData( theItem, fsRef, sizeof(*fsRef) );
+        AEDisposeDesc( &coerceDesc );
+
+        if ( err != noErr )     {
+                FSSpec fsSpec;
+                AEDesc coerceDesc2 = {0, NULL};
+                if ( theItem->descriptorType != typeFSS ) {
+                        err = AECoerceDesc( theItem, typeFSS, &coerceDesc2 );
+                        theItem = &coerceDesc2;
+                }
+                if ( err == noErr )
+                err = AEGetDescData( theItem, &fsSpec, sizeof(fsSpec) );
+                AEDisposeDesc( &coerceDesc2 );
+                if ( err == noErr )
+                err = FSpMakeFSRef( &fsSpec, fsRef );
+        }
+        return(err);
+}
+
+static Boolean filterProc(AEDesc * theItem, void * info, void * callBackUD, NavFilterModes filterMode) {
+        const gchar **filters = (const gchar **) callBackUD;
+        if (!filters)
+                return 1;
+
+        NavFileOrFolderInfo *i = (NavFileOrFolderInfo*) info;
+        if (i->isFolder)
+                return 1;
+
+        if (theItem->descriptorType==typeFSRef) {
+                FSRef f;
+                UInt8 path[PATH_SIZE];
+
+                GetFSRefFromAEDesc(&f,theItem);
+                if (FSRefMakePath (&f,path,PATH_SIZE)==noErr) {
+                        char *ext = NULL;
+                        char *next = (char*) path;
+                        while(next) {
+                                next = strchr(next,'.');
+                                if (next)
+                                        ext = ++next;
+                        }
+                        if(ext) {
+                                while(*filters) {
+                                        const gchar *filter=*(filters++);
+                                        if (*(filter++)=='*' && *filter=='.') {
+                                                next = ext;
+                                                while (*(++filter)) {
+                                                        if (!*next) break;
+                                                        if (*filter=='?') {
+                                                                next++;
+                                                        } else if (*filter!=*(next++)) break;
+                                                }
+                                                if (!*filter && !*next)
+                                                        return 1;
+                                        }
+                                }
+                        }
+                }
+                return 0;
+        }
+        return 1;
+}
+#endif
+
+/* Single file selectors */
+
+static gchar *fname = NULL;
+static gint action = 0;
+
+// GTK >= 2.4
+static const gchar* create_fsel_2(gchar *dirname, gchar *filename, gchar *ext, gboolean save)
+{
+	GtkWidget *dialog;
+	GtkFileFilter *filter;
+	gchar *path, *tmp;
+	gchar **sarray;
+	gint i;
+	gchar *sfilename, *sext;
+
+	// gtk_file_chooser_set_current_name and gtk_file_filter_add_pattern ALWAYS want UTF-8.
+	sfilename = filename ? g_filename_to_utf8(filename,-1,NULL,NULL,NULL) : NULL;
+	sext = ext ? g_filename_to_utf8(ext,-1,NULL,NULL,NULL) : NULL;
+    
+	// create box
+	dialog = gtk_file_chooser_dialog_new (
+					  save ? "Save File" : "Open File",
+				      NULL,
+					  save ? GTK_FILE_CHOOSER_ACTION_SAVE : GTK_FILE_CHOOSER_ACTION_OPEN,
+				      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+				      GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+				      NULL);
+
+	// set default folder
+	tmp = g_strconcat(dirname, G_DIR_SEPARATOR_S, NULL);	// add trailing '/' otherwise get_dirname is confused
+	path = g_path_get_dirname(tmp);
+	g_free(tmp);
+
+	gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), path);
+	g_free(path);
+
+	// set default name
+	if(filename)
+		gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), sfilename);
+
+	// set wildcards
+	filter = gtk_file_filter_new();
+	sarray = g_strsplit(sext, ";", -1);
+	for(i = 0; sarray[i] != NULL; i++)
+		gtk_file_filter_add_pattern (filter, sarray[i]);
+	g_strfreev(sarray);
+	gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);
+
+	// get result
+	g_free(fname);
+	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+		fname = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+	else
+		fname = NULL;
+	gtk_widget_destroy (dialog);
+
+	g_free(sfilename);
+	g_free(sext);
+
+	return fname;
+}
+
+// WIN32
+static const gchar* create_fsel_3(gchar *dirname, gchar *filename, gchar *ext, gboolean save)
+{
+#if defined(__WIN32__)
+	OPENFILENAME_MAYALIAS o;
+	char lpstrFile[2048] = "\0";
+	char lpstrFilter[512];
+	char *p;
+	gchar **sarray;
+	int i, n;
+	int have_widechar = G_WIN32_HAVE_WIDECHAR_API();
+	void *sdirname;
+
+	// clear structure
+	memset (&o, 0, sizeof(OPENFILENAME));
+
+	// set default filename
+	if(filename)
+	{
+		void *temp;
+		if (have_widechar)
+		{
+			temp = g_utf8_to_utf16(filename,-1,NULL,NULL,NULL);
+			if(!temp) return NULL;
+			wcsncpy((wchar_t *)lpstrFile, temp, sizeof(lpstrFile)>>1);
+		}
+		else
+		{
+			temp = g_locale_from_utf8(filename,-1,NULL,NULL,NULL);
+			if(!temp) return NULL;
+			strncpy(lpstrFile, temp, sizeof(lpstrFile));
+		}
+		g_free(temp);
+	}
+
+	// format filter
+	sarray = g_strsplit(ext, "|", -1);
+	for(n = 0; sarray[n] != NULL; n++);
+
+	for(i = 0, p = lpstrFilter; i < n; i++)
+	{
+		void *temp;
+		if (have_widechar)
+		{
+			temp = g_utf8_to_utf16(sarray[i],-1,NULL,NULL,NULL);
+			wcscpy((wchar_t *)p,temp);
+			p += (wcslen(temp)<<1);
+			*p++ = '\0';
+			*p++ = '\0';
+			wcscpy((wchar_t *)p,temp);
+			p += (wcslen(temp)<<1);
+			*p++ = '\0';
+			*p++ = '\0';
+		}
+		else
+		{
+			temp = g_locale_from_utf8(sarray[i],-1,NULL,NULL,NULL);
+			strcpy(p,temp);
+			p += strlen(temp);
+			*p++ = '\0';
+			strcpy(p,temp);
+			p += strlen(temp);
+			*p++ = '\0';
+		}
+		g_free(temp);
+	}
+	*p++ = '\0';
+	if (have_widechar)
+		*p++ = '\0';
+	g_strfreev(sarray);
+
+	// set structure
+	o.lStructSize = sizeof (o);	
+	o.lpstrFilter = lpstrFilter;	//"All\0*.*\0Text\0*.TXT\0";
+	o.lpstrFile = lpstrFile;
+	if (have_widechar)
+	{
+		o.nMaxFile = sizeof(lpstrFile) >> 1;
+		sdirname = g_utf8_to_utf16(dirname,-1,NULL,NULL,NULL);
+	}
+	else
+	{
+		o.nMaxFile = sizeof(lpstrFile);
+		sdirname = g_locale_from_utf8(dirname,-1,NULL,NULL,NULL);
+	}
+	o.lpstrInitialDir = sdirname;
+	o.Flags = 0x02000000 | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY |
+				 OFN_NOCHANGEDIR | OFN_EXPLORER | OFN_LONGNAMES | OFN_NONETWORKBUTTON;
+
+	// open/close
+	if(save)
+	{
+		if(!(have_widechar ? GetSaveFileNameW((OPENFILENAMEW *)&o) : GetSaveFileName((OPENFILENAME *)&o)))
+		{
+			g_free(sdirname);
+			return fname = NULL;
+		}
+	}
+	else
+	{
+		if(!(have_widechar ? GetOpenFileNameW((OPENFILENAMEW *)&o) : GetOpenFileName((OPENFILENAME *)&o)))
+		{
+			g_free(sdirname);
+			return fname = NULL;
+		}
+	}
+
+	g_free(sdirname);
+
+	if (have_widechar)
+		fname = g_utf16_to_utf8((wchar_t *)lpstrFile,-1,NULL,NULL,NULL);
+	else
+		fname = g_locale_to_utf8(lpstrFile,-1,NULL,NULL,NULL);
+	return fname;
+#elif defined(HAVE_CARBON_CARBON_H)
+        NavDialogRef ref;
+        NavDialogCreationOptions opt;
+        OSStatus ret;
+        gchar **sarray=NULL;
+
+        fname = NULL;
+        NavGetDefaultDialogCreationOptions(&opt);
+        opt.clientName = CFSTR("TiEmu");
+        opt.modality = kWindowModalityAppModal;
+        opt.optionFlags = kNavDefaultNavDlogOptions | kNavAllFilesInPopup;
+
+        if (save) {
+                ret = NavCreatePutFileDialog(&opt,0,kNavGenericSignature,NULL,NULL,&ref);
+        } else {
+                sarray = g_strsplit(ext, ";", -1);
+                ret = NavCreateChooseFileDialog(&opt,NULL,NULL,NULL,filterProc,sarray,&ref);
+        }
+        if (ret == noErr) {
+                if (NavDialogRun(ref) == noErr) {
+                        if (NavDialogGetUserAction(ref) == save?kNavUserActionSaveAs:kNavUserActionChoose) {
+                                NavReplyRecord reply;
+                                if (NavDialogGetReply(ref,&reply)  == kNavNormalState) {
+                                        FSRef fsref;
+                                        AEGetNthPtr(&reply.selection,1,typeFSRef,0,0,&fsref,sizeof(FSRef),0);
+                                        fname = g_malloc(PATH_SIZE);
+                                        memset(fname,0,PATH_SIZE);
+                                        if (FSRefMakePath (&fsref,(UInt8*)fname,PATH_SIZE-(save?1:0))==noErr) {
+                                                if (save) {
+                                                        strcat(fname,"/");
+                                                        CFStringGetCString(reply.saveFileName,fname+strlen(fname),PATH_SIZE-strlen(fname),kCFStringEncodingUTF8);
+                                                }
+                                        } else {
+                                                g_free(fname);
+                                                fname = NULL;
+                                        }
+                                        NavDisposeReply(&reply);
+                                }
+                        }
+                }
+                NavDialogDispose(ref);
+        }
+        if (!save) g_strfreev(sarray);
+        return fname;
+#endif
+
+	return NULL;
+}
+
+// KDE
+static const gchar* create_fsel_4(gchar *dirname, gchar *filename, gchar *ext, gboolean save)
+{
+#if WITH_KDE
+	gchar *p;
+	gchar *extspaces = g_strdup(ext);
+
+	p = extspaces;
+	while ((p = strchr(p, ';'))) *p = ' ';
+
+	if(save)
+	{
+		if (filename)
+			dirname = g_strconcat(dirname, "/", filename, NULL);
+		fname = sp_kde_get_write_filename(dirname, extspaces, _("Save file"));
+	}
+	else
+		fname = sp_kde_get_open_filename(dirname, extspaces, _("Open file"));
+
+	g_free(extspaces);
+	return fname;
+#endif
+
+	return NULL;
+}
+
+// Front-end
+const gchar *create_fsel(gchar *dirname, gchar *filename, gchar *ext, gboolean save)
+{
+#if !defined(__WIN32__) && !defined(HAVE_CARBON_CARBON_H)
+	if(options.fs_type == 2)
+	{
+#if WITH_KDE
+		const char *p = getenv("KDE_FULL_SESSION");
+		if (p && *p) // KDE is running
+			options.fs_type = 3;
+		else
+#endif
+			options.fs_type = 1;
+	}
+#endif
+#if !WITH_KDE
+	if(options.fs_type == 3)
+		options.fs_type = 1;
+#endif
+	//printf("%i: <%s> <%s> <%s> %i\n", options.fs_type, dirname, filename, ext, save);
+
+	switch(options.fs_type)
+	{
+	case 0:
+	case 1:	return create_fsel_2(dirname, filename, ext, save);
+	case 2: return create_fsel_3(dirname, filename, ext, save);
+	case 3: return create_fsel_4(dirname, filename, ext, save);
+	default: return NULL;
+	}
+
+	return NULL;
+}
+
+/* Multiple files selectors */
+
+static gchar** filenames = NULL;
+static gint actions = 0;
+
+// GTK >= 2.4
+static gchar** create_fsels_2(gchar *dirname, gchar *filename, gchar *ext)
+{
+	GtkWidget *dialog;
+	GtkFileFilter *filter;
+	gchar *path, *tmp;
+	gchar **sarray;
+	gint i;
+	gchar *sfilename, *sext;
+
+	// gtk_file_chooser_set_current_name and gtk_file_filter_add_pattern ALWAYS want UTF-8.
+	sfilename = filename ? g_filename_to_utf8(filename,-1,NULL,NULL,NULL) : NULL;
+	sext = ext ? g_filename_to_utf8(ext,-1,NULL,NULL,NULL) : NULL;
+    
+	// create box
+	dialog = gtk_file_chooser_dialog_new ("Open File",
+				      NULL,
+					  GTK_FILE_CHOOSER_ACTION_OPEN,
+				      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+				      GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+				      NULL);
+
+	// set default folder
+	tmp = g_strconcat(dirname, G_DIR_SEPARATOR_S, NULL);	// add trailing '/' otherwise get_dirname is confused
+	path = g_path_get_dirname(tmp);
+	g_free(tmp);
+
+	gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), path);
+	g_free(path);
+
+	// set multiple selection
+	gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE);
+
+	// set default name
+	if(filename)
+		gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), sfilename);
+
+	// set wildcards
+	filter = gtk_file_filter_new();
+	sarray = g_strsplit(sext, ";", -1);
+	for(i = 0; sarray[i] != NULL; i++)
+		gtk_file_filter_add_pattern (filter, sarray[i]);
+	g_strfreev(sarray);
+	gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);
+
+	// get result
+	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		GSList *list, *p;
+		gchar **q;
+
+		// convert list into string array
+		list=gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER (dialog));
+	      
+		filenames = (gchar **)g_malloc0((g_slist_length(list)+1) * 
+						sizeof(gchar *));
+		for(p = list, q = filenames; p; p = g_slist_next(p), q++)
+			*q = p->data;
+		*q = NULL;
+		     
+		g_slist_free(list);
+	}
+	else
+		filenames = NULL;
+	gtk_widget_destroy (dialog);
+
+	g_free(sfilename);
+	g_free(sext);
+
+	return filenames;
+}
+
+// WIN32
+static gchar** create_fsels_3(gchar *dirname, gchar *filename, gchar *ext)
+{
+#if defined(__WIN32__)
+	OPENFILENAME_MAYALIAS o;
+	char lpstrFile[2048] = "\0";
+	char lpstrFilter[512];
+	char *p;
+	gchar **sarray;
+	int i, n;
+	int have_widechar = G_WIN32_HAVE_WIDECHAR_API();
+	void *sdirname;
+	gchar *temp1;
+
+	// clear structure
+	memset (&o, 0, sizeof(OPENFILENAME));
+
+	// set default filename
+	if(filename)
+	{
+		void *temp;
+		if (have_widechar)
+		{
+			temp = g_utf8_to_utf16(filename,-1,NULL,NULL,NULL);
+			if(!temp) return NULL;
+			wcsncpy((wchar_t *)lpstrFile, temp, sizeof(lpstrFile)>>1);
+		}
+		else
+		{
+			temp = g_locale_from_utf8(filename,-1,NULL,NULL,NULL);
+			if(!temp) return NULL;
+			strncpy(lpstrFile, temp, sizeof(lpstrFile));
+		}
+		g_free(temp);
+	}
+
+	// format filter
+	sarray = g_strsplit(ext, "|", -1);
+	for(n = 0; sarray[n] != NULL; n++);
+
+	for(i = 0, p = lpstrFilter; i < n; i++)
+	{
+		void *temp;
+		if (have_widechar)
+		{
+			temp = g_utf8_to_utf16(sarray[i],-1,NULL,NULL,NULL);
+			wcscpy((wchar_t *)p,temp);
+			p += (wcslen(temp)<<1);
+			*p++ = '\0';
+			*p++ = '\0';
+			wcscpy((wchar_t *)p,temp);
+			p += (wcslen(temp)<<1);
+			*p++ = '\0';
+			*p++ = '\0';
+		}
+		else
+		{
+			temp = g_locale_from_utf8(sarray[i],-1,NULL,NULL,NULL);
+			strcpy(p,temp);
+			p += strlen(temp);
+			*p++ = '\0';
+			strcpy(p,temp);
+			p += strlen(temp);
+			*p++ = '\0';
+		}
+		g_free(temp);
+	}
+	*p++ = '\0';
+	if (have_widechar)
+		*p++ = '\0';
+	g_strfreev(sarray);
+
+	// set structure
+	o.lStructSize = sizeof (o);	
+	o.lpstrFilter = lpstrFilter;	//"All\0*.*\0Text\0*.TXT\0";
+	o.lpstrFile = lpstrFile;		//"C:\msvc\tilp\0foo.txt\0bar.txt"
+	if (have_widechar)
+	{
+		o.nMaxFile = sizeof(lpstrFile) >> 1;
+		sdirname = g_utf8_to_utf16(dirname,-1,NULL,NULL,NULL);
+	}
+	else
+	{
+		o.nMaxFile = sizeof(lpstrFile);
+		sdirname = g_locale_from_utf8(dirname,-1,NULL,NULL,NULL);
+	}
+	o.lpstrInitialDir = sdirname;
+	o.Flags = 0x02000000 | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY |
+				 OFN_NOCHANGEDIR | OFN_EXPLORER | OFN_LONGNAMES | OFN_NONETWORKBUTTON |
+				 OFN_ALLOWMULTISELECT;
+
+	// open selector
+	if(!(have_widechar ? GetOpenFileNameW((OPENFILENAMEW *)&o) : GetOpenFileName((OPENFILENAME *)&o)))
+	{
+		g_free(sdirname);
+		return NULL;
+	}
+	filenames = NULL;
+
+	// converts resulting string
+	if (have_widechar)
+		temp1 = g_utf16_to_utf8((wchar_t *)lpstrFile,-1,NULL,NULL,NULL);
+	else
+		temp1 = g_locale_to_utf8(lpstrFile,-1,NULL,NULL,NULL);
+	for(p = lpstrFile, i=0; *p;
+	    p += have_widechar?((wcslen((wchar_t *)p)+1)<<1):(strlen(p)+1), i++)
+	{
+		if(i)	// skip directory
+		{
+			gchar *temp;
+			filenames = g_realloc(filenames, (i+1) * sizeof(gchar *));
+			if (have_widechar)
+				temp = g_utf16_to_utf8((wchar_t *)p,-1,NULL,NULL,NULL);
+			else
+				temp = g_locale_to_utf8(p,-1,NULL,NULL,NULL);
+			filenames[i-1] = g_strconcat(temp1, G_DIR_SEPARATOR_S, temp, NULL);
+			g_free(temp);
+		}
+	}
+	g_free(temp1);
+
+	// one file selected ?
+	if(i == 1)
+	{
+		filenames = g_malloc(2 * sizeof(gchar *));
+		if (have_widechar)
+			filenames[0] = g_utf16_to_utf8((wchar_t *)lpstrFile,-1,NULL,NULL,NULL);
+		else
+			filenames[0] = g_locale_to_utf8(lpstrFile,-1,NULL,NULL,NULL);
+		filenames[1] = NULL;
+	}
+	else
+		filenames[i-1] = NULL;
+
+	g_free(sdirname);
+
+	return filenames;
+#elif defined(HAVE_CARBON_CARBON_H)
+        NavDialogRef ref;
+        NavDialogCreationOptions opt;
+        gchar **sarray;
+
+        filenames = NULL;
+        NavGetDefaultDialogCreationOptions(&opt);
+        opt.clientName = CFSTR("TiEmu");
+        opt.modality = kWindowModalityAppModal;
+        opt.optionFlags = kNavDefaultNavDlogOptions | kNavAllFilesInPopup;
+
+        sarray = g_strsplit(ext, ";", -1);
+        if (NavCreateGetFileDialog(&opt,NULL,NULL,NULL,filterProc,sarray,&ref) == noErr) {
+
+                if (NavDialogRun(ref) == noErr) {
+                        if (NavDialogGetUserAction(ref)==kNavUserActionOpen) {
+                                NavReplyRecord reply;
+                                if (NavDialogGetReply(ref,&reply) == kNavNormalState) {
+                                        long count;
+                                        AECountItems(&reply.selection, &count);
+                                        if (count) {
+                                                filenames = (gchar **) g_malloc0((count+1)*sizeof(gchar*));
+                                                while(count>0) {
+                                                        FSRef fsref;
+                                                        AEGetNthPtr(&reply.selection,count--,typeFSRef,0,0,&fsref,sizeof(FSRef),0);
+                                                        filenames[count] = g_malloc(PATH_SIZE);
+                                                        memset(filenames[count],0,PATH_SIZE);
+                                                        if (FSRefMakePath (&fsref,(UInt8*)filenames[count],PATH_SIZE)!=noErr) {
+                                                               g_strfreev(filenames);
+                                                               filenames = NULL;
+                                                        }
+                                                }
+                                        }
+                                        NavDisposeReply(&reply);
+                                }
+                        }
+                }
+                NavDialogDispose(ref);
+        }
+        g_strfreev(sarray);
+        return filenames;
+#endif
+
+	return NULL;
+}
+
+static gchar** create_fsels_4(gchar *dirname, gchar *filename, gchar *ext)
+{
+#if WITH_KDE
+	gchar *p;
+	gchar *extspaces = g_strdup(ext);
+	p = extspaces;
+	while ((p = strchr(p, ';'))) *p = ' ';
+	filenames = sp_kde_get_open_filenames(dirname, extspaces, _("Open file"));
+	g_free(extspaces);
+	return filenames;
+#endif
+
+	return NULL;
+}
+
+// Front-end
+gchar** create_fsels(gchar *dirname, gchar *filename, gchar *ext)
+{
+#if !defined(__WIN32__) && !defined(HAVE_CARBON_CARBON_H)
+	if(options.fs_type == 2)
+	{
+#if WITH_KDE
+		const char *p = getenv("KDE_FULL_SESSION");
+		if (p && *p) // KDE is running
+			options.fs_type = 3;
+		else
+#endif
+			options.fs_type = 1;
+	}
+#endif
+#if !WITH_KDE
+	if(options.fs_type == 3)
+		options.fs_type = 1;
+#endif
+	//printf("%i: <%s> <%s> <%s>\n", options.fs_type, dirname, filename, ext);
+
+	switch(options.fs_type)
+	{
+	case 0:
+	case 1:	return create_fsels_2(dirname, filename, ext);
+	case 2: return create_fsels_3(dirname, filename, ext);
+	case 3: return create_fsels_4(dirname, filename, ext);
+	default: return NULL;
+	}
+
+	return NULL;
+}
+
+
diff --git a/src/gui/filesel.h b/src/gui/filesel.h
new file mode 100644
index 0000000..3c365a2
--- /dev/null
+++ b/src/gui/filesel.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+const gchar *create_fsel(gchar *dirname, gchar *filename, gchar *ext, gboolean save);
+    gchar** create_fsels(gchar *dirname, gchar *filename, gchar *ext);
diff --git a/src/gui/fs_misc.c b/src/gui/fs_misc.c
new file mode 100644
index 0000000..fce31a1
--- /dev/null
+++ b/src/gui/fs_misc.c
@@ -0,0 +1,521 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: fs_misc.c 2840 2009-05-08 20:43:47Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2009, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2005, Christian Walther (patches for Mac OS-X port)
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "intl.h"
+#include "filesel.h"
+#include "skinops.h"
+#include "refresh.h"
+#include "paths.h"
+#include "struct.h"
+#include "ti68k_int.h"
+#include "dboxes.h"
+#include "calc.h"
+#include "rcfile.h"
+#include "pbars.h"
+#include "tie_error.h"
+#include "dbg_all.h"
+#include "files.h"
+#include "ti68k_err.h"
+//"fs_misc.h"
+
+gint display_skin_dbox(void)
+{
+	const gchar *filename;
+
+	filename = (char *)create_fsel(inst_paths.skin_dir, NULL, "*.skn", FALSE);
+	if (!filename)
+	{
+		return 0;
+	}
+
+    // Load new skin
+    g_free(options.skin_file);
+    options.skin_file = g_strdup(filename);
+    
+    hid_change_skin(options.skin_file);
+
+	return 0;
+}
+
+int fs_load_state(const char *filename)
+{
+	int err;
+
+	g_free(params.sav_file);
+    params.sav_file = g_strdup(filename);
+    
+    err = ti68k_state_load(params.sav_file);
+	if(err == ERR_STATE_MATCH)
+	{
+		gchar *rf, *tf;
+		int ret = msg_box2(_("Warning"), 
+			_("The state image you are attempting to load does not match the current running image. Press OK if you want TiEmu to automatically load the corresponding image or Cancel to abort."));
+		
+		if(ret == BUTTON2)	//cancel
+			return 0;
+
+		ti68k_state_parse(filename, &rf, &tf);
+		
+		if(!ti68k_is_a_img_file(rf))
+			return 0;
+
+        // Set tib file and image
+        g_free(params.tib_file);
+		params.tib_file = tf;
+
+		g_free(params.rom_file);
+		params.rom_file = rf;
+
+		// Restart engine by exiting the GTK loop
+		while(gtk_events_pending()) gtk_main_iteration();
+		gtk_main_quit();	
+	}
+	else
+		handle_error();
+
+	return 0;
+}
+
+gint display_load_state_dbox(void)
+{
+	const gchar *filename;
+
+    // get filename
+	filename = create_fsel(inst_paths.img_dir, NULL, "*.sav", FALSE);
+	if (!filename)
+		return 0;
+
+    fs_load_state(filename);
+
+	return 0;
+}
+
+gint display_save_state_dbox(void)
+{
+    const gchar *filename;
+	int err;
+	gchar *basename;
+	gchar *dot;
+	gchar *pattern;
+
+    // get filename
+	basename = g_path_get_basename(params.rom_file);
+	dot = strrchr(basename, '.');
+	if(dot != NULL)
+		*dot = '\0';
+	pattern = g_strconcat(basename, ".sav", NULL);
+	g_free(basename);
+
+	filename = create_fsel(inst_paths.img_dir, pattern, "*.sav", TRUE);
+	g_free(pattern);
+	if (!filename)
+		return 0;
+
+    g_free(params.sav_file);
+    params.sav_file = g_strdup(filename);
+    err = ti68k_state_save(params.sav_file);
+	handle_error();
+    
+    if(!rcfile_exist())
+    {
+        rcfile_write();
+   
+#ifdef __WIN32__
+        msg_box1(_("Information"), 
+	      _("You do not seem to have saved your settings. Configuration file saved (in tiemu.ini)."));
+#else
+		msg_box1(_("Information"), 
+	      _("You do not seem to have saved your settings. Configuration file saved (in ~/.tiemu)."));
+#endif
+    }
+
+	return 0;
+}
+
+void fs_send_file(const gchar *filename)
+{
+	int err;
+
+	// set pbar title
+	if(tifiles_file_is_flash(filename)) 
+	{
+		create_pbar_(FNCT_SEND_APP, _("Sending app(s)"));
+	} 
+	else if(tifiles_file_is_group(filename)) 
+	{
+		create_pbar_(FNCT_SEND_VAR, _("Sending var(s)"));
+	} 
+	else if(tifiles_file_is_backup(filename)) 
+	{
+		create_pbar_(FNCT_SEND_BACKUP, _("Restoring"));
+	} 
+	else if(tifiles_file_is_single(filename)) 
+	{
+		create_pbar_(FNCT_SEND_VAR, _("Sending var(s)"));
+	}
+	else if(tifiles_file_is_tigroup(filename))
+	{
+		create_pbar_type5(_("Restoring"));
+	}
+
+	// note that core is currently not bkpt-interruptible when
+	// transferring file
+	GTK_REFRESH();
+	err = ti68k_linkport_send_file(filename);
+	handle_error();
+	destroy_pbar();	
+}
+
+int fs_send_files(gchar **filenames)
+{
+	gchar **ptr;
+	int i, l;
+
+	// check extension and send
+	for(ptr = filenames, l = 0; *ptr; ptr++, l++);
+	for(ptr = filenames, i = 0; *ptr; ptr++, i++)
+	{
+		if(!tifiles_file_is_ti(*ptr) || (!tifiles_calc_is_ti9x(tifiles_file_get_model(*ptr)) &&
+			!tifiles_file_is_tigroup(*ptr))) 
+		{
+			msg_box1(_("Error"), _("This file is not a valid TI file."));
+			g_strfreev(filenames);
+			return -1;
+		}
+
+		fs_send_file(*ptr);
+	}
+
+	return 0;
+}
+
+gint display_send_files_dbox(void)
+{
+	const gchar *ext;
+	gchar **filenames;
+	static gchar *folder = NULL;
+	int ret = 0;
+	
+	// Check for null cable
+	if(linkp.cable_model != CABLE_ILP)
+	{
+		int ret, err;
+		gchar *str;
+
+		str = g_strdup_printf(_("The current link cable <%s> port <%s> does not allow direct file loading. Do you let me change link port settings to allow direct file loading?"),
+			ticables_model_to_string(linkp.cable_model), ticables_port_to_string(linkp.cable_port));
+		
+		ret= msg_box2(_("Warning"), str);
+		g_free(str);
+		
+		if(ret == BUTTON2)
+			return -1;
+
+		// reconfigure link port
+		ti68k_linkport_unconfigure();
+
+		linkp.cable_model = CABLE_ILP;
+		linkp.cable_port = PORT_0;
+
+        err = ti68k_linkport_reconfigure();
+		handle_error();
+	}
+
+    // set mask
+    switch(tihw.calc_type) 
+	{
+    case TI92:
+        ext = "*.92?";
+		break;
+	default:
+        ext = "*.89?;*.92?;*.9x?;*.9X?;*.v2?;*.V2?;*.tig";
+        break;
+    }
+
+	// get filename
+	if(folder == NULL)
+		folder = g_strdup(inst_paths.base_dir);
+
+	filenames = create_fsels(folder, NULL, (char *)ext);
+	if(!filenames)
+		return 0;
+
+	// keep folder
+	g_free(folder);
+	folder = g_path_get_dirname(filenames[0]);
+
+	ret = fs_send_files(filenames);
+	g_strfreev(filenames);
+
+	return ret;
+}
+
+int display_recv_files_dbox(const char *src, const char *dst)
+{
+	const gchar *fn;
+	gchar *src_folder;
+	gchar *dst_folder;
+	gchar *basename;
+	gchar *ext;
+
+	// get file components
+	src_folder = g_path_get_dirname(src);
+	dst_folder = inst_paths.home_dir;
+	basename = g_path_get_basename(dst);
+
+	 // set mask
+    switch(tihw.calc_type) 
+	{
+    case TI92:
+        ext = "*.92?";
+		break;
+	default:
+        ext = "*.89?;*.92?;*.9x?;*.9X?;*.v2?;*.V2?";
+        break;
+    }
+
+	fn = create_fsel(dst_folder, basename, ext, TRUE);
+	if (fn)
+		tiemu_file_move_with_check(src, fn);
+	else
+		tiemu_file_delete(src);
+
+	g_free(src_folder);
+	g_free(basename);
+
+	return 0;
+}
+
+#ifndef NO_GDB
+void fs_send_file_and_debug_info(const gchar *filename)
+{
+    const gchar *ext;
+    FileContent *metadata;
+
+    fs_send_file(filename);
+
+    ext = strrchr(filename, '.');
+    if (ext)
+    {
+        gchar *temp;
+        *(char *)ext = 0;
+        temp = g_strconcat(filename, ".dbg", NULL);
+#ifdef WIN32
+        symfile = g_locale_from_utf8(temp,-1,NULL,NULL,NULL);
+        g_free(temp);
+#else
+        symfile = temp;
+#endif
+        *(char *)ext = '.';
+    }
+
+    metadata = tifiles_content_create_regular(CALC_TI89);
+    if (!tifiles_file_read_regular(filename, metadata))
+    {
+        if (metadata->num_entries > 0)
+        {
+            int handle = sym_find_handle (metadata->entries[0]->folder, metadata->entries[0]->name);
+            if (handle)
+                ti68k_bkpt_add_pgmentry (handle);
+        }
+    }
+    tifiles_content_delete_regular(metadata);
+}
+
+gint display_debug_dbox(void)
+{
+	const gchar *filename;
+	const gchar *ext;
+	static gchar *folder = NULL;
+
+    // set mask
+    switch(tihw.calc_type) 
+	{
+    case TI92:
+        ext = "*.92?";
+		break;
+	default:
+        ext = "*.89?;*.92?;*.9x?;*.v2?";
+        break;
+    }
+
+	// get filename
+	if(folder == NULL)
+		folder = g_strdup(inst_paths.base_dir);
+
+	filename = (char *)create_fsel(folder, NULL, (char *)ext, FALSE);
+	if (!filename)
+    {
+		return 0;
+    }
+
+	// keep folder
+	g_free(folder);
+	folder = g_path_get_dirname(filename);
+
+    // check extension
+    if(!tifiles_file_is_ti(filename) || 
+        !tifiles_calc_is_ti9x(tifiles_file_get_model(filename))) 
+	{
+        msg_box1(_("Error"), _("This file is not a valid TI file."));
+        return -1;
+    }
+
+    fs_send_file_and_debug_info(filename);
+
+	return 0;
+}
+#else
+void fs_send_file_and_debug_info(const gchar *filename) 
+{
+    fs_send_file(filename);
+}
+#endif
+
+extern int dbgromcall_refresh_window(void);
+
+gint display_set_tib_dbox(void)
+{
+    const gchar *filename;
+	gchar *path, *name;
+	int err;
+
+    // get filename
+	filename = create_fsel(inst_paths.base_dir, NULL, "*.89u;*.9xu;*.v2u;*.tib", FALSE);
+	if (!filename)
+		return 0;
+
+	if(!ti68k_is_a_tib_file(filename))
+	{
+		msg_box1(_("Error"), _("Does not seem to be an upgrade."));
+		return -1;
+	}
+
+	path = g_path_get_dirname(filename);
+	name = g_path_get_basename(filename);
+
+	// set tib file
+	g_free(params.tib_file);
+	params.tib_file = g_strconcat(path, G_DIR_SEPARATOR_S, name, NULL);
+	g_free(path); g_free(name);
+
+	err = ti68k_load_upgrade(params.tib_file);
+	handle_error();
+	if(err)
+	{
+		msg_box1(_("Error"), _("Cannot load the upgrade."));
+		return -1;
+	}
+
+	// update ROM calls list
+	dbgromcall_refresh_window();
+
+    // simply reset, don't restart
+    ti68k_reset();
+
+    return 0;
+}
+
+int import_romversion(const char *filename)
+{
+	char *dstname;
+	int err;
+
+	if(ti68k_is_a_rom_file(filename))
+	{
+		err = ti68k_convert_rom_to_image(filename, inst_paths.img_dir, &dstname);
+		handle_error();
+		g_free(dstname);
+	}
+	else if(ti68k_is_a_tib_file(filename))
+	{
+		#ifdef _MSC_VER
+		IMG_INFO infos = {0};
+		#else
+		IMG_INFO infos = {};
+		#endif
+		int err = ti68k_get_tib_infos(filename, &infos, 0);
+		int hw_type = HW2;
+
+		if(infos.calc_type == TI92p || infos.calc_type == TI89)
+		{
+			int ret = msg_box3(_("HW type"), 
+				_("The FLASH upgrade can be imported as HW1 or HW2. Please choose..."), 
+				"HW1", "HW2", "Default");
+			if(ret == BUTTON1)
+				hw_type = HW1;
+			else if(ret == BUTTON2)
+				hw_type = HW2;
+		}
+		else if(infos.calc_type == TI89t)
+		{
+			int ret = msg_box3(_("HW type"), 
+				_("The FLASH upgrade can be imported as HW3 or HW4. Please choose..."), 
+				"HW3", "HW4", "Default");
+
+			hw_type = HW3; // default is HW3 for the Titanium, there's no Titanium HW2
+
+			if(ret == BUTTON1)
+				hw_type = HW3;
+			else if(ret == BUTTON2)
+				hw_type = HW4;
+		}
+
+		// fake rom
+		err = ti68k_convert_tib_to_image(filename, inst_paths.img_dir, &dstname, hw_type);
+		handle_error();
+		g_free(dstname);
+	}
+	else
+	{
+		msg_box1(_("Error"), _("This is not a valid file"));
+		return -1;
+	}
+
+	return 0;
+}
+
+gint display_import_romversion_dbox(void)
+{
+    const gchar *filename;
+    
+    // get filename
+	filename = create_fsel(inst_paths.base_dir, NULL, "*.rom;*.89u;*.9xu;*.v2u;*.tib", FALSE);
+	if (!filename)
+		return 0;    
+
+    return import_romversion(filename);;
+}
+
+
diff --git a/src/gui/fs_misc.h b/src/gui/fs_misc.h
new file mode 100644
index 0000000..def1ba7
--- /dev/null
+++ b/src/gui/fs_misc.h
@@ -0,0 +1,47 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2006, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+gint display_skin_dbox(void);
+gint display_load_state_dbox(void);
+gint display_save_state_dbox(void);
+gint display_recv_files_dbox(const char *src, const char *dst);
+gint display_send_files_dbox(void);
+
+gint display_debug_dbox(void);
+gint display_set_rom_dbox(void);
+gint display_set_tib_dbox(void);
+gint display_import_romversion_dbox(void);
+
+void fs_send_file(const gchar *filename);
+int  fs_send_files(gchar **filenames);
+void fs_send_file_and_debug_info(const gchar *filename);
+int  fs_load_state(const char *filename);
+
+G_END_DECLS
diff --git a/src/gui/infos.c b/src/gui/infos.c
new file mode 100644
index 0000000..6ea3236
--- /dev/null
+++ b/src/gui/infos.c
@@ -0,0 +1,120 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: infos.c 2444 2007-04-15 08:29:34Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "skinops.h"
+#include "ti68k_int.h"
+
+gint display_infos_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *label;
+	gint result;
+	gchar *str;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("infos-2.glade"), "infos_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "infos_dbox");
+
+	label = glade_xml_get_widget(xml, "label20");
+	switch(skin_infos.type)
+	{
+	case SKIN_TYPE_TIEMU:	str = g_strdup_printf("%s", "TiEmu v2.00"); break;
+	case SKIN_TYPE_VTI:		str = g_strdup_printf("%s", "VTi 2.5"); break;
+	case SKIN_TYPE_OLD_VTI:	str = g_strdup_printf("%s", "VTi 2.1"); break;
+	default:				str = g_strdup_printf("%s", _("unknown")); break;
+	}	
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	label = glade_xml_get_widget(xml, "label21");
+	str = g_strdup_printf("%s", skin_infos.name);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	label = glade_xml_get_widget(xml, "label22");
+	if(skin_infos.author)
+	    str = g_strdup_printf("%s", skin_infos.author);
+	else
+	    str = g_strdup("");
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	label = glade_xml_get_widget(xml, "label23");
+	str = g_strdup_printf("%s", ti68k_calctype_to_string(tihw.calc_type));
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	label = glade_xml_get_widget(xml, "label24");
+	str = g_strdup_printf("%s", tihw.rom_version);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	label = glade_xml_get_widget(xml, "label25");
+	str = g_strdup_printf("%i KB", tihw.ram_size >> 10);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	label = glade_xml_get_widget(xml, "label26");
+	str = g_strdup_printf("%i KB", tihw.rom_size >> 10);
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	label = glade_xml_get_widget(xml, "label27");
+	str = g_strdup_printf("%s", ti68k_romtype_to_string(tihw.rom_flash));
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+
+	label = glade_xml_get_widget(xml, "label28");
+	str = g_strdup_printf("%s", ti68k_hwtype_to_string(tihw.hw_type));
+	gtk_label_set_text(GTK_LABEL(label), str);
+	g_free(str);
+	
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) {
+	case GTK_RESPONSE_OK:
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
diff --git a/src/gui/infos.h b/src/gui/infos.h
new file mode 100644
index 0000000..1c55dc6
--- /dev/null
+++ b/src/gui/infos.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint display_infos_dbox();
diff --git a/src/gui/logger/log_link.c b/src/gui/logger/log_link.c
new file mode 100644
index 0000000..5ce7081
--- /dev/null
+++ b/src/gui/logger/log_link.c
@@ -0,0 +1,274 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: manpage.c 1455 2005-05-31 18:38:03Z roms $ */
+
+/*  tilp - Ti Linking Program
+ *  Copyright (C) 1999-2004  Romain Lievin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "support.h"
+#include "ti68k_def.h"
+#include "filesel.h"
+
+static GtkTextBuffer *txtbuf;
+static logger_enabled = 0;
+
+
+
+static void udpate_widgets(GtkWidget *button, GtkWidget *spin)
+{
+	gtk_button_set_use_stock(GTK_BUTTON(button), TRUE);
+	gtk_button_set_label(GTK_BUTTON(button), logger_enabled ? GTK_STOCK_STOP : GTK_STOCK_OK);	// GTK_STOCK_START
+
+	gtk_widget_set_sensitive(spin, !logger_enabled);
+}
+
+gint display_loglink_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *text;
+	gpointer data, data2;
+	int i, j;
+
+	xml = glade_xml_new
+		(tilp_paths_build_glade("log_link-2.glade"), "linklog_dbox", PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	text = glade_xml_get_widget(xml, "textview1");
+	txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
+
+	data = glade_xml_get_widget(xml, "spinbutton1");
+	gtk_spin_button_set_value(GTK_SPIN_BUTTON(data), logger.link_size >> 10);
+
+	data = glade_xml_get_widget(xml, "checkbutton1");
+	gtk_toggle_button_set_active(data, logger.link_mask & 1);
+
+	data = glade_xml_get_widget(xml, "checkbutton2");
+	gtk_toggle_button_set_active(data, logger.link_mask & 2);
+
+	data = glade_xml_get_widget(xml, "button10");
+	data2 = glade_xml_get_widget(xml, "spinbutton1");
+	udpate_widgets(data, data2);
+
+	if(logger.link_buf)
+	{
+		int old_flags;
+		char *str;
+		char *tmp;
+		int meaningful_length;
+		int offset;
+
+		if (logger.link_ptr <= logger.link_size)
+		{
+			// No data of the circular buffer was overwritten.
+			meaningful_length = logger.link_ptr;
+			offset = 0;
+		}
+		else
+		{
+			// Some data of the circular buffer was overwritten:
+			// * show only the meaningful part of it;
+			// * prevent reading past the bounds of logger.link_buf.
+			meaningful_length = logger.link_size;
+			offset = logger.link_ptr % logger.link_size;
+		}
+
+		old_flags = MSB((logger.link_buf)[offset]);
+
+		if((logger.link_buf)[offset] & (1 << 8))
+			str = g_strdup("S: ");
+		else
+			str = g_strdup("R: ");
+
+
+		for(i = j = 0; i < meaningful_length; i++)
+		{
+			uint16_t word = (logger.link_buf)[(i + offset) % logger.link_size];
+			uint8_t byte = LSB(word);
+			uint8_t flags = MSB(word);
+			int s = flags & 1;
+			int r = flags & 2;
+
+			if(flags != old_flags)
+			{
+				old_flags = flags;
+
+				tmp = g_strdup_printf("(%i bytes)\n", j);
+				str = g_strconcat(str, tmp, NULL);
+				g_free(tmp);
+				gtk_text_buffer_insert_at_cursor(txtbuf, str, strlen(str));
+
+				j = 0;
+				g_free(str);
+				str = g_strdup_printf("%c: ", s ? 'S' : 'R');
+				
+			}
+
+			// Wrap every 16 characters.
+			if((i != 0) && !(i & 15))
+			{
+				tmp = g_strdup("\n");
+				str = g_strconcat(str, tmp, NULL);
+				gtk_text_buffer_insert_at_cursor(txtbuf, str, strlen(str));
+				g_free(str);
+				str = g_strdup("   ");
+			}
+
+			tmp = g_strdup_printf("%02X ", byte);
+			str = g_strconcat(str, tmp, NULL);
+			g_free(tmp);
+			j++;
+		}
+
+		tmp = g_strdup_printf("(%i bytes)\n", j);
+		str = g_strconcat(str, tmp, NULL);
+		gtk_text_buffer_insert_at_cursor(txtbuf, str, strlen(str));
+
+		g_free(str);
+	}
+
+	dbox = glade_xml_get_widget(xml, "linklog_dbox");
+	gtk_widget_show(dbox);
+
+	return 0;
+}
+
+GLADE_CB void
+ll_checkbutton1_toggled                (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+
+	if(gtk_toggle_button_get_active(togglebutton)) 
+		logger.link_mask |= 1;
+	else
+		logger.link_mask &= ~1;
+}
+
+
+GLADE_CB void
+ll_checkbutton2_toggled                (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	if(gtk_toggle_button_get_active(togglebutton)) 
+		logger.link_mask |= 2;
+	else
+		logger.link_mask &= ~2;
+}
+
+
+GLADE_CB void
+on_button9_clicked                     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	const gchar *filename;
+	FILE *f;
+	gchar *txt;
+	GtkTextIter start, end;
+
+	filename = create_fsel(inst_paths.home_dir, "log_link.txt", "*.txt", TRUE);
+	if (!filename)
+		return;
+
+	f = fopen(filename, "wt");
+	if(f == NULL)
+		return;
+
+	gtk_text_buffer_get_bounds(txtbuf, &start, &end);
+	txt = gtk_text_buffer_get_text(txtbuf, &start, &end, TRUE);
+	printf("<%s>\n", txt);
+	fwrite(txt, strlen(txt), 1, f);
+
+	fclose(f);
+}
+
+
+GLADE_CB void
+on_button10_clicked                    (GtkButton       *butto,
+                                        gpointer         user_dat)
+{
+	GtkWidget *button = user_dat;
+	GtkWidget *spinbutton = GTK_WIDGET(butto);
+
+	logger_enabled = !logger_enabled;
+	if(logger.link_size == 0)
+		logger.link_size = 1024 * gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton));
+	logger.link_ptr = 0;
+
+	if(logger_enabled)
+	{
+		g_free(logger.link_buf);
+		logger.link_buf = (uint16_t *)g_malloc0(logger.link_size * sizeof(uint16_t));
+	}
+	else
+	{
+		g_free(logger.link_buf);
+		logger.link_buf = NULL;
+	}
+
+	udpate_widgets(button, spinbutton);
+}
+
+
+GLADE_CB void
+on_button11_clicked                    (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkTextIter start, end;
+	GtkWidget *text = GTK_WIDGET(button);
+	GtkTextBuffer *txtbuf;
+
+	// clear text
+	txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
+	gtk_text_buffer_get_bounds(txtbuf, &start, &end);
+	gtk_text_buffer_delete(txtbuf, &start, &end);
+	gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 15);
+
+	// clear buffer
+	g_free(logger.link_buf);
+	logger.link_buf = (uint16_t *)g_malloc0(logger.link_size * sizeof(uint16_t));
+	logger.link_ptr = 0;
+}
+
+
+GLADE_CB void
+on_button12_clicked                    (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	gtk_widget_destroy(GTK_WIDGET(button));
+}
+
+GLADE_CB void
+ll_spinbutton1_changed                 (GtkEditable     *editable,
+                                        gpointer         user_data)
+{
+	if(!logger_enabled)
+		logger.link_size = 1024 * gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable));
+}
diff --git a/src/gui/logger/log_link.h b/src/gui/logger/log_link.h
new file mode 100644
index 0000000..ea96e8d
--- /dev/null
+++ b/src/gui/logger/log_link.h
@@ -0,0 +1,29 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: manpage.h 1455 2005-05-31 18:38:03Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+gint display_loglink_dbox();
diff --git a/src/gui/main.c b/src/gui/main.c
new file mode 100644
index 0000000..f8fab70
--- /dev/null
+++ b/src/gui/main.c
@@ -0,0 +1,464 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: main.c 2630 2007-08-23 14:13:14Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2007, Peter Fernandes
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <setjmp.h>
+#include <locale.h>
+#ifdef __WIN32__
+#undef setjmp
+extern int asm_setjmp(jmp_buf b);
+#define setjmp asm_setjmp
+#include "oleaut_c.h"
+#endif
+
+#if WITH_KDE
+#include "kde.h"
+#endif
+
+#if WITH_DBUS
+#include "dbus_ipc.h"
+#endif
+
+#include "intl.h"
+#include "tilibs.h"
+#include "struct.h"
+#include "calc.h"
+#include "version.h"
+#include "cmdline.h"
+#include "files.h"
+#include "rcfile.h"
+#include "ti68k_int.h"
+#include "logging.h"
+
+#include "engine.h"
+#include "refresh.h"
+#include "calc.h"
+
+#include "wizard.h"
+#include "popup.h"
+#include "splash.h"
+#include "tie_error.h"
+#include "dboxes.h"
+#include "dbg_all.h"
+#include "romversion.h"
+#include "fs_misc.h"
+
+#ifndef NO_SOUND
+#include "audio.h"
+#endif
+
+#ifndef NO_GDB
+#include "gdbcall.h"
+#include "../gdb/gdb/main.h"
+#include "../gdb/gdb/gdb_string.h"
+#ifndef PARAMS
+#define PARAMS(x) x
+#endif
+#define READLINE_LIBRARY
+#include "../gdb/readline/readline.h"
+void gdbtk_hide_insight(void);
+void gdbtk_delete_interp(void);
+
+static void start_insight_timer(void);
+static void stop_insight_timer(void);
+static gint gdbtk_hide_insight_and_run_wrapper(gpointer data);
+#endif
+
+ScrOptions options2;
+TieOptions options;		// general tiemu options
+jmp_buf quit_gdb;       // longjmp target used when quitting GDB
+
+/* Special */
+
+static gint exit_loop = 0;
+
+void exit_main_loop(void)
+{
+	exit_loop = !0;
+}
+
+static void my_log_handler                  (const gchar *log_domain,
+                                             GLogLevelFlags log_level,
+                                             const gchar *message,
+                                             gpointer user_data) {}
+
+/* Main function */
+
+extern char *file_to_send;
+
+int main(int argc, char **argv) 
+{
+	int err;
+    
+
+	/*
+		Do primary initializations 
+	*/
+
+	/* Display program version */
+	tiemu_version();
+
+	/* Initialize platform independant paths */
+	initialize_paths();
+
+	/* Init i18n support */
+#ifdef ENABLE_NLS
+	tiemu_info("setlocale: <%s>", setlocale(LC_ALL, ""));
+  	tiemu_info("bindtextdomain: <%s>", bindtextdomain(PACKAGE, inst_paths.locale_dir));
+  	bind_textdomain_codeset(PACKAGE, "UTF-8"/*"ISO-8859-15"*/);
+  	tiemu_info("textdomain: <%s>", textdomain(PACKAGE));
+#endif
+
+	/* Initialize/reload config */
+	rcfile_default();   // (step 2)
+	rcfile_read();
+
+	/* Scan and modify command line */
+	scan_cmdline(argc, argv);
+
+#ifndef NO_SOUND
+	//init audio lib
+	if(audio_init()) {
+		tiemu_warning(_("Unable to initialize audio, sound will not play\n"));
+		audioerr=1;
+	}
+#endif
+
+    /* 
+		Init GTK+ toolkit
+	*/
+	gtk_init(&argc, &argv);
+    add_pixmap_directory(inst_paths.pixmap_dir);
+
+	/*
+		Get rid of glib, gdk, gtk warnings when compiled in Release mode
+	*/
+#if !defined(_DEBUG)
+	g_log_set_handler ("GLib", 
+		G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG,
+		my_log_handler, NULL);
+	g_log_set_handler ("Gdk", 
+		G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG,
+		my_log_handler, NULL);
+	g_log_set_handler ("Gtk", 
+		G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG,
+		my_log_handler, NULL);
+
+	g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, 
+		my_log_handler, NULL);
+#endif
+
+    /*
+        Set splash screen
+    */
+#ifndef __IPAQ__
+    splash_screen_start();
+    splash_screen_set_label(_("Initializing GTK+..."));
+#endif
+
+#if WITH_KDE
+    splash_screen_set_label(_("Initializing KDE..."));
+    sp_kde_init(argc, argv, "tiemu", _("TiEmu"), VERSION, _("TI calculator emulator"), "Copyright (c) 2000, Thomas Corvazier, Romain Lievin\nCopyright (c) 2001-2002, Romain Lievin, Julien Blache\nCopyright (c) 2003-2004, Romain Lievin\nCopyright (c) 2005-2007, Romain Lievin, Kevin Kofler\nCopyright (c) 2007, Peter Fernandes", "http://lpg.ticalc.org/prj_tiemu/", "gtktiemu-users at lists.sf.net");
+    atexit(sp_kde_finish);
+    g_timeout_add(26, sp_kde_process_qt_events, NULL);
+#endif
+
+#if WITH_DBUS
+    splash_screen_set_label(_("Initializing D-Bus..."));
+    dbus_init();
+    atexit(dbus_finish);
+#endif
+
+#ifdef __WIN32__
+    splash_screen_set_label(_("Initializing OLE..."));
+    oleaut_init();
+    atexit(oleaut_finish);
+#endif
+
+	/* 
+	   Check the version of libraries 
+	 */
+    splash_screen_set_label(_("Initializing TiLP framework..."));
+
+	if (strcmp(ticonv_version_get(), TIEMU_REQUIRES_LIBCONV_VERSION) < 0) 
+	{
+		tiemu_warning(_("libticonv library version <%s> mini required (<%s> found)."),
+			TIEMU_REQUIRES_LIBCONV_VERSION, ticonv_version_get());
+		msg_box1(_("Error"), _("libticonv: version mismatches."));
+		exit(-1);
+	}
+
+	if (strcmp(tifiles_version_get(), TIEMU_REQUIRES_LIBFILES_VERSION) < 0) 
+	{
+		tiemu_warning(_("libtifiles library version <%s> mini required (<%s> found)."),
+			TIEMU_REQUIRES_LIBFILES_VERSION, tifiles_version_get());
+		msg_box1(_("Error"), _("libtifiles: version mismatches."));
+		exit(-1);
+	}
+	
+	if (strcmp(ticables_version_get(), TIEMU_REQUIRES_LIBCABLES_VERSION) < 0) 
+	{
+		tiemu_warning(_("libticables library version <%s> mini required (<%s> found)."),
+			TIEMU_REQUIRES_LIBCABLES_VERSION, ticables_version_get());
+		msg_box1(_("Error"), _("libticables: version mismatches."));
+		exit(-1);
+	}
+	
+	if (strcmp(ticalcs_version_get(), TIEMU_REQUIRES_LIBCALCS_VERSION) < 0) 
+	{
+		tiemu_warning(_("libticalcs library version <%s> mini required (<%s> found)."),
+			TIEMU_REQUIRES_LIBCALCS_VERSION, ticalcs_version_get());
+		msg_box1(_("Error"), _("libticalcs: version mismatches."));
+		exit(-1);
+	}
+
+    /*
+        Search for dumps or upgrades to convert (in the image directory)
+    */
+    splash_screen_set_label(_("Searching for ROM dumps..."));
+    err = ti68k_scan_files(inst_paths.img_dir, inst_paths.img_dir, !0);
+	handle_error();
+
+	/*
+		Attempt to load an image (step 3)
+	*/
+	while(!exit_loop)
+	{
+
+		/* Windows follows the locale settings even for basic stdio I/O functions.
+		   This is an annoyance for floating-point numbers in GDB, so we override
+		   it here. Unfortunately, this disease seems to have spread to glibc as
+		   well recently. */
+		setlocale(LC_NUMERIC, "C");
+
+		err = ti68k_load_image(params.rom_file);
+		if(err) 
+		{
+	rescan:
+			if(ti68k_find_image(inst_paths.img_dir, NULL))
+			{
+				// search for an available image to use
+				if(display_romversion_dbox(TRUE) == -1)
+					goto wizard;
+			}
+			else
+			{
+				// launch wizard
+	wizard:
+				display_wizard_dbox();
+				while(!wizard_ok)
+					GTK_REFRESH();
+
+				if(wizard_ok == 2)
+					goto rescan;
+			
+				g_free(params.rom_file);
+				params.rom_file = g_strdup(wizard_rom);
+				g_free(wizard_rom);
+			}
+
+			splash_screen_set_label(_("Loading image..."));
+			err = ti68k_load_image(params.rom_file);
+			handle_error();
+		}
+
+		/* 
+			Initialize emulation engine (step 4)
+		*/
+		splash_screen_set_label(_("Initializing m68k emulation engine..."));
+		err = ti68k_init();
+		handle_error();
+		if(err)	return -1;
+
+		err = hid_init();
+		handle_error();
+		if(err)	return -1;
+
+		/*
+			Load FLASH upgrade (if any)
+		*/
+		if(params.tib_file != NULL) 
+		{
+			err = ti68k_load_upgrade(params.tib_file);
+			handle_error();
+		}
+
+		/* 
+			Override refresh functions of the ticalcs2 library 
+			(must be done after init of ti68k engine)
+		*/
+		tiemu_update_set_gtk();
+
+		/* 
+			Reset emulation engine (step 5)
+		*/
+		ti68k_reset();
+
+		/* 
+			Load calculator state image 
+		*/
+		splash_screen_set_label(_("Loading previously saved state..."));
+		if(params.sav_file != NULL) 
+		{
+			err = ti68k_state_load(params.sav_file);
+			handle_error();
+		}
+
+		/*
+			Cache debugger windows to speed-up display and install custom event
+		*/
+#ifndef __IPAQ__
+		splash_screen_set_label(_("Pre-loading debugger..."));
+		gtk_debugger_preload();
+#endif  
+
+		/*
+			Check for a file to send
+		*/
+		if(file_to_send)
+		{
+			if(!img_loaded || !ti68k_linkport_ready())
+				break;
+
+			fs_send_file(file_to_send);
+			g_free(file_to_send);
+		}
+
+		/* 
+			Start emulation engine and run main loop 
+		*/		
+		splash_screen_stop();
+#ifdef NO_GDB
+		engine_start();
+		gtk_main();
+		engine_stop();
+#else
+
+		/*
+			Run Insight GDB
+		*/
+		start_insight_timer();
+		if (setjmp(quit_gdb) == 0)
+		{
+			struct captured_main_args args;
+			memset (&args, 0, sizeof args);
+			args.argc = argc;
+			args.argv = argv;
+			args.use_windows = 1;
+			args.interpreter_p = "insight";
+			g_idle_add(gdbtk_hide_insight_and_run_wrapper, NULL);
+			gdb_main (&args);
+		}
+		stop_insight_timer();
+
+		/*
+			Clean up in case we interrupted GDB during command-line
+			parsing
+		*/
+		rl_callback_handler_remove();
+#endif
+
+		err = hid_exit();
+		handle_error();
+
+		err = ti68k_exit();
+		handle_error();
+
+
+		ti68k_unload_image_or_upgrade();
+	}
+
+#ifndef NO_GDB
+	gdbtk_delete_interp();
+#endif
+
+	return 0;
+}
+
+/*
+   These functions are used by Insight to enable/disable its UI hook.
+*/
+#ifndef NO_GDB
+int x_event(int);
+static guint gdbtk_timer_id = 0;
+
+static gint tiemu_x_event_wrapper(gpointer data)
+{
+  x_event(0);
+  return TRUE;
+}
+
+static void start_insight_timer(void)
+{
+  if (!gdbtk_timer_id)
+    gdbtk_timer_id = g_timeout_add(25, tiemu_x_event_wrapper, NULL); /* 25 ms */
+}
+
+static void stop_insight_timer(void)
+{
+  if (gdbtk_timer_id)
+    {
+      g_source_remove(gdbtk_timer_id);
+      gdbtk_timer_id = 0;
+    }
+}
+
+static gint gdbtk_hide_insight_and_run_wrapper(gpointer data)
+{
+  gdbtk_hide_insight();
+  gdbcall_run();
+  return FALSE;
+}
+#endif
+
+/* 
+   If GtkTiEmu is compiled in console mode (_CONSOLE), 
+   then we use the 'main' entry point.
+   If GtkTiEmu is compiled as a windowed application (_WINDOWS), 
+   then we use the 'WinMain' entry point.
+*/
+#if defined(__WIN32__) && defined(_WINDOWS)// && !defined(_CONSOLE)
+
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
+
+int APIENTRY WinMain(HINSTANCE hInstance,
+                     HINSTANCE hPrevInstance,
+                     LPSTR     lpCmdLine,
+                     int       nCmdShow)
+{
+	return main(__argc, __argv);
+}
+#endif
diff --git a/src/gui/manpage.c b/src/gui/manpage.c
new file mode 100644
index 0000000..c09e1f0
--- /dev/null
+++ b/src/gui/manpage.c
@@ -0,0 +1,101 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: manpage.c 2649 2007-09-17 15:35:08Z roms $ */
+
+/*  tilp - Ti Linking Program
+ *  Copyright (C) 1999-2004  Romain Lievin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "intl.h"
+#include "manpage.h"
+#include "paths.h"
+#include "engine.h"
+
+gint display_manpage_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkTextBuffer *txtbuf;
+	GtkWidget *text;
+	FILE *fd;
+	gchar *filename;
+	gchar buffer[32768];
+	gint len = 0;
+	struct stat stbuf;
+	gint result;
+	PangoFontDescription *font_desc;
+
+	filename =
+	    g_strconcat(inst_paths.manpage_dir, "Manpage.txt", NULL);
+	if (access(filename, F_OK) == 0) {
+		if (stat(filename, &stbuf) != -1) {
+			len = stbuf.st_size;
+			len -= 2;
+		}
+		if ((fd = fopen(filename, "r")) != NULL) {
+			memset(buffer, 0, sizeof(buffer));
+			len = fread(buffer, 1, len, fd);
+			fclose(fd);
+		}
+	}
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("manpage-2.glade"), "manpage_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "manpage_dbox");
+	text = glade_xml_get_widget(xml, "textview1");
+
+	// Change font
+	font_desc = pango_font_description_from_string ("Courier");
+	gtk_widget_modify_font (text, font_desc);
+	pango_font_description_free (font_desc);
+
+	// Set text
+	txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
+	gtk_text_buffer_set_text(txtbuf, buffer, len);
+
+	while (gtk_events_pending())
+		gtk_main_iteration();
+
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) {
+	case GTK_RESPONSE_OK:
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
diff --git a/src/gui/manpage.h b/src/gui/manpage.h
new file mode 100644
index 0000000..992a544
--- /dev/null
+++ b/src/gui/manpage.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: manpage.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint display_manpage_dbox();
diff --git a/src/gui/pbars.c b/src/gui/pbars.c
new file mode 100644
index 0000000..eb0f445
--- /dev/null
+++ b/src/gui/pbars.c
@@ -0,0 +1,235 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: pbars.c 2385 2007-03-12 21:04:20Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <string.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "intl.h"
+#include "support.h"
+#include "pbars.h"
+#include "struct.h"
+#include "tilibs.h"
+
+struct progress_window p_win = { 0 };
+static GtkWidget *pbar_window = NULL;
+extern CalcUpdate calc_update;
+
+static void reset_counters(void)
+{
+	calc_update.cnt1 = calc_update.max1 = 0;
+	calc_update.cnt2 = calc_update.max2 = 0;
+	calc_update.cnt3 = calc_update.max3 = 1;
+	calc_update.cancel = 0;
+}
+
+/* Create a window with 1 progress bar */
+void create_pbar_type1(const gchar *title)
+{
+	GladeXML *xml;
+
+	reset_counters();
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("pbars-2.glade"), "pbar1_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	pbar_window = glade_xml_get_widget(xml, "pbar1_dbox");
+	gtk_window_set_title(GTK_WINDOW(pbar_window), title);
+
+	p_win.pbar1 = glade_xml_get_widget(xml, "progressbar10");
+	p_win.label_rate = glade_xml_get_widget(xml, "label11");
+
+	gtk_widget_show_all(pbar_window);
+}
+
+
+/* Create a window with 1 label */
+void create_pbar_type2(const gchar *title)
+{
+	GladeXML *xml;
+
+	reset_counters();
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("pbars-2.glade"), "pbar2_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error("GUI loading failed !\n");
+	glade_xml_signal_autoconnect(xml);
+
+	pbar_window = glade_xml_get_widget(xml, "pbar2_dbox");
+	gtk_window_set_title(GTK_WINDOW(pbar_window), title);
+
+	p_win.label = glade_xml_get_widget(xml, "label20");
+
+	gtk_widget_show_all(pbar_window);
+}
+
+
+/* Create a window with 2 progress bars */
+void create_pbar_type3(const gchar *title)
+{
+	GladeXML *xml;
+
+	reset_counters();
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("pbars-2.glade"), "pbar3_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error("GUI loading failed !\n");
+	glade_xml_signal_autoconnect(xml);
+
+	pbar_window = glade_xml_get_widget(xml, "pbar3_dbox");
+	gtk_window_set_title(GTK_WINDOW(pbar_window), title);
+
+	p_win.pbar2 = glade_xml_get_widget(xml, "progressbar30");
+	p_win.pbar1 = glade_xml_get_widget(xml, "progressbar31");
+	p_win.label_rate = glade_xml_get_widget(xml, "label32");
+
+	gtk_widget_show_all(pbar_window);
+}
+
+
+/* Create a window with a 1 progress bar and 1 label */
+void create_pbar_type4(const gchar *title)
+{
+	GladeXML *xml;
+
+	reset_counters();
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("pbars-2.glade"), "pbar4_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error("GUI loading failed !\n");
+	glade_xml_signal_autoconnect(xml);
+
+	pbar_window = glade_xml_get_widget(xml, "pbar4_dbox");
+	gtk_window_set_title(GTK_WINDOW(pbar_window), title);
+
+	p_win.label_part = glade_xml_get_widget(xml, "label41");
+	p_win.label = glade_xml_get_widget(xml, "label42");
+	p_win.pbar1 = glade_xml_get_widget(xml, "progressbar40");
+	p_win.label_rate = glade_xml_get_widget(xml, "label43");
+
+	gtk_widget_show_all(pbar_window);
+}
+
+
+/* Create a window with 2 progress bars and 1 label */
+void create_pbar_type5(const gchar *title)
+{
+	GladeXML *xml;
+
+	reset_counters();
+
+	xml = glade_xml_new
+	    (tilp_paths_build_glade("pbars-2.glade"), "pbar5_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error("GUI loading failed !\n");
+	glade_xml_signal_autoconnect(xml);
+
+	pbar_window = glade_xml_get_widget(xml, "pbar5_dbox");
+	gtk_window_set_title(GTK_WINDOW(pbar_window), title);
+
+	p_win.label_part = glade_xml_get_widget(xml, "label52");
+	p_win.label = glade_xml_get_widget(xml, "label53");
+	p_win.pbar2 = glade_xml_get_widget(xml, "progressbar50");
+	p_win.pbar1 = glade_xml_get_widget(xml, "progressbar51");	
+	p_win.label_rate = glade_xml_get_widget(xml, "label54");
+
+	gtk_widget_show_all(pbar_window);
+}
+
+/* Create a pbar window */
+void create_pbar(int type, const gchar *title)
+{
+	switch(type)
+	{
+	case 1: create_pbar_type1(title); break;
+	case 2: create_pbar_type2(title); break;
+	case 3: create_pbar_type3(title); break;
+	case 4: create_pbar_type4(title); break;
+	case 5: create_pbar_type5(title); break;
+	default: break;
+	}
+		
+}
+
+/* 
+   Destroy a pbar window
+*/
+void destroy_pbar(void)
+{
+	p_win.pbar1 = NULL;
+	p_win.pbar2 = NULL;
+	p_win.label = NULL;
+	p_win.label_part = NULL;
+	p_win.label_rate = NULL;
+
+	if (pbar_window)
+		gtk_widget_destroy(pbar_window);
+	pbar_window = NULL;
+}
+
+
+GLADE_CB void on_pbar_okbutton1_pressed(GtkButton * button,
+					gpointer user_data)
+{
+	calc_update.cancel = 1;
+}
+
+/*
+	Get list of counters to refresh
+ */
+int tilp_pbar_type(int op)
+{
+	extern CalcHandle*  calc_handle;
+	const char **array = calc_handle->calc->counters;
+	const char *str = array[op];
+
+	if(!strcmp(str, "1P"))
+		return 1;
+	else if(!strcmp(str, "1L"))
+		return 2;
+	else if(!strcmp(str, "2P"))
+		return 3;
+	else if(!strcmp(str, "1P1L"))
+		return 4;
+	else if(!strcmp(str, "2P1L"))
+		return 5;
+
+	return 0;
+}
diff --git a/src/gui/pbars.h b/src/gui/pbars.h
new file mode 100644
index 0000000..9a2fd83
--- /dev/null
+++ b/src/gui/pbars.h
@@ -0,0 +1,51 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: pbars.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include "support.h"
+
+extern struct progress_window {
+	GtkWidget* window;
+	GtkWidget* pbar1;
+	GtkWidget* pbar2;
+	GtkWidget* label;
+	GtkWidget* label_rate;
+	GtkWidget* label_part;
+} p_win;
+
+void create_pbar_type1(const gchar* title);
+void create_pbar_type2(const gchar* title);
+void create_pbar_type3(const gchar* title);
+void create_pbar_type4(const gchar* title);
+void create_pbar_type5(const gchar* title);
+
+void create_pbar(int type, const gchar * title);
+void destroy_pbar(void);
+
+GLADE_CB void on_pbar_okbutton1_pressed(GtkButton* button, gpointer user_data);
+
+int tilp_pbar_type(int op);
+#define create_pbar_(t,s)	create_pbar(tilp_pbar_type(t),(s))
diff --git a/src/gui/quicksend.c b/src/gui/quicksend.c
new file mode 100644
index 0000000..4607281
--- /dev/null
+++ b/src/gui/quicksend.c
@@ -0,0 +1,128 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: scroptions.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <string.h>
+
+#include "intl.h"
+#include "support.h"
+#include "paths.h"
+#include "struct.h"
+#include "ti68k_int.h"
+#include "dboxes.h"
+
+static char *tmp_file = NULL;
+static int tmp_enabled = 0;
+
+static GtkWidget *fcb = NULL;
+
+gint display_quicksend_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("quicksend-2.glade"), 
+		 "quicksend_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "quicksend_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+
+	tmp_enabled = options.qs_enabled;
+	tmp_file = g_strdup(options.qs_file);
+
+	fcb = glade_xml_get_widget(xml, "filechooserbutton1");
+	gtk_widget_set_sensitive(fcb, tmp_enabled && tmp_file);
+	if(tmp_file && strlen(tmp_file))
+		gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fcb), tmp_file);
+	// filter wildcards to set
+	//"*.89?;*.92?;*.9x?;*.9X?;*.v2?;*.V2?;*.tig"
+
+	data = glade_xml_get_widget(xml, "checkbutton1");
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), tmp_enabled);
+	
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		options.qs_enabled = tmp_enabled;
+
+		g_free(options.qs_file);
+		options.qs_file = tmp_file;
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
+
+GLADE_CB void
+qs_checkbutton1_toggled                (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+	tmp_enabled = gtk_toggle_button_get_active(togglebutton);
+	if(fcb)
+		gtk_widget_set_sensitive(fcb, tmp_enabled);
+}
+
+GLADE_CB void
+qs_filechooserbutton1_current_folder_changed
+                                        (GtkFileChooser  *filechooser,
+                                        gpointer         user_data)
+{
+	gchar *fname = gtk_file_chooser_get_filename (filechooser);
+
+	if(!fname)
+		return;
+
+	if(!tifiles_file_is_ti(fname) || !tifiles_calc_is_ti9x(tifiles_file_get_model(fname)) ||
+		!tifiles_file_test(fname, TIFILE_REGULAR, CALC_NONE))
+	{
+		g_free(tmp_file); tmp_file = NULL;
+		msg_box1(_("Error"), _("This file is not a valid TI file."));
+		return;
+	}
+
+	g_free(tmp_file);
+	tmp_file = g_strdup(fname); // dup or copy???
+}
+
+/* */
diff --git a/src/gui/quicksend.h b/src/gui/quicksend.h
new file mode 100644
index 0000000..5f39a18
--- /dev/null
+++ b/src/gui/quicksend.h
@@ -0,0 +1,32 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+char *qs_filename;
+int qs_enabled;
+
+gint display_quicksend_dbox();
diff --git a/src/gui/refresh.c b/src/gui/refresh.c
new file mode 100644
index 0000000..aa10f6b
--- /dev/null
+++ b/src/gui/refresh.c
@@ -0,0 +1,186 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: refresh.c 2349 2007-02-09 11:21:47Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <stdio.h>
+#include <gtk/gtk.h>
+
+#include "intl.h"
+#include "dboxes.h"
+#include "tilibs.h"
+#include "refresh.h"
+#include "pbars.h"
+
+extern CalcUpdate calc_update;
+
+static void gt_start(void)
+{
+	calc_update.cnt1 = calc_update.max1 = 0;
+	calc_update.cnt2 = calc_update.max2 = 0;
+	calc_update.cnt3 = calc_update.max3 = 0;
+}
+
+static void gt_stop(void)
+{
+	calc_update.cnt1 = calc_update.max1 = 0;
+	calc_update.cnt2 = calc_update.max2 = 0;
+	calc_update.cnt3 = calc_update.max3 = 0;
+}
+
+static void filter_shift(void);
+static gfloat filter_compute(gfloat input);
+
+static void refresh_pbar1(void)
+{
+	gchar buffer[32];
+	gfloat rate, avg;
+  
+	if (p_win.pbar1 != NULL) 
+	{
+		if(calc_update.cnt1 > calc_update.max1)
+			calc_update.cnt1 = calc_update.max1;
+
+		if(calc_update.max1 != 0)
+			gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(p_win.pbar1), 
+				(gdouble)calc_update.cnt1 / calc_update.max1);
+
+		if(p_win.label_rate != NULL)
+		{
+			rate = calc_update.rate;
+			filter_shift();
+			avg = filter_compute(rate);
+
+			g_snprintf(buffer, 32, "Rate: %1.1f Kbytes/s", avg);
+			gtk_label_set_text(GTK_LABEL(p_win.label_rate), buffer);
+		}
+		GTK_REFRESH();
+	}
+}
+
+static void refresh_pbar2(void)
+{
+	if (p_win.pbar2 != NULL) 
+	{
+		if(calc_update.cnt2 > calc_update.max2)
+			calc_update.cnt2 = calc_update.max2;
+
+		if(calc_update.max2 != 0)
+			gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(p_win.pbar2), 
+				(gdouble)calc_update.cnt2 / calc_update.max2);
+
+		GTK_REFRESH();
+	}
+}
+
+static void refresh_pbar3(void)
+{
+	if(p_win.label_part != NULL)
+	{
+		gchar *str;
+
+		str = g_strdup_printf("%i/%i: ", calc_update.cnt3, calc_update.max3);
+		gtk_label_set_text(GTK_LABEL(p_win.label_part), str);
+
+		GTK_REFRESH();
+	}
+}
+
+static void gt_pbar(void)
+{
+  refresh_pbar1();
+  refresh_pbar2();
+  refresh_pbar3();
+}
+
+static void gt_label(void)
+{
+	if (p_win.label == NULL)
+		return;
+
+	gtk_label_set_text(GTK_LABEL(p_win.label), calc_update.text);
+
+	GTK_REFRESH();
+}
+
+static void gt_refresh(void)
+{
+	GTK_REFRESH();
+}
+
+CalcUpdate calc_update =
+{
+	"", 0, 0.0, 
+	0, 0, 0, 0, 0, 0,
+	0, 0,
+	gt_start,
+	gt_stop,
+	gt_refresh,
+	gt_pbar,
+	gt_label,
+};
+
+void tiemu_update_set_gtk(void)
+{
+	extern CalcHandle *calc_handle;	// defined in dbus.c
+
+	ticalcs_update_set(calc_handle, &calc_update);
+}
+
+///// misc
+
+static gfloat filter[8] = { 0 };
+
+static void filter_shift(void)
+{
+	int i;
+
+	for(i=7; i>0; i--)
+		filter[i] = filter[i-1];
+}
+
+static gfloat filter_compute(gfloat input)
+{
+	int i;
+	gfloat avg, min, max;
+	
+	avg = min = max = 0.0;
+
+	filter[0] = input;
+	for(i=0; i<7; i++) {
+		if(filter[i] < min) min = filter[i];
+		if(filter[i] > max) max = filter[i];
+
+		avg += filter[i];
+	}
+
+	avg -= min;
+	avg -= max;
+	
+	return (avg / 6);
+}
+
+
+
+
+
diff --git a/src/gui/refresh.h b/src/gui/refresh.h
new file mode 100644
index 0000000..9abf59b
--- /dev/null
+++ b/src/gui/refresh.h
@@ -0,0 +1,34 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: refresh.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GTK_REFRESH_H
+#define GTK_REFRESH_H
+
+void tiemu_update_set_gtk(void);
+
+#define GTK_REFRESH() { while( gtk_events_pending() ) { gtk_main_iteration(); }}
+
+#endif
diff --git a/src/gui/release.c b/src/gui/release.c
new file mode 100644
index 0000000..904b3ea
--- /dev/null
+++ b/src/gui/release.c
@@ -0,0 +1,103 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: release.c 2649 2007-09-17 15:35:08Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (C) 1999-2005  Romain Lievin
+ *  Copyright (C) 2005 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "intl.h"
+#include "paths.h"
+#include "engine.h"
+
+gint display_release_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkTextBuffer *txtbuf;
+	GtkWidget *text;
+	FILE *fd;
+	gchar *filename;
+	gchar buffer[65536];
+	gint len = 0;
+	struct stat stbuf;
+	gint result;
+	PangoFontDescription *font_desc;
+
+#ifdef _MSC_VER /* MSVC builds. MinGW builds use Linux file structures. */
+	filename = g_strconcat(inst_paths.base_dir, "Release.txt", NULL);
+
+#else				/*  */
+	filename = g_strconcat(inst_paths.base_dir, "RELEASE", NULL);
+#endif				/*  */
+
+	if (access(filename, F_OK) == 0) 
+	{
+		if (stat(filename, &stbuf) != -1) 
+		{
+			len = stbuf.st_size;
+		}
+		if ((fd = fopen(filename, "r")) != NULL) 
+		{
+			memset(buffer, 0, sizeof(buffer));
+			len = fread(buffer, 1, len, fd);
+			fclose(fd);
+		}
+	}
+
+	xml = glade_xml_new(tilp_paths_build_glade("release-2.glade"), "release_dbox",
+	     PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "release_dbox");
+	text = glade_xml_get_widget(xml, "textview1");
+
+	// Change font
+	font_desc = pango_font_description_from_string ("Courier");
+	gtk_widget_modify_font (text, font_desc);
+	pango_font_description_free (font_desc);
+
+	// Set text
+	txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
+	gtk_text_buffer_set_text(txtbuf, buffer, len);
+
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) 
+	{
+	case GTK_RESPONSE_OK:
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+	return 0;
+}
diff --git a/src/gui/release.h b/src/gui/release.h
new file mode 100644
index 0000000..bac2317
--- /dev/null
+++ b/src/gui/release.h
@@ -0,0 +1,29 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: release.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+gint display_release_dbox(void);
diff --git a/src/gui/romversion.c b/src/gui/romversion.c
new file mode 100644
index 0000000..3ca896e
--- /dev/null
+++ b/src/gui/romversion.c
@@ -0,0 +1,323 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: romversion.c 2753 2007-12-30 23:14:15Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <unistd.h> // unlink
+
+#include "support.h"
+#include "intl.h"
+#include "paths.h"
+#include "ti68k_int.h"
+#include "refresh.h"
+#include "struct.h"
+#include "dboxes.h"
+#include "fs_misc.h"
+#include "rcfile.h"
+#include "tie_error.h"
+#include "calc.h"
+
+GtkWidget *dbox;
+gchar *chosen_file = NULL;
+
+enum { 
+	COL_FILENAME, COL_CALC, COL_VERSION, 
+	COL_MEMORY, COL_SIZE, COL_TYPE, COL_HW
+};
+#define CLIST_NVCOLS	(7)
+#define CLIST_NCOLS		(7)
+
+static void clist_selection_changed(GtkTreeSelection * sel,
+				   					gpointer user_data)
+{ 
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+
+    if (gtk_tree_selection_get_selected (sel, &model, &iter))
+    {
+        if (chosen_file != NULL)
+		{
+	        g_free(chosen_file);
+			chosen_file = NULL;
+		}
+
+        gtk_tree_model_get (model, &iter, 0, &chosen_file, -1);
+		gtk_dialog_set_response_sensitive(GTK_DIALOG(dbox), GTK_RESPONSE_OK, TRUE);
+    }
+}
+
+static GtkListStore* clist_create(GtkWidget *clist)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(clist);	
+	GtkListStore *list;
+	GtkTreeModel *model;
+	GtkCellRenderer *renderer;
+	GtkTreeSelection *selection;
+	gint i;
+	const gchar *text[CLIST_NCOLS] = { 
+		_("Filename"), _("Model"), _("Version"), 
+		_("Type"), _("Size"), _("Boot"), _("Hardware") };
+	
+	list = gtk_list_store_new(CLIST_NCOLS,
+    			G_TYPE_STRING, G_TYPE_STRING,
+			    G_TYPE_STRING, G_TYPE_STRING,
+			    G_TYPE_STRING, G_TYPE_STRING,
+                G_TYPE_STRING,
+                -1);
+    model = GTK_TREE_MODEL(list);
+  
+    gtk_tree_view_set_model(view, model); 
+    gtk_tree_view_set_headers_visible(view, TRUE);
+	gtk_tree_view_set_headers_clickable(view, TRUE);
+	gtk_tree_view_set_rules_hint(view, FALSE);
+  
+    for (i = 0; i < CLIST_NCOLS; i++) 
+    {
+    	renderer = gtk_cell_renderer_text_new();
+        gtk_tree_view_insert_column_with_attributes(view, -1, text[i],
+						renderer, "text", i, NULL);
+    }
+    
+    for (i = 0; i < CLIST_NCOLS; i++) 
+    {
+		GtkTreeViewColumn *col;
+		
+		col = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(col, TRUE);
+	}
+	
+	selection = gtk_tree_view_get_selection(view);
+	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+
+	g_signal_connect(G_OBJECT(selection), "changed",
+			 G_CALLBACK(clist_selection_changed), NULL);
+
+	return list;
+}
+
+static void clist_populate(GtkListStore *store)
+{
+	gchar *filename;
+    FILE *fp;
+    GtkTreeIter iter;    
+    struct stat s;
+
+	// scan ROM images
+    filename = g_strconcat(inst_paths.img_dir, CACHE_FILE, NULL);
+    ti68k_scan_images(inst_paths.img_dir, filename);
+
+    stat(filename, &s);
+    if(s.st_size == 0) 
+		return;
+
+    fp = fopen(filename, "rt");
+    if(fp == NULL) 
+		return;
+
+    while(!feof(fp)) 
+	{
+		gchar **row_text;
+        char line[256];
+
+        if (!fgets(line, sizeof(line), fp) || feof(fp))
+            break;
+        line[strlen(line) - 1] = '\0';
+
+        row_text = g_strsplit(line, ",", 7);
+
+        gtk_list_store_append(store, &iter);
+        gtk_list_store_set(store, &iter, 
+			0, row_text[0],
+			1, row_text[1], 
+			2, row_text[2],
+			3, row_text[3], 
+			4, row_text[4],
+			5, row_text[5],
+            6, row_text[6],
+            -1);
+
+			g_strfreev(row_text);
+    } 
+
+    fclose(fp);
+}
+
+static void clist_refresh(GtkListStore *store)
+{
+	gtk_list_store_clear(store);
+	clist_populate(store);
+}
+
+gint display_romversion_dbox(gboolean file_only)
+{
+    GladeXML *xml;
+	GtkWidget *data;
+    gint result;
+    GtkListStore *store;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("romversion-2.glade"), "romversion_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+    // display list box
+	dbox = glade_xml_get_widget(xml, "romversion_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+    
+    data = glade_xml_get_widget(xml, "clist1");
+    store = clist_create(data);
+	clist_populate(store);
+    
+	// run main box
+	gtk_dialog_set_response_sensitive(GTK_DIALOG(dbox), GTK_RESPONSE_OK, FALSE);
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	gtk_widget_destroy(dbox);
+
+	switch (result) 
+	{
+		case GTK_RESPONSE_OK:
+            if(chosen_file == NULL)
+                break;
+
+			if(!ti68k_is_a_img_file(chosen_file))
+				break;
+
+            // Remove previous tib file
+            g_free(params.tib_file);
+			params.tib_file = g_strconcat("", NULL);
+
+            // Set new image
+			g_free(params.rom_file);
+			params.rom_file = g_strconcat(inst_paths.img_dir, chosen_file, NULL);
+			g_free(chosen_file);
+            chosen_file = NULL;
+
+            if(file_only) return 0;
+
+            // Restart engine by exiting the GTK loop
+			g_free(params.sav_file);
+			params.sav_file = g_strdup("");
+
+			while(gtk_events_pending()) gtk_main_iteration();
+			gtk_main_quit();	
+		break;
+		
+		default:
+            if(file_only) return -1;
+		break;
+	}
+
+	return 0;
+}
+
+GLADE_CB void
+on_romversion_add1_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(button);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+
+	display_import_romversion_dbox();
+	clist_refresh(store);
+}
+
+GLADE_CB void
+on_romversion_del1_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+	GtkTreeView *view = GTK_TREE_VIEW(button);
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkListStore *store = GTK_LIST_STORE(model);
+	GtkTreeSelection *selection = gtk_tree_view_get_selection(view);
+	GtkTreeIter iter;
+	gchar *filename;
+	gchar *path;
+
+	if (gtk_tree_selection_get_selected (selection, &model, &iter))
+    {
+		gtk_tree_model_get(model, &iter, COL_FILENAME, &filename, -1);		
+		path = g_strconcat(inst_paths.img_dir, filename, NULL);
+		
+		// delete
+		unlink(path);
+
+		g_free(filename);
+		g_free(path);
+	}
+
+	clist_refresh(store);
+}
+
+GLADE_CB gboolean
+on_romversion_button_press_event       (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+#if 1
+	GtkTreeView *view = GTK_TREE_VIEW(user_data);
+    GtkTreeModel *model = gtk_tree_view_get_model(view);
+	GtkTreeViewColumn *column;
+	GtkTreePath *path;
+    GtkTreeIter iter;
+    gboolean ret;
+
+    if (event->type != GDK_2BUTTON_PRESS)	// double-click ?
+		return FALSE;
+	else
+	{
+		// retrieve selection
+		gint tx = (gint) event->x;
+	    gint ty = (gint) event->y;
+	    gint cx, cy;
+		
+        ret = gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, &cy);
+        if(ret == FALSE)
+            return FALSE;
+
+		if (!gtk_tree_model_get_iter(model, &iter, path))
+		    return FALSE;
+        gtk_tree_path_free(path);
+
+		g_free(chosen_file);
+        gtk_tree_model_get(model, &iter, COL_FILENAME, &chosen_file, -1);		
+	
+		gtk_dialog_response(GTK_DIALOG(widget), GTK_RESPONSE_OK);
+		return TRUE;
+    }
+#endif
+    return FALSE;
+}
+
diff --git a/src/gui/romversion.h b/src/gui/romversion.h
new file mode 100644
index 0000000..01715ad
--- /dev/null
+++ b/src/gui/romversion.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint display_romversion_dbox(gboolean file_only);
diff --git a/src/gui/scroptions.c b/src/gui/scroptions.c
new file mode 100644
index 0000000..2046ae3
--- /dev/null
+++ b/src/gui/scroptions.c
@@ -0,0 +1,327 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: scroptions.c 2753 2007-12-30 23:14:15Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <string.h>
+
+#include "intl.h"
+#include "support.h"
+#include "paths.h"
+#include "struct.h"
+//#include "skinops.h"
+#include "ti68k_int.h"
+#include "screenshot.h"
+
+static ScrOptions tmp_options;
+
+static GtkWidget *frame = NULL;
+static GtkWidget *label = NULL;
+void refresh_label(void);
+
+gint display_scroptions_dbox()
+{
+	GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+	
+	xml = glade_xml_new
+		(tilp_paths_build_glade("scroptions-2.glade"), 
+		 "scroptions_dbox",
+		 PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+	
+	dbox = glade_xml_get_widget(xml, "scroptions_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_CANCEL,-1);
+	memcpy(&tmp_options, &options2, sizeof(ScrOptions));
+    tmp_options.file = g_strdup(options2.file);
+	tmp_options.folder = g_strdup(options2.folder);
+
+	frame = glade_xml_get_widget(xml, "frame5");
+	gtk_widget_set_sensitive(frame, tmp_options.size == IMG_LCD);
+
+	switch (tmp_options.format)
+	{
+	case IMG_JPG: 
+		data = glade_xml_get_widget(xml, "radiobutton30");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	case IMG_PNG: 
+		data = glade_xml_get_widget(xml, "radiobutton31");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	case IMG_ICO: 
+		data = glade_xml_get_widget(xml, "radiobutton32");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break; 
+	case IMG_EPS:
+		data = glade_xml_get_widget(xml, "radiobutton33");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	case IMG_PDF:
+		data = glade_xml_get_widget(xml, "radiobutton34");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	case IMG_BMP:
+		data = glade_xml_get_widget(xml, "radiobutton35");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	}
+
+	switch (tmp_options.type)
+	{
+	case IMG_BW:
+		data = glade_xml_get_widget(xml, "radiobutton10");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	case IMG_COL:
+		data = glade_xml_get_widget(xml, "radiobutton11");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	}
+
+	switch (tmp_options.size)
+	{
+	case IMG_LCD:
+		data = glade_xml_get_widget(xml, "radiobutton20");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	case IMG_SKIN:
+		data = glade_xml_get_widget(xml, "radiobutton21");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), TRUE);
+		break;
+	}
+
+	data = glade_xml_get_widget(xml, "spinbutton1");
+	gtk_spin_button_set_value(GTK_SPIN_BUTTON(data), tmp_options.shots);
+
+	data = glade_xml_get_widget(xml, "spinbutton2");
+	gtk_spin_button_set_value(GTK_SPIN_BUTTON(data), tmp_options.skips);
+
+	label = glade_xml_get_widget(xml, "label10");
+	refresh_label();
+		
+	data = glade_xml_get_widget(xml, "entry10");
+	gtk_entry_set_text(GTK_ENTRY(data), tmp_options.file);
+
+	data = glade_xml_get_widget(xml, "filechooserbutton1");
+	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (data), tmp_options.folder);
+	
+	result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) {
+	case GTK_RESPONSE_OK:
+        g_free(options2.file);
+		g_free(options2.folder);
+
+		memcpy(&options2, &tmp_options, sizeof(ScrOptions));
+
+		options2.file = g_strdup(tmp_options.file);
+        g_free(tmp_options.file);
+
+		options2.folder = g_strdup(tmp_options.folder);
+		g_free(tmp_options.folder);
+		break;
+	default:
+		break;
+	}
+
+	frame = label = NULL;
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
+
+void refresh_label(void)
+{
+    gchar *ext = "???";
+    gchar *str;
+	
+    if(label == NULL)
+        return;
+
+	switch(tmp_options.format)
+	{
+	    case IMG_JPG: ext = "jpg"; break;
+	    case IMG_PNG: ext = "png"; break;
+	    case IMG_ICO: ext = "ico"; break;
+	    case IMG_EPS: ext = "eps"; break;
+	    case IMG_PDF: ext = "pdf"; break;
+		case IMG_BMP: ext = "bmp"; break;
+	    default: break;
+	}
+	
+    str = g_strdup_printf("%03i.%s", tmp_options.counter, ext);
+	gtk_label_set_text(GTK_LABEL(label), str);
+    g_free(str);
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton10_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if(gtk_toggle_button_get_active(togglebutton))
+    tmp_options.type = IMG_BW;
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton11_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.type = IMG_COL;
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton20_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.size = IMG_LCD;
+	gtk_widget_set_sensitive(frame, tmp_options.size == IMG_LCD);
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton21_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.size = IMG_SKIN;
+	gtk_widget_set_sensitive(frame, tmp_options.size == IMG_LCD);
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton30_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.format = IMG_JPG;
+    refresh_label();
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton31_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.format = IMG_PNG;
+    refresh_label();
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton32_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.format = IMG_ICO;
+    refresh_label();
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton33_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.format = IMG_EPS;
+    refresh_label();
+}
+
+
+GLADE_CB void
+on_scopt_radiobutton34_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.format = IMG_PDF;
+    refresh_label();
+}
+
+GLADE_CB void
+on_scopt_radiobutton35_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+    if(gtk_toggle_button_get_active(togglebutton))
+        tmp_options.format = IMG_BMP;
+    refresh_label();
+}
+
+
+GLADE_CB void
+on_entry1_changed                      (GtkEditable     *editable,
+                                        gpointer         user_data)
+{
+    gchar *str;
+
+    g_free(tmp_options.file);
+    str = gtk_editable_get_chars(editable, 0, -1);
+    tmp_options.file = g_strdup(str);
+    g_free(str);
+    refresh_label();
+}
+
+GLADE_CB void
+on_filechooserbutton1_current_folder_changed
+                                        (GtkFileChooser  *filechooser,
+                                        gpointer         user_data)
+{
+	gchar *fname = gtk_file_chooser_get_filename (filechooser);
+
+	g_free(tmp_options.folder);
+	tmp_options.folder = fname;
+}
+
+
+GLADE_CB void
+on_spinbutton1_changed                 (GtkEditable     *editable,
+                                        gpointer         user_data)
+{
+	tmp_options.shots = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable));
+}
+
+
+GLADE_CB void
+on_spinbutton2_changed                 (GtkEditable     *editable,
+                                        gpointer         user_data)
+{
+	tmp_options.skips = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable));
+}
+
+/* */
diff --git a/src/gui/scroptions.h b/src/gui/scroptions.h
new file mode 100644
index 0000000..c300fab
--- /dev/null
+++ b/src/gui/scroptions.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+gint display_scroptions_dbox();
diff --git a/src/gui/splash.c b/src/gui/splash.c
new file mode 100644
index 0000000..f04b120
--- /dev/null
+++ b/src/gui/splash.c
@@ -0,0 +1,113 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: splash.c 2115 2006-05-24 14:14:08Z kevinkofler $ */
+
+/*  tilp - Ti Linking Program
+ *  Copyright (C) 1999-2004  Romain Lievin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif				/*  */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "intl.h"
+#include "version.h"
+#include "support.h"
+
+typedef struct {
+	GtkWidget	*window;
+	GtkWidget	*label;
+	int			valid;
+} TilpSplashScreen;
+
+static TilpSplashScreen splashscreen = { 0 };
+
+GtkWidget *splash_screen_start(void)
+{
+	GtkWidget *image, *vbox;
+	GdkColor color;
+	GdkPixbuf *pixbuf;
+
+	if(splashscreen.valid)
+		return splashscreen.window;
+
+	splashscreen.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_title(GTK_WINDOW(splashscreen.window),
+			     TIEMU_VERSION);
+	gtk_window_set_position(GTK_WINDOW(splashscreen.window),
+				GTK_WIN_POS_CENTER_ALWAYS);
+	gtk_window_set_decorated(GTK_WINDOW(splashscreen.window), FALSE);
+	gtk_window_set_role(GTK_WINDOW(splashscreen.window), "splash");
+	gtk_window_set_resizable(GTK_WINDOW(splashscreen.window), FALSE);
+	gtk_window_set_default_size(GTK_WINDOW(splashscreen.window), 150, 150);
+
+	color.red = 65535;
+	color.blue = 65535;
+	color.green = 65535;
+	gtk_widget_modify_bg(splashscreen.window, GTK_STATE_NORMAL,
+			     &color);
+
+	vbox = gtk_vbox_new(FALSE, 0);
+	gtk_container_add(GTK_CONTAINER(splashscreen.window), vbox);
+	gtk_widget_show(vbox);
+
+	splashscreen.label = gtk_label_new("starting TiEmu...");
+	gtk_box_pack_end(GTK_BOX(vbox), splashscreen.label, FALSE, FALSE,
+			 0);
+	gtk_widget_show(splashscreen.label);
+
+	pixbuf = create_pixbuf("logo.xpm");
+	image = gtk_image_new_from_pixbuf(pixbuf);
+	gtk_box_pack_end(GTK_BOX(vbox), image, FALSE, FALSE, 0);
+	g_object_unref(pixbuf);
+
+	gtk_widget_show(image);
+	gtk_widget_show(splashscreen.window);
+
+	while (gtk_events_pending()) {
+		gtk_main_iteration();
+	}
+
+	splashscreen.valid = !0;
+	return splashscreen.window;
+}
+
+void splash_screen_stop(void)
+{
+	if(!splashscreen.valid)
+		return;
+	
+	gtk_widget_destroy(splashscreen.window);
+
+	splashscreen.valid = 0;
+} 
+
+void splash_screen_set_label(gchar * label)
+{
+	if(!splashscreen.valid)
+		return;
+
+	gtk_label_set_text(GTK_LABEL(splashscreen.label), label);
+
+	while (gtk_events_pending()) {
+		gtk_main_iteration();
+	}
+}
diff --git a/src/gui/splash.h b/src/gui/splash.h
new file mode 100644
index 0000000..98ab859
--- /dev/null
+++ b/src/gui/splash.h
@@ -0,0 +1,31 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: splash.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+void splash_screen_set_label(gchar * label);
+GtkWidget *splash_screen_start();
+void splash_screen_stop(void);
diff --git a/src/gui/support.c b/src/gui/support.c
new file mode 100644
index 0000000..3ad6967
--- /dev/null
+++ b/src/gui/support.c
@@ -0,0 +1,145 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+
+#include "intl.h"
+#include "support.h"
+
+GtkWidget*
+lookup_widget                          (GtkWidget       *widget,
+                                        const gchar     *widget_name)
+{
+  GtkWidget *parent, *found_widget;
+
+  for (;;)
+    {
+      if (GTK_IS_MENU (widget))
+        parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+      else
+        parent = widget->parent;
+      if (!parent)
+        parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+      if (parent == NULL)
+        break;
+      widget = parent;
+    }
+
+  found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
+                                                 widget_name);
+  if (!found_widget)
+    g_warning ("Widget not found: %s", widget_name);
+  return found_widget;
+}
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory                   (const gchar     *directory)
+{
+  pixmaps_directories = g_list_prepend (pixmaps_directories,
+                                        g_strdup (directory));
+}
+
+/* This is an internally used function to find pixmap files. */
+static gchar*
+find_pixmap_file                       (const gchar     *filename)
+{
+  GList *elem;
+
+  /* We step through each of the pixmaps directory to find it. */
+  elem = pixmaps_directories;
+  while (elem)
+    {
+      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+                                         G_DIR_SEPARATOR_S, filename);
+      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
+        return pathname;
+      g_free (pathname);
+      elem = elem->next;
+    }
+  return NULL;
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap                          (GtkWidget       *widget,
+                                        const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GtkWidget *pixmap;
+
+  if (!filename || !filename[0])
+      return gtk_image_new ();
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return gtk_image_new ();
+    }
+
+  pixmap = gtk_image_new_from_file (pathname);
+  g_free (pathname);
+  return pixmap;
+}
+
+/* This is an internally used function to create pixmaps. */
+GdkPixbuf*
+create_pixbuf                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+
+  if (!filename || !filename[0])
+      return NULL;
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return NULL;
+    }
+
+  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
+  if (!pixbuf)
+    {
+      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+               pathname, error->message);
+      g_error_free (error);
+    }
+  g_free (pathname);
+  return pixbuf;
+}
+
+/* This is used to set ATK action descriptions. */
+void
+glade_set_atk_action_description       (AtkAction       *action,
+                                        const gchar     *action_name,
+                                        const gchar     *description)
+{
+  gint n_actions, i;
+
+  n_actions = atk_action_get_n_actions (action);
+  for (i = 0; i < n_actions; i++)
+    {
+      if (!strcmp (atk_action_get_name (action, i), action_name))
+        atk_action_set_description (action, i, description);
+    }
+}
+
diff --git a/src/gui/support.h b/src/gui/support.h
new file mode 100644
index 0000000..9942892
--- /dev/null
+++ b/src/gui/support.h
@@ -0,0 +1,75 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+#  include <libintl.h>
+#  undef _
+#  define _(String) dgettext (PACKAGE, String)
+#  ifdef gettext_noop
+#    define N_(String) gettext_noop (String)
+#  else
+#    define N_(String) (String)
+#  endif
+#else
+#  define textdomain(String) (String)
+#  define gettext(String) (String)
+#  define dgettext(Domain,Message) (Message)
+#  define dcgettext(Domain,Message,Type) (Message)
+#  define bindtextdomain(Domain,Directory) (Domain)
+#  define _(String) (String)
+#  define N_(String) (String)
+#endif
+
+// GTK+ only (export callbacks for Glade linking at runtime)
+#if defined(__WIN32__) && !defined(HAVE_FVISIBILITY)
+# define GLADE_CB __declspec(dllexport)
+#elif defined(HAVE_FVISIBILITY)
+# define GLADE_CB __attribute__ ((visibility("default")))
+#else
+# define GLADE_CB
+#endif
+
+/*
+ * Public Functions.
+ */
+
+/*
+ * This function returns a widget in a component created by Glade.
+ * Call it with the toplevel widget in the component (i.e. a window/dialog),
+ * or alternatively any widget in the component, and the name of the widget
+ * you want returned.
+ */
+GtkWidget*  lookup_widget              (GtkWidget       *widget,
+                                        const gchar     *widget_name);
+
+
+/* Use this function to set the directory containing installed pixmaps. */
+void        add_pixmap_directory       (const gchar     *directory);
+
+
+/*
+ * Private Functions.
+ */
+
+/* This is used to create the pixmaps used in the interface. */
+GtkWidget*  create_pixmap              (GtkWidget       *widget,
+                                        const gchar     *filename);
+
+/* This is used to create the pixbufs used in the interface. */
+GdkPixbuf*  create_pixbuf              (const gchar     *filename);
+
+/* This is used to set ATK action descriptions. */
+void        glade_set_atk_action_description (AtkAction       *action,
+                                              const gchar     *action_name,
+                                              const gchar     *description);
+
diff --git a/src/gui/tsource.c b/src/gui/tsource.c
new file mode 100644
index 0000000..4eca881
--- /dev/null
+++ b/src/gui/tsource.c
@@ -0,0 +1,240 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: tsource.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+	Custom g_timeout_xxx support.
+
+	Timeout support provided by GLib is unusable for our job because:
+	- we could start a new timeout from callback but this doesn't work
+	because timeout finalizing wan be done at _any_ time,
+	- if we want to modify timeout value on the fly, we can't,
+	- it does not try to 'catch up' time lost in delays.
+
+	Solution used: I have re-implemented GLib timeout but this version
+	catch up time lost in delays (time spend in callback).
+
+	Widely taken from gmain.c of GLib.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+
+typedef struct
+{
+  GSource     source;
+  GTimeVal    expiration;
+  guint       interval;
+} GTimeoutSource;
+
+static void
+g_timeout_set_expiration (GTimeoutSource *timeout_source,
+						  GTimeVal       *current_time)
+{
+  guint seconds = timeout_source->interval / 1000;
+  guint msecs = timeout_source->interval - seconds * 1000;
+
+  timeout_source->expiration.tv_sec = current_time->tv_sec + seconds;
+  timeout_source->expiration.tv_usec = current_time->tv_usec + msecs * 1000;
+  if (timeout_source->expiration.tv_usec >= 1000000)
+    {
+      timeout_source->expiration.tv_usec -= 1000000;
+      timeout_source->expiration.tv_sec++;
+    }
+}
+
+static gboolean
+g_timeout_prepare  (GSource  *source,
+		    gint     *timeout)
+{
+  glong sec;
+  glong msec;
+  GTimeVal current_time;
+  
+  GTimeoutSource *timeout_source = (GTimeoutSource *)source;
+
+  g_source_get_current_time (source, &current_time);
+
+  sec = timeout_source->expiration.tv_sec - current_time.tv_sec;
+  msec = (timeout_source->expiration.tv_usec - current_time.tv_usec) / 1000;
+
+  /* We do the following in a rather convoluted fashion to deal with
+   * the fact that we don't have an integral type big enough to hold
+   * the difference of two timevals in millseconds.
+   */
+  if (sec < 0 || (sec == 0 && msec < 0))
+    msec = 0;
+  else
+    {
+      glong interval_sec = timeout_source->interval / 1000;
+      glong interval_msec = timeout_source->interval % 1000;
+
+      if (msec < 0)
+	{
+	  msec += 1000;
+	  sec -= 1;
+	}
+      
+      if (sec > interval_sec ||
+	  (sec == interval_sec && msec > interval_msec))
+	{
+	  /* The system time has been set backwards, so we
+	   * reset the expiration time to now + timeout_source->interval;
+	   * this at least avoids hanging for long periods of time.
+	   */
+	  g_timeout_set_expiration (timeout_source, &current_time);
+	  msec = MIN (G_MAXINT, timeout_source->interval);
+	}
+      else
+	{
+	  msec = MIN (G_MAXINT, (guint)msec + 1000 * (guint)sec);
+	}
+    }
+
+  *timeout = (gint)msec;
+  
+  return msec == 0;
+}
+
+static gboolean 
+g_timeout_check (GSource  *source)
+{
+  GTimeVal current_time;
+  GTimeoutSource *timeout_source = (GTimeoutSource *)source;
+
+  g_source_get_current_time (source, &current_time);
+  
+  return ((timeout_source->expiration.tv_sec < current_time.tv_sec) ||
+	  ((timeout_source->expiration.tv_sec == current_time.tv_sec) &&
+	   (timeout_source->expiration.tv_usec <= current_time.tv_usec)));
+}
+
+static gboolean
+g_timeout_dispatch (GSource    *source,
+		    GSourceFunc callback,
+		    gpointer    user_data)
+{
+#if 0	// as GLib
+  GTimeoutSource *timeout_source = (GTimeoutSource *)source;
+
+  if (!callback)
+    {
+      g_warning ("Timeout source dispatched without callback\n"
+		 "You must call g_source_set_callback().");
+      return FALSE;
+    }
+ 
+  if (callback (user_data))
+    {
+      GTimeVal current_time;
+
+      g_source_get_current_time (source, &current_time);
+      g_timeout_set_expiration (timeout_source, &current_time);
+
+      return TRUE;
+    }
+  else
+    return FALSE;
+
+#else
+	GTimeoutSource *timeout_source = (GTimeoutSource *)source;
+	GTimeVal current_time;
+
+	g_source_get_current_time (source, &current_time);
+    g_timeout_set_expiration (timeout_source, &current_time);
+
+	return (callback (user_data)); 
+#endif
+}
+
+GSourceFuncs g_timeout2_funcs =
+{
+  g_timeout_prepare,
+  g_timeout_check,
+  g_timeout_dispatch,
+  NULL
+};
+
+GSource *
+g_timeout2_source_new (guint interval)
+{
+  GSource *source = g_source_new (&g_timeout2_funcs, sizeof (GTimeoutSource));
+  GTimeoutSource *timeout_source = (GTimeoutSource *)source;
+  GTimeVal current_time;
+
+  timeout_source->interval = interval;
+
+  g_get_current_time (&current_time);
+  g_timeout_set_expiration (timeout_source, &current_time);
+  
+  return source;
+}
+
+guint
+g_timeout2_add_full (gint           priority,
+		    guint          interval,
+		    GSourceFunc    function,
+		    gpointer       data,
+		    GDestroyNotify notify)
+{
+  GSource *source;
+  guint id;
+  
+  g_return_val_if_fail (function != NULL, 0);
+
+  source = g_timeout2_source_new (interval);
+
+  if (priority != G_PRIORITY_DEFAULT)
+    g_source_set_priority (source, priority);
+
+  g_source_set_callback (source, function, data, notify);
+  id = g_source_attach (source, NULL);
+  g_source_unref (source);
+
+  return id;
+}
+
+guint 
+g_timeout2_add (guint32        interval,
+	       GSourceFunc    function,
+	       gpointer       data)
+{
+  return g_timeout2_add_full (G_PRIORITY_DEFAULT, 
+			     interval, function, data, NULL);
+}
+
+// ---
+
+void
+g_timeout2_set_interval(guint source_id, guint32 interval)
+{
+	GSource *source = g_main_context_find_source_by_id(g_main_context_default(), source_id);
+	GTimeoutSource *timeout_source = (GTimeoutSource *)source;
+
+	timeout_source->interval = interval;	
+}
diff --git a/src/gui/tsource.h b/src/gui/tsource.h
new file mode 100644
index 0000000..e2ed02d
--- /dev/null
+++ b/src/gui/tsource.h
@@ -0,0 +1,49 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: tsource.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TSOURCE_H__
+#define __TSOURCE_H__
+
+GSource *
+g_timeout2_source_new (guint interval);
+
+guint
+g_timeout2_add_full (gint           priority,
+					 guint          interval,
+					 GSourceFunc    function,
+					 gpointer       data,
+					 GDestroyNotify notify);
+
+guint 
+g_timeout2_add (guint32        interval,
+				GSourceFunc    function,
+				gpointer       data);
+
+void
+g_timeout2_set_interval(guint source_id, 
+						guint32 interval);
+
+#endif
diff --git a/src/gui/wizard.c b/src/gui/wizard.c
new file mode 100644
index 0000000..6d507f9
--- /dev/null
+++ b/src/gui/wizard.c
@@ -0,0 +1,336 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: wizard.c 2753 2007-12-30 23:14:15Z kevinkofler $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2007, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <stdlib.h>
+
+#include "intl.h"
+#include "support.h"
+#include "struct.h"
+#include "dboxes.h"
+#include "wizard.h"
+//#include "engine.h"
+#include "filesel.h"
+#include "ti68k_int.h"
+#include "tie_error.h"
+
+#ifdef __WIN32__
+# define strcasecmp _stricmp
+#endif
+
+gchar *wizard_rom = NULL;
+gint wizard_ok = FALSE;
+
+static gint action = 0;
+
+static gint display_step1_dbox(void);
+gint display_wz_rom_dbox(void);
+gint display_wz_tib_dbox(void);
+
+gint display_wizard_dbox(void)
+{
+    return display_step1_dbox();
+}
+
+static gint display_msg_dbox(void)
+{
+    GladeXML *xml;
+	GtkWidget *dbox;
+	gint result;
+
+    xml = glade_xml_new
+	    (tilp_paths_build_glade("wizard-2.glade"), "msg_dbox", PACKAGE);
+	if (!xml)
+		g_error(_("%s: GUI loading failed!\n"), __FILE__);
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "msg_dbox");
+
+    result = gtk_dialog_run(GTK_DIALOG(dbox));
+	
+    gtk_widget_destroy(dbox);
+    exit(0);
+
+	return 0;
+}
+
+static gint display_step1_dbox(void)
+{
+    GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result = 0;
+	GtkWidget *dialog;
+
+    xml = glade_xml_new
+	    (tilp_paths_build_glade("wizard-2.glade"), "step1_dbox", PACKAGE);
+	if (!xml)
+		g_error(_("comm.c: GUI loading failed !\n"));
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "step1_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_APPLY, GTK_RESPONSE_CANCEL,-1);
+
+    data = glade_xml_get_widget(xml, "applybutton1");
+    gtk_widget_hide(data);
+
+#ifdef __IPAQ__
+    // make menu smaller
+    data = glade_xml_get_widget(xml, "label19");
+    gtk_widget_hide(data);
+    data = glade_xml_get_widget(xml, "radiobutton1");
+    gtk_button_set_label(GTK_BUTTON(data), _("Use PedRom"));
+    data = glade_xml_get_widget(xml, "radiobutton2");
+    gtk_button_set_label(GTK_BUTTON(data), _("Use FLASH OS"));
+    data = glade_xml_get_widget(xml, "radiobutton3");
+    gtk_button_set_label(GTK_BUTTON(data), _("Use ROM dump"));
+    data = glade_xml_get_widget(xml, "radiobutton4");
+    gtk_widget_hide(data);
+    data = glade_xml_get_widget(xml, "label20");
+    gtk_widget_hide(data);
+#endif
+
+	action = 1;	// default button
+    result = gtk_dialog_run(GTK_DIALOG(dbox));
+
+    if(result == GTK_RESPONSE_OK)
+    {
+        switch(action)
+        {
+            case 1: 
+				dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+						GTK_MESSAGE_INFO,
+						GTK_BUTTONS_CLOSE, _("Importing TIBs. Please wait..."));
+				g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
+						G_CALLBACK(gtk_widget_destroy),
+						GTK_OBJECT(dialog));
+				gtk_widget_show_all(GTK_WIDGET(dialog));
+				while(gtk_events_pending()) gtk_main_iteration();
+				
+				ti68k_scan_files(inst_paths.rom_dir, inst_paths.img_dir, 0);
+
+				gtk_widget_destroy(dialog);
+				gtk_widget_destroy(dbox);
+
+				wizard_ok = 2;
+			break;
+            case 2: 
+                gtk_widget_destroy(dbox);
+                display_wz_tib_dbox();
+            break;
+            case 3: 
+                gtk_widget_destroy(dbox);
+                display_wz_rom_dbox();
+            break;
+			case 4: 
+                gtk_widget_destroy(dbox);
+                display_msg_dbox();
+            break;
+            default:
+			break;
+        }
+	}
+    else
+    {
+        gtk_widget_destroy(dbox);
+        exit(0);
+    }
+
+	return 0;
+}
+
+static gint display_step3_dbox(void)
+{
+    GladeXML *xml;
+	GtkWidget *dbox;
+	GtkWidget *data;
+	gint result;
+
+    xml = glade_xml_new
+	    (tilp_paths_build_glade("wizard-2.glade"), "step3_dbox", PACKAGE);
+	if (!xml)
+		g_error(_("comm.c: GUI loading failed !\n"));
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "step3_dbox");
+	gtk_dialog_set_alternative_button_order(GTK_DIALOG(dbox), GTK_RESPONSE_OK,
+	                                        GTK_RESPONSE_APPLY, GTK_RESPONSE_CANCEL,-1);
+
+    //data = glade_xml_get_widget(xml, "cancelbutton2");
+    //gtk_button_set_label(data, "<= Back");
+    data = glade_xml_get_widget(xml, "applybutton2");
+    gtk_widget_hide(data);
+    //data = glade_xml_get_widget(xml, "okbutton2");
+    //gtk_button_set_label(data, "Next =>");
+
+    result = gtk_dialog_run(GTK_DIALOG(dbox));
+    if(result == GTK_RESPONSE_OK)
+    {
+        gtk_widget_destroy(dbox);
+        wizard_ok = 1;
+    }
+    else
+    {
+        gtk_widget_destroy(dbox);
+        exit(0);
+    }
+
+	return 0;
+}
+
+gint display_wait_dbox(void)
+{
+    GladeXML *xml;
+	GtkWidget *dbox;
+	//GtkWidget *data;
+	gint result;
+
+    xml = glade_xml_new
+	    (tilp_paths_build_glade("wizard-2.glade"), "wait_dbox", PACKAGE);
+	if (!xml)
+		g_error(_("comm.c: GUI loading failed !\n"));
+	glade_xml_signal_autoconnect(xml);
+
+	dbox = glade_xml_get_widget(xml, "wait_dbox");
+
+    result = gtk_dialog_run(GTK_DIALOG(dbox));
+	switch (result) {
+	case GTK_RESPONSE_OK:
+		break;
+	default:
+		break;
+	}
+
+	gtk_widget_destroy(dbox);
+
+	return 0;
+}
+
+gint display_wz_rom_dbox(void)
+{
+    const gchar *filename;
+	gchar *dstname;
+	int err;
+
+    // get filename
+	filename = (char *)create_fsel(inst_paths.rom_dir, NULL, "*.rom", FALSE);
+	if (filename == NULL)
+	{
+		display_step1_dbox();
+		return -1;
+	}
+
+	if(!ti68k_is_a_rom_file(filename))
+    {
+        msg_box1(_("Error"), _("Invalid ROM dump."));
+        display_step1_dbox();     
+        return -1;
+    }
+  
+	err = ti68k_convert_rom_to_image(filename, inst_paths.img_dir, &dstname);
+	handle_error();
+	if (err)
+	{
+		display_step1_dbox();
+		return -1;
+	}
+    wizard_rom = g_strdup(dstname);
+	g_free(dstname);
+    
+    display_step3_dbox();
+
+	return 0;
+}
+
+gint display_wz_tib_dbox(void)
+{
+    const gchar *filename;
+    gchar *dstname;
+	int err;
+
+    // get filename
+	filename = (char *)create_fsel(inst_paths.rom_dir, NULL, "*.89u;*.9xu;*.v2u;*.tib", FALSE);
+	if (filename == NULL)
+	{
+		display_step1_dbox();
+		return -1;
+	}
+
+    if(!ti68k_is_a_tib_file(filename))
+    {
+        msg_box1(_("Error"), _("Invalid FLASH upgrade."));
+        display_step1_dbox();
+        return -1;
+    }
+
+    err = ti68k_convert_tib_to_image(filename, inst_paths.img_dir, &dstname, -1);
+	handle_error();
+	if (err)
+	{
+		display_step1_dbox();
+		return -1;
+	}
+    wizard_rom = g_strdup(dstname);
+	g_free(dstname);
+    
+    display_step3_dbox();  
+
+	return 0;
+}
+
+
+GLADE_CB void
+step1_on_radiobutton1_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  action = 1;
+}
+
+GLADE_CB void
+step1_on_radiobutton2_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  action = 2;
+}
+
+GLADE_CB void
+step1_on_radiobutton3_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  action = 3;
+}
+
+GLADE_CB void
+step1_on_radiobutton4_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  action = 4;
+}
diff --git a/src/gui/wizard.h b/src/gui/wizard.h
new file mode 100644
index 0000000..d81b8e4
--- /dev/null
+++ b/src/gui/wizard.h
@@ -0,0 +1,32 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id$ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+gint display_wizard_dbox(void);
+
+extern int wizard_ok;
+extern gchar *wizard_rom;
diff --git a/src/ipc/com/Makefile b/src/ipc/com/Makefile
new file mode 100644
index 0000000..618c2d9
--- /dev/null
+++ b/src/ipc/com/Makefile
@@ -0,0 +1,32 @@
+ifeq ($(OSTYPE),msys)
+CC ?= gcc
+DLLTOOL ?= dlltool
+else
+CC ?= i386-mingw32-gcc
+DLLTOOL ?= i386-mingw32-dlltool
+endif
+
+CFLAGS ?= -Os -s -fno-exceptions
+CFLAGS += -fno-strict-aliasing
+
+tiemups.dll: dlldata.o oleaut_p.o oleaut_i.o librpcrt4nt4.a
+	$(CC) -shared $(CFLAGS) -o tiemups.dll -Wl,--enable-stdcall-fixup \
+		dlldata.o oleaut_p.o oleaut_i.o \
+		-lkernel32 -lrpcns4 -lrpcrt4 librpcrt4nt4.a -loleaut32 -luuid \
+		tiemups.def
+
+lib%.a: %.def
+	$(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
+
+oleaut_p.o: oleaut_p.c
+	$(CC) -c $(CFLAGS) -O0 -fno-omit-frame-pointer \
+		-DWIN32 -D_WIN32_WINNT=0x0400 -DREGISTER_PROXY_DLL \
+		-Doleaut_ProxyFileInfo=tiemu_ProxyFileInfo \
+		oleaut_p.c
+
+.c.o:
+	$(CC) -c $(CFLAGS) -DWIN32 -D_WIN32_WINNT=0x0400 -DREGISTER_PROXY_DLL \
+		$<
+
+clean:
+	rm -f tiemups.dll dlldata.o oleaut_p.o oleaut_i.o librpcrt4nt4.a
diff --git a/src/ipc/com/dlldata.c b/src/ipc/com/dlldata.c
new file mode 100644
index 0000000..4bf4097
--- /dev/null
+++ b/src/ipc/com/dlldata.c
@@ -0,0 +1,30 @@
+/**
+WARNING: Do NOT regenerate this file with MIDL unless you know what you're
+doing! You need to replace "oleaut" with "tiemu". You have been warned!
+**/
+
+#define PROXY_DELEGATION
+
+#include <rpcproxy.h>
+
+#ifdef __cplusplus
+extern "C"   {
+#endif
+
+EXTERN_PROXY_FILE( tiemu )
+
+
+PROXYFILE_LIST_START
+/* Start of list */
+  REFERENCE_PROXY_FILE( tiemu ),
+/* End of list */
+PROXYFILE_LIST_END
+
+
+DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
+
+#ifdef __cplusplus
+}  /*extern "C" */
+#endif
+
+/* end of generated dlldata file */
diff --git a/src/ipc/com/oleaut.cpp b/src/ipc/com/oleaut.cpp
new file mode 100644
index 0000000..412bb47
--- /dev/null
+++ b/src/ipc/com/oleaut.cpp
@@ -0,0 +1,289 @@
+/*  OLE Automation interface for TiEmu
+ *
+ *  Copyright (c) 2006-2008 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <cstdlib>
+#include <cstring>
+#include <wchar.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <windows.h>
+#include <oleauto.h>
+
+#include "oleaut.h"
+#include "oleaut_c.h"
+#include "ti68k_int.h"
+#include "fs_misc.h"
+#include "engine.h"
+#include "dbg_all.h"
+#include "m68k.h"
+
+class TiEmuOLE : public ITiEmuOLE
+{
+  private:
+    ITypeLib *typelib;
+    unsigned refcount;
+    bool registered;
+    DWORD oleregister;
+
+  public:
+    TiEmuOLE();
+    ~TiEmuOLE();
+    STDMETHOD(QueryInterface)(REFIID,PVOID*);
+    STDMETHOD_(ULONG,AddRef)();
+    STDMETHOD_(ULONG,Release)();
+    STDMETHOD(GetTypeInfoCount)(THIS_ UINT*);
+    STDMETHOD(GetTypeInfo)(UINT,LCID,LPTYPEINFO*);
+    STDMETHOD(GetIDsOfNames)(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
+    STDMETHOD(Invoke)(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+    STDMETHOD(image_loaded)(VARIANT_BOOL* ret);
+    STDMETHOD(emulated_calc_type)(int* ret);
+    STDMETHOD(emulated_hw_version)(int* ret);
+    STDMETHOD(emulated_os_version)(BSTR* ret);
+    STDMETHOD(ready_for_transfers)(VARIANT_BOOL* ret);
+    STDMETHOD(send_file)(BSTR filename,VARIANT_BOOL* ret);
+    STDMETHOD(debug_file)(BSTR filename,VARIANT_BOOL* ret);
+    STDMETHOD(reset_calc)(VARIANT_BOOL clearmem,VARIANT_BOOL* ret);
+    STDMETHOD(execute_command)(BSTR command,VARIANT_BOOL* ret);
+    STDMETHOD(turn_calc_on)(VARIANT_BOOL* ret);
+    STDMETHOD(enter_debugger)(VARIANT_BOOL* ret);
+};
+
+TiEmuOLE::TiEmuOLE() : typelib(NULL), refcount(1)
+{
+  // Load type library
+  LoadRegTypeLib(LIBID_TiEmuOLELib, 1, 0, 0, &typelib);
+  if (typelib) {
+    // Register with OLE Automation
+    registered = (RegisterActiveObject(this, CLSID_TiEmuOLE, ACTIVEOBJECT_STRONG, &oleregister) == S_OK);
+  } else registered = false;
+}
+
+TiEmuOLE::~TiEmuOLE()
+{
+  if (registered) {
+    RevokeActiveObject(oleregister, NULL);
+    CoDisconnectObject(this, 0);
+  }
+  if (typelib)
+    typelib->Release();
+}
+
+#define RETURN(retval) do {*ret=retval; return S_OK;} while (0)
+
+// IUnknown methods
+
+STDMETHODIMP TiEmuOLE::QueryInterface(REFIID iid,PVOID *ret)
+{
+  if (iid==IID_IUnknown || iid==IID_IDispatch || iid == IID_ITiEmuOLE)
+    RETURN(this);
+  else {
+    *ret=NULL;
+    return E_NOINTERFACE;
+  }
+}
+
+ULONG TiEmuOLE::AddRef()
+{
+  return ++refcount;
+}
+
+ULONG TiEmuOLE::Release()
+{
+  if (refcount)
+    refcount--;
+  return refcount;
+}
+
+// IDispatch methods
+
+STDMETHODIMP TiEmuOLE::GetTypeInfoCount(UINT *ret)
+{
+  RETURN(1);
+}
+
+STDMETHODIMP TiEmuOLE::GetTypeInfo(UINT interfaceno, LCID lcid, LPTYPEINFO *ret)
+{
+  return typelib->GetTypeInfoOfGuid(IID_ITiEmuOLE,ret);
+}
+
+STDMETHODIMP TiEmuOLE::GetIDsOfNames(REFIID iid, LPOLESTR *names, UINT count, LCID lcid, DISPID* ret)
+{
+  ITypeInfo *typeinfo;
+  HRESULT result;
+  result=typelib->GetTypeInfoOfGuid(IID_ITiEmuOLE,&typeinfo);
+  if (result) return result;
+  result=DispGetIDsOfNames(typeinfo,names,count,ret);
+  typeinfo->Release();
+  return result;
+}
+
+STDMETHODIMP TiEmuOLE::Invoke(DISPID dispid, REFIID iid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *ret, EXCEPINFO *excepinfo, UINT *error_argnum)
+{
+  ITypeInfo *typeinfo;
+  HRESULT result;
+  result=typelib->GetTypeInfoOfGuid(IID_ITiEmuOLE,&typeinfo);
+  if (result) return result;
+  result=DispInvoke(this,typeinfo,dispid,flags,params,ret,excepinfo,error_argnum);
+  typeinfo->Release();
+  return result;
+}
+
+// ITiEmuOLE methods
+
+STDMETHODIMP TiEmuOLE::image_loaded(VARIANT_BOOL *ret)
+{
+  RETURN(img_loaded);
+}
+
+STDMETHODIMP TiEmuOLE::emulated_calc_type(int *ret)
+{
+  if (img_loaded)
+    RETURN(img_infos.calc_type);
+  else
+    RETURN(0);
+}
+
+STDMETHODIMP TiEmuOLE::emulated_hw_version(int *ret)
+{
+  if (img_loaded)
+    RETURN(img_infos.hw_type);
+  else
+    RETURN(0);
+}
+
+STDMETHODIMP TiEmuOLE::emulated_os_version(BSTR *ret)
+{
+  if (img_loaded) {
+    wchar_t *temp=(wchar_t *)g_utf8_to_utf16(img_infos.version,-1,NULL,NULL,NULL);
+    BSTR result=SysAllocString(temp);
+    g_free(temp);
+    RETURN(result);
+  } else
+    RETURN(NULL);
+}
+
+STDMETHODIMP TiEmuOLE::ready_for_transfers(VARIANT_BOOL *ret)
+{
+  RETURN((img_loaded && !engine_is_stopped() && ti68k_linkport_ready()));
+}
+
+STDMETHODIMP TiEmuOLE::send_file(BSTR filename, VARIANT_BOOL *ret)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    gchar *utf8=g_utf16_to_utf8((const gunichar2 *)filename,-1,NULL,NULL,NULL);
+    fs_send_file(utf8);
+    g_free(utf8);
+    engine_start();
+    RETURN(TRUE);
+  } else RETURN(FALSE);
+}
+
+STDMETHODIMP TiEmuOLE::debug_file(BSTR filename, VARIANT_BOOL *ret)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    gchar *utf8=g_utf16_to_utf8((const gunichar2 *)filename,-1,NULL,NULL,NULL);
+    fs_send_file_and_debug_info(utf8);
+    g_free(utf8);
+    engine_start();
+    RETURN(TRUE);
+  } else RETURN(FALSE);
+}
+
+STDMETHODIMP TiEmuOLE::reset_calc(VARIANT_BOOL clearram, VARIANT_BOOL *ret)
+{
+  if (img_loaded) {
+    engine_stop();
+
+    if(clearram)
+      memset(tihw.ram, 0, tihw.ram_size);
+
+    ti68k_reset();
+    if (dbg_on)
+      gtk_debugger_close_async();
+    else
+      engine_start();
+
+    RETURN(TRUE);
+  } else RETURN(FALSE);
+}
+
+STDMETHODIMP TiEmuOLE::execute_command(BSTR command, VARIANT_BOOL *ret)
+{
+  if (img_loaded) {
+    VARIANT_BOOL result;
+    gchar *temp;
+#ifdef __GNUC__
+    char ti[SysStringLen(command)+1];
+    ticonv_charset_utf16_to_ti_s(CALC_TI92, (const unsigned short *)command, ti);
+    temp=g_strconcat("\f\r\r",ti,"\n",NULL);
+    result=ti68k_kbd_push_chars(temp);
+#elif defined(_MSC_VER)
+    char *ti=(char *)malloc(SysStringLen(command)+1);
+    ticonv_charset_utf16_to_ti_s(CALC_TI92, (const unsigned short *)command, ti);
+    temp=g_strconcat("\f\r\r",ti,"\n",NULL);
+    result=ti68k_kbd_push_chars(temp);
+    free(ti);
+#else
+    char *ti=(char *)std::malloc(SysStringLen(command)+1);
+    ticonv_charset_utf16_to_ti_s(CALC_TI92, (const unsigned short *)command, ti);
+    temp=g_strconcat("\f\r\r",ti,"\n",NULL);
+    result=ti68k_kbd_push_chars(temp);
+    std::free(ti);
+#endif
+    g_free(temp);
+    RETURN(result);
+  } else RETURN(FALSE);
+}
+
+STDMETHODIMP TiEmuOLE::turn_calc_on(VARIANT_BOOL *ret)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    hw_m68k_irq(6);
+    while (ti68k_debug_is_supervisor())
+      hw_m68k_run(1,0);
+    engine_start();
+    RETURN(TRUE);
+  } else RETURN(FALSE);
+}
+
+STDMETHODIMP TiEmuOLE::enter_debugger(VARIANT_BOOL *ret)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    ti68k_debug_break();
+    engine_start();
+    RETURN(TRUE);
+  } else RETURN(FALSE);
+}
+
+static TiEmuOLE *ole_interface;
+
+void oleaut_init (void)
+{
+  ole_interface = new TiEmuOLE;
+}
+
+void oleaut_finish (void)
+{
+  delete ole_interface;
+}
+
diff --git a/src/ipc/com/oleaut.h b/src/ipc/com/oleaut.h
new file mode 100644
index 0000000..4415849
--- /dev/null
+++ b/src/ipc/com/oleaut.h
@@ -0,0 +1,320 @@
+/*** Autogenerated by WIDL 0.9.31 from oleaut.idl - Do not edit ***/
+#include <rpc.h>
+#include <rpcndr.h>
+
+#ifndef __WIDL_OLEAUT_H
+#define __WIDL_OLEAUT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <oaidl.h>
+#include <ocidl.h>
+typedef enum __WIDL_oleaut_generated_name_00000000 {
+    TIEMU_CALC_TI92 = 1,
+    TIEMU_CALC_TI89 = 2,
+    TIEMU_CALC_TI92p = 4,
+    TIEMU_CALC_V200 = 8,
+    TIEMU_CALC_TI89t = 16
+} TiEmuCalcModels;
+#ifndef __ITiEmuOLE_FWD_DEFINED__
+#define __ITiEmuOLE_FWD_DEFINED__
+typedef interface ITiEmuOLE ITiEmuOLE;
+#endif
+
+/*****************************************************************************
+ * ITiEmuOLE interface
+ */
+#ifndef __ITiEmuOLE_INTERFACE_DEFINED__
+#define __ITiEmuOLE_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_ITiEmuOLE, 0xe9373bd9, 0x7363, 0x427f, 0xa2,0xa6, 0x1e,0x8b,0xa9,0x1f,0xfb,0x3e);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface ITiEmuOLE : public IDispatch
+{
+    virtual HRESULT STDMETHODCALLTYPE image_loaded(
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE emulated_calc_type(
+        int* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE emulated_hw_version(
+        int* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE emulated_os_version(
+        BSTR* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE ready_for_transfers(
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE send_file(
+        BSTR filename,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE debug_file(
+        BSTR filename,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE reset_calc(
+        VARIANT_BOOL clearmem,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE execute_command(
+        BSTR command,
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE turn_calc_on(
+        VARIANT_BOOL* ret) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE enter_debugger(
+        VARIANT_BOOL* ret) = 0;
+
+};
+#else
+typedef struct ITiEmuOLEVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        ITiEmuOLE* This,
+        REFIID riid,
+        void** ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        ITiEmuOLE* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        ITiEmuOLE* This);
+
+    /*** IDispatch methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
+        ITiEmuOLE* This,
+        UINT* pctinfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
+        ITiEmuOLE* This,
+        UINT iTInfo,
+        LCID lcid,
+        ITypeInfo** ppTInfo);
+
+    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
+        ITiEmuOLE* This,
+        REFIID riid,
+        LPOLESTR* rgszNames,
+        UINT cNames,
+        LCID lcid,
+        DISPID* rgDispId);
+
+    HRESULT (STDMETHODCALLTYPE *Invoke)(
+        ITiEmuOLE* This,
+        DISPID dispIdMember,
+        REFIID riid,
+        LCID lcid,
+        WORD wFlags,
+        DISPPARAMS* pDispParams,
+        VARIANT* pVarResult,
+        EXCEPINFO* pExcepInfo,
+        UINT* puArgErr);
+
+    /*** ITiEmuOLE methods ***/
+    HRESULT (STDMETHODCALLTYPE *image_loaded)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *emulated_calc_type)(
+        ITiEmuOLE* This,
+        int* ret);
+
+    HRESULT (STDMETHODCALLTYPE *emulated_hw_version)(
+        ITiEmuOLE* This,
+        int* ret);
+
+    HRESULT (STDMETHODCALLTYPE *emulated_os_version)(
+        ITiEmuOLE* This,
+        BSTR* ret);
+
+    HRESULT (STDMETHODCALLTYPE *ready_for_transfers)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *send_file)(
+        ITiEmuOLE* This,
+        BSTR filename,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *debug_file)(
+        ITiEmuOLE* This,
+        BSTR filename,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *reset_calc)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL clearmem,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *execute_command)(
+        ITiEmuOLE* This,
+        BSTR command,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *turn_calc_on)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    HRESULT (STDMETHODCALLTYPE *enter_debugger)(
+        ITiEmuOLE* This,
+        VARIANT_BOOL* ret);
+
+    END_INTERFACE
+} ITiEmuOLEVtbl;
+interface ITiEmuOLE {
+    CONST_VTBL ITiEmuOLEVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define ITiEmuOLE_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define ITiEmuOLE_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define ITiEmuOLE_Release(p) (p)->lpVtbl->Release(p)
+/*** IDispatch methods ***/
+#define ITiEmuOLE_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
+#define ITiEmuOLE_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
+#define ITiEmuOLE_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
+#define ITiEmuOLE_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
+/*** ITiEmuOLE methods ***/
+#define ITiEmuOLE_image_loaded(p,a) (p)->lpVtbl->image_loaded(p,a)
+#define ITiEmuOLE_emulated_calc_type(p,a) (p)->lpVtbl->emulated_calc_type(p,a)
+#define ITiEmuOLE_emulated_hw_version(p,a) (p)->lpVtbl->emulated_hw_version(p,a)
+#define ITiEmuOLE_emulated_os_version(p,a) (p)->lpVtbl->emulated_os_version(p,a)
+#define ITiEmuOLE_ready_for_transfers(p,a) (p)->lpVtbl->ready_for_transfers(p,a)
+#define ITiEmuOLE_send_file(p,a,b) (p)->lpVtbl->send_file(p,a,b)
+#define ITiEmuOLE_debug_file(p,a,b) (p)->lpVtbl->debug_file(p,a,b)
+#define ITiEmuOLE_reset_calc(p,a,b) (p)->lpVtbl->reset_calc(p,a,b)
+#define ITiEmuOLE_execute_command(p,a,b) (p)->lpVtbl->execute_command(p,a,b)
+#define ITiEmuOLE_turn_calc_on(p,a) (p)->lpVtbl->turn_calc_on(p,a)
+#define ITiEmuOLE_enter_debugger(p,a) (p)->lpVtbl->enter_debugger(p,a)
+#endif
+
+#endif
+
+HRESULT CALLBACK ITiEmuOLE_image_loaded_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_image_loaded_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_emulated_calc_type_Proxy(
+    ITiEmuOLE* This,
+    int* ret);
+void __RPC_STUB ITiEmuOLE_emulated_calc_type_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_emulated_hw_version_Proxy(
+    ITiEmuOLE* This,
+    int* ret);
+void __RPC_STUB ITiEmuOLE_emulated_hw_version_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_emulated_os_version_Proxy(
+    ITiEmuOLE* This,
+    BSTR* ret);
+void __RPC_STUB ITiEmuOLE_emulated_os_version_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_ready_for_transfers_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_ready_for_transfers_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_send_file_Proxy(
+    ITiEmuOLE* This,
+    BSTR filename,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_send_file_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_debug_file_Proxy(
+    ITiEmuOLE* This,
+    BSTR filename,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_debug_file_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_reset_calc_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL clearmem,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_reset_calc_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_execute_command_Proxy(
+    ITiEmuOLE* This,
+    BSTR command,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_execute_command_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_turn_calc_on_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_turn_calc_on_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT CALLBACK ITiEmuOLE_enter_debugger_Proxy(
+    ITiEmuOLE* This,
+    VARIANT_BOOL* ret);
+void __RPC_STUB ITiEmuOLE_enter_debugger_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __ITiEmuOLE_INTERFACE_DEFINED__ */
+
+
+DEFINE_GUID(LIBID_TiEmuOLELib, 0x6140dc7c, 0x3d74, 0x41f9, 0xa7,0x87, 0x59,0x46,0x99,0x4a,0xa8,0xf2);
+
+/*****************************************************************************
+ * TiEmuOLE coclass
+ */
+
+DEFINE_GUID(CLSID_TiEmuOLE, 0xb2a17b13, 0x9d6f, 0x4dd4, 0xa2,0xa9, 0x6f,0xe0,0x6a,0xdc,0x1d,0x33);
+
+#ifndef __TiEmuOLE_FWD_DEFINED__
+#define __TiEmuOLE_FWD_DEFINED__
+typedef struct TiEmuOLE TiEmuOLE;
+#endif /* defined __TiEmuOLE_FWD_DEFINED__ */
+
+/* Begin additional prototypes for all interfaces */
+
+ULONG           __RPC_USER BSTR_UserSize     (ULONG *, ULONG, BSTR *);
+unsigned char * __RPC_USER BSTR_UserMarshal  (ULONG *, unsigned char *, BSTR *);
+unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *);
+void            __RPC_USER BSTR_UserFree     (ULONG *, BSTR *);
+
+/* End additional prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __WIDL_OLEAUT_H */
diff --git a/src/ipc/com/oleaut.idl b/src/ipc/com/oleaut.idl
new file mode 100644
index 0000000..d450e89
--- /dev/null
+++ b/src/ipc/com/oleaut.idl
@@ -0,0 +1,70 @@
+/*  OLE Automation interface for TiEmu
+ *
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+import "oaidl.idl";
+import "ocidl.idl";
+
+typedef enum
+{
+  TIEMU_CALC_TI92 = 1,
+  TIEMU_CALC_TI89 = 2,
+  TIEMU_CALC_TI92p = 4,
+  TIEMU_CALC_V200 = 8,
+  TIEMU_CALC_TI89t = 16,
+} TiEmuCalcModels;
+
+[
+object,
+uuid(e9373bd9-7363-427f-a2a6-1e8ba91ffb3e),
+dual,
+helpstring("TiEmu OLE Interface"),
+pointer_default(unique)
+]
+interface ITiEmuOLE : IDispatch
+{
+  HRESULT image_loaded([out, retval] VARIANT_BOOL *ret);
+  HRESULT emulated_calc_type([out, retval] int *ret);
+  HRESULT emulated_hw_version([out, retval] int *ret);
+  HRESULT emulated_os_version([out, retval] BSTR *ret);
+  HRESULT ready_for_transfers([out, retval] VARIANT_BOOL *ret);
+  HRESULT send_file([in] BSTR filename, [out, retval] VARIANT_BOOL *ret);
+  HRESULT debug_file([in] BSTR filename, [out, retval] VARIANT_BOOL *ret);
+  HRESULT reset_calc([in] VARIANT_BOOL clearmem, [out, retval] VARIANT_BOOL *ret);
+  HRESULT execute_command([in] BSTR command, [out, retval] VARIANT_BOOL *ret);
+  HRESULT turn_calc_on([out, retval] VARIANT_BOOL *ret);
+  HRESULT enter_debugger([out, retval] VARIANT_BOOL *ret);
+};
+
+[
+uuid(6140dc7c-3d74-41f9-a787-5946994aa8f2),
+version(1.0),
+helpstring("TiEmu Type Library")
+]
+library TiEmuOLELib
+{
+	importlib("stdole2.tlb");
+  [
+  uuid(b2a17b13-9d6f-4dd4-a2a9-6fe06adc1d33),
+  helpstring("TiEmu OLE Interface Class")
+  ]
+  coclass TiEmuOLE
+  {
+    [default] interface ITiEmuOLE;
+  };
+};
diff --git a/src/ipc/com/oleaut.tlb b/src/ipc/com/oleaut.tlb
new file mode 100644
index 0000000..a0d5a3c
Binary files /dev/null and b/src/ipc/com/oleaut.tlb differ
diff --git a/src/ipc/com/oleaut_c.h b/src/ipc/com/oleaut_c.h
new file mode 100644
index 0000000..27df901
--- /dev/null
+++ b/src/ipc/com/oleaut_c.h
@@ -0,0 +1,32 @@
+#ifndef OLEAUT_C_H
+#define OLEAUT_C_H
+
+/*  OLE Automation interface for TiEmu
+ *
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+void oleaut_init (void);
+void oleaut_finish (void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/ipc/com/oleaut_i.c b/src/ipc/com/oleaut_i.c
new file mode 100644
index 0000000..47c7a2e
--- /dev/null
+++ b/src/ipc/com/oleaut_i.c
@@ -0,0 +1,19 @@
+/*** Autogenerated by WIDL 0.9.31 from oleaut.idl - Do not edit ***/
+
+#define INITGUID
+#include <rpc.h>
+#include <rpcndr.h>
+
+#include <initguid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DEFINE_GUID(IID_ITiEmuOLE, 0xe9373bd9, 0x7363, 0x427f, 0xa2,0xa6, 0x1e,0x8b,0xa9,0x1f,0xfb,0x3e);
+DEFINE_GUID(LIBID_TiEmuOLELib, 0x6140dc7c, 0x3d74, 0x41f9, 0xa7,0x87, 0x59,0x46,0x99,0x4a,0xa8,0xf2);
+DEFINE_GUID(CLSID_TiEmuOLE, 0xb2a17b13, 0x9d6f, 0x4dd4, 0xa2,0xa9, 0x6f,0xe0,0x6a,0xdc,0x1d,0x33);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/ipc/com/oleaut_i.c.diff b/src/ipc/com/oleaut_i.c.diff
new file mode 100644
index 0000000..9cd26ed
--- /dev/null
+++ b/src/ipc/com/oleaut_i.c.diff
@@ -0,0 +1,7 @@
+2a3
+> #define INITGUID
+6,7c7
+< #define INITGUID
+< #include <guiddef.h>
+---
+> #include <initguid.h>
diff --git a/src/ipc/com/oleaut_p.c b/src/ipc/com/oleaut_p.c
new file mode 100644
index 0000000..661f03c
--- /dev/null
+++ b/src/ipc/com/oleaut_p.c
@@ -0,0 +1,1749 @@
+/* oleaut_p.c edited by Kevin Kofler to build with MinGW
+ *
+ *  OLE Automation interface for TiEmu
+ *
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+/* File created by MIDL compiler version 5.01.0164 */
+/* at Fri Feb 03 11:12:41 2006
+ */
+/* Compiler settings for oleaut.idl:
+    Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
+    error checks: allocation ref bounds_check enum stub_data 
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#include "rpcproxy.h"
+
+#include "oleaut.h"
+
+#ifdef __MINGW32__
+#include <excpt.h>
+/* CAUTION: Ugly SEH hacks (technically invalid inline ASM) below!
+            Use -O0 -fno-omit-frame-pointer to minimize breakage! */
+#define RpcTryExcept \
+  { \
+    asm volatile ("pushl %esp; pushl %ebp; pushl $100f\n" \
+                  "pushl %fs:0; movl %esp,%fs:0; subl $32,%esp");
+#define RpcExcept(guard) \
+    asm volatile ("movl %fs:0,%esp; popl %fs:0; addl $12,%esp"); \
+  } \
+  asm volatile ("jmp 101f\n" \
+                "100: pushl %ebp; movl %fs:0,%eax; movl 8(%eax),%ebp; movl %esp,8(%eax)"); \
+  if ((guard)) { \
+    volatile int _exception_code; \
+    asm volatile ("movl 8(%%esp),%%eax; movl %%fs:0,%%esp; popl %%fs:0; addl $8,%%esp; popl %%esp; movl (%%eax),%%eax; movl %%eax,%0; subl $32,%%esp":"=m"(_exception_code)::"eax");
+#define RpcEndExcept \
+  } else { \
+    asm volatile ("movl %fs:0,%eax; movl 8(%eax),%esp; movl %ebp,8(%eax); popl %ebp; movl $1,%eax; ret");\
+  } \
+  asm volatile ("101:");
+#define RpcTryFinally \
+  { \
+    asm volatile ("pushl $0; pushl %esp; pushl %ebp; pushl $200f\n" \
+                  "pushl %fs:0; movl %esp,%fs:0; subl $32,%esp");
+#define RpcFinally \
+  } \
+  asm volatile ("movl %fs:0,%eax; jmp 201f\n" \
+                "200: movl %fs:0,%eax; movl $1,16(%eax)\n" \
+                "201: pushl %ebp; movl 8(%eax),%ebp; movl %esp,8(%eax); subl $32,%esp");
+#define RpcEndFinally \
+  asm volatile ("movl %%fs:0,%%eax; movl 8(%%eax),%%esp; movl %%ebp,8(%%eax); popl %%ebp; movl 16(%%eax),%%eax; testl %%eax,%%eax; je 202f; ret\n" \
+                "202: movl %%fs:0,%%esp; popl %%fs:0; addl $16,%%esp":::"eax");
+#define RpcExceptionCode() (_exception_code)
+#ifndef CINTERFACE_PROXY_VTABLE
+#define CINTERFACE_PROXY_VTABLE(n) \
+  struct \
+  { \
+    CInterfaceProxyHeader header; \
+    void *Vtbl[n]; \
+  }
+#endif
+#define SECTION_ORPC __attribute__((section(".orpc")))
+#define SECTION_RDATA __attribute__((section(".rdata")))
+#else
+#define SECTION_ORPC /**/
+#define SECTION_RDATA /**/
+#endif
+
+#define TYPE_FORMAT_STRING_SIZE   63                                
+#define PROC_FORMAT_STRING_SIZE   37                                
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+
+/* Standard interface: __MIDL_itf_oleaut_0000, ver. 0.0,
+   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */
+
+
+/* Object interface: IUnknown, ver. 0.0,
+   GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
+
+
+/* Object interface: IDispatch, ver. 0.0,
+   GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
+
+
+/* Object interface: ITiEmuOLE, ver. 0.0,
+   GUID={0xe9373bd9,0x7363,0x427f,{0xa2,0xa6,0x1e,0x8b,0xa9,0x1f,0xfb,0x3e}} */
+
+
+extern const MIDL_STUB_DESC Object_StubDesc;
+
+
+#ifndef __MINGW32__
+#pragma code_seg(".orpc")
+#endif
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_image_loaded_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      7);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 0U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_image_loaded_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M0;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        ret = &_M0;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> image_loaded((ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_emulated_calc_type_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [retval][out] */ int __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      8);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 0U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
+            
+            *ret = *(( int __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( int __RPC_FAR * );
+            
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[6],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_emulated_calc_type_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    int _M1;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    int __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( int __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        ret = &_M1;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> emulated_calc_type((ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 4U + 4U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( int __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( int __RPC_FAR * );
+        
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_emulated_hw_version_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [retval][out] */ int __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      9);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 0U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
+            
+            *ret = *(( int __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( int __RPC_FAR * );
+            
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[6],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_emulated_hw_version_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    int _M2;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    int __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( int __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        ret = &_M2;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> emulated_hw_version((ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 4U + 4U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( int __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( int __RPC_FAR * );
+            
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_emulated_os_version_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [retval][out] */ BSTR __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    if(ret)
+        {
+        MIDL_memset(
+               ret,
+               0,
+               sizeof( BSTR  ));
+        }
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      10);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 0U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[12] );
+            
+            NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                      (unsigned char __RPC_FAR * __RPC_FAR *)&ret,
+                                      (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38],
+                                      (unsigned char)0 );
+            
+            _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[10],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_emulated_os_version_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    BSTR _M3;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    BSTR __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( BSTR __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        ret = &_M3;
+        MIDL_memset(
+               ret,
+               0,
+               sizeof( BSTR  ));
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> emulated_os_version((ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 8U + 11U;
+        NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                  (unsigned char __RPC_FAR *)ret,
+                                  (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38] );
+        
+        _StubMsg.BufferLength += 16;
+        
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
+                                (unsigned char __RPC_FAR *)ret,
+                                (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38] );
+        
+        _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        NdrPointerFree( &_StubMsg,
+                        (unsigned char __RPC_FAR *)ret,
+                        &__MIDL_TypeFormatString.Format[10] );
+        
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_ready_for_transfers_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      11);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 0U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_ready_for_transfers_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M4;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        ret = &_M4;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> ready_for_transfers((ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_send_file_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [in] */ BSTR filename,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      12);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 8U;
+            NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                      (unsigned char __RPC_FAR *)&filename,
+                                      (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52] );
+            
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
+                                    (unsigned char __RPC_FAR *)&filename,
+                                    (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52] );
+            
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[18] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_send_file_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M5;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    void __RPC_FAR *_p_filename;
+    BSTR filename;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    _p_filename = &filename;
+    MIDL_memset(
+               _p_filename,
+               0,
+               sizeof( BSTR  ));
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+            NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[18] );
+        
+        NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                  (unsigned char __RPC_FAR * __RPC_FAR *)&_p_filename,
+                                  (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52],
+                                  (unsigned char)0 );
+        
+        ret = &_M5;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> send_file(
+             (ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,
+             filename,
+             ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        NdrUserMarshalFree( &_StubMsg,
+                            (unsigned char __RPC_FAR *)&filename,
+                            &__MIDL_TypeFormatString.Format[52] );
+        
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_debug_file_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [in] */ BSTR filename,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      13);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 8U;
+            NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                      (unsigned char __RPC_FAR *)&filename,
+                                      (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52] );
+            
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
+                                    (unsigned char __RPC_FAR *)&filename,
+                                    (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52] );
+            
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[18] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_debug_file_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M6;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    void __RPC_FAR *_p_filename;
+    BSTR filename;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    _p_filename = &filename;
+    MIDL_memset(
+               _p_filename,
+               0,
+               sizeof( BSTR  ));
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+            NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[18] );
+        
+        NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                  (unsigned char __RPC_FAR * __RPC_FAR *)&_p_filename,
+                                  (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52],
+                                  (unsigned char)0 );
+        
+        ret = &_M6;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> debug_file(
+              (ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,
+              filename,
+              ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        NdrUserMarshalFree( &_StubMsg,
+                            (unsigned char __RPC_FAR *)&filename,
+                            &__MIDL_TypeFormatString.Format[52] );
+        
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_reset_calc_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [in] */ VARIANT_BOOL clearmem,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      14);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 2U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = clearmem;
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[28] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_reset_calc_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M7;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    VARIANT_BOOL clearmem;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+            NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[28] );
+        
+        clearmem = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        ret = &_M7;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> reset_calc(
+              (ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,
+              clearmem,
+              ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_execute_command_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [in] */ BSTR command,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      15);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 8U;
+            NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                      (unsigned char __RPC_FAR *)&command,
+                                      (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52] );
+            
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
+                                    (unsigned char __RPC_FAR *)&command,
+                                    (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52] );
+            
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[18] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_execute_command_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M8;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    void __RPC_FAR *_p_command;
+    BSTR command;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    _p_command = &command;
+    MIDL_memset(
+               _p_command,
+               0,
+               sizeof( BSTR  ));
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+            NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[18] );
+        
+        NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
+                                  (unsigned char __RPC_FAR * __RPC_FAR *)&_p_command,
+                                  (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[52],
+                                  (unsigned char)0 );
+        
+        ret = &_M8;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> execute_command(
+                   (ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,
+                   command,
+                   ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        NdrUserMarshalFree( &_StubMsg,
+                            (unsigned char __RPC_FAR *)&command,
+                            &__MIDL_TypeFormatString.Format[52] );
+        
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_turn_calc_on_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      16);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 0U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_turn_calc_on_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M9;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        ret = &_M9;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> turn_calc_on((ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+
+SECTION_ORPC HRESULT STDMETHODCALLTYPE ITiEmuOLE_enter_debugger_Proxy( 
+    ITiEmuOLE __RPC_FAR * This,
+    /* [retval][out] */ VARIANT_BOOL __RPC_FAR *ret)
+{
+
+    HRESULT _RetVal;
+    
+    RPC_MESSAGE _RpcMessage;
+    
+    MIDL_STUB_MESSAGE _StubMsg;
+    
+    RpcTryExcept
+        {
+        NdrProxyInitialize(
+                      ( void __RPC_FAR *  )This,
+                      ( PRPC_MESSAGE  )&_RpcMessage,
+                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
+                      17);
+        
+        
+        
+        if(!ret)
+            {
+            RpcRaiseException(RPC_X_NULL_REF_POINTER);
+            }
+        RpcTryFinally
+            {
+            
+            _StubMsg.BufferLength = 0U;
+            NdrProxyGetBuffer(This, &_StubMsg);
+            NdrProxySendReceive(This, &_StubMsg);
+            
+            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
+                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
+            
+            *ret = *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+            
+            _StubMsg.Buffer += 2;
+            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer);
+            _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+            
+            }
+        RpcFinally
+            {
+            NdrProxyFreeBuffer(This, &_StubMsg);
+            
+            }
+        RpcEndFinally
+        
+        }
+    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
+        {
+        NdrClearOutParameters(
+                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
+                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
+                         ( void __RPC_FAR * )ret);
+        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
+        }
+    RpcEndExcept
+    return _RetVal;
+}
+
+SECTION_ORPC void __RPC_STUB ITiEmuOLE_enter_debugger_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase)
+{
+    VARIANT_BOOL _M9;
+    HRESULT _RetVal;
+    MIDL_STUB_MESSAGE _StubMsg;
+    VARIANT_BOOL __RPC_FAR *ret;
+    
+NdrStubInitialize(
+                     _pRpcMessage,
+                     &_StubMsg,
+                     &Object_StubDesc,
+                     _pRpcChannelBuffer);
+    ( VARIANT_BOOL __RPC_FAR * )ret = 0;
+    RpcTryFinally
+        {
+        ret = &_M9;
+        
+        *_pdwStubPhase = STUB_CALL_SERVER;
+        _RetVal = (((ITiEmuOLE*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> enter_debugger((ITiEmuOLE *) ((CStdStubBuffer *)This)->pvServerObject,ret);
+        
+        *_pdwStubPhase = STUB_MARSHAL;
+        
+        _StubMsg.BufferLength = 2U + 6U;
+        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
+        *(( VARIANT_BOOL __RPC_FAR * )_StubMsg.Buffer) = *ret;
+        _StubMsg.Buffer += sizeof( VARIANT_BOOL __RPC_FAR * );
+        
+        _StubMsg.Buffer += 2;
+        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer) = _RetVal;
+        _StubMsg.Buffer += sizeof( HRESULT __RPC_FAR * );
+        
+        }
+    RpcFinally
+        {
+        }
+    RpcEndFinally
+    _pRpcMessage->BufferLength = 
+        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
+    
+}
+
+extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1];
+
+static const MIDL_STUB_DESC Object_StubDesc = 
+    {
+    0,
+    NdrOleAllocate,
+    NdrOleFree,
+    0,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x20000, /* Ndr library version */
+    0,
+    0x50100a4, /* MIDL Version 5.1.164 */
+    0,
+    UserMarshalRoutines,
+    0,  /* notify & notify_flag routine table */
+    1,  /* Flags */
+    0,  /* Reserved3 */
+    0,  /* Reserved4 */
+    0   /* Reserved5 */
+    };
+
+CINTERFACE_PROXY_VTABLE(18) _ITiEmuOLEProxyVtbl = 
+{
+    &IID_ITiEmuOLE,
+    IUnknown_QueryInterface_Proxy,
+    IUnknown_AddRef_Proxy,
+    IUnknown_Release_Proxy ,
+    0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
+    0 /* IDispatch_GetTypeInfo_Proxy */ ,
+    0 /* IDispatch_GetIDsOfNames_Proxy */ ,
+    0 /* IDispatch_Invoke_Proxy */ ,
+    ITiEmuOLE_image_loaded_Proxy ,
+    ITiEmuOLE_emulated_calc_type_Proxy ,
+    ITiEmuOLE_emulated_hw_version_Proxy ,
+    ITiEmuOLE_emulated_os_version_Proxy ,
+    ITiEmuOLE_ready_for_transfers_Proxy ,
+    ITiEmuOLE_send_file_Proxy ,
+    ITiEmuOLE_debug_file_Proxy ,
+    ITiEmuOLE_reset_calc_Proxy ,
+    ITiEmuOLE_execute_command_Proxy ,
+    ITiEmuOLE_turn_calc_on_Proxy ,
+    ITiEmuOLE_enter_debugger_Proxy
+};
+
+
+static const PRPC_STUB_FUNCTION ITiEmuOLE_table[] =
+{
+    STUB_FORWARDING_FUNCTION,
+    STUB_FORWARDING_FUNCTION,
+    STUB_FORWARDING_FUNCTION,
+    STUB_FORWARDING_FUNCTION,
+    ITiEmuOLE_image_loaded_Stub,
+    ITiEmuOLE_emulated_calc_type_Stub,
+    ITiEmuOLE_emulated_hw_version_Stub,
+    ITiEmuOLE_emulated_os_version_Stub,
+    ITiEmuOLE_ready_for_transfers_Stub,
+    ITiEmuOLE_send_file_Stub,
+    ITiEmuOLE_debug_file_Stub,
+    ITiEmuOLE_reset_calc_Stub,
+    ITiEmuOLE_execute_command_Stub,
+    ITiEmuOLE_turn_calc_on_Stub,
+    ITiEmuOLE_enter_debugger_Stub
+};
+
+CInterfaceStubVtbl _ITiEmuOLEStubVtbl =
+{
+    &IID_ITiEmuOLE,
+    0,
+    18,
+    &ITiEmuOLE_table[-3],
+    CStdStubBuffer_DELEGATING_METHODS
+};
+
+#ifndef __MINGW32__
+#pragma data_seg(".rdata")
+#endif
+
+SECTION_RDATA static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1] = 
+        {
+            
+            {
+            (USER_MARSHAL_SIZING_ROUTINE)BSTR_UserSize
+            ,(USER_MARSHAL_MARSHALLING_ROUTINE)BSTR_UserMarshal
+            ,(USER_MARSHAL_UNMARSHALLING_ROUTINE)BSTR_UserUnmarshal
+            ,(USER_MARSHAL_FREEING_ROUTINE)BSTR_UserFree
+            }
+
+        };
+
+
+#if !defined(__RPC_WIN32__)
+#error  Invalid build platform for this stub.
+#endif
+
+#if !(TARGET_IS_NT40_OR_LATER) && !defined(__MINGW32__)
+#error You need a Windows NT 4.0 or later to run this stub because it uses these features:
+#error   [wire_marshal] or [user_marshal] attribute.
+#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
+#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
+#endif
+
+
+SECTION_RDATA static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+			
+			0x51,		/* FC_OUT_PARAM */
+#ifndef _ALPHA_
+			0x1,		/* x86, MIPS & PPC Stack size = 1 */
+#else
+			0x2,		/* Alpha Stack size = 2 */
+#endif
+/*  2 */	NdrFcShort( 0x2 ),	/* Type Offset=2 */
+/*  4 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
+			0x8,		/* FC_LONG */
+/*  6 */	
+			0x51,		/* FC_OUT_PARAM */
+#ifndef _ALPHA_
+			0x1,		/* x86, MIPS & PPC Stack size = 1 */
+#else
+			0x2,		/* Alpha Stack size = 2 */
+#endif
+/*  8 */	NdrFcShort( 0x6 ),	/* Type Offset=6 */
+/* 10 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
+			0x8,		/* FC_LONG */
+/* 12 */	
+			0x51,		/* FC_OUT_PARAM */
+#ifndef _ALPHA_
+			0x1,		/* x86, MIPS & PPC Stack size = 1 */
+#else
+			0x2,		/* Alpha Stack size = 2 */
+#endif
+/* 14 */	NdrFcShort( 0xa ),	/* Type Offset=10 */
+/* 16 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
+			0x8,		/* FC_LONG */
+/* 18 */	
+			0x4d,		/* FC_IN_PARAM */
+#ifndef _ALPHA_
+			0x1,		/* x86, MIPS & PPC Stack size = 1 */
+#else
+			0x2,		/* Alpha Stack size = 2 */
+#endif
+/* 20 */	NdrFcShort( 0x34 ),	/* Type Offset=52 */
+/* 22 */	
+			0x51,		/* FC_OUT_PARAM */
+#ifndef _ALPHA_
+			0x1,		/* x86, MIPS & PPC Stack size = 1 */
+#else
+			0x2,		/* Alpha Stack size = 2 */
+#endif
+/* 24 */	NdrFcShort( 0x2 ),	/* Type Offset=2 */
+/* 26 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
+			0x8,		/* FC_LONG */
+/* 28 */	0x4e,		/* FC_IN_PARAM_BASETYPE */
+			0x6,		/* FC_SHORT */
+/* 30 */	
+			0x51,		/* FC_OUT_PARAM */
+#ifndef _ALPHA_
+			0x1,		/* x86, MIPS & PPC Stack size = 1 */
+#else
+			0x2,		/* Alpha Stack size = 2 */
+#endif
+/* 32 */	NdrFcShort( 0x2 ),	/* Type Offset=2 */
+/* 34 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
+			0x8,		/* FC_LONG */
+
+			0x0
+        }
+    };
+
+SECTION_RDATA static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+			NdrFcShort( 0x0 ),	/* 0 */
+/*  2 */	
+			0x11, 0xc,	/* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */	0x6,		/* FC_SHORT */
+			0x5c,		/* FC_PAD */
+/*  6 */	
+			0x11, 0xc,	/* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  8 */	0x8,		/* FC_LONG */
+			0x5c,		/* FC_PAD */
+/* 10 */	
+			0x11, 0x4,	/* FC_RP [alloced_on_stack] */
+/* 12 */	NdrFcShort( 0x1a ),	/* Offset= 26 (38) */
+/* 14 */	
+			0x13, 0x0,	/* FC_OP */
+/* 16 */	NdrFcShort( 0xc ),	/* Offset= 12 (28) */
+/* 18 */	
+			0x1b,		/* FC_CARRAY */
+			0x1,		/* 1 */
+/* 20 */	NdrFcShort( 0x2 ),	/* 2 */
+/* 22 */	0x9,		/* Corr desc: FC_ULONG */
+			0x0,		/*  */
+/* 24 */	NdrFcShort( 0xfffc ),	/* -4 */
+/* 26 */	0x6,		/* FC_SHORT */
+			0x5b,		/* FC_END */
+/* 28 */	
+			0x17,		/* FC_CSTRUCT */
+			0x3,		/* 3 */
+/* 30 */	NdrFcShort( 0x8 ),	/* 8 */
+/* 32 */	NdrFcShort( 0xfffffff2 ),	/* Offset= -14 (18) */
+/* 34 */	0x8,		/* FC_LONG */
+			0x8,		/* FC_LONG */
+/* 36 */	0x5c,		/* FC_PAD */
+			0x5b,		/* FC_END */
+/* 38 */	0xb4,		/* FC_USER_MARSHAL */
+			0x83,		/* 131 */
+/* 40 */	NdrFcShort( 0x0 ),	/* 0 */
+/* 42 */	NdrFcShort( 0x4 ),	/* 4 */
+/* 44 */	NdrFcShort( 0x0 ),	/* 0 */
+/* 46 */	NdrFcShort( 0xffffffe0 ),	/* Offset= -32 (14) */
+/* 48 */	
+			0x12, 0x0,	/* FC_UP */
+/* 50 */	NdrFcShort( 0xffffffea ),	/* Offset= -22 (28) */
+/* 52 */	0xb4,		/* FC_USER_MARSHAL */
+			0x83,		/* 131 */
+/* 54 */	NdrFcShort( 0x0 ),	/* 0 */
+/* 56 */	NdrFcShort( 0x4 ),	/* 4 */
+/* 58 */	NdrFcShort( 0x0 ),	/* 0 */
+/* 60 */	NdrFcShort( 0xfffffff4 ),	/* Offset= -12 (48) */
+
+			0x0
+        }
+    };
+
+const CInterfaceProxyVtbl * _oleaut_ProxyVtblList[] = 
+{
+    ( CInterfaceProxyVtbl *) &_ITiEmuOLEProxyVtbl,
+    0
+};
+
+const CInterfaceStubVtbl * _oleaut_StubVtblList[] = 
+{
+    ( CInterfaceStubVtbl *) &_ITiEmuOLEStubVtbl,
+    0
+};
+
+PCInterfaceName const _oleaut_InterfaceNamesList[] = 
+{
+    "ITiEmuOLE",
+    0
+};
+
+const IID *  _oleaut_BaseIIDList[] = 
+{
+    &IID_IDispatch,
+    0
+};
+
+
+#define _oleaut_CHECK_IID(n)	IID_GENERIC_CHECK_IID( _oleaut, pIID, n)
+
+SECTION_ORPC int __stdcall _oleaut_IID_Lookup( const IID * pIID, int * pIndex )
+{
+    
+    if(!_oleaut_CHECK_IID(0))
+        {
+        *pIndex = 0;
+        return 1;
+        }
+
+    return 0;
+}
+
+SECTION_RDATA const ExtendedProxyFileInfo oleaut_ProxyFileInfo = 
+{
+    (PCInterfaceProxyVtblList *) & _oleaut_ProxyVtblList,
+    (PCInterfaceStubVtblList *) & _oleaut_StubVtblList,
+    (const PCInterfaceName * ) & _oleaut_InterfaceNamesList,
+    (const IID ** ) & _oleaut_BaseIIDList,
+    & _oleaut_IID_Lookup, 
+    1,
+    1,
+    0, /* table of [async_uuid] interfaces */
+    0, /* Filler1 */
+    0, /* Filler2 */
+    0  /* Filler3 */
+};
diff --git a/src/ipc/com/registry.cpp b/src/ipc/com/registry.cpp
new file mode 100644
index 0000000..c79661f
--- /dev/null
+++ b/src/ipc/com/registry.cpp
@@ -0,0 +1,203 @@
+/*  TiEmu - OLE component registration
+ *
+ *  Copyright (c) 2006, Kevin Kofler and Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "registry.h"
+#include <cstdlib>
+
+#ifndef _MSC_VER
+using namespace std;
+#endif
+
+// Size of a CLSID as a string
+static const int CLSID_STRING_SIZE = 39;
+
+// Convert a CLSID to a char string.
+static void CLSIDtochar(REFCLSID clsid, char* szCLSID, int length)
+{
+	// Get CLSID
+	LPOLESTR wszCLSID = NULL;
+	HRESULT hr = StringFromCLSID(clsid, &wszCLSID);
+	if (!SUCCEEDED(hr)) exit(1);
+
+	// Covert from wide characters to non-wide.
+	wcstombs(szCLSID, wszCLSID, length);
+
+	// Free memory.
+	CoTaskMemFree(wszCLSID);
+}
+
+// Delete a key and all of its descendents.
+static LONG recursiveDeleteKey(HKEY hKeyParent,           // Parent of key to delete
+                               const char* lpszKeyChild)  // Key to delete
+{
+	// Open the child.
+	HKEY hKeyChild;
+	LONG lRes = RegOpenKeyEx(hKeyParent, lpszKeyChild, 0, KEY_ALL_ACCESS, &hKeyChild);
+	if(lRes != ERROR_SUCCESS)
+		return lRes;
+
+	// Enumerate all of the decendents of this child.
+	FILETIME time;
+	char szBuffer[256];
+	DWORD dwSize = 256;
+	while(RegEnumKeyEx(hKeyChild, 0, szBuffer, &dwSize, NULL, NULL, NULL, &time) == S_OK)
+	{
+		// Delete the decendents of this child.
+		lRes = recursiveDeleteKey(hKeyChild, szBuffer);
+		if(lRes != ERROR_SUCCESS)
+		{
+			// Cleanup before exiting.
+			RegCloseKey(hKeyChild);
+			return lRes;
+		}
+		dwSize = 256;
+	}
+
+	// Close the child.
+	RegCloseKey(hKeyChild);
+
+	// Delete this child.
+	return RegDeleteKey(hKeyParent, lpszKeyChild);
+}
+
+// Create a key and set its value.
+static BOOL setKeyAndValue(const char* szKey, const char* szSubkey, const char* szValue)
+{
+	HKEY hKey;
+	char szKeyBuf[1024];
+
+	// Copy keyname into buffer.
+	strcpy(szKeyBuf, szKey);
+
+	// Add subkey name to buffer.
+	if(szSubkey != NULL)
+	{
+		strcat(szKeyBuf, "\\");
+		strcat(szKeyBuf, szSubkey );
+	}
+
+	// Create and open key and subkey.
+	long lResult = RegCreateKeyEx(HKEY_CLASSES_ROOT, szKeyBuf, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL);
+	if(lResult != ERROR_SUCCESS)
+		return FALSE;
+
+	// Set the Value.
+	if(szValue != NULL)
+		RegSetValueEx(hKey, NULL, 0, REG_SZ, (BYTE *)szValue, strlen(szValue)+1);
+
+	RegCloseKey(hKey);
+	return TRUE;
+}
+
+// Open a key and set a value.
+static BOOL setValueInKey(const char* szKey, const char* szNamedValue, const char* szValue)
+{
+	HKEY hKey;
+	char szKeyBuf[1024];
+
+	// Copy keyname into buffer.
+	strcpy(szKeyBuf, szKey);
+
+	// Create and open key and subkey.
+	long lResult = RegOpenKeyEx(HKEY_CLASSES_ROOT, szKeyBuf, 0, KEY_SET_VALUE, &hKey);
+	if(lResult != ERROR_SUCCESS)
+		return FALSE;
+
+    // Set the Value.
+	if(szValue != NULL)
+		RegSetValueEx(hKey, szNamedValue, 0, REG_SZ, (BYTE*)szValue, strlen(szValue)+1);
+
+	RegCloseKey(hKey);
+	return TRUE;
+}
+
+// Register the component in the registry.
+HRESULT RegisterServer(const CLSID *clsid,           // Class ID
+                       const char* szFriendlyName,   // Friendly Name
+                       const char* szVerIndProgID,   // Programmatic
+                       const char* szProgID,         // IDs
+                       const char* szThreadingModel) // ThreadingModel
+{
+	// Get server location.
+	char szModule[512];
+	HMODULE hModule = GetModuleHandle(NULL);
+	DWORD dwResult = GetModuleFileName(hModule, szModule, sizeof(szModule)/sizeof(char));
+	if (dwResult == 0) exit(1);
+
+	// Convert the CLSID into a char.
+	char szCLSID[CLSID_STRING_SIZE];
+	CLSIDtochar(*clsid, szCLSID, sizeof(szCLSID));
+
+	// Build the key CLSID\\{...}
+	char szKey[64];
+	strcpy(szKey, "CLSID\\");
+	strcat(szKey, szCLSID);
+  
+	// Add the CLSID to the registry.
+	setKeyAndValue(szKey, NULL, szFriendlyName);
+
+	// Add the server filename subkey under the CLSID key.
+	setKeyAndValue(szKey, "LocalServer32", szModule);
+
+	// Add the ProgID subkey under the CLSID key.
+	setKeyAndValue(szKey, "ProgID", szProgID);
+
+	// Add the version-independent ProgID subkey under CLSID key.
+	setKeyAndValue(szKey, "VersionIndependentProgID", szVerIndProgID);
+
+	// Add the version-independent ProgID subkey under HKEY_CLASSES_ROOT.
+	setKeyAndValue(szVerIndProgID, NULL, szFriendlyName); 
+	setKeyAndValue(szVerIndProgID, "CLSID", szCLSID);
+	setKeyAndValue(szVerIndProgID, "CurVer", szProgID);
+
+	// Add the versioned ProgID subkey under HKEY_CLASSES_ROOT.
+	setKeyAndValue(szProgID, NULL, szFriendlyName); 
+	setKeyAndValue(szProgID, "CLSID", szCLSID);
+
+	return S_OK;
+}
+
+// Remove the component from the registry.
+LONG UnregisterServer(const CLSID *clsid,         // Class ID
+                      const char* szVerIndProgID, // Programmatic
+                      const char* szProgID)       // IDs
+{
+	// Convert the CLSID into a char.
+	char szCLSID[CLSID_STRING_SIZE];
+	CLSIDtochar(*clsid, szCLSID, sizeof(szCLSID));
+
+	// Build the key CLSID\\{...}
+	char szKey[64];
+	strcpy(szKey, "CLSID\\");
+	strcat(szKey, szCLSID);
+
+	// Delete the CLSID Key - CLSID\{...}
+	LONG lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, szKey);
+	if((lResult != ERROR_SUCCESS) && (lResult != ERROR_FILE_NOT_FOUND)) exit(1); // Subkey may not exist.
+
+	// Delete the version-independent ProgID Key.
+	lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, szVerIndProgID);
+	if((lResult != ERROR_SUCCESS) && (lResult != ERROR_FILE_NOT_FOUND)) exit(1); // Subkey may not exist.
+
+	// Delete the ProgID key.
+	lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, szProgID);
+	if((lResult != ERROR_SUCCESS) && (lResult != ERROR_FILE_NOT_FOUND)) exit(1); // Subkey may not exist.
+
+	return S_OK;
+}
diff --git a/src/ipc/com/registry.h b/src/ipc/com/registry.h
new file mode 100644
index 0000000..2fa050d
--- /dev/null
+++ b/src/ipc/com/registry.h
@@ -0,0 +1,32 @@
+/*  TiEmu - OLE component registration
+ *
+ *  Copyright (c) 2006, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <objbase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HRESULT RegisterServer(const CLSID *clsid, const char* szFriendlyName, const char* szVerIndProgID, const char* szProgID, const char* szThreadingModel);
+
+HRESULT UnregisterServer(const CLSID *clsid, const char* szVerIndProgID, const char* szProgID);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/ipc/com/rpcrt4nt4.def b/src/ipc/com/rpcrt4nt4.def
new file mode 100644
index 0000000..a783d1d
--- /dev/null
+++ b/src/ipc/com/rpcrt4nt4.def
@@ -0,0 +1,6 @@
+LIBRARY RPCRT4.dll
+EXPORTS
+NdrUserMarshalBufferSize at 12
+NdrUserMarshalMarshall at 12
+NdrUserMarshalUnmarshall at 16
+NdrUserMarshalFree at 12
\ No newline at end of file
diff --git a/src/ipc/com/tiemups.def b/src/ipc/com/tiemups.def
new file mode 100644
index 0000000..749bd30
--- /dev/null
+++ b/src/ipc/com/tiemups.def
@@ -0,0 +1,11 @@
+
+LIBRARY      "tiemuPS"
+
+DESCRIPTION  'Proxy/Stub DLL'
+
+EXPORTS
+	DllGetClassObject       @1	PRIVATE
+	DllCanUnloadNow         @2	PRIVATE
+	GetProxyDllInfo         @3	PRIVATE
+	DllRegisterServer		@4	PRIVATE
+	DllUnregisterServer		@5	PRIVATE
diff --git a/src/ipc/com/tiemups.mk b/src/ipc/com/tiemups.mk
new file mode 100644
index 0000000..02f4daa
--- /dev/null
+++ b/src/ipc/com/tiemups.mk
@@ -0,0 +1,17 @@
+
+tiemups.dll: dlldata.obj oleaut_p.obj oleaut_i.obj
+	link /dll /out:tiemups.dll /def:tiemups.def /entry:DllMain dlldata.obj oleaut_p.obj oleaut_i.obj \
+		kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \
+
+.c.obj:
+	cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \
+		-Dtiemu_ProxyFileInfo=oleaut_ProxyFileInfo \
+		$<
+
+clean:
+	@del tiemups.dll
+	@del tiemups.lib
+	@del tiemups.exp
+	@del dlldata.obj
+	@del oleaut_p.obj
+	@del oleaut_i.obj
diff --git a/src/ipc/dbus/dbus_ipc.c b/src/ipc/dbus/dbus_ipc.c
new file mode 100644
index 0000000..f224e50
--- /dev/null
+++ b/src/ipc/dbus/dbus_ipc.c
@@ -0,0 +1,241 @@
+/*  D-Bus interface for TiEmu
+ *
+ *  Copyright (c) 2006-2007 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <dbus/dbus-protocol.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-bindings.h>
+
+#include "dbus_ipc.h"
+#include "ti68k_int.h"
+#include "fs_misc.h"
+#include "engine.h"
+#include "dbg_all.h"
+#include "m68k.h"
+
+#define TIEMUDBUS_TYPE (tiemudbus_get_type())
+
+typedef struct {
+  GObject object;
+} TiEmuDBus;
+
+typedef struct {
+  GObjectClass object_class;
+} TiEmuDBusClass;
+
+static gboolean tiemudbus_image_loaded(TiEmuDBus *this);
+static gint tiemudbus_emulated_calc_type(TiEmuDBus *this);
+static gint tiemudbus_emulated_hw_version(TiEmuDBus *this);
+static const char *tiemudbus_emulated_os_version(TiEmuDBus *this);
+static gboolean tiemudbus_ready_for_transfers(TiEmuDBus *this);
+static gboolean tiemudbus_send_file(TiEmuDBus *this, const char *filename);
+static gboolean tiemudbus_send_files(TiEmuDBus *this, const char **filenames);
+static gboolean tiemudbus_debug_file(TiEmuDBus *this, const char *filename);
+static gboolean tiemudbus_reset_calc(TiEmuDBus *this, gboolean clearram);
+static gboolean tiemudbus_execute_command(TiEmuDBus *this, const char *command);
+static gboolean tiemudbus_turn_calc_on(TiEmuDBus *this);
+static gboolean tiemudbus_enter_debugger(TiEmuDBus *this);
+#include "dbus_glue.h"
+
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED /*unused*/
+/* M$VC could probably use a #pragma warning for this */
+#endif
+
+static void tiemudbus_class_init(TiEmuDBusClass *this)
+{
+  dbus_g_object_type_install_info(G_TYPE_FROM_CLASS(G_OBJECT_CLASS(this)),
+                                  &dbus_glib_tiemudbus_object_info);
+}
+
+static void tiemudbus_init(TiEmuDBus *this)
+{
+  DBusGConnection *connection;
+  DBusGProxy *proxy;
+  GError *error;
+  guint request_name_ret;
+
+  // Connect to D-Bus
+  error = NULL;
+  connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+  if (!connection) {
+    g_printerr("Failed to open connection to D-Bus session bus: %s\n",
+               error->message);
+    g_error_free(error);
+    return;
+  }
+
+  // Register service with D-Bus
+  proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS,
+                                    DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
+  if (!org_freedesktop_DBus_request_name(proxy, "org.ticalc.lpg.tiemu.TiEmuDBus",
+                                         0, &request_name_ret, &error)) {
+    g_printerr("Failed to register service with D-Bus: %s\n",
+               error->message);
+    g_error_free(error);
+    return;
+  }
+
+  // Register object with D-Bus
+  dbus_g_connection_register_g_object(connection,
+                                      "/org/ticalc/lpg/tiemu/TiEmuDBus",
+                                      G_OBJECT(this));
+}
+
+G_DEFINE_TYPE(TiEmuDBus, tiemudbus, G_TYPE_OBJECT);
+
+static gboolean tiemudbus_image_loaded(TiEmuDBus *this UNUSED)
+{
+  return img_loaded;
+}
+
+static gint tiemudbus_emulated_calc_type(TiEmuDBus *this UNUSED)
+{
+  if (img_loaded)
+    return img_infos.calc_type;
+  else
+    return 0;
+}
+
+static gint tiemudbus_emulated_hw_version(TiEmuDBus *this UNUSED)
+{
+  if (img_loaded)
+    return img_infos.hw_type;
+  else
+    return 0;
+}
+
+static const char *tiemudbus_emulated_os_version(TiEmuDBus *this UNUSED)
+{
+  if (img_loaded)
+    return img_infos.version;
+  else
+    return NULL;
+}
+
+static gboolean tiemudbus_ready_for_transfers(TiEmuDBus *this UNUSED)
+{
+  return (img_loaded && !engine_is_stopped() && ti68k_linkport_ready());
+}
+
+static gboolean tiemudbus_send_file(TiEmuDBus *this UNUSED, const char *filename)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    fs_send_file(filename);
+    engine_start();
+    return TRUE;
+  } else return FALSE;
+}
+
+static gboolean tiemudbus_send_files(TiEmuDBus *this UNUSED, const char **filenames)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    const char **it;
+    engine_stop();
+    for (it = filenames; *it; ++it)
+      fs_send_file(*it);
+    engine_start();
+    return TRUE;
+  } else return FALSE;
+}
+
+static gboolean tiemudbus_debug_file(TiEmuDBus *this UNUSED, const char *filename)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    fs_send_file_and_debug_info(filename);
+    engine_start();
+    return TRUE;
+  } else return FALSE;
+}
+
+static gboolean tiemudbus_reset_calc(TiEmuDBus *this UNUSED, gboolean clearram)
+{
+  if (img_loaded) {
+    engine_stop();
+
+    if(clearram)
+      memset(tihw.ram, 0, tihw.ram_size);
+
+    ti68k_reset();
+    if (dbg_on)
+      gtk_debugger_close_async();
+    else
+      engine_start();
+
+    return TRUE;
+  } else return FALSE;
+}
+
+static gboolean tiemudbus_execute_command(TiEmuDBus *this UNUSED, const char *command)
+{
+  if (img_loaded) {
+    gboolean result;
+    char *utf8, *ti;
+    unsigned short *utf16;
+    utf8=g_strconcat("\f\r\r", command, "\n", NULL);
+    utf16=ticonv_utf8_to_utf16(utf8);
+    g_free(utf8);
+    ti=ticonv_charset_utf16_to_ti(CALC_TI92, utf16);
+    g_free(utf16);
+    result=ti68k_kbd_push_chars(ti);
+    g_free(ti);
+    return result;
+  } else return FALSE;
+}
+
+static gboolean tiemudbus_turn_calc_on(TiEmuDBus *this UNUSED)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    hw_m68k_irq(6);
+    while (ti68k_debug_is_supervisor())
+      hw_m68k_run(1,0);
+    engine_start();
+    return TRUE;
+  } else return FALSE;
+}
+
+static gboolean tiemudbus_enter_debugger(TiEmuDBus *this UNUSED)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    ti68k_debug_break();
+    engine_start();
+    return TRUE;
+  } else return FALSE;
+}
+
+static TiEmuDBus *dbus_interface;
+
+void dbus_init(void)
+{
+  dbus_interface = g_object_new(TIEMUDBUS_TYPE, NULL);
+}
+
+void dbus_finish(void)
+{
+  g_object_unref(dbus_interface);
+}
diff --git a/src/ipc/dbus/dbus_ipc.h b/src/ipc/dbus/dbus_ipc.h
new file mode 100644
index 0000000..66f6887
--- /dev/null
+++ b/src/ipc/dbus/dbus_ipc.h
@@ -0,0 +1,32 @@
+#ifndef DBUS_IPC_H
+#define DBUS_IPC_H
+
+/*  D-Bus interface for TiEmu
+ *
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+void dbus_init (void);
+void dbus_finish (void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/ipc/dbus/dbus_ipc.xml b/src/ipc/dbus/dbus_ipc.xml
new file mode 100644
index 0000000..a2d09b6
--- /dev/null
+++ b/src/ipc/dbus/dbus_ipc.xml
@@ -0,0 +1,71 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+  <interface name="org.ticalc.lpg.tiemu.TiEmuDBus">
+    <method name="image_loaded">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+    </method>
+    <method name="emulated_calc_type">
+      <arg type="i" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+    </method>
+    <method name="emulated_hw_version">
+      <arg type="i" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+    </method>
+    <method name="emulated_os_version">
+      <arg type="s" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+        <annotation name="org.freedesktop.DBus.GLib.Const" value=""/>
+      </arg>
+    </method>
+    <method name="ready_for_transfers">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+    </method>
+    <method name="send_file">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+      <arg type="s" direction="in"/>
+    </method>
+    <method name="send_files">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+      <arg type="as" direction="in"/>
+    </method>
+    <method name="debug_file">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+      <arg type="s" direction="in"/>
+    </method>
+    <method name="reset_calc">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+      <arg type="b" direction="in"/>
+    </method>
+    <method name="execute_command">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+      <arg name="command" type="s" direction="in"/>
+    </method>
+    <method name="turn_calc_on">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+    </method>
+    <method name="enter_debugger">
+      <arg type="b" direction="out">
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      </arg>
+    </method>
+  </interface>
+</node>
diff --git a/src/ipc/dcop/dcop.cpp b/src/ipc/dcop/dcop.cpp
new file mode 100644
index 0000000..82e6ab7
--- /dev/null
+++ b/src/ipc/dcop/dcop.cpp
@@ -0,0 +1,170 @@
+/*  DCOP interface for TiEmu
+ *
+ *  Copyright (c) 2006-2008 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <cstdlib>
+#include <cstring>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <dcopobject.h>
+#include <dcopclient.h>
+#include <kapp.h>
+
+#include "dcop.h"
+#include "ti68k_int.h"
+#include "fs_misc.h"
+#include "engine.h"
+#include "dbg_all.h"
+#include "m68k.h"
+
+TiEmuDCOP::TiEmuDCOP() : DCOPObject( "TiEmuDCOP" )
+{
+  // Register with DCOP
+  if (!kapp->dcopClient()->isRegistered()) 
+    kapp->dcopClient()->attach();
+  kapp->dcopClient()->setDefaultObject(objId());
+}
+
+TiEmuDCOP::~TiEmuDCOP()
+{
+}
+
+bool TiEmuDCOP::image_loaded()
+{
+  return img_loaded;
+}
+
+int TiEmuDCOP::emulated_calc_type()
+{
+  if (img_loaded)
+    return img_infos.calc_type;
+  else
+    return 0;
+}
+
+int TiEmuDCOP::emulated_hw_version()
+{
+  if (img_loaded)
+    return img_infos.hw_type;
+  else
+    return 0;
+}
+
+QString TiEmuDCOP::emulated_os_version()
+{
+  if (img_loaded)
+    return QString::fromUtf8(img_infos.version);
+  else
+    return QString::null;
+}
+
+bool TiEmuDCOP::ready_for_transfers()
+{
+  return (img_loaded && !engine_is_stopped() && ti68k_linkport_ready());
+}
+
+bool TiEmuDCOP::send_file(QString filename)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    fs_send_file(filename.local8Bit());
+    engine_start();
+    return true;
+  } else return false;
+}
+
+bool TiEmuDCOP::send_files(QStringList filenames)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    for (QStringList::Iterator it = filenames.begin(); it != filenames.end(); ++it)
+      fs_send_file((*it).local8Bit());
+    engine_start();
+    return true;
+  } else return false;
+}
+
+bool TiEmuDCOP::debug_file(QString filename)
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    fs_send_file_and_debug_info(filename.local8Bit());
+    engine_start();
+    return true;
+  } else return false;
+}
+
+bool TiEmuDCOP::reset_calc(bool clearram)
+{
+  if (img_loaded) {
+    engine_stop();
+
+    if(clearram)
+      std::memset(tihw.ram, 0, tihw.ram_size);
+
+    ti68k_reset();
+    if (dbg_on)
+      gtk_debugger_close_async();
+    else
+      engine_start();
+
+    return true;
+  } else return false;
+}
+
+bool TiEmuDCOP::execute_command(QString command)
+{
+  if (img_loaded) {
+    bool result;
+    command.prepend("\f\r\r");
+    command+='\n';
+#ifdef __GNUC__
+    char ti[command.length()+1];
+	ticonv_charset_utf16_to_ti_s(CALC_TI92, command.ucs2(), ti);
+    result=ti68k_kbd_push_chars(ti);
+#else
+    char *ti=std::malloc(command.length()+1);
+    ticonv_charset_utf16_to_ti_s(CALC_TI92, command.ucs2(), ti);
+    result=ti68k_kbd_push_chars(ti);
+    std::free(ti);
+#endif
+    return result;
+  } else return false;
+}
+
+bool TiEmuDCOP::turn_calc_on()
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    hw_m68k_irq(6);
+    while (ti68k_debug_is_supervisor())
+      hw_m68k_run(1,0);
+    engine_start();
+    return true;
+  } else return false;
+}
+
+bool TiEmuDCOP::enter_debugger()
+{
+  if (img_loaded && !engine_is_stopped()) {
+    engine_stop();
+    ti68k_debug_break();
+    engine_start();
+    return true;
+  } else return false;
+}
diff --git a/src/ipc/dcop/dcop.h b/src/ipc/dcop/dcop.h
new file mode 100644
index 0000000..06c46cc
--- /dev/null
+++ b/src/ipc/dcop/dcop.h
@@ -0,0 +1,51 @@
+/*  DCOP interface for TiEmu
+ *
+ *  Copyright (c) 2006 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef TIEMU_DCOP_H
+#define TIEMU_DCOP_H
+
+#include <qobject.h>
+#include <dcopobject.h>
+#include <qstringlist.h>
+
+class TiEmuDCOP: public QObject, virtual public DCOPObject
+{
+  Q_OBJECT
+  K_DCOP
+
+  public:
+    TiEmuDCOP();
+    ~TiEmuDCOP();
+
+  k_dcop:
+    bool image_loaded();
+    int emulated_calc_type();
+    int emulated_hw_version();
+    QString emulated_os_version();
+    bool ready_for_transfers();
+    bool send_file(QString);
+    bool send_files(QStringList);
+    bool debug_file(QString);
+    bool reset_calc(bool);
+    bool execute_command(QString command);
+    bool turn_calc_on();
+    bool enter_debugger();
+};
+
+#endif
diff --git a/src/kde/kde-private.h b/src/kde/kde-private.h
new file mode 100644
index 0000000..ec885a9
--- /dev/null
+++ b/src/kde/kde-private.h
@@ -0,0 +1,29 @@
+#ifndef __SP_KDE_PRIVATE_H__
+#define __SP_KDE_PRIVATE_H__
+
+/*
+ * KDE utilities for Sodipodi - adapted to TiEmu
+ *
+ * Authors:
+ *   Lauris Kaplinski <lauris at kaplinski.com>
+ *   Kevin Kofler <Kevin at tigcc.ticalc.org>
+ *
+ * Copyright (C) 2003-2005 Authors
+ * $Id$
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <qobject.h>
+
+class SPKDEBridge : public QObject {
+	Q_OBJECT
+public:
+	SPKDEBridge (const char *name) : QObject (NULL, name) { /* NOP */ }
+
+public slots:
+	void EventHook (void);
+	void TimerHook (void);
+};
+
+#endif
diff --git a/src/kde/kde.cpp b/src/kde/kde.cpp
new file mode 100644
index 0000000..29517ab
--- /dev/null
+++ b/src/kde/kde.cpp
@@ -0,0 +1,204 @@
+#define __SP_KDE_CPP__
+
+/*
+ * KDE utilities for Sodipodi - adapted to TiEmu
+ *
+ * Authors:
+ *   Lauris Kaplinski <lauris at kaplinski.com>
+ *   Kevin Kofler <Kevin at tigcc.ticalc.org>
+ *
+ * Copyright (C) 2003-2006 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <config.h>
+
+#include <qtimer.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qeventloop.h> 
+#include <kapp.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <kfiledialog.h>
+#include <ktoolbar.h>
+#include <gtk/gtkmain.h>
+
+#include "kde.h"
+#include "kde-private.h"
+#include "dcop.h"
+
+#define SP_FOREIGN_FREQ 32
+#define SP_FOREIGN_MAX_ITER 4
+
+// Prevent infinite loop due to Qt->GTK->Qt calls
+static bool gtk_event_loop_called_from_qt = false;
+static bool SPKDEModal = FALSE;
+
+void
+SPKDEBridge::EventHook (void) {
+	if (SPKDEModal) {
+		int cdown = 0;
+		gtk_event_loop_called_from_qt = true;
+		while ((cdown++ < SP_FOREIGN_MAX_ITER) && gdk_events_pending ()) {
+			gtk_main_iteration_do (FALSE);
+		}
+		gtk_main_iteration_do (FALSE);
+		gtk_event_loop_called_from_qt = false;
+	}
+}
+
+void
+SPKDEBridge::TimerHook (void) {
+	int cdown = 10;
+	gtk_event_loop_called_from_qt = true;
+	while ((cdown++ < SP_FOREIGN_MAX_ITER) && gdk_events_pending ()) {
+		gtk_main_iteration_do (FALSE);
+	}
+	gtk_main_iteration_do (FALSE);
+	gtk_event_loop_called_from_qt = false;
+}
+
+static KApplication *KDESodipodi = NULL;
+static KAboutData *KDEAbout = NULL;
+static SPKDEBridge *Bridge = NULL;
+static TiEmuDCOP *DCOPInterface = NULL;
+
+static void
+sp_kde_gdk_event_handler (GdkEvent *event)
+{
+	if (SPKDEModal) {
+		// KDE widget is modal, filter events
+		switch (event->type) {
+		case GDK_NOTHING:
+		case GDK_DELETE:
+		case GDK_SCROLL:
+		case GDK_BUTTON_PRESS:
+		case GDK_2BUTTON_PRESS:
+		case GDK_3BUTTON_PRESS:
+		case GDK_BUTTON_RELEASE:
+		case GDK_KEY_PRESS:
+		case GDK_KEY_RELEASE:
+		case GDK_DRAG_STATUS:
+		case GDK_DRAG_ENTER:
+		case GDK_DRAG_LEAVE:
+		case GDK_DRAG_MOTION:
+		case GDK_DROP_START:
+		case GDK_DROP_FINISHED:
+			return;
+			break;
+		default:
+			break;
+		}
+	}
+	gtk_main_do_event (event);
+}
+
+void
+sp_kde_init (int argc, char **argv, const char *appName, const char *programName, const char *version, const char *shortDescription, const char *copyrightStatement, const char *homePageAddress, const char *bugsEmailAddress)
+{
+	KDEAbout = new KAboutData(appName, programName, version, shortDescription, KAboutData::License_GPL, copyrightStatement, NULL, homePageAddress, bugsEmailAddress);
+	KCmdLineArgs::init(argc, argv, KDEAbout);
+	KDESodipodi = new KApplication;
+	Bridge = new SPKDEBridge ("KDE Bridge");
+	DCOPInterface = new TiEmuDCOP ();
+
+	QObject::connect (KDESodipodi, SIGNAL (guiThreadAwake ()), Bridge, SLOT (EventHook ()));
+
+	gdk_event_handler_set ((GdkEventFunc) sp_kde_gdk_event_handler, NULL, NULL);
+}
+
+void
+sp_kde_finish (void)
+{
+	delete DCOPInterface;
+	delete Bridge;
+	delete KDESodipodi;
+	delete KDEAbout;
+}
+
+char *
+sp_kde_get_open_filename (gchar *dir, gchar *filter, gchar *title)
+{
+	QString fileName;
+
+	QTimer timer;
+	QObject::connect (&timer, SIGNAL (timeout ()), Bridge, SLOT (TimerHook ()));
+	timer.changeInterval (1000 / SP_FOREIGN_FREQ);
+	SPKDEModal = TRUE;
+
+	fileName = KFileDialog::getOpenFileName (QString::fromLocal8Bit((const char *) dir),
+						 QString::fromLocal8Bit((const char *) filter),
+						 NULL,
+						 QString::fromUtf8((const char *) title));
+
+	SPKDEModal = FALSE;
+
+	if (fileName.isEmpty())
+		return NULL;
+
+	return g_strdup (fileName.local8Bit());
+}
+
+char **
+sp_kde_get_open_filenames (gchar *dir, gchar *filter, gchar *title)
+{
+	QStringList fileNames;
+	char **result, **p;
+
+	QTimer timer;
+	QObject::connect (&timer, SIGNAL (timeout ()), Bridge, SLOT (TimerHook ()));
+	timer.changeInterval (1000 / SP_FOREIGN_FREQ);
+	SPKDEModal = TRUE;
+
+	fileNames = KFileDialog::getOpenFileNames (QString::fromLocal8Bit((const char *) dir),
+						   QString::fromLocal8Bit((const char *) filter),
+						   NULL,
+						   QString::fromUtf8((const char *) title));
+
+	SPKDEModal = FALSE;
+
+	if (fileNames.isEmpty())
+		return NULL;
+
+	p = result = (char **) g_malloc ((fileNames.count() + 1) * sizeof(char *));
+	for (QStringList::Iterator it = fileNames.begin(); it != fileNames.end(); ++it) {
+		*(p++) = g_strdup ((*it).local8Bit());
+	}
+	*p = NULL;
+
+	return result;
+}
+
+char *
+sp_kde_get_write_filename (gchar *dir, gchar *filter, gchar *title)
+{
+	QString fileName;
+
+	QTimer timer;
+	QObject::connect (&timer, SIGNAL (timeout ()), Bridge, SLOT (TimerHook ()));
+	timer.changeInterval (1000 / SP_FOREIGN_FREQ);
+	SPKDEModal = TRUE;
+
+	fileName = KFileDialog::getSaveFileName (QString::fromLocal8Bit((const char *) dir),
+						 QString::fromLocal8Bit((const char *) filter),
+						 NULL,
+						 QString::fromUtf8((const char *) title));
+
+	SPKDEModal = FALSE;
+
+	if (fileName.isEmpty())
+		return NULL;
+
+	return g_strdup (fileName.local8Bit());
+}
+
+gint
+sp_kde_process_qt_events(gpointer data)
+{
+	if (!gtk_event_loop_called_from_qt)
+		QApplication::eventLoop()->processEvents(QEventLoop::AllEvents, 1);
+	return TRUE;
+}
diff --git a/src/kde/kde.h b/src/kde/kde.h
new file mode 100644
index 0000000..2f957b2
--- /dev/null
+++ b/src/kde/kde.h
@@ -0,0 +1,34 @@
+#ifndef __SP_KDE_H__
+#define __SP_KDE_H__
+
+/*
+ * KDE utilities for Sodipodi - adapted to TiEmu
+ *
+ * Authors:
+ *   Lauris Kaplinski <lauris at kaplinski.com>
+ *   Kevin Kofler <Kevin at tigcc.ticalc.org>
+ *
+ * Copyright (C) 2003-2006 Authors
+ * $Id$
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+void sp_kde_init (int argc, char **argv, const char *appName, const char *programName, const char *version, const char *shortDescription, const char *copyrightStatement, const char *homePageAddress, const char *bugsEmailAddress);
+void sp_kde_finish (void);
+
+char *sp_kde_get_open_filename (gchar *dir, gchar *filter, gchar *title);
+char **sp_kde_get_open_filenames (gchar *dir, gchar *filter, gchar *title);
+char *sp_kde_get_write_filename (gchar *dir, gchar *filter, gchar *title);
+
+char *sp_kde_get_save_filename (unsigned char *dir, unsigned int *spns);
+
+gint sp_kde_process_qt_events(gpointer data);
+
+G_END_DECLS
+
+#endif
diff --git a/src/misc/cmdline.c b/src/misc/cmdline.c
new file mode 100644
index 0000000..6eacb94
--- /dev/null
+++ b/src/misc/cmdline.c
@@ -0,0 +1,283 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: cmdline.c 2630 2007-08-23 14:13:14Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *  Copyright (c) 2006-2007, Kevin Kofler and Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "intl.h"
+#include "struct.h"
+#include "version.h"
+#include "ti68k_def.h"
+#include "ti68k_int.h"
+#include "tie_error.h"
+
+#ifdef __WIN32__
+#include "registry.h"
+#include "oleaut.h"
+#endif
+
+char* file_to_send = NULL;
+
+/*
+  Display the program version
+*/
+int tiemu_version(void)
+{
+	fprintf(stdout, "TiEmu 3 - Version %s\n", TIEMU_VERSION);
+	fprintf(stdout, "  (C) Romain Lievin & Thomas Corvazier  2000-2001\n");
+	fprintf(stdout, "  (C) Romain Lievin 2001-2003\n");
+	fprintf(stdout, "  (C) Julien Blache 2003\n");
+	fprintf(stdout, "  (C) Romain Lievin 2004-2005\n");
+	fprintf(stdout, "  (C) Romain Lievin & Kevin Kofler 2005-2007\n");
+	fprintf(stdout, "  (C) Peter Fernandes 2007\n");
+	fprintf(stdout, _("THIS PROGRAM COMES WITH ABSOLUTELY NO WARRANTY\n"));
+	fprintf(stdout, _("PLEASE READ THE DOCUMENTATION FOR DETAILS\n"));
+
+	return 0;
+}
+
+/*
+  Display a short help
+*/
+int help(void)
+{
+	fprintf(stdout, "\n");
+
+	tiemu_version();
+
+	fprintf(stdout, "usage: tiemu [-options] [image]\n");
+	fprintf(stdout, "\n");
+	fprintf(stdout, "-h, --help     display this information page and exit\n");
+	fprintf(stdout, "-v, --version  display the version information and exit\n");
+	fprintf(stdout, "--import       import ROM or TIB into repository without loading\n");
+	fprintf(stdout, "-rom=          ROM dump to convert and load (compat)\n");
+	fprintf(stdout, "-tib=          TIB or FLASH upgrade to convert and load (compat)\n");
+	fprintf(stdout, "-sav=          state image to load (compat)\n");
+	fprintf(stdout, "-send=			send specified file to TiEmu\n");
+	fprintf(stdout, "\n");
+	fprintf(stdout, "filename       can be ROM, TIB or SAV file to load\n");
+	fprintf(stdout, "\n");
+
+	exit(0);
+	return 0;
+}
+
+#define strexact(p1,p2) (!strcmp((p1),(p2)))
+
+/*
+  Scan the command line, extract arguments and init variables
+*/
+int scan_cmdline(int argc, char **argv)
+{
+	int cnt;
+	char *p;
+	char msg[80];
+
+	int import = 0;
+	char *rom = NULL;
+	char *tib = NULL;
+	char *sav = NULL;
+	char *fn = NULL;
+
+	//for(cnt = 0; cnt < argc; cnt++)
+	//	fprintf(stdout, "%i: [%s]\n", cnt, argv[cnt]);
+  
+	/* Parses list of arguments */
+	for(cnt=1; cnt<argc; cnt++) 
+	{
+		p = argv[cnt];
+
+#ifdef __WIN32__
+		if(!stricmp(p, "/RegServer") || !stricmp(p, "-RegServer")
+		   || !stricmp(p, "--RegServer")) {
+			char *p;
+			ITypeLib *tlb;
+			char szModule[512];
+			wchar_t tlbname[512];
+			HMODULE hModule = GetModuleHandle(NULL);
+			DWORD dwResult = GetModuleFileName(hModule, szModule, sizeof(szModule));
+
+			if (!dwResult) exit(1);
+			p = szModule + strlen(szModule) - 4;
+
+			if (stricmp(p,".exe")) exit(1);
+			strcpy(++p,"tlb");
+			mbstowcs(tlbname, szModule, strlen(szModule)+1);
+
+			if (RegisterServer(&CLSID_TiEmuOLE,
+			                   "TiEmu OLE Interface",
+			                   "TiEmu.TiEmuOLE",
+			                   "TiEmu.TiEmuOLE.1", NULL)
+			    || LoadTypeLib(tlbname, &tlb))
+				exit(1);
+			else {
+				if (RegisterTypeLib(tlb, tlbname, NULL)) {
+					tlb->lpVtbl->Release(tlb);
+					exit(1);
+				} else {
+					tlb->lpVtbl->Release(tlb);
+					fprintf(stdout, "TiEmu OLE Interface successfully registered.");
+					exit(0);
+				}
+			}
+		}
+
+		if(!stricmp(p, "/UnregServer") || !stricmp(p, "-UnregServer")
+		   || !stricmp(p, "--UnregServer")) {
+			if (UnregisterServer(&CLSID_TiEmuOLE, "TiEmu.TiEmuOLE",
+			                     "TiEmu.TiEmuOLE.1")
+			    || UnRegisterTypeLib(&LIBID_TiEmuOLELib, 1, 0, 0,
+			                         SYS_WIN32))
+				exit(1);
+			else {
+				fprintf(stdout, "TiEmu OLE Interface successfully unregistered.");
+				exit(0);
+			}
+		}
+		if(!stricmp(p, "/Embedding") || !stricmp(p, "-Embedding")
+		   || !stricmp(p, "--Embedding")) {
+			// VB runs it with this option.
+			continue;
+		}
+#endif
+
+		if(*p == '-') 
+		{
+			// a long option (like --help)
+			p++;
+		} else 
+		{
+			fn = g_strdup(p);
+			// a filename
+			//g_free(params.rom_file);
+			//params.rom_file = g_strdup(p);
+		}
+		strcpy(msg, p);
+
+		if(strexact(msg, "-import")) 
+			import = !0;
+
+		if(strstr(msg, "rom="))
+			rom = g_strdup(msg + 4);
+
+		if(strstr(msg, "tib="))
+			tib = g_strdup(msg + 4);
+
+		if(strstr(msg, "sav=")) 
+			sav = g_strdup(msg + 4);
+
+		if(strstr(msg, "send="))
+			file_to_send = g_strdup(msg + 5);
+	      
+		if(strexact(msg, "-help") || strexact(msg, "h")) 
+			help();
+
+		if(strexact(msg, "-version") || strexact(msg, "v")) 
+			exit(0);
+	}
+
+	/* */
+	if(fn && ti68k_is_a_rom_file(fn))
+		rom = fn;
+	else if(fn && ti68k_is_a_tib_file(fn))
+		tib = fn;
+	else if(fn && ti68k_is_a_sav_file(fn))
+		sav = fn;
+
+	/* And process them */
+	if(rom && ti68k_is_a_rom_file(rom))
+	{
+		gchar *dstname;
+
+		int err = ti68k_convert_rom_to_image(rom, inst_paths.img_dir, &dstname);
+		if(err) 
+		{
+			tiemu_err(err, NULL);
+			exit(-1);
+		}
+
+		if(import)
+			exit(0);
+
+		g_free(params.rom_file);
+		params.rom_file = dstname;
+		g_free(params.sav_file);
+		params.sav_file = g_strdup("");
+	}
+
+	if(tib && ti68k_is_a_tib_file(tib))
+	{
+		gchar *dstname;
+
+		int err = ti68k_convert_tib_to_image(tib, inst_paths.img_dir, &dstname, -1);
+		if(err) 
+		{
+			tiemu_err(err, NULL);
+			exit(-1);
+		}
+
+		if(import)
+			exit(0);
+
+		g_free(params.rom_file);
+		params.rom_file = dstname;
+		g_free(params.sav_file);
+		params.sav_file = g_strdup("");
+	 }
+
+	if(sav && !fn)						// for compatibility
+	{
+		g_free(params.sav_file);
+		params.sav_file = g_strdup(sav);
+	}
+
+	if(sav && ti68k_is_a_sav_file(sav) && fn)
+	{
+		gchar *rf, *tf;
+
+		ti68k_state_parse(sav, &rf, &tf);
+		
+		if(!ti68k_is_a_img_file(rf))
+			return 0;
+
+		g_free(params.rom_file);
+		params.rom_file = rf;
+
+        g_free(params.tib_file);
+		params.tib_file = tf;
+
+		g_free(params.sav_file);
+		params.sav_file = g_strdup(sav);
+	}
+
+	return 0;
+}
diff --git a/src/misc/cmdline.h b/src/misc/cmdline.h
new file mode 100644
index 0000000..064be16
--- /dev/null
+++ b/src/misc/cmdline.h
@@ -0,0 +1,35 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: cmdline.h 1695 2005-08-26 21:05:37Z kevinkofler $ */
+
+/*  TiEmu - a TI emulator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __MISC_H__
+#define __MISC_H__
+
+int help(void);
+int tiemu_version(void);
+int scan_cmdline(int argc, char **argv);
+
+#endif
+
diff --git a/src/misc/extern.h b/src/misc/extern.h
new file mode 100644
index 0000000..38337ec
--- /dev/null
+++ b/src/misc/extern.h
@@ -0,0 +1,50 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: extern.h 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef EXTERN_H
+#define EXTERN_H
+
+#include <gtk/gtk.h>
+
+#include "struct.h"
+
+/* Some linked-list for breakpoints */
+extern GList *bkpt_address_list;
+extern GList *bkpt_access_list;
+extern GList *bkpt_vector_list;
+extern GList *bkpt_trap_list;
+
+/* Used widget */
+extern GtkWidget *debugger_dbox;
+extern GtkWidget *code_clist;
+extern GtkWidget *reg_text;
+extern GtkWidget *data_bkpt_dbox;
+
+extern gint selected_row;
+extern gint data_bkpt_selected_row;
+extern gint bkpt_encountered;
+
+#endif
diff --git a/src/misc/files.c b/src/misc/files.c
new file mode 100644
index 0000000..237f68c
--- /dev/null
+++ b/src/misc/files.c
@@ -0,0 +1,222 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: files.c 2385 2007-03-12 21:04:20Z roms $ */
+
+/*  TiLP - Ti Linking Program
+ *  Copyright (C) 1999-2005  Romain Lievin
+ *  Copyright (c) 2005, Romain Li�vin (tweaked for TiEmu)
+ *
+ *  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.
+ */
+
+/*
+	This file contains utility functions about files management.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <time.h>
+#ifdef __WIN32__
+#include <windows.h>
+#endif
+
+#include <glib.h>
+#include <glib/gstdio.h>
+
+#ifdef _MSC_VER
+# include "../../build/msvc/dirent.h"	// for S_ISDIR use
+#endif
+
+#include "dboxes.h"
+#define _(x)	(x)
+
+/* File operations */
+
+#ifndef __WIN32__
+int tiemu_file_copy(const char *src, const char *dst)
+{
+	FILE *in, *out;
+	int c;
+
+	if ((in = fopen(src, "rb")) == NULL) 
+	{
+		return -1;
+	}
+
+	if ((out = fopen(dst, "wb")) == NULL) 
+	{
+		return -2;
+	}
+
+	while (!feof(in)) 
+	{
+		c = fgetc(in);
+		if (feof(in))
+			break;
+		fputc(c, out);
+	}
+
+	fclose(in);
+	fclose(out);
+
+	return 0;
+}
+
+#else				
+
+int tiemu_file_copy(const char *src, const char *dst)
+{
+	if (!CopyFile(src, dst, FALSE))
+		return -1;
+
+	return 0;
+}
+#endif				
+
+int tiemu_file_delete(const char *f)
+{
+	if(g_unlink(f) < 0)
+	{
+		msg_box1(_("Information"), _("Unable to remove the file!"));
+		return -1;
+	}
+
+	return 0;
+}
+
+int tiemu_file_move(const char *src, const char *dst)
+{
+	if(tiemu_file_copy(src, dst) < 0)
+	//if(g_rename(src, dst) < 0)
+	{
+		msg_box1(_("Information"), _("Unable to move file.\n\n"));
+		return -1;
+	}
+	tiemu_file_delete(src);
+
+	return 0;
+}
+
+int tiemu_file_mkdir(const char *pathname)
+{
+#ifdef __WIN32__
+	if(g_mkdir(pathname, S_IRWXU) < 0)
+#else
+	if(g_mkdir(pathname, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0)
+#endif
+	{
+		msg_box1(_("Information"), _("Unable to create the directory.\n\n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+int tiemu_file_exist(const char* filename)
+{
+	return !access(filename, F_OK);
+}
+
+/* 
+   Check for file existence. If file already exists, ask for an
+   action (skip, overwrite or rename).
+   Return 0 if skipped. 
+*/
+int tiemu_file_check(const char *src, char **dst)
+{
+	int ret;
+	char buffer[256];
+	char *dirname;
+	*dst = NULL;
+
+	if (1) 
+	{
+		if (access(src, F_OK) == 0) 
+		{
+			sprintf(buffer, _("The file %s already exists.\nOverwrite?"), src);
+			ret =
+			    msg_box3(_("Warning"), buffer,
+					_("Overwrite "), _("Rename "), _("Skip "));
+
+			switch (ret) 
+			{
+			case BUTTON1:
+				*dst = g_strdup(src);
+				return !0;
+				break;
+			case BUTTON2:
+				dirname =
+				    msg_entry(_("Rename the file"),
+						   _("New name: "), src);
+					if (dirname == NULL)
+						return 0;
+					*dst = g_strdup(dirname);
+					g_free(dirname);
+				return !0;
+				break;
+			case BUTTON3:
+				return 0;
+				break;
+			default:
+				return 0;
+				break;
+			}
+		} 
+		else 
+		{
+			*dst = g_strdup(src);
+			return !0;
+		}
+	} 
+	else 
+	{
+		*dst = g_strdup(src);
+		return !0;
+	}
+
+	return !0;
+}
+
+
+/*
+  Try and move a file. If file already exists, ask for an action
+  (skip, overwrite or rename)
+  Return 0 if skipped. 
+*/
+int tiemu_file_move_with_check(const char *src, const char *dst)
+{
+	char *dst2;
+
+	if (tiemu_file_check(dst, &dst2)) 
+	{
+		if (tiemu_file_move(src, dst2)) 
+		{
+			msg_box1(_("Error"), _("Unable to move the temporary file.\n"));
+			g_free(dst2);
+			return 0;
+		}
+	} 
+	else 
+	{
+		g_free(dst2);
+		return 0;
+	}
+	g_free(dst2);
+
+	return !0;
+}
diff --git a/src/misc/files.h b/src/misc/files.h
new file mode 100644
index 0000000..edd96b1
--- /dev/null
+++ b/src/misc/files.h
@@ -0,0 +1,36 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: files.h 1789 2005-09-20 20:06:46Z roms $ */
+
+/*  TiLP - Ti Linking Program
+ *  Copyright (C) 1999-2005  Romain Lievin
+ *  Copyright (c) 2005, Romain Li�vin (tweaked for TiEmu)
+ *
+ *  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.
+ */
+
+#ifndef __TILP_FILES__
+#define __TILP_FILES__
+
+int tiemu_file_copy(const char *src, const char *dst);
+int tiemu_file_move(const char *src, const char *dst);
+int tiemu_file_delete(const char *f);
+int tiemu_file_mkdir(const char *pathname);
+int tiemu_file_exist(const char* filename);
+int tiemu_file_check(const char *src, char **dst);
+int tiemu_file_move_with_check(const char *src, const char *dst);
+int tiemu_file_chdir(const char *path);
+#define tiemu_chdir	tiemu_file_chdir
+
+#endif
diff --git a/src/misc/gettimeofday.h b/src/misc/gettimeofday.h
new file mode 100644
index 0000000..d1978df
--- /dev/null
+++ b/src/misc/gettimeofday.h
@@ -0,0 +1,30 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: gettimeofday.h 2559 2007-06-24 17:33:54Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2007 Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef _WIN32
+#ifndef _MSC_VER
+#include <winsock2.h> /* struct timeval */
+#endif
+int gettimeofday(struct timeval *__p, void *__t);
+#else
+#include <sys/time.h>
+#endif
diff --git a/src/misc/gettimeofday_win32_impl.h b/src/misc/gettimeofday_win32_impl.h
new file mode 100644
index 0000000..c66e320
--- /dev/null
+++ b/src/misc/gettimeofday_win32_impl.h
@@ -0,0 +1,50 @@
+/* Copied from kdewin32
+   Copyright (C) 2003-2005 Jaroslaw Staniek <js at iidea.pl>
+   Copyright (C) 2005 Christian Ehrlicher <Ch.Ehrlicher at gmx.de>
+   Copyright (C) 2006 Ralf Habacker <ralf.habacker at freenet.de>
+
+   Modified for TiEmu
+   Copyright (C) 2007 Kevin Kofler
+
+   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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <winsock2.h> /* struct timeval */
+#include <windows.h>
+
+/* support ancient M$VC versions -- Kevin Kofler */
+#ifdef _MSC_VER
+#define GETTIMEOFDAY_INT64 __int64
+#define KDE_SECONDS_SINCE_1601  11644473600I64
+#define KDE_USEC_IN_SEC         1000000I64
+#else
+#define GETTIMEOFDAY_INT64 long long
+#define KDE_SECONDS_SINCE_1601  11644473600LL
+#define KDE_USEC_IN_SEC         1000000LL
+#endif
+
+int gettimeofday(struct timeval *__p, void *__t)
+{
+        union {
+                unsigned GETTIMEOFDAY_INT64 ns100; /*time since 1 Jan 1601 in 100ns units */
+                FILETIME ft;
+        } now;
+        
+        GetSystemTimeAsFileTime (&now.ft);
+        __p->tv_usec = (long) ((now.ns100 / (GETTIMEOFDAY_INT64)10) % KDE_USEC_IN_SEC);
+        __p->tv_sec  = (long)(((now.ns100 / (GETTIMEOFDAY_INT64)10 ) / KDE_USEC_IN_SEC) - KDE_SECONDS_SINCE_1601);
+        
+        return (0); 
+}
diff --git a/src/misc/intl.h b/src/misc/intl.h
new file mode 100644
index 0000000..6bb4b31
--- /dev/null
+++ b/src/misc/intl.h
@@ -0,0 +1,80 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: intl.h 2362 2007-02-25 08:47:35Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  Contains the right headers for the internationalization library
+*/
+
+#ifndef __TIEMU_INTL__
+#define __TIEMU_INTL__
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+#  include <libintl.h>
+#  undef _
+#  define _(String) dgettext (PACKAGE, String)
+#  ifdef gettext_noop
+#    define N_(String) gettext_noop (String)
+#  else
+#    define N_(String) (String)
+#  endif
+#else
+#  define textdomain(String) (String)
+#  define gettext(String) (String)
+#  define dgettext(Domain,Message) (Message)
+#  define dcgettext(Domain,Message,Type) (Message)
+#  define bindtextdomain(Domain,Directory) (Domain)
+#  define _(String) (String)
+#  define N_(String) (String)
+#endif
+
+/* Taken from Gimp Win32 */
+/*
+#define INIT_LOCALE( domain )	G_STMT_START{	\
+	gtk_set_locale ();			\
+	setlocale (LC_NUMERIC, "C");		\
+	bindtextdomain (domain, LOCALEDIR);	\
+	textdomain (domain);			\
+				}G_STMT_END
+*/
+
+#if defined(__WIN32__) && !defined(__MINGW32__)
+# undef PACKAGE
+# define PACKAGE   "tiemu3"     // name of package
+# define LOCALEDIR ""		// place of the translated file
+#endif
+
+#endif
+
diff --git a/src/misc/logging.c b/src/misc/logging.c
new file mode 100644
index 0000000..adb9468
--- /dev/null
+++ b/src/misc/logging.c
@@ -0,0 +1,77 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: printl.c 667 2004-05-03 11:45:01Z tijl $ */
+
+/*  tiemu - Tiemu Is an EMUlator
+ *  Copyright (C) 2007 Romain Lievin
+ *
+ *  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.
+ */
+
+/*
+	This unit contains logging functions for internal use.
+*/
+
+#include <glib.h>
+#include <string.h>
+
+#include "logging.h"
+
+void tiemu_debug (const gchar *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  g_logv (LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, args);
+  va_end (args);
+}
+
+void tiemu_info (const gchar *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  g_logv (LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args);
+  va_end (args);
+}
+
+void tiemu_message (const gchar *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  g_logv (LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args);
+  va_end (args);
+}
+
+void tiemu_warning (const gchar *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  g_logv (LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args);
+  va_end (args);
+}
+
+void tiemu_critical (const gchar *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  g_logv (LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args);
+  va_end (args);
+}
+
+void tiemu_error (const gchar *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  g_logv (LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
+  va_end (args);
+}
diff --git a/src/misc/logging.h b/src/misc/logging.h
new file mode 100644
index 0000000..a0e1657
--- /dev/null
+++ b/src/misc/logging.h
@@ -0,0 +1,42 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: print.h 522 2004-04-08 10:12:55Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *  Copyright (C) 2007  Romain Lievin
+ *
+ *  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.
+ */
+
+/*
+	Domain name logging.
+*/
+
+#ifndef __TIEMU_LOGGING__
+#define __TIEMU_LOGGING__
+
+#include <glib.h>
+
+#include "intl.h"
+
+#define LOG_DOMAIN	"tiemu"
+
+void tiemu_debug(const gchar *format, ...);
+void tiemu_info(const gchar *format, ...);
+void tiemu_message(const gchar *format, ...);
+void tiemu_warning(const gchar *format, ...);
+void tiemu_critical(const gchar *format, ...);
+void tiemu_error(const gchar *format, ...);
+
+#endif
diff --git a/src/misc/paths.c b/src/misc/paths.c
new file mode 100644
index 0000000..4cd7400
--- /dev/null
+++ b/src/misc/paths.c
@@ -0,0 +1,201 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: paths.c 2268 2006-11-06 17:18:51Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *  Copyright (c) 2005, Christian Walther (patches for Mac OS-X port)
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+	Platform independant paths
+*/
+
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#ifdef __WIN32__
+#include <windows.h>
+#include <direct.h> // _mkdir
+#endif
+#include <unistd.h>
+
+#include "struct.h"
+#include "paths.h"
+
+
+TiemuInstPaths inst_paths;      // installation paths
+
+
+/*
+	Called by TiEmu at startup for initializing platform dependant paths.
+*/
+#if defined(__LINUX__) || defined(__BSD__) || defined(__MACOSX__)
+static void init_linux_paths(void)
+{
+	gchar *tmp;
+
+	// set base dir
+	inst_paths.base_dir =
+	    g_strconcat(SHARE_DIR, G_DIR_SEPARATOR_S, NULL);
+
+	// set others
+	inst_paths.pixmap_dir =
+	    g_strconcat(inst_paths.base_dir, "pixmaps/", NULL);
+	inst_paths.help_dir =
+	    g_strconcat(inst_paths.base_dir, "help/", NULL);
+	inst_paths.manpage_dir = 
+        g_strconcat(inst_paths.base_dir, "", NULL);
+	inst_paths.skin_dir =
+	    g_strconcat(inst_paths.base_dir, "skins/", NULL);
+	inst_paths.glade_dir =
+	    g_strconcat(inst_paths.base_dir, "glade/", NULL);
+	inst_paths.home_dir =
+		g_strconcat(g_get_home_dir(), "/", NULL);
+	inst_paths.img_dir = 
+        g_strconcat(inst_paths.home_dir, CONF_DIR, "images/", NULL);
+	inst_paths.rom_dir =
+		g_strconcat(inst_paths.base_dir, "pedrom/", NULL);
+	inst_paths.misc_dir =
+		g_strconcat(inst_paths.base_dir, "misc/", NULL);
+	inst_paths.screen_dir =
+		g_strconcat(inst_paths.home_dir, CONF_DIR, "screenshots/", NULL);
+
+	// create conf folder (~/.tiemu/)
+	tmp = g_strconcat(inst_paths.home_dir, CONF_DIR, NULL);
+	mkdir(tmp, 0777);
+	g_free(tmp);
+
+	// create image repository
+	mkdir(inst_paths.img_dir, 0777);
+
+	// create screen repository
+	mkdir(inst_paths.screen_dir, 0777);
+
+	/* bintextdomain(PACKAGE, "/usr/share/locale"); ->
+	   '/usr/share/locale/  fr/LC_MESSAGES/tilp.mo' */
+#ifdef ENABLE_NLS
+	inst_paths.locale_dir = g_strconcat(LOCALEDIR, "/", NULL);
+#endif				/*  */
+
+#if 0 /* This breaks Insight's path detection when running TiEmu from a relative
+         path. */
+	// on LINUX systems, HOME directory by default for security reasons
+	chdir(inst_paths.home_dir);
+#endif /* 0 */
+}
+#endif				/*  */
+
+#define MINGW_REL	"share\\tiemu"
+
+/*
+	Same for Win32
+*/
+#if defined(__WIN32__)
+static void init_win32_paths(void)
+{
+	HMODULE hModule;
+	DWORD dWord;
+	char *sBuffer;
+	gchar *dirname;
+	gchar *basename;
+
+	// Init the path for the Windows version by getting the 
+	// executable location.
+	hModule = GetModuleHandle("tiemu.exe");
+	sBuffer = (char *) malloc(4096 * sizeof(char));
+	dWord = GetModuleFileName(hModule, sBuffer, 4096);
+	dirname = g_path_get_dirname(sBuffer);
+	basename = g_path_get_basename(dirname);
+
+	// modify exec path like '/target/bin' into '/target/share/tiemu' if we 
+	// are running an Msys path (MinGW). Otherwise, do nothing if we are running from a
+	// local path (MSVC & InnoSetup)
+	if((strlen(basename) == 3) && !g_strcasecmp(basename, "bin"))
+	{
+		gchar *token;
+
+		dirname = g_realloc(dirname, strlen(dirname) + strlen(MINGW_REL) + 1);
+		token = dirname + strlen(dirname) - 3;
+		strcpy(token, MINGW_REL);
+	}	
+
+	// set base dir	
+	inst_paths.base_dir = g_strconcat(dirname, "\\", NULL);
+	free(sBuffer);  // malloc -> free
+	g_free(dirname);
+	g_free(basename);
+
+	// set others
+	inst_paths.pixmap_dir =
+	    g_strconcat(inst_paths.base_dir, "pixmaps\\", NULL);
+	inst_paths.help_dir =
+	    g_strconcat(inst_paths.base_dir, "help\\", NULL);
+	inst_paths.manpage_dir =
+	    g_strconcat(inst_paths.base_dir, "", NULL);
+	inst_paths.skin_dir =
+	    g_strconcat(inst_paths.base_dir, "skins\\", NULL);
+	inst_paths.glade_dir =
+	    g_strconcat(inst_paths.base_dir, "glade\\", NULL);
+	inst_paths.home_dir = 
+	    g_strconcat(inst_paths.base_dir, "", NULL);
+	inst_paths.img_dir = 
+        g_strconcat(inst_paths.base_dir, "images\\", NULL);
+	inst_paths.rom_dir =
+		g_strconcat(inst_paths.base_dir, "pedrom\\", NULL);
+	inst_paths.misc_dir =
+		g_strconcat(inst_paths.base_dir, "misc\\", NULL);
+	inst_paths.screen_dir =
+		g_strconcat(inst_paths.base_dir, "screenshots\\", NULL);
+
+	// create image repository
+	_mkdir(inst_paths.img_dir);
+
+#ifdef ENABLE_NLS
+	inst_paths.locale_dir =
+	    g_strconcat(inst_paths.base_dir, "locale\\", NULL);
+#endif				/*  */
+#if 0 /* This breaks Insight's path detection when running TiEmu from a relative
+         path, at least it does on *nix. */
+	// on WIN32 systems, local by default
+	_chdir(inst_paths.home_dir);
+#endif /* 0 */
+}
+#endif				/*  */
+int initialize_paths(void)
+{
+#ifdef __WIN32__
+	init_win32_paths();
+#else
+	init_linux_paths();
+#endif
+	return 0;
+}
+
+const char *tilp_paths_build_glade(const char *name)
+{
+	static char *path = NULL;
+	
+	g_free(path);
+	path = g_strconcat(inst_paths.glade_dir, name, NULL);
+	
+	return path;
+}
diff --git a/src/misc/paths.h b/src/misc/paths.h
new file mode 100644
index 0000000..bc226ca
--- /dev/null
+++ b/src/misc/paths.h
@@ -0,0 +1,88 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: paths.h 2178 2006-07-30 21:32:36Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2002, Romain Lievin, Julien Blache
+ *  Copyright (c) 2003-2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __PATHS_H__
+#define __PATHS_H__
+
+/* 
+   Platform independant paths
+*/
+
+#if defined(__LINUX__) || defined(__MACOSX__)
+# define CONF_DIR   	".tiemu/"
+# define INI_FILE    	"tiemu.ini"
+# define CACHE_FILE 	"img_list.txt"
+# define LOG_FILE 		"/tmp/tiemu.log"
+#elif defined(__WIN32__)
+# define CONF_DIR   	""
+# define INI_FILE    	"tiemu.ini"
+# define CACHE_FILE 	"img_list.txt"
+# define LOG_FILE 		"C:\\tiemu.log"
+#else
+# define CONF_DIR   	".tiemu/"
+# define INI_FILE    	"init"
+# define CACHE_FILE 	"img_list.txt"
+# define LOG_FILE 		"tiemu.log"
+#endif
+
+#if defined(__WIN32__)
+#undef SHARE_DIR
+#define SHARE_DIR "" // local path
+#endif
+
+/*
+  Portable installation paths
+*/
+typedef struct
+{
+  char *base_dir;		// Windows directory (determined at startup)
+  char *locale_dir;		// locale
+  char *manpage_dir;	// manpages
+  char *help_dir;		// help files
+  char *pixmap_dir;		// pixmaps
+  char *img_dir;		// images
+  char *skin_dir;		// skins
+  char *glade_dir;		// GUI files
+  char *home_dir;		// $HOME
+  char *rom_dir;		// PedRom tib location
+  char *misc_dir;		// resource files
+  char *screen_dir;		// screenshots
+
+  char current_dir[1024];	// current working directory
+} TiemuInstPaths;
+
+extern TiemuInstPaths inst_paths;
+
+/*
+  Functions
+*/
+
+//int build_home_path(char **path, char *fileaname);
+
+int initialize_paths(void);
+
+const char *tilp_paths_build_glade(const char *name);
+
+#endif
+
diff --git a/src/misc/rcfile.c b/src/misc/rcfile.c
new file mode 100644
index 0000000..e76c772
--- /dev/null
+++ b/src/misc/rcfile.c
@@ -0,0 +1,980 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: rcfile.c 2802 2009-01-03 08:44:48Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005-2007, Romain Li�vin, Kevin Kofler
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+  This unit manage configurable options and config file
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+
+#include "intl.h"
+#include "tilibs.h"
+#include "paths.h"
+#include "struct.h"
+#include "version.h"
+#include "paths.h"
+#include "files.h"
+#include "ti68k_int.h"
+#include "screenshot.h"
+#include "logging.h"
+
+static char *rc_file; 
+
+#define MAXCHARS 256
+
+#define DEFAULT_FONT_NAME	"Courier"
+
+/*
+  Return the path where the config file is stored
+*/
+int rcfile_get_path(char **path)
+{
+	*path = g_strconcat(inst_paths.home_dir, 
+			    G_DIR_SEPARATOR_S, CONF_DIR, 
+			    G_DIR_SEPARATOR_S, INI_FILE, NULL); 
+	return 0;
+}
+
+/* 
+   Print an error msg 
+*/
+static void stop (int line)
+{
+	tiemu_warning(_("Configuration file error at line %i."), line);
+}
+
+/*
+  Find a token in a string and returns pointer after token
+*/
+static char *find_str(char *s, const char *t)
+{
+	char *p = strstr(s, t);
+
+	if(p==NULL) 
+		return NULL;
+	else 
+		return p+strlen(t);
+}
+
+/* Chech whether a RC file exists */
+int rcfile_exist(void)
+{
+	int result;
+
+	rcfile_get_path(&rc_file);
+  
+	result = !access(rc_file, F_OK);
+	g_free(rc_file);
+	return result;
+}
+
+/* Delete the RC file */
+int rcfile_delete(void)
+{
+	int result;
+
+	rcfile_get_path(&rc_file);
+
+	result = unlink(rc_file);
+	g_free(rc_file);
+	return result;
+}
+
+/* Return TiLP version number */
+int rcfile_get_version(char *version)
+{
+	FILE *txt;
+	char buffer[256];
+	int i = 0;
+	char *p;
+
+	strcpy(version, "");
+	if (rcfile_exist() == 0) {
+		return -1;
+	}
+
+	rcfile_get_path(&rc_file);
+
+	txt = fopen(rc_file, "rt");
+	g_free(rc_file);
+	if (txt == NULL)
+		return -1;
+
+	for (i = 0; i < 5; i++)
+		if (!fgets(buffer, 256, txt))
+		{
+			fclose(txt);
+			return -1;
+		}
+
+	p = strchr(buffer, '=');
+	if (p == NULL)
+	{
+		fclose(txt);
+		return -1;
+	}
+
+	strcpy(version, ++p);
+
+	p = strchr(version, '\r');
+	if (p)
+		*p = '\0';
+
+	p = strchr(version, '\n');
+	if (p)
+		*p = '\0';
+
+	if (fclose(txt))
+		return -1;
+
+	return 0;
+}
+
+/* 
+   Read the RC file and configure the corresponding variables 
+*/
+void rcfile_read(void)
+{
+	FILE *txt;
+	char buffer[256];
+	char *p;
+	int l=0;
+
+	rcfile_get_path(&rc_file);
+
+	txt=fopen(rc_file, "rt");
+	g_free(rc_file);
+	if(txt == NULL) {
+		tiemu_info(_("Configuration file not found, use default values. You can create one by the 'File|Save config' command menu."));
+		return;
+	}
+
+	while(!feof(txt)) {
+		if (!fgets(buffer, 256, txt))
+			break;
+		l++;
+		buffer[strlen(buffer)-1]='\0';
+
+	if(!strcmp(buffer, "RC_END")) {
+	  fclose(txt);
+	  return;
+	}
+
+	if(buffer[0]=='#' || !strlen(buffer)) continue;
+      
+	/* Common part with TiLP: hardware section */
+	if ((p = find_str(buffer, "cable_model="))) 
+	{
+		linkp.cable_model = ticables_string_to_model(p);
+		continue;
+	}
+	
+	if ((p = find_str(buffer, "cable_port="))) 
+	{
+		linkp.cable_port = ticables_string_to_port(p);
+		continue;
+	}
+	
+	if ((p = find_str(buffer, "cable_timeout="))) 
+	{
+		sscanf(p, "%i", &(linkp.cable_timeout));
+		continue;
+	}
+	
+	if ((p = find_str(buffer, "cable_delay="))) {
+		sscanf(p, "%i", &(linkp.cable_delay));
+		continue;
+	}
+
+	if( (p=find_str(buffer, "qs_file=")) ) 
+	{
+	  g_free(options.qs_file);
+	  options.qs_file = g_strdup(p);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "qs_enabled=")) ) 
+	{
+	  sscanf(p, "%i", &(options.qs_enabled));
+	  continue;
+	}
+
+      /* GtkTiEmu specific part: emulator section */
+	if( (p=find_str(buffer, "rom_file=")) ) 
+	{
+	  g_free(params.rom_file);
+	  params.rom_file = g_strdup(p);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "img_file=")) ) 
+	{
+	  g_free(params.rom_file);
+	  params.rom_file = g_strdup(p);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "tib_file=")) )
+	{
+	  g_free(params.tib_file);
+	  params.tib_file = g_strdup(p);
+	  continue;
+	}
+
+    if( (p=find_str(buffer, "sav_file=")) )
+	{
+	  g_free(params.sav_file);
+	  params.sav_file = g_strdup(p);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "skin=")) ) 
+	{
+	  sscanf(p, "%i", &(options.skin));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "view_mode=")) )
+	{
+	  if(!strcmp(p, "normal")) options.view = VIEW_NORMAL;
+	  else if(!strcmp(p, "large")) options.view = VIEW_LARGE;
+	  else if(!strcmp(p, "full")) options.view = VIEW_FULL;
+	  else if(!strncmp(p, "custom", strlen("custom"))) 
+	  {
+		  //char *q;
+		  options.view = VIEW_CUSTOM;
+		  p=find_str(buffer, "view_mode=custom");
+		  /*q = strchr(p, ',');
+		  if(q) *q = '.';*/
+		  sscanf(p, " (%f)", &(options.scale));
+		  if(options.scale < 0.01)
+			  options.scale = 1.0;
+	  }
+	  else stop(l);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "cpu_rate=")) )
+	{
+	  sscanf(p, "%u", &(params.cpu_rate));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "hw_rate=")) )
+	{
+	  sscanf(p, "%u", &(params.hw_rate));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "lcd_rate=")) )
+	{
+	  sscanf(p, "%i", &(params.lcd_rate));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "hw_protect=")) )
+	{
+	  sscanf(p, "%i", &(params.hw_protect));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "img_format=")) )
+	{
+	  if(!strcmp(p, "jpg")) options2.format=IMG_JPG;
+	  else if(!strcmp(p, "png")) options2.format=IMG_PNG;
+	  else if(!strcmp(p, "ico")) options2.format=IMG_ICO;
+	  else if(!strcmp(p, "eps")) options2.format=IMG_EPS;
+	  else if(!strcmp(p, "pdf")) options2.format=IMG_PDF;
+	  else if(!strcmp(p, "bmp")) options2.format=IMG_BMP;
+	  else stop(l);
+	  continue;
+	}
+      
+	if( (p=find_str(buffer, "img_type=")) )
+	{
+	  if(!strcmp(p, "bw")) options2.type = IMG_BW;
+	  else if(!strcmp(p, "color")) options2.type = IMG_COL;
+	  else stop(l);
+	  continue;
+	}
+      
+	if( (p=find_str(buffer, "img_size=")) )
+	{
+	  if(!strcmp(p, "lcd")) options2.size = IMG_LCD;
+	  else if(!strcmp(p, "skin")) options2.size = IMG_SKIN;
+	  else stop(l);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "screen_folder=")) )
+	{
+	  g_free(options2.folder);
+	  options2.folder = g_strdup(p);
+	  continue;
+	}
+      
+	if( (p=find_str(buffer, "screen_file=")) )
+	{
+	  g_free(options2.file);
+	  options2.file = g_strdup(p);
+	  continue;
+	}
+      
+	if( (p=find_str(buffer, "screen_counter=")) )
+	{
+	  sscanf(p, "%i", &(options2.counter));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "screen_shots=")) )
+	{
+	  sscanf(p, "%i", &(options2.shots));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "screen_skips=")) )
+	{
+	  sscanf(p, "%i", &(options2.skips));
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "clipboard=")) )
+	{
+	  if(!strcmp(p, "no")) options2.clipboard = 0;
+	  else if(!strcmp(p, "yes")) options2.clipboard = 1;
+
+	  continue;
+	}
+	
+	if( (p=find_str(buffer, "console=")) )
+	{
+	  if(!strcmp(p, "no")) options.console = 0;
+	  else if(!strcmp(p, "yes")) options.console = 1;
+	  else if(!strcmp(p, "boot")) options.console = 2;
+	  else stop(l);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "kbd_dbg=")) )
+	{
+	  if(!strcmp(p, "no")) options.kbd_dbg = 0;
+	  else if(!strcmp(p, "yes")) options.kbd_dbg = 1;
+	}
+
+	if( (p=find_str(buffer, "fs_type=")) )
+	{
+	  if(!strcmp(p, "old")) options.fs_type = 0;
+	  else if(!strcmp(p, "new")) options.fs_type = 1;
+	  else if(!strcmp(p, "native") || !strcmp(p, "win32")) options.fs_type = 2;
+	  else if(!strcmp(p, "kde")) options.fs_type = 3;
+	}
+	
+	if( (p=find_str(buffer, "skin_file=")) )
+	{
+	  g_free(options.skin_file);
+	  options.skin_file = g_strdup(p);
+	  continue;
+	}
+
+    if( (p=find_str(buffer, "keys_file=")) )
+	{
+	  g_free(options.keys_file);
+	  options.keys_file = g_strdup(p);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "calc_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.calc.rect.x), &(options3.calc.rect.y), 
+		  &(options3.calc.rect.w), &(options3.calc.rect.h),
+		  &(options3.calc.minimized), &(options3.calc.closed)
+		  );
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "bkpts_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.bkpts.rect.x), &(options3.bkpts.rect.y), 
+		  &(options3.bkpts.rect.w), &(options3.bkpts.rect.h),
+		  &(options3.bkpts.minimized), &(options3.bkpts.closed)
+		  );
+	  continue;
+	}
+	if( (p=find_str(buffer, "code_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.code.rect.x), &(options3.code.rect.y), 
+		  &(options3.code.rect.w), &(options3.code.rect.h),
+		  &(options3.code.minimized), &(options3.code.closed));
+	  continue;
+	}
+	if( (p=find_str(buffer, "mem_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.mem.rect.x), &(options3.mem.rect.y), 
+		  &(options3.mem.rect.w), &(options3.mem.rect.h),
+		  &(options3.mem.minimized), &(options3.mem.closed));
+	  continue;
+	}
+	if( (p=find_str(buffer, "regs_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.regs.rect.x), &(options3.regs.rect.y), 
+		  &(options3.regs.rect.w), &(options3.regs.rect.h),
+		  &(options3.regs.minimized), &(options3.regs.closed));
+	  continue;
+	}
+	if( (p=find_str(buffer, "pclog_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.pclog.rect.x), &(options3.pclog.rect.y), 
+		  &(options3.pclog.rect.w), &(options3.pclog.rect.h),
+		  &(options3.pclog.minimized), &(options3.pclog.closed));
+	  continue;
+	}
+	if( (p=find_str(buffer, "stack_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.stack.rect.x), &(options3.stack.rect.y), 
+		  &(options3.stack.rect.w), &(options3.stack.rect.h),
+		  &(options3.stack.minimized), &(options3.stack.closed));
+	  continue;
+	}
+	if( (p=find_str(buffer, "heap_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.heap.rect.x), &(options3.heap.rect.y), 
+		  &(options3.heap.rect.w), &(options3.heap.rect.h),
+		  &(options3.heap.minimized), &(options3.heap.closed));
+	  continue;
+	}	
+	if( (p=find_str(buffer, "iop_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.iop.rect.x), &(options3.iop.rect.y), 
+		  &(options3.iop.rect.w), &(options3.iop.rect.h),
+		  &(options3.iop.minimized), &(options3.iop.closed));
+	  continue;
+	}
+	if( (p=find_str(buffer, "dock_wnd=")) )
+	{
+	  sscanf(p, "(%i;%i;%i;%i;%i;%i)", 
+		  &(options3.dock.rect.x), &(options3.dock.rect.y), 
+		  &(options3.dock.rect.w), &(options3.dock.rect.h),
+		  &(options3.dock.minimized), &(options3.dock.closed));
+	  continue;
+	}
+	if( (p=find_str(buffer, "wnd_transient=")) )
+	{
+	  if(!strcmp(p, "no")) options3.transient = 0;
+	  else if(!strcmp(p, "yes")) options3.transient = 1;
+	  else stop(l);
+	  continue;
+	}
+
+	if( (p=find_str(buffer, "dbg_font_type=")) )
+	{
+	  if(!strcmp(p, "default")) options3.dbg_font_type = 0;
+	  else if(!strcmp(p, "custom")) options3.dbg_font_type = 1;
+	  else stop(l);
+	  continue;
+	}
+	if( (p=find_str(buffer, "dbg_font_name=")) )
+	{
+		g_free(options3.dbg_font_name);
+		options3.dbg_font_name = g_strdup(p);
+		continue;
+	}
+
+	if( (p=find_str(buffer, "dbg_dock=")) )
+	{
+	  if(!strcmp(p, "no")) options3.dbg_dock = 0;
+	  else if(!strcmp(p, "yes")) options3.dbg_dock = 1;
+	  else stop(l);
+	  continue;
+	}
+
+    }
+  fclose(txt);
+
+  return;
+}
+
+/* 
+   Write the contents of some variables to the RC file 
+   in a plain text format.
+*/
+void rcfile_write(void)
+{
+	FILE *txt;
+
+	rcfile_get_path(&rc_file);
+#ifndef __WIN32__
+	mkdir(CONF_DIR, 0755);
+#else
+	_mkdir(CONF_DIR);
+#endif
+	txt=fopen(rc_file, "wt");
+	g_free(rc_file);
+
+	if(txt==NULL) {
+		//gif->msg_box(_("Error"), _("Unable to write the config file (~/.tilp or tilp.ini).\n"));
+		return;
+	}
+
+	fprintf(txt, "# Config file for TiEmu 3\n");
+	fprintf(txt, "# (C) Romain Lievin & Thomas Corvazier  2000-2001\n");
+	fprintf(txt, "# (C) Romain Lievin 2001-2003\n");
+	fprintf(txt, "# (C) Julien Blache 2003\n");
+	fprintf(txt, "# (C) Romain Li�vin 2004-2005\n");
+	fprintf(txt, "# Warning: any comments that you add to this file WILL be overwritten\n");
+	fprintf(txt, "\n");
+
+	/* Common part with TiLP */
+	fprintf(txt, "version=%s\n", TIEMU_VERSION);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "#\n");
+	fprintf(txt, "# LINK SECTION\n");
+	fprintf(txt, "#\n");
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# Link cable type\n");
+	fprintf(txt, "cable_model=%s\n", ticables_model_to_string(linkp.cable_model));
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# Port to use (serial, parallel, ...\n");
+	fprintf(txt, "cable_port=%s\n", ticables_port_to_string(linkp.cable_port));
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# Timeout value in 0.1 seconds\n");
+	fprintf(txt, "cable_timeout=%i\n", linkp.cable_timeout);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# Delay value\n");
+	fprintf(txt, "cable_delay=%i\n", linkp.cable_delay);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# Quick-send feature\n");
+	fprintf(txt, "qs_file=%s\n", options.qs_file);
+	fprintf(txt, "qs_enabled=%i\n", options.qs_enabled);
+	fprintf(txt, "\n");
+
+  /* Specific part to TiEmu */
+	fprintf(txt, "#\n");
+	fprintf(txt, "# EMULATOR SECTION\n");
+	fprintf(txt, "#\n");
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# SKIN file\n");
+	fprintf(txt, "skin_file=%s\n", options.skin_file);
+	fprintf(txt, "\n");
+
+    fprintf(txt, "# KEYS file\n");
+	fprintf(txt, "keys_file=%s\n", options.keys_file);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# IMG file\n");
+	fprintf(txt, "img_file=%s\n", params.rom_file);
+	fprintf(txt, "\n");
+
+    fprintf(txt, "# TIB file\n");
+    fprintf(txt, "tib_file=%s\n", params.tib_file);
+    fprintf(txt, "\n");
+
+    fprintf(txt, "# SAV file\n");
+	fprintf(txt, "sav_file=%s\n", params.sav_file);
+    fprintf(txt, "\n");
+
+	fprintf(txt, "# Skin (0 for LCD only, 1 with skin)\n");
+	fprintf(txt, "skin=%i\n", options.skin);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "# View mode (normal/large/full/custom)\n");
+	fprintf(txt, "view_mode=");
+	switch(options.view)
+    {
+    case VIEW_NORMAL: fprintf(txt, "normal\n"); break;
+    case VIEW_LARGE: fprintf(txt, "large\n"); break;
+    case VIEW_FULL: fprintf(txt, "full\n"); break;
+	case VIEW_CUSTOM: fprintf(txt, "custom (%1.2f)\n", options.scale); break;
+    }
+	fprintf(txt, "\n");
+
+	fprintf(txt, "#\n");
+	fprintf(txt, "# HARDWARE SECTION\n");
+	fprintf(txt, "#\n");
+	fprintf(txt, "\n");
+
+  fprintf(txt, "# CPU cycles rate (360000 per 30ms) = OSC1\n");
+  fprintf(txt, "cpu_rate=%i\n", params.cpu_rate);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Hardware update rate (625 (hw1) or 1172 (hw2) = OSC2/OSC3\n");
+  fprintf(txt, "hw_rate=%i\n", params.hw_rate);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# LCD update rate (100 fps max.) = OSC3\n");
+  fprintf(txt, "lcd_rate=%i\n", params.lcd_rate);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# HW2 protection\n");
+  fprintf(txt, "hw_protect=%i\n", params.hw_protect);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "#\n");
+  fprintf(txt, "# SCREENSHOT SECTION\n");
+  fprintf(txt, "#\n");
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot: image format (jpg, bmp, ico, eps, pdf, bmp)\n");
+  fprintf(txt, "img_format=");
+  switch(options2.format)
+    {
+    case IMG_JPG: fprintf(txt, "jpg\n"); break;
+    case IMG_PNG: fprintf(txt, "png\n"); break;
+    case IMG_ICO: fprintf(txt, "ico\n"); break;
+    case IMG_EPS: fprintf(txt, "eps\n"); break;
+    case IMG_PDF: fprintf(txt, "pdf\n"); break;
+	case IMG_BMP: fprintf(txt, "bmp\n"); break;
+    }
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot: image type (bw, color)\n");
+  fprintf(txt, "img_type=%s\n", (options2.type == IMG_BW) ? "bw" : "color");
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot: image size (lcd, skin)\n");
+  fprintf(txt, "img_size=%s\n", (options2.size == IMG_LCD) ? "lcd" : "skin");
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot folder\n");
+  fprintf(txt, "screen_folder=%s\n", options2.folder);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot base file\n");
+  fprintf(txt, "screen_file=%s\n", options2.file);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot counter\n");
+  fprintf(txt, "screen_counter=%i\n", options2.counter);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot shots\n");
+  fprintf(txt, "screen_shots=%i\n", options2.shots);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot skips\n");
+  fprintf(txt, "screen_skips=%i\n", options2.skips);
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Screenshot copied to clipboard (no, yes)\n");
+  fprintf(txt, "clipboard=");
+  switch(options2.clipboard)
+  {
+  case 0: fprintf(txt, "no\n"); break;
+  case 1: fprintf(txt, "yes\n"); break;
+  default: fprintf(txt, "no\n"); break;
+  }
+  fprintf(txt, "\n");
+
+  fprintf(txt, "#\n");
+  fprintf(txt, "# MISC SECTION\n");
+  fprintf(txt, "#\n");
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Console mode (no, yes, boot)\n");
+  fprintf(txt, "console=");
+  switch(options.console)
+  {
+  case 0: fprintf(txt, "no\n"); break;
+  case 1: fprintf(txt, "yes\n"); break;
+  case 2: fprintf(txt, "boot\n"); break;
+  default: fprintf(txt, "no\n"); break;
+  }
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# Display key bindings (keyboard map files)\n");
+  fprintf(txt, "kbd_dbg=%s\n", options.kbd_dbg ? "yes" : "no");
+  fprintf(txt, "\n");
+
+  fprintf(txt, "# File selector to use (native or old (GTK1/2) or new (GTK 2.4+) or win32 (Windows) or kde (KDE))\n");
+  fprintf(txt, "fs_type=");
+  switch(options.fs_type)
+  {
+  case 0: fprintf(txt, "old\n"); break;
+  case 1: fprintf(txt, "new\n"); break;
+  case 2: fprintf(txt, "native\n"); break;
+  case 3: fprintf(txt, "kde\n"); break;
+  default: fprintf(txt, "old\n"); break;
+  }
+  fprintf(txt, "\n");
+
+  fprintf(txt, "#\n");
+  fprintf(txt, "# DEBUGGER SECTION\n");
+  fprintf(txt, "#\n");
+  fprintf(txt, "\n");
+
+	fprintf(txt, "# Geometry hints of debugger windows (x,y,w,h,m,c)\n");
+
+	fprintf(txt, "calc_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.calc.rect.x, options3.calc.rect.y, 
+		options3.calc.rect.w, options3.calc.rect.h,
+		options3.calc.minimized, options3.calc.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "bkpts_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.bkpts.rect.x, options3.bkpts.rect.y, 
+		options3.bkpts.rect.w, options3.bkpts.rect.h,
+		options3.bkpts.minimized, options3.bkpts.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "code_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.code.rect.x, options3.code.rect.y, 
+		options3.code.rect.w, options3.code.rect.h,
+		options3.code.minimized, options3.code.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "mem_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.mem.rect.x, options3.mem.rect.y, 
+		options3.mem.rect.w, options3.mem.rect.h,
+		options3.mem.minimized, options3.mem.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "regs_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.regs.rect.x, options3.regs.rect.y, 
+		options3.regs.rect.w, options3.regs.rect.h,
+		options3.regs.minimized, options3.regs.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "pclog_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.pclog.rect.x, options3.pclog.rect.y, 
+		options3.pclog.rect.w, options3.pclog.rect.h,
+		options3.pclog.minimized, options3.pclog.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "stack_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.stack.rect.x, options3.stack.rect.y, 
+		options3.stack.rect.w, options3.stack.rect.h,
+		options3.stack.minimized, options3.stack.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "heap_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.heap.rect.x, options3.heap.rect.y, 
+		options3.heap.rect.w, options3.heap.rect.h,
+		options3.heap.minimized, options3.heap.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "iop_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.iop.rect.x, options3.iop.rect.y, 
+		options3.iop.rect.w, options3.iop.rect.h,
+		options3.iop.minimized, options3.iop.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "dock_wnd=(%i;%i;%i;%i;%i;%i)", 
+		options3.dock.rect.x, options3.dock.rect.y, 
+		options3.dock.rect.w, options3.dock.rect.h,
+		options3.dock.minimized, options3.dock.closed);
+	fprintf(txt, "\n");
+
+	fprintf(txt, "wnd_transient=%s\n", options3.transient ? "yes" : "no");
+ 	fprintf(txt, "\n");
+
+	fprintf(txt, "# Font type\n");
+	fprintf(txt, "dbg_font_type=");
+	switch(options3.dbg_font_type)
+	{
+	case 0: fprintf(txt, "default\n"); break;
+	case 1: fprintf(txt, "custom\n"); break;
+	default: fprintf(txt, "default\n"); break;
+	}
+	if(options3.dbg_font_name)
+	{
+		fprintf(txt, "dbg_font_name=%s\n", options3.dbg_font_name);
+ 		fprintf(txt, "\n");
+	}
+
+	fprintf(txt, "# Use dock (yes) or multi-window (no)\n");
+	fprintf(txt, "dbg_dock=");
+	switch(options3.dbg_dock)
+	{
+	case 0: fprintf(txt, "no\n"); break;
+	case 1: fprintf(txt, "yes\n"); break;
+	default: fprintf(txt, "no\n"); break;
+	}
+	fprintf(txt, "\n");
+
+	fprintf(txt, "\n");
+  fprintf(txt, "RC_END\n");
+  fflush(txt);
+
+  fclose(txt);
+}
+
+extern void options3_set_default(void);
+
+/*
+  Initialize the options structure with some default values
+*/
+int rcfile_default()
+{
+	ti68k_config_load_default();
+
+	// m68k options
+	params.rom_file = g_strconcat(inst_paths.img_dir, "", NULL);
+	params.sav_file = g_strdup("");
+	params.tib_file = g_strdup("");
+
+	// emulator options
+	options.skin_file = g_strconcat(inst_paths.skin_dir, "", NULL);
+    options.keys_file = g_strconcat(inst_paths.skin_dir, "", NULL);
+#if defined(__WIN32__) && defined(_CONSOLE)
+	options.console = !0;
+#else
+	options.console = 0;
+#endif
+#ifdef __IPAQ__
+    options.skin = 0;
+#else
+    options.skin = 1;
+#endif
+	options.view = VIEW_NORMAL;
+	options.scale = 1.0;
+	options.kbd_dbg = 0;
+	options.fs_type = 2;
+
+	options.qs_file = g_strdup("");
+	options.qs_enabled = 0;
+
+	// screenshot options
+	options2.folder = g_strdup(inst_paths.screen_dir);
+	options2.file = g_strdup("screenshot");
+	options2.counter = 0;
+	options2.type = IMG_COL;
+	options2.format = IMG_PNG;
+	options2.size = IMG_SKIN;
+	options2.shots = 1;
+	options2.skips = 4;
+	options2.clipboard = 0;
+
+	// debugger options
+	options3_set_default();	
+
+	return 0;
+}
+
+void options3_set_default(void)
+{
+	// Optimized for 1024x768
+	options3.calc.rect.x = 0;
+	options3.calc.rect.y = 0;
+	options3.calc.rect.w = -1;	// unused yet
+	options3.calc.rect.h = -1;	// unused yet
+	options3.calc.closed = 0;
+	options3.calc.minimized = 0;
+
+	options3.bkpts.rect.x = 700;
+	options3.bkpts.rect.y = 560;
+	options3.bkpts.rect.w = 320;
+	options3.bkpts.rect.h = 145;
+	options3.bkpts.closed = !0;
+	options3.bkpts.minimized = 0;
+
+	options3.code.rect.x = 510;
+	options3.code.rect.y = 10;
+	options3.code.rect.w = 320;
+	options3.code.rect.h = 290;
+	options3.code.closed = 0;
+	options3.code.minimized = 0;
+
+	options3.mem.rect.x = 0;
+	options3.mem.rect.y = 470;
+	options3.mem.rect.w = 520;
+	options3.mem.rect.h = 240;
+	options3.mem.closed = 0;
+	options3.mem.minimized = 0;
+
+	options3.regs.rect.x = 840;
+	options3.regs.rect.y = 10;
+	options3.regs.rect.w = 180;
+	options3.regs.rect.h = 540;
+	options3.regs.closed = 0;
+	options3.regs.minimized = 0;
+
+	options3.pclog.rect.x = 260;
+	options3.pclog.rect.y = 20;
+	options3.pclog.rect.w = 160;
+	options3.pclog.rect.h = 240;
+	options3.pclog.closed = !0;
+	options3.pclog.minimized = 0;
+
+    options3.stack.rect.x = 300;
+    options3.stack.rect.y = 180;
+    options3.stack.rect.w = 160;
+    options3.stack.rect.h = 250;
+	options3.stack.closed = !0;
+	options3.stack.minimized = 0;
+
+	options3.heap.rect.x = 530;
+	options3.heap.rect.y = 470;
+	options3.heap.rect.w = 160;
+	options3.heap.rect.h = 240;
+	options3.heap.closed = !0;
+	options3.heap.minimized = 0;
+
+	options3.iop.rect.x = 530;
+	options3.iop.rect.y = 470;
+	options3.iop.rect.w = 360;
+	options3.iop.rect.h = 240;
+	options3.iop.closed = !0;
+	options3.iop.minimized = 0;
+
+	options3.dock.rect.x = 0;
+	options3.dock.rect.y = 0;
+	options3.dock.rect.w = -1;	// unused yet
+	options3.dock.rect.h = -1;	// unused yet
+	options3.dock.closed = 0;
+	options3.dock.minimized = 0;
+
+	options3.transient = 0;
+	
+	options3.dbg_font_type = 0;
+	options3.dbg_font_name = g_strdup(DEFAULT_FONT_NAME);
+
+	options3.dbg_dock = 1;
+}
diff --git a/src/misc/rcfile.h b/src/misc/rcfile.h
new file mode 100644
index 0000000..cf24b78
--- /dev/null
+++ b/src/misc/rcfile.h
@@ -0,0 +1,40 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: rcfile.h 1455 2005-05-31 18:38:03Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __RCFILE_H__
+#define __RCFILE_H__
+
+int rcfile_get_path(char **path);
+int rcfile_get_version(char *version);
+
+int rcfile_exist(void);
+int rcfile_delete(void);
+
+void rcfile_read(void);
+void rcfile_write(void);
+int rcfile_default(void);
+
+#endif
+
diff --git a/src/misc/screenshot.c b/src/misc/screenshot.c
new file mode 100644
index 0000000..ce1fcf9
--- /dev/null
+++ b/src/misc/screenshot.c
@@ -0,0 +1,375 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: screenshot.c 2620 2007-08-01 05:17:09Z kevinkofler $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2005, Julien Blache
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include <zlib.h>
+
+#include "screenshot.h"
+#include "version.h"
+#include "struct.h"
+#include "../core/ti68k_int.h"
+#include "intl.h"
+
+/*
+ * Utility function for the EPS and PDF output
+ */
+static gboolean write_compressed_a85_screen(FILE *fp, GdkPixbuf *pixbuf, GError **error)
+{
+	guchar *ubuf, *cbuf;
+	int cbuflen;
+	int r, i, j;
+	int h, w;
+	int rlen;
+	int ret;
+	z_stream s;
+	int flush;
+	int outlen;
+	int a85count;
+	unsigned long a85tuple;
+	guchar a85block[6];
+
+	ubuf = gdk_pixbuf_get_pixels(pixbuf);
+	rlen = gdk_pixbuf_get_rowstride(pixbuf);
+	w = gdk_pixbuf_get_width(pixbuf);
+	h = gdk_pixbuf_get_height(pixbuf);
+
+	a85count = 0;
+	a85tuple = 0;
+	a85block[5] = '\0';
+
+	/* buffer length = length + 0.1 * length + 12 (mandatory) */
+	cbuflen = outlen = rlen + rlen / 10 + 12;
+	cbuf = g_malloc(cbuflen);
+
+	if (cbuf == NULL) {
+		g_set_error(error, 0, 0, _("Couldn't allocate memory!"));
+		return FALSE;
+	}
+
+	s.zalloc = Z_NULL;
+	s.zfree = Z_NULL;
+	s.opaque = Z_NULL;
+
+	ret = deflateInit(&s, Z_DEFAULT_COMPRESSION);
+
+	if (ret != Z_OK) {
+		g_set_error(error, 0, 0, _("zlib init error"));
+		g_free(cbuf);
+		return FALSE;
+	}
+	for (r = 0; r < h; r++) {
+		s.avail_in = w * 3;
+		s.next_in = ubuf;
+		do {
+			s.avail_out = outlen;
+			s.next_out = cbuf;
+
+			flush = (r == (h - 1)) ? Z_FINISH : Z_NO_FLUSH;
+
+			ret = deflate(&s, flush);
+
+			if (ret == Z_STREAM_ERROR) {
+				g_set_error(error, 0, 0, _("zlib deflate error"));
+				g_free(cbuf);
+				return FALSE;
+			}
+
+			cbuflen = outlen - s.avail_out;
+			/* ASCII85 (base 85) encoding */
+			for (i = 0; i < cbuflen; i++) {
+				switch (a85count) {
+				case 0:
+					a85tuple |= (cbuf[i] << 24);
+					a85count++;
+					break;
+				case 1:
+					a85tuple |= (cbuf[i] << 16);
+					a85count++;
+					break;
+				case 2:
+					a85tuple |= (cbuf[i] << 8);
+					a85count++;
+					break;
+				case 3:
+					a85tuple |= (cbuf[i] << 0);
+
+					if (a85tuple == 0) {
+						a85block[0] = 'z';
+						a85block[1] = '\0';
+					}
+					else {
+						/* The ASCII chars must be written in reverse order,
+						 * hence -> a85block[4-j]
+						 */
+						for (j = 0; j < 5; j++) {
+							a85block[4-j] = (unsigned char)(a85tuple % 85 + '!');
+							a85tuple /= 85;
+						}
+					}
+					fprintf(fp, "%s", a85block);
+
+					a85count = 0;
+					a85tuple = 0;
+					break;
+				default:
+					break;
+				}
+
+				if ((i > 0) && (i % 32 == 0)) {
+					fprintf(fp, "\n");
+				}
+			}
+		} while (s.avail_out == 0);
+		ubuf += rlen;
+	}
+
+	if (a85count > 0) {
+		a85count++;
+		for (j = 0; j <= a85count; j++) {
+			a85block[j] = (unsigned char)(a85tuple % 85 + '!');
+			a85tuple /= 85;
+		}
+                /* Reverse order */
+		for (j--; j > 0; j--) {
+			fprintf(fp, "%c", a85block[j]);
+		}
+	}
+
+        /* ASCII85 EOD marker + newline*/
+	fprintf(fp, "~>\n");
+
+	deflateEnd(&s);
+
+	g_free(cbuf);
+
+	return TRUE;
+}
+
+
+/*
+ * Write out an Encapsulated PostScript file.
+ */
+gboolean tiemu_screen_write_eps(const gchar *filename, GdkPixbuf *pixbuf, GError **error)
+{
+	int h, w;
+	FILE *fp;
+	time_t t;
+	gboolean ret;
+	GError *err = NULL;
+
+	fp = fopen(filename, "wb");
+	if (fp == NULL) {
+		g_set_error(error, 0, 0, _("Couldn't open destination file for writing!"));
+		return FALSE;
+	}
+
+	h = gdk_pixbuf_get_height(pixbuf);
+	w = gdk_pixbuf_get_width(pixbuf);
+
+	time(&t);
+
+	fprintf(fp, "%%!PS-Adobe-3.0 EPSF-3.0\n");
+	fprintf(fp, "%%%%Creator: TiEmu %s / PostScript output Copyright (C) 2005 Julien BLACHE\n", TIEMU_VERSION);
+	fprintf(fp, "%%%%Title: TiEmu %s screenshot\n",
+		ti68k_calctype_to_string(tihw.calc_type));
+	fprintf(fp, "%%%%CreationDate: %s", ctime(&t));
+	fprintf(fp, "%%%%LanguageLevel: 3\n");
+	fprintf(fp, "%%%%BoundingBox: 0 0 %d %d\n", w, h);
+	fprintf(fp, "\n");
+	fprintf(fp, "%d %d scale\n", w, h);
+
+	fprintf(fp, "%d %d 8 [%d 0 0 -%d 0 %d] currentfile /ASCII85Decode filter /FlateDecode filter false 3 colorimage\n", w, h, w, h, h);
+	ret = write_compressed_a85_screen(fp, pixbuf, &err);
+
+	if (!ret) {
+		g_propagate_error(error, err);
+		fclose(fp);
+		unlink(filename);
+		return FALSE;
+	}
+
+	fprintf(fp, "%%%%EOF\n");
+	fclose(fp);
+
+	return TRUE;
+}
+
+/*
+ * Write out a PDF file.
+ */
+gboolean tiemu_screen_write_pdf(const gchar *filename, GdkPixbuf *pixbuf, GError **error)
+{
+	int h, w;
+	FILE *fp;
+	long obj5, obj6, obj7, xref, slen, slenp;
+	struct tm *t;
+	time_t tt;
+	gboolean ret;
+	GError *err;
+
+	fp = fopen(filename, "wb");
+	if (fp == NULL) {
+		g_set_error(error, 0, 0, _("Couldn't open destination file for writing!"));
+		return FALSE;
+	}
+
+	h = gdk_pixbuf_get_height(pixbuf);
+	w = gdk_pixbuf_get_width(pixbuf);
+
+	tt = time(NULL);
+	t = gmtime(&tt);
+
+	fprintf(fp, "%%PDF-1.5\n");
+	fprintf(fp, "\n");
+	fprintf(fp, "1 0 obj\n");
+	fprintf(fp, "   << /Type /Catalog\n");
+	fprintf(fp, "      /Outlines 2 0 R\n");
+	fprintf(fp, "      /Pages 3 0 R\n");
+	fprintf(fp, "   >>\n");
+	fprintf(fp, "endobj\n");
+	fprintf(fp, "\n");
+	fprintf(fp, "2 0 obj\n");
+	fprintf(fp, "   << /Type /Outlines\n");
+	fprintf(fp, "      /Count 0\n");
+	fprintf(fp, "   >>\n");
+	fprintf(fp, "endobj\n");
+	fprintf(fp, "\n");
+	fprintf(fp, "3 0 obj\n");
+	fprintf(fp, "   << /Type /Pages\n");
+	fprintf(fp, "      /Kids [4 0 R]\n");
+	fprintf(fp, "      /Count 1\n");
+	fprintf(fp, "   >>\n");
+	fprintf(fp, "endobj\n");
+	fprintf(fp, "\n");
+	fprintf(fp, "4 0 obj\n");
+	fprintf(fp, "    << /Type /Page\n");
+	fprintf(fp, "       /Parent 3 0 R\n");
+	fprintf(fp, "       /MediaBox [0 0 %d %d]\n", w, h);
+	fprintf(fp, "       /Contents 5 0 R\n");
+	fprintf(fp, "       /Resources << /ProcSet 6 0 R >>\n");
+	fprintf(fp, "    >>\n");
+	fprintf(fp, "endobj\n");
+	fprintf(fp, "\n");
+
+	/* Offset of object 5, for xref */
+	obj5 = ftell(fp);
+
+	fprintf(fp, "5 0 obj\n");
+	fprintf(fp, "    << /Length          >>\n");
+
+	/* Position of the stream length, to be written later on */
+	slenp = ftell(fp) - 12;
+
+	fprintf(fp, "stream\n");
+
+	/* Start of the stream data */
+	slen = ftell(fp);
+
+	fprintf(fp, "q\n");
+	fprintf(fp, "%d 0 0 %d 0 0 cm\n", w, h);
+	fprintf(fp, "BI\n");
+	fprintf(fp, "  /W %d\n", w);
+	fprintf(fp, "  /H %d\n", h);
+
+	/* RGB, 8 bits per component, ASCIIHex encoding */
+	fprintf(fp, "  /CS /RGB\n");
+	fprintf(fp, "  /BPC 8\n");
+	fprintf(fp, "  /F [/A85 /FlateDecode]\n");
+	fprintf(fp, "ID\n");
+
+	ret = write_compressed_a85_screen(fp, pixbuf, &err);
+
+	if (!ret) {
+		g_propagate_error(error, err);
+		fclose(fp);
+		unlink(filename);
+		return FALSE;
+	}
+
+	fprintf(fp, "EI\n");
+	fprintf(fp, "Q\n");
+
+	/* Go back and write the length of the stream */
+	slen = ftell(fp) - slen - 1;
+	fseek(fp, slenp, SEEK_SET);
+	fprintf(fp, "%lu", slen);
+	fseek(fp, 0L, SEEK_END);
+
+	fprintf(fp, "endstream\n");
+	fprintf(fp, "endobj\n");
+	fprintf(fp, "\n");
+
+	/* Offset of object 6, for xref */
+	obj6 = ftell(fp);
+
+	fprintf(fp, "6 0 obj\n");
+	fprintf(fp, "    [/PDF]\n");
+	fprintf(fp, "endobj\n");
+	fprintf(fp, "\n");
+
+	/* Offset of object 7, for xref */
+	obj7 = ftell(fp);
+
+	fprintf(fp, "7 0 obj\n");
+	fprintf(fp, "   << /Title (TiEmu %s screenshot)\n",
+		ti68k_calctype_to_string(tihw.calc_type));
+	fprintf(fp, "      /Creator (TiEmu / PDF output Copyright (C) 2005 Julien BLACHE)\n");
+	fprintf(fp, "      /Producer (TiEmu %s)\n", TIEMU_VERSION);
+	fprintf(fp, "      /CreationDate (D:%04d%02d%02d%02d%02d%02d+00'00')\n",
+		1900 + t->tm_year, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
+	fprintf(fp, "   >>\n");
+	fprintf(fp, "endobj\n");
+	fprintf(fp, "\n");
+
+	/* Offset of xref, for startxref below */
+	xref = ftell(fp);
+
+	fprintf(fp, "xref\n");
+	fprintf(fp, "0 8\n");
+	fprintf(fp, "0000000000 65535 f \n");
+	fprintf(fp, "0000000010 00000 n \n");
+	fprintf(fp, "0000000094 00000 n \n");
+	fprintf(fp, "0000000153 00000 n \n");
+	fprintf(fp, "0000000229 00000 n \n");
+	fprintf(fp, "%010lu 00000 n \n", obj5);
+	fprintf(fp, "%010lu 00000 n \n", obj6);
+	fprintf(fp, "%010lu 00000 n \n", obj7);
+	fprintf(fp, "\n");
+	fprintf(fp, "trailer\n");
+	fprintf(fp, "    << /Size 8\n");
+	fprintf(fp, "       /Root 1 0 R\n");
+	fprintf(fp, "       /Info 7 0 R\n");
+	fprintf(fp, "    >>\n");
+	fprintf(fp, "startxref\n");
+	fprintf(fp, "%lu\n", xref);
+	fprintf(fp, "%%%%EOF\n");
+
+	fclose(fp);
+
+	return TRUE;
+}
diff --git a/src/misc/screenshot.h b/src/misc/screenshot.h
new file mode 100644
index 0000000..d9104b1
--- /dev/null
+++ b/src/misc/screenshot.h
@@ -0,0 +1,56 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: screenshot.h 2190 2006-08-03 15:29:55Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __SCREENSHOT__
+#define __SCREENSHOT__
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#define IMG_XPM 1 // unsupported by PixBuf
+#define IMG_PCX 2 // unsupported
+#define IMG_JPG 3 // supported by PixBuf
+#define IMG_PNG 4 // supported
+#define IMG_BMP 5 // supported
+#define IMG_ICO 6 // supported
+#define IMG_EPS 7 // unsupported, custom code
+#define IMG_PDF 8 // unsupported, custom code
+
+#define IMG_TYPE 64
+#define IMG_COL  (IMG_TYPE+1)
+#define IMG_BW   (IMG_TYPE+2)
+
+#define IMG_SIZE 128
+#define IMG_LCD  (IMG_SIZE+1)
+#define IMG_SKIN (IMG_SIZE+2)
+
+gboolean tiemu_screen_write_eps(const gchar *filename, GdkPixbuf *pixbuf, GError **error);
+gboolean tiemu_screen_write_pdf(const gchar *filename, GdkPixbuf *pixbuf, GError **error);
+
+#endif
+
+
+
+
+
diff --git a/src/misc/struct.h b/src/misc/struct.h
new file mode 100644
index 0000000..e70812c
--- /dev/null
+++ b/src/misc/struct.h
@@ -0,0 +1,128 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: struct.h 2709 2007-12-13 17:37:31Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef STRUCT_H
+#define STRUCT_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <glib.h>
+
+#include "paths.h"
+
+/* Constants */
+
+#define MAXCHARS 256
+
+#define VIEW_NORMAL 1
+#define VIEW_LARGE  2
+#define VIEW_FULL   3
+#define VIEW_CUSTOM	4
+
+/* General options */
+typedef struct
+{
+	gchar*  skin_file;
+	gint	skin;
+	gint    view;
+	gfloat	scale;
+
+    gchar*  keys_file;
+	gint	kbd_dbg;
+
+	gint	console;
+	gint    fs_type;
+	
+	gchar*	qs_file;
+	gint	qs_enabled;
+
+	gchar*	kp_rec_file;
+	gint	kp_rec_enabled;
+	gchar*	kp_ply_file;
+	gint	kp_ply_enabled;
+} TieOptions;
+
+/* Screen capture options */
+typedef struct 
+{
+	int		format;
+	int		type;
+	int		size;
+
+	char*	file;
+	int		counter;
+	char*	folder;
+
+	int		shots;
+	int		skips;
+
+	int		clipboard;
+} ScrOptions;
+
+/* Debugger options for windows size and placement */
+typedef struct 
+{
+	int x;
+	int y;
+	int w;
+	int h;
+} GdkRect;
+
+typedef struct 
+{
+	GdkRect	rect;
+	gint	minimized;
+	gint	closed;
+} WinState;
+
+typedef struct 
+{
+	WinState	bkpts;
+	WinState	code;
+	WinState	mem;
+	WinState	regs;
+    WinState	pclog;
+    WinState	stack;
+	WinState	heap;
+	WinState	iop;
+	WinState	dock;
+
+	gint		transient;
+
+	WinState	calc;
+
+	gint		dbg_font_type;
+	gchar*		dbg_font_name;
+
+	gint		dbg_dock;
+} DbgOptions;
+
+extern TieOptions options;
+extern ScrOptions options2;
+extern DbgOptions options3;
+
+#endif
diff --git a/src/misc/tie_error.c b/src/misc/tie_error.c
new file mode 100644
index 0000000..a84de5d
--- /dev/null
+++ b/src/misc/tie_error.c
@@ -0,0 +1,82 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: tie_error.c 2372 2007-02-25 21:43:23Z roms $ */
+
+/*  TiEmu - Tiemu Is an EMUlator
+ *
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+
+#include "tilibs.h"
+
+#include "intl.h"
+#include "logging.h"
+#include "dboxes.h"
+#include "ti68k_int.h"
+
+/*
+  This function can take 2 parameters:
+  - an error to translate or 0
+  - a pure message or NULL
+ */
+int tiemu_err(int err_code, char *err_str)
+{
+	int err = err_code;
+	char *s = NULL;
+
+	if(!err_code && !err_str)
+		return 0;
+
+	if(err_code) 
+	{
+		/* Retrieve the error message */
+		err = ticables_error_get(err, &s);
+		if (err) 
+		{
+			//free(s);
+			err = tifiles_error_get(err, &s);
+			if (err) 
+			{
+				//free(s);
+				err = ticalcs_error_get(err, &s);
+				if (err) 
+				{
+					// next level: error for TiEmu
+					//free(s);
+					err = ti68k_error_get(err, &s);
+				}
+			}
+		}
+	} 
+	else if(err_str) 
+	{
+		s = strdup(err_str);
+	}
+	
+	tiemu_warning("%s", s);
+	msg_box1(_("Error"), s);
+
+	//free(s);
+	return err_code;
+}
diff --git a/src/misc/tie_error.h b/src/misc/tie_error.h
new file mode 100644
index 0000000..b93b598
--- /dev/null
+++ b/src/misc/tie_error.h
@@ -0,0 +1,33 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: tie_error.h 2368 2007-02-25 20:20:38Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TIEMU_ERROR__
+#define __TIEMU_ERROR__
+
+int tiemu_err(int err_code, char *err_str);
+
+#define handle_error()	{ if(err) tiemu_err(err, NULL); }
+
+#endif
diff --git a/src/misc/version.h b/src/misc/version.h
new file mode 100644
index 0000000..815b52e
--- /dev/null
+++ b/src/misc/version.h
@@ -0,0 +1,50 @@
+/* Hey EMACS -*- linux-c -*- */
+/* $Id: version.h 2820 2009-05-03 14:07:15Z roms $ */
+
+/*  TiEmu - a TI emulator
+ *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
+ *  Copyright (c) 2001-2003, Romain Lievin
+ *  Copyright (c) 2003, Julien Blache
+ *  Copyright (c) 2004, Romain Li�vin
+ *  Copyright (c) 2005, Romain Li�vin
+ *
+ *  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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef VERSION_H
+#define VERSION_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/*
+  This file contains version number
+  and library requirements.
+*/
+
+#ifdef __WIN32__
+# define TIEMU_VERSION "3.03"		// For Win32
+#else
+# define TIEMU_VERSION VERSION
+#endif
+#define TIEMU_REQUIRES_LIBCABLES_VERSION	"1.3.0"
+#define TIEMU_REQUIRES_LIBCALCS_VERSION 	"1.0.7"
+#define TIEMU_REQUIRES_LIBFILES_VERSION		"1.0.7"
+#define TIEMU_REQUIRES_LIBCONV_VERSION		"1.0.4"
+
+#endif
+
+
diff --git a/src/sound/audio.c b/src/sound/audio.c
new file mode 100644
index 0000000..c3b305f
--- /dev/null
+++ b/src/sound/audio.c
@@ -0,0 +1,94 @@
+/*Sound capability library for TI-Emu
+Copyright (C) 2007  Peter Fernandes  supersonicandtails at gmail.com
+Copyright (C) 2007  Kevin Kofler
+
+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.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/
+
+#include "audio.h"
+#include "stream.h"
+#include "dboxes.h"
+
+int audio_isactive;
+int audioerr;
+
+int mix_volume;
+char *buffer;
+
+SDL_AudioSpec format;
+
+
+//sets up everything for use
+int audio_init(void) {
+	//initialize SDL for Audio
+	if(SDL_Init(SDL_INIT_AUDIO)<0) {
+		msg_box1(_("Unable to initialize sound"),SDL_GetError());
+		return -1;
+	}
+	
+	atexit(SDL_Quit);
+
+	atexit(audio_disable);
+
+	//set up the audio format
+	format.freq=44100;
+	format.format=AUDIO_S8;
+	format.channels=2;
+	format.samples=2048;
+	format.callback=stream_audio;
+	format.userdata=NULL;
+
+	audio_isactive=0;
+
+	return 0;
+}
+
+
+int audio_enable(void) {
+	if(audio_isactive)
+		return 0;
+	
+	buffer=malloc(BUFFER_SIZE);
+	
+	if(!buffer) {
+		msg_box1(_("Sound Error"),_("Not enough memory"));
+		return -1;
+	}
+	
+	memset(buffer,0,BUFFER_SIZE);
+	bufpos=0;
+
+	
+	//open the audio device
+	if(SDL_OpenAudio(&format,NULL)<0) {
+		msg_box1(_("Unable to open audio device"),SDL_GetError());
+		return -1;
+	}
+	
+	audio_isactive=1;
+	
+	//begin streaming audio
+	SDL_PauseAudio(0);
+
+	return 0;
+}
+
+void audio_disable(void) {
+	if(audio_isactive) {
+		//stop streaming audio
+		SDL_CloseAudio();
+		audio_isactive=0;
+		free(buffer);
+	}
+}
diff --git a/src/sound/audio.h b/src/sound/audio.h
new file mode 100644
index 0000000..c6ee536
--- /dev/null
+++ b/src/sound/audio.h
@@ -0,0 +1,57 @@
+/*Sound capability library for TI-Emu
+Copyright (C) 2007  Peter Fernandes  supersonicandtails at gmail.com
+Copyright (C) 2007  Kevin Kofler
+
+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.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/
+
+#ifndef TIEMU_AUDIO_H
+#define TIEMU_AUDIO_H
+
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+
+#include <glib.h>
+
+#include <SDL.h>
+#include <SDL_audio.h>
+#include <math.h>
+
+#include "logging.h"
+
+#define AMP_MAX 127
+
+#define BUFFER_SIZE 8192
+
+extern int audio_isactive;
+extern int audioerr;
+
+extern int mix_volume;
+extern char *buffer;
+
+extern SDL_AudioSpec format;
+
+
+//performs all the sound initialization
+extern int audio_init(void);
+
+//allcates buffer space and opens the audio device.  Must be called before push_amplitudes.
+extern int audio_enable(void);
+
+//frees the audio device, stops stream.  MUST be called before exiting
+extern void audio_disable(void);
+
+#endif
diff --git a/src/sound/stream.c b/src/sound/stream.c
new file mode 100644
index 0000000..1def7b4
--- /dev/null
+++ b/src/sound/stream.c
@@ -0,0 +1,62 @@
+/*Sound capability library for TI-Emu
+Copyright (C) 2007  Peter Fernandes  supersonicandtails at gmail.com
+Copyright (C) 2007  Kevin Kofler
+
+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.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/
+
+#include "audio.h"
+
+#undef BUFFER_FULL_WARNING
+
+int bufpos;
+
+void stream_audio(void *unused, Uint8 *stream, int len) {
+	int spill=bufpos-len;
+	if (spill < 0)
+		spill = 0;
+
+	//mix each playing voice into the audio stream len bytes at a time
+	memcpy(stream,buffer,len);
+
+	memmove(buffer,buffer+len,spill);
+	memset(buffer+spill,0,bufpos-spill);
+
+	//reset the buffer
+	bufpos=spill;
+}  
+
+void stream_push_amplitudes(char left, char right) {
+#ifdef BUFFER_FULL_WARNING
+	static int warned=0;
+#endif
+
+	SDL_LockAudio();
+	
+	if(bufpos<BUFFER_SIZE) {
+		*(buffer+bufpos)=left;
+		*(buffer+bufpos+1)=right;
+		bufpos+=2;
+	}
+#ifdef BUFFER_FULL_WARNING
+	else if(!warned) {
+		tiemu_warning(_("sound buffer full, dropping sample(s)"));
+		warned=1;
+	}
+#endif
+	
+	SDL_UnlockAudio();
+
+}
+
diff --git a/src/sound/stream.h b/src/sound/stream.h
new file mode 100644
index 0000000..ea50295
--- /dev/null
+++ b/src/sound/stream.h
@@ -0,0 +1,33 @@
+/*Sound capability library for TI-Emu
+Copyright (C) 2007  Peter Fernandes  supersonicandtails at gmail.com
+Copyright (C) 2007  Kevin Kofler
+
+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.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/
+
+#ifndef TIEMU_STREAM_H
+#define TIEMU_STREAM_H
+
+#include "audio.h"
+
+extern int bufpos;
+
+//callback to stream the audio buffer to SDL on request
+extern void stream_audio(void *volume, Uint8 *stream, int len);
+
+/*takes a pair of amplitudes (representing one stereo sample) and inserts them
+into the stream buffer*/
+extern void stream_push_amplitudes(char left, char right);
+
+#endif
diff --git a/tiemu.lsm.in b/tiemu.lsm.in
new file mode 100644
index 0000000..7fda12e
--- /dev/null
+++ b/tiemu.lsm.in
@@ -0,0 +1,21 @@
+Begin3
+Title:		tiemu
+Version:	@VERSION@
+Entered-date:	@ISODATE@
+Description:	TiEmu is a TI89/92(+) emulator.
+		@configure_input@
+		Please edit tiemu.lsm.in to fix the Keywords and
+		Primary-site entries, add several more lines of
+		description here if appropriate, and to delete these
+		instructions.
+Keywords:	[substitute your keywords here]
+Author: 	roms at lpg.ticalc.org (Romain Li�vin)
+Maintained-by:	roms at lpg.ticalc.org (Romain Li�vin)
+Primary-site:	metlab.unc.edu pub/Linux/apps/some/directory
+		31k tiemu- at VERSION@.tar.gz
+		500  tiemu.lsm
+Alternate-site: 
+Original-site:  
+Platforms:      
+Copying-policy:	GNU copyleft
+End
diff --git a/tiemu.spec.in b/tiemu.spec.in
new file mode 100644
index 0000000..8500286
--- /dev/null
+++ b/tiemu.spec.in
@@ -0,0 +1,93 @@
+# tiemu.spec
+#
+# Copyright (c) 2002 Romain Li�vin roms at lpg.ticalc.org
+#
+%define name tiemu
+%define version @VERSION@
+%define release 1
+%define manifest %{_builddir}/%{name}-%{version}-%{release}.manifest
+
+# required items
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Copyright: GPL
+Group: Application/Misc
+
+# optional items
+#Vendor: Romain Li�vin
+#Distribution:
+#Icon:
+#URL:
+#Packager: Romain Li�vin roms at lpg.ticalc.org
+
+# source + patches
+Source: %{name}-%{version}.tar.gz
+#Source1:
+#Patch:
+#Patch1:
+
+# RPM info
+#Provides:
+#Requires:
+#Conflicts:
+#Prereq:
+
+#Prefix: /usr
+BuildRoot: /var/tmp/%{name}-%{version}
+
+Summary: TiEmu is a TI89/92(+) emulator.
+
+%description
+TiEmu is a TI89/92(+) emulator.
+ at configure_input@
+Please edit tiemu.spec.in to add several more lines of description
+here if appropriate, and to delete these instructions.
+
+%prep
+%setup -q
+#%patch0 -p1
+
+%build
+%configure
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+%makeinstall
+
+# __os_install_post is implicitly expanded after the
+# %install section... do it now, and then disable it,
+# so all work is done before building manifest.
+
+%{?__os_install_post}
+%define __os_install_post %{nil}
+
+# build the file list automagically into %{manifest}
+
+cd $RPM_BUILD_ROOT
+rm -f %{manifest}
+find . -type d \
+        | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' >> %{manifest}
+find . -type f \
+        | sed 's,^\.,\%attr(-\,root\,root) ,' >> %{manifest}
+find . -type l \
+        | sed 's,^\.,\%attr(-\,root\,root) ,' >> %{manifest}
+
+#%pre
+#%post
+#%preun
+#%postun
+
+%clean
+rm -f %{manifest}
+rm -rf $RPM_BUILD_ROOT
+
+%files -f %{manifest}
+%defattr(-,root,root)
+#%doc README
+#%docdir
+#%config
+
+%changelog

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/tiemu.git



More information about the debian-science-commits mailing list