aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qtopia
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-24 17:57:24 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-30 02:35:12 +0100
commite9b45ff67d32fdc27950a51135b6dabada8334e7 (patch)
treede99cd760c8292ee1dd334e23e1e5cc43e90dfbd /recipes-qtopia
downloadmeta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.gz
meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.bz2
meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.zip
initial commit of meta-opie
Populate the repository with files from OpenEmbedded at revision 45edf621296daf150c72b876d720861235e5762e - no changes, only rearranged the directory structure to match the new oe-core style and added COPYING.MIT and README. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes-qtopia')
-rw-r--r--recipes-qtopia/aliens/aliens_1.0.0.bb24
-rw-r--r--recipes-qtopia/billiardz/billiardz_0.1.4.bb36
-rw-r--r--recipes-qtopia/billiardz/files/gcc4.patch45
-rw-r--r--recipes-qtopia/brickout/brickout-2002.06.09/directories.patch18
-rw-r--r--recipes-qtopia/brickout/brickout_2002.06.09.bb43
-rw-r--r--recipes-qtopia/camera-assistant/ca.desktop6
-rw-r--r--recipes-qtopia/camera-assistant/ca.pngbin0 -> 2844 bytes
-rw-r--r--recipes-qtopia/camera-assistant/camera-assistant_0.2.0.bb40
-rw-r--r--recipes-qtopia/camera-assistant/g++-3.4-compile-fixes.patch155
-rw-r--r--recipes-qtopia/corsair/corsair_0.2.6.bb35
-rw-r--r--recipes-qtopia/corsair/files/corsair-opie.patch364
-rw-r--r--recipes-qtopia/cumulus/cumulus/open_max.patch11
-rw-r--r--recipes-qtopia/cumulus/cumulus_1.2.1.bb46
-rw-r--r--recipes-qtopia/cumulus/cumulus_cvs.bb47
-rw-r--r--recipes-qtopia/custominput/custominput_1.1.0.bb39
-rw-r--r--recipes-qtopia/dviviewer/dviviewer_1.0.2.bb24
-rw-r--r--recipes-qtopia/flexis-zaurus/flexis-zaurus_1.0.0.bb19
-rw-r--r--recipes-qtopia/freedroid/freedroid-1.0.2/freedroid.pngbin0 -> 1074 bytes
-rw-r--r--recipes-qtopia/freedroid/freedroid_1.0.2.bb27
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/FreeNote/FNCanvas.cpp2244
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/FreeNote/FNFindDialog.cpp143
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/FreeNote/FNMessageBox.cpp243
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/FreeNote/FNTextDialog.cpp93
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/FreeNote/FmtEngine.cpp512
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/FreeNote/FrmMain.cpp1442
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/apps/Applications/FreeNote.desktop10
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/apps/Settings/FreeNoteSetup.desktop9
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/pics/fnsetup.pngbin0 -> 1317 bytes
-rw-r--r--recipes-qtopia/freenote/files/FreeNote/pics/freenote.pngbin0 -> 1024 bytes
-rw-r--r--recipes-qtopia/freenote/freenote_1.12.0.bb37
-rw-r--r--recipes-qtopia/frodo/frodo-4.1b/Frodo.pngbin0 -> 1370 bytes
-rw-r--r--recipes-qtopia/frodo/frodo-4.1b/conffiles1
-rw-r--r--recipes-qtopia/frodo/frodo-4.1b/frodo-joystick-4state.diff77
-rw-r--r--recipes-qtopia/frodo/frodo-4.1b/frodo-qte.diff8171
-rw-r--r--recipes-qtopia/frodo/frodo-4.1b/frodo.desktop6
-rw-r--r--recipes-qtopia/frodo/frodo-4.1b/frodorc26
-rw-r--r--recipes-qtopia/frodo/frodo-4.2/Frodo.pngbin0 -> 1370 bytes
-rw-r--r--recipes-qtopia/frodo/frodo-4.2/configure.patch51
-rw-r--r--recipes-qtopia/frodo/frodo-4.2/frodo.desktop6
-rw-r--r--recipes-qtopia/frodo/frodo-4.2/frodorc26
-rw-r--r--recipes-qtopia/frodo/frodo_4.1b.bb50
-rw-r--r--recipes-qtopia/frodo/frodo_4.2.bb44
-rw-r--r--recipes-qtopia/froot/froot_0.7.1.bb23
-rw-r--r--recipes-qtopia/gnuplot/files/gnuplot.desktop8
-rw-r--r--recipes-qtopia/gnuplot/files/gnuplot.pngbin0 -> 9383 bytes
-rw-r--r--recipes-qtopia/gnuplot/files/qtopia.trm483
-rw-r--r--recipes-qtopia/gnuplot/files/subdirs.patch11
-rw-r--r--recipes-qtopia/gnuplot/files/term.patch20
-rw-r--r--recipes-qtopia/gnuplot/gnuplot-4.0.0/debian-separate-x11-package.patch59
-rw-r--r--recipes-qtopia/gnuplot/gnuplot-4.0.0/matrix.patch17
-rw-r--r--recipes-qtopia/gnuplot/gnuplot-4.0.0/subdirs.patch16
-rw-r--r--recipes-qtopia/gnuplot/gnuplot-4.0.0/term.patch20
-rw-r--r--recipes-qtopia/gnuplot/gnuplot.inc35
-rw-r--r--recipes-qtopia/gnuplot/gnuplot_4.0.0.bb17
-rw-r--r--recipes-qtopia/gnuplot/gnuplot_4.2.4.bb15
-rw-r--r--recipes-qtopia/gnuplot/gnuplot_4.4.0.bb14
-rw-r--r--recipes-qtopia/gnuplot/gnuplot_cvs.bb23
-rw-r--r--recipes-qtopia/gnuplot/qtplot_0.2.bb28
-rw-r--r--recipes-qtopia/hotplug-qcop/hotplug-qcop_cvs.bb22
-rwxr-xr-xrecipes-qtopia/iaimaster/files/iaimaster.desktop7
-rwxr-xr-xrecipes-qtopia/iaimaster/files/iaimaster.pngbin0 -> 2458 bytes
-rw-r--r--recipes-qtopia/iaimaster/iaimaster_0.5.bb29
-rw-r--r--recipes-qtopia/inkwp/inkwp_0.1.1.bb23
-rw-r--r--recipes-qtopia/insttrain/files/gcc3.patch33
-rw-r--r--recipes-qtopia/insttrain/insttrain_1.0.5.bb23
-rw-r--r--recipes-qtopia/iqnotes/files/pro.patch10
-rw-r--r--recipes-qtopia/iqnotes/iqnotes-2.0.2/md5.diff20
-rw-r--r--recipes-qtopia/iqnotes/iqnotes-2.0.2/qt2310-fontbug.patch11
-rw-r--r--recipes-qtopia/iqnotes/iqnotes.inc29
-rw-r--r--recipes-qtopia/iqnotes/iqnotes_2.0.2.bb10
-rw-r--r--recipes-qtopia/iqnotes/iqnotes_2.0.99-2.1.0rc1.bb15
-rw-r--r--recipes-qtopia/irk/files/install-default-conf.patch18
-rw-r--r--recipes-qtopia/irk/irk-belkin_0.11.bb12
-rw-r--r--recipes-qtopia/irk/irk-targus_0.11.0.bb14
-rw-r--r--recipes-qtopia/irk/irk.inc24
-rw-r--r--recipes-qtopia/jards/jards_1.0.bb58
-rw-r--r--recipes-qtopia/justreader/files/correct-settings-path.patch17
-rw-r--r--recipes-qtopia/justreader/files/missing-include.patch10
-rw-r--r--recipes-qtopia/justreader/justreader_2.0k.bb33
-rw-r--r--recipes-qtopia/kaffe/kaffe-qt_cvs.bb24
-rw-r--r--recipes-qtopia/kaffe/kaffe.inc86
-rw-r--r--recipes-qtopia/kdepimpi/files/qt-mt.patch45
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-base.inc162
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-qte.inc163
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-x11.inc70
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-x11/kabc.patch24
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-x11/kammu.patch18
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-x11/korganizer.patch24
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-x11/libkcal.patch16
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-x11/nomail.patch18
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi-x11_2.2.3.bb15
-rw-r--r--recipes-qtopia/kdepimpi/kdepimpi_2.2.10.bb9
-rw-r--r--recipes-qtopia/kdepimpi/kphonepi_1.0.0.bb33
-rw-r--r--recipes-qtopia/kdepimpi/ktimetrackerpi_0.9.7.bb33
-rw-r--r--recipes-qtopia/kdepimpi/pwmpi.inc39
-rw-r--r--recipes-qtopia/kdepimpi/pwmpi_2.2.10.bb3
-rw-r--r--recipes-qtopia/keyring/keyring-0.6.8/keyring-0.6.8-datatype.patch93
-rw-r--r--recipes-qtopia/keyring/keyring_0.6.8.bb39
-rw-r--r--recipes-qtopia/klimt/klimt_0.6.2.bb20
-rw-r--r--recipes-qtopia/knights/knights-1.14/gcc3.patch16
-rw-r--r--recipes-qtopia/knights/knights-1.14/libqpe-opie.patch26
-rw-r--r--recipes-qtopia/knights/knights_1.14.bb34
-rw-r--r--recipes-qtopia/konqueror/files/fix_KDE_LDPATH_HACK.patch27
-rw-r--r--recipes-qtopia/konqueror/files/fix_acinclude.patch5897
-rw-r--r--recipes-qtopia/konqueror/files/gcc4.patch16
-rw-r--r--recipes-qtopia/konqueror/files/inject-extraflags.patch16
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/cachepath.patch13
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/gcc4.patch15
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/include_qconfig.patch14
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/kcookiejar-merge.patch2924
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/konq-embedrc20
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/malformed.patch19
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/opie1.patch34
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/packing.patch21
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/useragent.patch27
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20030705/vit.patch18
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20060404/dont-use-kde-config.patch62
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20070316/dont-use-kde-config.patch43
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20070316/fix_configure.patch22
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20070316/konqe-kapplication.patch12
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20070316/konqe_new_opie.patch756
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20070316/konqueror.desktop6
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded-20070316/konqueror.pngbin0 -> 2996 bytes
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded_20030705.bb59
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded_20060404.bb82
-rw-r--r--recipes-qtopia/konqueror/konqueror-embedded_20070316.bb102
-rw-r--r--recipes-qtopia/kstars/kstars-embedded-0.8.5/gcc45-compilation-fixes.patch34
-rw-r--r--recipes-qtopia/kstars/kstars-embedded_0.8.5.bb29
-rw-r--r--recipes-qtopia/mileage/mileage_cvs.bb26
-rw-r--r--recipes-qtopia/militaryalphabet/militaryalphabet_0.2.1.bb23
-rw-r--r--recipes-qtopia/nonworking/qtella/qtella_0.6.5.bb14
-rw-r--r--recipes-qtopia/nonworking/zaurss/zaurss_0.4.2.bb33
-rw-r--r--recipes-qtopia/nonworking/zethereal/zethereal_1.0.0.bb58
-rw-r--r--recipes-qtopia/notez/notez-1.1.0/fix-encoding.patch18
-rw-r--r--recipes-qtopia/notez/notez-1.1.0/use-homedir.patch92
-rw-r--r--recipes-qtopia/notez/notez_1.1.0.bb25
-rw-r--r--recipes-qtopia/nunome/files/nunome.patch197
-rw-r--r--recipes-qtopia/nunome/files/timer.patch21
-rw-r--r--recipes-qtopia/nunome/nunome_1.0.2.bb47
-rw-r--r--recipes-qtopia/otpkeygen/otpkeygen_1.3.0.bb31
-rw-r--r--recipes-qtopia/petitepainture/petitepainture/dialogs.patch308
-rw-r--r--recipes-qtopia/petitepainture/petitepainture/petitpeintu.desktop9
-rw-r--r--recipes-qtopia/petitepainture/petitepainture/petitpeintu.pngbin0 -> 1077 bytes
-rw-r--r--recipes-qtopia/petitepainture/petitepainture_1.5.bb27
-rw-r--r--recipes-qtopia/phalanx/phalanx/capabilities18
-rw-r--r--recipes-qtopia/phalanx/phalanx/description10
-rw-r--r--recipes-qtopia/phalanx/phalanx_22.bb29
-rw-r--r--recipes-qtopia/poboxserver/poboxserver/OpenPOBox-1.25.diff173
-rw-r--r--recipes-qtopia/poboxserver/poboxserver/pbserver.sh38
-rw-r--r--recipes-qtopia/poboxserver/poboxserver/remove-local-includes.patch16
-rw-r--r--recipes-qtopia/poboxserver/poboxserver/unicode.patch13
-rw-r--r--recipes-qtopia/poboxserver/poboxserver_1.2.5.bb47
-rw-r--r--recipes-qtopia/poboxserver/qpobox/qpobox-0.5.4-opie.patch595
-rw-r--r--recipes-qtopia/poboxserver/qpobox/qpobox.patch57
-rw-r--r--recipes-qtopia/poboxserver/qpobox_0.5.4.bb21
-rw-r--r--recipes-qtopia/pocketcellar/pocketcellar-1.1/cellardb.patch88
-rw-r--r--recipes-qtopia/pocketcellar/pocketcellar-1.1/gcc3.patch16
-rw-r--r--recipes-qtopia/pocketcellar/pocketcellar-1.1/pocketcellar.patch14
-rw-r--r--recipes-qtopia/pocketcellar/pocketcellar-1.1/winedb.patch92
-rw-r--r--recipes-qtopia/pocketcellar/pocketcellar_1.1.bb35
-rw-r--r--recipes-qtopia/poqetpresenter/poqetpresenter_0.0.6.bb28
-rw-r--r--recipes-qtopia/portabase/metakit-2.4.9.3/metakit-2.4.9.3.patch108
-rw-r--r--recipes-qtopia/portabase/metakit_2.4.9.3.bb68
-rw-r--r--recipes-qtopia/portabase/portabase-1.9/fileselector.patch128
-rw-r--r--recipes-qtopia/portabase/portabase-1.9/qt2310-fontbug.patch11
-rw-r--r--recipes-qtopia/portabase/portabase-1.9/qtopia.patch70
-rw-r--r--recipes-qtopia/portabase/portabase-1.9/qtversion.patch101
-rw-r--r--recipes-qtopia/portabase/portabase_1.9.bb132
-rw-r--r--recipes-qtopia/powermanga/powermanga-0.79/linuxroutines.cpp845
-rw-r--r--recipes-qtopia/powermanga/powermanga-0.79/pda-tweaks.patch24
-rw-r--r--recipes-qtopia/powermanga/powermanga-0.79/powermanga.desktop6
-rw-r--r--recipes-qtopia/powermanga/powermanga-0.79/powermanga.pngbin0 -> 579 bytes
-rw-r--r--recipes-qtopia/powermanga/powermanga-0.79/powermanga.pro64
-rw-r--r--recipes-qtopia/powermanga/powermanga_0.79.bb40
-rw-r--r--recipes-qtopia/prboom/files/prboom.desktop7
-rw-r--r--recipes-qtopia/prboom/files/prboom.pngbin0 -> 1003 bytes
-rwxr-xr-xrecipes-qtopia/prboom/files/prboom.sh17
-rw-r--r--recipes-qtopia/prboom/prboom-2.5.0/gnu_source_for_sched_h.patch12
-rw-r--r--recipes-qtopia/prboom/prboom-devconfig.bb17
-rw-r--r--recipes-qtopia/prboom/prboom-devconfig/akita/prboom.cfg313
-rw-r--r--recipes-qtopia/prboom/prboom-devconfig/collie/prboom.cfg313
-rw-r--r--recipes-qtopia/prboom/prboom-devconfig/prboom.cfg1
-rw-r--r--recipes-qtopia/prboom/prboom-devconfig/spitz/prboom.cfg313
-rw-r--r--recipes-qtopia/prboom/prboom-opie_2.2.6.bb25
-rw-r--r--recipes-qtopia/prboom/prboom_2.2.6.bb26
-rw-r--r--recipes-qtopia/prboom/prboom_2.3.1.bb34
-rw-r--r--recipes-qtopia/prboom/prboom_2.4.7.bb28
-rw-r--r--recipes-qtopia/prboom/prboom_2.5.0.bb30
-rw-r--r--recipes-qtopia/puzz-le/puzz-le-2.0.0/gcc3.patch24
-rw-r--r--recipes-qtopia/puzz-le/puzz-le_2.0.0.bb21
-rw-r--r--recipes-qtopia/qclockchange/files/qclockchange.desktop6
-rw-r--r--recipes-qtopia/qclockchange/files/qclockchange.pngbin0 -> 5472 bytes
-rw-r--r--recipes-qtopia/qclockchange/qclockchange_0.1b.bb27
-rw-r--r--recipes-qtopia/qcoptest/files/qcoptest.desktop6
-rw-r--r--recipes-qtopia/qcoptest/files/qcoptest.pngbin0 -> 577 bytes
-rw-r--r--recipes-qtopia/qcoptest/qcoptest_0.1.1.bb25
-rw-r--r--recipes-qtopia/qfish/qfish2_1.1.0.bb46
-rw-r--r--recipes-qtopia/qmatrix/qmatrix_1.1.0.bb44
-rw-r--r--recipes-qtopia/qpdf2/files/fix-sigsegv.patch22
-rw-r--r--recipes-qtopia/qpdf2/files/fix_qtversion_check.patch11
-rw-r--r--recipes-qtopia/qpdf2/files/gcc4.patch31
-rw-r--r--recipes-qtopia/qpdf2/files/hack-the-hack.patch173
-rw-r--r--recipes-qtopia/qpdf2/qpdf2_2.2.1.bb39
-rw-r--r--recipes-qtopia/qpe-gaim/files/buzzer-notification.patch48
-rw-r--r--recipes-qtopia/qpe-gaim/files/dont-look-for-gtk.patch18
-rw-r--r--recipes-qtopia/qpe-gaim/files/libgaim.patch408
-rw-r--r--recipes-qtopia/qpe-gaim/files/qpe-gaim.patch721
-rw-r--r--recipes-qtopia/qpe-gaim/files/vit.patch327
-rw-r--r--recipes-qtopia/qpe-gaim/qpe-gaim_20041030.bb40
-rw-r--r--recipes-qtopia/qpe-gaim/qpe-libgaim_1.5.0.bb57
-rw-r--r--recipes-qtopia/qpe-games/aliens-qt-1.0.0/Makefile.patch9
-rw-r--r--recipes-qtopia/qpe-games/aliens-qt-1.0.0/aliens.patch12
-rw-r--r--recipes-qtopia/qpe-games/aliens-qt_1.0.0.bb34
-rw-r--r--recipes-qtopia/qpe-games/atomic-1.0.1/Makefile.patch14
-rw-r--r--recipes-qtopia/qpe-games/atomic-1.0.1/atomic.patch12
-rw-r--r--recipes-qtopia/qpe-games/atomic_1.0.1.bb38
-rw-r--r--recipes-qtopia/qpe-games/checkers-1.0.5ern/checkers.patch12
-rw-r--r--recipes-qtopia/qpe-games/checkers_1.0.5ern.bb29
-rw-r--r--recipes-qtopia/qpe-games/crossword-0.0.3/crossword.patch12
-rw-r--r--recipes-qtopia/qpe-games/crossword_0.0.3.bb37
-rw-r--r--recipes-qtopia/qpe-games/fish-1.1.0/Makefile.patch8
-rw-r--r--recipes-qtopia/qpe-games/fish-1.1.0/fish.patch12
-rw-r--r--recipes-qtopia/qpe-games/fish_1.1.0.bb35
-rw-r--r--recipes-qtopia/qpe-games/glider-1.0.0/Makefile.patch8
-rw-r--r--recipes-qtopia/qpe-games/glider-1.0.0/glider.patch12
-rw-r--r--recipes-qtopia/qpe-games/glider_1.0.0.bb33
-rw-r--r--recipes-qtopia/qpe-games/hexatrolic_1.0beta3.bb27
-rw-r--r--recipes-qtopia/qpe-games/icebloxx-1.0.0/Makefile.patch8
-rw-r--r--recipes-qtopia/qpe-games/icebloxx-1.0.0/icebloxx.patch12
-rw-r--r--recipes-qtopia/qpe-games/icebloxx_1.0.0.bb33
-rw-r--r--recipes-qtopia/qpe-games/labyrinth_0.7.bb28
-rw-r--r--recipes-qtopia/qpe-games/mahjongg-1.0.0/Makefile.patch14
-rw-r--r--recipes-qtopia/qpe-games/mahjongg-1.0.0/mahjongg.patch12
-rw-r--r--recipes-qtopia/qpe-games/mahjongg_1.0.0.bb38
-rw-r--r--recipes-qtopia/qpe-games/maki-1.0.4ern/maki.patch12
-rw-r--r--recipes-qtopia/qpe-games/maki_1.0.4ern.bb29
-rw-r--r--recipes-qtopia/qpe-games/nmm-0.0.2/Makefile.patch9
-rw-r--r--recipes-qtopia/qpe-games/nmm-0.0.2/nmm.patch12
-rw-r--r--recipes-qtopia/qpe-games/nmm_0.0.2.bb34
-rw-r--r--recipes-qtopia/qpe-games/pairs-1.1.1/pairs.patch20
-rw-r--r--recipes-qtopia/qpe-games/pairs_1.1.1.bb35
-rw-r--r--recipes-qtopia/qpe-games/pdamaze-1.0.0/Makefile.patch20
-rw-r--r--recipes-qtopia/qpe-games/pdamaze_1.0.0.bb35
-rw-r--r--recipes-qtopia/qpe-games/pipeman-1.0.0/pipe.patch20
-rw-r--r--recipes-qtopia/qpe-games/pipeman_1.0.0.bb34
-rw-r--r--recipes-qtopia/qpe-games/shisensho-1.0.0/shisen.patch20
-rw-r--r--recipes-qtopia/qpe-games/shisensho_1.0.0.bb33
-rw-r--r--recipes-qtopia/qpe-games/sokoban-1.3.8ern/sokoban.patch20
-rw-r--r--recipes-qtopia/qpe-games/sokoban_1.3.8ern.bb34
-rw-r--r--recipes-qtopia/qpe-games/tron-1.0.0/tron.patch12
-rw-r--r--recipes-qtopia/qpe-games/tron_1.0.0.bb30
-rw-r--r--recipes-qtopia/qpe-games/win4-1.0.1/win4.patch20
-rw-r--r--recipes-qtopia/qpe-games/win4_1.0.1.bb35
-rw-r--r--recipes-qtopia/qpe-games/ziq-1.1ern/ziq.patch12
-rw-r--r--recipes-qtopia/qpe-games/ziq_1.1ern.bb34
-rw-r--r--recipes-qtopia/qpe-games/zrev7-1.0.1/zrev.patch20
-rw-r--r--recipes-qtopia/qpe-games/zrev7_1.0.1.bb29
-rw-r--r--recipes-qtopia/qpe-games/zsubhunt_1.0.0ern.bb31
-rw-r--r--recipes-qtopia/qpe-games/ztappy_0.9.3ern.bb30
-rw-r--r--recipes-qtopia/qpe-inputhelper/qpe-inputhelper-applet_1.0.0.bb20
-rw-r--r--recipes-qtopia/qpe-nmap/qpe-nmap_0.02.bb27
-rw-r--r--recipes-qtopia/qpealarmclock/qpealarmclock-1.0.9/fix-compile.patch67
-rw-r--r--recipes-qtopia/qpealarmclock/qpealarmclock_1.0.9.bb35
-rw-r--r--recipes-qtopia/qpealarmclock/qpealarmclockapplet-1.0.9/fix-compile.patch67
-rw-r--r--recipes-qtopia/qpealarmclock/qpealarmclockapplet-1.0.9/missing-files.tar.gzbin0 -> 6101 bytes
-rw-r--r--recipes-qtopia/qpealarmclock/qpealarmclockapplet_1.0.9.bb46
-rw-r--r--recipes-qtopia/qpegps/files/qpegps.desktop6
-rw-r--r--recipes-qtopia/qpegps/files/qpegps.pngbin0 -> 3606 bytes
-rw-r--r--recipes-qtopia/qpegps/qpegps.inc37
-rw-r--r--recipes-qtopia/qpegps/qpegps_0.9.2.3.3.bb6
-rw-r--r--recipes-qtopia/qpegps/qpegps_0.9.3.1.bb11
-rw-r--r--recipes-qtopia/qpegps/qpegps_svn.bb15
-rw-r--r--recipes-qtopia/qpenmapfe/files/qpenmapfe.desktop6
-rw-r--r--recipes-qtopia/qpenmapfe/files/qpenmapfe.pngbin0 -> 999 bytes
-rw-r--r--recipes-qtopia/qpenmapfe/qpenmapfe_1.0.0.bb25
-rwxr-xr-xrecipes-qtopia/qpf-fonts/files/update-qtfontdir74
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-arabic_1.0.bb11
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-bitstream-vera-sans-mono_1.10.bb39
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-bitstream-vera_1.10.bb27
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-font-common_1.0.bb14
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-freemono_1.0.bb13
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-freeserif_1.0.bb13
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-helvetica_1.0.bb12
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-hunkysans_0.3.0.bb13
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-hunkyserif_0.3.0.bb13
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-qte_2.3.10.bb38
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-qte_3.3.5.bb60
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-terminus.bb13
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-unifont_1.0.bb11
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-unismall_1.0.0.bb12
-rw-r--r--recipes-qtopia/qpf-fonts/qpf-utopia_1.0.bb12
-rw-r--r--recipes-qtopia/qpf-fonts/qpf.inc32
-rw-r--r--recipes-qtopia/qplot/qplot/gcc3.patch41
-rw-r--r--recipes-qtopia/qplot/qplot_2.0.1+cvs20020420.bb29
-rw-r--r--recipes-qtopia/qpphoto/files/draw.patch35
-rw-r--r--recipes-qtopia/qpphoto/files/drawview.patch11
-rw-r--r--recipes-qtopia/qpphoto/files/drawwidget.patch2414
-rw-r--r--recipes-qtopia/qpphoto/qpphoto_1.0.2.bb40
-rw-r--r--recipes-qtopia/qscintilla/files/no-external-lexers.patch23
-rw-r--r--recipes-qtopia/qscintilla/qscintilla_1.60-gpl-1.3.bb19
-rw-r--r--recipes-qtopia/qscintilla/qscintilla_1.60-gpl-1.3b.bb19
-rw-r--r--recipes-qtopia/qscintilla/qscintilla_1.65-gpl-1.6.bb34
-rw-r--r--recipes-qtopia/qwt/files/qt2-fix.patch408
-rw-r--r--recipes-qtopia/qwt/qwt.inc33
-rw-r--r--recipes-qtopia/qwt/qwt_4.2.0rc1.bb31
-rw-r--r--recipes-qtopia/resistorui/resistorui_0.9.bb23
-rw-r--r--recipes-qtopia/roadmap/files/cross.patch17
-rw-r--r--recipes-qtopia/roadmap/files/options.mk.patch34
-rw-r--r--recipes-qtopia/roadmap/files/qt/qt2-fixes.patch10
-rw-r--r--recipes-qtopia/roadmap/files/qt/qt_canvas.patch20
-rw-r--r--recipes-qtopia/roadmap/files/qt/qt_main.patch61
-rw-r--r--recipes-qtopia/roadmap/files/qt/roadmap_main.patch16
-rw-r--r--recipes-qtopia/roadmap/files/roadmap.desktop.patch16
-rw-r--r--recipes-qtopia/roadmap/files/roadmap_path.patch57
-rw-r--r--recipes-qtopia/roadmap/files/zroadgps.pngbin0 -> 1949 bytes
-rw-r--r--recipes-qtopia/roadmap/roadmap.inc19
-rw-r--r--recipes-qtopia/roadmap/zroadmap.inc23
-rw-r--r--recipes-qtopia/roadmap/zroadmap_1.1.0.bb21
-rw-r--r--recipes-qtopia/roadmap/zroadmap_cvs.bb16
-rw-r--r--recipes-qtopia/scummvm/files/gcc-4.x.x-accept.patch11
-rw-r--r--recipes-qtopia/scummvm/files/makefile-nostrip.patch13
-rw-r--r--recipes-qtopia/scummvm/files/mouse.patch36
-rw-r--r--recipes-qtopia/scummvm/files/no-strip.patch22
-rwxr-xr-xrecipes-qtopia/scummvm/files/om-gta01/openmoko-scummvm19
-rw-r--r--recipes-qtopia/scummvm/files/scummvm-targetcheck.patch17
-rw-r--r--recipes-qtopia/scummvm/files/scummvm.desktop12
-rw-r--r--recipes-qtopia/scummvm/files/sh3-arch-0.9.0+.patch18
-rw-r--r--recipes-qtopia/scummvm/files/sh3-linux-new-arch.patch18
-rw-r--r--recipes-qtopia/scummvm/files/shr/openmoko-scummvm19
-rw-r--r--recipes-qtopia/scummvm/files/shr/scummvm.desktop12
-rw-r--r--recipes-qtopia/scummvm/files/tail-obselete-fix.patch11
-rw-r--r--recipes-qtopia/scummvm/files/tremor.patch32
-rw-r--r--recipes-qtopia/scummvm/opie-scummvm_1.0.1.bb22
-rw-r--r--recipes-qtopia/scummvm/scummvm-0.6.0/mouse.patch36
-rw-r--r--recipes-qtopia/scummvm/scummvm-0.6.0/sword1.patch16
-rw-r--r--recipes-qtopia/scummvm/scummvm-0.6.0/tremor.patch32
-rw-r--r--recipes-qtopia/scummvm/scummvm-1.0.0/no-strip.patch20
-rw-r--r--recipes-qtopia/scummvm/scummvm-1.1.1/no-strip.patch22
-rw-r--r--recipes-qtopia/scummvm/scummvm-qpe_0.6.1b.bb10
-rw-r--r--recipes-qtopia/scummvm/scummvm.inc28
-rw-r--r--recipes-qtopia/scummvm/scummvm_0.12.0.bb38
-rw-r--r--recipes-qtopia/scummvm/scummvm_0.6.0.bb37
-rw-r--r--recipes-qtopia/scummvm/scummvm_0.6.1b.bb13
-rw-r--r--recipes-qtopia/scummvm/scummvm_0.9.0.bb13
-rw-r--r--recipes-qtopia/scummvm/scummvm_0.9.1.bb35
-rw-r--r--recipes-qtopia/scummvm/scummvm_1.0.0.bb43
-rw-r--r--recipes-qtopia/scummvm/scummvm_1.1.1.bb41
-rw-r--r--recipes-qtopia/shopper/shopper-1.2.1/gcc3.patch11
-rw-r--r--recipes-qtopia/shopper/shopper-1.2.1/path_fix.patch23
-rw-r--r--recipes-qtopia/shopper/shopper_1.2.1.bb39
-rw-r--r--recipes-qtopia/sidplayer/sidplayer-1.5.0/gcc3.patch69
-rw-r--r--recipes-qtopia/sidplayer/sidplayer-1.5.0/gcc34.patch40
-rw-r--r--recipes-qtopia/sidplayer/sidplayer-1.5.0/use-external-libsidplay.patch20
-rw-r--r--recipes-qtopia/sidplayer/sidplayer_1.5.0.bb27
-rw-r--r--recipes-qtopia/slcalc/files/slcalc.pngbin0 -> 2681 bytes
-rw-r--r--recipes-qtopia/slcalc/files/slcalc2.pngbin0 -> 7773 bytes
-rw-r--r--recipes-qtopia/slcalc/slcalc_1.2.1.bb23
-rw-r--r--recipes-qtopia/sliderulez/sliderulez_0.92.bb28
-rw-r--r--recipes-qtopia/snes9x/64bit.patch110
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb32
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl/compile.patch275
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl/gcc-4.1.patch28
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl_1.39.bb27
-rw-r--r--recipes-qtopia/snes9x/snes9x/configure.patch12
-rw-r--r--recipes-qtopia/snes9x/snes9x/linkage.patch31
-rw-r--r--recipes-qtopia/snes9x/snes9x/makefile.patch39
-rw-r--r--recipes-qtopia/snes9x/snes9x/private.patch10
-rw-r--r--recipes-qtopia/snes9x/snes9x_1.43-WIP1.bb32
-rw-r--r--recipes-qtopia/subapplet/subapplet-1.0.8/toolbar-resize-fix.patch11
-rw-r--r--recipes-qtopia/subapplet/subapplet_1.0.8.bb42
-rw-r--r--recipes-qtopia/tasklistapplet/tasklistapplet_1.0.5.bb40
-rw-r--r--recipes-qtopia/temtor/temtor_0.0.1.bb26
-rw-r--r--recipes-qtopia/tickypip/tickypip-levels_1.1.bb38
-rw-r--r--recipes-qtopia/tickypip/tickypip/path_fix.patch11
-rw-r--r--recipes-qtopia/tickypip/tickypip/tickypip.desktop10
-rw-r--r--recipes-qtopia/tickypip/tickypip/tickypip.pngbin0 -> 1093 bytes
-rw-r--r--recipes-qtopia/tickypip/tickypip_0.1.2.bb36
-rw-r--r--recipes-qtopia/timesleuth/timesleuth_1.0.5.bb27
-rw-r--r--recipes-qtopia/txdrug/txdrug-0.1/opt/QtPalmtop/apps/Applications/txdrug.desktop6
-rwxr-xr-xrecipes-qtopia/txdrug/txdrug-0.1/opt/QtPalmtop/etc/txdrug/drugs.dbbin0 -> 791552 bytes
-rw-r--r--recipes-qtopia/txdrug/txdrug-0.1/opt/QtPalmtop/pics/txdrug.pngbin0 -> 2376 bytes
-rw-r--r--recipes-qtopia/txdrug/txdrug-0.1/opt/QtPalmtop/pics/txdrug/down.pngbin0 -> 182 bytes
-rw-r--r--recipes-qtopia/txdrug/txdrug-0.1/opt/QtPalmtop/pics/txdrug/up.pngbin0 -> 175 bytes
-rw-r--r--recipes-qtopia/txdrug/txdrug_0.1.bb32
-rw-r--r--recipes-qtopia/tximage/tximage-0.2/gcc3.patch27
-rw-r--r--recipes-qtopia/tximage/tximage-0.2/gcc4.patch15
-rw-r--r--recipes-qtopia/tximage/tximage_0.2.bb24
-rw-r--r--recipes-qtopia/ubahnnav/ubahnnav/gcc45-compilation-fixes.patch109
-rw-r--r--recipes-qtopia/ubahnnav/ubahnnav/qmake.patch48
-rw-r--r--recipes-qtopia/ubahnnav/ubahnnav_0.4.1.bb39
-rw-r--r--recipes-qtopia/uqm/files/build-oe.patch58
-rw-r--r--recipes-qtopia/uqm/files/build-opts.sh15
-rw-r--r--recipes-qtopia/uqm/uqm-0.5.0/build-oe.patch40
-rw-r--r--recipes-qtopia/uqm/uqm_0.3.bb36
-rw-r--r--recipes-qtopia/uqm/uqm_0.5.0.bb37
-rw-r--r--recipes-qtopia/vectoroids/vectoroids_1.1.0.bb33
-rw-r--r--recipes-qtopia/visiscript/files/qcleanuphandler.h127
-rw-r--r--recipes-qtopia/visiscript/files/qptrlist.h9
-rw-r--r--recipes-qtopia/visiscript/visiscript_0.3.2.bb36
-rw-r--r--recipes-qtopia/visiscript/visiscript_0.4.3.bb38
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/bogusincdir.patch24
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/bufferdefaults.patch14
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/gcc34-enum.patch12
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/gcc34.patch16
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/glib2.patch196
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/gtkremoval.patch722
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/mikmod-endian.patch11
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/mikmod-update.patch11
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/removenativeincdir.patch120
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/tremorlib.patch12
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded-20040327/xmms.pngbin0 -> 2507 bytes
-rw-r--r--recipes-qtopia/xmms-embedded/xmms-embedded_20040327.bb66
-rw-r--r--recipes-qtopia/xqt/files/imake-staging.patch38
-rw-r--r--recipes-qtopia/xqt/files/moc_call.patch16
-rw-r--r--recipes-qtopia/xqt/xqt_0.0.9.bb93
-rw-r--r--recipes-qtopia/xqt2/files/KeyMap.patch19
-rw-r--r--recipes-qtopia/xqt2/files/cross.patch62
-rw-r--r--recipes-qtopia/xqt2/files/fephack.patch32
-rw-r--r--recipes-qtopia/xqt2/files/fix_qtscreen_HACK.patch55
-rw-r--r--recipes-qtopia/xqt2/files/fix_seqfault_qtscreen.patch13
-rw-r--r--recipes-qtopia/xqt2/files/imake-staging.patch38
-rw-r--r--recipes-qtopia/xqt2/files/moc_call.patch11
-rw-r--r--recipes-qtopia/xqt2/files/xchar2b.patch25
-rw-r--r--recipes-qtopia/xqt2/files/xqt-make.patch43
-rw-r--r--recipes-qtopia/xqt2/xqt2_20060509.bb123
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config.bb17
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc1
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config/defaultwm1
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher.bb34
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher/cleanup.desktop5
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher/convert.desktop5
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher/dot.directory3
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher/startxqt15
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher/startxqt-wrapper5
-rw-r--r--recipes-qtopia/xqtlauncher/xqtlauncher/xqtlauncher45
-rwxr-xr-xrecipes-qtopia/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh21
-rwxr-xr-xrecipes-qtopia/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh23
-rw-r--r--recipes-qtopia/zauralign/zauralign_1.0.2.bb24
-rw-r--r--recipes-qtopia/zbedic/libbedic_1.1.bb40
-rw-r--r--recipes-qtopia/zbedic/zbedic/include-cstdio.patch12
-rw-r--r--recipes-qtopia/zbedic/zbedic/opie-icons.patch14
-rw-r--r--recipes-qtopia/zbedic/zbedic/qtopia17.patch21
-rw-r--r--recipes-qtopia/zbedic/zbedic_1.2.bb46
-rw-r--r--recipes-qtopia/zbench/zbench_2.0.bb22
-rw-r--r--recipes-qtopia/zddice/zddice-1.0.0/qtopia17.patch25
-rw-r--r--recipes-qtopia/zddice/zddice_1.0.0.bb23
-rw-r--r--recipes-qtopia/zgscore/files/qtopia17.patch25
-rw-r--r--recipes-qtopia/zgscore/zgscore_1.0.2.bb26
-rw-r--r--recipes-qtopia/zipsc/zipsc-0.4.3/gcc3.patch961
-rw-r--r--recipes-qtopia/zipsc/zipsc_0.4.3.bb26
-rw-r--r--recipes-qtopia/zlapspeed/zlapspeed-1.0.0/qtopia17.patch25
-rw-r--r--recipes-qtopia/zlapspeed/zlapspeed_1.0.0.bb22
-rw-r--r--recipes-qtopia/zmerlin/zmerlin_0.9.1.bb23
-rw-r--r--recipes-qtopia/zrally/zrally/dir.patch11
-rw-r--r--recipes-qtopia/zrally/zrally_0.90.bb25
-rw-r--r--recipes-qtopia/zsafe/zsafe_2.1.3.bb30
-rw-r--r--recipes-qtopia/zshopi/files/zshopi.desktop6
-rw-r--r--recipes-qtopia/zshopi/files/zshopi.pngbin0 -> 2416 bytes
-rw-r--r--recipes-qtopia/zshopi/zshopi_0.2.bb45
-rw-r--r--recipes-qtopia/ztappy/ztappy_0.9.1.bb20
-rw-r--r--recipes-qtopia/zten/files/zten.patch37
-rw-r--r--recipes-qtopia/zten/zten_1.6.2.bb32
-rw-r--r--recipes-qtopia/zuc/zuc/fixed-include.patch11
-rw-r--r--recipes-qtopia/zuc/zuc_1.1.2ern.bb35
-rw-r--r--recipes-qtopia/zudoku/zudoku/zudoku.desktop6
-rw-r--r--recipes-qtopia/zudoku/zudoku/zudoku.html51
-rw-r--r--recipes-qtopia/zudoku/zudoku_1.1.bb27
467 files changed, 45165 insertions, 0 deletions
diff --git a/recipes-qtopia/aliens/aliens_1.0.0.bb b/recipes-qtopia/aliens/aliens_1.0.0.bb
new file mode 100644
index 0000000..ca6e1bb
--- /dev/null
+++ b/recipes-qtopia/aliens/aliens_1.0.0.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Classic Arcade Shooter for Qt/Embedded based palmtop environments"
+SECTION = "opie/games"
+PRIORITY = "optional"
+LICENSE = "GPL"
+APPNAME = "aliens.sdl"
+APPTYPE = "binary"
+PR = "r4"
+
+SRC_URI = "ftp://ftp.billsgames.com/unix/agenda/aliens/src/aliens_V${PV}.tar.gz"
+S = "${WORKDIR}/aliens_V${PV}"
+
+inherit opie
+
+do_compile_prepend() {
+ cd images && make && cd ..
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/pics
+ install -m 0644 aliens.png ${D}${palmtopdir}/pics/aliens.png
+}
+
+SRC_URI[md5sum] = "9d7cde75aecf4b85478c0e47343d4293"
+SRC_URI[sha256sum] = "0aa0084a74f912f4002f1c40a815ce62ac13331ec84787a954d8bea06e1c96c5"
diff --git a/recipes-qtopia/billiardz/billiardz_0.1.4.bb b/recipes-qtopia/billiardz/billiardz_0.1.4.bb
new file mode 100644
index 0000000..f8af487
--- /dev/null
+++ b/recipes-qtopia/billiardz/billiardz_0.1.4.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "Billiard Game for Qt/Embedded based palmtop environments w/ SDL."
+HOMEPAGE = "http://www.chipx86.com/projects/billiardz/"
+SECTION = "opie/games"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "libsdl-qpe libsdl-image"
+PR = "r2"
+
+SRC_URI = "http://www.chipx86.com/packages/ipkg/billiardz-${PV}.tar.gz \
+ file://gcc4.patch"
+
+SRC_URI[md5sum] = "21908ae1ee9e3cb96e9dda6f096ed13f"
+SRC_URI[sha256sum] = "23b70f94a987af6be23108a772b927a2c02060c6137b9589484e28b55c2bdebd"
+
+inherit palmtop
+
+QMAKE_PROFILES = "billiardz.arm.pro"
+EXTRA_QMAKEVARS_POST += "DEFINES-=FPM_INTEL"
+
+do_install() {
+ install -d ${D}${palmtopdir}/bin \
+ ${D}${palmtopdir}/apps/ \
+ ${D}${palmtopdir}/apps/Games \
+ ${D}${palmtopdir}/pics \
+ ${D}${palmtopdir}/pics/billiardz
+ install -m 0755 billiardz ${D}${palmtopdir}/bin/billiardz
+ install -m 0644 billiardz.png ${D}${palmtopdir}/pics/billiardz.png
+ cp -pPR images/*.png ${D}${palmtopdir}/pics/billiardz
+
+ echo "[Desktop Entry] " >${D}${palmtopdir}/apps/Games/billiardz.desktop
+ echo "Comment=Billiards for Zaurus" >>${D}${palmtopdir}/apps/Games/billiardz.desktop
+ echo "Exec=billiardz" >>${D}${palmtopdir}/apps/Games/billiardz.desktop
+ echo "Icon=billiardz" >>${D}${palmtopdir}/apps/Games/billiardz.desktop
+ echo "Type=Application" >>${D}${palmtopdir}/apps/Games/billiardz.desktop
+ echo "Name=BilliardZ" >>${D}${palmtopdir}/apps/Games/billiardz.desktop
+}
diff --git a/recipes-qtopia/billiardz/files/gcc4.patch b/recipes-qtopia/billiardz/files/gcc4.patch
new file mode 100644
index 0000000..30d7eda
--- /dev/null
+++ b/recipes-qtopia/billiardz/files/gcc4.patch
@@ -0,0 +1,45 @@
+diff -Naur billiardz-0.1.4-orig/src/ButtonListener.h billiardz-0.1.4/src/ButtonListener.h
+--- billiardz-0.1.4-orig/src/ButtonListener.h 2002-11-05 07:01:51.000000000 +0100
++++ billiardz-0.1.4/src/ButtonListener.h 2007-03-26 21:10:11.000000000 +0200
+@@ -9,6 +9,7 @@
+ {
+ public:
+ virtual void buttonClicked(Button *button) = 0;
++ virtual ~ButtonListener() {}
+ };
+
+ #endif /* _BUTTONLISTENER_H_ */
+diff -Naur billiardz-0.1.4-orig/src/CueStickListener.h billiardz-0.1.4/src/CueStickListener.h
+--- billiardz-0.1.4-orig/src/CueStickListener.h 2002-09-13 02:02:23.000000000 +0200
++++ billiardz-0.1.4/src/CueStickListener.h 2007-03-26 21:11:14.000000000 +0200
+@@ -12,6 +12,7 @@
+ virtual bool cueBallHit(CueStick *stick, Ball *ball) = 0;
+ virtual void stickMoved(CueStick *stick, Fixed oldAngle,
+ Fixed newAngle) = 0;
++ virtual ~CueStickListener() {}
+ };
+
+ #endif /* _CUESTICKLISTENER_H_ */
+diff -Naur billiardz-0.1.4-orig/src/PoolGame.h billiardz-0.1.4/src/PoolGame.h
+--- billiardz-0.1.4-orig/src/PoolGame.h 2002-11-05 07:01:36.000000000 +0100
++++ billiardz-0.1.4/src/PoolGame.h 2007-03-26 21:40:58.000000000 +0200
+@@ -6,6 +6,7 @@
+
+ class Player;
+ class PoolTable;
++class PoolRoom;
+ class Physics;
+ class Rules;
+ class Sprite;
+diff -Naur billiardz-0.1.4-orig/src/main.cpp billiardz-0.1.4/src/main.cpp
+--- billiardz-0.1.4-orig/src/main.cpp 2003-11-03 07:56:29.000000000 +0100
++++ billiardz-0.1.4/src/main.cpp 2007-03-26 23:27:11.000000000 +0200
+@@ -51,7 +51,7 @@
+
+ return interval;
+ }
+-
++#define SDL_main main
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/recipes-qtopia/brickout/brickout-2002.06.09/directories.patch b/recipes-qtopia/brickout/brickout-2002.06.09/directories.patch
new file mode 100644
index 0000000..02b9561
--- /dev/null
+++ b/recipes-qtopia/brickout/brickout-2002.06.09/directories.patch
@@ -0,0 +1,18 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- brickout-2002.06.09/brickout.c~directories 2002-06-10 09:47:53.000000000 +0200
++++ brickout-2002.06.09/brickout.c 2004-01-26 16:39:25.000000000 +0100
+@@ -15,6 +15,10 @@
+ May 17, 2001 - June 9, 2002
+ */
+
++#define IMAGEDIR "/opt/QtPalmtop/share/brickout/images/"
++#define SOUNDDIR "/opt/QtPalmtop/share/brickout/sounds/"
++#define MUSICDIR "/opt/QtPalmtop/share/brickout/music/"
++#define THE_IMAGES
+
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/recipes-qtopia/brickout/brickout_2002.06.09.bb b/recipes-qtopia/brickout/brickout_2002.06.09.bb
new file mode 100644
index 0000000..f0a5377
--- /dev/null
+++ b/recipes-qtopia/brickout/brickout_2002.06.09.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "Clone of the classic arcade game Asteroids for Qt/Embedded based palmtop environments w/ SDL"
+SECTION = "opie/games"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "libsdl-qpe libsdl-mixer libsdl-image"
+PR = "r4"
+
+SRC_URI = "ftp://ftp.billsgames.com/unix/agenda/brickout/src/brickout-${PV}.tar.gz \
+ file://directories.patch"
+
+inherit palmtop
+
+EXTRA_QMAKEVARS_POST += " INCLUDEPATH+=${STAGING_INCDIR}/SDL LIBS+=-lSDL LIBS+=-lSDL_mixer LIBS+=-lSDLmain \
+ LIBS+=-lSDL_image LIBS+=-lpthread TARGET=brickout DEFINES+=USE_SDL "
+
+do_configure_prepend() {
+ qmake -project -o brickout.pro
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/bin \
+ ${D}${palmtopdir}/apps/Games \
+ ${D}${palmtopdir}/pics \
+ ${D}${palmtopdir}/share/brickout/sounds \
+ ${D}${palmtopdir}/share/brickout/music \
+ ${D}${palmtopdir}/share/brickout/images
+ install -D -m 0755 brickout ${D}${palmtopdir}/bin/brickout
+ install -D -m 0644 brickout.png ${D}${palmtopdir}/pics/brickout.png
+
+ cp -pPR sounds/* ${D}${palmtopdir}/share/brickout/sounds/
+ cp -pPR music/* ${D}${palmtopdir}/share/brickout/music/
+ cp -pPR images-sdl/* ${D}${palmtopdir}/share/brickout/images/
+
+ echo "[Desktop Entry]" >${D}${palmtopdir}/apps/Games/brickout.desktop
+ echo "Comment=Arkanoid game" >>${D}${palmtopdir}/apps/Games/brickout.desktop
+ echo "Exec=brickout" >>${D}${palmtopdir}/apps/Games/brickout.desktop
+ echo "Icon=brickout" >>${D}${palmtopdir}/apps/Games/brickout.desktop
+ echo "Type=Application" >>${D}${palmtopdir}/apps/Games/brickout.desktop
+ echo "Name=Brickout" >>${D}${palmtopdir}/apps/Games/brickout.desktop
+}
+
+SRC_URI[md5sum] = "f191a5658e4262e85499e5b69433af89"
+SRC_URI[sha256sum] = "56e0abb8697b62949ab085419a3b6f83dd13db02d322759f4cd6c5e5286c2240"
diff --git a/recipes-qtopia/camera-assistant/ca.desktop b/recipes-qtopia/camera-assistant/ca.desktop
new file mode 100644
index 0000000..b6ab5be
--- /dev/null
+++ b/recipes-qtopia/camera-assistant/ca.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Comment=Camera Assistant
+Exec=ca
+Icon=ca/ca
+Type=Application
+Name=Camera Assistant
diff --git a/recipes-qtopia/camera-assistant/ca.png b/recipes-qtopia/camera-assistant/ca.png
new file mode 100644
index 0000000..d28cfbe
--- /dev/null
+++ b/recipes-qtopia/camera-assistant/ca.png
Binary files differ
diff --git a/recipes-qtopia/camera-assistant/camera-assistant_0.2.0.bb b/recipes-qtopia/camera-assistant/camera-assistant_0.2.0.bb
new file mode 100644
index 0000000..bb4995a
--- /dev/null
+++ b/recipes-qtopia/camera-assistant/camera-assistant_0.2.0.bb
@@ -0,0 +1,40 @@
+DESCRIPTION = "Camera Assistant aims to be an allround calculator for photographers & Cinematographers. \
+It currently has the following features: \
+ \
+ * Depth of field calculator. \
+ * Inverse Depth of field calculator. (Calculate what aperture you need for a given depth/distance & lens) \
+ * Field of view calculator. \
+ * Variants of the above, calculate distance to object or lens for a given field of view. \
+ * Database of TV cameras, Motion picture cameras and Still photography cameras."
+SECTION = "opie/applications"
+
+
+PRIORITY = "optional"
+LICENSE = "GPL"
+AUTHOR = "zaurus@bredband.net"
+HOMEPAGE = "http://cameraassistant.sourceforge.net/"
+
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/cameraassistant/camera-assistant_0.2.0.tar.gz \
+ file://g++-3.4-compile-fixes.patch \
+ file://ca.desktop \
+ file://ca.png "
+
+
+S = "${WORKDIR}/CameraAssistant"
+
+APPNAME = "ca"
+APPTYPE = "binary"
+APPDESKTOP = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${palmtopdir}/pics/${APPNAME}/
+ install -m 0644 ${WORKDIR}/ca.png ${D}${palmtopdir}/pics/${APPNAME}/
+}
+
+
+inherit opie
+
+
+SRC_URI[md5sum] = "538e8d4691062524c4181da487d83250"
+SRC_URI[sha256sum] = "9caa3e654af03e55582dd515bfcc9bf5aa93c9d22842af16a87a9a226ec581ed"
diff --git a/recipes-qtopia/camera-assistant/g++-3.4-compile-fixes.patch b/recipes-qtopia/camera-assistant/g++-3.4-compile-fixes.patch
new file mode 100644
index 0000000..383d083
--- /dev/null
+++ b/recipes-qtopia/camera-assistant/g++-3.4-compile-fixes.patch
@@ -0,0 +1,155 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- CameraAssistant/defaultconfig.h~g++-3.4-compile-fixes
++++ CameraAssistant/defaultconfig.h
+@@ -2,76 +2,75 @@
+ #define DEFAULTCONFIG_H
+
+ char defaultConfig[]=
+-"
+-<CameraAssistant>
+- <Settings version=\"0.0.3\">
+- <defaultAdjustments value='1'/>
+- <defaultCameraCategory value='Photo'/>
+- <defaultCameraType value='35mm'/>
+- <defaultAspectRatio value='Full aperture'/>
+- </Settings>
+- <Cameras>
+- <CameraCategory name='Television'>
+- <CameraType name='1/4\"' coc='0.00800' width='3.2' height='2.4' />
+- <CameraType name='1/3\"' coc='0.01100' width='4.8' height='3.6' />
+- <CameraType name='1/2\"' coc='0.01500' width='6.4' height='4.8' />
+- <CameraType name='2/3\"' coc='0.02000' width='8.8' height='6.6'>
+- <AspectRatio name='4:3' />
+- <AspectRatio name='16:9' aspectratio='1.77778' />
+- </CameraType>
+- <CameraType name='1\"' coc='0.03000' width='12.7' height='9.525' />
+- </CameraCategory>
+- <CameraCategory name='Film'>
+- <CameraType name='16mm' coc='0.01524' width='10.2616' height='7.493'>
+- <AspectRatio name='Full aperture' />
+- <AspectRatio name='TV (station)' width='9.652' height='7.2644' />
+- <AspectRatio name='TV (transmitted)' width='9.3472' height='7.0104' />
+- <AspectRatio name='TV (safe action)' width='8.4074' height='6.2992' />
+- <AspectRatio name='TV (safe title)' width='7.4422' height='5.6134' />
+- <AspectRatio name='1.85:1' width='9.602' height='5.207' />
+- </CameraType>
+- <CameraType name='16mm (super)' coc='0.01524' width='12.5222' height='7.4168'>
+- <AspectRatio name='Full aperture' />
+- <AspectRatio name='1.66' width='11.7602' height='7.0866' />
+- <AspectRatio name='1.85' width='11.7602' height='6.3754' />
+- </CameraType>
+- <CameraType name='35mm' coc='0.02540' width='21.9456' height='16.002'>
+- <AspectRatio name='Full aperture' />
+- <AspectRatio name='TV (station)' width='20.7264' height='15.5448' />
+- <AspectRatio name='TV (transmitted)' width='20.1168' height='15.0876' />
+- <AspectRatio name='TV (safe action)' width='18.1102' height='13.589' />
+- <AspectRatio name='TV (safe title)' width='16.002' height='12.085' />
+- <AspectRatio name='1.37:1' width='20.955' height='15.2908' />
+- <AspectRatio name='1.66:1' width='20.955' height='12.6238' />
+- <AspectRatio name='1.75:1' width='20.955' height='11.9634' />
+- <AspectRatio name='1.85:1' width='20.955' height='11.3284' />
+- </CameraType>
+- <CameraType name='35mm (super)' coc='0.02540' width='24.892' height='18.669'>
+- <AspectRatio name='Full aperture' />
+- <AspectRatio name='FLAT 1.85:1' width='24.003' height='12.9794' />
+- <AspectRatio name='2.20:1' width='24.003' height='10.0076' />
+- <AspectRatio name='2.40:1' width='24.003' height='10.922' />
+- </CameraType>
+- <CameraType name='65mm' coc='0.03556' width='52.4764' height='23.0124' />
+- <CameraType name='70mm' coc='0.03556' width='48.5648' height='22.098' />
+- <CameraType name='Omnimax' coc='0.03556' width='37.719' height='25.1714' />
+- </CameraCategory>
+- <CameraCategory name='Photo'>
+- <CameraType name='APS' width='30.2' height='16.7' coc='0.01995'>
+- <AspectRatio name='H' aspectratio='1.80838' />
+- <AspectRatio name='C' aspectratio='-1.49701' />
+- <AspectRatio name='P' aspectratio='3.02' />
+- </CameraType>
+- <CameraType name='35mm' width='36' height='24' coc='0.02501'>
+- <AspectRatio name='Full aperture' />
+- <AspectRatio name='Panorama' aspectratio='2.70677' />
+- </CameraType>
+- <CameraType name='6x4.5' width='56' height='42' coc='0.04335' />
+- <CameraType name='6x6' width='56' height='56' coc='0.04905' />
+- <CameraType name='6x7' width='56' height='69.5' coc='0.05329' />
+- <CameraType name='6x9' width='56' height='84' coc='0.06252' />
+- </CameraCategory>
+- </Cameras>
+-</CameraAssistant>
+-";
++""
++"<CameraAssistant>"
++" <Settings version=\"0.0.3\">"
++" <defaultAdjustments value='1'/>"
++" <defaultCameraCategory value='Photo'/>"
++" <defaultCameraType value='35mm'/>"
++" <defaultAspectRatio value='Full aperture'/>"
++" </Settings>"
++" <Cameras>"
++" <CameraCategory name='Television'>"
++" <CameraType name='1/4\"' coc='0.00800' width='3.2' height='2.4' />"
++" <CameraType name='1/3\"' coc='0.01100' width='4.8' height='3.6' />"
++" <CameraType name='1/2\"' coc='0.01500' width='6.4' height='4.8' />"
++" <CameraType name='2/3\"' coc='0.02000' width='8.8' height='6.6'>"
++" <AspectRatio name='4:3' />"
++" <AspectRatio name='16:9' aspectratio='1.77778' />"
++" </CameraType>"
++" <CameraType name='1\"' coc='0.03000' width='12.7' height='9.525' />"
++" </CameraCategory>"
++" <CameraCategory name='Film'>"
++" <CameraType name='16mm' coc='0.01524' width='10.2616' height='7.493'>"
++" <AspectRatio name='Full aperture' />"
++" <AspectRatio name='TV (station)' width='9.652' height='7.2644' />"
++" <AspectRatio name='TV (transmitted)' width='9.3472' height='7.0104' />"
++" <AspectRatio name='TV (safe action)' width='8.4074' height='6.2992' />"
++" <AspectRatio name='TV (safe title)' width='7.4422' height='5.6134' />"
++" <AspectRatio name='1.85:1' width='9.602' height='5.207' />"
++" </CameraType>"
++" <CameraType name='16mm (super)' coc='0.01524' width='12.5222' height='7.4168'>"
++" <AspectRatio name='Full aperture' />"
++" <AspectRatio name='1.66' width='11.7602' height='7.0866' />"
++" <AspectRatio name='1.85' width='11.7602' height='6.3754' />"
++" </CameraType>"
++" <CameraType name='35mm' coc='0.02540' width='21.9456' height='16.002'>"
++" <AspectRatio name='Full aperture' />"
++" <AspectRatio name='TV (station)' width='20.7264' height='15.5448' />"
++" <AspectRatio name='TV (transmitted)' width='20.1168' height='15.0876' />"
++" <AspectRatio name='TV (safe action)' width='18.1102' height='13.589' />"
++" <AspectRatio name='TV (safe title)' width='16.002' height='12.085' />"
++" <AspectRatio name='1.37:1' width='20.955' height='15.2908' />"
++" <AspectRatio name='1.66:1' width='20.955' height='12.6238' />"
++" <AspectRatio name='1.75:1' width='20.955' height='11.9634' />"
++" <AspectRatio name='1.85:1' width='20.955' height='11.3284' />"
++" </CameraType>"
++" <CameraType name='35mm (super)' coc='0.02540' width='24.892' height='18.669'>"
++" <AspectRatio name='Full aperture' />"
++" <AspectRatio name='FLAT 1.85:1' width='24.003' height='12.9794' />"
++" <AspectRatio name='2.20:1' width='24.003' height='10.0076' />"
++" <AspectRatio name='2.40:1' width='24.003' height='10.922' />"
++" </CameraType>"
++" <CameraType name='65mm' coc='0.03556' width='52.4764' height='23.0124' />"
++" <CameraType name='70mm' coc='0.03556' width='48.5648' height='22.098' />"
++" <CameraType name='Omnimax' coc='0.03556' width='37.719' height='25.1714' />"
++" </CameraCategory>"
++" <CameraCategory name='Photo'>"
++" <CameraType name='APS' width='30.2' height='16.7' coc='0.01995'>"
++" <AspectRatio name='H' aspectratio='1.80838' />"
++" <AspectRatio name='C' aspectratio='-1.49701' />"
++" <AspectRatio name='P' aspectratio='3.02' />"
++" </CameraType>"
++" <CameraType name='35mm' width='36' height='24' coc='0.02501'>"
++" <AspectRatio name='Full aperture' />"
++" <AspectRatio name='Panorama' aspectratio='2.70677' />"
++" </CameraType>"
++" <CameraType name='6x4.5' width='56' height='42' coc='0.04335' />"
++" <CameraType name='6x6' width='56' height='56' coc='0.04905' />"
++" <CameraType name='6x7' width='56' height='69.5' coc='0.05329' />"
++" <CameraType name='6x9' width='56' height='84' coc='0.06252' />"
++" </CameraCategory>"
++" </Cameras>"
++"</CameraAssistant>";
+ #endif // DEFAULTCONFIG_H
diff --git a/recipes-qtopia/corsair/corsair_0.2.6.bb b/recipes-qtopia/corsair/corsair_0.2.6.bb
new file mode 100644
index 0000000..0a566df
--- /dev/null
+++ b/recipes-qtopia/corsair/corsair_0.2.6.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "RSS aggregator for Qtopia"
+SECTION = "opie/applications"
+LICENSE = "GPL"
+AUTHOR = "Joe Rumsey <joe@rumsey.org>"
+HOMEPAGE = "http://corsair.sf.net/"
+RDEPENDS_${PN} = "opie-pics"
+
+PR = "r2"
+
+inherit palmtop
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/corsair/corsair-${PV}.tar.gz \
+ file://corsair-opie.patch"
+
+S = "${WORKDIR}/corsair"
+
+do_configure() {
+}
+
+do_compile() {
+ oe_runmake LIBS="-l${QT_LIBRARY} -lqpe"
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/pics/
+ install -d ${D}${palmtopdir}/apps/Applications/
+ install -d ${D}${palmtopdir}/bin
+ install -m 0644 ${S}/Corsair.png ${D}${palmtopdir}/pics/
+ install -m 0644 ${S}/corsair.desktop ${D}${palmtopdir}/apps/Applications/
+ install -m 0644 ${S}/icons/newfeed.png ${S}/icons/get.png ${D}${palmtopdir}/pics/
+ install -m 0755 ${S}/corsair ${D}${palmtopdir}/bin/
+}
+
+SRC_URI[md5sum] = "91dd4c6b5650aef03b293aa9a6f54d49"
+SRC_URI[sha256sum] = "db3782e57882a36ac42b69097a817dc3e2a4031cacb815a4e4a1115da108e519"
diff --git a/recipes-qtopia/corsair/files/corsair-opie.patch b/recipes-qtopia/corsair/files/corsair-opie.patch
new file mode 100644
index 0000000..49f9244
--- /dev/null
+++ b/recipes-qtopia/corsair/files/corsair-opie.patch
@@ -0,0 +1,364 @@
+--- corsair/corsair.cpp~corsair-opie
++++ corsair/corsair.cpp
+@@ -177,7 +177,7 @@
+
+ QString CorsairWindow::homeDir()
+ {
+- QString home = Global::homeDirPath();
++ QString home = QDir::homeDirPath();
+ if(home == "/home" && option("homeReallyIsHome", "false") != "true") {
+ home = "/media";
+ }
+@@ -274,7 +274,8 @@
+ QString corsairDir = topDir();
+
+ // Don't let device power off while downloading. Will be reenabled when download completes.
+- QPEApplication::setTempScreenSaverMode(QPEApplication::DisableSuspend);
++ //QPEApplication::setTempScreenSaverMode(QPEApplication::DisableSuspend);
++ QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend;
+
+ Download *dl = NULL;
+
+@@ -410,7 +410,8 @@
+
+ if(m_runningDownloads.isEmpty()) {
+ emit statusUpdate(res == Download::Success ? "Ready" : "Error");
+- QPEApplication::setTempScreenSaverMode(QPEApplication::Enable);
++ //QPEApplication::setTempScreenSaverMode(QPEApplication::Enable);
++ QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
+ }
+
+ delete dl;
+--- corsair/Makefile 2006-07-12 09:13:51.000000000 +0200
++++ corsair/Makefile.opie 2006-12-31 09:43:08.000000000 +0100
+@@ -13,12 +13,12 @@
+ # 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.
+-
+-INCLUDES=-I/opt/Qtopia/include/
+-CXXFLAGS=-O $(INCLUDES) -DQWS -fno-rtti -fno-exceptions
+-LDFLAGS=-L $(QTDIR)/lib/
+-LIBS=-lqte -lqpe -lqtopia -ljpeg -luuid
+-
++
++INCLUDES=-I$(QTDIR)/include
++CXXFLAGS += $(INCLUDES) -DQWS -fno-rtti -fno-exceptions
++LDFLAGS +=-L $(QTDIR)/lib/
++
++
+ SOURCES = main.cpp corsair.cpp feeds.cpp download.cpp info.cpp
+ MOCS = corsair_moc.cpp download_moc.cpp feeds_moc.cpp info_moc.cpp
+
+@@ -28,12 +28,16 @@ ICONS=icons/newfeed.png \
+ icons/play.png
+
+ %_moc.cpp: %.h
+- $(QTDIR)/bin/moc -o $@ $^
++ $(OE_QMAKE_MOC) -o $@ $^
++
++# %.o: %.cpp
++# $(CXX) $(CXXFLAGS) -I$(QTDIR)/include -c -o $@ $^
++
+
+ OBJS = $(SOURCES:.cpp=.o) $(MOCS:.cpp=.o)
+
+ corsair: $(OBJS)
+- $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+ install: corsair
+ cp corsair.desktop $(QPEDIR)/apps/Applications
+@@ -52,291 +56,4 @@ depend:
+ makedepend $(INCLUDES) $(SOURCES)
+
+ web:
+- rsync -e ssh CHANGELOG FAQ README website/* tinyogre@shell.sourceforge.net:/home/groups/c/co/corsair/htdocs/
+-
+-# DO NOT DELETE
+-
+-main.o: /opt/Qtopia/include/qmainwindow.h /opt/Qtopia/include/qwidget.h
+-main.o: /opt/Qtopia/include/qwindowdefs.h /opt/Qtopia/include/qobjectdefs.h
+-main.o: /opt/Qtopia/include/qglobal.h /opt/Qtopia/include/qconfig.h
+-main.o: /opt/Qtopia/include/qfeatures.h /opt/Qtopia/include/qstring.h
+-main.o: /opt/Qtopia/include/qcstring.h /opt/Qtopia/include/qarray.h
+-main.o: /opt/Qtopia/include/qgarray.h /opt/Qtopia/include/qshared.h
+-main.o: /usr/include/string.h /usr/include/features.h
+-main.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
+-main.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stddef.h
+-main.o: /opt/Qtopia/include/qnamespace.h /usr/include/limits.h
+-main.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/limits.h
+-main.o: /opt/Qtopia/include/qobject.h /opt/Qtopia/include/qevent.h
+-main.o: /opt/Qtopia/include/qregion.h /opt/Qtopia/include/qrect.h
+-main.o: /opt/Qtopia/include/qsize.h /opt/Qtopia/include/qpoint.h
+-main.o: /opt/Qtopia/include/qmime.h /opt/Qtopia/include/qstringlist.h
+-main.o: /opt/Qtopia/include/qvaluelist.h /opt/Qtopia/include/qdatastream.h
+-main.o: /opt/Qtopia/include/qiodevice.h /opt/Qtopia/include/qregexp.h
+-main.o: /opt/Qtopia/include/qpaintdevice.h /opt/Qtopia/include/qpalette.h
+-main.o: /opt/Qtopia/include/qcolor.h /opt/Qtopia/include/qbrush.h
+-main.o: /opt/Qtopia/include/qcursor.h /opt/Qtopia/include/qfont.h
+-main.o: /opt/Qtopia/include/qfontmetrics.h /opt/Qtopia/include/qfontinfo.h
+-main.o: /opt/Qtopia/include/qstyle.h /opt/Qtopia/include/qsizepolicy.h
+-main.o: /opt/Qtopia/include/qpe/qpeapplication.h
+-main.o: /opt/Qtopia/include/qtopia/qpeglobal.h
+-main.o: /opt/Qtopia/include/qapplication.h /opt/Qtopia/include/qasciidict.h
+-main.o: /opt/Qtopia/include/qgdict.h /opt/Qtopia/include/qcollection.h
+-main.o: /opt/Qtopia/include/qtranslator.h /opt/Qtopia/include/qintdict.h
+-main.o: /opt/Qtopia/include/qdialog.h /opt/Qtopia/include/qtopia/timestring.h
+-main.o: /opt/Qtopia/include/qdatetime.h /opt/Qtopia/include/qmap.h
+-main.o: /opt/Qtopia/include/qtopia/applicationinterface.h
+-main.o: /opt/Qtopia/include/qtopia/qcom.h /opt/Qtopia/include/qtopia/quuid.h
+-main.o: /usr/include/memory.h /opt/Qtopia/include/qmetaobject.h
+-main.o: /opt/Qtopia/include/qconnection.h /opt/Qtopia/include/qstrlist.h
+-main.o: /opt/Qtopia/include/qlist.h /opt/Qtopia/include/qglist.h
+-main.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stdarg.h corsair.h
+-main.o: feeds.h /opt/Qtopia/include/qxml.h /opt/Qtopia/include/qmodules.h
+-main.o: /opt/Qtopia/include/qtextstream.h /usr/include/stdio.h
+-main.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+-main.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+-main.o: /usr/include/_G_config.h /usr/include/wchar.h
+-main.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+-main.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
+-main.o: /opt/Qtopia/include/qfile.h /opt/Qtopia/include/qvaluestack.h
+-main.o: /opt/Qtopia/include/qlistview.h /opt/Qtopia/include/qscrollview.h
+-main.o: /opt/Qtopia/include/qframe.h /opt/Qtopia/include/qscrollbar.h
+-main.o: /opt/Qtopia/include/qrangecontrol.h /opt/Qtopia/include/qdrawutil.h
+-main.o: /opt/Qtopia/include/qpainter.h /opt/Qtopia/include/qpen.h
+-main.o: /opt/Qtopia/include/qpointarray.h /opt/Qtopia/include/qwmatrix.h
+-main.o: log.h download.h /opt/Qtopia/include/qsocket.h
+-main.o: /opt/Qtopia/include/qsocketdevice.h
+-main.o: /opt/Qtopia/include/qhostaddress.h
+-main.o: /opt/Qtopia/include/qsocketnotifier.h /opt/Qtopia/include/qurl.h
+-main.o: /opt/Qtopia/include/qdir.h /opt/Qtopia/include/qfileinfo.h version.h
+-corsair.o: /opt/Qtopia/include/qmainwindow.h /opt/Qtopia/include/qwidget.h
+-corsair.o: /opt/Qtopia/include/qwindowdefs.h
+-corsair.o: /opt/Qtopia/include/qobjectdefs.h /opt/Qtopia/include/qglobal.h
+-corsair.o: /opt/Qtopia/include/qconfig.h /opt/Qtopia/include/qfeatures.h
+-corsair.o: /opt/Qtopia/include/qstring.h /opt/Qtopia/include/qcstring.h
+-corsair.o: /opt/Qtopia/include/qarray.h /opt/Qtopia/include/qgarray.h
+-corsair.o: /opt/Qtopia/include/qshared.h /usr/include/string.h
+-corsair.o: /usr/include/features.h /usr/include/sys/cdefs.h
+-corsair.o: /usr/include/gnu/stubs.h
+-corsair.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stddef.h
+-corsair.o: /opt/Qtopia/include/qnamespace.h /usr/include/limits.h
+-corsair.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/limits.h
+-corsair.o: /opt/Qtopia/include/qobject.h /opt/Qtopia/include/qevent.h
+-corsair.o: /opt/Qtopia/include/qregion.h /opt/Qtopia/include/qrect.h
+-corsair.o: /opt/Qtopia/include/qsize.h /opt/Qtopia/include/qpoint.h
+-corsair.o: /opt/Qtopia/include/qmime.h /opt/Qtopia/include/qstringlist.h
+-corsair.o: /opt/Qtopia/include/qvaluelist.h /opt/Qtopia/include/qdatastream.h
+-corsair.o: /opt/Qtopia/include/qiodevice.h /opt/Qtopia/include/qregexp.h
+-corsair.o: /opt/Qtopia/include/qpaintdevice.h /opt/Qtopia/include/qpalette.h
+-corsair.o: /opt/Qtopia/include/qcolor.h /opt/Qtopia/include/qbrush.h
+-corsair.o: /opt/Qtopia/include/qcursor.h /opt/Qtopia/include/qfont.h
+-corsair.o: /opt/Qtopia/include/qfontmetrics.h /opt/Qtopia/include/qfontinfo.h
+-corsair.o: /opt/Qtopia/include/qstyle.h /opt/Qtopia/include/qsizepolicy.h
+-corsair.o: /opt/Qtopia/include/qpe/qpeapplication.h
+-corsair.o: /opt/Qtopia/include/qtopia/qpeglobal.h
+-corsair.o: /opt/Qtopia/include/qapplication.h
+-corsair.o: /opt/Qtopia/include/qasciidict.h /opt/Qtopia/include/qgdict.h
+-corsair.o: /opt/Qtopia/include/qcollection.h
+-corsair.o: /opt/Qtopia/include/qtranslator.h /opt/Qtopia/include/qintdict.h
+-corsair.o: /opt/Qtopia/include/qdialog.h
+-corsair.o: /opt/Qtopia/include/qtopia/timestring.h
+-corsair.o: /opt/Qtopia/include/qdatetime.h /opt/Qtopia/include/qmap.h
+-corsair.o: /opt/Qtopia/include/qtopia/applicationinterface.h
+-corsair.o: /opt/Qtopia/include/qtopia/qcom.h
+-corsair.o: /opt/Qtopia/include/qtopia/quuid.h /usr/include/memory.h
+-corsair.o: /opt/Qtopia/include/qmetaobject.h
+-corsair.o: /opt/Qtopia/include/qconnection.h /opt/Qtopia/include/qstrlist.h
+-corsair.o: /opt/Qtopia/include/qlist.h /opt/Qtopia/include/qglist.h corsair.h
+-corsair.o: feeds.h /opt/Qtopia/include/qxml.h /opt/Qtopia/include/qmodules.h
+-corsair.o: /opt/Qtopia/include/qtextstream.h /usr/include/stdio.h
+-corsair.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+-corsair.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+-corsair.o: /usr/include/_G_config.h /usr/include/wchar.h
+-corsair.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+-corsair.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stdarg.h
+-corsair.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
+-corsair.o: /opt/Qtopia/include/qfile.h /opt/Qtopia/include/qvaluestack.h
+-corsair.o: /opt/Qtopia/include/qlistview.h /opt/Qtopia/include/qscrollview.h
+-corsair.o: /opt/Qtopia/include/qframe.h /opt/Qtopia/include/qscrollbar.h
+-corsair.o: /opt/Qtopia/include/qrangecontrol.h
+-corsair.o: /opt/Qtopia/include/qdrawutil.h /opt/Qtopia/include/qpainter.h
+-corsair.o: /opt/Qtopia/include/qpen.h /opt/Qtopia/include/qpointarray.h
+-corsair.o: /opt/Qtopia/include/qwmatrix.h log.h download.h
+-corsair.o: /opt/Qtopia/include/qsocket.h /opt/Qtopia/include/qsocketdevice.h
+-corsair.o: /opt/Qtopia/include/qhostaddress.h
+-corsair.o: /opt/Qtopia/include/qsocketnotifier.h /opt/Qtopia/include/qurl.h
+-corsair.o: /opt/Qtopia/include/qdir.h /opt/Qtopia/include/qfileinfo.h
+-corsair.o: version.h /opt/Qtopia/include/qtextbrowser.h
+-corsair.o: /opt/Qtopia/include/qpixmap.h /opt/Qtopia/include/qtextview.h
+-corsair.o: /opt/Qtopia/include/qtoolbar.h /opt/Qtopia/include/qtoolbutton.h
+-corsair.o: /opt/Qtopia/include/qbutton.h /opt/Qtopia/include/qiconset.h
+-corsair.o: /opt/Qtopia/include/qstatusbar.h /opt/Qtopia/include/qlineedit.h
+-corsair.o: /opt/Qtopia/include/qhbox.h /opt/Qtopia/include/qlayout.h
+-corsair.o: /opt/Qtopia/include/qabstractlayout.h /opt/Qtopia/include/qlabel.h
+-corsair.o: /opt/Qtopia/include/qclipboard.h /opt/Qtopia/include/qpushbutton.h
+-corsair.o: /opt/Qtopia/include/qmenubar.h /opt/Qtopia/include/qpopupmenu.h
+-corsair.o: /opt/Qtopia/include/qmenudata.h /opt/Qtopia/include/qprogressbar.h
+-corsair.o: /opt/Qtopia/include/qmessagebox.h /opt/Qtopia/include/qaccel.h
+-corsair.o: /opt/Qtopia/include/qtopia/resource.h /opt/Qtopia/include/qimage.h
+-corsair.o: /opt/Qtopia/include/qbitmap.h /opt/Qtopia/include/qtopia/config.h
+-corsair.o: /opt/Qtopia/include/qtopia/qtopiawinexport.h
+-corsair.o: /opt/Qtopia/include/qtopia/global.h
+-corsair.o: /opt/Qtopia/include/qguardedptr.h
+-corsair.o: /opt/Qtopia/include/qtopia/qcopenvelope_qws.h
+-corsair.o: /opt/Qtopia/include/qcopchannel_qws.h info.h
+-feeds.o: corsair.h feeds.h /opt/Qtopia/include/qstring.h
+-feeds.o: /opt/Qtopia/include/qcstring.h /opt/Qtopia/include/qarray.h
+-feeds.o: /opt/Qtopia/include/qgarray.h /opt/Qtopia/include/qshared.h
+-feeds.o: /opt/Qtopia/include/qglobal.h /opt/Qtopia/include/qconfig.h
+-feeds.o: /opt/Qtopia/include/qfeatures.h /usr/include/string.h
+-feeds.o: /usr/include/features.h /usr/include/sys/cdefs.h
+-feeds.o: /usr/include/gnu/stubs.h
+-feeds.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stddef.h
+-feeds.o: /opt/Qtopia/include/qlist.h /opt/Qtopia/include/qglist.h
+-feeds.o: /opt/Qtopia/include/qcollection.h /opt/Qtopia/include/qxml.h
+-feeds.o: /opt/Qtopia/include/qmodules.h /opt/Qtopia/include/qtextstream.h
+-feeds.o: /opt/Qtopia/include/qiodevice.h /usr/include/stdio.h
+-feeds.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+-feeds.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+-feeds.o: /usr/include/_G_config.h /usr/include/wchar.h
+-feeds.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+-feeds.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stdarg.h
+-feeds.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
+-feeds.o: /opt/Qtopia/include/qfile.h /opt/Qtopia/include/qstringlist.h
+-feeds.o: /opt/Qtopia/include/qvaluelist.h /opt/Qtopia/include/qdatastream.h
+-feeds.o: /opt/Qtopia/include/qregexp.h /opt/Qtopia/include/qvaluestack.h
+-feeds.o: /opt/Qtopia/include/qmap.h /opt/Qtopia/include/qlistview.h
+-feeds.o: /opt/Qtopia/include/qscrollview.h /opt/Qtopia/include/qframe.h
+-feeds.o: /opt/Qtopia/include/qwidget.h /opt/Qtopia/include/qwindowdefs.h
+-feeds.o: /opt/Qtopia/include/qobjectdefs.h /opt/Qtopia/include/qnamespace.h
+-feeds.o: /usr/include/limits.h
+-feeds.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/limits.h
+-feeds.o: /opt/Qtopia/include/qobject.h /opt/Qtopia/include/qevent.h
+-feeds.o: /opt/Qtopia/include/qregion.h /opt/Qtopia/include/qrect.h
+-feeds.o: /opt/Qtopia/include/qsize.h /opt/Qtopia/include/qpoint.h
+-feeds.o: /opt/Qtopia/include/qmime.h /opt/Qtopia/include/qpaintdevice.h
+-feeds.o: /opt/Qtopia/include/qpalette.h /opt/Qtopia/include/qcolor.h
+-feeds.o: /opt/Qtopia/include/qbrush.h /opt/Qtopia/include/qcursor.h
+-feeds.o: /opt/Qtopia/include/qfont.h /opt/Qtopia/include/qfontmetrics.h
+-feeds.o: /opt/Qtopia/include/qfontinfo.h /opt/Qtopia/include/qstyle.h
+-feeds.o: /opt/Qtopia/include/qsizepolicy.h /opt/Qtopia/include/qscrollbar.h
+-feeds.o: /opt/Qtopia/include/qrangecontrol.h /opt/Qtopia/include/qdrawutil.h
+-feeds.o: /opt/Qtopia/include/qpainter.h /opt/Qtopia/include/qpen.h
+-feeds.o: /opt/Qtopia/include/qpointarray.h /opt/Qtopia/include/qwmatrix.h
+-feeds.o: /opt/Qtopia/include/qdatetime.h log.h download.h
+-feeds.o: /opt/Qtopia/include/qsocket.h /opt/Qtopia/include/qsocketdevice.h
+-feeds.o: /opt/Qtopia/include/qhostaddress.h
+-feeds.o: /opt/Qtopia/include/qsocketnotifier.h /opt/Qtopia/include/qurl.h
+-feeds.o: /opt/Qtopia/include/qdir.h /opt/Qtopia/include/qstrlist.h
+-feeds.o: /opt/Qtopia/include/qfileinfo.h version.h
+-feeds.o: /opt/Qtopia/include/qmainwindow.h
+-feeds.o: /opt/Qtopia/include/qtopia/resource.h
+-feeds.o: /opt/Qtopia/include/qtopia/qpeglobal.h /opt/Qtopia/include/qimage.h
+-feeds.o: /opt/Qtopia/include/qpixmap.h /opt/Qtopia/include/qbitmap.h
+-feeds.o: /opt/Qtopia/include/qiconset.h opmlparser.h feedparser.h
+-feeds.o: /usr/include/ctype.h /usr/include/endian.h
+-feeds.o: /usr/include/bits/endian.h
+-download.o: corsair.h feeds.h /opt/Qtopia/include/qstring.h
+-download.o: /opt/Qtopia/include/qcstring.h /opt/Qtopia/include/qarray.h
+-download.o: /opt/Qtopia/include/qgarray.h /opt/Qtopia/include/qshared.h
+-download.o: /opt/Qtopia/include/qglobal.h /opt/Qtopia/include/qconfig.h
+-download.o: /opt/Qtopia/include/qfeatures.h /usr/include/string.h
+-download.o: /usr/include/features.h /usr/include/sys/cdefs.h
+-download.o: /usr/include/gnu/stubs.h
+-download.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stddef.h
+-download.o: /opt/Qtopia/include/qlist.h /opt/Qtopia/include/qglist.h
+-download.o: /opt/Qtopia/include/qcollection.h /opt/Qtopia/include/qxml.h
+-download.o: /opt/Qtopia/include/qmodules.h /opt/Qtopia/include/qtextstream.h
+-download.o: /opt/Qtopia/include/qiodevice.h /usr/include/stdio.h
+-download.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+-download.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+-download.o: /usr/include/_G_config.h /usr/include/wchar.h
+-download.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+-download.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stdarg.h
+-download.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
+-download.o: /opt/Qtopia/include/qfile.h /opt/Qtopia/include/qstringlist.h
+-download.o: /opt/Qtopia/include/qvaluelist.h
+-download.o: /opt/Qtopia/include/qdatastream.h /opt/Qtopia/include/qregexp.h
+-download.o: /opt/Qtopia/include/qvaluestack.h /opt/Qtopia/include/qmap.h
+-download.o: /opt/Qtopia/include/qlistview.h /opt/Qtopia/include/qscrollview.h
+-download.o: /opt/Qtopia/include/qframe.h /opt/Qtopia/include/qwidget.h
+-download.o: /opt/Qtopia/include/qwindowdefs.h
+-download.o: /opt/Qtopia/include/qobjectdefs.h
+-download.o: /opt/Qtopia/include/qnamespace.h /usr/include/limits.h
+-download.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/limits.h
+-download.o: /opt/Qtopia/include/qobject.h /opt/Qtopia/include/qevent.h
+-download.o: /opt/Qtopia/include/qregion.h /opt/Qtopia/include/qrect.h
+-download.o: /opt/Qtopia/include/qsize.h /opt/Qtopia/include/qpoint.h
+-download.o: /opt/Qtopia/include/qmime.h /opt/Qtopia/include/qpaintdevice.h
+-download.o: /opt/Qtopia/include/qpalette.h /opt/Qtopia/include/qcolor.h
+-download.o: /opt/Qtopia/include/qbrush.h /opt/Qtopia/include/qcursor.h
+-download.o: /opt/Qtopia/include/qfont.h /opt/Qtopia/include/qfontmetrics.h
+-download.o: /opt/Qtopia/include/qfontinfo.h /opt/Qtopia/include/qstyle.h
+-download.o: /opt/Qtopia/include/qsizepolicy.h
+-download.o: /opt/Qtopia/include/qscrollbar.h
+-download.o: /opt/Qtopia/include/qrangecontrol.h
+-download.o: /opt/Qtopia/include/qdrawutil.h /opt/Qtopia/include/qpainter.h
+-download.o: /opt/Qtopia/include/qpen.h /opt/Qtopia/include/qpointarray.h
+-download.o: /opt/Qtopia/include/qwmatrix.h /opt/Qtopia/include/qdatetime.h
+-download.o: log.h download.h /opt/Qtopia/include/qsocket.h
+-download.o: /opt/Qtopia/include/qsocketdevice.h
+-download.o: /opt/Qtopia/include/qhostaddress.h
+-download.o: /opt/Qtopia/include/qsocketnotifier.h /opt/Qtopia/include/qurl.h
+-download.o: /opt/Qtopia/include/qdir.h /opt/Qtopia/include/qstrlist.h
+-download.o: /opt/Qtopia/include/qfileinfo.h version.h
+-download.o: /opt/Qtopia/include/qmainwindow.h
+-info.o: corsair.h feeds.h /opt/Qtopia/include/qstring.h
+-info.o: /opt/Qtopia/include/qcstring.h /opt/Qtopia/include/qarray.h
+-info.o: /opt/Qtopia/include/qgarray.h /opt/Qtopia/include/qshared.h
+-info.o: /opt/Qtopia/include/qglobal.h /opt/Qtopia/include/qconfig.h
+-info.o: /opt/Qtopia/include/qfeatures.h /usr/include/string.h
+-info.o: /usr/include/features.h /usr/include/sys/cdefs.h
+-info.o: /usr/include/gnu/stubs.h
+-info.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stddef.h
+-info.o: /opt/Qtopia/include/qlist.h /opt/Qtopia/include/qglist.h
+-info.o: /opt/Qtopia/include/qcollection.h /opt/Qtopia/include/qxml.h
+-info.o: /opt/Qtopia/include/qmodules.h /opt/Qtopia/include/qtextstream.h
+-info.o: /opt/Qtopia/include/qiodevice.h /usr/include/stdio.h
+-info.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+-info.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+-info.o: /usr/include/_G_config.h /usr/include/wchar.h
+-info.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+-info.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/stdarg.h
+-info.o: /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
+-info.o: /opt/Qtopia/include/qfile.h /opt/Qtopia/include/qstringlist.h
+-info.o: /opt/Qtopia/include/qvaluelist.h /opt/Qtopia/include/qdatastream.h
+-info.o: /opt/Qtopia/include/qregexp.h /opt/Qtopia/include/qvaluestack.h
+-info.o: /opt/Qtopia/include/qmap.h /opt/Qtopia/include/qlistview.h
+-info.o: /opt/Qtopia/include/qscrollview.h /opt/Qtopia/include/qframe.h
+-info.o: /opt/Qtopia/include/qwidget.h /opt/Qtopia/include/qwindowdefs.h
+-info.o: /opt/Qtopia/include/qobjectdefs.h /opt/Qtopia/include/qnamespace.h
+-info.o: /usr/include/limits.h
+-info.o: /usr/lib/gcc/i386-redhat-linux/3.4.4/include/limits.h
+-info.o: /opt/Qtopia/include/qobject.h /opt/Qtopia/include/qevent.h
+-info.o: /opt/Qtopia/include/qregion.h /opt/Qtopia/include/qrect.h
+-info.o: /opt/Qtopia/include/qsize.h /opt/Qtopia/include/qpoint.h
+-info.o: /opt/Qtopia/include/qmime.h /opt/Qtopia/include/qpaintdevice.h
+-info.o: /opt/Qtopia/include/qpalette.h /opt/Qtopia/include/qcolor.h
+-info.o: /opt/Qtopia/include/qbrush.h /opt/Qtopia/include/qcursor.h
+-info.o: /opt/Qtopia/include/qfont.h /opt/Qtopia/include/qfontmetrics.h
+-info.o: /opt/Qtopia/include/qfontinfo.h /opt/Qtopia/include/qstyle.h
+-info.o: /opt/Qtopia/include/qsizepolicy.h /opt/Qtopia/include/qscrollbar.h
+-info.o: /opt/Qtopia/include/qrangecontrol.h /opt/Qtopia/include/qdrawutil.h
+-info.o: /opt/Qtopia/include/qpainter.h /opt/Qtopia/include/qpen.h
+-info.o: /opt/Qtopia/include/qpointarray.h /opt/Qtopia/include/qwmatrix.h
+-info.o: /opt/Qtopia/include/qdatetime.h log.h download.h
+-info.o: /opt/Qtopia/include/qsocket.h /opt/Qtopia/include/qsocketdevice.h
+-info.o: /opt/Qtopia/include/qhostaddress.h
+-info.o: /opt/Qtopia/include/qsocketnotifier.h /opt/Qtopia/include/qurl.h
+-info.o: /opt/Qtopia/include/qdir.h /opt/Qtopia/include/qstrlist.h
+-info.o: /opt/Qtopia/include/qfileinfo.h version.h
+-info.o: /opt/Qtopia/include/qmainwindow.h info.h
+-info.o: /opt/Qtopia/include/qtextbrowser.h /opt/Qtopia/include/qpixmap.h
+-info.o: /opt/Qtopia/include/qtextview.h /opt/Qtopia/include/qdialog.h
+-info.o: /opt/Qtopia/include/qlayout.h /opt/Qtopia/include/qabstractlayout.h
+-info.o: /opt/Qtopia/include/qlabel.h /opt/Qtopia/include/qlineedit.h
+-info.o: /opt/Qtopia/include/qhbox.h /opt/Qtopia/include/qcheckbox.h
+-info.o: /opt/Qtopia/include/qbutton.h /opt/Qtopia/include/qtopia/qprocess.h
+-info.o: /opt/Qtopia/include/qtopia/qpeglobal.h
+-info.o: /opt/Qtopia/include/qtopia/qcopenvelope_qws.h
+-info.o: /opt/Qtopia/include/qcopchannel_qws.h
++ rsync -e ssh CHANGELOG FAQ README website/* tinyogre@shell.sourceforge.net:/home/groups/c/co/corsair/htdocs/
diff --git a/recipes-qtopia/cumulus/cumulus/open_max.patch b/recipes-qtopia/cumulus/cumulus/open_max.patch
new file mode 100644
index 0000000..0a7cfcc
--- /dev/null
+++ b/recipes-qtopia/cumulus/cumulus/open_max.patch
@@ -0,0 +1,11 @@
+--- cumulus/gpscon.cpp.old 2008-11-18 23:39:12.000000000 +0000
++++ cumulus/gpscon.cpp 2008-11-18 23:43:32.000000000 +0000
+@@ -416,7 +416,7 @@
+
+ if( maxOpenFds == -1 ) // call failed
+ {
+- maxOpenFds = OPEN_MAX; // normal default from limits.h
++ maxOpenFds = sysconf(_SC_OPEN_MAX);
+ }
+ else
+ {
diff --git a/recipes-qtopia/cumulus/cumulus_1.2.1.bb b/recipes-qtopia/cumulus/cumulus_1.2.1.bb
new file mode 100644
index 0000000..e636a7f
--- /dev/null
+++ b/recipes-qtopia/cumulus/cumulus_1.2.1.bb
@@ -0,0 +1,46 @@
+DESCRIPTION = "A flightcomputer application for Qt/E based Palmtop Environments"
+SECTION = "opie/applications"
+PRIORITY = "optional"
+LICENSE = "GPL"
+APPTYPE = "binary"
+APPNAME = "cumulus"
+APPDESKTOP = "${S}"
+PR = "r1"
+
+SRC_URI = "http://www.kflog.org/fileadmin/user_upload/cumulus_downloads/${PV}/cumulus-${PV}.src.tar.bz2 \
+ file://open_max.patch"
+S = "${WORKDIR}/cumulus_${PV}/cumulus"
+
+inherit opie
+
+export OE_QMAKE_LINK="${CXX}"
+EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=-I."
+
+#
+# nasty hack since cumulus doesn't obey the qmake standard which requires just one .pro file per directory
+#
+do_compile() {
+ echo "#define SHARP_PDA_WARNSOUND 4" >sharp_char.h
+ qmake -makefile -spec ${QMAKESPEC} -after ${EXTRA_QMAKEVARS_POST} cumulus.pro
+ oe_runmake
+ qmake -makefile -spec ${QMAKESPEC} -after ${EXTRA_QMAKEVARS_POST} gpsClient.pro
+ oe_runmake
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/pics/mapicons \
+ ${D}${palmtopdir}/pics/mapicons/small \
+ ${D}${palmtopdir}/pics/mapicons/windarrows \
+ ${D}${palmtopdir}/bin
+ install -m 0644 ../cumulus.png ${D}${palmtopdir}/pics/cumulus.png
+ install -m 0644 map-icons/*.png ${D}${palmtopdir}/pics/mapicons
+ install -m 0644 map-icons/*.xpm ${D}${palmtopdir}/pics/mapicons
+ install -m 0644 map-icons/small/*.png ${D}${palmtopdir}/pics/mapicons/small
+ install -m 0644 map-icons/small/*.xpm ${D}${palmtopdir}/pics/mapicons/small
+ install -m 0644 map-icons/windarrows/*.png ${D}${palmtopdir}/pics/mapicons/windarrows
+
+ install -m 0755 gpsClient ${D}${palmtopdir}/bin/
+}
+
+SRC_URI[md5sum] = "a13e49376594c51fbfa74067f8d14d45"
+SRC_URI[sha256sum] = "e3ed263ee98971674f3f3cf55e42b7f2e79755b0f931f8a105676108185e8010"
diff --git a/recipes-qtopia/cumulus/cumulus_cvs.bb b/recipes-qtopia/cumulus/cumulus_cvs.bb
new file mode 100644
index 0000000..36c8bff
--- /dev/null
+++ b/recipes-qtopia/cumulus/cumulus_cvs.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "A flightcomputer application for Qt/E based Palmtop Environments"
+SECTION = "opie/applications"
+PRIORITY = "optional"
+LICENSE = "GPL"
+APPTYPE = "binary"
+APPNAME = "cumulus"
+APPDESKTOP = "${S}"
+PV = "${OPIE_CVS_PV}"
+PR = "r0"
+
+SRC_URI = "http://www.kflog.org/fileadmin/user_upload/cumulus_snapshots/cumulus-snapshot.tbz"
+S = "${WORKDIR}/cumulus/cumulus"
+
+inherit opie
+
+DEFAULT_PREFERENCE = "-1"
+
+export OE_QMAKE_LINK="${CXX}"
+EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=-I."
+
+#
+# nasty hack since cumulus doesn't obey the qmake standard which requires just one .pro file per directory
+#
+do_compile() {
+ echo "#define SHARP_PDA_WARNSOUND 4" >sharp_char.h
+ qmake -makefile -spec ${QMAKESPEC} -after ${EXTRA_QMAKEVARS_POST} cumulus.pro
+ oe_runmake
+ qmake -makefile -spec ${QMAKESPEC} -after ${EXTRA_QMAKEVARS_POST} gpsClient.pro
+ oe_runmake
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/pics/cumulus \
+ ${D}${palmtopdir}/pics/cumulus/small \
+ ${D}${palmtopdir}/pics/cumulus/windarrows
+ install -m 0644 ../cumulus.png ${D}${palmtopdir}/pics/cumulus/cumulus.png
+ install -m 0644 map-icons/*.png ${D}${palmtopdir}/pics/cumulus
+ install -m 0644 map-icons/*.xpm ${D}${palmtopdir}/pics/cumulus
+ install -m 0644 map-icons/small/*.png ${D}${palmtopdir}/pics/cumulus/small
+ install -m 0644 map-icons/small/*.xpm ${D}${palmtopdir}/pics/cumulus/small
+ install -m 0644 map-icons/windarrows/*.png ${D}${palmtopdir}/pics/cumulus/windarrows
+
+ install -m 0755 gpsClient ${D}${palmtopdir}/bin/
+}
+
+SRC_URI[md5sum] = "c5b0ca7f2164e47ef72889baf23690f6"
+SRC_URI[sha256sum] = "e862f8327a3ba42c7bc756fe846764754b3dab76d8ccbedd5a195b582070b791"
diff --git a/recipes-qtopia/custominput/custominput_1.1.0.bb b/recipes-qtopia/custominput/custominput_1.1.0.bb
new file mode 100644
index 0000000..39358f2
--- /dev/null
+++ b/recipes-qtopia/custominput/custominput_1.1.0.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Custom Keyboard \
+Keyboard that can be customized to include exactly the characters that the user uses, but which is not available on his physical keyboard."
+SECTION = "opie/inputmethods"
+PRIORITY = "optional"
+LICENSE = "GPL"
+HOMEPAGE = "http://www.blackie.dk/Zaurus/custominput/"
+AUTHOR = "Jesper Kjaer Pedersen <blackie@blackie.dk>"
+
+SRC_URI = "http://www.blackie.dk/Zaurus/custominput/custominput-1.1.0.tgz"
+
+inherit palmtop
+
+QMAKE_PROFILES = "custominput.pro"
+
+EXTRA_QMAKEVARS_POST += "DESTDIR=${S}"
+
+do_configure_prepend() {
+ find ${S} -name Makefile|xargs rm
+}
+
+do_install() {
+
+ install -d ${D}${palmtopdir}/plugins/inputmethods/ \
+ ${D}${palmtopdir}/pics/ \
+ ${D}${palmtopdir}/bin/ \
+ ${D}${palmtopdir}/apps/ \
+ ${D}${palmtopdir}/apps/Settings/ \
+ ${D}${palmtopdir}/help/html/
+
+ install -m 0755 ${S}/customInputConfig ${D}${palmtopdir}/bin/
+ install -m 0644 ${S}/custominput.desktop ${D}${palmtopdir}/apps/Settings/
+ install -m 0644 ${S}/customInputConfig.html ${D}${palmtopdir}/help/html/
+ install -m 0644 ${S}/custominput.png ${D}${palmtopdir}/pics/
+ oe_libinstall -so -C ${S}/ libcustominput ${D}${palmtopdir}/plugins/inputmethods/
+
+}
+
+SRC_URI[md5sum] = "7a0f97339a1caed5695715581306b83e"
+SRC_URI[sha256sum] = "9af88287720701691b58ee13898d248dd9afc63d9c593eb79c1149cc2a7f4e92"
diff --git a/recipes-qtopia/dviviewer/dviviewer_1.0.2.bb b/recipes-qtopia/dviviewer/dviviewer_1.0.2.bb
new file mode 100644
index 0000000..3641dd7
--- /dev/null
+++ b/recipes-qtopia/dviviewer/dviviewer_1.0.2.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "DVI Viewer for Opie/Qtopia"
+SECTION = "opie/applications"
+PRIORITY = "optional"
+LICENSE = "GPL"
+HOMEPAGE = "http://www013.upp.so-net.ne.jp/hn43o/dviviewer/"
+PR = "r1"
+
+SRC_URI = "http://www013.upp.so-net.ne.jp/hn43o/dviviewer/dviviewer-${PV}.tar.gz"
+S = "${WORKDIR}/dviviewer"
+
+inherit palmtop
+
+do_install() {
+ install -d ${D}${palmtopdir}/bin \
+ ${D}${palmtopdir}/apps/Applications \
+ ${D}${palmtopdir}/pics
+ install -D -m 755 dviviewer ${D}${palmtopdir}/bin/dviviewer
+ install -D -m 644 dviviewer.desktop ${D}${palmtopdir}/Applications/dviviewer.desktop
+ install -d ${D}${palmtopdir}/pics
+ cp -pPR *.png ${D}${palmtopdir}/pics/
+}
+
+SRC_URI[md5sum] = "cc101da3b436607ee2265b5af5001484"
+SRC_URI[sha256sum] = "ab7c305be32708c4ede670e13783b718e6a28e35b5495e6c42c31c35a8b512a6"
diff --git a/recipes-qtopia/flexis-zaurus/flexis-zaurus_1.0.0.bb b/recipes-qtopia/flexis-zaurus/flexis-zaurus_1.0.0.bb
new file mode 100644
index 0000000..c0564a5
--- /dev/null
+++ b/recipes-qtopia/flexis-zaurus/flexis-zaurus_1.0.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "A Qtopia/Opie Input Method plugin for the Flexis FX100 Keyboard."
+SECTION = "opie/inputmethods"
+PRIORITY = "optional"
+LICENSE = "GPL"
+PR = "r1"
+
+SRC_URI = "http://www.Vanille.de/mirror/flexis-zaurus-${PV}.tar.bz2"
+S = "${WORKDIR}/flexis-zaurus"
+
+inherit palmtop
+
+EXTRA_QMAKEVARS_POST += "CONFIG-=qtopia"
+
+do_install() {
+ oe_libinstall libqflexis ${D}${palmtopdir}/plugins/inputmethods/
+}
+
+SRC_URI[md5sum] = "e7737236f1eccadd4cf8cfcc0c82e005"
+SRC_URI[sha256sum] = "ca7653a03f562057098c9fb956de34021a14017c2a44eedd3ab0963dc877e7e5"
diff --git a/recipes-qtopia/freedroid/freedroid-1.0.2/freedroid.png b/recipes-qtopia/freedroid/freedroid-1.0.2/freedroid.png
new file mode 100644
index 0000000..6db9f21
--- /dev/null
+++ b/recipes-qtopia/freedroid/freedroid-1.0.2/freedroid.png
Binary files differ
diff --git a/recipes-qtopia/freedroid/freedroid_1.0.2.bb b/recipes-qtopia/freedroid/freedroid_1.0.2.bb
new file mode 100644
index 0000000..5bf173a
--- /dev/null
+++ b/recipes-qtopia/freedroid/freedroid_1.0.2.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Clone of the classic Paradroid from C64 - SDL version."
+SECTION = "opie/games"
+PRIORITY = "optional"
+LICENSE = "GPL"
+HOMEPAGE = "http://freedroid.sourceforge.net/"
+PR = "r2"
+
+APPIMAGE = "${WORKDIR}/freedroid.png"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/freedroid/freedroid-${PV}.tar.gz \
+ file://freedroid.png"
+
+inherit autotools sdl
+
+do_compile() {
+ oe_runmake pkgdatadir=${datadir}/freedroid
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 src/freedroid ${D}${bindir}
+ install -d ${D}${datadir}/freedroid/
+ cp -pPR graphics map sound ${D}${datadir}/freedroid/
+}
+
+SRC_URI[md5sum] = "585a65f61c2cd308ab45d5c514f695dc"
+SRC_URI[sha256sum] = "0934bd29fb2ad0367ea3bdfdce47537179f9af6aa960cbcc897c40da2e1a0ee3"
diff --git a/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNCanvas.cpp b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNCanvas.cpp
new file mode 100644
index 0000000..6e7f615
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNCanvas.cpp
@@ -0,0 +1,2244 @@
+/* FreeNote for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ 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
+*/
+/*
+2005/06/04 FreeNote 1.11.12pre
+・グリッドの枠線を実際の選択範囲よりも大きく表示するように変更。
+・範囲選択、グリッド、ガイド、罫線カラーのカスタマイズを可能に。
+・カラーピッカーモードの追加
+
+2005/06/02 FreeNote 1.11.11Apre
+・テキスト移動枠の不具合修正
+・罫線をグリッドの2倍で表示するように変更
+・消しゴム時の範囲指定時に、ペンオフしてワンテンポおいてから範囲確定するように変更
+
+2005/03/18 FreeNote 1.11.10Bpre
+・描画の最適化
+
+2005/02/27 FreeNote 1.11.10pre
+・PDFの出力形式を一部変更
+・インポート時のバグfix
+
+2005/01/04 FreeNote 1.11.6pre
+・カーブモードで8の字がかけるように整形エンジンを改善
+
+2005/01/04 FreeNote 1.11.5Apre
+・バグフィックス
+
+2004/12/25 FreeNote 1.11.5pre
+・レイヤー機能追加
+
+2004/11/24 FreeNote 1.11.0pre
+・テキストペースト機能
+
+2004/10/17 FreeNote 1.10.0リリース
+2004/08/26 ver 1.9.3pre
+・罫線機能を追加
+
+2004/05/23 ver 1.9.1Apre
+・欧文環境対応
+
+2004/02/16 ver 1.7.3pre
+・編集機能強化
+
+2004/02/14 ver 1.7.2pre
+・検索機能追加
+
+2004/02/12 ver 1.7.1pre
+・フォント仕様の変更
+・テキスト処理の高速化
+・テキストボックスの多機能化
+
+2003/02/10 ver 1.7.0pre
+・文字入力
+
+2003/12/23 ver 1.6.1
+・保存情報のサイズ縮小
+
+2003/12/16-19 ver 1.5.5pre
+・ペンサイズの追加(1-8)
+・アンドゥ・リドゥの実装
+
+2003/12/14 ver 1.5.4pre
+・ペンサイズを選択可能に。
+
+2003/12/05 ver 1.5.3Apre
+・グリッドの色を修正
+
+2003/12/04 ver 1.5.3pre
+・グリッドの描画を一部修正
+
+2003/11/10 ver 1.5.1pre
+・曲線整形モード追加
+
+2003/11/09 ver 1.5.0pre
+・自動整形モード追加
+
+2003/09/03 ver 1.3.4pre
+・Use all quadrant OFF時に表示位置がリセットされる場合があるバグ対応。
+
+2003/09/01-03 ver 1.3.3pre
+・スクロールの改良
+・Use all quadrant(全象限を使用する)メニューを追加
+
+2003/08/31 FreeNote 1.3.2pre
+・全方向スクロール
+
+2003/08/23 FreeNote 1.3.0pre
+・CR動作の修正
+
+2003/08/15 FreeNote 1.2.1を公開
+・保存時のバグ修正
+・完了ダイアログの自動消去
+・PNGファイルへの出力
+
+2003/08/15 FreeNote 1.2を公開
+・オプション追加
+・スクロールガイド
+・Freeファイル関連付け
+・アイコンの変更
+
+2003/08/05 FreeNote 1.1.1preを公開
+・高速起動時に閉じた状態を保持
+・描画モード切替え時に消しゴム表示
+・保存時間短縮
+・Viewモードの挙動を変更
+・メニューの見た目を変更
+*/
+#include "fncanvas.h"
+#include <qsjiscodec.h>
+#include <stdio.h>
+#include <qfile.h>
+#include <qmessagebox.h>
+#include <qtextstream.h>
+#include <qpen.h>
+#include <qcolor.h>
+#include <qpoint.h>
+#include <qthread.h>
+#include <qimage.h>
+#include <math.h>
+#include <qtextcodec.h>
+#include <qmultilineedit.h>
+#include <qbitmap.h>
+#include "fnmessagebox.h"
+#include "fmtengine.h"
+#include "fntextdialog.h"
+#include <qfont.h>
+#include <qapplication.h>
+#include <qclipboard.h>
+#include "frmmain.h"
+#include "fnlayerdlg.h"
+#include <stdlib.h>
+
+int snap(int v) {
+ int tv = abs(v);
+ tv = ((int)(tv + SNAP_SIZE / 2) / SNAP_SIZE) * SNAP_SIZE;
+ if (0 > v) {
+ return -tv;
+ } else {
+ return tv;
+ }
+}
+
+FNCanvas::FNCanvas(FNColorDialog* dlg, QWidget* parent, const char* name, WFlags f)
+ :QWidget(parent, name, f),
+ _txtTmp(NULL),
+ _pen(black, 1, SolidLine, RoundCap, RoundJoin),
+ _asMode(AS_NONE),
+ _drawMode(MODE_DRAW),
+ _prevMode(MODE_DRAW),
+ _eraser_l(50),
+ _eraser_s(10),
+ _h_step(100),
+ _v_step(100),
+ _margin(5),
+ _scrollTiming(800),
+ _selIdx(0),
+ _viewMode(false),
+ _isWaiting(false),
+ _isDragging(false),
+ _isDrawing(false),
+ _isHeadingEnables(false),
+ _isShowGuide(false),
+ _isUseAllQuadrant(false),
+ _showRuler(false),
+ _isTinyPaging(false),
+ _scale_x(1.0),
+ _scale_y(1.0),
+ _tboxRect(0, 50, 220, 240),
+ _isEraseWaiting(false),
+ _colorSelector(dlg),
+ _isColorRevision(true)
+{
+ _tracks.setAutoDelete(true);
+ _clipboard.setAutoDelete(true);
+ _current = new FNLayer();
+ _layers.append(_current);
+ _layers.setAutoDelete(true);
+ _undobuf.setAutoDelete(true);
+ _current->Name = "Layer0";
+ this->setBackgroundMode(NoBackground);
+ _timer = new QTimer(this);
+ connect(_timer, SIGNAL(timeout()), this, SLOT(autoScroll()));
+ _dlgFind = new FNFindDialog(this, "Find");
+ connect(_dlgFind, SIGNAL(originChanged(int, int)), this, SLOT(setOrigin(int, int)));
+ connect(_dlgFind, SIGNAL(resetOrigin()), this, SLOT(resetOrigin()));
+
+}
+
+FNCanvas::~FNCanvas()
+{
+ _timer->stop();
+ delete _timer;
+
+ _tracks.clear();
+ _layers.clear();
+ //clearList(_draws);
+
+ delete _dlgFind;
+}
+
+
+void FNCanvas::addLayer()
+{
+ FNLayer* layer = new FNLayer();
+ _current=layer;
+ uint cnt = _layers.count();
+ while (1) {
+ QString name = "Layer";
+ name += QString::number(cnt);
+
+ bool nameExists = false;
+ for (uint i = 0; i < _layers.count(); ++i) {
+ if (_layers.at(i)->Name == name) {
+ nameExists = true;
+ break;
+ }
+ }
+ if (false == nameExists) {
+ layer->Name = name;
+ break;
+ }
+ ++cnt;
+ }
+ _layers.append(layer);
+ _selIdx = _layers.count() - 1;
+ redraw();
+
+}
+
+//表示レイヤーを下に移動する
+void FNCanvas::moveAboveLayer()
+{
+ --_selIdx;
+ if (0 > _selIdx) {
+ _selIdx = 0;
+ }
+ _current = _layers.at(_selIdx);
+ redraw();
+}
+
+//表示レイヤーを上に移動する
+void FNCanvas::moveBelowLayer()
+{
+ ++_selIdx;
+ if (_layers.count() - 1 <= (uint)_selIdx) {
+ _selIdx = _layers.count() - 1;
+ }
+ _current = _layers.at(_selIdx);
+ redraw();
+}
+
+
+void FNCanvas::setScrollTiming(int v)
+{
+ _scrollTiming = v;
+}
+
+
+void FNCanvas::setVStep(int v)
+{
+ _v_step = v;
+}
+
+void FNCanvas::setHStep(int v)
+{
+ _h_step = v;
+}
+
+void FNCanvas::setSEraser(int v)
+{
+ _eraser_s = v;
+}
+
+void FNCanvas::setLEraser(int v)
+{
+ _eraser_l = v;
+}
+
+
+void FNCanvas::setMargin(int v)
+{
+ if (v < 3) {
+ v = 3;
+ }
+ _margin = v;
+}
+void FNCanvas::find()
+{
+ if (_viewMode) {
+ return;
+ }
+ _dlgFind->setElements(_layers);
+ _dlgFind->show();
+ _dlgFind->exec();
+}
+
+void FNCanvas::setScrollMode(int as)
+{
+ _asMode = as;
+ redraw();
+}
+
+void FNCanvas::autoScroll()
+{
+ if (MODE_ERASE == _drawMode) {
+ if (0 < _selection.width()) {
+ int hsn = SNAP_SIZE / 2;
+ int qsn = hsn / 2;
+ int x = ((_selection.x() - qsn) / hsn) * hsn;
+ int y = ((_selection.y() - qsn) / hsn) * hsn;
+ int dx = _selection.x() - x;
+ int dy = _selection.y() - y;
+ int w = ((_selection.width() + dx + hsn) / hsn) * hsn;
+ int h = ((_selection.height() + dy + hsn) / hsn) * hsn;
+ _selection.setRect(x, y, w, h);
+ _isSelected = true;
+ }
+ _last = QPoint(-1, -1);
+ _tracks.clear();
+ _isHeadingEnables = false;
+ _isEraseWaiting = false;
+ redraw();
+ } else {
+ if (AS_NONE == _asMode) {
+ setOrigin(_origin.x(), _origin.y(), false);
+ redraw();
+ return;
+ }
+ bool tmp = _isHeadingEnables;
+ int dx = 0;
+ int dy = 0;
+ if (AS_BOTH == _asMode || AS_HORIZONTAL == _asMode) {
+ if (_last.x() > width() * (_margin - 1) / _margin) {
+ dx = _h_step;
+ } else if (_last.x() < width() / _margin) {
+ dx = -_h_step;
+ }
+ }
+ if (AS_BOTH == _asMode || AS_VERTICAL == _asMode) {
+ if (_last.y() > height() * (_margin - 1) / _margin) {
+ dy = _v_step;
+ } else if (_last.y() < height() / _margin) {
+ dy = -_v_step;
+ }
+ }
+ setOrigin(_origin.x() + dx, _origin.y() + dy, false);
+ _isHeadingEnables = tmp;
+ redraw();
+ }
+}
+
+void FNCanvas::drawRect(QPainter& pa, const QRect& r)
+{
+ int w = width();
+ int h = height();
+ int sx = r.left();
+ int sy = r.top();
+ int ex = r.right();
+ int ey = r.bottom();
+ if (0 > sx) {
+ sx = 0;
+ }
+ if (0 > sy) {
+ sy = 0;
+ }
+ if (h < ey) {
+ ey = h;
+ }
+ if (w < ex) {
+ ex = w;
+ }
+ if (0 <= r.left()) {
+ pa.drawLine(sx, sy, sx, ey);
+ }
+ if (0 <= r.top()) {
+ pa.drawLine(sx, sy, ex, sy);
+ }
+ if (w >= r.right()) {
+ pa.drawLine(ex, sy, ex, ey);
+ }
+ if (h >= r.bottom()) {
+ pa.drawLine(sx, ey, ex, ey);
+ }
+}
+
+void FNCanvas::mousePressEvent(QMouseEvent* evt)
+{
+ if (!_current->IsShow) {
+ return;
+ }
+ setFocus();
+ _timer->stop();
+ _tracks.clear();
+ _txtwait = 10;
+ if (_viewMode) {
+ _isWaiting = true;
+ _viewMode = false;
+ setOrigin((int)((evt->x()) / _scale_x) - width() / 2, (int)((evt->y()) / _scale_y) - height() / 2, false);
+ //redraw();
+ emit resetViewMode();
+ } else if (MODE_CPICK == _drawMode) {
+ QRgb c = _buffer.convertToImage().pixel(evt->pos().x(), evt->pos().y());
+ emit pickColor(c);
+ return;
+ } else if (MODE_TEXT == _drawMode) {
+ _txtTmp = NULL;
+// _last = evt->pos();
+ _last = SnapPoint(evt->pos(), SNAP_SIZE / 4);
+ int x = _last.x();
+ int y = _last.y();
+ for (int i = _current->draws.count() - _current->disp_offset() - 1; i >= 0; --i) {
+ FNPolygon* p = _current->draws.at((uint)i);
+ if (FN_TEXT == p->type()) {
+ QRect r = p->boundingRect();
+ if (r.contains(x, y)) {
+ _txtTmp = (FNText*)p;
+ _selection.setRect(0, 0, -1, -1);
+ _tdx = _last.x() - r.x();
+ _tdy = _last.y() - r.y();
+ break;
+ }
+ }
+ }
+ } else if (MODE_ERASE == _drawMode) {
+ if (_isEraseWaiting) {
+ return;
+ }
+ _last = evt->pos();
+
+ if (0 >= _selection.width() || !_selection.contains(_last)) {
+ _isSelected = false;
+ }
+ if (!_isSelected) {
+ _selection = QRect(0, 0, -1, -1);
+ _selected.clear();
+ redraw();
+
+ int w = _eraser_s;
+ if (PENWIDTH_MAX / 2 < _pen.width()) {
+ w = _eraser_l;
+ }
+ // 大バグ対策:
+ // 0 > xの座標に、縦150位の四角形を書くと、C系ザウのパフォーマンスが激落ちします。
+ // 以降同様のロジックはこの対策のためです。
+ QPainter pwin;
+ pwin.begin(this);
+ pwin.setRasterOp(XorROP);
+ pwin.setPen(QPen(white, 1));
+ _preRect.setRect(_last.x() - w / 2, _last.y() - w / 2, w, w);
+ drawRect(pwin, _preRect);
+ pwin.flush();
+ pwin.end();
+ _selection = QRect(0, 0, -1, -1);
+ _selected.clear();
+ } else {
+ QPainter pwin;
+ pwin.begin(this);
+
+ pwin.setRasterOp(XorROP);
+ pwin.setPen(QPen(white, 1));
+ _preRect.setRect(_selection.x(), _selection.y(), _selection.width(), _selection.height());
+ drawRect(pwin, _preRect);
+
+ pwin.flush();
+ pwin.end();
+ QPoint t = SnapPoint(QPoint(_selection.x(), _selection.y()));
+ _last = SnapPoint(_last);
+
+ _tdx = _last.x() - t.x();
+ _tdy = _last.y() - t.y();
+ }
+ } else {
+ _last = evt->pos();
+ _tracks.append(new QPoint(_last));
+ }
+ _isDragging = true;
+}
+
+void FNCanvas::mouseMoveEvent(QMouseEvent* evt)
+{
+ if (!_current->IsShow) {
+ return;
+ }
+ if (_isWaiting) {
+ return;
+ }
+ if (MODE_TEXT == _drawMode) {
+ if (NULL == _txtTmp) {
+ return;
+ }
+ if (0 < _txtwait) {
+ --_txtwait;
+ return;
+ }
+ QPainter pwin;
+ pwin.begin(this);
+ if (-1 != _selection.width()) {
+ pwin.setRasterOp(XorROP);
+ pwin.setPen(QPen(white, 1));
+ drawRect(pwin, _selection);
+ } else {
+ _selection = _txtTmp->boundingRect();
+ }
+ QPoint tmp = SnapPoint(evt->pos(), SNAP_SIZE / 4);
+ tmp.setX(tmp.x() - _tdx);
+ tmp.setY(tmp.y() - _tdy);
+ if (tmp != _last) {
+ _selection.moveTopLeft(tmp);
+ _last = tmp;
+ }
+ drawRect(pwin, _selection);
+ pwin.flush();
+ pwin.end();
+ } else if (MODE_CPICK == _drawMode) {
+ QRgb c = _buffer.convertToImage().pixel(evt->pos().x(), evt->pos().y());
+ emit pickColor(c);
+ return;
+ } else if (MODE_ERASE == _drawMode) {
+ //redraw();
+ if (_last.x() == -1) {
+ return;
+ }
+ if (!_isSelected) {
+ int w = _eraser_s;
+ if (PENWIDTH_MAX / 2 < _pen.width()) {
+ w = _eraser_l;
+ }
+ QPainter pwin;
+ pwin.begin(this);
+
+ pwin.setRasterOp(XorROP);
+ pwin.setPen(QPen(white, 1));
+ drawRect(pwin, _preRect);
+
+ _last = evt->pos();
+
+ _preRect.setRect(_last.x() - w / 2, _last.y() - w / 2, w, w);
+ pwin.setRasterOp(CopyROP);
+ QRect r = QRect(0, 0, width(), height());
+ for (uint i = 0; i < _current->draws.count() - _current->disp_offset(); ++i) {
+ FNPolygon* p = _current->draws.at(i);
+ QRect bounds = p->boundingRect();
+ if (r.intersects(bounds)) {
+ bool f = false;
+ QRect& selected = _preRect;
+ for (uint j = 0; j < p->points().count(); ++j) {
+ QPoint& pts = p->points().at(j);
+ if (selected.contains(pts)) {
+ f = true;
+ if (-1 == _selection.width()) {
+ _selection = bounds;
+ } else {
+ if (bounds.x() < _selection.x()) {
+ _selection.setX(bounds.x());
+ }
+ if (bounds.y() < _selection.y()) {
+ _selection.setY(bounds.y());
+ }
+ if (bounds.right() > _selection.right()) {
+ _selection.setRight(bounds.right());
+ }
+ if (bounds.bottom() > _selection.bottom()) {
+ _selection.setBottom(bounds.bottom());
+ }
+ }
+ break;
+ }
+ }
+ if (f) {
+ if (0 == _selected.contains(p)) {
+ _selected.append(p);
+ }
+ p->drawShape(pwin, f);
+ }
+ }
+ }
+ pwin.setRasterOp(XorROP);
+ pwin.setPen(QPen(white, 1));
+ drawRect(pwin, _preRect);
+ pwin.flush();
+ pwin.end();
+ } else {
+ if (0 >= _selection.width()) {
+ return;
+ }
+ //選択中(移動処理)
+ QPainter pwin;
+ pwin.begin(this);
+ pwin.setRasterOp(XorROP);
+ pwin.setPen(QPen(white, 1));
+ drawRect(pwin, _preRect);
+ _last = SnapPoint(evt->pos(), SNAP_SIZE / 4);
+ _preRect.setRect(_last.x() - _tdx, _last.y() - _tdy, _selection.width(), _selection.height());
+ drawRect(pwin, _preRect);
+ pwin.flush();
+ pwin.end();
+ }
+ } else {
+ QPainter pwin;
+ pwin.begin(this);
+ pwin.setPen(_pen);
+
+ pwin.drawLine(_last, evt->pos());
+ pwin.flush();
+
+ pwin.end();
+ _last = evt->pos();
+ _tracks.append(new QPoint(_last));
+ }
+}
+
+void FNCanvas::mouseReleaseEvent(QMouseEvent* evt)
+{
+ if (!_current->IsShow) {
+ return;
+ }
+ _isDragging = false;
+ if (_isWaiting) {
+ _isWaiting = false;
+ return;
+ }
+ if (MODE_ERASE == _drawMode) {
+ if (_isSelected) {
+ //_lastへ移動
+ _last = SnapPoint(evt->pos(), SNAP_SIZE / 4);
+ int dx = _last.x() - _tdx - _selection.x();
+ int dy = _last.y() - _tdy - _selection.y();
+ for (uint i = 0; i < _selected.count(); ++i) {
+ FNPolygon* p = _selected.at(i);
+ p->translate(dx, dy);
+ }
+ _selection.moveBy(dx, dy);
+ redraw();
+ } else {
+ if (false == _isEraseWaiting) {
+ _isEraseWaiting = true;
+ }
+ redraw();
+ _timer->start(_scrollTiming, true);
+ }
+ } else if (MODE_CPICK == _drawMode) {
+ QRgb c = _buffer.convertToImage().pixel(evt->pos().x(), evt->pos().y());
+ emit pickColor(c);
+ emit changeMode(_prevMode);
+ return;
+ } else {
+ if (1 < _tracks.count()) {
+ _last = evt->pos();
+ FNPolygon* p = NULL;
+ if (MODE_FORMAT == _drawMode) {
+ p = new FNPolygon(_pen);
+ _tracks = AutoFormat(_tracks);
+ } else if (MODE_CURVE == _drawMode) {
+ QPoint sp = SnapPoint(*_tracks.at(0));
+ QPoint ep = SnapPoint(*_tracks.at(_tracks.count()-1));
+ FNPointList tracks;
+ tracks.setAutoDelete(true);
+ for (uint i = 0; i < _tracks.count(); ++i) {
+ QPoint t = *_tracks.at(i);
+ tracks.append(new QPoint(t.x(), t.y()));
+ }
+ _tracks = AutoCurve(_tracks);
+ bool isEllipse = false;
+ if (sp == ep) {
+ if (0 < _tracks.count()) {
+ int vdconv = 0; //縦方向転換
+ int vdir = 0;
+ int svdir = 0;
+
+ int hdconv = 0; //横方向転換
+ int hdir = 0;
+ int shdir = 0;
+ QPoint* st = _tracks.at(0);
+ QPoint* l = st;
+ for (uint i = 1; i < _tracks.count(); ++i) {
+ QPoint* p = _tracks.at(i);
+ int thdir = sign(p->x() - l->x());
+ if (l->x() != p->x()) {
+ //水平方向転換
+ if (0 != thdir) {
+ if (0 == hdir) {
+ shdir = thdir;
+ } else if (thdir != hdir) {
+ ++hdconv;
+ }
+ hdir = thdir;
+ }
+ }
+ int tvdir = sign(p->y() - l->y());
+ if (l->y() != p->y()) {
+ //垂直方向転換
+ if (0 != tvdir) {
+ if (0 == vdir) {
+ svdir = tvdir;
+ } else if (tvdir != vdir) {
+ ++vdconv;
+ }
+ vdir = tvdir;
+ }
+ }
+ l = p;
+ }
+ if (shdir == hdir) {
+ --hdconv;
+ }
+ if (svdir == vdir) {
+ --vdconv;
+ }
+
+ if (1 >= hdconv && 1 >= vdconv) {
+ isEllipse = true;
+ int dircnt = 0;
+ //もう1判定
+ tracks = AutoFormat(tracks);
+ if (2 < tracks.count()) {
+ int phdir = sign(tracks.at(1)->x() - tracks.at(0)->x());
+ int pvdir = sign(tracks.at(1)->y() - tracks.at(0)->y());
+ l = tracks.at(1);
+ for (uint i = 2; i < tracks.count(); ++i) {
+ QPoint* p = tracks.at(i);
+ int thdir = sign(p->x() - l->x());
+ int tvdir = sign(p->y() - l->y());
+ if ((0 == pvdir && 0 != tvdir && 0 != phdir && 0 == thdir) ||
+ (0 != pvdir && 0 == tvdir && 0 == phdir && 0 != thdir))
+ {
+ if (3 < dircnt) {
+ isEllipse = false;
+ break;
+ }
+ ++dircnt;
+ }
+ l = p;
+ phdir = thdir;
+ pvdir = tvdir;
+ }
+ }
+ }
+ }
+ }
+ if (isEllipse) {
+ QRect r = GetBounds(_tracks);
+ _tracks.clear();
+ sp = SnapPoint(QPoint(r.x(), r.y()));
+ ep = SnapPoint(QPoint(r.x() + r.width(), r.y() + r.height()));
+ _tracks.append(new QPoint(sp.x(), sp.y()));
+ _tracks.append(new QPoint(ep.x(), ep.y()));
+ p = new FNEllipse(_pen);
+ } else if (2 < _tracks.count()) {
+ p = new FNBezier(_pen);
+ } else {
+ p = new FNPolygon(_pen);
+ }
+ } else if (MODE_SMOOTH == _drawMode) {
+ _tracks = Smoothing(_tracks);
+ if (2 < _tracks.count()) {
+ p = new FNBezier(_pen);
+ } else {
+ p = new FNPolygon(_pen);
+ }
+ } else {
+ _tracks = Reduce(_tracks);
+ p = new FNPolygon(_pen);
+ }
+ if (NULL != p) {
+ p->setFill(_fill);
+ if (1 < _tracks.count()) {
+ p->setPoints(_tracks);
+ redobuf_flush();
+ _current->draws.append(p);
+ }
+ }
+ } else if (MODE_TEXT == _drawMode) {
+ if (NULL == _txtTmp) {
+ textEdit(_last.x(), _last.y());
+ } else {
+ QRect r = _txtTmp->boundingRect();
+ if (_selection == r || 0 < _txtwait) {
+ textEdit(r.x(), r.y(), _txtTmp);
+ } else {
+ if (-1 != _selection.width()) {
+ _txtTmp->translate(_last.x() - r.x(), _last.y() - r.y());
+ }
+ }
+ }
+ _txtTmp = NULL;
+ }
+ _tracks.clear();
+ _isHeadingEnables = true;
+ _timer->start(_scrollTiming, true);
+ }
+}
+
+void FNCanvas::textEdit(int x, int y, FNText* obj)
+{
+ FNTextDialog dlg(fontname, _colorSelector, this);
+ dlg.show();
+ /*
+ if (width() < _tboxRect.x()) {
+ _tboxRect.setX(0);
+ }
+ if (50 > _tboxRect.y()) {
+ _tboxRect.setY(50);
+ }
+ if (height() < _tboxRect.height()) {
+ _tboxRect.setHeight(height());
+ }
+ if (width() < _tboxRect.width()) {
+ _tboxRect.setWidth(width());
+ }
+ dlg.move(_tboxRect.x(), _tboxRect.y());
+ dlg.resize(_tboxRect.width(), _tboxRect.height());
+ */
+ dlg.move(width() / 8, height() / 8);
+ dlg.resize(width() * 6 / 8, height() * 6 / 8);
+ QPen pen = _pen;
+ if (NULL != obj) {
+ for (uint i = 0; i < obj->lines.count(); ++i) {
+ dlg.lines->append(obj->lines[i]);
+ }
+ pen = obj->pen();
+ }
+ dlg.setPen(pen);
+
+ int mx = x;
+ int my = y;
+ if (dlg.exec()) {
+ pen = dlg.pen();
+ if (0 < dlg.lines->text().length()) {
+ FNText* p = obj;
+ if (NULL == obj) {
+ p = new FNText(pen);
+ _current->draws.append((FNPolygon*)p);
+ }
+ p->pen() = pen;
+ p->lines.clear();
+ FNPointList l;
+ l.append(new QPoint(x, y));
+ QFont font(fontname);
+ font.setPointSize(FONTSIZE[pen.width()]);
+ QFontMetrics fm(font);
+ int h = fm.height();
+ for (int i = 0; i < dlg.lines->numLines(); ++i) {
+ p->lines.append(dlg.lines->textLine(i));
+ int w = fm.width(dlg.lines->textLine(i)) + x;
+ l.append(new QPoint(w, my));
+ my += h;
+ l.append(new QPoint(w, my));
+ l.append(new QPoint(x, my));
+ if (mx < w) {
+ mx = w;
+ }
+ }
+ p->setPoints(l);
+ redobuf_flush();
+ redraw();
+ } else {
+ if (NULL != obj) {
+ _current->draws.remove(obj);
+ }
+ }
+ }
+ _tboxRect = QRect(dlg.x(), dlg.y(), dlg.width(), dlg.height());
+}
+void FNCanvas::paintEvent(QPaintEvent*)
+{
+ bitBlt(this, 0, 0, &_buffer);
+}
+
+void FNCanvas::resizeEvent(QResizeEvent* evt)
+{
+ QPixmap save(_buffer);
+ _buffer.resize(evt->size());
+ _buffer.fill(white);
+ bitBlt(&_buffer, 0, 0, &save);
+ redraw();
+}
+
+void FNCanvas::setOrigin(QPoint& o)
+{
+ this->setOrigin(o.x(), o.y());
+}
+
+QPoint FNCanvas::getTopLeft()
+{
+ bool hasValue = false;
+ int dx = 0;
+ int dy = 0;
+ if (0 < _current->draws.count()) {
+ dx = ((FNPolygon*)_current->draws.at(0))->boundingRect().x();
+ dy = ((FNPolygon*)_current->draws.at(0))->boundingRect().y();
+ }
+
+ for (uint j = 0; j < _layers.count(); ++j) {
+ FNPolygonList& draws = _layers.at(j)->draws;
+ for (uint i = 0; i < draws.count(); ++i) {
+ FNPolygon* p = draws.at(i);
+ hasValue = true;
+ if (dx > p->boundingRect().x()) {
+ dx = p->boundingRect().x();
+ }
+ if (dy > p->boundingRect().y()) {
+ dy = p->boundingRect().y();
+ }
+ }
+ }
+ if (!hasValue || !_isUseAllQuadrant) {
+ return _origin;
+ }
+ return QPoint(snap(dx), snap(dy));
+}
+
+
+void FNCanvas::rebuild()
+{
+ if (!_isUseAllQuadrant) {
+ return;
+ }
+
+ QPoint d = getTopLeft();
+ d.setX(d.x() - SNAP_SIZE);
+ d.setY(d.y() - SNAP_SIZE);
+ for (uint j = 0; j < _layers.count(); ++j) {
+ FNPolygonList& draws = _layers.at(j)->draws;
+ for (uint i = 0; i < draws.count(); ++i) {
+ FNPolygon* p = draws.at(i);
+ p->translate(-d.x(), -d.y());
+ }
+ }
+ _origin = QPoint(0, 0);
+}
+
+void FNCanvas::resetOrigin()
+{
+ int ox = 0;
+ int oy = 0;
+ _isHeadingEnables = false;
+ _timer->stop();
+
+
+ int dx = 0;
+ int dy = 0;
+ if (!_isUseAllQuadrant) {
+ if (0 > ox) {
+ ox = 0;
+ }
+ if (0 > oy) {
+ oy = 0;
+ }
+ dx = _origin.x() - ox;
+ dy = _origin.y() - oy;
+ } else {
+ dx = _origin.x() - ox;
+ dy = _origin.y() - oy;
+ if (0 > ox) {
+ ox = 0;
+ }
+ if (0 > oy) {
+ oy = 0;
+ }
+ }
+ for (uint i = 0; i < _tracks.count(); ++i) {
+ QPoint* p = _tracks.at(i);
+ p->setX(p->x() + dx);
+ p->setY(p->y() + dy);
+ }
+
+ for (uint i = 0; i < _layers.count(); ++i) {
+ FNPolygonList& draws = _layers.at(i)->draws;
+ for (uint j = 0; j < draws.count(); ++j) {
+ FNPolygon* p = draws.at(j);
+ p->translate(dx, dy);
+ }
+ }
+ _origin = QPoint(ox, oy);
+}
+
+void FNCanvas::setOrigin(int ox, int oy, bool isRedrawEnabled)
+{
+ ox = snap(ox);
+ oy = snap(oy);
+ _isHeadingEnables = false;
+ _timer->stop();
+
+ int dx = 0;
+ int dy = 0;
+ if (!_isUseAllQuadrant) {
+ if (0 > ox) {
+ ox = 0;
+ }
+ if (0 > oy) {
+ oy = 0;
+ }
+ dx = _origin.x() - ox;
+ dy = _origin.y() - oy;
+ } else {
+ dx = _origin.x() - ox;
+ dy = _origin.y() - oy;
+ if (0 > ox) {
+ ox = 0;
+ }
+ if (0 > oy) {
+ oy = 0;
+ }
+ }
+ if (dx == 0 && dy == 0) {
+ return;
+ }
+ for (uint i = 0; i < _tracks.count(); ++i) {
+ QPoint* p = _tracks.at(i);
+ p->setX(p->x() + dx);
+ p->setY(p->y() + dy);
+ }
+
+ for (uint j = 0; j < _layers.count(); ++j) {
+ FNPolygonList& draws = _layers.at(j)->draws;
+ for (uint i = 0; i < draws.count(); ++i) {
+ FNPolygon* p = draws.at(i);
+ p->translate(dx, dy);
+ }
+ }
+ if (-1 != _selection.width()) {
+ _selection.moveBy(dx, dy);
+ }
+
+ _origin = QPoint(ox, oy);
+ emit originChanged(ox, oy);
+ if (isRedrawEnabled) {
+ redraw();
+ }
+}
+
+void FNCanvas::redraw()
+{
+ if (_isDrawing) {
+ return;
+ }
+ if (_isDragging) {
+ return;
+ }
+ if (!this->isVisible()) {
+ return;
+ }
+
+ _isDrawing = true;
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ if (_isTinyPaging) {
+ if (_current == &layer) {
+ layer.IsShow = true;
+ } else {
+ layer.IsShow = false;
+ }
+ }
+ }
+ int h = height(); //(height() / 40) * 40;
+ _buffer.fill(white);
+ QRect r = QRect(0, 0, width(), height());
+ QPainter pbuf;
+ pbuf.begin(&_buffer);
+ pbuf.setFont(QFont(fontname));
+ pbuf.setClipRect(0, 0, width(), height());
+ if (_viewMode) {
+ float wx = 0;
+ float wy = 0;
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ if (layer.IsShow) {
+ FNPolygonList& draws = layer.draws;
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ FNPolygon* p = draws.at(i);
+ QRect r = p->boundingRect();
+ if (wx < r.right()) {
+ wx = r.right();
+ }
+ if (wy < r.bottom()) {
+ wy = r.bottom();
+ }
+ }
+ }
+ }
+ wx += SNAP_SIZE;
+ wy += SNAP_SIZE;
+ wx = snap((int)wx);
+ wy = snap((int)wy);
+ wx = wx + _origin.x();
+ wy = wy + _origin.y();
+ _scale_x = (float)width() / wx;
+ _scale_y = (float)height() / wy;
+ if (1.0f < _scale_x) {
+ _scale_x = 1.0f;
+ }
+ if (1.0f < _scale_y) {
+ _scale_y = 1.0f;
+ }
+ if (_scale_x > _scale_y) {
+ _scale_x = _scale_y;
+ } else if (_scale_x < _scale_y) {
+ _scale_y = _scale_x;
+ }
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ if (!layer.IsShow) {
+ continue;
+ }
+ FNPolygonList& draws = layer.draws;
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ FNPolygon* p = draws.at(i);
+ FNPolygon* t = NULL;
+ if (p->type() == FN_BEZIER) {
+ t = new FNBezier(*(FNBezier*)p);
+ } else if (p->type() == FN_ELLIPSE) {
+ t = new FNEllipse(*(FNEllipse*)p);
+ } else if (p->type() == FN_TEXT) {
+ t = new FNText(*(FNText*)p);
+ } else {
+ t = new FNPolygon(*p);
+ }
+ t->translate(-_origin.x(), -_origin.y());
+ for (uint j = 0; j < t->points().count(); ++j) {
+ QPoint& pts = t->points().at(j);
+ int x = (int)(pts.x() * _scale_x);
+ int y = (int)(pts.y() * _scale_y);
+ pts.setX(x);
+ pts.setY(y);
+ }
+ double pensize = t->pen().width();
+ if (_scale_x > _scale_y) {
+ pensize = pensize * _scale_y;
+ } else {
+ pensize = pensize * _scale_x;
+ }
+ if (0 >= pensize) {
+ pensize = 1;
+ }
+ if (p->type() == FN_TEXT) {
+ FNText* tp = (FNText*)t;
+ QPoint& sp = t->points().at(0);
+
+ //default font size checking...
+ QFont f(fontname, FONTSIZE[p->pen().width()]);
+ QFontMetrics fm(f);
+ int h = fm.height();
+ int wx = 0;
+ int wy = 0;
+ for (uint i = 0; i < tp->lines.count(); ++i) {
+ int tw = fm.width(tp->lines[i]);
+ if (tw > wx) {
+ wx = tw;
+ }
+ wy += h;
+ }
+
+ //create default font image...
+ QRect r = tp->boundingRect();
+ QPixmap tmp(wx + 1, wy + 1);
+ tmp.fill(Qt::white);
+ QPainter pt;
+ pt.begin(&tmp);
+ pt.setFont(f);
+ pt.setPen(p->pen());
+ int y = h + 1;
+ for (uint i = 0; i < tp->lines.count(); ++i) {
+ pt.drawText(1, y, tp->lines[i]);
+ y += h;
+ }
+ pt.flush();
+ pt.end();
+
+ //draw to font image
+ tmp = tmp.convertToImage().smoothScale(r.width(), r.height());
+ tmp.setMask(tmp.createHeuristicMask());
+ pbuf.drawPixmap(sp.x(), sp.y(), tmp);
+ pbuf.flush();
+ } else {
+ t->pen().setWidth(pensize);
+ t->drawShape(pbuf);
+ }
+ delete t;
+ }
+ }
+ } else {
+ if (MODE_ERASE == _drawMode || MODE_FORMAT == _drawMode || MODE_CURVE == _drawMode || MODE_TEXT == _drawMode) {
+ //グリッド描画
+ //QPen pen2(QColor(0, 0, 0), 1);
+ //pbuf.setPen(QPen(QColor(50, 240, 240), 1));
+ pbuf.setPen(QPen(GridColor));
+ for (int x = 0; x < width() + SNAP_SIZE; x += SNAP_SIZE) {
+ pbuf.drawLine(x - SNAP_SIZE / 2, 0, x - SNAP_SIZE / 2, h);
+ for (int y = 0; y < h + SNAP_SIZE; y += SNAP_SIZE) {
+ pbuf.drawLine(0, y - SNAP_SIZE / 2, width(), y - SNAP_SIZE / 2);
+ pbuf.drawRect(x-1,y-1,2,2);
+ }
+ }
+ }
+ if (MODE_ERASE != _drawMode) {
+ if (!(MODE_FORMAT == _drawMode || MODE_CURVE == _drawMode || MODE_TEXT == _drawMode)) {
+ if (_showRuler) {
+ //罫線
+ pbuf.setPen(QPen(RulerColor, 1, SolidLine));
+ int step = SNAP_SIZE * 2; //SNAP_SIZEの2倍に。
+ for (int i = 0; i < height(); i += step) {
+ pbuf.drawLine(0, i, width(), i);
+ }
+ }
+ }
+
+ if (_isShowGuide) {
+ pbuf.setPen(QPen(GuideColor, 1, DashLine));
+ if (AS_HORIZONTAL == _asMode || AS_BOTH == _asMode) {
+ if (0 != _origin.x() || _isUseAllQuadrant) {
+ pbuf.drawLine(width() / _margin, 0, width() / _margin, h);
+ }
+ pbuf.drawLine(width() * (_margin - 1) / _margin, 0, width() * (_margin - 1) / _margin, h);
+ }
+
+ if (AS_VERTICAL == _asMode || AS_BOTH == _asMode) {
+ if (0 != _origin.y() || _isUseAllQuadrant) {
+ pbuf.drawLine(0, h / _margin, width(), h / _margin);
+ }
+ pbuf.drawLine(0, h * (_margin - 1) / _margin, width(), h * (_margin - 1) / _margin);
+ }
+ }
+
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ if (layer.IsShow) {
+ FNPolygonList& draws = layer.draws;
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ FNPolygon* p = draws.at(i);
+ if (r.intersects(p->boundingRect())) {
+ p->drawShape(pbuf);
+ }
+ }
+ }
+ }
+ } else {
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ if (layer.IsShow) {
+ FNPolygonList& draws = layer.draws;
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ FNPolygon* p = draws.at(i);
+ if (!_selected.contains(p)) {
+ if (r.intersects(p->boundingRect())) {
+ p->drawShape(pbuf);
+ }
+ }
+ }
+ }
+ }
+ for (uint i = 0; i < _selected.count(); ++i) {
+ _selected.at(i)->drawShape(pbuf, true);
+ }
+ if (_isSelected) {
+ pbuf.setPen(QPen(SelectionFrameColor, 1, DashLine));
+ pbuf.setBrush(NoBrush);
+ pbuf.drawRect(_selection);
+ }
+ }
+ }
+ pbuf.end();
+ _isDrawing = false;
+ repaint();
+}
+
+void FNCanvas::changeColor(QRgb c)
+{
+ _pen.setColor(QColor(c));
+ if (_isSelected && _drawMode == MODE_ERASE) {
+ for (uint i = 0; i < _selected.count(); ++i) {
+ _selected.at(i)->pen().setColor(QColor(c));
+ }
+ }
+}
+
+void FNCanvas::selectionMoveTo(int dx, int dy)
+{
+ if (_isSelected) {
+ for (uint i = 0; i < _selected.count(); ++i) {
+ _selected.at(i)->translate(dx, dy);
+ }
+ _selection.moveBy(dx, dy);
+ }
+ redraw();
+}
+
+void FNCanvas::copy()
+{
+ if (MODE_ERASE != _drawMode || _viewMode) {
+ return;
+ }
+ _clipboard.clear();
+ int size = _selected.count();
+ int a1[size];
+ int a2[size];
+ for (int i = 0; i < size; ++i) {
+ a1[i] = _current->draws.findRef(_selected.at(i));
+ a2[i] = i;
+ }
+
+ //ソート
+ FNPolygonList tmp;
+ for (int i = 0; i < size; ++i) {
+ int min = i;
+ for (int j = i + 1; j < size; ++j) {
+ if (a1[min] > a1[j]) {
+ min = j;
+ }
+ }
+ tmp.append(_selected.at(a2[min]));
+ a1[min] = a1[i];
+ a2[min] = a2[i];
+ }
+
+ //並び順を保証してコピー
+ tmp.clone(_clipboard);
+ tmp.clear();
+}
+
+void FNCanvas::paste()
+{
+ if (_viewMode) {
+ return;
+ }
+ if (MODE_ERASE == _drawMode) {
+ _selected.clear();
+ _clipboard.clone(_selected);
+ _selection = QRect(0, 0, -1, -1);
+ for (uint i = 0; i < _selected.count(); ++i) {
+ FNPolygon* o = _selected.at(i);
+ o->translate(10, 10);
+ QRect bounds = o->boundingRect();
+ if (-1 == _selection.width()) {
+ _selection = bounds;
+ } else {
+ if (bounds.x() < _selection.x()) {
+ _selection.setX(bounds.x());
+ }
+ if (bounds.y() < _selection.y()) {
+ _selection.setY(bounds.y());
+ }
+ if (bounds.right() > _selection.right()) {
+ _selection.setRight(bounds.right());
+ }
+ if (bounds.bottom() > _selection.bottom()) {
+ _selection.setBottom(bounds.bottom());
+ }
+ }
+ }
+ _selected.copy(_current->draws);
+ _isSelected = true;
+ } else {
+ int my = 10;
+ int mx = 10;
+ int x = 10;
+ QStringList lines = QStringList::split("\n", QApplication::clipboard()->text());
+ if (0 < lines.count()) {
+ FNText* p = new FNText(_pen);
+ _current->draws.append((FNPolygon*)p);
+ p->lines.clear();
+ FNPointList l;
+ l.append(new QPoint(0, 0));
+ QFont font(fontname);
+ font.setPointSize(FONTSIZE[_pen.width()]);
+ QFontMetrics fm(font);
+ int h = fm.height();
+ for (uint i = 0; i < lines.count(); ++i) {
+ p->lines.append(lines[i]);
+ int w = fm.width(lines[i]) + x;
+ l.append(new QPoint(w, my));
+ my += h;
+ l.append(new QPoint(w, my));
+ l.append(new QPoint(x, my));
+ if (mx < w) {
+ mx = w;
+ }
+ }
+ p->setPoints(l);
+ }
+ }
+ redraw();
+}
+
+void FNCanvas::redo()
+{
+ if (MODE_ERASE != _drawMode) {
+ _current->redo();
+ }
+ redraw();
+}
+
+void FNCanvas::clearList(FNPolygonList& list)
+{
+ list.setAutoDelete(true);
+ list.clear();
+ list.setAutoDelete(false);
+}
+
+void FNCanvas::resetSelection()
+{
+ _selection = QRect(0, 0, -1, -1);
+ _selected.clear();
+ _isSelected = false;
+}
+
+void FNCanvas::clear()
+{
+ resetSelection();
+ _layers.clear();
+ _current = new FNLayer();
+ _layers.append(_current);
+ _current->Name = "Layer0";
+ _selIdx = 0;
+ _isTinyPaging = false;
+ //_undobuf.clear();
+ setOrigin(0, 0);
+ redraw();
+}
+
+void FNCanvas::undo()
+{
+ _timer->stop();
+ if (MODE_ERASE != _drawMode) {
+ _current->undo();
+ } else {
+ _selected.clear();
+ _isSelected = false;
+ _layers.clear();
+ for (uint i = 0; i < _undobuf.count(); ++i) {
+ _layers.append(new FNLayer(*_undobuf.at(i)));
+ }
+ _current = _layers.at(0);
+ _selIdx = 0;
+ }
+ redraw();
+}
+
+void FNCanvas::viewChanged(bool flg)
+{
+ _tracks.clear();
+ _viewMode = flg;
+ if (_viewMode) {
+ if (_isUseAllQuadrant) {
+ rebuild();
+ }
+ setOrigin(0, 0, false);
+ }
+ redraw();
+}
+
+void FNCanvas::redobuf_flush()
+{
+ _current->redobuf_flush();
+}
+
+void FNCanvas::modeChanged(int mode)
+{
+ _tracks.clear();
+ resetSelection();
+ _drawMode = mode;
+ for (uint i = 0; i < _layers.count(); ++i) {
+ FNLayer* p = _layers.at(i);
+ p->modeChanged();
+ }
+ _undobuf.clear();
+ if (MODE_ERASE == mode) {
+ _isEraseWaiting = false;
+ for (uint i = 0; i < _layers.count(); ++i) {
+ _undobuf.append(new FNLayer(*_layers.at(i)));
+ }
+ }
+ if (MODE_CPICK != mode) {
+ _prevMode = mode;
+ }
+ redraw();
+}
+
+QRect FNCanvas::getMatrix(const QRect& r) const
+{
+ int ox = _origin.x();
+ int oy = _origin.y();
+ const int wide = 100;
+
+ int left = r.left() + ox;
+ int top = r.top() + oy;
+ int right = r.right() + ox;
+ int bottom = r.bottom() + oy;
+
+ left = (int)(left / wide) * wide;
+ top = (int)(top / wide) * wide;
+ right = (right % wide == 0 && left != right) ? right : (int)((right + wide) / wide) * wide;
+ bottom = (bottom % wide == 0 && top != bottom) ? bottom : (int)((bottom + wide) / wide) * wide;
+
+ return QRect(left - ox, top - oy, right - left, bottom - top);
+}
+
+void FNCanvas::CR()
+{
+ if (MODE_ERASE == _drawMode) {
+ return;
+ }
+ int h = height(); //(height() / 40) * 40;
+ int step = snap(h) / _margin;
+ if (_isHeadingEnables) {
+ //lastから、左方向に向けて探索する。
+ QRect r = getMatrix(_current->draws.last()->boundingRect());
+ bool isSearching = true;
+ r.moveBy(-100, 0);
+ while (isSearching) {
+ isSearching = false;
+ for (uint i = 0; i < _current->draws.count(); ++i) {
+ FNPolygon* p = _current->draws.at(i);
+ const QRect& r2 = p->boundingRect();
+ if (r.intersects(r2)) {
+ if (r.left() + 100 > r2.left()) {
+ r = getMatrix(r2);
+ r.moveBy(-100, 0);
+ isSearching = true;
+ break;
+ }
+ }
+ }
+ }
+ r.moveBy(100, 0);
+ //lastが画面の4/5以下ならば、スクロールアップする。
+ //そうでなければ、ヘッディングのみ。
+ if (_last.y() > h * 4 / 5) {
+ setOrigin(_origin.x() + r.x(), _origin.y() + step);
+ } else {
+ setOrigin(_origin.x() + r.x(), _origin.y());
+ }
+ _isHeadingEnables = false;
+ } else {
+ //lastの周囲に何も無い場合は、縦にスクロールする。
+ setOrigin(_origin.x(), _origin.y() + step);
+ }
+}
+
+void FNCanvas::erase()
+{
+ if (MODE_ERASE != _drawMode) {
+ return;
+ }
+ FNPolygonList temp;
+ int w = _eraser_s;
+ if (PENWIDTH_MAX / 2 < _pen.width()) {
+ w = _eraser_l;
+ }
+ for (uint i = 0; i < _selected.count(); ++i) {
+ _current->draws.remove(_selected.at(i));
+ //_marks.append(_selected.at(i));
+ }
+ resetSelection();
+ _tracks.clear();
+ _isEraseWaiting = false;
+ redraw();
+}
+
+void FNCanvas::setPensize(int sz)
+{
+ _pen.setWidth(sz);
+ if (_isSelected) {
+ for (uint i = 0; i < _selected.count(); ++i) {
+ if (FN_TEXT != _selected.at(i)->type()) {
+ _selected.at(i)->pen().setWidth(sz);
+ }
+ }
+ }
+}
+
+bool FNCanvas::exportPNG(const QFileInfo& info, QPixmap& buf)
+{
+ if (0 == info.fileName().length()) {
+ QMessageBox::warning(0,"FreeNoteQt", "file name is empty.");
+ return false;
+ }
+ if (info.extension(false) != "png") {
+ QMessageBox::warning(0,"FreeNoteQt", "extension '.png' expected.");
+ return false;
+ }
+
+ bool ret;
+ if (_isColorRevision) {
+ QImage img = buf.convertToImage();
+ int wd = buf.width();
+ int ht = buf.height();
+ for (int i = 0; i < ht; ++i) {
+ for (int j = 0; j < wd; ++j) {
+ QRgb c = img.pixel(j, i);
+ int r = qRed(c) >> 3;
+ int g = qGreen(c) >> 2;
+ int b = qBlue(c) >> 3;
+ r = (r << 3) | (r >> 2);
+ b = (b << 3) | (b >> 2);
+ g = (g << 2) | (g >> 4);
+ //float f1 = 248f / 255f;
+ //float f2 = 252f / 255f;
+ //img.setPixel(qRed(c) * f1, qGreen(c) * f2, qBlue(c) * f1);
+ img.setPixel(j, i, qRgb(r, g, b));
+ }
+ }
+ ret = img.save(info.absFilePath(), "PNG");
+ } else {
+ ret = buf.save(info.absFilePath(), "PNG");
+ }
+ if (ret) {
+ FNMessageBox::information(0,"FreeNoteQt", "export PNG complete.");
+ } else {
+ QMessageBox::warning(0,"FreeNoteQt", "could not export file.");
+ }
+ return ret;
+}
+
+QString FNCanvas::mkPDFscript(FNPolygon* elm, int wy)
+{
+ QString s ="";
+ char buf[1024];
+ float r;
+ float g;
+ float b;
+ if (_isColorRevision) {
+ r = (float)elm->pen().color().red() / 248.0f;
+ g = (float)elm->pen().color().green() / 252.0f;
+ b = (float)elm->pen().color().blue() / 248.0f;
+ } else {
+ r = (float)elm->pen().color().red() / 255.0f;
+ g = (float)elm->pen().color().green() / 255.0f;
+ b = (float)elm->pen().color().blue() / 255.0f;
+ }
+ if (elm->type() == FN_TEXT) {
+ FNText* t = (FNText*)elm;
+ sprintf(buf, "BT\r\n/F1 %d Tf\r\n", FONTSIZE[elm->pen().width()]);
+ s += buf;
+ sprintf(buf, "0 Tr\r\n%f %f %f rg\r\n", r, g, b);
+ s += buf;
+ QRect r = t->boundingRect();
+ r.moveBy(_origin.x(), _origin.y());
+ QFont font(fontname);
+ font.setPointSize(FONTSIZE[elm->pen().width()]);
+ QFontMetrics fm(font);
+ int h = fm.height();
+ int y = r.y() + h;
+ for (uint i = 0; i < t->lines.count(); ++i) {
+ sprintf(buf, "1 0 0 1 %d %d Tm\r\n", r.x() + 3, wy - y);
+ s += buf;
+ y = y + h;
+ s += "<";
+ for (uint j = 0; j < t->lines[i].length(); ++j) {
+ sprintf(buf, "%04X", (t->lines[i].at(j).unicode() & 0x0ffff));
+ s += buf;
+ }
+ s += "> Tj\r\n";
+ }
+ s += "ET\r\n";
+ } else {
+ s += "q\r\n";
+ if (elm->fill()) {
+ sprintf(buf, "%f %f %f rg\r\n", r, g, b);
+ } else {
+ sprintf(buf, "%f %f %f RG\r\n", r, g, b);
+ }
+ s += buf;
+ QPointArray points = elm->points().copy();
+ points.translate(_origin.x(), _origin.y());
+ if (elm->type() == FN_BEZIER) {
+ sprintf(buf, "%d %d m\r\n", points[0].x(), wy - points[0].y());
+ s += buf;
+ for (uint j = 1; j < points.count(); j += 3) {
+ sprintf(buf, "%d %d %d %d %d %d c\r\n",
+ points[j].x(), wy - points[j].y(),
+ points[j + 1].x(), wy - points[j + 1].y(),
+ points[j + 2].x(), wy - points[j + 2].y()
+ );
+ s += buf;
+ }
+ } else if (elm->type() == FN_ELLIPSE) {
+ int x = points[0].x();
+ int y = points[0].y();
+ int ex = points[1].x();
+ int ey = points[1].y();
+ int w = ex - x;
+ int h = ey - y;
+ int cx = x + w/2;
+ int cy = y;
+ int x1 = x + 3*w/4;
+ int y1 = y;
+ int x2 = x + w;
+ int y2 = y + h/4;
+ int x3 = x + w;
+ int y3 = y + h/2;
+
+ sprintf(buf, "%d %d m\r\n%d %d %d %d %d %d c\r\n", cx, wy - cy, x1, wy - y1, x2, wy - y2, x3, wy - y3);
+ s += buf;
+ x1 = x + w;
+ y1 = y + 3 * h / 4;
+ x2 = x + 3 * w / 4;
+ y2 = y + h;
+ x3 = x + w/2;
+ y3 = y + h;
+ sprintf(buf, "%d %d %d %d %d %d c\r\n", x1, wy - y1, x2, wy - y2, x3, wy - y3);
+ s += buf;
+
+ x1 = x + w / 4;
+ y1 = y + h;
+ x2 = x;
+ y2 = y + 3 * h / 4;
+ x3 = x;
+ y3 = y + h / 2;
+ sprintf(buf, "%d %d %d %d %d %d c\r\n", x1, wy - y1, x2, wy - y2, x3, wy - y3);
+ s += buf;
+ x1 = x;
+ y1 = y + h / 4;
+ x2 = x + w / 4;
+ y2 = y;
+ x3 = x + w / 2;
+ y3 = y;
+ sprintf(buf, "%d %d %d %d %d %d c\r\n", x1, wy - y1, x2, wy - y2, x3, wy - y3);
+ s += buf;
+ } else {
+ sprintf(buf, "%d %d m\r\n", points[0].x(), wy - points[0].y());
+ s += buf;
+ for (uint j = 1; j < points.count(); ++j) {
+ sprintf(buf, "%d %d l\r\n", points[j].x(), wy - points[j].y());
+ s += buf;
+ }
+ }
+ sprintf(buf, "%d w\r\n", elm->pen().width());
+ s += buf;
+ if (elm->fill()) {
+ s += "f*\r\n";
+ } else {
+ s += "S\r\n";
+ }
+ s += "Q\r\n";
+ }
+ return s;
+}
+
+bool FNCanvas::exportPDF(const QFileInfo& info)
+{
+ if (0 == info.fileName().length()) {
+ QMessageBox::warning(0,"FreeNoteQt", "file name is empty.");
+ return false;
+ }
+ if (info.extension(false) != "pdf") {
+ QMessageBox::warning(0,"FreeNoteQt", "extension '.pdf' expected.");
+ return false;
+ }
+
+ FILE* fp = NULL;
+ if (!(fp = fopen(info.absFilePath().utf8(), "wt"))) {
+ QMessageBox::warning(0,"FreeNoteQt", "could not export file.");
+ return false;
+ }
+
+ QPoint o = getTopLeft();
+ rebuild();
+ int wx = 595;
+ int wy = 842;
+ char buf[1024];
+ int bias = 0;
+ if (_isUseAllQuadrant) {
+ bias = SNAP_SIZE;
+ }
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ FNPolygonList& draws = layer.draws;
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ FNPolygon* p = draws.at(i);
+ QRect r = p->boundingRect();
+ r.moveBy(_origin.x(), _origin.y());
+ if (wx < r.right() + bias) {
+ wx = r.right() + bias;
+ }
+ if (wy < r.bottom() + bias) {
+ wy = r.bottom() + bias;
+ }
+ }
+ }
+
+ int len = 0;
+
+ /*
+ sprintf(buf, "1 0 0 -1 0 %d cm\r\n", wy);
+ QString cm = buf;
+ len += cm.length();
+ */
+ QString cm = "";
+
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ if (layer.IsShow) {
+ FNPolygonList& draws = layer.draws;
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ QString s = mkPDFscript(draws.at(i), wy);
+ len += s.length();
+ }
+ }
+ }
+
+ //int ref = 0;
+ QString header = "";
+ QStringList xref;
+ xref.append("0000000000 65535 f\r\n");
+
+ header += "%PDF-1.3\r\n";
+ sprintf(buf, "%010d 00000 n\r\n", header.length());
+ xref.append(buf);
+
+ header += "1 0 obj<</Type/Catalog/Outlines 2 0 R/Pages 3 0 R>>\r\n";
+ header += "endobj\r\n";
+ sprintf(buf, "%010d 00000 n\r\n", header.length());
+ xref.append(buf);
+
+
+ header += "2 0 obj<</Type/Outlines/Count 0>>\r\n";
+ header += "endobj\r\n";
+ sprintf(buf, "%010d 00000 n\r\n", header.length());
+ xref.append(buf);
+
+ header += "3 0 obj<</Type/Pages/Kids[4 0 R]/Count 1>>\r\n";
+ header += "endobj\r\n";
+ sprintf(buf, "%010d 00000 n\r\n", header.length());
+ xref.append(buf);
+
+ header += "4 0 obj<</Type/Page/Parent 3 0 R";
+ sprintf(buf, "/MediaBox[0 0 %d %d]", wx, wy);
+ header += buf;
+ header += "/Contents 6 0 R/Resources<</Font<</F1 5 0 R>>/ProcSet[/PDF/Text]>>>>\r\n";
+ header += "endobj\r\n";
+ sprintf(buf, "%010d 00000 n\r\n", header.length());
+ xref.append(buf);
+
+ if (encode == QString("WinAnsiEncoding")) {
+ header += "5 0 obj<</Type/Font/Subtype/Type1/BaseFont/Helvetica/FirstChar 0/LastChar 255/Encoding/WinAnsiEncoding>>\r\n";
+ } else if (encode == QString("UniJIS-UCS2-H")) {
+ header += "5 0 obj<</Type/Font/Encoding/UniJIS-UCS2-H/BaseFont/MSGothic/Subtype/Type0/DescendantFonts[<</W[0[1000] 1 94 500 231 324 500 327 389 500 631 [500] 668 [500]]/Type/Font/BaseFont/MSGothic/Subtype/CIDFontType2/CIDSystemInfo<</Ordering(Japan1)/Registry(Adobe)/Supplement 2>>/FontDescriptor<</Type/FontDescriptor/FontBBox[0 -137 1000 859]/FontName/MSGothic/Flags 32/StemV 92/CapHeight 770/XHeight 543/Ascent 859/Descent -137/ItalicAngle 0>>/DW 1000>>]>>\r\n";
+ }
+ header += "endobj\r\n";
+ sprintf(buf, "%010d 00000 n\r\n", header.length());
+ xref.append(buf);
+
+ sprintf(buf, "6 0 obj<</Length %d>>\r\n", len);
+ header += buf;
+ header += "stream\r\n";
+
+ QString footer = "";
+ footer += "xref\r\n";
+ sprintf(buf, "0 %d\r\n", xref.count());
+ footer += buf;
+ for (uint i = 0; i < xref.count(); ++i) {
+ footer += xref[i];
+ }
+ footer += "trailer\r\n";
+ sprintf(buf, "<</Size %d/Root 1 0 R>>\r\n", xref.count());
+ footer += buf;
+ footer += "startxref\r\n";
+
+ len = cm.length();
+ len += header.length();
+ fputs(header, fp);
+ fputs(cm, fp);
+
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ if (layer.IsShow) {
+ FNPolygonList& draws = layer.draws;
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ QString s = mkPDFscript(draws.at(i), wy);
+ len += s.length();
+ fputs(s, fp);
+ }
+ }
+ }
+ QString streamfooter = "endstream\r\nendobj\r\n";
+ len += streamfooter.length();
+ fputs(streamfooter, fp);
+
+ fputs(footer, fp);
+ sprintf(buf, "%d\r\n", len);
+ fputs(buf, fp);
+ fputs("%%EOF\r\n", fp);
+ fclose(fp);
+ if (_isUseAllQuadrant) {
+ setOrigin(-o.x(), -o.y());
+ }
+ FNMessageBox::information(0,"FreeNoteQt", "export PDF complete.");
+ return true;
+}
+
+bool FNCanvas::save(const QFileInfo& info)
+{
+ if (0 == info.fileName().length()) {
+ QMessageBox::warning(0,"FreeNoteQt", "file name is empty.");
+ return false;
+ }
+ if (info.extension(false) != "free") {
+ QMessageBox::warning(0,"FreeNoteQt", "extension '.free' expected.");
+ return false;
+ }
+ FILE* fp = NULL;
+ if (!(fp = fopen(info.absFilePath().utf8(), "wt"))) {
+ QMessageBox::warning(0,"FreeNoteQt", "could not save file.");
+ return false;
+ }
+ QPoint o = getTopLeft();
+ rebuild();
+ fputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", fp);
+ char buf[1024];
+ sprintf(buf, "<freenote version=\"4.1\" pg=%d idx=\"%d\">\n", _isTinyPaging, _selIdx);
+ fputs(buf, fp);
+ for (uint l = 0; l < _layers.count(); ++l) {
+ FNLayer& layer = *_layers.at(l);
+ FNPolygonList& draws = layer.draws;
+ QString s = "<layer v=";
+ if (layer.IsShow) {
+ s += "1 name=\"";
+ } else {
+ s += "0 name=\"";
+ }
+ s += layer.Name;
+ s += "\">\n";
+ fputs(s.utf8(), fp);
+ for (uint i = 0; i < draws.count() - layer.disp_offset(); ++i) {
+ FNPolygon p(*draws.at(i));
+ p.translate(_origin.x(), _origin.y());
+ if (p.type() == FN_BEZIER) {
+ sprintf(buf, "\t<bz color=\"%x\" width=\"%d\" f=\"%d\">\n", (uint)p.pen().color().rgb(), p.pen().width(), p.fill());
+ } else if (p.type() == FN_ELLIPSE) {
+ sprintf(buf, "\t<el color=\"%x\" width=\"%d\" f=\"%d\">\n", (uint)p.pen().color().rgb(), p.pen().width(), p.fill());
+ } else if (p.type() == FN_TEXT) {
+ sprintf(buf, "\t<tx color=\"%x\" width=\"%d\">\n", (uint)p.pen().color().rgb(), p.pen().width());
+ } else {
+ sprintf(buf, "\t<po color=\"%x\" width=\"%d\" f=\"%d\">\n", (uint)p.pen().color().rgb(), p.pen().width(), p.fill());
+ }
+ fputs(buf, fp);
+ QPointArray& points = p.points();
+ for (uint j = 0; j < points.count(); ++j) {
+ QPoint point = points.point(j);
+ sprintf(buf, "\t\t<p x=\"%d\" y=\"%d\"/>\n", point.x(), point.y());
+ fputs(buf, fp);
+ }
+ if (p.type() == FN_BEZIER) {
+ fputs("\t</bz>\n", fp);
+ } else if (p.type() == FN_ELLIPSE) {
+ fputs("\t</el>\n", fp);
+ } else if (p.type() == FN_TEXT) {
+ FNText* tp = (FNText*)draws.at(i);
+ for (uint j = 0; j < tp->lines.count(); ++j) {
+ s = "\t\t<t v=\"";
+ s += tp->lines[j];
+ s += "\"/>\n";
+ fputs(s.utf8(), fp);
+ }
+ fputs("\t</tx>\n", fp);
+ } else {
+ fputs("\t</po>\n", fp);
+ }
+ }
+ fputs("</layer>\n", fp);
+ }
+ fputs("</freenote>\n", fp);
+ fclose(fp);
+ if (_isUseAllQuadrant) {
+ setOrigin(-o.x()+SNAP_SIZE, -o.y()+SNAP_SIZE);
+ }
+ FNMessageBox::information(0, "FreeNoteQt", "save complete.");
+ return true;
+}
+
+bool FNCanvas::load(const QFileInfo& info)
+{
+ if (0 == info.fileName().length()) {
+ QMessageBox::warning(0,"FreeNoteQt", "file name is empty.");
+ return false;
+ }
+ if (!info.exists()) {
+ QMessageBox::warning(0,"FreeNoteQt", "file not exists.");
+ return false;
+ }
+ FILE* fp = NULL;
+ if (!(fp = fopen(info.absFilePath().utf8(), "rt"))) {
+ QMessageBox::warning(0,"FreeNoteQt", "could not open file.");
+ return false;
+ }
+ clear();
+ open(_layers, fp);
+ if ((uint)_selIdx >= _layers.count()) {
+ _selIdx = 0;
+ }
+ _current = _layers.at(_selIdx);
+ fclose(fp);
+
+ redraw();
+ FNMessageBox::information(0,"FreeNoteQt", "load complete.");
+
+ return true;
+}
+
+bool FNCanvas::import(const QFileInfo& info)
+{
+ if (0 == info.fileName().length()) {
+ QMessageBox::warning(0,"FreeNoteQt", "file name is empty.");
+ return false;
+ }
+ if (!info.exists()) {
+ QMessageBox::warning(0,"FreeNoteQt", "file not exists.");
+ return false;
+ }
+ FILE* fp = NULL;
+ if (!(fp = fopen(info.absFilePath().utf8(), "rt"))) {
+ QMessageBox::warning(0,"FreeNoteQt", "could not open file.");
+ return false;
+ }
+ clearList(_clipboard);
+ open(_clipboard, fp);
+ fclose(fp);
+ if (0 < _clipboard.count()) {
+ int x = _clipboard.at(0)->boundingRect().left();
+ int y = _clipboard.at(0)->boundingRect().top();
+ for (uint i = 1; i < _clipboard.count(); ++i) {
+ if (y > _clipboard.at(i)->boundingRect().top()) {
+ y = _clipboard.at(i)->boundingRect().top();
+ }
+ if (x > _clipboard.at(i)->boundingRect().left()) {
+ x = _clipboard.at(i)->boundingRect().left();
+ }
+ }
+ for (uint i = 0; i < _clipboard.count(); ++i) {
+ _clipboard.at(i)->translate(-x, -y);
+ }
+ }
+ FNMessageBox::information(0,"FreeNoteQt", "import complete.");
+
+ return true;
+}
+void FNCanvas::open(FNPolygonList& list, FILE* fp)
+{
+ clearList(list);
+ FNLayerList layers;
+ open(layers, fp);
+ for (uint i = 0; i < layers.count(); ++i) {
+ FNLayer& layer = *layers.at(i);
+ if (layer.IsShow) {
+ layer.draws.clone(list);
+ /*
+ FNPolygonList& elmlst = layer.draws;
+ for (uint j = 0; j < elmlst.count(); ++j) {
+ list.append(elmlst.at(j));
+ }
+ elmlst.clear();
+ */
+ }
+ }
+ layers.clear();
+}
+
+void FNCanvas::open(FNLayerList& layers, FILE* fp)
+{
+ QString line;
+ FNPointList points;
+ points.setAutoDelete(true);
+ int c;
+ int w;
+ QPen pen(Qt::black, 1);
+ FNPolygon* polygon;
+
+ char rdbuf[1024];
+ char buf[1024];
+ QString type = "";
+ QStringList lines;
+ layers.setAutoDelete(true);
+ layers.clear();
+ layers.setAutoDelete(false);
+ FNLayer* layer = new FNLayer();
+ layer->IsShow = true;
+ layer->Name = "Layer0";
+ //_current = layer;
+ layers.append(layer);
+ FNPolygonList* list = &layer->draws;
+ bool isFirstLayer = true;
+ bool fill = false;
+ while (!feof(fp)) {
+ fgets(rdbuf, sizeof(rdbuf), fp);
+ line = rdbuf;
+ if (-1 != line.find("<freenote")) {
+ if (-1 != line.find("pg=1")) {
+ _isTinyPaging = true;
+ } else {
+ _isTinyPaging = false;
+ }
+ int st = line.find("idx=") + 5;
+ int ed = line.find("\"", st);
+ strcpy(buf, line.mid(st, ed - st));
+ sscanf(buf, "%d", &_selIdx);
+ } else if (-1 != line.find("<layer ")) {
+ if (false == isFirstLayer) {
+ layer = new FNLayer();
+ list = &layer->draws;
+ layers.append(layer);
+ }
+ isFirstLayer = false;
+
+ if (-1 != line.find("v=0")) {
+ layer->IsShow = false;
+ } else if (-1 != line.find("v=1")) {
+ layer->IsShow = true;
+ }
+ int st = line.find("name=") + 6;
+ int ed = line.find("\"", st);
+ strcpy(buf, line.mid(st, ed - st));
+ QTextCodec *codec = QTextCodec::codecForName("utf8");
+ layer->Name = codec->toUnicode(buf);
+ } else if (-1 != line.find("<fnpolygon ") ||
+ -1 != line.find("<po ") ||
+ -1 != line.find("<bz ") ||
+ -1 != line.find("<el ") ||
+ -1 != line.find("<tx ")
+ ) {
+ if (-1 != line.find("<el ")) {
+ type = "Ellipse";
+ } else if (-1 != line.find("<bz ")) {
+ type = "Bezier";
+ } else if (-1 != line.find("<tx ")) {
+ type = "Text";
+ lines.clear();
+ } else {
+ type = "Polygon";
+ }
+ fill = false;
+ points.clear();
+ int st = line.find("color") + 7;
+ int ed = line.find("\"", st);
+ strcpy(buf, line.mid(st, ed - st));
+ sscanf(buf, "%x", &c);
+
+ st = line.find("width") + 7;
+ ed = line.find("\"", st);
+ strcpy(buf, line.mid(st, ed - st));
+ sscanf(buf, "%d", &w);
+
+ if (-1 != line.find(" f=\"1\"")) {
+ fill = true;
+ }
+ } else if (-1 != line.find("<point ") ||
+ -1 != line.find("<p ")
+ ) {
+ int st = line.find("x=") + 3;
+ int ed = line.find("\"", st);
+ strcpy(buf, line.mid(st, ed - st));
+ int x;
+ sscanf(buf, "%d", &x);
+
+ st = line.find("y=") + 3;
+ ed = line.find("\"", st);
+ strcpy(buf, line.mid(st, ed - st));
+ int y;
+ sscanf(buf, "%d", &y);
+ points.append(createPts(x, y)); //バグ対策
+ } else if (-1 != line.find("<t ")) {
+ int st = line.find("v=") + 3;
+ int ed = line.findRev("\"");
+ strcpy(buf, line.mid(st, ed - st));
+ QTextCodec *codec = QTextCodec::codecForName("utf8");
+ lines.append(codec->toUnicode(buf));
+ } else if (-1 != line.find("</fnpolygon") ||
+ -1 != line.find("</bz") ||
+ -1 != line.find("</el") ||
+ -1 != line.find("</po") ||
+ -1 != line.find("</tx")) {
+ pen.setColor((QRgb)c);
+ pen.setWidth(w);
+ if (type == "Bezier") {
+ list->append(polygon = createBezier(pen)); //バグ対策
+ } else if (type == "Ellipse") {
+ list->append(polygon = createEllipse(pen)); //バグ対策
+ } else if (type == "Text") {
+ list->append(polygon = createText(pen, lines));
+ } else {
+ list->append(polygon = createPolygon(pen)); //バグ対策
+ }
+ polygon->setFill(fill);
+ polygon->setPoints(points);
+ points.clear();
+ }
+ }
+}
+
+FNPolygon* FNCanvas::createPolygon(QPen& pen)
+{
+ return new FNPolygon(pen);
+}
+
+FNPolygon* FNCanvas::createBezier(QPen& pen)
+{
+ return new FNBezier(pen);
+}
+
+
+FNPolygon* FNCanvas::createEllipse(QPen& pen)
+{
+ return new FNEllipse(pen);
+}
+
+FNPolygon* FNCanvas::createText(QPen& pen, QStringList& lines)
+{
+ FNText* p = new FNText(pen);
+ p->lines = lines;
+ return p;
+}
+
+QPoint* FNCanvas::createPts(int x, int y)
+{
+ return new QPoint(x, y);
+}
+
+void FNCanvas::setGuide(bool f)
+{
+ _isShowGuide = f;
+ redraw();
+}
+
+void FNCanvas::fillChanged(bool f) {
+ _fill = f;
+ if (_isSelected) {
+ for (uint i = 0; i < _selected.count(); ++i) {
+ _selected.at(i)->setFill(f);
+ }
+ }
+}
diff --git a/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNFindDialog.cpp b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNFindDialog.cpp
new file mode 100644
index 0000000..9d0998a
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNFindDialog.cpp
@@ -0,0 +1,143 @@
+/* FreeNote for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ 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
+*/
+/*
+2005/02/27 FreeNote 1.11.10pre
+・PDFの出力形式を一部変更
+・インポート時のバグfix
+
+2005/01/04 FreeNote 1.11.6pre
+・カーブモードで8の字がかけるように整形エンジンを改善
+
+2004/10/17 FreeNote 1.10.0リリース
+2004/02/14 ver 1.7.2pre
+・検索機能の追加
+*/
+#include "fnfinddialog.h"
+#include "fmtengine.h"
+#include <qlineedit.h>
+#include <stdio.h>
+#include <qregexp.h>
+#include <qcheckbox.h>
+
+FNFindDialog::FNFindDialog( QWidget* parent, const char* name)
+ :FNFindDialogBase(parent, name, true, 0), _idx(0)
+{
+}
+
+void FNFindDialog::setElements(FNLayerList& v)
+{
+ _texts.clear();
+ for (uint i = 0; i < v.count(); ++i) {
+ FNLayer& layer = *v.at(i);
+ if (layer.IsShow) {
+ FNPolygonList& draws = layer.draws;
+ for (uint j = 0; j < draws.count(); ++j) {
+ FNPolygon* p = draws.at(j);
+ if (FN_TEXT == p->type()) {
+ _texts.append(p);
+ }
+ }
+ }
+ }
+ _idx = -1;
+}
+
+void FNFindDialog::findPrev()
+{
+ QString sch = txtSearch->text();
+ QRegExp rex(sch);
+ if (0 == sch.length()) {
+ return;
+ }
+ if (0 > _idx) {
+ _idx = _texts.count() - 1;
+ }
+ if ((uint)_idx >= _texts.count()) {
+ _idx = _texts.count() - 1;
+ }
+ for (; _idx >= 0; --_idx) {
+ FNText* p = (FNText*)_texts.at(_idx);
+ for (uint i = 0; i < p->lines.count(); ++i) {
+ if (ckbIsRegExp->isChecked()) {
+ for (uint i = 0; i < p->lines.count(); ++i) {
+ if (-1 != p->lines[i].find(rex)) {
+ emit resetOrigin();
+ QPoint sp = p->points().point(0);
+ emit originChanged(sp.x() - SNAP_SIZE, sp.y() - SNAP_SIZE);
+ --_idx;
+ return;
+ }
+ }
+ } else {
+ for (uint i = 0; i < p->lines.count(); ++i) {
+ if (-1 != p->lines[i].find(sch)) {
+ emit resetOrigin();
+ QPoint sp = p->points().point(0);
+ emit originChanged(sp.x() - SNAP_SIZE, sp.y() - SNAP_SIZE);
+ --_idx;
+ return;
+ }
+ }
+ }
+ }
+ }
+}
+
+void FNFindDialog::findNext()
+{
+ QString sch = txtSearch->text();
+ QRegExp rex(sch);
+ if (0 == sch.length()) {
+ return;
+ }
+ if (0 > _idx) {
+ _idx = 0;
+ }
+ if ((uint)_idx >= _texts.count()) {
+ _idx = 0;
+ }
+ for (; (uint)_idx < _texts.count(); ++_idx) {
+ FNText* p = (FNText*)_texts.at(_idx);
+ if (ckbIsRegExp->isChecked()) {
+ for (uint i = 0; i < p->lines.count(); ++i) {
+ if (-1 != p->lines[i].find(rex)) {
+ emit resetOrigin();
+ QPoint sp = p->points().point(0);
+ emit originChanged(sp.x() - SNAP_SIZE, sp.y() - SNAP_SIZE);
+ ++_idx;
+ return;
+ }
+ }
+ } else {
+ for (uint i = 0; i < p->lines.count(); ++i) {
+ if (-1 != p->lines[i].find(sch)) {
+ emit resetOrigin();
+ QPoint sp = p->points().point(0);
+ emit originChanged(sp.x() - SNAP_SIZE, sp.y() - SNAP_SIZE);
+ ++_idx;
+ return;
+ }
+ }
+ }
+ }
+}
+
+
+FNFindDialog::~FNFindDialog()
+{
+}
diff --git a/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNMessageBox.cpp b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNMessageBox.cpp
new file mode 100644
index 0000000..1518651
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNMessageBox.cpp
@@ -0,0 +1,243 @@
+/* FreeNote for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ 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
+*/
+/*
+2005/02/27 FreeNote 1.11.10pre
+・PDFの出力形式を一部変更
+・インポート時のバグfix
+
+2004/10/17 FreeNote 1.10.0リリース
+2003/08/15 FreeNote 1.2.1を公開
+・保存時のバグ修正
+・完了ダイアログの自動消去
+・PNGファイルへの出力
+*/
+#include "fnmessagebox.h"
+int ___fnmessagebox_timing = 1500;
+
+FNMessageBox::FNMessageBox(QWidget *parent, const char* name) : QMessageBox(parent, name)
+{
+ _timer = new QTimer(this);
+ connect(_timer, SIGNAL(timeout()), this, SLOT(timeout()));
+}
+
+FNMessageBox::FNMessageBox(const QString& caption, const QString& text, Icon icon, int button0, int button1, int button2, QWidget* parent, const char* name, bool modal, WFlags f) : QMessageBox(caption, text, icon, button0, button1, button2, parent, name, modal, f)
+{
+ _timer = new QTimer(this);
+ connect(_timer, SIGNAL(timeout()), this, SLOT(timeout()));
+}
+
+FNMessageBox::~FNMessageBox()
+{
+ delete _timer;
+}
+
+int FNMessageBox::information(QWidget* parent, const QString& caption, const QString& text, int button0, int button1, int button2)
+{
+ FNMessageBox dlg(caption, text, QMessageBox::Information, button0, button1, button2, parent);
+ dlg.show();
+ return dlg.exec();
+}
+
+int FNMessageBox::information(QWidget* parent, const QString& caption, const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text, int defaultButtonNumber, int escapeButtonNumber)
+{
+ int button0 = 0;
+ int button1 = 0;
+ int button2 = 0;
+ if (QString::null == button0Text) {
+ int id = Ok;
+ if (0 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (0 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button0 = id;
+ }
+ if (QString::null != button1Text) {
+ int id = Cancel;
+ if (1 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (1 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button1 = id;
+ }
+ if (QString::null != button2Text) {
+ int id = Abort;
+ if (2 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (2 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button2 = id;
+ }
+ FNMessageBox dlg(caption, text, QMessageBox::Information, button0, button1, button2, parent);
+ if (0 != button0) {
+ dlg.setButtonText(button0, button0Text);
+ }
+ if (0 != button1) {
+ dlg.setButtonText(button1, button1Text);
+ }
+ if (0 != button2) {
+ dlg.setButtonText(button2, button2Text);
+ }
+ dlg.show();
+ return dlg.exec();
+}
+
+int FNMessageBox::warning(QWidget* parent, const QString& caption, const QString& text, int button0, int button1, int button2)
+{
+ FNMessageBox dlg(caption, text, QMessageBox::Warning, button0, button1, button2, parent);
+ dlg.show();
+ return dlg.exec();
+}
+
+int FNMessageBox::warning(QWidget* parent, const QString& caption, const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text, int defaultButtonNumber, int escapeButtonNumber)
+{
+ int button0 = 0;
+ int button1 = 0;
+ int button2 = 0;
+ if (QString::null == button0Text) {
+ int id = Ok;
+ if (0 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (0 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button0 = id;
+ }
+ if (QString::null != button1Text) {
+ int id = Cancel;
+ if (1 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (1 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button1 = id;
+ }
+ if (QString::null != button2Text) {
+ int id = Abort;
+ if (2 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (2 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button2 = id;
+ }
+ FNMessageBox dlg(caption, text, QMessageBox::Warning, button0, button1, button2, parent);
+ if (0 != button0) {
+ dlg.setButtonText(button0, button0Text);
+ }
+ if (0 != button1) {
+ dlg.setButtonText(button1, button1Text);
+ }
+ if (0 != button2) {
+ dlg.setButtonText(button2, button2Text);
+ }
+ dlg.show();
+ return dlg.exec();
+}
+
+int FNMessageBox::critical(QWidget* parent, const QString& caption, const QString& text, int button0, int button1, int button2)
+{
+ FNMessageBox dlg(caption, text, QMessageBox::Critical, button0, button1, button2, parent);
+ dlg.show();
+ return dlg.exec();
+}
+
+int FNMessageBox::critical(QWidget* parent, const QString& caption, const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text, int defaultButtonNumber, int escapeButtonNumber)
+{
+ int button0 = 0;
+ int button1 = 0;
+ int button2 = 0;
+ if (QString::null == button0Text) {
+ int id = Ok;
+ if (0 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (0 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button0 = id;
+ }
+ if (QString::null != button1Text) {
+ int id = Cancel;
+ if (1 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (1 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button1 = id;
+ }
+ if (QString::null != button2Text) {
+ int id = Abort;
+ if (2 == defaultButtonNumber) {
+ id += Default;
+ }
+ if (2 == escapeButtonNumber) {
+ id += Escape;
+ }
+ button2 = id;
+ }
+ FNMessageBox dlg(caption, text, QMessageBox::Critical, button0, button1, button2, parent);
+ if (0 != button0) {
+ dlg.setButtonText(button0, button0Text);
+ }
+ if (0 != button1) {
+ dlg.setButtonText(button1, button1Text);
+ }
+ if (0 != button2) {
+ dlg.setButtonText(button2, button2Text);
+ }
+ dlg.show();
+ return dlg.exec();
+}
+
+void FNMessageBox::about(QWidget* parent, const QString& caption, const QString& text)
+{
+ FNMessageBox dlg(caption, text, QMessageBox::NoIcon, 0, 0, 0, parent);
+ dlg.show();
+ dlg.exec();
+}
+
+void FNMessageBox::about(QWidget* parent, const QString& caption)
+{
+ FNMessageBox dlg(caption, QString::null, QMessageBox::NoIcon, 0, 0, 0, parent);
+ dlg.show();
+ dlg.exec();
+}
+
+void FNMessageBox::setTiming(const int v)
+{
+ ___fnmessagebox_timing = v;
+}
+
+void FNMessageBox::timeout() {
+ accept();
+}
+
+void FNMessageBox::showEvent(QShowEvent* ext)
+{
+ _timer->start(___fnmessagebox_timing, true);
+}
diff --git a/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNTextDialog.cpp b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNTextDialog.cpp
new file mode 100644
index 0000000..b4eea54
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FNTextDialog.cpp
@@ -0,0 +1,93 @@
+/* FreeNote for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ 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
+*/
+/*
+2005/02/27 FreeNote 1.11.10pre
+・PDFの出力形式を一部変更
+・インポート時のバグfix
+
+2005/01/04 FreeNote 1.11.6pre
+・カーブモードで8の字がかけるように整形エンジンを改善
+
+2004/10/17 FreeNote 1.10.0リリース
+2004/02/12 ver 1.7.1pre
+・フォント仕様の変更
+・テキスト処理の高速化
+・テキストボックスの多機能化
+*/
+#include "fntextdialog.h"
+#include <stdio.h>
+#include <qcombobox.h>
+#include <qfontdatabase.h>
+#include <qcolor.h>
+#include <qtoolbutton.h>
+#include <qpalette.h>
+#include <qmultilineedit.h>
+#include "fncolordialog.h"
+
+FNTextDialog::FNTextDialog(const QString& fontname, FNColorDialog* dlg, QWidget* parent, const char* name )
+ :FNTextDialogBase(parent, name, true, 0), _pen(1), _colorSelector(dlg)
+{
+ static QFontDatabase fbase;
+ QValueList<int> sizes = fbase.pointSizes(fontname);
+ char buf[10];
+ for (uint i = 0; i < sizes.count(); ++i) {
+ sprintf(buf, "%d", sizes[i]);
+ cboFontSize->insertItem(buf);
+ }
+ lines->setFont(QFont(fontname, 20));
+}
+
+
+FNTextDialog::~FNTextDialog()
+{
+}
+
+void FNTextDialog::changeColor(QRgb c)
+{
+ fraColor->setBackgroundColor(QColor(c));
+ _pen.setColor(QColor(c));
+}
+
+void FNTextDialog::choose(int v)
+{
+ _pen.setWidth(v);
+}
+
+void FNTextDialog::btnColor_Clicked()
+{
+ _colorSelector->setColor(_pen.color());
+ _colorSelector->show();
+ if (_colorSelector->exec()) {
+ changeColor(_colorSelector->color().rgb());
+ }
+}
+
+void FNTextDialog::setPen(const QPen& pen)
+{
+ _pen = pen;
+ if (cboFontSize->count() <= (int)pen.width()) {
+ _pen.setWidth(cboFontSize->count()-1);
+ }
+ cboFontSize->setCurrentItem(_pen.width());
+ fraColor->setBackgroundColor(_pen.color());
+}
+
+const QPen& FNTextDialog::pen() const
+{
+ return _pen;
+}
diff --git a/recipes-qtopia/freenote/files/FreeNote/FreeNote/FmtEngine.cpp b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FmtEngine.cpp
new file mode 100644
index 0000000..dae8a81
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FmtEngine.cpp
@@ -0,0 +1,512 @@
+/* FreeNote for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ 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
+*/
+/*
+2005/02/27 FreeNote 1.11.10pre
+・PDFの出力形式を一部変更
+・インポート時のバグfix
+
+2005/01/04 FreeNote 1.11.6pre
+・カーブモードで8の字がかけるように整形エンジンを改善
+
+2005/01/09 FNViewer ジェスチャー用ロジック追加
+2004/10/17 FreeNote 1.10.0リリース
+2003/12/16-19 FreeNote ver 1.5.5pre
+・曲線描画ロジックの改良
+
+2003/12/14 FreeNote 1.5.4pre
+・曲線描画ロジックの改良
+
+2003/11/30-2003/12/04 FreeNote 1.5.3pre
+・ベジェ関数のスペルミスを修正
+
+2003/11/16 FreeNote 1.5.2pre
+・円描画のロジックを追加
+
+2003/11/13 FreeNote 1.5.1pre
+・スムージング追加
+2003/11/10-12
+・曲線整形モード追加
+2003/11/09 追加
+*/
+#include "fmtengine.h"
+#include <qpointarray.h>
+#include <qpe/qmath.h>
+#include <math.h>
+#include <qrect.h>
+#include <stdlib.h>
+
+int SNAP_SIZE = 32;
+int PHASE1_ANGLE = 30;
+int PHASE2_ANGLE = 30;
+double Surface(const QPoint& p1, const QPoint& p2)
+{
+ return 0.5 * abs(p1.x() * p2.y() - p1.y() * p2.x());
+}
+
+bool IsLinear(const QPoint& p1, const QPoint& p2, const QPoint& p3)
+{
+ double s1 = Surface(p1, p2);
+ double s2 = Surface(p2, p3);
+ double s3 = Surface(p1, p3);
+ if (s1 + s2 == s3) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+const double Angle(const QPoint& p1, const QPoint& p2)
+{
+ return qATan2((double)(p2.y() - p1.y()), (double)(p2.x() - p1.x()));
+}
+
+const double DiffAngle(double a1, double a2)
+{
+ if (0.0 > a1) {
+ a1 = 2 * M_PI + a1;
+ }
+ if (0.0 > a2) {
+ a2 = 2 * M_PI + a2;
+ }
+ return fabs(a1 - a2);
+}
+
+const double DiffAngle2(double a1, double a2)
+{
+ if (0.0 > a1) {
+ a1 = 360 + a1;
+ }
+ if (0.0 > a2) {
+ a2 = 360 + a2;
+ }
+ return fabs(a1 - a2);
+}
+
+const double DiffAngle(const QPoint& p1, const QPoint& p2, const QPoint& p3)
+{
+ return DiffAngle(Angle(p1, p2), Angle(p2, p3));
+}
+
+const double ToDegree(double t)
+{
+ return t * 180 / M_PI;
+}
+
+const double ToRadian(double d)
+{
+ return d * M_PI / 180;
+}
+
+const double Distance(const QPoint& p1, const QPoint& p2)
+{
+ return hypot(p1.x() - p2.x(), p1.y() - p2.y());
+}
+
+const QPoint SnapPoint(const QPoint& p, int snap)
+{
+ int x = ((int)(p.x() + snap / 2) / snap) * snap;
+ int y = ((int)(p.y() + snap / 2) / snap) * snap;
+ return QPoint(x, y);
+}
+const QPoint SnapPoint(const QPoint& p)
+{
+ return SnapPoint(p, SNAP_SIZE);
+}
+/*
+const QPoint SnapPoint(const QPoint& p)
+{
+ int x = ((int)(p.x() + SNAP_SIZE / 2) / SNAP_SIZE) * SNAP_SIZE;
+ int y = ((int)(p.y() + SNAP_SIZE / 2) / SNAP_SIZE) * SNAP_SIZE;
+ return QPoint(x, y);
+}
+*/
+
+const QPoint ArrangePoint(const QPoint& p1, const QPoint& p2)
+{
+ int x = p2.x();
+ int y = p2.y();
+ if (p1.x() - SNAP_SIZE / 2 <= x && p1.x() + SNAP_SIZE / 2 >= x) {
+ x = p1.x();
+ }
+ if (p1.y() - SNAP_SIZE / 2 <= y && p1.y() + SNAP_SIZE / 2 >= y) {
+ y = p1.y();
+ }
+ return QPoint(x, y);
+}
+
+FNPointList ReducePoints(FNPointList& p)
+{
+ if (2 >= p.count()) {
+ return p;
+ }
+ FNPointList rt;
+ rt.append(p.first());
+ QPoint* p1 = p.first();
+ QPoint* p2 = p.at(1);
+ QPoint* p3 = NULL;
+ for (uint i = 2; i < p.count(); ++i) {
+ p3 = p.at(i);
+ if (false == IsLinear(*p1, *p2, *p3)) {
+ rt.append(p2);
+ p1 = p2;
+ }
+ p2 = p3;
+ }
+ rt.append(p3);
+ return rt;
+}
+
+FNPointList ExtractAngle2(FNPointList& p, const int deg)
+{
+ FNPointList rt;
+ rt.append(p.first());
+ QPoint* st = p.first();
+ QPoint* mp = p.at(1);
+ QPoint* ed = p.last();
+ for (uint i = 2; i < p.count(); ++i) {
+ ed = p.at(i);
+ if (ToRadian(deg) <= DiffAngle(*st, *mp, *ed)) {
+ st = mp;
+ rt.append(mp);
+ }
+ mp = ed;
+ }
+ rt.append(ed);
+ return rt;
+}
+
+FNPointList ExtractAngle(FNPointList& p, const int deg)
+{
+ FNPointList rt;
+ rt.append(p.first());
+ QPoint* st = p.first();
+ QPoint* mp = p.at(1);
+ QPoint* ed = p.last();
+ for (uint i = 2; i < p.count(); ++i) {
+ ed = p.at(i);
+ if (ToRadian(deg) <= DiffAngle(*st, *mp, *ed)) {
+ st = mp;
+ rt.append(mp);
+ }
+ mp = ed;
+ }
+ if (SNAP_SIZE / 2 > Distance(*p.first(), *p.last()) && 3 < p.count()) {
+ rt.append(p.first());
+ } else {
+ rt.append(ed);
+ }
+ return rt;
+}
+
+FNPointList SumupPoints(FNPointList& p)
+{
+ if (3 >= p.count()) {
+ return p;
+ }
+ FNPointList rt;
+ rt.append(p.first());
+ QPoint* p1 = p.first();
+ QPoint* p2 = NULL;
+ double pred = 0;
+ for (uint i = 1; i < p.count() - 1; ++i) {
+ p2 = p.at(i);
+ double d = Distance(*p1, *p2);
+ if (SNAP_SIZE / 2 < d || pred > d) {
+ rt.append(p2);
+ p1 = p2;
+ d = 0;
+ }
+ pred = d;
+ }
+ rt.append(p.last());
+ return rt;
+}
+
+FNPointList SnapPoints(FNPointList& p)
+{
+ FNPointList rt;
+ for (uint i = 0; i < p.count(); ++i) {
+ QPoint tp = SnapPoint(*p.at(i));
+ p.at(i)->setX(tp.x());
+ p.at(i)->setY(tp.y());
+ rt.append(p.at(i));
+ }
+ return rt;
+}
+
+FNPointList ArrangePoints(FNPointList& p)
+{
+ if (3 >= p.count() && 2 != p.count()) {
+ return p;
+ }
+ FNPointList rt;
+ rt.append(p.first());
+ QPoint* p1 = p.first();
+ QPoint* p2 = NULL;
+ for (uint i = 1; i < p.count(); ++i) {
+ p2 = p.at(i);
+ QPoint tp = ArrangePoint(*p1, *p2);
+ p2->setX(tp.x());
+ p2->setY(tp.y());
+ rt.append(p2);
+ p1 = p2;
+ }
+ if (*p.first() == *p.last()) {
+ QPoint tp = ArrangePoint(*p1, *p.first());
+ rt.first()->setX(tp.x());
+ rt.first()->setY(tp.y());
+ }
+ return rt;
+}
+
+FNPointList TuningPoints(FNPointList& p)
+{
+ FNPointList rt;
+ if (3 >= p.count()) {
+ for (uint i = 0; i < p.count(); ++i) {
+ rt.append(new QPoint(*p.at(i)));
+ }
+ return rt;
+ }
+ rt.append(new QPoint(*p.at(0)));
+ for (uint i = 1; i < p.count() - 1; ++i) {
+ QPoint* p1 = p.at(i);
+ QPoint* p2 = p.at(i + 1);
+ rt.append(new QPoint(*p1));
+ if (i < p.count() - 2) {
+ rt.append(new QPoint((p1->x() + p2->x())/2, (p1->y() + p2->y())/2));
+ }
+ }
+ rt.append(new QPoint(*p.at(p.count()-1)));
+ return rt;
+}
+
+FNPointList ToBezier(FNPointList& p) {
+ FNPointList rt;
+ rt.append(new QPoint(*p.at(0)));
+ for (uint i = 0; i < p.count() - 2; i += 2) {
+ int x1 = p.at(i)->x();
+ int xa = p.at(i + 1)->x();
+ int x4 = p.at(i + 2)->x();
+
+ int x2 = (x1 + xa) / 2;
+ int x3 = (xa + x4) / 2;
+
+ int y1 = p.at(i)->y();
+ int ya = p.at(i + 1)->y();
+ int y4 = p.at(i + 2)->y();
+
+ int y2 = (y1 + ya) / 2;
+ int y3 = (ya + y4) / 2;
+
+ rt.append(new QPoint(x2 ,y2));
+ rt.append(new QPoint(x3 ,y3));
+ rt.append(new QPoint(x4 ,y4));
+ }
+ return rt;
+}
+
+FNPointList ToCurves(FNPointList& p) {
+ if (3 <= p.count()) {
+ //ベジェによる補完
+ return ToBezier(p);
+ } else {
+ FNPointList rt;
+ for (uint i = 0; i < p.count(); ++i) {
+ rt.append(new QPoint(*p.at(i)));
+ }
+ return rt;
+ }
+}
+
+FNPointList AutoFormat(FNPointList& p)
+{
+ FNPointList tp = ExtractAngle(p, PHASE1_ANGLE);
+ uint n;
+ do {
+ n = tp.count();
+ tp = SumupPoints(tp);
+ tp = ExtractAngle(tp, PHASE1_ANGLE);
+ tp = ArrangePoints(tp);
+ } while (n > tp.count());
+ tp = SnapPoints(tp);
+ tp = ReducePoints(tp);
+ FNPointList rt;
+ if (2 == tp.count()) {
+ if (*tp.first() == *tp.last()) {
+ return rt;
+ }
+ }
+ for (uint i = 0; i < tp.count(); ++i) {
+ rt.append(new QPoint(*tp.at(i)));
+ }
+ return rt;
+}
+
+FNPointList ToEllipse(int x, int y, int w, int h) {
+ FNPointList rt;
+ QPointArray pa;
+ pa.makeEllipse(x, y, w, h);
+ for (uint i = 0; i < pa.count(); ++i) {
+ rt.append(new QPoint(pa.point(i)));
+ }
+ return rt;
+}
+
+FNPointList AutoCurve(FNPointList& p)
+{
+ FNPointList tp2;
+ tp2.setAutoDelete(true);
+ FNPointList tp4;
+ tp4.setAutoDelete(true);
+ /*
+ QPoint sp = SnapPoint(*p.at(0));
+ QPoint ep = SnapPoint(*p.at(p.count()-1));
+ if (sp == ep) {
+ //楕円
+ int sx = p.at(0)->x();
+ int sy = p.at(0)->y();
+ int ex = sx;
+ int ey = sy;
+ for (uint i = 1; i < p.count(); ++i) {
+ QPoint tp = *p.at(i);
+ if (sx > tp.x()) {
+ sx = tp.x();
+ } else if (ex < tp.x()) {
+ ex = tp.x();
+ }
+ if (sy > tp.y()) {
+ sy = tp.y();
+ } else if (ey < tp.y()) {
+ ey = tp.y();
+ }
+ }
+ sp = SnapPoint(QPoint(sx, sy));
+ ep = SnapPoint(QPoint(ex, ey));
+ tp2.append(new QPoint(sp.x(), sp.y()));
+ tp2.append(new QPoint(ep.x(), ep.y()));
+ } else {
+ */
+ FNPointList tp = ExtractAngle2(p, PHASE2_ANGLE);
+ uint n;
+ do {
+ n = tp.count();
+ tp = SumupPoints(tp);
+ tp = ExtractAngle2(tp, PHASE2_ANGLE);
+ tp = SnapPoints(tp);
+ } while (n > tp.count());
+ tp = SumupPoints(tp);
+ tp = ReducePoints(tp);
+ tp4 = TuningPoints(tp);
+ tp2 = ToCurves(tp4);
+ //}
+ FNPointList rt;
+ if (2 == tp2.count()) {
+ if (*tp2.first() == *tp2.last()) {
+ return rt;
+ }
+ }
+ for (uint i = 0; i < tp2.count(); ++i) {
+ rt.append(new QPoint(*tp2.at(i)));
+ }
+ return rt;
+}
+
+FNPointList Smoothing(FNPointList& p)
+{
+ int tsnap = SNAP_SIZE;
+ SNAP_SIZE=8;
+ FNPointList tp = ExtractAngle2(p, PHASE2_ANGLE);
+ tp = SumupPoints(tp);
+ tp = ReducePoints(tp);
+ FNPointList tp4 = TuningPoints(tp);
+ tp4.setAutoDelete(true);
+ FNPointList tp2 = ToCurves(tp4);
+ tp2.setAutoDelete(true);
+ FNPointList rt;
+ for (uint i = 0; i < tp2.count(); ++i) {
+ rt.append(new QPoint(*tp2.at(i)));
+ }
+ SNAP_SIZE = tsnap;
+ return rt;
+}
+
+FNPointList Reduce(FNPointList& p)
+{
+ FNPointList tp = ReducePoints(p);
+ FNPointList rt;
+ for (uint i = 0; i < tp.count(); ++i) {
+ rt.append(new QPoint(*tp.at(i)));
+ }
+ return rt;
+}
+
+QRect GetBounds(FNPointList& v)
+{
+ if (1 > v.count()) {
+ return QRect(0, 0, 1, 1);
+ }
+ QPoint sp = *v.at(0);
+ QPoint ep = sp;
+ for (uint i = 1; i < v.count(); ++i) {
+ QPoint& p = *v.at(i);
+ if (sp.x() > p.x()) {
+ sp.setX(p.x());
+ }
+ if (sp.y() > p.y()) {
+ sp.setY(p.y());
+ }
+ if (ep.x() < p.x()) {
+ ep.setX(p.x());
+ }
+ if (ep.y() < p.y()) {
+ ep.setY(p.y());
+ }
+ }
+ return QRect(sp, ep);
+}
+
+FNPointList Translate(FNPointList& v, int x, int y, double xs, double ys)
+{
+ FNPointList rt;
+ for (uint i = 0; i < v.count(); ++i) {
+ QPoint& p = *v.at(i);
+ int X = (int)((p.x() - x) * xs);
+ int Y = (int)((p.y() - y) * ys);
+ rt.append(new QPoint(X, Y));
+ }
+ return rt;
+}
+
+double ToStrokeDeg(double v)
+{
+ double d = ((int)(v * 10 / 225)) * 22.5;
+ return d;
+}
+
+int sign(int v)
+{
+ if (0 > v) {
+ return -1;
+ } else if (0 < v) {
+ return 1;
+ } else {
+ return 0;
+ }
+};
+
diff --git a/recipes-qtopia/freenote/files/FreeNote/FreeNote/FrmMain.cpp b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FrmMain.cpp
new file mode 100644
index 0000000..1cb4407
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/FreeNote/FrmMain.cpp
@@ -0,0 +1,1442 @@
+/* FreeNote for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ 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 Foundatibannwaon; 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
+*/
+/*
+2005/07/12 FreeNote 1.12.0
+・Fixリリース
+
+2005/06/04 FreeNote 1.11.12pre
+・グリッドの枠線を実際の選択範囲よりも大きく表示するように変更。
+・範囲選択、グリッド、ガイド、罫線カラーのカスタマイズを可能に。
+・カラーピッカーモードの追加
+
+2005/06/02 FreeNote 1.11.11Apre
+・テキスト移動枠の不具合修正
+・罫線をグリッドの2倍で表示するように変更
+・消しゴム時の範囲指定時に、ペンオフしてワンテンポおいてから範囲確定するように変更
+
+2005/03/18 FreeNote 1.11.10Bpre
+・描画の最適化
+
+2005/02/27 FreeNote 1.11.10pre
+・PDFの出力形式を一部変更
+・インポート時のバグfix
+
+2005/01/04 FreeNote 1.11.6pre
+・カーブモードで8の字がかけるように整形エンジンを改善
+
+2005/01/04 FreeNote 1.11.5Apre
+・バグフィックス
+
+2004/12/25 FreeNote 1.11.5pre
+・レイヤー機能追加
+
+2004/10/17 FreeNote 1.10.0リリース
+・ツール機能追2004/08/26 ver 1.9.3Apre
+・罫線機能の修正
+
+・ツール機能追2004/08/26 ver 1.9.3pre
+・罫線機能を追加
+
+2004/06/19-25 ver 1.9.2pre
+・qcop装備
+
+2004/05/19 ver 1.9.1pre
+・PDFのテキストをUnicodeへ。
+・オプションにPDF::Encode項目を追加。
+
+2004/02/26 ver 1.9.0pre
+・インポート機能
+
+2004/02/19 ver 1.8.0 fix.
+2004/02/16 ver 1.7.3pre
+・編集機能強化
+
+2004/02/14 ver 1.7.2pre
+・検索機能追加
+
+2004/02/12 ver 1.7.1pre
+・フォント仕様の変更
+・テキスト処理の高速化
+・テキストボックスの多機能化
+
+2004/02/10 ver 1.7.0pre
+・文字入力
+
+2003/12/21 ver 1.6.0
+・フローティングパレットが無効となっていたバグを修正
+・機能をFix
+
+2003/12/16-19 ver 1.5.5pre
+・ペン幅の拡張(1-8)
+・アンドゥ、リドゥの実装
+・メニューの処理方法を一部改良
+・高速Quit実装
+
+2003/12/14 FreeNote 1.5.4pre
+・ペンサイズを選択可能に。
+
+2003/11/30-2003/12/04 FreeNote 1.5.3pre
+・ExportPNG, ExportPDFの初期ファイル名がfreeファイル名に沿うように修正
+
+2003/11/16 FreeNote 1.5.2pre
+・曲線整形モード修正
+ 円描画のロジックを追加
+
+2003/11/10-12 ver 1.5.1pre
+・曲線整形モード追加
+
+2003/11/09 ver 1.5.0pre
+・自動整形モード追加
+
+2003/09/03 ver 1.3.4pre
+・Use all quadrant OFF時に表示位置がリセットされる場合があるバグ対応。
+
+2003/09/01-03 ver 1.3.3pre
+・スクロールの改良
+・Use all quadrant(全象限を使用する)メニューを追加
+
+2003/08/17-23 ver 1.3.0pre
+・aboutを付与
+・CRボタン追加
+・スクロールモードの保存
+・ガイド状態の保存
+
+2003/08/17 FreeNote 1.2.2を公開
+・拡張子.freeの自動付与が失敗するケースを修正
+
+2003/08/15 FreeNote 1.2.1を公開
+・保存時のバグ修正
+・完了ダイアログの自動消去
+・PNGファイルへの出力
+
+2003/08/15 FreeNote 1.2を公開
+・オプション追加
+・スクロールガイド
+・Freeファイル関連付け
+・アイコンの変更
+
+2003/08/05 FreeNote 1.1.1preを公開
+・高速起動時に閉じた状態を保持
+・描画モード切替え時に消しゴム表示
+・保存時間短縮
+・Viewモードの挙動を変更
+・メニューの見た目を変更
+*/
+#include "frmmain.h"
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <qpe/global.h>
+#include <qpe/qcopenvelope_qws.h>
+#include <qpe/applnk.h>
+#include <qpe/mimetype.h>
+
+#include <qapplication.h>
+#include <qtoolbutton.h>
+#include <qmessagebox.h>
+#include <qgrid.h>
+#include <qdir.h>
+#include <qstring.h>
+#include <qdatetime.h>
+#include <qtextcodec.h>
+#include <qdatastream.h>
+#include <qpixmap.h>
+
+#include "fnfiledialog.h"
+#include "fniconset.h"
+#include "fmtengine.h"
+#include "fnmessagebox.h"
+#include "fnlayerdlg.h"
+#include "fnpolygon.h"
+
+#define VERSION "1.12.0"
+/*
+ * Constructs a FrmMain which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'
+ */
+FrmMain::FrmMain( QWidget* parent, const char* name, WFlags fl )
+ : QMainWindow( parent, name, fl ),
+ _drawMode(MODE_DRAW),
+ _scrollMode(AS_BOTH),
+ _useAllQuadrant(false),
+ _showRuler(false),
+ _isFullscreen(false),
+ _isLocked(true),
+ _isTinyPaging(false),
+ _isTracking(true)
+{
+ connect( qApp, SIGNAL(appMessage( const QCString&, const QByteArray&)), this, SLOT( qcop_receive( const QCString&, const QByteArray& )));
+ init();
+ setup();
+ setTitle();
+}
+
+void FrmMain::setup()
+{
+ _options.load();
+ setOptions(_options);
+}
+
+void FrmMain::qcop_receive(const QCString& msg, const QByteArray& data)
+{
+ QDataStream stream(data, IO_ReadOnly );
+
+ if (msg == "setPensize(int)") {
+ int v;
+ stream >> v;
+ if (0 <= v && v <= 8) {
+ penSelected(v);
+ }
+ } else if (msg == "setup()") {
+ setup();
+ } else if (msg == "modeChanged(int)") {
+ int v;
+ stream >> v;
+ if (0 <= v && v <= MODE_MAX) {
+ modeChanged(v);
+ }
+ } else if (msg == "changeColor(int,int,int)") {
+ int r;
+ int g;
+ int b;
+ stream >> r;
+ stream >> g;
+ stream >> b;
+ if (0 <= r && r <= 255 &&
+ 0 <= g && g <= 255 &&
+ 0 <= b && b <= 255)
+ {
+ changeColor(qRgb(r, g, b));
+ }
+ } else if (msg == "find()") {
+ _canvas->find();
+ } else if (msg == "undo()") {
+ undo();
+ } else if (msg == "redo()") {
+ _canvas->redo();
+ } else if (msg == "erase()") {
+ _canvas->erase();
+ } else if (msg == "copy()") {
+ _canvas->copy();
+ } else if (msg == "paste()") {
+ _canvas->paste();
+ } else if (msg == "clear()") {
+ clear();
+ } else if (msg == "CR()") {
+ hitRet();
+ } else if (msg == "setViewMode(int)") {
+ int v;
+ stream >> v;
+ if (0 == v) {
+ setViewMode(false);
+ } else {
+ setViewMode(true);
+ }
+ } else if (msg == "load(QString)") {
+ QString fname;
+ stream >> fname;
+ _canvas->load(QFileInfo(fname));
+ } else if (msg == "import(QString)") {
+ QString fname;
+ stream >> fname;
+ _canvas->import(QFileInfo(fname));
+ } else if (msg == "save(QString)") {
+ QString fname;
+ stream >> fname;
+ _canvas->save(QFileInfo(fname));
+ } else if (msg == "exportPDF(QString)") {
+ QString fname;
+ stream >> fname;
+ _canvas->exportPDF(QFileInfo(fname));
+ } else if (msg == "exportPNG(QString)") {
+ QString fname;
+ stream >> fname;
+ QPixmap save(_canvas->wbuffer());
+ _canvas->exportPNG(QFileInfo(fname), save);
+ } else if (msg == "tool(int)") {
+ int v;
+ stream >> v;
+ if (1 <= v && v <= 8) {
+ tool(v);
+ }
+ }
+}
+
+
+//描画モードの変更
+void FrmMain::modeChanged(int mode)
+{
+ _drawMode = mode;
+ _btnCopy->setEnabled(false);
+ //_btnPaste->setEnabled(false);
+ _btnPaste->setEnabled(true);
+ _btnRedo->setEnabled(true);
+ _btnUndo->setEnabled(true);
+ switch (_drawMode) {
+ case MODE_DRAW: //描画
+ _menubar->changeItem(_id_mode, QPixmap((const char**)draw_xpm));
+ break;
+ case MODE_FORMAT: //自動整形
+ _menubar->changeItem(_id_mode, QPixmap((const char**)format_xpm));
+ break;
+ case MODE_CURVE: //曲線整形
+ _menubar->changeItem(_id_mode, QPixmap((const char**)curve_xpm));
+ break;
+ case MODE_SMOOTH: //スムージング
+ _menubar->changeItem(_id_mode, QPixmap((const char**)smooth_xpm));
+ break;
+ case MODE_TEXT: //テキスト
+ _menubar->changeItem(_id_mode, QPixmap((const char**)text_xpm));
+ break;
+ case MODE_ERASE: //編集モード
+ _btnCopy->setEnabled(true);
+ _btnRedo->setEnabled(false);
+ _menubar->changeItem(_id_mode, QPixmap((const char**)eraser_xpm));
+ break;
+ case MODE_CPICK:
+ _menubar->changeItem(_id_mode, QPixmap((const char**)cpick_xpm));
+ break;
+ }
+ _canvas->modeChanged(_drawMode);
+}
+
+//描画モードの切り替え
+void FrmMain::modeMenuChanged(int id)
+{
+ modeChanged(_draw_menu->indexOf(id));
+}
+
+void FrmMain::tool(int id)
+{
+ QString home = getenv("HOME");
+ QString cmd = _options.toolScripts[id];
+ if (cmd == "") {
+ return;
+ }
+ QStringList token = QStringList::split(' ', cmd);
+ QDateTime dtime = QDateTime::currentDateTime();
+ QDate dt = dtime.date();
+ QTime tm = dtime.time();
+ char buf[32];
+ sprintf(buf, "%02d%02d%02d%02d%02d%02d", dt.year() % 100, dt.month(), dt.day(), tm.hour(), tm.minute(), tm.second());
+ QString wkdir = _options.wkdir;
+ if (false == QFileInfo(wkdir).isDir()) {
+ wkdir = home;
+ }
+ int st = 0;
+ for (uint i = st; i < token.count(); ++i) {
+ if (token[i] == "%file") {
+ save();
+ if (_prefile == "") {
+ return;
+ }
+ token[i] = _prefile;
+ } else if (token[i] == "%pdf") {
+ exportPDF();
+ if (_prepdf == "") {
+ return;
+ }
+ token[i] = _prepdf;
+ } else if (token[i] == "%png") {
+ exportPNG();
+ if (_prepng == "") {
+ return;
+ }
+ token[i] = _prepng;
+ } else if (token[i] == "%tmpfile") {
+ _canvas->save(QFileInfo(home + "/.tmp.free"));
+ token[i] = home + "/.tmp.free";
+ } else if (token[i] == "%tmppng") {
+ QPixmap save(_canvas->wbuffer());
+ _canvas->exportPNG(QFileInfo(home + "/.tmp.png"), save);
+ token[i] = home + "/.tmp.png";
+ } else if (token[i] == "%tmppdf") {
+ _canvas->exportPDF(QFileInfo(home + "/.tmp.pdf"));
+ token[i] = home + "/.tmp.pdf";
+ } else if (token[i] == "%newfile") {
+ token[i] = wkdir + "/" + buf +".free";
+ _canvas->save(QFileInfo(token[i]));
+ } else if (token[i] == "%newpng") {
+ QPixmap save(_canvas->wbuffer());
+ token[i] = wkdir + "/" + buf +".png";
+ _canvas->exportPNG(QFileInfo(token[i]), save);
+ } else if (token[i] == "%newpdf") {
+ token[i] = wkdir + "/" + buf +".pdf";
+ _canvas->exportPDF(QFileInfo(token[i]));
+ }
+ }
+
+ QFileInfo exefile(token[0]);
+ if (exefile.extension() == "desktop") {
+ const AppLnk *app= new AppLnk(exefile.absFilePath());
+ QStringList args;
+ for (uint i = 1; i < token.count(); ++i) {
+ args << token[i];
+ }
+ app->execute(args);
+ delete app;
+ showMinimized();
+ } else if (token[0] == "qcop") {
+ if (3 <= token.count()) {
+ QCopEnvelope qcop((const char*)token[1], (const char*)token[2]);
+ for (uint i = 3; i < token.count(); ++i) {
+ qcop << token[i];
+ }
+ }
+ } else {
+ QString args = token[0];
+ for (uint i = 1; i < token.count(); ++i) {
+ args += " ";
+ args += token[i];
+ }
+ //Global::invoke(args);
+ Global::execute(args);
+ }
+}
+
+//オプションの設定
+void FrmMain::setOptions(const FNOptionData& o)
+{
+ _tool_menu->changeItem(_id_tool1, "1:" + o.toolNames[0]);
+ _tool_menu->changeItem(_id_tool2, "2:" + o.toolNames[1]);
+ _tool_menu->changeItem(_id_tool3, "3:" + o.toolNames[2]);
+ _tool_menu->changeItem(_id_tool4, "4:" + o.toolNames[3]);
+ _tool_menu->changeItem(_id_tool5, "5:" + o.toolNames[4]);
+ _tool_menu->changeItem(_id_tool6, "6:" + o.toolNames[5]);
+ _tool_menu->changeItem(_id_tool7, "7:" + o.toolNames[6]);
+ _tool_menu->changeItem(_id_tool8, "8:" + o.toolNames[7]);
+
+ _canvas->setScrollTiming(o.timing);
+ _canvas->setVStep(o.v_step);
+ _canvas->setHStep(o.h_step);
+ _canvas->setSEraser(o.eraser_s);
+ _canvas->setLEraser(o.eraser_l);
+ _canvas->setMargin(o.margin);
+
+ _vscb->setPageStep(o.v_step);
+ _vscb->setLineStep(o.grid_size * 2);
+ _hscb->setPageStep(o.h_step);
+ _hscb->setLineStep(o.grid_size * 2);
+
+ SNAP_SIZE = o.grid_size;
+ PHASE1_ANGLE = o.phase1;
+ PHASE2_ANGLE = o.phase2;
+
+ if (o.isLMvAOn) {
+ _btnLMvA->show();
+ } else {
+ _btnLMvA->hide();
+ }
+ if (o.isLMvBOn) {
+ _btnLMvB->show();
+ } else {
+ _btnLMvB->hide();
+ }
+ if (o.isLAddOn) {
+ _btnLAdd->show();
+ } else {
+ _btnLAdd->hide();
+ }
+ if (o.isFindOn) {
+ _btnFind->show();
+ } else {
+ _btnFind->hide();
+ }
+
+ if (o.isMaximizedOn) {
+ _btnMaximized->show();
+ } else {
+ _btnMaximized->hide();
+ }
+
+ if (o.isCopyOn) {
+ _btnCopy->show();
+ } else {
+ _btnCopy->hide();
+ }
+
+ if (o.isPasteOn) {
+ _btnPaste->show();
+ } else {
+ _btnPaste->hide();
+ }
+
+ if (o.isImportOn) {
+ _btnImport->show();
+ } else {
+ _btnImport->hide();
+ }
+
+ if (o.isUndoOn) {
+ _btnUndo->show();
+ } else {
+ _btnUndo->hide();
+ }
+
+ if (o.isRedoOn) {
+ _btnRedo->show();
+ } else {
+ _btnRedo->hide();
+ }
+
+ if (o.isZoomOn) {
+ _btnZoom->show();
+ } else {
+ _btnZoom->hide();
+ }
+
+ if (o.isCROn) {
+ _btnRet->show();
+ } else {
+ _btnRet->hide();
+ }
+
+ if (o.isGuideOn) {
+ _btnGuide->show();
+ } else {
+ _btnGuide->hide();
+ }
+
+ if (o.isNewOn) {
+ _btnNew->show();
+ } else {
+ _btnNew->hide();
+ }
+
+ if (o.isClearOn) {
+ _btnClear->show();
+ } else {
+ _btnClear->hide();
+ }
+
+ if (o.isOpenOn) {
+ _btnLoad->show();
+ } else {
+ _btnLoad->hide();
+ }
+
+ if (o.isSaveOn) {
+ _btnSave->show();
+ } else {
+ _btnSave->hide();
+ }
+
+ if (o.isExportOn) {
+ _btnExportPDF->show();
+ } else {
+ _btnExportPDF->hide();
+ }
+
+ if (o.isExportPNGOn) {
+ _btnExportPNG->show();
+ } else {
+ _btnExportPNG->hide();
+ }
+
+ if (o.isLayerOn) {
+ _btnLayer->show();
+ } else {
+ _btnLayer->hide();
+ }
+
+ if (AS_HORIZONTAL == o.scrollMode) {
+ _as_horz->setOn(true);
+ } else if (AS_VERTICAL == o.scrollMode) {
+ _as_vert->setOn(true);
+ } else if (AS_BOTH == o.scrollMode) {
+ _as_both->setOn(true);
+ }
+ _btnGuide->setOn(o.isAutoScrollEnabled);
+ this->showGuide(o.isAutoScrollEnabled);
+ _canvas->setShowRuler(_showRuler = o.isShowRuler);
+ _canvas->setUseAllQuadrant(_useAllQuadrant = o.useAllQuadrant);
+ _scroll_menu->setItemChecked(_id_quadrant, _useAllQuadrant);
+ if (_useAllQuadrant) {
+ _vscb->setMinValue(-200);
+ _hscb->setMinValue(-200);
+ } else {
+ _vscb->setMinValue(0);
+ _hscb->setMinValue(0);
+ }
+ _scroll_menu->setItemChecked(_id_ruler, _showRuler);
+ _canvas->setEncode(o.encode);
+ _canvas->setFontName(o.fontname);
+ _canvas->setColorRevision(o.isColorRevision);
+ _canvas->setTxtBoxRect(o.txtBoxRect);
+ SelectionLineColor = o.selectionLineColor;
+ SelectionBrushColor = o.selectionBrushColor;
+ SelectionFrameColor = o.selectionFrameColor;
+ RulerColor = o.rulerColor;
+ GuideColor = o.guideColor;
+ GridColor = o.gridColor;
+
+ _canvas->redraw();
+}
+
+//罫線を表示する(トグル)
+void FrmMain::showRuler()
+{
+ _showRuler = !_showRuler;
+ _canvas->setShowRuler(_showRuler);
+ _options.isShowRuler = _showRuler;
+ _scroll_menu->setItemChecked(_id_ruler, _showRuler);
+ _options.save();
+}
+
+//全象限を使用する(トグル)
+void FrmMain::useAllQuadrant()
+{
+ _useAllQuadrant = !_useAllQuadrant;
+ if (_useAllQuadrant) {
+ _vscb->setMinValue(-200);
+ _hscb->setMinValue(-200);
+ } else {
+ _vscb->setMinValue(0);
+ _hscb->setMinValue(0);
+ }
+ _canvas->setUseAllQuadrant(_useAllQuadrant);
+ _scroll_menu->setItemChecked(_id_quadrant, _useAllQuadrant);
+ _options.useAllQuadrant = _useAllQuadrant;
+ _options.save();
+}
+
+//ファイルを渡してオープン
+void FrmMain::setDocument(const QString& fname)
+{
+ this->open(fname);
+}
+
+void FrmMain::showFullScreen()
+{
+ showNormal();
+ _isFullscreen = true;
+ QMainWindow::showFullScreen();
+}
+
+void FrmMain::changeColor(QRgb c)
+{
+ _btnColor->setBGColor(c);
+ _canvas->changeColor(c);
+}
+
+//ビューモードの切り替え
+void FrmMain::setViewMode(bool flg)
+{
+ if (MODE_ERASE == _drawMode) {
+ if (flg) {
+ _btnCopy->setEnabled(false);
+ _btnPaste->setEnabled(false);
+ _btnUndo->setEnabled(false);
+ _btnRedo->setEnabled(false);
+ } else {
+ _btnCopy->setEnabled(true);
+ _btnPaste->setEnabled(true);
+ _btnUndo->setEnabled(true);
+ }
+ } else {
+ _btnCopy->setEnabled(false);
+ _btnPaste->setEnabled(true);
+ _btnUndo->setEnabled(true);
+ _btnRedo->setEnabled(true);
+ }
+ _canvas->viewChanged(flg);
+ _vscb->setEnabled(!flg);
+ _hscb->setEnabled(!flg);
+}
+
+//初期設定
+void FrmMain::init()
+{
+ _colorSelector = new FNColorDialog(this);
+ QGrid* grid = new QGrid(2, this);
+ _canvas = new FNCanvas(_colorSelector, grid);
+ _canvas->resize(240, 320);
+ _vscb = new QScrollBar(0, 960, 10, 100, 0, Qt::Vertical, grid);
+ _hscb = new QScrollBar(0, 960, 10, 100, 0, Qt::Horizontal, grid);
+ this->setCentralWidget(grid);
+ this->setToolBarsMovable(false);
+ connect(_vscb, SIGNAL(valueChanged(int)), this, SLOT(scroll()));
+ connect(_hscb, SIGNAL(valueChanged(int)), this, SLOT(scroll()));
+ connect(_canvas, SIGNAL(originChanged(int, int)), this, SLOT( scrollbarChange(int, int)));
+ //メニューの構築
+ bool isVGA = false;
+ if (320 < QApplication::desktop()->width()) {
+ isVGA = true;
+ }
+
+ _page_tool = new QPEToolBar(this);
+ _page_tool->setHorizontalStretchable(true);
+
+ _btnColor = new FNColorPalette(black, _page_tool);
+ _chkFill = new QCheckBox(_page_tool);
+ _chkFill->setText("F");
+ _chkFill->setFocusPolicy(NoFocus);
+ _page_tool->addSeparator();
+ if (isVGA) {
+ _btnColor->setMinimumSize(48, 32);
+ _btnColor->setMaximumSize(48, 32);
+ } else {
+ _btnColor->setMinimumSize(24, 18);
+ _btnColor->setMaximumSize(24, 18);
+ }
+ _btnLMvA = newToolButton(_page_tool, (const char**)movetoabove_xpm, "move to above layer", isVGA);
+ _btnLMvB = newToolButton(_page_tool, (const char**)movetobelow_xpm, "move to below layer", isVGA);
+ _btnLAdd = newToolButton(_page_tool, (const char**)addlayer_xpm, "add new layer", isVGA);
+ _btnFind = newToolButton(_page_tool, (const char**)find_xpm, "find", isVGA);
+ _btnMaximized = newToolButton(_page_tool, (const char **)maximized_xpm, "maximized", isVGA);
+ _btnCopy = newToolButton(_page_tool, (const char**)copy_xpm, "copy", isVGA);
+ _btnPaste = newToolButton(_page_tool, (const char**)paste_xpm, "paste", isVGA);
+ _btnImport = newToolButton(_page_tool, (const char**)import_xpm, "import", isVGA);
+ _btnUndo = newToolButton(_page_tool, (const char**)undo_xpm, "undo", isVGA);
+ _btnRedo = newToolButton(_page_tool, (const char**)redo_xpm, "redo", isVGA);
+ //_btnColor = newToolButton(_page_tool, (const char **)color_xpm, "select color", isVGA);
+
+ _btnZoom = newToolButton(_page_tool, (const char **)zoom_xpm, "zoom", isVGA, true, false, 48);
+ _btnRet = newToolButton(_page_tool, (const char**)ret_xpm, "return", isVGA);
+ _btnGuide = newToolButton(_page_tool, (const char **)guide_xpm, "scroll guide", isVGA, true);
+ _btnNew = newToolButton(_page_tool, (const char **)new_xpm, "new page", isVGA);
+ _btnClear = newToolButton(_page_tool, (const char **)clear_xpm, "clear page", isVGA);
+ _btnLoad = newToolButton(_page_tool, (const char **)open_xpm, "load page", isVGA);
+ _btnSave = newToolButton(_page_tool, (const char **)save_xpm, "save page", isVGA);
+ _btnExportPDF = newToolButton(_page_tool, (const char **)pdf_xpm, "export PDF", isVGA);
+ _btnExportPNG = newToolButton(_page_tool, (const char **)png_xpm, "export PNG", isVGA);
+ _btnLayer = newToolButton(_page_tool, (const char**)layer_xpm, "layer on", isVGA);
+
+ connect(_btnLMvA, SIGNAL(clicked()), this, SLOT(moveAboveLayer()));
+ connect(_btnLMvB, SIGNAL(clicked()), this, SLOT(moveBelowLayer()));
+ connect(_btnLAdd, SIGNAL(clicked()), this, SLOT(addLayer()));
+ connect(_btnFind, SIGNAL(clicked()), _canvas, SLOT(find()));
+ connect(_btnColor, SIGNAL(clicked(FNPaletteBase*)), this, SLOT(colorSelectorPopup()));
+
+ connect(_btnRet, SIGNAL(clicked()), this, SLOT(hitRet()));
+ connect(_btnSave, SIGNAL(clicked()), this, SLOT(save()));
+ connect(_btnLoad, SIGNAL(clicked()), this, SLOT(load()));
+ connect(_btnNew, SIGNAL(clicked()), this, SLOT(newPage()));
+ connect(_btnClear, SIGNAL(clicked()), this, SLOT(clear()));
+ connect(_btnExportPDF, SIGNAL(clicked()), this, SLOT(exportPDF()));
+ connect(_btnExportPNG, SIGNAL(clicked()), this, SLOT(exportPNG()));
+ connect(_btnLayer, SIGNAL(clicked()), this, SLOT(showLayer()));
+
+ connect(_btnMaximized, SIGNAL(clicked()), this, SLOT(showFullScreen()));
+ connect(_btnZoom, SIGNAL(toggled(bool)), this, SLOT(setViewMode(bool)));
+ connect(_btnCopy, SIGNAL(clicked()), _canvas, SLOT(copy()));
+ connect(_btnPaste, SIGNAL(clicked()), _canvas, SLOT(paste()));
+ connect(_btnImport, SIGNAL(clicked()), this, SLOT(import()));
+ connect(_btnUndo, SIGNAL(clicked()), this, SLOT(undo()));
+ connect(_btnRedo, SIGNAL(clicked()), _canvas, SLOT(redo()));
+ connect(_btnGuide, SIGNAL(toggled(bool)), this, SLOT(showGuide(bool)));
+ connect(_canvas, SIGNAL(resetViewMode()), _btnZoom, SLOT(toggle()));
+ connect(_chkFill, SIGNAL(toggled(bool)), _canvas, SLOT(fillChanged(bool)));
+ connect(_canvas, SIGNAL(pickColor(QRgb)), this, SLOT(changeColor(QRgb)));
+
+ _scroll_menu = new QPopupMenu();
+ QActionGroup* scroll_action_group = new QActionGroup(_scroll_menu, "scroll actions", true);
+ scroll_action_group->insert(_as_horz = new QAction("horz", "&Horizontal", 0, scroll_action_group, 0, true));
+ scroll_action_group->insert(_as_vert = new QAction("vert", "&Vertical", 0, scroll_action_group, 0, true));
+ scroll_action_group->insert(_as_both = new QAction("both", "&Both", 0, scroll_action_group, 0, true));
+ _as_both->setOn(true);
+ _id_guide = _scroll_menu->insertItem("&Guide", _btnGuide, SLOT(toggle()), CTRL + Key_G);
+ _id_ruler = _scroll_menu->insertItem("show &Ruler", this, SLOT(showRuler()), CTRL + Key_K);
+ _id_quadrant = _scroll_menu->insertItem("&Use all quadrant", this, SLOT(useAllQuadrant()), CTRL + Key_U);
+ _scroll_menu->insertSeparator();
+ scroll_action_group->addTo(_scroll_menu);
+ connect(scroll_action_group, SIGNAL(selected(QAction*)), this, SLOT(scroll_menu_selected(QAction*)));
+
+ _main_menu = new QPopupMenu();
+ _main_menu->setCheckable(true);
+
+ _edit_menu = new QPopupMenu();
+ _edit_menu->insertItem("&Copy", _canvas, SLOT(copy()), CTRL + Key_C);
+ _edit_menu->insertItem("&Paste", _canvas, SLOT(paste()), CTRL + Key_V);
+ _edit_menu->insertItem("&Undo", this, SLOT(undo()), CTRL + Key_Z);
+ _edit_menu->insertItem("&Redo", _canvas, SLOT(redo()), CTRL + Key_Y);
+ _edit_menu->insertItem("&Find", _canvas, SLOT(find()), CTRL + Key_F);
+
+ _main_menu->insertItem("&Edit", _edit_menu);
+
+ _layer_menu = new QPopupMenu();
+ _layer_menu->insertItem("show", this, SLOT(showLayer()), CTRL + Key_B);
+ _layer_menu->insertItem("move above", this, SLOT(moveAboveLayer()), Key_A);
+ _layer_menu->insertItem("move below", this, SLOT(moveBelowLayer()), Key_Z);
+ _layer_menu->insertItem("add layer", this, SLOT(addLayer()), CTRL + Key_A);
+ _id_tinyPaging = _layer_menu->insertItem("tiny paging mode", this, SLOT(toggleTinyPaging()), CTRL + Key_T);
+ _main_menu->insertItem("&Layer", _layer_menu);
+
+
+ _tool_menu = new QPopupMenu();
+ _id_tool1 = _tool_menu->insertItem("1:", this, SLOT(tool1()), CTRL + Key_1);
+ _id_tool2 = _tool_menu->insertItem("2:", this, SLOT(tool2()), CTRL + Key_2);
+ _id_tool3 = _tool_menu->insertItem("3:", this, SLOT(tool3()), CTRL + Key_3);
+ _id_tool4 = _tool_menu->insertItem("4:", this, SLOT(tool4()), CTRL + Key_4);
+ _id_tool5 = _tool_menu->insertItem("5:", this, SLOT(tool5()), CTRL + Key_5);
+ _id_tool6 = _tool_menu->insertItem("6:", this, SLOT(tool6()), CTRL + Key_6);
+ _id_tool7 = _tool_menu->insertItem("7:", this, SLOT(tool7()), CTRL + Key_7);
+ _id_tool8 = _tool_menu->insertItem("8:", this, SLOT(tool8()), CTRL + Key_8);
+ _main_menu->insertItem("&Tool", _tool_menu);
+
+ _main_menu->insertItem("&Zoom", _btnZoom, SLOT(toggle()), Key_Tab);
+ _main_menu->insertItem("&Maximize", this, SLOT(showFullScreen()), CTRL + Key_M);
+ _main_menu->insertItem("&Normalize", this, SLOT(showNormal()), CTRL + Key_R);
+ _main_menu->insertSeparator();
+
+ _main_menu->insertItem("&Scroll", _scroll_menu);
+ _main_menu->insertSeparator();
+
+ _file_menu = new QPopupMenu();
+ _file_menu->setCheckable(true);
+ _file_menu->insertItem("&New", this, SLOT(newPage()), CTRL + Key_N);
+ _file_menu->insertItem("&Clear", this, SLOT(clear()), CTRL + Key_L);
+ _file_menu->insertItem("&Import", this, SLOT(import()), CTRL + Key_I);
+ _file_menu->insertItem("&Load", this, SLOT(load()), CTRL + Key_O);
+ _file_menu->insertItem("&Save", this, SLOT(save()), CTRL + Key_S);
+ _file_menu->insertItem("save &As", this, SLOT(saveAs()));
+ _main_menu->insertItem("&File", _file_menu);
+
+ _export_menu = new QPopupMenu();
+ _export_menu->setCheckable(true);
+ _export_menu->insertItem("PDF", this, SLOT(exportPDF()), CTRL + Key_P);
+ _export_menu->insertItem("PNG", this, SLOT(exportPNG()), CTRL + Key_E);
+ _export_menu->insertSeparator();
+ _id_saveNPdf = _export_menu->insertItem("save with pdf", this, SLOT(toggleSaveNPdf()));
+
+ _main_menu->insertItem("&Export", _export_menu);
+ _main_menu->insertSeparator();
+ _main_menu->insertItem("&Quit", this, SLOT(quit()), Key_Escape);
+ _main_menu->insertSeparator();
+ _main_menu->insertItem("&About", this, SLOT(about()));
+
+ _menubar = new QPEMenuBar(this);
+ _menubar->insertItem("&Menu", _main_menu);
+
+ _draw_menu = new QPopupMenu();
+ int id_draw;
+ id_draw = _draw_menu->insertItem(QIconSet(QPixmap((const char**)draw_xpm)), "&Draw");
+ _draw_menu->setAccel(Key_D, id_draw);
+ id_draw = _draw_menu->insertItem(QIconSet(QPixmap((const char**)format_xpm)), "Auto&Format");
+ _draw_menu->setAccel(Key_F, id_draw);
+ id_draw = _draw_menu->insertItem(QIconSet(QPixmap((const char**)curve_xpm)), "Auto&Curve");
+ _draw_menu->setAccel(Key_C, id_draw);
+ id_draw = _draw_menu->insertItem(QIconSet(QPixmap((const char**)smooth_xpm)), "&Smooth");
+ _draw_menu->setAccel(Key_S, id_draw);
+ id_draw = _draw_menu->insertItem(QIconSet(QPixmap((const char**)text_xpm)), "&Text");
+ _draw_menu->setAccel(Key_T, id_draw);
+ id_draw = _draw_menu->insertItem(QIconSet(QPixmap((const char**)eraser_xpm)), "&Eraser");
+ _draw_menu->setAccel(Key_E, id_draw);
+ id_draw = _draw_menu->insertItem(QIconSet(QPixmap((const char**)cpick_xpm)), "Color&Picker");
+ _draw_menu->setAccel(Key_P, id_draw);
+ _id_mode = _menubar->insertItem(QPixmap((const char**)draw_xpm), _draw_menu);
+ connect(_draw_menu, SIGNAL(activated(int)), this, SLOT(modeMenuChanged(int)));
+ connect(_canvas, SIGNAL(changeMode(int)), this, SLOT(modeChanged(int)));
+
+ _pen_menu = new QPopupMenu();
+ for (int i = 0; i < 8; ++i) {
+ char buf[5];
+ sprintf(buf, "%dpts.", (i + 1));
+ int id = _pen_menu->insertItem(QIconSet(makePenPixmap(i + 1)), buf);
+ _pen_menu->setAccel(Key_1 + i, id);
+ }
+ _id_pen = _menubar->insertItem(makePenPixmap(1), _pen_menu);
+ connect(_pen_menu, SIGNAL(activated(int)), this, SLOT(penSelected(int)));
+ _menubar->insertItem(_page_tool);
+ _btnCopy->setEnabled(false);
+ _btnPaste->setEnabled(true);
+ _title = "";
+}
+
+void FrmMain::undo()
+{
+ _canvas->undo();
+ setTitle();
+}
+
+void FrmMain::addLayer()
+{
+ _canvas->addLayer();
+ setTitle();
+}
+
+void FrmMain::moveAboveLayer()
+{
+ _canvas->moveAboveLayer();
+ setTitle();
+}
+
+void FrmMain::moveBelowLayer()
+{
+ _canvas->moveBelowLayer();
+ setTitle();
+}
+
+//簡易ページモードを切り替える
+void FrmMain::toggleTinyPaging()
+{
+ bool f = _canvas->isTinyPaging();
+ _canvas->setTinyPaging(!f);
+ setTitle();
+}
+
+
+//ペン画像の作成
+QPixmap FrmMain::makePenPixmap(int n)
+{
+ const char** icons[] = {
+ (const char**)pt1_xpm,
+ (const char**)pt2_xpm,
+ (const char**)pt3_xpm,
+ (const char**)pt4_xpm,
+ (const char**)pt5_xpm,
+ (const char**)pt6_xpm,
+ (const char**)pt7_xpm,
+ (const char**)pt8_xpm,
+ };
+ QPixmap pt(icons[n - 1]);
+ QImage mask = pt.mask()->convertToImage();
+ pt = pt.convertToImage().smoothScale(32/*48*/, 16);
+ QBitmap msk;
+ msk = mask.smoothScale(32/*48*/, 16);
+ pt.setMask(msk);
+ return pt;
+}
+
+//ペンの選択
+void FrmMain::penSelected(int id)
+{
+ int idx = _pen_menu->indexOf(id);
+ if (-1 != idx) {
+ _menubar->changeItem(_id_pen, makePenPixmap(idx + 1));
+ _canvas->setPensize(idx + 1);
+ }
+}
+
+//Save with PDFの切り替え
+void FrmMain::toggleSaveNPdf()
+{
+ if (_export_menu->isItemChecked(_id_saveNPdf)) {
+ _export_menu->setItemChecked(_id_saveNPdf, false);
+ } else {
+ _export_menu->setItemChecked(_id_saveNPdf, true);
+ }
+}
+
+//ツールボタンの作成
+QToolButton* FrmMain::newToolButton(QWidget* parent, const char** icon1, const char** icon2, const QString& textLabel, const bool isVGA, const bool isToggle, const bool isOn, const int width)
+{
+ QToolButton* btn = new QToolButton(parent);
+ if (isVGA) {
+ btn->setMinimumSize(width, 32);
+ btn->setMaximumSize(width, 32);
+ } else {
+ btn->setMinimumSize(18, 18);
+ btn->setMaximumSize(18, 18);
+ }
+ btn->setOnIconSet(QIconSet(QPixmap(icon1)));
+ btn->setOffIconSet(QIconSet(QPixmap(icon2)));
+ btn->setToggleButton(isToggle);
+ btn->setOn(isOn);
+ btn->setTextLabel(textLabel);
+ btn->setAutoRaise(false);
+
+ return btn;
+}
+
+//ツールボタンの作成
+QToolButton* FrmMain::newToolButton(QWidget* parent, const char** icon, const QString& textLabel, const bool isVGA, const bool isToggle, const bool isOn, const int width)
+{
+ QToolButton* btn = new QToolButton(parent);
+ if (isVGA) {
+ btn->setMinimumSize(width, 32);
+ btn->setMaximumSize(width, 32);
+ } else {
+ btn->setMinimumSize(20, 20);
+ btn->setMaximumSize(20, 20);
+ }
+ btn->setPixmap(QPixmap(icon));
+ btn->setToggleButton(isToggle);
+ btn->setOn(isOn);
+ btn->setTextLabel(textLabel);
+ btn->setAutoRaise(false);
+
+ return btn;
+}
+
+//スクロールメニューの選択
+void FrmMain::scroll_menu_selected(QAction* act)
+{
+ if (act->text() == "horz") {
+ _options.scrollMode = _scrollMode = AS_HORIZONTAL;
+ } else if (act->text() == "vert") {
+ _options.scrollMode = _scrollMode = AS_VERTICAL;
+ } else if (act->text() == "both") {
+ _options.scrollMode = _scrollMode = AS_BOTH;
+ }
+ _options.save();
+ if (_btnGuide->isOn()) {
+ _canvas->setScrollMode(_scrollMode);
+ }
+}
+
+//ガイドの表示
+void FrmMain::showGuide(bool flg)
+{
+ _canvas->setGuide(flg);
+ if (flg) {
+ _canvas->setScrollMode(_scrollMode);
+ } else {
+ _canvas->setScrollMode(AS_NONE);
+ }
+ _main_menu->setItemChecked(_id_guide, flg);
+ if (flg != _options.isAutoScrollEnabled) {
+ _options.isAutoScrollEnabled = flg;
+ _options.save();
+ }
+}
+
+//スクロールバーの設定
+void FrmMain::scrollbarChange(int x, int y)
+{
+ //*
+ if (_useAllQuadrant) {
+ if (-200 != _vscb->minValue()) {
+ _vscb->setMinValue(-200);
+ }
+ if (-200 != _hscb->minValue()) {
+ _hscb->setMinValue(-200);
+ }
+ } else {
+ if (0 != _vscb->minValue()) {
+ _vscb->setMinValue(0);
+ }
+ if (0 != _hscb->minValue()) {
+ _hscb->setMinValue(0);
+ }
+ }
+ //*/
+ if (_canvas->isShowGuide()) {
+ _isTracking = false;
+ } else {
+ _isTracking = false;
+ }
+ _hscb->setValue(x);
+ _vscb->setValue(y);
+}
+
+//新規ページ作成
+void FrmMain::newPage()
+{
+ if (QMessageBox::warning( this, "FreeNote Qt", "OK to create new page ?", "OK", "Cancel", 0, 1, 1 )) {
+ return;
+ }
+ _hscb->setMaxValue(960);
+ _vscb->setMaxValue(960);
+ _canvas->clear();
+ QDir dir = _file.dir();
+ _file.setFile(dir, "");
+ _title = "";
+ setTitle();
+}
+
+//ページクリア
+void FrmMain::clear()
+{
+ if (QMessageBox::warning( this, "FreeNote Qt", "OK to clear this page ?", "OK", "Cancel", 0, 1, 1 )) {
+ return;
+ }
+ _hscb->setMaxValue(960);
+ _vscb->setMaxValue(960);
+ _canvas->clear();
+}
+
+//カラーセレクタの表示
+void FrmMain::colorSelectorPopup()
+{
+ _colorSelector->setColor(_btnColor->color());
+ _colorSelector->show();
+ if (_colorSelector->exec()) {
+ changeColor(_colorSelector->color().rgb());
+ }
+}
+
+//ファイルオープン
+void FrmMain::open(const QString& fname)
+{
+ _file.setFile(fname);
+ if (_file.exists()) {
+ _canvas->load(_file.absFilePath());
+ setTitle(&_file);
+ } else {
+ _file.setFile(_file.dir(), "");
+ }
+}
+
+//ファイル保存
+void FrmMain::save()
+{
+ _prefile = "";
+ if (!_file.exists() || _file.isDir() || _file.extension(false) != "free") {
+ return saveAs();
+ } else {
+ Config conf("FreeNoteQt");
+ conf.setGroup("Format");
+ _file.setFile(QDir(conf.readEntry("free", _file.dirPath())), _file.fileName());
+ _canvas->save(_file.absFilePath());
+ _prefile = _file.absFilePath();
+ conf.writeEntry("free", _file.dirPath() + "/");
+ setTitle(&_file);
+ if (_export_menu->isItemChecked(_id_saveNPdf)) {
+ QFileInfo info = _file;
+ QString tmpf = _file.absFilePath();
+ tmpf = tmpf.left(tmpf.findRev(".free"));
+ info.setFile(tmpf + ".pdf");
+ _canvas->exportPDF(info);
+ }
+ }
+}
+
+//別名保存
+void FrmMain::saveAs()
+{
+ _prefile = "";
+ Config conf("FreeNoteQt");
+ conf.setGroup("Format");
+ if (_file.baseName() == "") {
+ _file.setFile(QDir(conf.readEntry("free", _file.dirPath())), "");
+ } else {
+ _file.setFile(QDir(conf.readEntry("free", _file.dirPath())), _file.fileName());
+ }
+
+ //_frmPalette->close();
+ FNFileDialog dlg(this, "*.free", "FreeNote Qt - save", false);
+ dlg.setCurrentFile(_file);
+ dlg.showMaximized();
+ if (dlg.exec()) {
+ QFileInfo info = dlg.currentFile();
+ if (!info.isDir() && !dlg.isTopDir()) {
+ if (info.extension(false) != "free") {
+ QDir dir = info.dir(true);
+ QString fname = info.fileName();
+ info.setFile(dir, fname + ".free");
+ }
+ if (info.exists()) {
+ if (QMessageBox::warning( this, "FreeNote Qt", "file " + info.fileName() + "\n already exists.\n\n OK to overwrite ?", "OK", "Cancel", 0, 1, 1 )) {
+ return;
+ }
+ }
+ _file = info;
+ if (_canvas->save(_file)) {
+ _prefile = _file.absFilePath();
+ conf.writeEntry("free", _file.dirPath() + "/");
+ setTitle(&_file);
+ if (_export_menu->isItemChecked(_id_saveNPdf)) {
+ QString tmpf = _file.absFilePath();
+ tmpf = tmpf.left(tmpf.findRev(".free"));
+ info.setFile(tmpf + ".pdf");
+ _canvas->exportPDF(info);
+ }
+ }
+ }
+ }
+}
+
+//ファイル読み込み
+void FrmMain::load()
+{
+ Config conf("FreeNoteQt");
+ conf.setGroup("Format");
+ if (_file.fileName() == "") {
+ _file.setFile(QDir(conf.readEntry("free", _file.dirPath())), ".free");
+ } else {
+ _file.setFile(QDir(conf.readEntry("free", _file.dirPath())), _file.fileName());
+ }
+
+ //_frmPalette->close();
+ FNFileDialog dlg(this, "*.free", "FreeNote Qt - load", true);
+ dlg.setCurrentFile(_file);
+ dlg.showMaximized();
+ if (dlg.exec()) {
+ QFileInfo info = dlg.currentFile();
+ if (info.isFile() && info.exists()) {
+ _file = info;
+ if (_canvas->load(_file)) {
+ _prefile = _file.absFilePath();
+ conf.writeEntry("free", _file.dirPath() + "/");
+ setTitle(&_file);
+ }
+ }
+ }
+}
+
+//クリップボード読み込み
+void FrmMain::import()
+{
+ Config conf("FreeNoteQt");
+ conf.setGroup("Format");
+ QFileInfo info = _file;
+ if (info.fileName() == "") {
+ info.setFile(QDir(conf.readEntry("import", info.dirPath())), ".free");
+ } else {
+ info.setFile(QDir(conf.readEntry("import", info.dirPath())), info.fileName());
+ }
+
+ //_frmPalette->close();
+ FNFileDialog dlg(this, "*.free", "FreeNote Qt - import", true);
+ dlg.setCurrentFile(info);
+ dlg.showMaximized();
+ if (dlg.exec()) {
+ info = dlg.currentFile();
+ if (info.isFile() && info.exists()) {
+ _canvas->import(info);
+ conf.writeEntry("import", info.dirPath() + "/");
+ }
+ }
+}
+
+//PNGへの出力
+void FrmMain::exportPNG()
+{
+ _prepng = "";
+ Config conf("FreeNoteQt");
+ conf.setGroup("Format");
+ QFileInfo info = _file;
+ if (info.fileName() == "") {
+ info.setFile(QDir(conf.readEntry("png", info.dirPath())), "");
+ } else {
+ info.setFile(QDir(conf.readEntry("png", info.dirPath())), info.fileName());
+ }
+
+ //_frmPalette->close();
+ QPixmap save(_canvas->wbuffer());
+ FNFileDialog dlg(this, "*.png", "FreeNote Qt - exportPNG", false);
+ if (info.extension()=="free") {
+ QString tmpf = info.absFilePath();
+ tmpf = tmpf.left(tmpf.findRev(".free"));
+ info.setFile(tmpf);
+ } else {
+ info.setFile(info.dir(), "");
+ }
+ dlg.setCurrentFile(info);
+ dlg.showMaximized();
+ if (dlg.exec() && !dlg.isTopDir()) {
+ info = dlg.currentFile();
+ if (!info.isDir() && !dlg.isTopDir()) {
+ if (info.extension(false) != "png") {
+ QDir dir = info.dir(true);
+ QString fname = info.fileName();
+ info.setFile(dir, fname + ".png");
+ }
+ if (info.exists()) {
+ if (QMessageBox::warning( this, "FreeNote Qt", "file " + info.fileName() + "\n already exists.\n\n OK to overwrite ?", "OK", "Cancel", 0, 1, 1 )) {
+ return;
+ }
+ }
+ _canvas->exportPNG(info, save);
+ _prepng = info.absFilePath();
+ conf.writeEntry("png", info.dirPath() + "/");
+ }
+ }
+}
+
+//PDFへの出力
+void FrmMain::exportPDF()
+{
+ _prepdf = "";
+ Config conf("FreeNoteQt");
+ conf.setGroup("Format");
+
+ QFileInfo info = _file;
+ if (info.fileName() == "") {
+ info.setFile(QDir(conf.readEntry("pdf", info.dirPath())), "");
+ } else {
+ info.setFile(QDir(conf.readEntry("pdf", info.dirPath())), info.fileName());
+ }
+
+ //_frmPalette->close();
+ FNFileDialog dlg(this, "*.pdf", "FreeNote Qt - exportPDF", false);
+ if (info.extension()=="free") {
+ QString tmpf = info.absFilePath();
+ tmpf = tmpf.left(tmpf.findRev(".free"));
+ info.setFile(tmpf);
+ } else {
+ info.setFile(info.dir(), "");
+ }
+
+ dlg.setCurrentFile(info);
+ dlg.showMaximized();
+
+ if (dlg.exec() && !dlg.isTopDir()) {
+ info = dlg.currentFile();
+ if (!info.isDir() && !dlg.isTopDir()) {
+ if (info.extension(false) != "pdf") {
+ QDir dir = info.dir(true);
+ QString fname = info.fileName();
+ info.setFile(dir, fname + ".pdf");
+ }
+ if (info.exists()) {
+ if (QMessageBox::warning( this, "FreeNote Qt", "file " + info.fileName() + "\n already exists.\n\n OK to overwrite ?", "OK", "Cancel", 0, 1, 1 )) {
+ return;
+ }
+ }
+ _canvas->exportPDF(info);
+ _prepdf = info.absFilePath();
+ conf.writeEntry("pdf", info.dirPath() + "/");
+ }
+ }
+}
+
+//スクロール
+void FrmMain::scroll()
+{
+ if (!_isTracking) {
+ _isTracking = true;
+ return;
+ }
+ if (_canvas->isDrawing()) {
+ return;
+ }
+ int ox = _hscb->value();
+ int oy = _vscb->value();
+ _canvas->setOrigin(ox, oy);
+ int mx = _hscb->maxValue();
+ int my = _vscb->maxValue();
+ if (ox + 50 > mx) {
+ _hscb->setMaxValue(mx + 100);
+ }
+ if (oy + 50 > my) {
+ _vscb->setMaxValue(my + 100);
+ }
+ this->setFocus();
+}
+
+//終了
+void FrmMain::quit()
+{
+ _options.txtBoxRect = _canvas->txtBoxRect();
+ _options.save();
+ showNormal();
+ close();
+}
+
+//終了前処理
+void FrmMain::closeEvent(QCloseEvent* e)
+{
+ if (!_options.isQuitQuickly) {
+ if (QMessageBox::warning( this, "FreeNote Qt", "OK to quit ?", "OK", "Cancel", 0, 1, 1 )) {
+ return;
+ }
+ }
+ e->accept();
+}
+
+//リターン押下処理
+void FrmMain::hitRet()
+{
+ _canvas->erase();
+ _canvas->CR();
+}
+
+//キー押下イベント
+void FrmMain::keyPressEvent(QKeyEvent* evt)
+{
+ if (!_btnZoom->isOn()) {
+ int key = evt->key();
+ switch (key) {
+ case Qt::Key_Return:
+ case Qt::Key_Space:
+ case Qt::Key_F33:
+ _canvas->erase();
+ _canvas->CR();
+ break;
+ case Qt::Key_Left:
+ if (_canvas->isSelected()) {
+ _canvas->selectionMoveTo(-1, 0);
+ } else {
+ _hscb->subtractPage();
+ scroll();
+ }
+ break;
+ case Qt::Key_Right:
+ if (_canvas->isSelected()) {
+ _canvas->selectionMoveTo(1, 0);
+ } else {
+ _hscb->addPage();
+ scroll();
+ }
+ break;
+ case Qt::Key_Up:
+ if (_canvas->isSelected()) {
+ _canvas->selectionMoveTo(0, -1);
+ } else {
+ _vscb->subtractPage();
+ scroll();
+ }
+ break;
+ case Qt::Key_Down:
+ if (_canvas->isSelected()) {
+ _canvas->selectionMoveTo(0, 1);
+ } else {
+ _vscb->addPage();
+ scroll();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void FrmMain::showLayer()
+{
+ FNLayerDlg dlg(_canvas);
+ _canvas->resetSelection();
+ dlg.show();
+ dlg.exec();
+ setTitle();
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+FrmMain::~FrmMain()
+{
+ // no need to delete child widgets, Qt does it all for us
+ delete _colorSelector;
+}
+
+//about boxの表示
+void FrmMain::about()
+{
+ char buf[1024];
+ sprintf(buf, "FreeNote Qt\nversion %s\nCopyright(c) 2003-2005,jojo3", VERSION);
+ QMessageBox::about(this, "FreeNote Qt", buf);
+}
+
+void FrmMain::setTitle(QFileInfo* file) {
+ if (NULL != file) {
+ _title = file->fileName();
+ }
+ QString t = "FreeNote Qt[";
+ if (_canvas->isTinyPaging()) {
+ _layer_menu->setItemChecked(_id_tinyPaging, true);
+ t += "P:";
+ } else {
+ _layer_menu->setItemChecked(_id_tinyPaging, false);
+ t += "L:";
+ }
+ t += _canvas->currentLayerName();
+ t += "] ";
+ setCaption(t + _title);
+}
diff --git a/recipes-qtopia/freenote/files/FreeNote/apps/Applications/FreeNote.desktop b/recipes-qtopia/freenote/files/FreeNote/apps/Applications/FreeNote.desktop
new file mode 100644
index 0000000..46e24cd
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/apps/Applications/FreeNote.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Comment=
+Exec=FreeNote
+Icon=freenote
+Type=Application
+Name=FreeNoteQt
+Display=640x480/144dpi,480x640/144dpi
+MimeType=application/freenote
+MimeTypeIcons=freenote
+CanFastload=1
diff --git a/recipes-qtopia/freenote/files/FreeNote/apps/Settings/FreeNoteSetup.desktop b/recipes-qtopia/freenote/files/FreeNote/apps/Settings/FreeNoteSetup.desktop
new file mode 100644
index 0000000..e621c90
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/apps/Settings/FreeNoteSetup.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Comment=
+Exec=FreeNoteSetup
+Icon=fnsetup
+Type=Application
+Name=FNSetup
+Name[ja]=FN險ュ螳
+Display=640x480/144dpi,480x640/144dpi
+CanFastload=0
diff --git a/recipes-qtopia/freenote/files/FreeNote/pics/fnsetup.png b/recipes-qtopia/freenote/files/FreeNote/pics/fnsetup.png
new file mode 100644
index 0000000..39028e3
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/pics/fnsetup.png
Binary files differ
diff --git a/recipes-qtopia/freenote/files/FreeNote/pics/freenote.png b/recipes-qtopia/freenote/files/FreeNote/pics/freenote.png
new file mode 100644
index 0000000..ebde776
--- /dev/null
+++ b/recipes-qtopia/freenote/files/FreeNote/pics/freenote.png
Binary files differ
diff --git a/recipes-qtopia/freenote/freenote_1.12.0.bb b/recipes-qtopia/freenote/freenote_1.12.0.bb
new file mode 100644
index 0000000..1299127
--- /dev/null
+++ b/recipes-qtopia/freenote/freenote_1.12.0.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "Auto-Correction Paint Program for Opie/Qtopia"
+SECTION = "opie/applications"
+PRIORITY = "optional"
+LICENSE = "GPL"
+APPNAME = "FreeNote"
+APPTYPE = "binary"
+APPDESKTOP = "apps/Applications"
+
+SRC_URI = "http://www.urban.ne.jp/home/kanemori/zaurus/FreeNote_1.12.0.tar.gz \
+ file://FreeNote"
+S = "${WORKDIR}/FreeNote"
+
+inherit opie
+
+do_configure_prepend() {
+ mv -f FreeNote subdir1
+ mv -f FreeNoteSetup subdir2
+ printf "TEMPLATE=subdirs\nSUBDIRS=subdir1 subdir2\n" >> freenote.pro
+ cd ${S}/subdir1 && rm *.pro && qmake -project && echo "TARGET=FreeNote" >> subdir1.pro
+ cd ${S}/subdir2 && rm *.pro && qmake -project && echo "TARGET=FreeNoteSetup" >> subdir2.pro
+ cd ${S}
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/bin/
+ install -m 0755 FreeNoteSetup ${D}${palmtopdir}/bin/
+ install -d ${D}${palmtopdir}/pics/
+ install -m 0644 pics/freenote.png ${D}${palmtopdir}/pics
+ install -m 0644 pics/fnsetup.png ${D}${palmtopdir}/pics
+ install -d ${D}${palmtopdir}/apps/Applications
+ install -m 0644 apps/Applications/FreeNote.desktop ${D}${palmtopdir}/apps/Applications
+ install -d ${D}${palmtopdir}/apps/Settings
+ install -m 0644 apps/Settings/FreeNoteSetup.desktop ${D}${palmtopdir}/apps/Settings
+}
+
+SRC_URI[md5sum] = "06b5aeb6cc97107090438a364f0ce89b"
+SRC_URI[sha256sum] = "e6a0a5b674c4803bfd1ffda9660c29f4399294623ed095b0d1c554367c7db73c"
diff --git a/recipes-qtopia/frodo/frodo-4.1b/Frodo.png b/recipes-qtopia/frodo/frodo-4.1b/Frodo.png
new file mode 100644
index 0000000..e346195
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.1b/Frodo.png
Binary files differ
diff --git a/recipes-qtopia/frodo/frodo-4.1b/conffiles b/recipes-qtopia/frodo/frodo-4.1b/conffiles
new file mode 100644
index 0000000..c9a83ab
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.1b/conffiles
@@ -0,0 +1 @@
+/home/root/.frodorc
diff --git a/recipes-qtopia/frodo/frodo-4.1b/frodo-joystick-4state.diff b/recipes-qtopia/frodo/frodo-4.1b/frodo-joystick-4state.diff
new file mode 100644
index 0000000..3234736
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.1b/frodo-joystick-4state.diff
@@ -0,0 +1,77 @@
+diff -u Src/C64_Qtopia.i Src/C64_Qtopia.i
+--- Src/C64_Qtopia.i 2004-07-11 09:28:05.000000000 +0200
++++ Src/C64_Qtopia.i 2004-07-11 09:30:20.000000000 +0200
+@@ -246,10 +246,16 @@
+ }
+
+ // Joystick keyboard emulation
+- if (TheDisplay->NumLock())
++ if (TheDisplay->NumLock() == 1)
+ TheCIA1->Joystick1 &= joykey;
+ else
++ if (TheDisplay->NumLock() == 2)
+ TheCIA1->Joystick2 &= joykey;
++ else
++ if (TheDisplay->NumLock() == 3) {
++ TheCIA1->Joystick1 &= joykey;
++ TheCIA1->Joystick2 &= joykey;
++ }
+
+ // Count TOD clocks
+ TheCIA1->CountTOD();
+diff -u Src/Display.h Src/Display.h
+--- Src/Display.h 2002-01-02 22:31:34.000000000 +0100
++++ Src/Display.h 2004-07-11 09:30:43.000000000 +0200
+@@ -59,7 +59,7 @@
+ #else
+ void PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick);
+ #endif
+- bool NumLock(void);
++ int NumLock(void);
+ void InitColors(uint8 *colors);
+ void NewPrefs(Prefs *prefs);
+
+diff -u Src/Display_QtopiaSDL.i Src/Display_QtopiaSDL.i
+--- Src/Display_QtopiaSDL.i 2004-07-11 09:28:06.000000000 +0200
++++ Src/Display_QtopiaSDL.i 2004-07-11 09:31:47.000000000 +0200
+@@ -17,7 +17,7 @@
+ // Display surface
+ static SDL_Surface *screen = NULL;
+
+-// Mode of Joystick emulation. 0 = none, 1 = Joyport 1, 2 = Joyport 2
++// Mode of Joystick emulation. 0 = none, 1 = Joyport 1, 2 = Joyport 2, 3 = both
+ static short joy_emu = 0;
+
+ // Keyboard
+@@ -210,6 +210,8 @@
+ draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "1", black, fill_gray);
+ else if (joy_emu == 2)
+ draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "2", black, fill_gray);
++ else if (joy_emu == 3)
++ draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "3", black, fill_gray);
+ draw_string(screen, 24, (screen->h - 17) + 4, speedometer_string, black, fill_gray);
+
+ // Update display
+@@ -500,7 +502,7 @@
+ // fprintf(stderr, "SDL-Key: %d\n", event.key.keysym.sym);
+ if (tab_pressed && event.key.keysym.sym == SDLK_j)
+ {
+- if (joy_emu < 2)
++ if (joy_emu < 3)
+ joy_emu++;
+ else
+ joy_emu = 0;
+@@ -573,11 +575,9 @@
+ * Check if NumLock is down (for switching the joystick keyboard emulation)
+ */
+
+-bool C64Display::NumLock(void)
++int C64Display::NumLock(void)
+ {
+- if (joy_emu == 2)
+- return true;
+- return false;
++ return joy_emu;
+ }
+
+
diff --git a/recipes-qtopia/frodo/frodo-4.1b/frodo-qte.diff b/recipes-qtopia/frodo/frodo-4.1b/frodo-qte.diff
new file mode 100644
index 0000000..c00001d
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.1b/frodo-qte.diff
@@ -0,0 +1,8171 @@
+diff -urN Src/C64.cpp Src/C64.cpp
+--- Src/C64.cpp 2002-01-02 22:18:46.000000000 +0100
++++ Src/C64.cpp 2002-11-21 17:07:04.000000000 +0100
+@@ -600,7 +600,7 @@
+ #ifndef FRODO_SC
+ long vicptr; // File offset of VIC data
+ #endif
+-
++
+ while (c != 10)
+ c = fgetc(f); // Shouldn't be necessary
+ if (fgetc(f) != 0) {
+@@ -698,7 +698,11 @@
+ #endif
+
+ #ifdef __unix
+-#include "C64_x.i"
++# ifdef QTOPIA
++# include "C64_Qtopia.i"
++# else
++# include "C64_x.i"
++# endif
+ #endif
+
+ #ifdef __mac__
+diff -urN Src/C64.h Src/C64.h
+--- Src/C64.h 2002-01-02 22:15:10.000000000 +0100
++++ Src/C64.h 2002-11-21 17:07:02.000000000 +0100
+@@ -22,7 +22,6 @@
+ #include "ROlib.h"
+ #endif
+
+-
+ // false: Frodo, true: FrodoSC
+ extern bool IsFrodoSC;
+
+@@ -142,6 +141,14 @@
+ CmdPipe *gui;
+ #endif
+
++#ifdef QTOPIA
++private:
++ static CmdPipe *staticGUI;
++public:
++ static void StartGUI();
++ static void StopGUI();
++#endif
++
+ #ifdef WIN32
+ private:
+ void CheckTimerChange();
+diff -urN Src/C64_Qtopia.i Src/C64_Qtopia.i
+--- Src/C64_Qtopia.i 1970-01-01 01:00:00.000000000 +0100
++++ Src/C64_Qtopia.i 2002-11-21 17:07:04.000000000 +0100
+@@ -0,0 +1,459 @@
++/*
++ * C64_Qtopia.i - Put the pieces together, X specific stuff
++ *
++ * Frodo (C) 1994-1997,2002 Christian Bauer
++ * Unix stuff by Bernd Schmidt/Lutz Vieweg
++ * Qtopia changes (against C64_x.i) from Bernd Lachner
++ */
++
++#include "main.h"
++
++
++static struct timeval tv_start;
++
++#ifndef HAVE_USLEEP
++/*
++ * NAME:
++ * usleep -- This is the precision timer for Test Set
++ * Automation. It uses the select(2) system
++ * call to delay for the desired number of
++ * micro-seconds. This call returns ZERO
++ * (which is usually ignored) on successful
++ * completion, -1 otherwise.
++ *
++ * ALGORITHM:
++ * 1) We range check the passed in microseconds and log a
++ * warning message if appropriate. We then return without
++ * delay, flagging an error.
++ * 2) Load the Seconds and micro-seconds portion of the
++ * interval timer structure.
++ * 3) Call select(2) with no file descriptors set, just the
++ * timer, this results in either delaying the proper
++ * ammount of time or being interupted early by a signal.
++ *
++ * HISTORY:
++ * Added when the need for a subsecond timer was evident.
++ *
++ * AUTHOR:
++ * Michael J. Dyer Telephone: AT&T 414.647.4044
++ * General Electric Medical Systems GE DialComm 8 *767.4044
++ * P.O. Box 414 Mail Stop 12-27 Sect'y AT&T 414.647.4584
++ * Milwaukee, Wisconsin USA 53201 8 *767.4584
++ * internet: mike@sherlock.med.ge.com GEMS WIZARD e-mail: DYER
++ */
++
++#include <unistd.h>
++#include <stdlib.h>
++#include <stdio.h>
++#include <errno.h>
++#include <time.h>
++#include <sys/time.h>
++#include <sys/param.h>
++#include <sys/types.h>
++
++int usleep(unsigned long int microSeconds)
++{
++ unsigned int Seconds, uSec;
++ int nfds, readfds, writefds, exceptfds;
++ struct timeval Timer;
++
++ nfds = readfds = writefds = exceptfds = 0;
++
++ if( (microSeconds == (unsigned long) 0)
++ || microSeconds > (unsigned long) 4000000 )
++ {
++ errno = ERANGE; /* value out of range */
++ perror( "usleep time out of range ( 0 -> 4000000 ) " );
++ return -1;
++ }
++
++ Seconds = microSeconds / (unsigned long) 1000000;
++ uSec = microSeconds % (unsigned long) 1000000;
++
++ Timer.tv_sec = Seconds;
++ Timer.tv_usec = uSec;
++
++ if( select( nfds, &readfds, &writefds, &exceptfds, &Timer ) < 0 )
++ {
++ perror( "usleep (select) failed" );
++ return -1;
++ }
++
++ return 0;
++}
++#endif
++
++CmdPipe *C64::staticGUI = 0;
++
++/*
++ * Static StartGUI method to start gui before SDL initilization
++ */
++
++void C64::StartGUI()
++{
++ // we need to create a potential GUI subprocess here, because we don't want
++ // it to inherit file-descriptors (such as for the audio-device and alike..)
++ if (!staticGUI)
++ {
++ // try to start up FrodoGUI.
++ staticGUI = new CmdPipe("frodogui", "");
++ if (staticGUI)
++ {
++ if (staticGUI->fail)
++ {
++ delete staticGUI;
++ staticGUI = 0;
++ }
++ }
++ // wait until the GUI process responds (if it does...)
++ if (staticGUI)
++ {
++ if (5 != staticGUI->ewrite("ping\n",5))
++ {
++ delete staticGUI;
++ staticGUI = 0;
++ }
++ else
++ {
++ char c;
++ fd_set set;
++ FD_ZERO(&set);
++ FD_SET(staticGUI->get_read_fd(), &set);
++ struct timeval tv;
++ tv.tv_usec = 0;
++ tv.tv_sec = 5;
++ if (select(FD_SETSIZE, &set, NULL, NULL, &tv) <= 0)
++ {
++ delete staticGUI;
++ staticGUI = 0;
++ }
++ else
++ {
++ if (1 != staticGUI->eread(&c, 1))
++ {
++ delete staticGUI;
++ staticGUI = 0;
++ }
++ else
++ {
++ if (c != 'o')
++ {
++ delete staticGUI;
++ staticGUI = 0;
++ }
++ }
++ }
++ }
++ }
++ }
++}
++
++/*
++ * Static StopGUI method
++ */
++
++void C64::StopGUI()
++{
++ if (staticGUI)
++ {
++ staticGUI->ewrite("quit\n",5);
++ delete staticGUI;
++ }
++}
++
++/*
++ * Constructor, system-dependent things
++ */
++
++void C64::c64_ctor1(void)
++{
++ // Initialize joystick variables
++ joyfd[0] = joyfd[1] = -1;
++ joy_minx = joy_miny = 32767;
++ joy_maxx = joy_maxy = -32768;
++
++ gui = staticGUI;
++}
++
++void C64::c64_ctor2(void)
++{
++#ifndef __svgalib__
++ if (!gui) {
++ fprintf(stderr,"Alas, master, no preferences window will be available.\n"
++ "If you wish to see one, make sure the 'wish' interpreter\n"
++ "(Tk version >= 4.1) is installed in your path.\n"
++ "You can still use Frodo, though. Use F10 to quit, \n"
++ "F11 to cause an NMI and F12 to reset the C64.\n"
++ "You can change the preferences by editing ~/.frodorc\n");
++ }
++#endif // SVGAlib
++
++ gettimeofday(&tv_start, NULL);
++}
++
++
++/*
++ * Destructor, system-dependent things
++ */
++
++void C64::c64_dtor(void)
++{
++}
++
++
++/*
++ * Start main emulation thread
++ */
++
++void C64::Run(void)
++{
++ // Reset chips
++ TheCPU->Reset();
++ TheSID->Reset();
++ TheCIA1->Reset();
++ TheCIA2->Reset();
++ TheCPU1541->Reset();
++
++ // Patch kernal IEC routines
++ orig_kernal_1d84 = Kernal[0x1d84];
++ orig_kernal_1d85 = Kernal[0x1d85];
++ PatchKernal(ThePrefs.FastReset, ThePrefs.Emul1541Proc);
++
++ quit_thyself = false;
++ thread_func();
++}
++
++
++/*
++ * Vertical blank: Poll keyboard and joysticks, update window
++ */
++
++void C64::VBlank(bool draw_frame)
++{
++ // Poll keyboard
++ TheDisplay->PollKeyboard(TheCIA1->KeyMatrix, TheCIA1->RevMatrix, &joykey);
++ if (TheDisplay->quit_requested)
++ quit_thyself = true;
++
++ // Poll joysticks
++ TheCIA1->Joystick1 = poll_joystick(0);
++ TheCIA1->Joystick2 = poll_joystick(1);
++
++ if (ThePrefs.JoystickSwap) {
++ uint8 tmp = TheCIA1->Joystick1;
++ TheCIA1->Joystick1 = TheCIA1->Joystick2;
++ TheCIA1->Joystick2 = tmp;
++ }
++
++ // Joystick keyboard emulation
++ if (TheDisplay->NumLock())
++ TheCIA1->Joystick1 &= joykey;
++ else
++ TheCIA1->Joystick2 &= joykey;
++
++ // Count TOD clocks
++ TheCIA1->CountTOD();
++ TheCIA2->CountTOD();
++
++ // Update window if needed
++ if (draw_frame) {
++ TheDisplay->Update();
++
++ // Calculate time between VBlanks, display speedometer
++ struct timeval tv;
++ gettimeofday(&tv, NULL);
++ if ((tv.tv_usec -= tv_start.tv_usec) < 0) {
++ tv.tv_usec += 1000000;
++ tv.tv_sec -= 1;
++ }
++ tv.tv_sec -= tv_start.tv_sec;
++ double elapsed_time = (double)tv.tv_sec * 1000000 + tv.tv_usec;
++ speed_index = 20000 / (elapsed_time + 1) * ThePrefs.SkipFrames * 100;
++
++ // Limit speed to 100% if desired
++ if ((speed_index > 100) && ThePrefs.LimitSpeed) {
++ usleep((unsigned long)(ThePrefs.SkipFrames * 20000 - elapsed_time));
++ speed_index = 100;
++ }
++
++ gettimeofday(&tv_start, NULL);
++
++ TheDisplay->Speedometer((int)speed_index);
++ }
++}
++
++
++/*
++ * Open/close joystick drivers given old and new state of
++ * joystick preferences
++ */
++
++void C64::open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2)
++{
++#ifdef HAVE_LINUX_JOYSTICK_H
++ if (oldjoy1 != newjoy1) {
++ joy_minx = joy_miny = 32767; // Reset calibration
++ joy_maxx = joy_maxy = -32768;
++ if (newjoy1) {
++ joyfd[0] = open("/dev/js0", O_RDONLY);
++ if (joyfd[0] < 0)
++ fprintf(stderr, "Couldn't open joystick 1\n");
++ } else {
++ close(joyfd[0]);
++ joyfd[0] = -1;
++ }
++ }
++
++ if (oldjoy2 != newjoy2) {
++ joy_minx = joy_miny = 32767; // Reset calibration
++ joy_maxx = joy_maxy = -32768;
++ if (newjoy2) {
++ joyfd[1] = open("/dev/js1", O_RDONLY);
++ if (joyfd[1] < 0)
++ fprintf(stderr, "Couldn't open joystick 2\n");
++ } else {
++ close(joyfd[1]);
++ joyfd[1] = -1;
++ }
++ }
++#endif
++}
++
++
++/*
++ * Poll joystick port, return CIA mask
++ */
++
++uint8 C64::poll_joystick(int port)
++{
++#ifdef HAVE_LINUX_JOYSTICK_H
++ JS_DATA_TYPE js;
++ uint8 j = 0xff;
++
++ if (joyfd[port] >= 0) {
++ if (read(joyfd[port], &js, JS_RETURN) == JS_RETURN) {
++ if (js.x > joy_maxx)
++ joy_maxx = js.x;
++ if (js.x < joy_minx)
++ joy_minx = js.x;
++ if (js.y > joy_maxy)
++ joy_maxy = js.y;
++ if (js.y < joy_miny)
++ joy_miny = js.y;
++
++ if (joy_maxx-joy_minx < 100 || joy_maxy-joy_miny < 100)
++ return 0xff;
++
++ if (js.x < (joy_minx + (joy_maxx-joy_minx)/3))
++ j &= 0xfb; // Left
++ else if (js.x > (joy_minx + 2*(joy_maxx-joy_minx)/3))
++ j &= 0xf7; // Right
++
++ if (js.y < (joy_miny + (joy_maxy-joy_miny)/3))
++ j &= 0xfe; // Up
++ else if (js.y > (joy_miny + 2*(joy_maxy-joy_miny)/3))
++ j &= 0xfd; // Down
++
++ if (js.buttons & 1)
++ j &= 0xef; // Button
++ }
++ }
++ return j;
++#else
++ return 0xff;
++#endif
++}
++
++
++/*
++ * The emulation's main loop
++ */
++
++void C64::thread_func(void)
++{
++ int linecnt = 0;
++
++#ifdef FRODO_SC
++ while (!quit_thyself) {
++
++ // The order of calls is important here
++ if (TheVIC->EmulateCycle())
++ TheSID->EmulateLine();
++ TheCIA1->CheckIRQs();
++ TheCIA2->CheckIRQs();
++ TheCIA1->EmulateCycle();
++ TheCIA2->EmulateCycle();
++ TheCPU->EmulateCycle();
++
++ if (ThePrefs.Emul1541Proc) {
++ TheCPU1541->CountVIATimers(1);
++ if (!TheCPU1541->Idle)
++ TheCPU1541->EmulateCycle();
++ }
++ CycleCounter++;
++#else
++ while (!quit_thyself) {
++
++ // The order of calls is important here
++ int cycles = TheVIC->EmulateLine();
++ TheSID->EmulateLine();
++#if !PRECISE_CIA_CYCLES
++ TheCIA1->EmulateLine(ThePrefs.CIACycles);
++ TheCIA2->EmulateLine(ThePrefs.CIACycles);
++#endif
++
++ if (ThePrefs.Emul1541Proc) {
++ int cycles_1541 = ThePrefs.FloppyCycles;
++ TheCPU1541->CountVIATimers(cycles_1541);
++
++ if (!TheCPU1541->Idle) {
++ // 1541 processor active, alternately execute
++ // 6502 and 6510 instructions until both have
++ // used up their cycles
++ while (cycles >= 0 || cycles_1541 >= 0)
++ if (cycles > cycles_1541)
++ cycles -= TheCPU->EmulateLine(1);
++ else
++ cycles_1541 -= TheCPU1541->EmulateLine(1);
++ } else
++ TheCPU->EmulateLine(cycles);
++ } else
++ // 1541 processor disabled, only emulate 6510
++ TheCPU->EmulateLine(cycles);
++#endif
++ linecnt++;
++#if !defined(__svgalib__)
++ if ((linecnt & 0xfff) == 0 && gui) {
++
++ // check for command from GUI process
++ // fprintf(stderr,":");
++ while (gui->probe()) {
++ char c;
++ if (gui->eread(&c, 1) != 1) {
++ delete gui;
++ gui = 0;
++ fprintf(stderr,"Oops, GUI process died...\n");
++ } else {
++ // fprintf(stderr,"%c",c);
++ switch (c) {
++ case 'q':
++ quit_thyself = true;
++ break;
++ case 'r':
++ Reset();
++ break;
++ case 'p':{
++ Prefs *np = Frodo::reload_prefs();
++ NewPrefs(np);
++ ThePrefs = *np;
++ break;
++ }
++ default:
++ break;
++ }
++ }
++ }
++ }
++#endif
++ }
++}
+diff -urN Src/configarm Src/configarm
+--- Src/configarm 1970-01-01 01:00:00.000000000 +0100
++++ Src/configarm 2002-11-21 17:07:02.000000000 +0100
+@@ -0,0 +1,2 @@
++configure --host=i386-linux --x-includes=/opt/Qtopia/sharp/include/ --x-libraries=/opt/Qtopia/sharp/lib/ --with-sdl-prefix=/opt/Qtopia/sharp/ --enable-qtopia
++
+diff -urN Src/configure Src/configure
+--- Src/configure 2002-01-02 17:44:11.000000000 +0100
++++ Src/configure 2002-11-21 17:07:03.000000000 +0100
+@@ -1,24 +1,18 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by Autoconf 2.52d.
++# Generated by GNU Autoconf 2.53.
+ #
+-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
++# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ # Free Software Foundation, Inc.
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+
+-# 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
+-
+-# Sed expression to map a string onto a valid variable name.
+-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
++if expr a : '\(a\)' >/dev/null 2>&1; then
++ as_expr=expr
++else
++ as_expr=false
++fi
+
+-# Sed expression to map a string onto a valid CPP name.
+-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+ ## --------------------- ##
+ ## M4sh Initialization. ##
+@@ -32,8 +26,165 @@
+ set -o posix
+ fi
+
++# NLS nuisances.
++# Support unset when possible.
++if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
++ { $as_unset LANG || test "${LANG+set}" != set; } ||
++ { LANG=C; export LANG; }
++(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
++ { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
++ { LC_ALL=C; export LC_ALL; }
++(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
++ { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
++ { LC_TIME=C; export LC_TIME; }
++(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
++ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
++ { LC_CTYPE=C; export LC_CTYPE; }
++(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
++ { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
++ { LANGUAGE=C; export LANGUAGE; }
++(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
++ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
++ { LC_COLLATE=C; export LC_COLLATE; }
++(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
++ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
++ { LC_NUMERIC=C; export LC_NUMERIC; }
++(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
++ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
++ { LC_MESSAGES=C; export LC_MESSAGES; }
++
++
+ # Name of the executable.
+-as_me=`echo "$0" |sed 's,.*[\\/],,'`
++as_me=`(basename "$0") 2>/dev/null ||
++$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'`
++
++# PATH needs CR, and LINENO needs CR and PATH.
++# 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" >conftest.sh
++ echo "exit 0" >>conftest.sh
++ chmod +x conftest.sh
++ if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conftest.sh
++fi
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" || {
++ # Find who we are. Look in the path if we contain no path at all
++ # relative or not.
++ 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
++
++ ;;
++ 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_me: error: cannot find myself; rerun with an absolute path" >&2
++ { (exit 1); exit 1; }; }
++ fi
++ case $CONFIG_SHELL in
++ '')
++ 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=.
++ for as_base in sh bash ksh sh5; do
++ case $as_dir in
++ /*)
++ if ("$as_dir/$as_base" -c '
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
++ CONFIG_SHELL=$as_dir/$as_base
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
++ fi;;
++ esac
++ done
++done
++;;
++ esac
++
++ # 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 before each line; the second 'sed' does the real
++ # work. The second script uses 'N' to pair each line-number line
++ # with the numbered line, 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
++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
++ sed '=' <$as_myself |
++ sed '
++ N
++ s,$,-,
++ : loop
++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ t loop
++ s,-$,,
++ s,^['$as_cr_digits']*\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 sensible to this).
++ . ./$as_me.lineno
++ # Exit status is that of the last command.
++ exit
++}
++
++
++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
++ *c*,-n*) ECHO_N= ECHO_C='
++' ECHO_T=' ' ;;
++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++esac
+
+ if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+@@ -61,22 +212,12 @@
+
+ as_executable_p="test -f"
+
+-# Support unset when possible.
+-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+- as_unset=unset
+-else
+- as_unset=false
+-fi
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+-# NLS nuisances.
+-$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+-$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+-$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+-$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+-$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+-$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+-$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+-$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+ # IFS
+ # We need space, tab and new line, in precisely that order.
+@@ -85,7 +226,8 @@
+ IFS=" $as_nl"
+
+ # CDPATH.
+-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
++$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
++
+
+ # Name of the host.
+ # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+@@ -100,7 +242,8 @@
+ ac_default_prefix=/usr/local
+ cross_compiling=no
+ subdirs=
+-MFLAGS= MAKEFLAGS=
++MFLAGS=
++MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
+
+ # Maximum number of lines to put in a shell here document.
+@@ -108,6 +251,13 @@
+ # only ac_max_sed_lines should be used.
+ : ${ac_max_here_lines=38}
+
++# Identity of this package.
++PACKAGE_NAME=
++PACKAGE_TARNAME=
++PACKAGE_VERSION=
++PACKAGE_STRING=
++PACKAGE_BUGREPORT=
++
+ ac_unique_file="VIC.cpp"
+ # Factoring default headers for most tests.
+ ac_includes_default="\
+@@ -146,6 +296,7 @@
+ # include <unistd.h>
+ #endif"
+
++
+ # Initialize some variables set by options.
+ ac_init_help=
+ ac_init_version=false
+@@ -184,13 +335,6 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
+-# Identity of this package.
+-PACKAGE_NAME=
+-PACKAGE_TARNAME=
+-PACKAGE_VERSION=
+-PACKAGE_STRING=
+-PACKAGE_BUGREPORT=
+-
+ ac_prev=
+ for ac_option
+ do
+@@ -323,7 +467,7 @@
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+- | --no-cr | --no-c)
++ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+@@ -502,7 +646,7 @@
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+- *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+ done
+@@ -514,18 +658,19 @@
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+- *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+ 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: should be removed in autoconf 3.0.
++# FIXME: To remove some day.
+ if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+@@ -541,13 +686,23 @@
+
+ test "$silent" = yes && exec 6>/dev/null
+
++
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+- ac_prog=$0
+- ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
+- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
++ ac_confdir=`(dirname "$0") 2>/dev/null ||
++$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=..
+@@ -680,6 +835,7 @@
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-sdltest Do not try to compile and run a test SDL program
++ --enable-qtopia Make a Qtopia Version (Sharp Zaurus) of Frodo
+ --enable-kbd-lang-de Use german keyboard layout
+ --enable-kbd-lang-us Use american keyboard layout
+
+@@ -711,11 +867,13 @@
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+- cd $ac_dir
+- if test "$ac_dir" != .; then
+- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\./,,'`
++ test -d $ac_dir || continue
++ ac_builddir=.
++
++if test "$ac_dir" != .; then
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+ else
+ ac_dir_suffix= ac_top_builddir=
+ fi
+@@ -735,7 +893,14 @@
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ esac
++# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
++# absolute.
++ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
++ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
++ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
++ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
++ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+@@ -758,7 +923,7 @@
+ if $ac_init_version; then
+ cat <<\_ACEOF
+
+-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
++Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+@@ -771,7 +936,7 @@
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by $as_me, which was
+-generated by GNU Autoconf 2.52d. Invocation command line was
++generated by GNU Autoconf 2.53. Invocation command line was
+
+ $ $0 $@
+
+@@ -799,18 +964,28 @@
+ /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+ /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+-PATH = $PATH
+-
+ _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
++
+ } >&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.
+ # Also quote any args containing shell meta-characters.
+@@ -820,15 +995,17 @@
+ do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+- | --no-cr | --no-c) ;;
++ | --no-cr | --no-c | -n ) continue ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
++ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+- ac_sep=" " ;;
+- *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
+- ac_sep=" " ;;
++ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ esac
++ case " $ac_configure_args " in
++ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
++ *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
++ ac_sep=" " ;;
+ esac
+ # Get rid of the leading space.
+ done
+@@ -878,7 +1055,8 @@
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+- rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
++ rm -f core core.* *.core &&
++ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+ for ac_signal in 1 2 13 15; do
+@@ -891,6 +1069,33 @@
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.
+ echo >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 -z "$CONFIG_SITE"; then
+@@ -902,7 +1107,7 @@
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+- { echo "$as_me:905: loading site script $ac_site_file" >&5
++ { 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"
+@@ -913,7 +1118,7 @@
+ # 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:916: loading cache $cache_file" >&5
++ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+ echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+@@ -921,7 +1126,7 @@
+ esac
+ fi
+ else
+- { echo "$as_me:924: creating cache $cache_file" >&5
++ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+ echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+ fi
+@@ -937,42 +1142,42 @@
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+- { echo "$as_me:940: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++ { 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:944: error: \`$ac_var' was not set in the previous run" >&5
++ { 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:950: error: \`$ac_var' has changed since the previous run:" >&5
++ { 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:952: former value: $ac_old_val" >&5
++ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+ echo "$as_me: former value: $ac_old_val" >&2;}
+- { echo "$as_me:954: current value: $ac_new_val" >&5
++ { 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. It doesn't matter if
+- # we pass some twice (in addition to the command line arguments).
++ # 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_configure_args="$ac_configure_args '$ac_arg'"
+- ;;
+- *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
+- ;;
++ 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:973: error: changes in the environment can compromise the build" >&5
++ { 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:975: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
++ { { 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
+@@ -983,26 +1188,25 @@
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+- *c*,-n*) ECHO_N= ECHO_C='
+-' ECHO_T=' ' ;;
+- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+-esac
+-echo "#! $SHELL" >conftest.sh
+-echo "exit 0" >>conftest.sh
+-chmod +x conftest.sh
+-if { (echo "$as_me:995: PATH=\".;.\"; conftest.sh") >&5
+- (PATH=".;."; conftest.sh) 2>&5
+- ac_status=$?
+- echo "$as_me:998: \$? = $ac_status" >&5
+- (exit $ac_status); }; then
+- ac_path_separator=';'
+-else
+- ac_path_separator=:
+-fi
+-PATH_SEPARATOR="$ac_path_separator"
+-rm -f conftest.sh
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
+
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+@@ -1012,7 +1216,7 @@
+ 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:1015: checking for $ac_word" >&5
++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
+@@ -1020,25 +1224,28 @@
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CC="${ac_tool_prefix}gcc"
+-echo "$as_me:1030: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:1038: result: $CC" >&5
++ echo "$as_me:$LINENO: result: $CC" >&5
+ echo "${ECHO_T}$CC" >&6
+ else
+- echo "$as_me:1041: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1047,7 +1254,7 @@
+ 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:1050: checking for $ac_word" >&5
++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
+@@ -1055,25 +1262,28 @@
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CC="gcc"
+-echo "$as_me:1065: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+- echo "$as_me:1073: result: $ac_ct_CC" >&5
++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+ echo "${ECHO_T}$ac_ct_CC" >&6
+ else
+- echo "$as_me:1076: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1086,7 +1296,7 @@
+ 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:1089: checking for $ac_word" >&5
++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
+@@ -1094,25 +1304,28 @@
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CC="${ac_tool_prefix}cc"
+-echo "$as_me:1104: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:1112: result: $CC" >&5
++ echo "$as_me:$LINENO: result: $CC" >&5
+ echo "${ECHO_T}$CC" >&6
+ else
+- echo "$as_me:1115: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1121,7 +1334,7 @@
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+-echo "$as_me:1124: checking for $ac_word" >&5
++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
+@@ -1129,25 +1342,28 @@
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CC="cc"
+-echo "$as_me:1139: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_CC="cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
+ done
+
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+- echo "$as_me:1147: result: $ac_ct_CC" >&5
++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+ echo "${ECHO_T}$ac_ct_CC" >&6
+ else
+- echo "$as_me:1150: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1160,7 +1376,7 @@
+ 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:1163: checking for $ac_word" >&5
++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
+@@ -1169,19 +1385,22 @@
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+ ac_prog_rejected=no
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+- ac_prog_rejected=yes
+- continue
+-fi
+-ac_cv_prog_CC="cc"
+-echo "$as_me:1183: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ if test $ac_prog_rejected = yes; then
+@@ -1193,7 +1412,7 @@
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+- set dummy "$ac_dir/$ac_word" ${1+"$@"}
++ set dummy "$as_dir/$ac_word" ${1+"$@"}
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+@@ -1202,10 +1421,10 @@
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:1205: result: $CC" >&5
++ echo "$as_me:$LINENO: result: $CC" >&5
+ echo "${ECHO_T}$CC" >&6
+ else
+- echo "$as_me:1208: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1216,7 +1435,7 @@
+ 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:1219: checking for $ac_word" >&5
++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
+@@ -1224,25 +1443,28 @@
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+-echo "$as_me:1234: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:1242: result: $CC" >&5
++ echo "$as_me:$LINENO: result: $CC" >&5
+ echo "${ECHO_T}$CC" >&6
+ else
+- echo "$as_me:1245: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1255,7 +1477,7 @@
+ 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:1258: checking for $ac_word" >&5
++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
+@@ -1263,25 +1485,28 @@
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CC="$ac_prog"
+-echo "$as_me:1273: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+- echo "$as_me:1281: result: $ac_ct_CC" >&5
++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+ echo "${ECHO_T}$ac_ct_CC" >&6
+ else
+- echo "$as_me:1284: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1293,32 +1518,33 @@
+
+ fi
+
+-test -z "$CC" && { { echo "$as_me:1296: error: no acceptable cc found in \$PATH" >&5
+-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
++
++test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
++echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Provide some information about the compiler.
+-echo "$as_me:1301:" \
++echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:1304: \"$ac_compiler --version </dev/null >&5\"") >&5
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+- echo "$as_me:1307: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:1309: \"$ac_compiler -v </dev/null >&5\"") >&5
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+- echo "$as_me:1312: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:1314: \"$ac_compiler -V </dev/null >&5\"") >&5
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+- echo "$as_me:1317: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1321 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -1340,18 +1566,22 @@
+ # 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:1343: checking for C compiler default output" >&5
++echo "$as_me:$LINENO: checking for C compiler default output" >&5
+ echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+-if { (eval echo "$as_me:1346: \"$ac_link_default\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+- echo "$as_me:1349: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+ # not robust to junk in `.', hence go to wildcards (a.*) only as a last
+ # resort.
+-for ac_file in `ls a.exe conftest.exe 2>/dev/null;
++
++# Be careful to initialize this variable, since it used to be cached.
++# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
++ac_cv_exeext=
++for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+@@ -1369,34 +1599,34 @@
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-{ { echo "$as_me:1372: error: C compiler cannot create executables" >&5
++{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
+ echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+ fi
+
+ ac_exeext=$ac_cv_exeext
+-echo "$as_me:1378: result: $ac_file" >&5
++echo "$as_me:$LINENO: result: $ac_file" >&5
+ echo "${ECHO_T}$ac_file" >&6
+
+ # Check the compiler produces executables we can run. If not, either
+ # the compiler is broken, or we cross compile.
+-echo "$as_me:1383: checking whether the C compiler works" >&5
++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'
+- { (eval echo "$as_me:1389: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1392: \$? = $ac_status" >&5
++ 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:1399: error: cannot run C compiled programs.
++ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+ If you meant to cross compile, use \`--host'." >&5
+ echo "$as_me: error: cannot run C compiled programs.
+ If you meant to cross compile, use \`--host'." >&2;}
+@@ -1404,24 +1634,24 @@
+ fi
+ fi
+ fi
+-echo "$as_me:1407: result: yes" >&5
++echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+
+ rm -f a.out a.exe conftest$ac_cv_exeext
+ ac_clean_files=$ac_clean_files_save
+ # Check the compiler produces executables we can run. If not, either
+ # the compiler is broken, or we cross compile.
+-echo "$as_me:1414: checking whether we are cross compiling" >&5
++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:1416: result: $cross_compiling" >&5
++echo "$as_me:$LINENO: result: $cross_compiling" >&5
+ echo "${ECHO_T}$cross_compiling" >&6
+
+-echo "$as_me:1419: checking for executable suffix" >&5
+-echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+-if { (eval echo "$as_me:1421: \"$ac_link\"") >&5
++echo "$as_me:$LINENO: checking for suffix of executables" >&5
++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:1424: \$? = $ac_status" >&5
++ 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
+@@ -1437,25 +1667,25 @@
+ esac
+ done
+ else
+- { { echo "$as_me:1440: error: cannot compute EXEEXT: cannot compile and link" >&5
+-echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
++ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
++echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ rm -f conftest$ac_cv_exeext
+-echo "$as_me:1446: result: $ac_cv_exeext" >&5
++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:1452: checking for object suffix" >&5
+-echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
++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
+-#line 1458 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -1473,10 +1703,10 @@
+ }
+ _ACEOF
+ rm -f conftest.o conftest.obj
+-if { (eval echo "$as_me:1476: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1479: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+@@ -1488,24 +1718,24 @@
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-{ { echo "$as_me:1491: error: cannot compute OBJEXT: cannot compile" >&5
+-echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
++{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
++echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+-echo "$as_me:1498: result: $ac_cv_objext" >&5
++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:1502: checking whether we are using the GNU C compiler" >&5
++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
+-#line 1508 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -1526,16 +1756,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1529: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1532: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1535: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1538: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+ else
+@@ -1547,19 +1777,19 @@
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+ fi
+-echo "$as_me:1550: result: $ac_cv_c_compiler_gnu" >&5
++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
+ CFLAGS="-g"
+-echo "$as_me:1556: checking whether $CC accepts -g" >&5
++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
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1562 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -1577,16 +1807,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1580: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1583: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1586: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1589: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+ else
+@@ -1596,7 +1826,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:1599: result: $ac_cv_prog_cc_g" >&5
++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
+@@ -1623,16 +1853,16 @@
+ #endif
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1626: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1629: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1632: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1635: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+@@ -1644,7 +1874,7 @@
+ 'void exit (int);'
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1647 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ $ac_declaration
+@@ -1663,16 +1893,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1666: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1669: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1672: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1675: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+ else
+@@ -1682,7 +1912,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1685 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_declaration
+ #ifdef F77_DUMMY_MAIN
+@@ -1700,16 +1930,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1703: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1706: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1709: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1712: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+ else
+@@ -1746,7 +1976,7 @@
+ 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:1749: checking for $ac_word" >&5
++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
+@@ -1754,25 +1984,28 @@
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+-echo "$as_me:1764: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ fi
+ fi
+ CXX=$ac_cv_prog_CXX
+ if test -n "$CXX"; then
+- echo "$as_me:1772: result: $CXX" >&5
++ echo "$as_me:$LINENO: result: $CXX" >&5
+ echo "${ECHO_T}$CXX" >&6
+ else
+- echo "$as_me:1775: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1785,7 +2018,7 @@
+ 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:1788: checking for $ac_word" >&5
++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
+@@ -1793,25 +2026,28 @@
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+ else
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- $as_executable_p "$ac_dir/$ac_word" || continue
+-ac_cv_prog_ac_ct_CXX="$ac_prog"
+-echo "$as_me:1803: found $ac_dir/$ac_word" >&5
+-break
++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 $as_executable_p "$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
+
+ fi
+ fi
+ ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+ if test -n "$ac_ct_CXX"; then
+- echo "$as_me:1811: result: $ac_ct_CXX" >&5
++ echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+ echo "${ECHO_T}$ac_ct_CXX" >&6
+ else
+- echo "$as_me:1814: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+@@ -1822,33 +2058,34 @@
+ CXX=$ac_ct_CXX
+ fi
+
++
+ # Provide some information about the compiler.
+-echo "$as_me:1826:" \
++echo "$as_me:$LINENO:" \
+ "checking for C++ compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:1829: \"$ac_compiler --version </dev/null >&5\"") >&5
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+- echo "$as_me:1832: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:1834: \"$ac_compiler -v </dev/null >&5\"") >&5
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+- echo "$as_me:1837: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:1839: \"$ac_compiler -V </dev/null >&5\"") >&5
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+- echo "$as_me:1842: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+-echo "$as_me:1845: checking whether we are using the GNU C++ compiler" >&5
++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
+-#line 1851 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -1869,16 +2106,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1872: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1875: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1878: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1881: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+ else
+@@ -1890,19 +2127,19 @@
+ ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+ fi
+-echo "$as_me:1893: result: $ac_cv_cxx_compiler_gnu" >&5
++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
+ CXXFLAGS="-g"
+-echo "$as_me:1899: checking whether $CXX accepts -g" >&5
++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
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1905 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -1920,16 +2157,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1923: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1926: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1929: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1932: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cxx_g=yes
+ else
+@@ -1939,7 +2176,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:1942: result: $ac_cv_prog_cxx_g" >&5
++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
+@@ -1966,7 +2203,7 @@
+ 'void exit (int);'
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 1969 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ $ac_declaration
+@@ -1985,16 +2222,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:1988: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:1991: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:1994: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:1997: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+ else
+@@ -2004,7 +2241,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2007 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_declaration
+ #ifdef F77_DUMMY_MAIN
+@@ -2022,16 +2259,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:2025: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:2028: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:2031: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:2034: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+ else
+@@ -2058,7 +2295,7 @@
+ 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:2061: checking how to run the C preprocessor" >&5
++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
+@@ -2079,18 +2316,18 @@
+ # 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
+-#line 2082 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:2087: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:2093: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2113,17 +2350,17 @@
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2116 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:2120: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:2126: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2160,7 +2397,7 @@
+ else
+ ac_cv_prog_CPP=$CPP
+ fi
+-echo "$as_me:2163: result: $CPP" >&5
++echo "$as_me:$LINENO: result: $CPP" >&5
+ echo "${ECHO_T}$CPP" >&6
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+@@ -2170,18 +2407,18 @@
+ # 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
+-#line 2173 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:2178: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:2184: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2204,17 +2441,17 @@
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2207 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:2211: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:2217: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2242,7 +2479,7 @@
+ if $ac_preproc_ok; then
+ :
+ else
+- { { echo "$as_me:2245: error: C preprocessor \"$CPP\" fails sanity check" >&5
++ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
+ echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+@@ -2253,7 +2490,7 @@
+ 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:2256: checking whether ${MAKE-make} sets \${MAKE}" >&5
++echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
+ echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+ set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+ if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+@@ -2273,15 +2510,16 @@
+ rm -f conftest.make
+ fi
+ if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+- echo "$as_me:2276: result: yes" >&5
++ echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+ else
+- echo "$as_me:2280: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+ fi
+
++
+ if [ x"$GXX" = "xyes" ]; then
+ CFLAGS="-O2 -g -fomit-frame-pointer -Wall -Wno-unused -Wno-format"
+ fi
+@@ -2294,10 +2532,13 @@
+ HPUX_REV=`echo $UNAME_RELEASE | sed -e 's/^.*.0B*//' -e 's/\..*$//'`
+ fi
+
+-echo "$as_me:2297: checking for AIX" >&5
++
++
++
++echo "$as_me:$LINENO: checking for AIX" >&5
+ echo $ECHO_N "checking for AIX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2300 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #ifdef _AIX
+ yes
+@@ -2306,44 +2547,130 @@
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "yes" >/dev/null 2>&1; then
+- echo "$as_me:2309: result: yes" >&5
++ echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\_ACEOF
+ #define _ALL_SOURCE 1
+ _ACEOF
+
+ else
+- echo "$as_me:2316: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+ rm -f conftest*
+
+-echo "$as_me:2321: checking for POSIXized ISC" >&5
+-echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
+-if test -d /etc/conf/kconfig.d &&
+- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+-then
+- echo "$as_me:2326: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+- ISC=yes # If later tests want to check for ISC.
+
+-cat >>confdefs.h <<\_ACEOF
+-#define _POSIX_SOURCE 1
++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
++ac_cv_search_strerror=no
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char strerror ();
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++strerror ();
++ ;
++ return 0;
++}
+ _ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++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); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_strerror="none required"
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++if test "$ac_cv_search_strerror" = no; then
++ for ac_lib in cposix; do
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
+
+- if test "$GCC" = yes; then
+- CC="$CC -posix"
+- else
+- CC="$CC -Xp"
+- fi
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char strerror ();
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++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); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_strerror="-l$ac_lib"
++break
+ else
+- echo "$as_me:2340: result: no" >&5
+-echo "${ECHO_T}no" >&6
+- ISC=
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++ done
++fi
++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
++if test "$ac_cv_search_strerror" != no; then
++ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
++
++fi
++
+
+ HAVE_BEBOX=no
+-echo "$as_me:2346: checking for OpenLibrary in -lamiga" >&5
++echo "$as_me:$LINENO: checking for OpenLibrary in -lamiga" >&5
+ echo $ECHO_N "checking for OpenLibrary in -lamiga... $ECHO_C" >&6
+ if test "${ac_cv_lib_amiga_OpenLibrary+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -2351,7 +2678,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lamiga $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2354 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -2376,16 +2703,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:2379: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:2382: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:2385: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:2388: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_amiga_OpenLibrary=yes
+ else
+@@ -2396,7 +2723,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:2399: result: $ac_cv_lib_amiga_OpenLibrary" >&5
++echo "$as_me:$LINENO: result: $ac_cv_lib_amiga_OpenLibrary" >&5
+ echo "${ECHO_T}$ac_cv_lib_amiga_OpenLibrary" >&6
+ if test $ac_cv_lib_amiga_OpenLibrary = yes; then
+ HAVE_AMIGA_LIB=yes
+@@ -2404,7 +2731,7 @@
+ HAVE_AMIGA_LIB=no
+ fi
+
+-echo "$as_me:2407: checking for vga_setmode in -lvga" >&5
++echo "$as_me:$LINENO: checking for vga_setmode in -lvga" >&5
+ echo $ECHO_N "checking for vga_setmode in -lvga... $ECHO_C" >&6
+ if test "${ac_cv_lib_vga_vga_setmode+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -2412,7 +2739,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lvga $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2415 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -2437,16 +2764,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:2440: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:2443: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:2446: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:2449: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_vga_vga_setmode=yes
+ else
+@@ -2457,7 +2784,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:2460: result: $ac_cv_lib_vga_vga_setmode" >&5
++echo "$as_me:$LINENO: result: $ac_cv_lib_vga_vga_setmode" >&5
+ echo "${ECHO_T}$ac_cv_lib_vga_vga_setmode" >&6
+ if test $ac_cv_lib_vga_vga_setmode = yes; then
+ HAVE_SVGA_LIB=yes
+@@ -2465,6 +2792,7 @@
+ HAVE_SVGA_LIB=no
+ fi
+
++
+ # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
+ if test "${with_sdl_prefix+set}" = set; then
+ withval="$with_sdl_prefix"
+@@ -2503,7 +2831,7 @@
+
+ # 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:2506: checking for $ac_word" >&5
++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
+@@ -2513,16 +2841,18 @@
+ ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+- ac_save_IFS=$IFS; IFS=$ac_path_separator
+-ac_dummy="$PATH"
+-for ac_dir in $ac_dummy; do
+- IFS=$ac_save_IFS
+- test -z "$ac_dir" && ac_dir=.
+- if $as_executable_p "$ac_dir/$ac_word"; then
+- ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
+- echo "$as_me:2523: found $ac_dir/$ac_word" >&5
+- break
+-fi
++ 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 $as_executable_p "$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
+
+ test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
+@@ -2532,15 +2862,15 @@
+ SDL_CONFIG=$ac_cv_path_SDL_CONFIG
+
+ if test -n "$SDL_CONFIG"; then
+- echo "$as_me:2535: result: $SDL_CONFIG" >&5
++ echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5
+ echo "${ECHO_T}$SDL_CONFIG" >&6
+ else
+- echo "$as_me:2538: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ fi
+
+ min_sdl_version=1.2.0
+- echo "$as_me:2543: checking for SDL - version >= $min_sdl_version" >&5
++ echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5
+ echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6
+ no_sdl=""
+ if test "$SDL_CONFIG" = "no" ; then
+@@ -2565,7 +2895,7 @@
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2568 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #include <stdio.h>
+@@ -2624,23 +2954,25 @@
+ }
+ }
+
++
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:2629: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:2632: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:2634: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:2637: \$? = $ac_status" >&5
++ 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
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
+ no_sdl=yes
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+@@ -2650,11 +2982,11 @@
+ fi
+ fi
+ if test "x$no_sdl" = x ; then
+- echo "$as_me:2653: result: yes" >&5
++ echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ HAVE_SDL=yes
+ else
+- echo "$as_me:2657: result: no" >&5
++ 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"
+@@ -2669,7 +3001,7 @@
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2672 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #include <stdio.h>
+@@ -2690,16 +3022,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:2693: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:2696: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:2699: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:2702: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; 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"
+@@ -2728,11 +3060,14 @@
+ HAVE_SDL=no
+ fi
+
++
+ rm -f conf.sdltest
+
+-echo "$as_me:2733: checking for X" >&5
++
++echo "$as_me:$LINENO: checking for X" >&5
+ echo $ECHO_N "checking for X... $ECHO_C" >&6
+
++
+ # Check whether --with-x or --without-x was given.
+ if test "${with_x+set}" = set; then
+ withval="$with_x"
+@@ -2827,17 +3162,17 @@
+ # Guess where to find include files, by looking for Intrinsic.h.
+ # First, try using that file with no special directory specified.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2830 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <X11/Intrinsic.h>
+ _ACEOF
+-if { (eval echo "$as_me:2834: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:2840: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -2870,7 +3205,7 @@
+ ac_save_LIBS=$LIBS
+ LIBS="-lXt $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2873 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <X11/Intrinsic.h>
+ #ifdef F77_DUMMY_MAIN
+@@ -2888,16 +3223,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:2891: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:2894: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:2897: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:2900: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ LIBS=$ac_save_LIBS
+ # We can link X programs with no special library path.
+@@ -2935,7 +3270,7 @@
+ fi # $with_x != no
+
+ if test "$have_x" != yes; then
+- echo "$as_me:2938: result: $have_x" >&5
++ echo "$as_me:$LINENO: result: $have_x" >&5
+ echo "${ECHO_T}$have_x" >&6
+ no_x=yes
+ else
+@@ -2945,7 +3280,7 @@
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+- echo "$as_me:2948: result: libraries $x_libraries, headers $x_includes" >&5
++ echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+ echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+ fi
+
+@@ -2969,11 +3304,11 @@
+ # others require no space. Words are not sufficient . . . .
+ case `(uname -sr) 2>/dev/null` in
+ "SunOS 5"*)
+- echo "$as_me:2972: checking whether -R must be followed by a space" >&5
++ echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+ echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
+ ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 2976 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -2991,16 +3326,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:2994: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:2997: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3000: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3003: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_R_nospace=yes
+ else
+@@ -3010,13 +3345,13 @@
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ if test $ac_R_nospace = yes; then
+- echo "$as_me:3013: result: no" >&5
++ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ X_LIBS="$X_LIBS -R$x_libraries"
+ else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3019 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -3034,16 +3369,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3037: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3040: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3043: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3046: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_R_space=yes
+ else
+@@ -3053,11 +3388,11 @@
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ if test $ac_R_space = yes; then
+- echo "$as_me:3056: result: yes" >&5
++ echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6
+ X_LIBS="$X_LIBS -R $x_libraries"
+ else
+- echo "$as_me:3060: result: neither works" >&5
++ echo "$as_me:$LINENO: result: neither works" >&5
+ echo "${ECHO_T}neither works" >&6
+ fi
+ fi
+@@ -3077,7 +3412,7 @@
+ # the Alpha needs dnet_stub (dnet does not exist).
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3080 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3102,22 +3437,22 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3105: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3108: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3111: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3114: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-echo "$as_me:3120: checking for dnet_ntoa in -ldnet" >&5
++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
+@@ -3125,7 +3460,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldnet $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3128 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3150,16 +3485,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3153: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3156: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3159: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3162: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dnet_dnet_ntoa=yes
+ else
+@@ -3170,14 +3505,14 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3173: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
++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:3180: checking for dnet_ntoa in -ldnet_stub" >&5
++ 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
+@@ -3185,7 +3520,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldnet_stub $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3188 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3210,16 +3545,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3213: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3216: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3219: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3222: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dnet_stub_dnet_ntoa=yes
+ else
+@@ -3230,7 +3565,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3233: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
++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"
+@@ -3249,13 +3584,13 @@
+ # on Irix 5.2, according to T.E. Dickey.
+ # The functions gethostbyname, getservbyname, and inet_addr are
+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+- echo "$as_me:3252: checking for gethostbyname" >&5
++ echo "$as_me:$LINENO: checking for gethostbyname" >&5
+ echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+ if test "${ac_cv_func_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3258 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname (); below. */
+@@ -3292,16 +3627,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3295: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3298: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3301: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3304: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostbyname=yes
+ else
+@@ -3311,11 +3646,11 @@
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:3314: result: $ac_cv_func_gethostbyname" >&5
++echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+ echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+
+ if test $ac_cv_func_gethostbyname = no; then
+- echo "$as_me:3318: checking for gethostbyname in -lnsl" >&5
++ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+ echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+ if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -3323,7 +3658,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lnsl $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3326 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3348,16 +3683,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3351: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3354: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3357: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3360: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+ else
+@@ -3368,14 +3703,14 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3371: result: $ac_cv_lib_nsl_gethostbyname" >&5
++echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+ echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+ if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+ fi
+
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+- echo "$as_me:3378: checking for gethostbyname in -lbsd" >&5
++ 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
+@@ -3383,7 +3718,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lbsd $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3386 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3408,16 +3743,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3411: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3414: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3417: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3420: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bsd_gethostbyname=yes
+ else
+@@ -3428,7 +3763,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3431: result: $ac_cv_lib_bsd_gethostbyname" >&5
++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
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+@@ -3444,13 +3779,13 @@
+ # variants that don't use the nameserver (or something). -lsocket
+ # must be given before -lnsl if both are needed. We assume that
+ # if connect needs -lnsl, so does gethostbyname.
+- echo "$as_me:3447: checking for connect" >&5
++ 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
+-#line 3453 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below. */
+@@ -3487,16 +3822,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3490: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3493: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3496: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3499: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+ else
+@@ -3506,11 +3841,11 @@
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:3509: result: $ac_cv_func_connect" >&5
++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:3513: checking for connect in -lsocket" >&5
++ 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
+@@ -3518,7 +3853,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3521 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3543,16 +3878,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3546: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3549: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3552: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3555: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_connect=yes
+ else
+@@ -3563,7 +3898,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3566: result: $ac_cv_lib_socket_connect" >&5
++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"
+@@ -3572,13 +3907,13 @@
+ fi
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+- echo "$as_me:3575: checking for remove" >&5
++ 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
+-#line 3581 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove (); below. */
+@@ -3615,16 +3950,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3618: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3621: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3624: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3627: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_remove=yes
+ else
+@@ -3634,11 +3969,11 @@
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:3637: result: $ac_cv_func_remove" >&5
++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:3641: checking for remove in -lposix" >&5
++ 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
+@@ -3646,7 +3981,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lposix $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3649 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3671,16 +4006,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3674: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3677: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3680: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3683: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_posix_remove=yes
+ else
+@@ -3691,7 +4026,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3694: result: $ac_cv_lib_posix_remove" >&5
++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"
+@@ -3700,13 +4035,13 @@
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+- echo "$as_me:3703: checking for shmat" >&5
++ 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
+-#line 3709 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat (); below. */
+@@ -3743,16 +4078,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3746: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3749: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3752: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3755: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_shmat=yes
+ else
+@@ -3762,11 +4097,11 @@
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:3765: result: $ac_cv_func_shmat" >&5
++echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+ echo "${ECHO_T}$ac_cv_func_shmat" >&6
+
+ if test $ac_cv_func_shmat = no; then
+- echo "$as_me:3769: checking for shmat in -lipc" >&5
++ 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
+@@ -3774,7 +4109,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lipc $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3777 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3799,16 +4134,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3802: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3805: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3808: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3811: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ipc_shmat=yes
+ else
+@@ -3819,7 +4154,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3822: result: $ac_cv_lib_ipc_shmat" >&5
++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"
+@@ -3837,7 +4172,7 @@
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # John Interrante, Karl Berry
+- echo "$as_me:3840: checking for IceConnectionNumber in -lICE" >&5
++ 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
+@@ -3845,7 +4180,7 @@
+ ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3848 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3870,16 +4205,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:3873: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:3876: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:3879: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3882: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ICE_IceConnectionNumber=yes
+ else
+@@ -3890,7 +4225,7 @@
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:3893: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
++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
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+@@ -3902,16 +4237,22 @@
+
+ ac_config_headers="$ac_config_headers sysconfig.h"
+
++
++
++
++
++
++
+ ac_header_dirent=no
+ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+-echo "$as_me:3908: checking for $ac_hdr that defines DIR" >&5
++echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+ echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3914 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <$ac_hdr>
+@@ -3932,16 +4273,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:3935: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:3938: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:3941: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:3944: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+ else
+@@ -3951,7 +4292,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:3954: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@@ -3964,15 +4305,15 @@
+ done
+ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+ if test $ac_header_dirent = dirent.h; then
+- echo "$as_me:3967: checking for opendir in -ldir" >&5
+-echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
+-if test "${ac_cv_lib_dir_opendir+set}" = set; then
++ echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ldir $LIBS"
++ ac_func_search_save_LIBS=$LIBS
++ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 3975 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -3997,42 +4338,91 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:4000: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:4003: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:4006: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4009: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_lib_dir_opendir=yes
++ ac_cv_search_opendir="none required"
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_cv_lib_dir_opendir=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
++if test "$ac_cv_search_opendir" = no; then
++ for ac_lib in dir; do
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char opendir ();
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++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); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir="-l$ac_lib"
++break
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
+ fi
+-echo "$as_me:4020: result: $ac_cv_lib_dir_opendir" >&5
+-echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
+-if test $ac_cv_lib_dir_opendir = yes; then
+- LIBS="$LIBS -ldir"
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++ done
++fi
++LIBS=$ac_func_search_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6
++if test "$ac_cv_search_opendir" != no; then
++ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
++
+ fi
+
+ else
+- echo "$as_me:4027: checking for opendir in -lx" >&5
+-echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
+-if test "${ac_cv_lib_x_opendir+set}" = set; then
++ echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lx $LIBS"
++ ac_func_search_save_LIBS=$LIBS
++ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4035 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -4057,41 +4447,90 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:4060: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:4063: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:4066: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4069: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_lib_x_opendir=yes
++ ac_cv_search_opendir="none required"
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_cv_lib_x_opendir=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
++if test "$ac_cv_search_opendir" = no; then
++ for ac_lib in x; do
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char opendir ();
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++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); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir="-l$ac_lib"
++break
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++ done
+ fi
+-echo "$as_me:4080: result: $ac_cv_lib_x_opendir" >&5
+-echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
+-if test $ac_cv_lib_x_opendir = yes; then
+- LIBS="$LIBS -lx"
++LIBS=$ac_func_search_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6
++if test "$ac_cv_search_opendir" != no; then
++ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
++
+ fi
+
+ fi
+
+-echo "$as_me:4088: checking for ANSI C header files" >&5
++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
+-#line 4094 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -4099,13 +4538,13 @@
+ #include <float.h>
+
+ _ACEOF
+-if { (eval echo "$as_me:4102: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:4108: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -4127,7 +4566,7 @@
+ 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
+-#line 4130 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <string.h>
+
+@@ -4145,7 +4584,7 @@
+ 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
+-#line 4148 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+
+@@ -4166,7 +4605,7 @@
+ :
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4169 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
+ #if ((' ' & 0x0FF) == 0x020)
+@@ -4192,28 +4631,29 @@
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:4195: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:4198: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:4200: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4203: \$? = $ac_status" >&5
++ 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
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
+ ac_cv_header_stdc=no
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ fi
+-echo "$as_me:4216: result: $ac_cv_header_stdc" >&5
++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
+
+@@ -4225,33 +4665,41 @@
+
+ # 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:4232: checking for $ac_header" >&5
++echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4238 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4245: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4248: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4251: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4254: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+ else
+@@ -4261,7 +4709,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:4264: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@@ -4272,38 +4720,48 @@
+
+ done
+
++
++
++
++
++
++
++
++
++
++
+ for ac_header in unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h ncurses.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+- echo "$as_me:4279: checking for $ac_header" >&5
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:4284: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+ # Is the header compilable?
+-echo "$as_me:4288: checking $ac_header usability" >&5
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4291 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4297: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4300: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4303: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4306: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+ else
+@@ -4312,24 +4770,24 @@
+ ac_header_compiler=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:4315: result: $ac_header_compiler" >&5
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+ # Is the header present?
+-echo "$as_me:4319: checking $ac_header presence" >&5
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4322 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:4326: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:4332: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -4347,32 +4805,32 @@
+ ac_header_preproc=no
+ fi
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:4350: result: $ac_header_preproc" >&5
++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 in
+ yes:no )
+- { echo "$as_me:4356: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++ { 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:4358: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++ { 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;};;
+ no:yes )
+- { echo "$as_me:4361: WARNING: $ac_header: present but cannot be compiled." >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
+- { echo "$as_me:4363: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++ { 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:4365: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++ { 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;};;
+ esac
+-echo "$as_me:4368: checking for $ac_header" >&5
++echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ eval "$as_ac_Header=$ac_header_preproc"
+ fi
+-echo "$as_me:4375: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+ fi
+@@ -4385,38 +4843,46 @@
+
+ done
+
++
++
++
++
++
++
++
++
+ for ac_header in sys/vfs.h sys/mount.h sys/select.h sys/param.h sys/statfs.h sys/statvfs.h sys/stat.h linux/joystick.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+- echo "$as_me:4392: checking for $ac_header" >&5
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:4397: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+ # Is the header compilable?
+-echo "$as_me:4401: checking $ac_header usability" >&5
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4404 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4410: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4413: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4416: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4419: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+ else
+@@ -4425,24 +4891,24 @@
+ ac_header_compiler=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:4428: result: $ac_header_compiler" >&5
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+ # Is the header present?
+-echo "$as_me:4432: checking $ac_header presence" >&5
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4435 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:4439: \"$ac_cpp conftest.$ac_ext\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+- echo "$as_me:4445: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+@@ -4460,32 +4926,32 @@
+ ac_header_preproc=no
+ fi
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:4463: result: $ac_header_preproc" >&5
++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 in
+ yes:no )
+- { echo "$as_me:4469: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++ { 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:4471: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++ { 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;};;
+ no:yes )
+- { echo "$as_me:4474: WARNING: $ac_header: present but cannot be compiled." >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
+- { echo "$as_me:4476: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++ { 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:4478: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++ { 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;};;
+ esac
+-echo "$as_me:4481: checking for $ac_header" >&5
++echo "$as_me:$LINENO: checking for $ac_header" >&5
+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ eval "$as_ac_Header=$ac_header_preproc"
+ fi
+-echo "$as_me:4488: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+ fi
+@@ -4498,13 +4964,14 @@
+
+ done
+
+-echo "$as_me:4501: checking for char" >&5
++
++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
+-#line 4507 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4525,16 +4992,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4528: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4531: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4534: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4537: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_char=yes
+ else
+@@ -4544,19 +5011,23 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:4547: result: $ac_cv_type_char" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
+ echo "${ECHO_T}$ac_cv_type_char" >&6
+
+-echo "$as_me:4550: checking size of char" >&5
++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 "$ac_cv_type_char" = yes; then
++ # The cast to unsigned long 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.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4559 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4568,27 +5039,29 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (char)) >= 0)]
++static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4577: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4580: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4583: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4586: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4591 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4600,38 +5073,77 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4609: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4612: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4615: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4618: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=-1 ac_mid=-1
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
++$ac_includes_default
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
++test_array [0] = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++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); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4634 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4643,38 +5155,51 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4652: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4655: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4658: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4661: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++ac_lo= ac_hi=
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f 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
+-#line 4677 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4686,42 +5211,53 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4695: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4698: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4701: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4704: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`
++ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+-ac_cv_sizeof_char=$ac_lo
++case $ac_lo in
++?*) ac_cv_sizeof_char=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
++echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
++ { (exit 1); exit 1; }; } ;;
++esac
+ else
+ if test "$cross_compiling" = yes; then
+- { { echo "$as_me:4717: error: cannot run test program while cross compiling" >&5
++ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+ echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4722 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
++long longval () { return (long) (sizeof (char)); }
++unsigned long ulongval () { return (long) (sizeof (char)); }
++#include <stdio.h>
++#include <stdlib.h>
+ #ifdef F77_DUMMY_MAIN
+ # ifdef __cplusplus
+ extern "C"
+@@ -4731,31 +5267,50 @@
+ int
+ main ()
+ {
+-FILE *f = fopen ("conftest.val", "w");
+-if (!f)
+- exit (1);
+-fprintf (f, "%d", (sizeof (char)));
+-fclose (f);
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ exit (1);
++ if (((long) (sizeof (char))) < 0)
++ {
++ long i = longval ();
++ if (i != ((long) (sizeof (char))))
++ exit (1);
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long i = ulongval ();
++ if (i != ((long) (sizeof (char))))
++ exit (1);
++ fprintf (f, "%lu\n", i);
++ }
++ exit (ferror (f) || fclose (f) != 0);
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:4744: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:4747: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:4749: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4752: \$? = $ac_status" >&5
++ 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
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
++echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+@@ -4765,19 +5320,20 @@
+ ac_cv_sizeof_char=0
+ fi
+ fi
+-echo "$as_me:4768: result: $ac_cv_sizeof_char" >&5
++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:4774: checking for short" >&5
++
++echo "$as_me:$LINENO: checking for short" >&5
+ echo $ECHO_N "checking for short... $ECHO_C" >&6
+ if test "${ac_cv_type_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4780 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4798,16 +5354,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4801: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4804: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4807: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4810: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_short=yes
+ else
+@@ -4817,19 +5373,23 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:4820: result: $ac_cv_type_short" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
+ echo "${ECHO_T}$ac_cv_type_short" >&6
+
+-echo "$as_me:4823: checking size of short" >&5
++echo "$as_me:$LINENO: checking size of short" >&5
+ echo $ECHO_N "checking size of short... $ECHO_C" >&6
+ if test "${ac_cv_sizeof_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test "$ac_cv_type_short" = yes; then
++ # The cast to unsigned long 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.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4832 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4841,27 +5401,29 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (short)) >= 0)]
++static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4850: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4853: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4856: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4859: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4864 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4873,38 +5435,77 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4882: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4885: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4888: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4891: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=-1 ac_mid=-1
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
++$ac_includes_default
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
++test_array [0] = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++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); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4907 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4916,38 +5517,51 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4925: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4928: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4931: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4934: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++ac_lo= ac_hi=
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f 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
+-#line 4950 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -4959,42 +5573,53 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:4968: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:4971: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:4974: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:4977: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`
++ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+-ac_cv_sizeof_short=$ac_lo
++case $ac_lo in
++?*) ac_cv_sizeof_short=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
++echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
++ { (exit 1); exit 1; }; } ;;
++esac
+ else
+ if test "$cross_compiling" = yes; then
+- { { echo "$as_me:4990: error: cannot run test program while cross compiling" >&5
++ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+ echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 4995 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
++long longval () { return (long) (sizeof (short)); }
++unsigned long ulongval () { return (long) (sizeof (short)); }
++#include <stdio.h>
++#include <stdlib.h>
+ #ifdef F77_DUMMY_MAIN
+ # ifdef __cplusplus
+ extern "C"
+@@ -5004,31 +5629,50 @@
+ int
+ main ()
+ {
+-FILE *f = fopen ("conftest.val", "w");
+-if (!f)
+- exit (1);
+-fprintf (f, "%d", (sizeof (short)));
+-fclose (f);
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ exit (1);
++ if (((long) (sizeof (short))) < 0)
++ {
++ long i = longval ();
++ if (i != ((long) (sizeof (short))))
++ exit (1);
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long i = ulongval ();
++ if (i != ((long) (sizeof (short))))
++ exit (1);
++ fprintf (f, "%lu\n", i);
++ }
++ exit (ferror (f) || fclose (f) != 0);
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:5017: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:5020: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:5022: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5025: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_short=`cat conftest.val`
+ else
+ echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
++echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+@@ -5038,19 +5682,20 @@
+ ac_cv_sizeof_short=0
+ fi
+ fi
+-echo "$as_me:5041: result: $ac_cv_sizeof_short" >&5
++echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_short" >&6
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_SHORT $ac_cv_sizeof_short
+ _ACEOF
+
+-echo "$as_me:5047: checking for int" >&5
++
++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
+-#line 5053 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5071,16 +5716,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5074: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5077: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5080: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5083: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_int=yes
+ else
+@@ -5090,19 +5735,23 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:5093: result: $ac_cv_type_int" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+ echo "${ECHO_T}$ac_cv_type_int" >&6
+
+-echo "$as_me:5096: checking size of int" >&5
++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 "$ac_cv_type_int" = yes; then
++ # The cast to unsigned long 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.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5105 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5114,27 +5763,77 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
++static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5123: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5126: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5129: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5132: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5137 "configure"
++#line $LINENO "configure"
++#include "confdefs.h"
++$ac_includes_default
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
++test_array [0] = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++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); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++cat 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 conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5146,38 +5845,29 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5155: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5158: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5161: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5164: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_hi=$ac_mid; break
+-else
+- echo "$as_me: failed program was:" >&5
+-cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
+-fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
+- done
+-else
+- echo "$as_me: failed program was:" >&5
+-cat conftest.$ac_ext >&5
+-ac_hi=-1 ac_mid=-1
++ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5180 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5189,38 +5879,51 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5198: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5201: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5204: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5207: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++ac_lo= ac_hi=
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f 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
+-#line 5223 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5232,42 +5935,53 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5241: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5244: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5247: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5250: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`
++ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+-ac_cv_sizeof_int=$ac_lo
++case $ac_lo in
++?*) ac_cv_sizeof_int=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
++echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
++ { (exit 1); exit 1; }; } ;;
++esac
+ else
+ if test "$cross_compiling" = yes; then
+- { { echo "$as_me:5263: error: cannot run test program while cross compiling" >&5
++ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+ echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5268 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
++long longval () { return (long) (sizeof (int)); }
++unsigned long ulongval () { return (long) (sizeof (int)); }
++#include <stdio.h>
++#include <stdlib.h>
+ #ifdef F77_DUMMY_MAIN
+ # ifdef __cplusplus
+ extern "C"
+@@ -5277,31 +5991,50 @@
+ int
+ main ()
+ {
+-FILE *f = fopen ("conftest.val", "w");
+-if (!f)
+- exit (1);
+-fprintf (f, "%d", (sizeof (int)));
+-fclose (f);
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ exit (1);
++ if (((long) (sizeof (int))) < 0)
++ {
++ long i = longval ();
++ if (i != ((long) (sizeof (int))))
++ exit (1);
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long i = ulongval ();
++ if (i != ((long) (sizeof (int))))
++ exit (1);
++ fprintf (f, "%lu\n", i);
++ }
++ exit (ferror (f) || fclose (f) != 0);
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:5290: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:5293: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:5295: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5298: \$? = $ac_status" >&5
++ 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
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
++echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+@@ -5311,19 +6044,20 @@
+ ac_cv_sizeof_int=0
+ fi
+ fi
+-echo "$as_me:5314: result: $ac_cv_sizeof_int" >&5
++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:5320: checking for long" >&5
++
++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
+-#line 5326 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5344,16 +6078,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5347: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5350: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5353: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5356: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+ else
+@@ -5363,19 +6097,23 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:5366: result: $ac_cv_type_long" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+ echo "${ECHO_T}$ac_cv_type_long" >&6
+
+-echo "$as_me:5369: checking size of long" >&5
++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 "$ac_cv_type_long" = yes; then
++ # The cast to unsigned long 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.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5378 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5387,27 +6125,29 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
++static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5396: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5399: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5402: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5405: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5410 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5419,38 +6159,77 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5428: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5431: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5434: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5437: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=-1 ac_mid=-1
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
++$ac_includes_default
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
++test_array [0] = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++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); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5453 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5462,38 +6241,51 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5471: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5474: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5477: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5480: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++ac_lo= ac_hi=
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f 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
+-#line 5496 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5505,42 +6297,53 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5514: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5517: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5520: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5523: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`
++ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+-ac_cv_sizeof_long=$ac_lo
++case $ac_lo in
++?*) ac_cv_sizeof_long=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
++echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
++ { (exit 1); exit 1; }; } ;;
++esac
+ else
+ if test "$cross_compiling" = yes; then
+- { { echo "$as_me:5536: error: cannot run test program while cross compiling" >&5
++ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+ echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5541 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
++long longval () { return (long) (sizeof (long)); }
++unsigned long ulongval () { return (long) (sizeof (long)); }
++#include <stdio.h>
++#include <stdlib.h>
+ #ifdef F77_DUMMY_MAIN
+ # ifdef __cplusplus
+ extern "C"
+@@ -5550,31 +6353,50 @@
+ int
+ main ()
+ {
+-FILE *f = fopen ("conftest.val", "w");
+-if (!f)
+- exit (1);
+-fprintf (f, "%d", (sizeof (long)));
+-fclose (f);
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ exit (1);
++ if (((long) (sizeof (long))) < 0)
++ {
++ long i = longval ();
++ if (i != ((long) (sizeof (long))))
++ exit (1);
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long i = ulongval ();
++ if (i != ((long) (sizeof (long))))
++ exit (1);
++ fprintf (f, "%lu\n", i);
++ }
++ exit (ferror (f) || fclose (f) != 0);
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:5563: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:5566: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:5568: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5571: \$? = $ac_status" >&5
++ 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
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
++echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+@@ -5584,19 +6406,20 @@
+ ac_cv_sizeof_long=0
+ fi
+ fi
+-echo "$as_me:5587: result: $ac_cv_sizeof_long" >&5
++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:5593: checking for long long" >&5
++
++echo "$as_me:$LINENO: checking for long long" >&5
+ echo $ECHO_N "checking for long long... $ECHO_C" >&6
+ if test "${ac_cv_type_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5599 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5617,16 +6440,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5620: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5623: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5626: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5629: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long_long=yes
+ else
+@@ -5636,19 +6459,23 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:5639: result: $ac_cv_type_long_long" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+ echo "${ECHO_T}$ac_cv_type_long_long" >&6
+
+-echo "$as_me:5642: checking size of long long" >&5
++echo "$as_me:$LINENO: checking size of long long" >&5
+ echo $ECHO_N "checking size of long long... $ECHO_C" >&6
+ if test "${ac_cv_sizeof_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test "$ac_cv_type_long_long" = yes; then
++ # The cast to unsigned long 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.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5651 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5660,27 +6487,29 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long long)) >= 0)]
++static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5669: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5672: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5675: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5678: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5683 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5692,38 +6521,77 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5701: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5704: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5707: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5710: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=-1 ac_mid=-1
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++#include "confdefs.h"
++$ac_includes_default
++#ifdef F77_DUMMY_MAIN
++# ifdef __cplusplus
++ extern "C"
++# endif
++ int F77_DUMMY_MAIN() { return 1; }
++#endif
++int
++main ()
++{
++static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
++test_array [0] = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++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); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5726 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5735,38 +6603,51 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5744: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5747: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5750: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5753: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
++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 conftest.$ac_objext conftest.$ac_ext
+ done
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++ac_lo= ac_hi=
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f 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
+-#line 5769 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -5778,42 +6659,53 @@
+ int
+ main ()
+ {
+-int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
++static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
++test_array [0] = 0
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5787: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5790: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5793: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5796: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_lo=`expr $ac_mid + 1`
++ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+-ac_cv_sizeof_long_long=$ac_lo
++case $ac_lo in
++?*) ac_cv_sizeof_long_long=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
++echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
++ { (exit 1); exit 1; }; } ;;
++esac
+ else
+ if test "$cross_compiling" = yes; then
+- { { echo "$as_me:5809: error: cannot run test program while cross compiling" >&5
++ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+ echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5814 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
++long longval () { return (long) (sizeof (long long)); }
++unsigned long ulongval () { return (long) (sizeof (long long)); }
++#include <stdio.h>
++#include <stdlib.h>
+ #ifdef F77_DUMMY_MAIN
+ # ifdef __cplusplus
+ extern "C"
+@@ -5823,31 +6715,50 @@
+ int
+ main ()
+ {
+-FILE *f = fopen ("conftest.val", "w");
+-if (!f)
+- exit (1);
+-fprintf (f, "%d", (sizeof (long long)));
+-fclose (f);
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ exit (1);
++ if (((long) (sizeof (long long))) < 0)
++ {
++ long i = longval ();
++ if (i != ((long) (sizeof (long long))))
++ exit (1);
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long i = ulongval ();
++ if (i != ((long) (sizeof (long long))))
++ exit (1);
++ fprintf (f, "%lu\n", i);
++ }
++ exit (ferror (f) || fclose (f) != 0);
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:5836: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:5839: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:5841: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5844: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long_long=`cat conftest.val`
+ else
+ echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
++echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+@@ -5857,13 +6768,15 @@
+ ac_cv_sizeof_long_long=0
+ fi
+ fi
+-echo "$as_me:5860: result: $ac_cv_sizeof_long_long" >&5
++echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+ _ACEOF
+
+-echo "$as_me:5866: checking for $CC option to accept ANSI C" >&5
++
++
++echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+ echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+ if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -5871,7 +6784,7 @@
+ ac_cv_prog_cc_stdc=no
+ ac_save_CC=$CC
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5874 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <stdarg.h>
+ #include <stdio.h>
+@@ -5926,16 +6839,16 @@
+ do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:5929: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:5932: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:5935: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:5938: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+ break
+@@ -5952,21 +6865,21 @@
+
+ case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+- echo "$as_me:5955: result: none needed" >&5
++ echo "$as_me:$LINENO: result: none needed" >&5
+ echo "${ECHO_T}none needed" >&6 ;;
+ *)
+- echo "$as_me:5958: result: $ac_cv_prog_cc_stdc" >&5
++ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+ echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+ esac
+
+-echo "$as_me:5963: checking for an ANSI C-conforming const" >&5
++echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+ echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+ if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 5969 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -6030,16 +6943,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6033: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6036: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6039: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6042: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+ else
+@@ -6049,7 +6962,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6052: result: $ac_cv_c_const" >&5
++echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+ echo "${ECHO_T}$ac_cv_c_const" >&6
+ if test $ac_cv_c_const = no; then
+
+@@ -6059,7 +6972,7 @@
+
+ fi
+
+-echo "$as_me:6062: checking for inline" >&5
++echo "$as_me:$LINENO: checking for inline" >&5
+ echo $ECHO_N "checking for inline... $ECHO_C" >&6
+ if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6067,7 +6980,7 @@
+ ac_cv_c_inline=no
+ for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6070 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #ifndef __cplusplus
+ static $ac_kw int static_foo () {return 0; }
+@@ -6076,16 +6989,16 @@
+
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6079: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6082: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6085: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6088: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_inline=$ac_kw; break
+ else
+@@ -6096,7 +7009,7 @@
+ done
+
+ fi
+-echo "$as_me:6099: result: $ac_cv_c_inline" >&5
++echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+ echo "${ECHO_T}$ac_cv_c_inline" >&6
+ case $ac_cv_c_inline in
+ inline | yes) ;;
+@@ -6111,13 +7024,13 @@
+ ;;
+ esac
+
+-echo "$as_me:6114: checking for mode_t" >&5
++echo "$as_me:$LINENO: checking for mode_t" >&5
+ echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
+ if test "${ac_cv_type_mode_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6120 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -6138,16 +7051,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6141: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6144: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6147: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6150: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_mode_t=yes
+ else
+@@ -6157,7 +7070,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6160: result: $ac_cv_type_mode_t" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
+ echo "${ECHO_T}$ac_cv_type_mode_t" >&6
+ if test $ac_cv_type_mode_t = yes; then
+ :
+@@ -6169,13 +7082,13 @@
+
+ fi
+
+-echo "$as_me:6172: checking for off_t" >&5
++echo "$as_me:$LINENO: checking for off_t" >&5
+ echo $ECHO_N "checking for off_t... $ECHO_C" >&6
+ if test "${ac_cv_type_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6178 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -6196,16 +7109,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6199: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6202: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6205: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6208: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_off_t=yes
+ else
+@@ -6215,7 +7128,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6218: result: $ac_cv_type_off_t" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+ echo "${ECHO_T}$ac_cv_type_off_t" >&6
+ if test $ac_cv_type_off_t = yes; then
+ :
+@@ -6227,13 +7140,13 @@
+
+ fi
+
+-echo "$as_me:6230: checking for pid_t" >&5
++echo "$as_me:$LINENO: checking for pid_t" >&5
+ echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+ if test "${ac_cv_type_pid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6236 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -6254,16 +7167,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6257: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6260: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6263: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6266: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_pid_t=yes
+ else
+@@ -6273,7 +7186,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6276: result: $ac_cv_type_pid_t" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+ echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+ if test $ac_cv_type_pid_t = yes; then
+ :
+@@ -6285,13 +7198,13 @@
+
+ fi
+
+-echo "$as_me:6288: checking for struct stat.st_blocks" >&5
++echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+ echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
+ if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6294 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -6311,16 +7224,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6314: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6317: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6320: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6323: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_blocks=yes
+ else
+@@ -6330,7 +7243,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6333: result: $ac_cv_member_struct_stat_st_blocks" >&5
++echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
+ echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
+ if test $ac_cv_member_struct_stat_st_blocks = yes; then
+
+@@ -6338,6 +7251,7 @@
+ #define HAVE_STRUCT_STAT_ST_BLOCKS 1
+ _ACEOF
+
++
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_ST_BLOCKS 1
+ _ACEOF
+@@ -6346,13 +7260,14 @@
+ LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
+ fi
+
+-echo "$as_me:6349: checking whether time.h and sys/time.h may both be included" >&5
++
++echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+ echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+ if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6355 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/time.h>
+@@ -6374,16 +7289,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6377: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6380: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6383: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6386: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+ else
+@@ -6393,7 +7308,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6396: result: $ac_cv_header_time" >&5
++echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+ echo "${ECHO_T}$ac_cv_header_time" >&6
+ if test $ac_cv_header_time = yes; then
+
+@@ -6403,13 +7318,13 @@
+
+ fi
+
+-echo "$as_me:6406: checking whether struct tm is in sys/time.h or time.h" >&5
++echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+ echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+ if test "${ac_cv_struct_tm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6412 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <time.h>
+@@ -6429,16 +7344,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6432: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6435: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6438: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6441: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_struct_tm=time.h
+ else
+@@ -6448,7 +7363,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6451: result: $ac_cv_struct_tm" >&5
++echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+ echo "${ECHO_T}$ac_cv_struct_tm" >&6
+ if test $ac_cv_struct_tm = sys/time.h; then
+
+@@ -6458,15 +7373,16 @@
+
+ fi
+
++
+ if test $ac_cv_c_compiler_gnu = yes; then
+- echo "$as_me:6462: checking whether $CC needs -traditional" >&5
++ echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+ echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+ if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_pattern="Autoconf.*'x'"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6469 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <sgtty.h>
+ Autoconf TIOCGETP
+@@ -6479,9 +7395,10 @@
+ fi
+ rm -f conftest*
+
++
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6484 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <termio.h>
+ Autoconf TCGETA
+@@ -6494,14 +7411,14 @@
+
+ fi
+ fi
+-echo "$as_me:6497: result: $ac_cv_prog_gcc_traditional" >&5
++echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+ echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+ fi
+
+-echo "$as_me:6504: checking for working memcmp" >&5
++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
+@@ -6510,7 +7427,7 @@
+ ac_cv_func_memcmp_working=no
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6513 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+
+ #ifdef F77_DUMMY_MAIN
+@@ -6552,37 +7469,38 @@
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:6555: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:6558: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:6560: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6563: \$? = $ac_status" >&5
++ 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
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
+ ac_cv_func_memcmp_working=no
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+-echo "$as_me:6575: result: $ac_cv_func_memcmp_working" >&5
++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 && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+
+-echo "$as_me:6579: checking return type of signal handlers" >&5
++echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+ echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+ if test "${ac_cv_type_signal+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6585 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <signal.h>
+@@ -6610,16 +7528,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:6613: \"$ac_compile\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+- echo "$as_me:6616: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:6619: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6622: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_signal=void
+ else
+@@ -6629,14 +7547,15 @@
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:6632: result: $ac_cv_type_signal" >&5
++echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+ echo "${ECHO_T}$ac_cv_type_signal" >&6
+
+ cat >>confdefs.h <<_ACEOF
+ #define RETSIGTYPE $ac_cv_type_signal
+ _ACEOF
+
+-echo "$as_me:6639: checking whether utime accepts a null argument" >&5
++
++echo "$as_me:$LINENO: checking whether utime accepts a null argument" >&5
+ echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" >&6
+ if test "${ac_cv_func_utime_null+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -6647,7 +7566,7 @@
+ ac_cv_func_utime_null=no
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6650 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #ifdef F77_DUMMY_MAIN
+@@ -6670,28 +7589,29 @@
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:6673: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:6676: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:6678: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6681: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_utime_null=yes
+ else
+ echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
++( exit $ac_status )
+ ac_cv_func_utime_null=no
+ fi
+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f core core.* *.core
+ fi
+-echo "$as_me:6694: result: $ac_cv_func_utime_null" >&5
++echo "$as_me:$LINENO: result: $ac_cv_func_utime_null" >&5
+ echo "${ECHO_T}$ac_cv_func_utime_null" >&6
+ if test $ac_cv_func_utime_null = yes; then
+
+@@ -6702,16 +7622,25 @@
+ fi
+ rm -f conftest.data
+
++
++
++
++
++
++
++
++
++
+ for ac_func in gettimeofday sigaction mkdir rmdir select strerror strstr statfs usleep
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:6708: checking for $ac_func" >&5
++echo "$as_me:$LINENO: checking for $ac_func" >&5
+ echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+ if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line 6714 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+@@ -6748,16 +7677,16 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:6751: \"$ac_link\"") >&5
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+- echo "$as_me:6754: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:6757: \"$ac_try\"") >&5
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+- echo "$as_me:6760: \$? = $ac_status" >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+ else
+@@ -6767,7 +7696,7 @@
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:6770: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@@ -6777,6 +7706,14 @@
+ fi
+ done
+
++
++QTOPIA=no
++# Check whether --enable-qtopia or --disable-qtopia was given.
++if test "${enable_qtopia+set}" = set; then
++ enableval="$enable_qtopia"
++ QTOPIA=yes
++fi;
++
+ KBD_LANG=0
+ # Check whether --enable-kbd-lang-de or --disable-kbd-lang-de was given.
+ if test "${enable_kbd_lang_de+set}" = set; then
+@@ -6789,44 +7726,48 @@
+ KBD_LANG=0
+ fi;
+
+-echo "$as_me:6792: checking which target to use" >&5
++echo "$as_me:$LINENO: checking which target to use" >&5
+ echo $ECHO_N "checking which target to use... $ECHO_C" >&6
+ if [ x"$HAVE_BEBOX" = "xyes" ]; then
+- echo "$as_me:6795: result: BeBox" >&5
++ echo "$as_me:$LINENO: result: BeBox" >&5
+ echo "${ECHO_T}BeBox" >&6
+ TARGET=be
+ elif [ x"$HAVE_AMIGA_LIB" = "xyes" ]; then
+- echo "$as_me:6799: result: AmigaOS" >&5
++ echo "$as_me:$LINENO: result: AmigaOS" >&5
+ echo "${ECHO_T}AmigaOS" >&6
+ TARGET=amigaos
+ elif [ x"$no_x" = "xyes" ]; then
+ if [ x"$HAVE_SVGA_LIB" = "xyes" ]; then
+- echo "$as_me:6804: result: SVGAlib" >&5
++ echo "$as_me:$LINENO: result: SVGAlib" >&5
+ echo "${ECHO_T}SVGAlib" >&6
+ TARGET=svgalib
+ CFLAGS="$CFLAGS -D__svgalib__"
+ LIBS="$LIBS -lvga"
+ else
+- echo "$as_me:6810: result: Ummm..." >&5
++ echo "$as_me:$LINENO: result: Ummm..." >&5
+ echo "${ECHO_T}Ummm..." >&6
+- { { echo "$as_me:6812: error: Neither X nor SVGAlib found, don't know what target to use." >&5
++ { { echo "$as_me:$LINENO: error: Neither X nor SVGAlib found, don't know what target to use." >&5
+ echo "$as_me: error: Neither X nor SVGAlib found, don't know what target to use." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ elif [ x"$HAVE_SDL" = "xyes" ]; then
+- echo "$as_me:6817: result: SDL" >&5
++ echo "$as_me:$LINENO: result: SDL" >&5
+ echo "${ECHO_T}SDL" >&6
+ TARGET=sdl
+ CFLAGS="$CFLAGS $SDL_CFLAGS -DHAVE_SDL"
+ LIBS="$LIBS $SDL_LIBS"
++ if [ x"$QTOPIA" = "xyes" ]; then
++ CFLAGS="$CFLAGS -DQTOPIA"
++ fi
+ else
+- echo "$as_me:6823: result: X Window System" >&5
++ echo "$as_me:$LINENO: result: X Window System" >&5
+ echo "${ECHO_T}X Window System" >&6
+ TARGET=x11
+ CFLAGS="$CFLAGS $X_CFLAGS -I$ac_cv_x_include"
+ LIBS="$LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS"
+ fi
+
++
+ HAVEGCC27=n
+ HAVEI386=n
+
+@@ -6889,6 +7830,12 @@
+
+ CC=$CXX
+
++
++
++
++
++
++
+ ac_config_files="$ac_config_files Makefile"
+
+ cat >confcache <<\_ACEOF
+@@ -6967,14 +7914,15 @@
+
+ DEFS=-DHAVE_CONFIG_H
+
++
+ : ${CONFIG_STATUS=./config.status}
+ ac_clean_files_save=$ac_clean_files
+ ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+-{ echo "$as_me:6973: creating $CONFIG_STATUS" >&5
++{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+ echo "$as_me: creating $CONFIG_STATUS" >&6;}
+ cat >$CONFIG_STATUS <<_ACEOF
+ #! $SHELL
+-# Generated automatically by $as_me.
++# 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.
+@@ -6997,8 +7945,167 @@
+ set -o posix
+ fi
+
++# NLS nuisances.
++# Support unset when possible.
++if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
++ { $as_unset LANG || test "${LANG+set}" != set; } ||
++ { LANG=C; export LANG; }
++(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
++ { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
++ { LC_ALL=C; export LC_ALL; }
++(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
++ { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
++ { LC_TIME=C; export LC_TIME; }
++(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
++ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
++ { LC_CTYPE=C; export LC_CTYPE; }
++(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
++ { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
++ { LANGUAGE=C; export LANGUAGE; }
++(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
++ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
++ { LC_COLLATE=C; export LC_COLLATE; }
++(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
++ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
++ { LC_NUMERIC=C; export LC_NUMERIC; }
++(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
++ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
++ { LC_MESSAGES=C; export LC_MESSAGES; }
++
++
+ # Name of the executable.
+-as_me=`echo "$0" |sed 's,.*[\\/],,'`
++as_me=`(basename "$0") 2>/dev/null ||
++$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'`
++
++# PATH needs CR, and LINENO needs CR and PATH.
++# 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" >conftest.sh
++ echo "exit 0" >>conftest.sh
++ chmod +x conftest.sh
++ if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conftest.sh
++fi
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" || {
++ # Find who we are. Look in the path if we contain no path at all
++ # relative or not.
++ 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
++
++ ;;
++ 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_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
++echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++ case $CONFIG_SHELL in
++ '')
++ 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=.
++ for as_base in sh bash ksh sh5; do
++ case $as_dir in
++ /*)
++ if ("$as_dir/$as_base" -c '
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
++ CONFIG_SHELL=$as_dir/$as_base
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
++ fi;;
++ esac
++ done
++done
++;;
++ esac
++
++ # 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 before each line; the second 'sed' does the real
++ # work. The second script uses 'N' to pair each line-number line
++ # with the numbered line, 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
++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
++ sed '=' <$as_myself |
++ sed '
++ N
++ s,$,-,
++ : loop
++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ t loop
++ s,-$,,
++ s,^['$as_cr_digits']*\n,,
++ ' >$as_me.lineno &&
++ chmod +x $as_me.lineno ||
++ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
++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 sensible to this).
++ . ./$as_me.lineno
++ # Exit status is that of the last command.
++ exit
++}
++
++
++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
++ *c*,-n*) ECHO_N= ECHO_C='
++' ECHO_T=' ' ;;
++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++esac
+
+ if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+@@ -7026,22 +8133,12 @@
+
+ as_executable_p="test -f"
+
+-# Support unset when possible.
+-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+- as_unset=unset
+-else
+- as_unset=false
+-fi
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+-# NLS nuisances.
+-$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+-$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+-$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+-$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+-$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+-$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+-$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+-$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+ # IFS
+ # We need space, tab and new line, in precisely that order.
+@@ -7050,7 +8147,7 @@
+ IFS=" $as_nl"
+
+ # CDPATH.
+-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
++$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+ exec 6>&1
+
+@@ -7061,19 +8158,19 @@
+ {
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+-## Running \$as_me. ##
++## Running $as_me. ##
+ _ASBOX
+ } >&5
+ cat >&5 <<_CSEOF
+
+ This file was extended by $as_me, which was
+-generated by GNU Autoconf 2.52d. Invocation command line was
++generated by GNU Autoconf 2.53. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+- $ $@
++ $ $0 $@
+
+ _CSEOF
+ echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+@@ -7126,7 +8223,7 @@
+ cat >>$CONFIG_STATUS <<_ACEOF
+ ac_cs_version="\\
+ config.status
+-configured by $0, generated by GNU Autoconf 2.52d,
++configured by $0, generated by GNU Autoconf 2.53,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+@@ -7169,7 +8266,7 @@
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+- { { echo "$as_me:7172: error: ambiguous option: $1
++ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+ Try \`$0 --help' for more information." >&5
+ echo "$as_me: error: ambiguous option: $1
+ Try \`$0 --help' for more information." >&2;}
+@@ -7188,7 +8285,7 @@
+ ac_need_defaults=false;;
+
+ # This is an error.
+- -*) { { echo "$as_me:7191: error: unrecognized option: $1
++ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+ Try \`$0 --help' for more information." >&5
+ echo "$as_me: error: unrecognized option: $1
+ Try \`$0 --help' for more information." >&2;}
+@@ -7202,6 +8299,10 @@
+
+ _ACEOF
+
++
++
++
++
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ for ac_config_target in $ac_config_targets
+ do
+@@ -7209,7 +8310,7 @@
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "sysconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS sysconfig.h" ;;
+- *) { { echo "$as_me:7212: error: invalid argument: $ac_config_target" >&5
++ *) { { 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
+@@ -7261,6 +8362,12 @@
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+ s,@SHELL@,$SHELL,;t t
++s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
++s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
++s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
++s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
++s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
++s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+ s,@exec_prefix@,$exec_prefix,;t t
+ s,@prefix@,$prefix,;t t
+ s,@program_transform_name@,$program_transform_name,;t t
+@@ -7276,19 +8383,13 @@
+ s,@oldincludedir@,$oldincludedir,;t t
+ s,@infodir@,$infodir,;t t
+ s,@mandir@,$mandir,;t t
+-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+ s,@build_alias@,$build_alias,;t t
+ s,@host_alias@,$host_alias,;t t
+ s,@target_alias@,$target_alias,;t t
++s,@DEFS@,$DEFS,;t t
+ s,@ECHO_C@,$ECHO_C,;t t
+ s,@ECHO_N@,$ECHO_N,;t t
+ s,@ECHO_T@,$ECHO_T,;t t
+-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+-s,@DEFS@,$DEFS,;t t
+ s,@LIBS@,$LIBS,;t t
+ s,@CC@,$CC,;t t
+ s,@CFLAGS@,$CFLAGS,;t t
+@@ -7372,7 +8473,8 @@
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+- ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+@@ -7396,17 +8498,19 @@
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" ||
+ mkdir "$as_incr_dir" ||
+- { { echo "$as_me:7399: error: cannot create \"$ac_dir\"" >&5
++ { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+ echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ done; }
+
+- if test "$ac_dir" != .; then
+- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\./,,'`
++ ac_builddir=.
++
++if test "$ac_dir" != .; then
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+ else
+ ac_dir_suffix= ac_top_builddir=
+ fi
+@@ -7426,17 +8530,30 @@
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ esac
++# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
++# absolute.
++ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
++ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
++ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
++ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
++
++
+
+ if test x"$ac_file" != x-; then
+- { echo "$as_me:7431: creating $ac_file" >&5
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
+ echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # 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 automatically by config.status. */
+- configure_input="Generated automatically from `echo $ac_file_in |
+- sed 's,.*/,,'` by configure."
++ # /* config.h. Generated by config.status. */
++ if test x"$ac_file" = x-; then
++ configure_input=
++ else
++ configure_input="$ac_file. "
++ fi
++ configure_input=$configure_input"Generated from `echo $ac_file_in |
++ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+@@ -7446,7 +8563,7 @@
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:7449: error: cannot find input file: $f" >&5
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+@@ -7459,7 +8576,7 @@
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+- { { echo "$as_me:7462: error: cannot find input file: $f" >&5
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+@@ -7475,7 +8592,13 @@
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+ s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
++s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+ " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+@@ -7519,7 +8642,7 @@
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+- test x"$ac_file" != x- && { echo "$as_me:7522: creating $ac_file" >&5
++ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+ echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+@@ -7530,7 +8653,7 @@
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:7533: error: cannot find input file: $f" >&5
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+@@ -7543,7 +8666,7 @@
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+- { { echo "$as_me:7546: error: cannot find input file: $f" >&5
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+@@ -7573,7 +8696,7 @@
+ s,[\\$`],\\&,g
+ t clear
+ : clear
+-s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+ t end
+ s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+ : end
+@@ -7650,20 +8773,21 @@
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # 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 automatically by config.status. */
++ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+- echo "/* Generated automatically by configure. */" >$tmp/config.h
++ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+- echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
++ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+- { echo "$as_me:7663: $ac_file is unchanged" >&5
++ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+ echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+- ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+@@ -7687,7 +8811,7 @@
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" ||
+ mkdir "$as_incr_dir" ||
+- { { echo "$as_me:7690: error: cannot create \"$ac_dir\"" >&5
++ { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+ echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+@@ -7711,6 +8835,7 @@
+ 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
+@@ -7729,5 +8854,6 @@
+ $ac_cs_success || { (exit 1); exit 1; }
+ fi
+
++
+ echo
+ echo "Configuration done. Now type \"make\"."
+diff -urN Src/configure.in Src/configure.in
+--- Src/configure.in 2002-01-02 17:43:53.000000000 +0100
++++ Src/configure.in 2002-11-21 17:07:04.000000000 +0100
+@@ -63,6 +63,9 @@
+ AC_FUNC_UTIME_NULL
+ AC_CHECK_FUNCS(gettimeofday sigaction mkdir rmdir select strerror strstr statfs usleep)
+
++QTOPIA=no
++AC_ARG_ENABLE(qtopia,[ --enable-qtopia Make a Qtopia Version (Sharp Zaurus) of Frodo],[QTOPIA=yes],[])
++
+ KBD_LANG=0
+ AC_ARG_ENABLE(kbd-lang-de,[ --enable-kbd-lang-de Use german keyboard layout],[KBD_LANG=1],[])
+ AC_ARG_ENABLE(kbd-lang-us,[ --enable-kbd-lang-us Use american keyboard layout],[KBD_LANG=0],[])
+@@ -89,6 +92,9 @@
+ TARGET=sdl
+ CFLAGS="$CFLAGS $SDL_CFLAGS -DHAVE_SDL"
+ LIBS="$LIBS $SDL_LIBS"
++ if [[ x"$QTOPIA" = "xyes" ]]; then
++ CFLAGS="$CFLAGS -DQTOPIA"
++ fi
+ else
+ AC_MSG_RESULT([X Window System])
+ TARGET=x11
+@@ -96,7 +102,7 @@
+ LIBS="$LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS"
+ fi
+
+-dnl Find out some things about the system
++dnl Find out some things about the system
+ dnl - whether we have GCC 2.7 or better.
+ dnl - what CPU we have (to use some assembly hacks on the x86)
+
+@@ -161,7 +167,7 @@
+ fi
+
+ CC=$CXX
+-
++
+ AC_SUBST(TARGET)
+ AC_SUBST(SET_MAKE)
+ AC_SUBST(top_srcdir)
+diff -urN Src/Display.cpp Src/Display.cpp
+--- Src/Display.cpp 2002-01-02 22:19:10.000000000 +0100
++++ Src/Display.cpp 2002-11-21 17:07:04.000000000 +0100
+@@ -12,7 +12,7 @@
+
+
+ // LED states
+-enum {
++enum {
+ LED_OFF, // LED off
+ LED_ON, // LED on (green)
+ LED_ERROR_ON, // LED blinking (red), currently on
+@@ -28,7 +28,7 @@
+ const uint8 palette_red[16] = {
+ 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x80, 0xff, 0x40, 0x80, 0x80, 0x80, 0xc0
+ };
+-
++
+ const uint8 palette_green[16] = {
+ 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x80, 0x40, 0x80, 0x40, 0x80, 0xff, 0x80, 0xc0
+ };
+@@ -73,7 +73,11 @@
+ #elif defined(AMIGA)
+ #include "Display_Amiga.i"
+ #elif defined(HAVE_SDL)
+-#include "Display_SDL.i"
++# ifdef QTOPIA
++# include "Display_QtopiaSDL.i"
++# else
++# include "Display_SDL.i"
++# endif
+ #elif defined(__unix)
+ # ifdef __svgalib__
+ # include "Display_svga.i"
+diff -urN Src/Display_QtopiaSDL.i Src/Display_QtopiaSDL.i
+--- Src/Display_QtopiaSDL.i 1970-01-01 01:00:00.000000000 +0100
++++ Src/Display_QtopiaSDL.i 2003-04-03 19:10:35.000000000 +0200
+@@ -0,0 +1,619 @@
++/*
++ * Display_QtopiaSDL.i - C64 graphics display, emulator window handling,
++ * SDL specific stuff
++ *
++ * Frodo (C) 1994-1997,2002 Christian Bauer
++ * Qtopia changes (against Display_SDL.i) from Bernd Lachner
++ */
++
++#include "C64.h"
++#include "SAM.h"
++#include "Version.h"
++
++#define QWS
++#include <SDL.h>
++
++
++// Display surface
++static SDL_Surface *screen = NULL;
++
++// Mode of Joystick emulation. 0 = none, 1 = Joyport 1, 2 = Joyport 2
++static short joy_emu = 0;
++
++// Keyboard
++static bool tab_pressed = false;
++
++// For LED error blinking
++static C64Display *c64_disp;
++static struct sigaction pulse_sa;
++static itimerval pulse_tv;
++
++// Colors for speedometer/drive LEDs
++enum
++{
++ black = 0,
++ white = 1,
++ fill_gray = 16,
++ shine_gray = 17,
++ shadow_gray = 18,
++ red = 19,
++ green = 20,
++ PALETTE_SIZE = 21
++};
++
++/*
++ C64 keyboard matrix:
++
++ Bit 7 6 5 4 3 2 1 0
++ 0 CUD F5 F3 F1 F7 CLR RET DEL
++ 1 SHL E S Z 4 A W 3
++ 2 X T F C 6 D R 5
++ 3 V U H B 8 G Y 7
++ 4 N O K M 0 J I 9
++ 5 , @ : . - L P +
++ 6 / ^ = SHR HOM ; * 」
++ 7 R/S Q C= SPC 2 CTL <- 1
++*/
++
++#define MATRIX(a,b) (((a) << 3) | (b))
++
++
++/*
++ * Open windo'
++ '゚9087654 12q3w4eruiop+#*/
++
++char *buffer;
++
++int init_graphics(void)
++{
++ // Init SDL
++ fprintf(stderr, "Init SDL\n");
++ if (SDL_Init(SDL_INIT_VIDEO) < 0)
++ {
++ fprintf(stderr, "Couldn't initialize SDL (%s)\n", SDL_GetError());
++ return 0;
++ }
++
++ buffer = new char[DISPLAY_X*DISPLAY_Y];
++ // Open window
++ SDL_WM_SetCaption(VERSION_STRING, "Frodo");
++ screen = SDL_SetVideoMode(320, 240, 8, SDL_DOUBLEBUF);
++ if (screen == NULL)
++ {
++ fprintf(stderr, "SDL Couldn't set video mode to %d x %d\n", DISPLAY_X, DISPLAY_Y+17);
++ }
++ else
++ {
++ fprintf(stderr, "SDL Set video mode to %d x %d\n", DISPLAY_X, DISPLAY_Y+17);
++ }
++ return 1;
++}
++
++
++
++/*
++ * Display constructor
++ */
++
++C64Display::C64Display(C64 *the_c64) : TheC64(the_c64)
++{
++ quit_requested = false;
++ speedometer_string[0] = 0;
++
++ // LEDs off
++ for (int i=0; i<4; i++)
++ led_state[i] = old_led_state[i] = LED_OFF;
++
++ // Start timer for LED error blinking
++ c64_disp = this;
++ pulse_sa.sa_handler = (void (*)(int))pulse_handler;
++ pulse_sa.sa_flags = 0;
++ sigemptyset(&pulse_sa.sa_mask);
++ sigaction(SIGALRM, &pulse_sa, NULL);
++ pulse_tv.it_interval.tv_sec = 0;
++ pulse_tv.it_interval.tv_usec = 400000;
++ pulse_tv.it_value.tv_sec = 0;
++ pulse_tv.it_value.tv_usec = 400000;
++ setitimer(ITIMER_REAL, &pulse_tv, NULL);
++}
++
++
++/*
++ * Display destructor
++ */
++
++C64Display::~C64Display()
++{
++ SDL_Quit();
++ delete[] buffer;
++}
++
++
++/*
++ * Prefs may have changed
++ */
++
++void C64Display::NewPrefs(Prefs *prefs)
++{
++}
++
++
++/*
++ * Redraw bitmap
++ */
++
++void C64Display::Update(void)
++{
++ if (screen == NULL)
++ return;
++ int iOffsetX = (DISPLAY_X - screen->w) / 2;
++ int iOffsetY = (DISPLAY_Y - screen->h) / 2;
++ for (int j=0; j < screen->h - 17; j++)
++ {
++ memcpy(static_cast<char*>(screen->pixels)+screen->w*j, buffer+iOffsetX+DISPLAY_X*(j+iOffsetY), screen->w);
++ }
++ // Draw speedometer/LEDs
++ SDL_Rect r = {0, (screen->h - 17), DISPLAY_X, 15};
++ SDL_FillRect(screen, &r, fill_gray);
++ r.w = DISPLAY_X; r.h = 1;
++ SDL_FillRect(screen, &r, shine_gray);
++ r.y = (screen->h - 17) + 14;
++ SDL_FillRect(screen, &r, shadow_gray);
++ r.w = 16;
++ for (int i=2; i<5; i++)
++ {
++ r.x = DISPLAY_X * i/5 - 24; r.y = (screen->h - 17) + 4;
++ SDL_FillRect(screen, &r, shadow_gray);
++ r.y = (screen->h - 17) + 10;
++ SDL_FillRect(screen, &r, shine_gray);
++ }
++ r.y = (screen->h - 17); r.w = 1; r.h = 15;
++ for (int i=0; i<4; i++)
++ {
++ r.x = DISPLAY_X * i / 5;
++ SDL_FillRect(screen, &r, shine_gray);
++ r.x = DISPLAY_X * (i+1) / 5 - 1;
++ SDL_FillRect(screen, &r, shadow_gray);
++ }
++ r.y = (screen->h - 17) + 4; r.h = 7;
++ for (int i=2; i<5; i++)
++ {
++ r.x = DISPLAY_X * i/5 - 24;
++ SDL_FillRect(screen, &r, shadow_gray);
++ r.x = DISPLAY_X * i/5 - 9;
++ SDL_FillRect(screen, &r, shine_gray);
++ }
++ r.y = (screen->h - 17) + 5; r.w = 14; r.h = 5;
++ for (int i=0; i<3; i++)
++ {
++ r.x = DISPLAY_X * (i+2) / 5 - 23;
++ int c;
++ switch (led_state[i])
++ {
++ case LED_ON:
++ c = green;
++ break;
++ case LED_ERROR_ON:
++ c = red;
++ break;
++ default:
++ c = black;
++ break;
++ }
++ SDL_FillRect(screen, &r, c);
++ }
++
++ draw_string(screen, DISPLAY_X * 1/5 + 8, (screen->h - 17) + 4, "D\x12 8", black, fill_gray);
++ draw_string(screen, DISPLAY_X * 2/5 + 8, (screen->h - 17) + 4, "D\x12 9", black, fill_gray);
++ draw_string(screen, DISPLAY_X * 3/5 + 8, (screen->h - 17) + 4, "D\x12 10", black, fill_gray);
++ if (joy_emu == 1)
++ draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "1", black, fill_gray);
++ else if (joy_emu == 2)
++ draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "2", black, fill_gray);
++ draw_string(screen, 24, (screen->h - 17) + 4, speedometer_string, black, fill_gray);
++
++ // Update display
++ SDL_Flip(screen);
++}
++
++
++/*
++ * Draw string into surface using the C64 ROM font
++ */
++
++void C64Display::draw_string(SDL_Surface *s, int x, int y, const char *str, uint8 front_color, uint8 back_color)
++{
++ uint8 *pb = (uint8 *)s->pixels + s->pitch*y + x;
++ char c;
++ while ((c = *str++) != 0)
++ {
++ uint8 *q = TheC64->Char + c*8 + 0x800;
++ uint8 *p = pb;
++ for (int y=0; y<8; y++)
++ {
++ uint8 v = *q++;
++ p[0] = (v & 0x80) ? front_color : back_color;
++ p[1] = (v & 0x40) ? front_color : back_color;
++ p[2] = (v & 0x20) ? front_color : back_color;
++ p[3] = (v & 0x10) ? front_color : back_color;
++ p[4] = (v & 0x08) ? front_color : back_color;
++ p[5] = (v & 0x04) ? front_color : back_color;
++ p[6] = (v & 0x02) ? front_color : back_color;
++ p[7] = (v & 0x01) ? front_color : back_color;
++ p += s->pitch;
++ }
++ pb += 8;
++ }
++}
++
++
++/*
++ * LED error blink
++ */
++
++void C64Display::pulse_handler(...)
++{
++ for (int i=0; i<4; i++)
++ switch (c64_disp->led_state[i])
++ {
++ case LED_ERROR_ON:
++ c64_disp->led_state[i] = LED_ERROR_OFF;
++ break;
++ case LED_ERROR_OFF:
++ c64_disp->led_state[i] = LED_ERROR_ON;
++ break;
++ }
++}
++
++
++/*
++ * Draw speedometer
++ */
++
++void C64Display::Speedometer(int speed)
++{
++ static int delay = 0;
++
++ if (delay >= 20)
++ {
++ delay = 0;
++ sprintf(speedometer_string, "%d%%", speed);
++ }
++ else
++ delay++;
++}
++
++
++/*
++ * Return pointer to bitmap data
++ */
++
++uint8 *C64Display::BitmapBase(void)
++{
++ //return (uint8 *)screen->pixels;
++ return (uint8 *)buffer;
++}
++
++
++/*
++ * Return number of bytes per row
++ */
++
++int C64Display::BitmapXMod(void)
++{
++ //return screen->pitch;
++ return DISPLAY_X;
++}
++
++
++/*
++ * Poll the keyboard
++ */
++
++static void translate_key(SDLKey key, bool key_up, uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick)
++{
++ int c64_key = -1;
++ if (tab_pressed)
++ {
++ // Function and run/stop key emulation on Zaurus keyboard
++ switch (key)
++ {
++ case SDLK_q: c64_key = MATRIX(0,4); break;
++ case SDLK_w: c64_key = MATRIX(0,4) | 0x80; break;
++ case SDLK_e: c64_key = MATRIX(0,5); break;
++ case SDLK_r: c64_key = MATRIX(0,5) | 0x80; break;
++ case SDLK_t: c64_key = MATRIX(0,6); break;
++ case SDLK_z: c64_key = MATRIX(0,6) | 0x80; break;
++ case SDLK_u: c64_key = MATRIX(0,3); break;
++ case SDLK_i: c64_key = MATRIX(0,3) | 0x80; break;
++ case SDLK_o: c64_key = MATRIX(7,7); break;
++ }
++ }
++ else
++ {
++ switch (key)
++ {
++ case SDLK_a: c64_key = MATRIX(1,2); break;
++ case SDLK_b: c64_key = MATRIX(3,4); break;
++ case SDLK_c: c64_key = MATRIX(2,4); break;
++ case SDLK_d: c64_key = MATRIX(2,2); break;
++ case SDLK_e: c64_key = MATRIX(1,6); break;
++ case SDLK_f: c64_key = MATRIX(2,5); break;
++ case SDLK_g: c64_key = MATRIX(3,2); break;
++ case SDLK_h: c64_key = MATRIX(3,5); break;
++ case SDLK_i: c64_key = MATRIX(4,1); break;
++ case SDLK_j: c64_key = MATRIX(4,2); break;
++ case SDLK_k: c64_key = MATRIX(4,5); break;
++ case SDLK_l: c64_key = MATRIX(5,2); break;
++ case SDLK_m: c64_key = MATRIX(4,4); break;
++ case SDLK_n: c64_key = MATRIX(4,7); break;
++ case SDLK_o: c64_key = MATRIX(4,6); break;
++ case SDLK_p: c64_key = MATRIX(5,1); break;
++ case SDLK_q: c64_key = MATRIX(7,6); break;
++ case SDLK_r: c64_key = MATRIX(2,1); break;
++ case SDLK_s: c64_key = MATRIX(1,5); break;
++ case SDLK_t: c64_key = MATRIX(2,6); break;
++ case SDLK_u: c64_key = MATRIX(3,6); break;
++ case SDLK_v: c64_key = MATRIX(3,7); break;
++ case SDLK_w: c64_key = MATRIX(1,1); break;
++ case SDLK_x: c64_key = MATRIX(2,7); break;
++ case SDLK_y: c64_key = MATRIX(3,1); break;
++ case SDLK_z: c64_key = MATRIX(1,4); break;
++
++ case SDLK_0: c64_key = MATRIX(4,3); break;
++ case SDLK_1: c64_key = MATRIX(7,0); break;
++ case SDLK_2: c64_key = MATRIX(7,3); break;
++ case SDLK_3: c64_key = MATRIX(1,0); break;
++ case SDLK_4: c64_key = MATRIX(1,3); break;
++ case SDLK_5: c64_key = MATRIX(2,0); break;
++ case SDLK_6: c64_key = MATRIX(2,3); break;
++ case SDLK_7: c64_key = MATRIX(3,0); break;
++ case SDLK_8: c64_key = MATRIX(3,3); break;
++ case SDLK_9: c64_key = MATRIX(4,0); break;
++
++ case SDLK_SPACE: c64_key = MATRIX(7,4); break;
++ case SDLK_BACKQUOTE: c64_key = MATRIX(7,1); break;
++ case SDLK_BACKSLASH: c64_key = MATRIX(6,6); break;
++ case SDLK_COMMA: c64_key = MATRIX(5,7); break;
++ case SDLK_PERIOD: c64_key = MATRIX(5,4); break;
++ case SDLK_MINUS: c64_key = MATRIX(5,0); break;
++ case SDLK_EQUALS: c64_key = MATRIX(5,3); break;
++ case SDLK_LEFTBRACKET: c64_key = MATRIX(5,6); break;
++ case SDLK_RIGHTBRACKET: c64_key = MATRIX(6,1); break;
++ case SDLK_SEMICOLON: c64_key = MATRIX(5,5); break;
++ case SDLK_QUOTE: c64_key = MATRIX(6,2); break;
++ case SDLK_SLASH: c64_key = MATRIX(6,7); break;
++
++ case SDLK_ESCAPE: c64_key = MATRIX(7,7); break;
++ case SDLK_RETURN: c64_key = MATRIX(0,1); break;
++ case SDLK_BACKSPACE: case SDLK_DELETE: c64_key = MATRIX(0,0); break;
++ case SDLK_INSERT: c64_key = MATRIX(6,3); break;
++ case SDLK_HOME: c64_key = MATRIX(6,3); break;
++ case SDLK_END: c64_key = MATRIX(6,0); break;
++ case SDLK_PAGEUP: c64_key = MATRIX(6,0); break;
++ case SDLK_PAGEDOWN: c64_key = MATRIX(6,5); break;
++
++ case SDLK_LCTRL: c64_key = MATRIX(7,2); break;
++ case SDLK_RCTRL: c64_key = MATRIX(7,5); break;
++ case SDLK_LSHIFT: c64_key = MATRIX(1,7); break;
++ case SDLK_RSHIFT: c64_key = MATRIX(6,4); break;
++ case SDLK_LALT: case SDLK_LMETA: c64_key = MATRIX(7,5); break;
++ case SDLK_RALT: case SDLK_RMETA: c64_key = MATRIX(7,5); break;
++
++ case SDLK_UP: c64_key = MATRIX(0,7)| 0x80; break;
++ case SDLK_DOWN: c64_key = MATRIX(0,7); break;
++ case SDLK_LEFT: c64_key = MATRIX(0,2) | 0x80; break;
++ case SDLK_RIGHT: c64_key = MATRIX(0,2); break;
++
++ case SDLK_F1: c64_key = MATRIX(0,4); break;
++ case SDLK_F2: c64_key = MATRIX(0,4) | 0x80; break;
++ case SDLK_F3: c64_key = MATRIX(0,5); break;
++ case SDLK_F4: c64_key = MATRIX(0,5) | 0x80; break;
++ case SDLK_F5: c64_key = MATRIX(0,6); break;
++ case SDLK_F6: c64_key = MATRIX(0,6) | 0x80; break;
++ case SDLK_F7: c64_key = MATRIX(0,3); break;
++ case SDLK_F8: c64_key = MATRIX(0,3) | 0x80; break;
++
++ case SDLK_KP0: case SDLK_KP5: c64_key = 0x10 | 0x40; break;
++ case SDLK_KP1: c64_key = 0x06 | 0x40; break;
++ case SDLK_KP2: c64_key = 0x02 | 0x40; break;
++ case SDLK_KP3: c64_key = 0x0a | 0x40; break;
++ case SDLK_KP4: c64_key = 0x04 | 0x40; break;
++ case SDLK_KP6: c64_key = 0x08 | 0x40; break;
++ case SDLK_KP7: c64_key = 0x05 | 0x40; break;
++ case SDLK_KP8: c64_key = 0x01 | 0x40; break;
++ case SDLK_KP9: c64_key = 0x09 | 0x40; break;
++
++ case SDLK_KP_DIVIDE: c64_key = MATRIX(6,7); break;
++ case SDLK_KP_ENTER: c64_key = MATRIX(0,1); break;
++
++ // Support for Zaurus/Qtopia
++ case SDLK_QUOTEDBL: c64_key = MATRIX(7,3) | 0x80; break;
++ case SDLK_ASTERISK: c64_key = MATRIX(6,1); break;
++ case SDLK_DOLLAR: c64_key = MATRIX(1,3) | 0x80; break;
++ case SDLK_COLON: c64_key = MATRIX(5,5); break;
++ case SDLK_AT: c64_key = MATRIX(5,6); break;
++ }
++ }
++ if (c64_key < 0)
++ return;
++
++ // Zaurus/Qtopia joystick emulation
++ if (joy_emu != 0)
++ {
++ switch (key)
++ {
++ case SDLK_SPACE: c64_key = 0x10 | 0x40; break;
++ case SDLK_UP: c64_key = 0x01 | 0x40; break;
++ case SDLK_DOWN: c64_key = 0x02 | 0x40; break;
++ case SDLK_LEFT: c64_key = 0x04 | 0x40; break;
++ case SDLK_RIGHT: c64_key = 0x08 | 0x40; break;
++ }
++ }
++
++ // Handle joystick emulation
++ if (c64_key & 0x40)
++ {
++ c64_key &= 0x1f;
++ if (key_up)
++ *joystick |= c64_key;
++ else
++ *joystick &= ~c64_key;
++ return;
++ }
++
++ // Handle other keys
++ bool shifted = c64_key & 0x80;
++ int c64_byte = (c64_key >> 3) & 7;
++ int c64_bit = c64_key & 7;
++ if (key_up)
++ {
++ if (shifted)
++ {
++ key_matrix[6] |= 0x10;
++ rev_matrix[4] |= 0x40;
++ }
++ key_matrix[c64_byte] |= (1 << c64_bit);
++ rev_matrix[c64_bit] |= (1 << c64_byte);
++ }
++ else
++ {
++ if (shifted)
++ {
++ key_matrix[6] &= 0xef;
++ rev_matrix[4] &= 0xbf;
++ }
++ key_matrix[c64_byte] &= ~(1 << c64_bit);
++ rev_matrix[c64_bit] &= ~(1 << c64_byte);
++ }
++}
++
++void C64Display::PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick)
++{
++ SDL_Event event;
++ while (SDL_PollEvent(&event))
++ {
++ switch (event.type)
++ {
++ // Key pressed
++ case SDL_KEYDOWN:
++// fprintf(stderr, "SDL-Key: %d\n", event.key.keysym.sym);
++ if (tab_pressed && event.key.keysym.sym == SDLK_j)
++ {
++ if (joy_emu < 2)
++ joy_emu++;
++ else
++ joy_emu = 0;
++ }
++ if (tab_pressed && event.key.keysym.sym == SDLK_p)
++ {
++ // NMI (Restore)
++ TheC64->NMI();
++ }
++ else
++ {
++ switch (event.key.keysym.sym)
++ {
++ case SDLK_TAB:
++ tab_pressed = true;
++ break;
++
++ case SDLK_F9: // F9: Invoke SAM
++ SAM(TheC64);
++ break;
++
++ case SDLK_F11: // F10: Quit
++ // Iconify not implemented in Qtopia SDL yet. Quit instead show gui.
++ //SDL_WM_IconifyWindow();
++ quit_requested = true;
++ break;
++
++ case SDLK_F12: // F12: Reset
++ TheC64->Reset();
++ break;
++
++ case SDLK_KP_PLUS: // '+' on keypad: Increase SkipFrames
++ ThePrefs.SkipFrames++;
++ break;
++
++ case SDLK_KP_MINUS: // '-' on keypad: Decrease SkipFrames
++ if (ThePrefs.SkipFrames > 1)
++ ThePrefs.SkipFrames--;
++ break;
++
++ case SDLK_KP_MULTIPLY: // '*' on keypad: Toggle speed limiter
++ ThePrefs.LimitSpeed = !ThePrefs.LimitSpeed;
++ break;
++
++ default:
++ translate_key(event.key.keysym.sym, false, key_matrix, rev_matrix, joystick);
++ break;
++ }
++ }
++ break;
++
++ // Key released
++ case SDL_KEYUP:
++ if (event.key.keysym.sym == SDLK_TAB)
++ tab_pressed = false;
++ else
++ translate_key(event.key.keysym.sym, true, key_matrix, rev_matrix, joystick);
++ break;
++
++ // Quit Frodo
++ case SDL_QUIT:
++ quit_requested = true;
++ break;
++ }
++ }
++}
++
++
++/*
++ * Check if NumLock is down (for switching the joystick keyboard emulation)
++ */
++
++bool C64Display::NumLock(void)
++{
++ if (joy_emu == 2)
++ return true;
++ return false;
++}
++
++
++/*
++ * Allocate C64 colors
++ */
++
++void C64Display::InitColors(uint8 *colors)
++{
++ SDL_Color palette[PALETTE_SIZE];
++ for (int i=0; i<16; i++)
++ {
++ palette[i].r = palette_red[i];
++ palette[i].g = palette_green[i];
++ palette[i].b = palette_blue[i];
++ }
++ palette[fill_gray].r = palette[fill_gray].g = palette[fill_gray].b = 0xd0;
++ palette[shine_gray].r = palette[shine_gray].g = palette[shine_gray].b = 0xf0;
++ palette[shadow_gray].r = palette[shadow_gray].g = palette[shadow_gray].b = 0x80;
++ palette[red].r = 0xf0;
++ palette[red].g = palette[red].b = 0;
++ palette[green].g = 0xf0;
++ palette[green].r = palette[green].b = 0;
++ SDL_SetColors(screen, palette, 0, PALETTE_SIZE);
++
++ for (int i=0; i<256; i++)
++ colors[i] = i & 0x0f;
++}
++
++
++/*
++ * Show a requester (error message)
++ */
++
++long int ShowRequester(char *a,char *b,char *)
++{
++ printf("%s: %s\n", a, b);
++ return 1;
++}
+diff -urN Src/main.cpp Src/main.cpp
+--- Src/main.cpp 2002-01-02 22:19:06.000000000 +0100
++++ Src/main.cpp 2002-11-21 17:07:04.000000000 +0100
+@@ -4,6 +4,8 @@
+ * Frodo (C) 1994-1997,2002 Christian Bauer
+ */
+
++ extern "C" int main(int argc, char *argv[]);
++
+ #include "sysdeps.h"
+
+ #include "main.h"
+@@ -13,6 +15,7 @@
+ #include "SAM.h"
+
+
++
+ // Global variables
+ char AppDirPath[1024]; // Path of application directory
+
+@@ -61,7 +64,7 @@
+ fclose(file);
+ } else {
+ ShowRequester("Can't find 'Kernal ROM'.", "Quit");
+- return false;
++ return false;
+ }
+
+ // Load Char ROM
+@@ -102,7 +105,11 @@
+ #endif
+
+ #ifdef __unix
+-#include "main_x.i"
++# ifdef QTOPIA
++# include "main_Qtopia.i"
++# else
++# include "main_x.i"
++# endif
+ #endif
+
+ #ifdef __mac__
+@@ -120,3 +127,4 @@
+ #ifdef __PSXOS__
+ #include "main_PSX.i"
+ #endif
++
+diff -urN Src/main_Qtopia.i Src/main_Qtopia.i
+--- Src/main_Qtopia.i 1970-01-01 01:00:00.000000000 +0100
++++ Src/main_Qtopia.i 2002-11-21 17:07:04.000000000 +0100
+@@ -0,0 +1,101 @@
++/*
++ * main_Qtopia.i - Main program, X specific stuff
++ *
++ * Frodo (C) 1994-1997,2002 Christian Bauer
++ * Qtopia changes (against main_x.i) from Bernd Lachner
++ */
++
++#include "Version.h"
++
++ extern "C" int main(int argc, char *argv[]);
++extern int init_graphics(void);
++
++
++// Global variables
++char Frodo::prefs_path[256] = "";
++
++
++/*
++ * Create application object and start it
++ */
++
++int main(int argc, char *argv[])
++{
++ Frodo *the_app;
++
++ timeval tv;
++ gettimeofday(&tv, NULL);
++ srand(tv.tv_usec);
++
++ printf("%s by Christian Bauer\n", VERSION_STRING);
++// Disabled because switching eumlator <-> gui with current SDl not possible
++// C64::StartGUI();
++
++ if (!init_graphics())
++ return 0;
++ fflush(stdout);
++
++ the_app = new Frodo();
++ the_app->ArgvReceived(argc, argv);
++ the_app->ReadyToRun();
++ delete the_app;
++
++// C64::StopGUI();
++ return 0;
++}
++
++
++/*
++ * Constructor: Initialize member variables
++ */
++
++Frodo::Frodo()
++{
++ TheC64 = NULL;
++}
++
++
++/*
++ * Process command line arguments
++ */
++
++void Frodo::ArgvReceived(int argc, char **argv)
++{
++ if (argc == 2)
++ strncpy(prefs_path, argv[1], 255);
++}
++
++
++/*
++ * Arguments processed, run emulation
++ */
++
++void Frodo::ReadyToRun(void)
++{
++ getcwd(AppDirPath, 256);
++
++ // Load preferences
++ if (!prefs_path[0]) {
++ char *home = getenv("HOME");
++ if (home != NULL && strlen(home) < 240) {
++ strncpy(prefs_path, home, 200);
++ strcat(prefs_path, "/");
++ }
++ strcat(prefs_path, ".frodorc");
++ }
++ ThePrefs.Load(prefs_path);
++
++ // Create and start C64
++ TheC64 = new C64;
++ if (load_rom_files())
++ TheC64->Run();
++ delete TheC64;
++}
++
++
++Prefs *Frodo::reload_prefs(void)
++{
++ static Prefs newprefs;
++ newprefs.Load(prefs_path);
++ return &newprefs;
++}
+diff -urN Src/setarmenv Src/setarmenv
+--- Src/setarmenv 1970-01-01 01:00:00.000000000 +0100
++++ Src/setarmenv 2002-11-21 17:07:03.000000000 +0100
+@@ -0,0 +1,5 @@
++export CXX=arm-linux-g++
++export CC=arm-linux-gcc
++export LD=arm-linux-ld
++export LDFLAGS="-L/opt/Qtopia/sharp/lib/ -L/opt/Embedix/tools/arm-linux/lib"
++export CPPFLAGS="-DQTOPIA"
diff --git a/recipes-qtopia/frodo/frodo-4.1b/frodo.desktop b/recipes-qtopia/frodo/frodo-4.1b/frodo.desktop
new file mode 100644
index 0000000..4179396
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.1b/frodo.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Comment=C64 emulator Frodo.
+Exec=Frodo
+Icon=Frodo
+Type=Application
+Name=Frodo
diff --git a/recipes-qtopia/frodo/frodo-4.1b/frodorc b/recipes-qtopia/frodo/frodo-4.1b/frodorc
new file mode 100644
index 0000000..41492fd
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.1b/frodorc
@@ -0,0 +1,26 @@
+NormalCycles = 63
+BadLineCycles = 23
+CIACycles = 63
+FloppyCycles = 64
+SkipFrames = 4
+DriveType8 = DIR
+DrivePath8 = /home/root/Documents
+DriveType9 = D64
+DrivePath9 =
+DriveType10 = D64
+DrivePath10 =
+DriveType11 = D64
+DrivePath11 =
+SIDType = NONE
+SpritesOn = TRUE
+SpriteCollisions = TRUE
+Joystick1On = FALSE
+Joystick2On = TRUE
+JoystickSwap = FALSE
+LimitSpeed = FALSE
+FastReset = FALSE
+CIAIRQHack = FALSE
+MapSlash = TRUE
+Emul1541Proc = FALSE
+ShowOptions = TRUE
+SIDFilters = TRUE
diff --git a/recipes-qtopia/frodo/frodo-4.2/Frodo.png b/recipes-qtopia/frodo/frodo-4.2/Frodo.png
new file mode 100644
index 0000000..e346195
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.2/Frodo.png
Binary files differ
diff --git a/recipes-qtopia/frodo/frodo-4.2/configure.patch b/recipes-qtopia/frodo/frodo-4.2/configure.patch
new file mode 100644
index 0000000..1fc26f4
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.2/configure.patch
@@ -0,0 +1,51 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- Src/configure.ac~configure 2004-01-13 20:52:49.000000000 +0100
++++ Src/configure.ac 2004-01-21 01:08:08.000000000 +0100
+@@ -4,7 +4,7 @@
+ AC_CONFIG_SRCDIR(main.cpp)
+ AC_PREREQ(2.52)
+ AC_CONFIG_HEADER(sysconfig.h)
+-
++AM_INIT_AUTOMAKE(Frodo, 4.2, [Christian.Bauer@uni-mainz.de], Frodo)
+ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_CXX
+@@ -24,10 +24,6 @@
+ AC_CHECK_LIB(vga, vga_setmode, HAVE_SVGA_LIB=yes, HAVE_SVGA_LIB=no)
+ AM_PATH_SDL(1.2.0, HAVE_SDL=yes, HAVE_SDL=no)
+ HAVE_GLADE=no
+-PKG_CHECK_MODULES(GLADE, libglade-2.0 libgnomeui-2.0 >= 1.110.0, HAVE_GLADE=yes)
+-if [[ $HAVE_GLADE = yes ]]; then
+- AC_DEFINE(HAVE_GLADE, 1, [Glade support is enabled])
+-fi
+
+ AC_PATH_XTRA
+
+--- Src/Makefile.in~configure 2004-01-13 20:52:48.000000000 +0100
++++ Src/Makefile.in 2004-01-21 01:10:56.000000000 +0100
+@@ -16,10 +16,10 @@
+ DESTDIR =
+
+ CXX = @CXX@
+-CFLAGS = @CFLAGS@ @GLADE_CFLAGS@ -I./ -DKBD_LANG=@KBD_LANG@
++CFLAGS = @CFLAGS@ -I./ -DKBD_LANG=@KBD_LANG@
+ DEFS = @DEFS@ -DDATADIR=\"$(datadir)/frodo/\" -DBINDIR=\"$(bindir)/\"
+ LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@ @GLADE_LIBS@
++LIBS = @LIBS@
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+@@ -54,7 +54,7 @@
+ $(INSTALL_PROGRAM) FrodoSC $(DESTDIR)$(bindir)/FrodoSC
+ $(INSTALL_PROGRAM) Frodo_GUI.tcl $(DESTDIR)$(bindir)/Frodo_GUI.tcl
+ $(INSTALL_DATA) ../Kernal\ ROM $(DESTDIR)$(datadir)/frodo/Kernal\ ROM
+- $(INSTALL_DATA) glade/Frodo.glade $(DESTDIR)$(datadir)/frodo/Frodo.glade
++ #$(INSTALL_DATA) glade/Frodo.glade $(DESTDIR)$(datadir)/frodo/Frodo.glade
+
+ installdirs:
+ $(SHELL) mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/frodo
diff --git a/recipes-qtopia/frodo/frodo-4.2/frodo.desktop b/recipes-qtopia/frodo/frodo-4.2/frodo.desktop
new file mode 100644
index 0000000..4179396
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.2/frodo.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Comment=C64 emulator Frodo.
+Exec=Frodo
+Icon=Frodo
+Type=Application
+Name=Frodo
diff --git a/recipes-qtopia/frodo/frodo-4.2/frodorc b/recipes-qtopia/frodo/frodo-4.2/frodorc
new file mode 100644
index 0000000..41492fd
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo-4.2/frodorc
@@ -0,0 +1,26 @@
+NormalCycles = 63
+BadLineCycles = 23
+CIACycles = 63
+FloppyCycles = 64
+SkipFrames = 4
+DriveType8 = DIR
+DrivePath8 = /home/root/Documents
+DriveType9 = D64
+DrivePath9 =
+DriveType10 = D64
+DrivePath10 =
+DriveType11 = D64
+DrivePath11 =
+SIDType = NONE
+SpritesOn = TRUE
+SpriteCollisions = TRUE
+Joystick1On = FALSE
+Joystick2On = TRUE
+JoystickSwap = FALSE
+LimitSpeed = FALSE
+FastReset = FALSE
+CIAIRQHack = FALSE
+MapSlash = TRUE
+Emul1541Proc = FALSE
+ShowOptions = TRUE
+SIDFilters = TRUE
diff --git a/recipes-qtopia/frodo/frodo_4.1b.bb b/recipes-qtopia/frodo/frodo_4.1b.bb
new file mode 100644
index 0000000..daf2d51
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo_4.1b.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "A C64 emulator based on SDL."
+SECTION = "opie/applications"
+DEPENDS = "libsdl-qpe"
+LICENSE = "GPL"
+PR = "r1"
+
+SRC_URI = "http://frodo.cebix.net/downloads/FrodoV4_1b.Src.tar.gz \
+ file://frodo-qte.diff \
+ file://frodo-joystick-4state.diff \
+ file://frodorc \
+ file://Frodo.png \
+ file://frodo.desktop"
+S = "${WORKDIR}/Frodo-${PV}/Src"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-sdltest --enable-qtopia"
+
+do_configure() {
+ gnu-configize
+ oe_runconf
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/bin \
+ ${D}${palmtopdir}/apps/Games \
+ ${D}${palmtopdir}/pics
+ install -m 0644 ${WORKDIR}/Frodo.png ${D}${palmtopdir}/pics/Frodo.png
+ install -m 0644 ${WORKDIR}/frodo.desktop ${D}${palmtopdir}/apps/Games/frodo.desktop
+ # start script and executable
+ install -d ${D}${palmtopdir}/bin/${PN}
+ install -m 0755 Frodo ${D}${palmtopdir}/bin/${PN}/Frodo
+ cat <<STARTER_EOF > ${D}${palmtopdir}/bin/${PN}/frodostart
+#!/bin/sh
+cd ${palmtopdir}/bin/${PN}
+./Frodo
+STARTER_EOF
+ chmod 0755 ${D}${palmtopdir}/bin/${PN}/frodostart
+ ln -sf ${PN}/frodostart ${D}${palmtopdir}/bin/Frodo
+ # conffiles
+ install -d ${D}${sysconfdir}
+ install -m 644 ${WORKDIR}/frodorc ${D}${sysconfdir}/frodorc
+}
+
+FILES_${PN} = "${palmtopdir} ${sysconfdir}"
+
+#FIXME: Add postinst which copies /etc/frodorc into $HOME/.frodorc
+
+SRC_URI[md5sum] = "095b9f21c03204cc13f7f249e8866cd9"
+SRC_URI[sha256sum] = "ffae146dc20458698acf5ccc384dc32317cea1df0c95b44b5d47cca8b26bc986"
diff --git a/recipes-qtopia/frodo/frodo_4.2.bb b/recipes-qtopia/frodo/frodo_4.2.bb
new file mode 100644
index 0000000..4bc3b39
--- /dev/null
+++ b/recipes-qtopia/frodo/frodo_4.2.bb
@@ -0,0 +1,44 @@
+DESCRIPTION = "C64 Emulator based on SDL"
+SECTION = "opie/applications"
+PRIORITY = "optional"
+DEPENDS = "libsdl-qpe"
+LICENSE = "GPL"
+SRCDATE = "20040801"
+PR = "r2"
+
+SRC_URI = "cvs://anoncvs:anoncvs@cvs.cebix.net/home/cvs/cebix;module=Frodo4 \
+ file://configure.patch \
+ file://frodorc \
+ file://Frodo.png \
+ file://frodo.desktop"
+
+S = "${WORKDIR}/Frodo4/Src"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-sdltest --enable-qtopia"
+
+do_install() {
+ install -d ${D}${palmtopdir}/bin \
+ ${D}${palmtopdir}/apps/Games \
+ ${D}${palmtopdir}/pics
+ install -m 0644 ${WORKDIR}/Frodo.png ${D}${palmtopdir}/pics/Frodo.png
+ install -m 0644 ${WORKDIR}/frodo.desktop ${D}${palmtopdir}/apps/Games/frodo.desktop
+ # start script and executable
+ install -d ${D}${palmtopdir}/bin/${PN}
+ install -m 0755 Frodo ${D}${palmtopdir}/bin/${PN}/Frodo
+ cat <<STARTER_EOF > ${D}${palmtopdir}/bin/${PN}/frodostart
+#!/bin/sh
+cd ${palmtopdir}/bin/${PN}
+./Frodo
+STARTER_EOF
+ chmod 0755 ${D}${palmtopdir}/bin/${PN}/frodostart
+ ln -sf ${PN}/frodostart ${D}${palmtopdir}/bin/Frodo
+ # conffiles
+ install -d ${D}${sysconfdir}
+ install -m 644 ${WORKDIR}/frodorc ${D}${sysconfdir}/frodorc
+}
+
+FILES_${PN} = "${palmtopdir} ${sysconfdir}"
+
+#FIXME: Add postinst which copies /etc/frodorc into $HOME/.frodorc
diff --git a/recipes-qtopia/froot/froot_0.7.1.bb b/recipes-qtopia/froot/froot_0.7.1.bb
new file mode 100644
index 0000000..f71d516
--- /dev/null
+++ b/recipes-qtopia/froot/froot_0.7.1.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "Froot is a game like frozen bubbles"
+SECTION = "opie/games"
+APPNAME = "froot"
+APPTYPE = "binary"
+APPDESKTOP = "${S}"
+LICENSE = "GPL"
+PR = "r2"
+
+SRC_URI = "http://www.cs.unc.edu/~scheuerm/froot/froot-${PV}.tar.gz"
+S = "${WORKDIR}/froot-${PV}"
+
+inherit opie
+
+do_install() {
+ install -d ${D}${palmtopdir}/help/html
+ install -d ${D}${palmtopdir}/pics/froot
+ install -m 0644 Froot.png ${D}${palmtopdir}/pics/
+ install -m 0644 help/html/froot.html ${D}${palmtopdir}/help/html/
+ install -m 0644 pics/froot/*.png ${D}${palmtopdir}/pics/froot/
+}
+
+SRC_URI[md5sum] = "ac310580a6a54b692b977e11a0e80242"
+SRC_URI[sha256sum] = "210a55754c4ff0fa4143c22334a22bb2768f0c8ded2f6efa60144ea1b0abed6a"
diff --git a/recipes-qtopia/gnuplot/files/gnuplot.desktop b/recipes-qtopia/gnuplot/files/gnuplot.desktop
new file mode 100644
index 0000000..f67df9e
--- /dev/null
+++ b/recipes-qtopia/gnuplot/files/gnuplot.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Gnuplot
+Comment=Plot data and function graphs
+Exec=x-terminal-emulator -e gnuplot
+Terminal=false
+Type=Application
+Icon=gnuplot
+Categories=Science;
diff --git a/recipes-qtopia/gnuplot/files/gnuplot.png b/recipes-qtopia/gnuplot/files/gnuplot.png
new file mode 100644
index 0000000..054cd9e
--- /dev/null
+++ b/recipes-qtopia/gnuplot/files/gnuplot.png
Binary files differ
diff --git a/recipes-qtopia/gnuplot/files/qtopia.trm b/recipes-qtopia/gnuplot/files/qtopia.trm
new file mode 100644
index 0000000..b52f9bb
--- /dev/null
+++ b/recipes-qtopia/gnuplot/files/qtopia.trm
@@ -0,0 +1,483 @@
+/*
+ * $Id: dumb.trm,v 1.16 2004/04/13 17:24:16 broeker Exp $
+ *
+ */
+
+/* GNUPLOT - qtopia.trm */
+
+/*[
+ * Copyright 1991 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
+ *
+ * Permission to use, copy, and distribute this software and its
+ * documentation for any purpose with or 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.
+ *
+ * Permission to modify the software is granted, but not the right to
+ * distribute the complete modified source code. Modifications are to
+ * be distributed as patches to the released version. Permission to
+ * distribute binaries produced by compiling modified sources is granted,
+ * provided you
+ * 1. distribute the corresponding source modifications from the
+ * released version in the form of a patch file along with the binaries,
+ * 2. add special version identification to distinguish your version
+ * in addition to the base release version number,
+ * 3. provide your name and address as the primary contact for the
+ * support of your modified version, and
+ * 4. retain our contact information in regard to use of the base
+ * software.
+ * Permission to distribute the released version of the source code along
+ * with corresponding source modifications in the form of a patch file is
+ * granted with same provisions 2 through 4 for binary distributions.
+ *
+ * This software is provided "as is" without express or implied warranty
+ * to the extent permitted by applicable law.
+]*/
+
+/*
+ * This file is included by ../term.c.
+ *
+ * This terminal driver supports:
+ * qtopia terminals
+ *
+ * AUTHORS
+ * Michael Neuroth, 2004-05-16
+ * INTERNET: michael.neuroth@freenet.de
+ *
+ * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
+ *
+ */
+#include "driver.h"
+
+#define NO_QTOPIA_ENHANCED_SUPPORT
+
+#ifdef TERM_REGISTER
+register_term(qtopia_driver)
+#endif
+
+#ifdef TERM_PROTO
+TERM_PUBLIC void QTOPIA_options __PROTO((void));
+TERM_PUBLIC void QTOPIA_init __PROTO((void));
+TERM_PUBLIC void QTOPIA_graphics __PROTO((void));
+TERM_PUBLIC void QTOPIA_text __PROTO((void));
+TERM_PUBLIC void QTOPIA_reset __PROTO((void));
+TERM_PUBLIC void QTOPIA_linetype __PROTO((int linetype));
+TERM_PUBLIC void QTOPIA_move __PROTO((unsigned int x, unsigned int y));
+TERM_PUBLIC void QTOPIA_point __PROTO((unsigned int x, unsigned int y,
+ int point));
+TERM_PUBLIC void QTOPIA_vector __PROTO((unsigned int x, unsigned int y));
+TERM_PUBLIC void QTOPIA_put_text __PROTO((unsigned int x, unsigned int y,
+ const char *str));
+TERM_PUBLIC void QTOPIA_arrow __PROTO((unsigned int sx, unsigned int sy,
+ unsigned int ex, unsigned int ey,
+ int head));
+
+#define ENHqtopia_put_text NULL
+
+
+#define QTOPIA_XMAX 4096
+#define QTOPIA_YMAX 4096
+
+#ifdef ZAURUS
+#define QTOPIA_VCHAR (QTOPIA_YMAX/25)
+#define QTOPIA_HCHAR (QTOPIA_XMAX/40)
+#define QTOPIA_VTIC (QTOPIA_YMAX/50)
+#define QTOPIA_HTIC (QTOPIA_XMAX/40)
+#else
+#define QTOPIA_VCHAR (QTOPIA_YMAX/25)
+#define QTOPIA_HCHAR (QTOPIA_XMAX/50)
+#define QTOPIA_VTIC (QTOPIA_YMAX/100)
+#define QTOPIA_HTIC (QTOPIA_XMAX/150)
+#endif
+
+#endif /* TERM_PROTO */
+
+#ifdef TERM_BODY
+
+/*#include <winsock2.h>*/
+/* needs: ws2_32.lib */
+#ifndef _MSC_VER
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#define QTOPIA_MAX_BUFFER 512
+#define QTOPIA_MAX_DELAY_COUNT 20 /* * 100 ms = 2 s */
+
+#ifdef _MSC_VER
+#define QTOPIA_BAD_SOCKET INVALID_SOCKET /* -1 */
+#define QTOPIA_BAD_CONNECT SOCKET_ERROR
+#else
+#define QTOPIA_BAD_SOCKET -1
+#define QTOPIA_BAD_CONNECT -1
+#endif
+#define QTOPIA_PORT_NO 5050
+
+static int qtopia_client_socket = QTOPIA_BAD_SOCKET;
+static unsigned short qtopia_port_no = QTOPIA_PORT_NO;
+static char qtopia_host_name[QTOPIA_MAX_BUFFER+1] = { "localhost" };
+
+static int OpenClient __PROTO(( int test));
+static void CloseClient();
+
+static void MySleep( delay )
+int delay;
+{
+#ifdef _MSC_VER
+ Sleep( delay );
+#else
+ usleep( delay );
+#endif
+}
+
+static void InitSockets()
+{
+#ifdef _MSC_VER
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int err;
+
+ wVersionRequested = MAKEWORD( 2, 2 );
+
+ err = WSAStartup( wVersionRequested, &wsaData );
+#endif
+}
+
+static void ExitSockets()
+{
+#ifdef _MSC_VER
+ WSACleanup();
+#endif
+}
+
+static int CheckForQtplot( count )
+int count;
+{
+ /* test (via sockets) if qtplot is allready running */
+ if( !OpenClient( 1 ) )
+ {
+ /* give qtplot a litle bit time to start... */
+ if( count < QTOPIA_MAX_DELAY_COUNT )
+ {
+ if( count == 0 )
+ {
+#ifdef _MSC_VER
+ system( "start qtplot" );
+#else
+ system( "qtplot&" );
+#endif
+ }
+
+ MySleep(100);
+
+ return CheckForQtplot( count+1 );
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ else
+ {
+ CloseClient();
+
+ return 1;
+ }
+}
+
+static int OpenClient( test )
+int test;
+{
+ int len;
+ struct sockaddr_in address;
+ int result;
+
+ /* Create a socket for the client. */
+
+ qtopia_client_socket = socket(AF_INET, SOCK_STREAM, 0);
+
+ if( qtopia_client_socket != QTOPIA_BAD_SOCKET )
+ {
+ /* Name the socket, as agreed with the server. */
+
+ address.sin_family = AF_INET;
+ address.sin_addr.s_addr = inet_addr(/*qtopia_host_name*/"127.0.0.1"); /* localhost */
+ address.sin_port = htons(qtopia_port_no);
+ len = sizeof(address);
+
+ /* Now connect our socket to the server's socket. */
+
+ result = connect(qtopia_client_socket, (struct sockaddr *)&address, len);
+
+ if( result == QTOPIA_BAD_SOCKET )
+ {
+ /* mark this socket as bad */
+
+ close( qtopia_client_socket );
+
+ qtopia_client_socket = QTOPIA_BAD_SOCKET;
+
+ if( !test )
+ {
+ fprintf( gpoutfile, "error connecting to server !\n" );
+ }
+ return 0; /* something went wrong */
+ }
+ }
+ else
+ {
+ if( !test )
+ {
+ fprintf( gpoutfile, "error creating socket !\n" );
+ }
+ return 0; /* something went wrong */
+ }
+
+ return 1; /* everything ist ok ! */
+}
+
+static void CloseClient()
+{
+ close( qtopia_client_socket );
+}
+
+static int IsClientOk()
+{
+ return qtopia_client_socket != QTOPIA_BAD_SOCKET;
+}
+
+static void SendDataToSocket( sLine )
+const char * sLine;
+{
+ if( IsClientOk() )
+ {
+ int send_count;
+
+ send_count = send( qtopia_client_socket, sLine, strlen( sLine ), 0 );
+
+ if( send_count <= 0 )
+ {
+ fprintf( gpoutfile, "error writing to socket str=%s!\n", sLine );
+ }
+ /*
+ else
+ {
+ fprintf( gpoutfile, "wrote %d bytes\n", send_count );
+ }
+ */
+ }
+ else
+ {
+ /* for testing... */
+ /*fprintf( gpoutfile, sLine );*/
+ }
+}
+
+/* ************************************************** */
+
+enum QTOPIA_id { QTOPIA_PORT, QTOPIA_HOST, QTOPIA_OTHER };
+
+static struct gen_table QTOPIA_opts[] =
+{
+ { "po$rt", QTOPIA_PORT },
+ { "ho$st", QTOPIA_HOST },
+ { NULL, QTOPIA_OTHER }
+};
+
+TERM_PUBLIC void
+QTOPIA_options()
+{
+ /* this is not for the qtopia terminal ! */
+ /*SendDataToSocket( "qtd options\n" );*/
+
+ int x, y;
+ struct value a;
+
+ while (!END_OF_COMMAND)
+ {
+ switch(lookup_table(&QTOPIA_opts[0],c_token))
+ {
+ case QTOPIA_PORT:
+ c_token++;
+ if (END_OF_COMMAND)
+ int_error(c_token, "expecting port number");
+ qtopia_port_no = (int) real(const_express(&a));
+ break;
+ case QTOPIA_HOST:
+ c_token++;
+ if (END_OF_COMMAND)
+ int_error(c_token, "expecting host name");
+ if (isstring(c_token))
+ quote_str( qtopia_host_name, c_token, sizeof(qtopia_host_name) );
+ else
+ copy_str( qtopia_host_name, c_token, sizeof(qtopia_host_name) );
+ c_token++;
+ break;
+ case QTOPIA_OTHER:
+ default:
+ break;
+ }
+ }
+
+ sprintf(term_options, "host=%s port=%d",qtopia_host_name,qtopia_port_no);
+}
+
+
+TERM_PUBLIC void
+QTOPIA_init()
+{
+ /* initialize lib (if necassary) */
+ InitSockets();
+ CheckForQtplot( 0 );
+ OpenClient( 0 );
+
+ SendDataToSocket( "qtd init\n" );
+}
+
+
+TERM_PUBLIC void
+QTOPIA_graphics()
+{
+ SendDataToSocket( "qtd graphics\n" );
+}
+
+TERM_PUBLIC void
+QTOPIA_text()
+{
+ SendDataToSocket( "qtd text\n" );
+}
+
+
+TERM_PUBLIC void
+QTOPIA_reset()
+{
+ SendDataToSocket( "qtd reset\n" );
+
+ /* give the qtplot a litle bit time to shutdown */
+ MySleep(100);
+
+ CloseClient();
+ ExitSockets();
+}
+
+
+TERM_PUBLIC void
+QTOPIA_linetype(linetype)
+int linetype;
+{
+ char sBuffer[QTOPIA_MAX_BUFFER];
+
+ sprintf( sBuffer, "qtd linetype type=%d\n",linetype );
+
+ SendDataToSocket( sBuffer );
+}
+
+
+TERM_PUBLIC void
+QTOPIA_move(x, y)
+unsigned int x, y;
+{
+ char sBuffer[QTOPIA_MAX_BUFFER];
+
+ sprintf( sBuffer, "qtd move x=%d y=%d\n",x,y );
+
+ SendDataToSocket( sBuffer );
+}
+
+
+TERM_PUBLIC void
+QTOPIA_point(x, y, point)
+unsigned int x, y;
+int point;
+{
+ char sBuffer[QTOPIA_MAX_BUFFER];
+
+ sprintf( sBuffer, "qtd point x=%d y=%d point=%d\n",x,y,point );
+
+ SendDataToSocket( sBuffer );
+}
+
+
+TERM_PUBLIC void
+QTOPIA_vector(_x, _y)
+unsigned int _x, _y;
+{
+ char sBuffer[QTOPIA_MAX_BUFFER];
+
+ sprintf( sBuffer, "qtd vector x=%d y=%d\n",_x,_y );
+
+ SendDataToSocket( sBuffer );
+}
+
+
+TERM_PUBLIC void
+QTOPIA_put_text(x, y, str)
+unsigned int x, y;
+const char *str;
+{
+ char sBuffer[QTOPIA_MAX_BUFFER];
+
+ sprintf( sBuffer, "qtd put_text x=%d y=%d str=%s\n",x,y,str );
+
+ SendDataToSocket( sBuffer );
+}
+
+/* not suported yet ! */
+TERM_PUBLIC void
+QTOPIA_arrow(sx, sy, ex, ey, head)
+ unsigned int sx, sy, ex, ey;
+ int head; /* ignored */
+{
+ char sBuffer[QTOPIA_MAX_BUFFER];
+
+ sprintf( sBuffer, "qtd arrow sx=%d sy=%d ex=%d ey=%d head=%d\n",sx,sy,ex,ey,head );
+
+ SendDataToSocket( sBuffer );
+}
+
+
+#endif /* TERM_BODY */
+
+#ifdef TERM_TABLE
+TERM_TABLE_START(qtopia_driver)
+ "qtopia", "qtopia or Qt",
+ QTOPIA_XMAX, QTOPIA_YMAX, QTOPIA_VCHAR, QTOPIA_HCHAR,
+ QTOPIA_VTIC, QTOPIA_HTIC, QTOPIA_options, QTOPIA_init, QTOPIA_reset,
+ QTOPIA_text, null_scale, QTOPIA_graphics, QTOPIA_move, QTOPIA_vector,
+ QTOPIA_linetype, QTOPIA_put_text, null_text_angle,
+ null_justify_text, QTOPIA_point, /*QTOPIA_arrow*/0, set_font_null,
+ 0, /* pointsize */
+ TERM_CAN_MULTIPLOT,
+ NULL, NULL, NULL, NULL
+#ifdef USE_MOUSE
+ , NULL, NULL, NULL, NULL, NULL
+#endif
+#ifdef PM3D
+ , NULL, NULL, NULL, NULL
+#endif
+TERM_TABLE_END(qtopia_driver)
+
+#undef LAST_TERM
+#define LAST_TERM qtopia_driver
+
+#endif /* TERM_TABLE */
+
+#ifdef TERM_HELP
+START_HELP(qtopia)
+"1 qtopia",
+"?commands set terminal qtopia",
+"?set terminal qtopia",
+"?set term qtopia",
+"?terminal qtopia",
+"?term qtopia",
+"?qtopia",
+" The `qtopia` terminal driver has no additional options.",
+"",
+" Syntax:",
+" set terminal qtopia",
+""
+END_HELP(qtopia)
+#endif /* TERM_HELP */
diff --git a/recipes-qtopia/gnuplot/files/subdirs.patch b/recipes-qtopia/gnuplot/files/subdirs.patch
new file mode 100644
index 0000000..8c7d1f0
--- /dev/null
+++ b/recipes-qtopia/gnuplot/files/subdirs.patch
@@ -0,0 +1,11 @@
+--- /tmp/Makefile.am 2007-08-23 13:10:15.560659023 +0200
++++ gnuplot-4.2.0/Makefile.am 2007-08-23 13:10:34.961764629 +0200
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in -*-Makefile-*-
+ AUTOMAKE_OPTIONS = foreign 1.2h
+
+-SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share
++SUBDIRS = config m4 term src $(LISPDIR) man share
+
+ EXTRA_DIST = BUGS CodeStyle Copyright FAQ GNUmakefile INSTALL INSTALL.gnu \
+ Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST README.exp \
diff --git a/recipes-qtopia/gnuplot/files/term.patch b/recipes-qtopia/gnuplot/files/term.patch
new file mode 100644
index 0000000..41aa8e7
--- /dev/null
+++ b/recipes-qtopia/gnuplot/files/term.patch
@@ -0,0 +1,20 @@
+--- gnuplot-4.2.0/src/term.h.old 2007-11-16 01:21:09.000000000 -0600
++++ gnuplot-4.2.0/src/term.h 2007-11-16 01:22:45.000000000 -0600
+@@ -70,6 +70,7 @@
+ */
+ #ifdef SHORT_TERMLIST
+ # include "dumb.trm" /* dumb terminal */
++# include "qtopia.trm" /* QTopia terminal */
+
+ # ifdef GP_ENH_EST
+ # include "estimate.trm" /* used for enhanced text processing */
+@@ -436,6 +437,9 @@
+ /* TeXDraw drawing package for LaTeX */
+ #include "texdraw.trm"
+
++/* Qtopia */
++#include "qtopia.trm"
++
+ /* METAFONT */
+ #include "metafont.trm"
+
diff --git a/recipes-qtopia/gnuplot/gnuplot-4.0.0/debian-separate-x11-package.patch b/recipes-qtopia/gnuplot/gnuplot-4.0.0/debian-separate-x11-package.patch
new file mode 100644
index 0000000..7afa0ee
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot-4.0.0/debian-separate-x11-package.patch
@@ -0,0 +1,59 @@
+--- gnuplot-4.0.0.orig/src/term.c
++++ gnuplot-4.0.0/src/term.c
+@@ -1278,6 +1278,33 @@
+ return (t);
+ }
+
++#ifdef X11
++int
++x11driver_found()
++{
++ char *binname = "/gnuplot_x11";
++ char *fullname;
++ struct stat buf;
++
++ fullname = (char*)malloc(sizeof(X11_DRIVER_DIR) + sizeof(binname) + 1);
++ strcat(fullname, X11_DRIVER_DIR);
++ strcat(fullname, binname);
++
++ /* exists? */
++ if (stat(fullname, &buf)) {
++ free(fullname);
++ return 0;
++ }
++
++ free(fullname);
++ /* executable? */
++ if (buf.st_mode && S_IXOTH)
++ return 1;
++
++ return 0;
++}
++#endif
++
+ /*
+ * Routine to detect what terminal is being used (or do anything else
+ * that would be nice). One anticipated (or allowed for) side effect
+@@ -1356,12 +1383,18 @@
+ env_term = getenv("TERM"); /* try $TERM */
+ if (term_name == (char *) NULL
+ && env_term != (char *) NULL && strcmp(env_term, "xterm") == 0)
+- term_name = "x11";
++ term_name = "x11";
+ display = getenv("DISPLAY");
+ if (term_name == (char *) NULL && display != (char *) NULL)
+- term_name = "x11";
++ term_name = "x11";
+ if (X11_Display)
+- term_name = "x11";
++ term_name = "x11";
++ /* if x11 was selected check for driver */
++ if (term_name && (strcmp(term_name, "x11") == 0) && !x11driver_found() && isatty(fileno(stdin))) {
++ printf("*** X11 output driver not found, switching to dumb terminal!\n");
++ printf("*** If you want to use the X11 output, please install the ""gnuplot-x11"" package\n");
++ term_name = "dumb";
++ };
+ #endif /* x11 */
+
+ #ifdef AMIGA
+
diff --git a/recipes-qtopia/gnuplot/gnuplot-4.0.0/matrix.patch b/recipes-qtopia/gnuplot/gnuplot-4.0.0/matrix.patch
new file mode 100644
index 0000000..10f56d9
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot-4.0.0/matrix.patch
@@ -0,0 +1,17 @@
+--- gnuplot-4.0.0/src/matrix.c.old 2004-04-13 18:23:58.000000000 +0100
++++ gnuplot-4.0.0/src/matrix.c 2005-03-01 12:38:07.068232748 +0000
+@@ -290,9 +290,12 @@
+ *d = 1.0;
+ for (ar = a, lim = &(a[n]); ar < lim; ar++) {
+ large = 0.0;
+- for (ac = *ar, limc = &(ac[n]); ac < limc;)
+- if ((temp = fabs(*ac++)) > large)
++ for (ac = *ar, limc = &(ac[n]); ac < limc;){
++ temp = *ac++;
++ temp = fabs(temp);
++ if (temp > large)
+ large = temp;
++ }
+ if (large == 0.0)
+ int_error(NO_CARET, "Singular matrix in LU-DECOMP");
+ *dp++ = 1 / large;
diff --git a/recipes-qtopia/gnuplot/gnuplot-4.0.0/subdirs.patch b/recipes-qtopia/gnuplot/gnuplot-4.0.0/subdirs.patch
new file mode 100644
index 0000000..69c7753
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot-4.0.0/subdirs.patch
@@ -0,0 +1,16 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- gnuplot-4.0.0/Makefile.am~nodocs
++++ gnuplot-4.0.0/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in -*-Makefile-*-
+ AUTOMAKE_OPTIONS = foreign 1.2h
+
+-SUBDIRS = config m4 term src docs lisp man demo tutorial
++SUBDIRS = config m4 term src man tutorial
+
+ EXTRA_DIST = BUGS CodeStyle Copyright FAQ GNUmakefile INSTALL INSTALL.gnu \
+ Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST README.exp \
diff --git a/recipes-qtopia/gnuplot/gnuplot-4.0.0/term.patch b/recipes-qtopia/gnuplot/gnuplot-4.0.0/term.patch
new file mode 100644
index 0000000..2979b5e
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot-4.0.0/term.patch
@@ -0,0 +1,20 @@
+--- gnuplot-4.0.0/src/term.h.old 2005-03-01 15:17:46.424111687 +0000
++++ gnuplot-4.0.0/src/term.h 2005-03-01 15:18:50.961405665 +0000
+@@ -54,6 +54,7 @@
+ */
+ #ifdef SHORT_TERMLIST
+ # include "dumb.trm" /* dumb terminal */
++# include "qtopia.trm" /* QTopia terminal */
+ # include "post.trm" /* postscript */
+ # include "table.trm" /* built-in, but used for the documentation */
+ # if !(defined(OS2) || defined(MSDOS) || defined(_Windows) || defined(ATARI) || defined(MTOS) || defined(AMIGA))
+@@ -432,6 +433,9 @@
+ /* TeXDraw drawing package for LaTeX */
+ #include "texdraw.trm"
+
++/* Qtopia */
++#include "qtopia.trm"
++
+ /* METAFONT */
+ #include "metafont.trm"
+
diff --git a/recipes-qtopia/gnuplot/gnuplot.inc b/recipes-qtopia/gnuplot/gnuplot.inc
new file mode 100644
index 0000000..30affad
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot.inc
@@ -0,0 +1,35 @@
+DESCRIPTION = "Gnuplot is a portable command-line driven interactive datafile \
+(text or binary) and function plotting utility."
+HOMEPAGE = "http://www.gnuplot.info/"
+SECTION = "console/scientific"
+LICENSE = "BSD-4"
+PRIORITY = "optional"
+DEPENDS = "virtual/libx11 gd cairo readline"
+
+inherit autotools
+
+acpaths = ""
+
+EXTRA_OECONF = "--with-readline=${STAGING_LIBDIR}/.. \
+ --without-lisp-files \
+ --without-tutorial \
+ --disable-wxwidgets"
+
+do_compile_prepend() {
+ install -m 0644 ${WORKDIR}/qtplot-0.2/qtopia.trm ${S}/term/
+}
+
+do_install_append() {
+ install -d ${D}${datadir}/applications/
+ install -m 0644 ${WORKDIR}/gnuplot.desktop ${D}${datadir}/applications/
+ install -d ${D}${datadir}/pixmaps/
+ install -m 0644 ${WORKDIR}/gnuplot.png ${D}${datadir}/pixmaps/
+}
+
+PACKAGES =+ "${PN}-x11-dbg ${PN}-x11"
+DESCRIPTION_${PN}-x11 = "X11 display terminal for Gnuplot."
+SECTION_${PN}-x11 = "x11/scientific"
+FILES_${PN}-x11 = "${libexecdir} ${datadir}/applications ${datadir}/pixmaps ${libdir}/X11 "
+
+FILES_${PN} += "${datadir}/texmf"
+FILES_${PN}-x11-dbg += "${libexecdir}/gnuplot/*/.debug"
diff --git a/recipes-qtopia/gnuplot/gnuplot_4.0.0.bb b/recipes-qtopia/gnuplot/gnuplot_4.0.0.bb
new file mode 100644
index 0000000..c0b79c7
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot_4.0.0.bb
@@ -0,0 +1,17 @@
+require gnuplot.inc
+
+PR = "r5"
+
+SRC_URI = "ftp://ftp.gnuplot.info/pub/gnuplot/gnuplot-${PV}.tar.gz;name=archive \
+ file://subdirs.patch \
+ file://debian-separate-x11-package.patch \
+ http://www.mneuroth.de/privat/zaurus/qtplot-0.2.tar.gz;name=qtplot \
+ file://matrix.patch \
+ file://term.patch \
+ file://gnuplot.desktop \
+ file://gnuplot.png"
+
+SRC_URI[archive.md5sum] = "66258443d9f93cc4f46b147dac33e63a"
+SRC_URI[archive.sha256sum] = "a77ad7cb08b2551dacbaa0bb02e561fddb6b9f4a0f3d45eb1c38be219955ea48"
+SRC_URI[qtplot.md5sum] = "0a481885a496092c77eb4017540b5cf6"
+SRC_URI[qtplot.sha256sum] = "6df317183ff62cc82f3dcf88207a267cd6478cb5147f55d7530c94f1ad5f4132"
diff --git a/recipes-qtopia/gnuplot/gnuplot_4.2.4.bb b/recipes-qtopia/gnuplot/gnuplot_4.2.4.bb
new file mode 100644
index 0000000..3621727
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot_4.2.4.bb
@@ -0,0 +1,15 @@
+require gnuplot.inc
+
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gnuplot/${PN}-${PV}.tar.gz;name=archive \
+ http://www.mneuroth.de/privat/zaurus/qtplot-0.2.tar.gz;name=qtplot \
+ file://subdirs.patch \
+ file://term.patch \
+ file://gnuplot.desktop \
+ file://gnuplot.png"
+
+SRC_URI[archive.md5sum] = "3cde3b9232a2d81715bbaf75e1c87ecc"
+SRC_URI[archive.sha256sum] = "2a20701410a21307c404a9d10ad9fdf699bb92fa0a919797213208d80b080913"
+SRC_URI[qtplot.md5sum] = "0a481885a496092c77eb4017540b5cf6"
+SRC_URI[qtplot.sha256sum] = "6df317183ff62cc82f3dcf88207a267cd6478cb5147f55d7530c94f1ad5f4132"
diff --git a/recipes-qtopia/gnuplot/gnuplot_4.4.0.bb b/recipes-qtopia/gnuplot/gnuplot_4.4.0.bb
new file mode 100644
index 0000000..bc4727d
--- /dev/null
+++ b/recipes-qtopia/gnuplot/gnuplot_4.4.0.bb
@@ -0,0 +1,14 @@
+require gnuplot.inc
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gnuplot/${PN}-${PV}.tar.gz;name=archive \
+ http://www.mneuroth.de/privat/zaurus/qtplot-0.2.tar.gz \
+ file://subdirs.patch \
+ file://gnuplot.desktop \
+ file://gnuplot.png"
+
+SRC_URI[archive.md5sum] = "e708665bd512153ad5c35252fe499059"
+SRC_URI[archive.sha256sum] = "00de2c54a05920a5d2dc68f668990b0b84a96105d92a932d91600dd53f156b2a"
+
+
+SRC_URI[md5sum] = "0a481885a496092c77eb4017540b5cf6"
+SRC_URI[sha256sum] = "6df317183ff62cc82f3dcf88207a267cd6478cb5147f55d7530c94f1ad5f4132"
diff --git a/recipes-qtopia/gnuplot/gnuplot_cvs.bb b/recipes-qtopia/gnuplot/gnuplot_cvs.bb
new file mode 100644
index 0000000..212164c
--- /dev/null
+++ b/