revision 1015:ad448bedc48a
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 1015:ad448bedc48a |
parent | 1014:f5914b2fd0db |
child | 1016:6c63a6d20011 |
author | nkeynes |
date | Tue Jun 02 23:16:26 2009 +0000 (14 years ago) |
"MythTV" patch from Wahrhaft, thanks!:
* Add support for LIRC input devices
* Add hotkey input support
* Add command-line option for immediate fullscreen
* Add support for LIRC input devices
* Add hotkey input support
* Add command-line option for immediate fullscreen
![]() | Makefile.in | view | annotate | diff | log | |
![]() | configure | view | annotate | diff | log | |
![]() | configure.in | view | annotate | diff | log | |
![]() | src/Makefile.am | view | annotate | diff | log | |
![]() | src/Makefile.in | view | annotate | diff | log | |
![]() | src/cocoaui/cocoaui.m | view | annotate | diff | log | |
![]() | src/config.c | view | annotate | diff | log | |
![]() | src/drivers/input_lirc.c | view | annotate | diff | log | |
![]() | src/drivers/input_lirc.h | view | annotate | diff | log | |
![]() | src/gtkui/gtk_hotkeys.c | view | annotate | diff | log | |
![]() | src/gtkui/gtk_win.c | view | annotate | diff | log | |
![]() | src/gtkui/gtkcb.c | view | annotate | diff | log | |
![]() | src/gtkui/gtkui.c | view | annotate | diff | log | |
![]() | src/gtkui/gtkui.h | view | annotate | diff | log | |
![]() | src/gui.h | view | annotate | diff | log | |
![]() | src/hotkeys.c | view | annotate | diff | log | |
![]() | src/hotkeys.h | view | annotate | diff | log | |
![]() | src/main.c | view | annotate | diff | log |
1.1 --- a/Makefile.in Sun May 24 08:30:35 2009 +00001.2 +++ b/Makefile.in Tue Jun 02 23:16:26 2009 +00001.3 @@ -154,6 +154,8 @@1.4 GUI_COCOA_TRUE = @GUI_COCOA_TRUE@1.5 GUI_GTK_FALSE = @GUI_GTK_FALSE@1.6 GUI_GTK_TRUE = @GUI_GTK_TRUE@1.7 +INPUT_LIRC_FALSE = @INPUT_LIRC_FALSE@1.8 +INPUT_LIRC_TRUE = @INPUT_LIRC_TRUE@1.9 INSTALL_DATA = @INSTALL_DATA@1.10 INSTALL_PROGRAM = @INSTALL_PROGRAM@1.11 INSTALL_SCRIPT = @INSTALL_SCRIPT@
2.1 --- a/configure Sun May 24 08:30:35 2009 +00002.2 +++ b/configure Tue Jun 02 23:16:26 2009 +00002.3 @@ -1,6 +1,6 @@2.4 #! /bin/sh2.5 # Guess values for system-dependent variables and create Makefiles.2.6 -# Generated by GNU Autoconf 2.62.2.7 +# Generated by GNU Autoconf 2.63.2.8 #2.9 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,2.10 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.2.11 @@ -635,179 +635,181 @@2.12 # include <unistd.h>2.13 #endif"2.15 -ac_subst_vars='SHELL2.16 +ac_subst_vars='LTLIBOBJS2.17 +LIBOBJS2.18 +MKINSTALLDIRS2.19 +POSUB2.20 +POFILES2.21 +PO_IN_DATADIR_FALSE2.22 +PO_IN_DATADIR_TRUE2.23 +INTLLIBS2.24 +INSTOBJEXT2.25 +GMOFILES2.26 +DATADIRNAME2.27 +CATOBJEXT2.28 +CATALOGS2.29 +XGETTEXT2.30 +GMSGFMT2.31 +MSGFMT_OPTS2.32 +MSGFMT2.33 +USE_NLS2.34 +GETTEXT_PACKAGE2.35 +BUILD_ARMTEST_FALSE2.36 +BUILD_ARMTEST_TRUE2.37 +BUILD_SYSTEST_FALSE2.38 +BUILD_SYSTEST_TRUE2.39 +ARMOBJCOPY2.40 +ARMLD2.41 +ARMCC2.42 +SHOBJCOPY2.43 +SHLD2.44 +SHCC2.45 +INPUT_LIRC_FALSE2.46 +INPUT_LIRC_TRUE2.47 +JOY_LINUX_FALSE2.48 +JOY_LINUX_TRUE2.49 +CDROM_NONE_FALSE2.50 +CDROM_NONE_TRUE2.51 +CDROM_OSX_FALSE2.52 +CDROM_OSX_TRUE2.53 +CDROM_LINUX_FALSE2.54 +CDROM_LINUX_TRUE2.55 +AUDIO_ALSA_FALSE2.56 +AUDIO_ALSA_TRUE2.57 +ALSA_LIBS2.58 +ALSA_CFLAGS2.59 +AUDIO_ESOUND_FALSE2.60 +AUDIO_ESOUND_TRUE2.61 +ESOUND_LIBS2.62 +ESOUND_CFLAGS2.63 +AUDIO_PULSE_FALSE2.64 +AUDIO_PULSE_TRUE2.65 +PULSE_LIBS2.66 +PULSE_CFLAGS2.67 +AUDIO_SDL_FALSE2.68 +AUDIO_SDL_TRUE2.69 +SDL_LIBS2.70 +SDL_CFLAGS2.71 +AUDIO_OSX_FALSE2.72 +AUDIO_OSX_TRUE2.73 +BUILD_SH4X86_FALSE2.74 +BUILD_SH4X86_TRUE2.75 +VIDEO_NSGL_FALSE2.76 +VIDEO_NSGL_TRUE2.77 +VIDEO_GLX_FALSE2.78 +VIDEO_GLX_TRUE2.79 +VIDEO_OSMESA_FALSE2.80 +VIDEO_OSMESA_TRUE2.81 +GUI_GTK_FALSE2.82 +GUI_GTK_TRUE2.83 +GTK_LIBS2.84 +GTK_CFLAGS2.85 +GLIB_LIBS2.86 +GLIB_CFLAGS2.87 +LIBPNG_LIBS2.88 +LIBPNG_CFLAGS2.89 +PKG_CONFIG2.90 +GUI_COCOA_FALSE2.91 +GUI_COCOA_TRUE2.92 +POD2HTML2.93 +POD2MAN2.94 +am__fastdepOBJC_FALSE2.95 +am__fastdepOBJC_TRUE2.96 +OBJCDEPMODE2.97 +host_os2.98 +host_vendor2.99 +host_cpu2.100 +host2.101 +build_os2.102 +build_vendor2.103 +build_cpu2.104 +build2.105 +EGREP2.106 +GREP2.107 +CPP2.108 +CCASFLAGS2.109 +CCAS2.110 +SED2.111 +ac_ct_OBJC2.112 +OBJCFLAGS2.113 +OBJC2.114 +am__fastdepCC_FALSE2.115 +am__fastdepCC_TRUE2.116 +CCDEPMODE2.117 +AMDEPBACKSLASH2.118 +AMDEP_FALSE2.119 +AMDEP_TRUE2.120 +am__quote2.121 +am__include2.122 +DEPDIR2.123 +OBJEXT2.124 +EXEEXT2.125 +ac_ct_CC2.126 +CPPFLAGS2.127 +LDFLAGS2.128 +CFLAGS2.129 +CC2.130 +MAINT2.131 +MAINTAINER_MODE_FALSE2.132 +MAINTAINER_MODE_TRUE2.133 +am__untar2.134 +am__tar2.135 +AMTAR2.136 +am__leading_dot2.137 +SET_MAKE2.138 +AWK2.139 +mkdir_p2.140 +INSTALL_STRIP_PROGRAM2.141 +STRIP2.142 +install_sh2.143 +MAKEINFO2.144 +AUTOHEADER2.145 +AUTOMAKE2.146 +AUTOCONF2.147 +ACLOCAL2.148 +VERSION2.149 +PACKAGE2.150 +CYGPATH_W2.151 +INSTALL_DATA2.152 +INSTALL_SCRIPT2.153 +INSTALL_PROGRAM2.154 +target_alias2.155 +host_alias2.156 +build_alias2.157 +LIBS2.158 +ECHO_T2.159 +ECHO_N2.160 +ECHO_C2.161 +DEFS2.162 +mandir2.163 +localedir2.164 +libdir2.165 +psdir2.166 +pdfdir2.167 +dvidir2.168 +htmldir2.169 +infodir2.170 +docdir2.171 +oldincludedir2.172 +includedir2.173 +localstatedir2.174 +sharedstatedir2.175 +sysconfdir2.176 +datadir2.177 +datarootdir2.178 +libexecdir2.179 +sbindir2.180 +bindir2.181 +program_transform_name2.182 +prefix2.183 +exec_prefix2.184 +PACKAGE_BUGREPORT2.185 +PACKAGE_STRING2.186 +PACKAGE_VERSION2.187 +PACKAGE_TARNAME2.188 +PACKAGE_NAME2.189 PATH_SEPARATOR2.190 -PACKAGE_NAME2.191 -PACKAGE_TARNAME2.192 -PACKAGE_VERSION2.193 -PACKAGE_STRING2.194 -PACKAGE_BUGREPORT2.195 -exec_prefix2.196 -prefix2.197 -program_transform_name2.198 -bindir2.199 -sbindir2.200 -libexecdir2.201 -datarootdir2.202 -datadir2.203 -sysconfdir2.204 -sharedstatedir2.205 -localstatedir2.206 -includedir2.207 -oldincludedir2.208 -docdir2.209 -infodir2.210 -htmldir2.211 -dvidir2.212 -pdfdir2.213 -psdir2.214 -libdir2.215 -localedir2.216 -mandir2.217 -DEFS2.218 -ECHO_C2.219 -ECHO_N2.220 -ECHO_T2.221 -LIBS2.222 -build_alias2.223 -host_alias2.224 -target_alias2.225 -INSTALL_PROGRAM2.226 -INSTALL_SCRIPT2.227 -INSTALL_DATA2.228 -CYGPATH_W2.229 -PACKAGE2.230 -VERSION2.231 -ACLOCAL2.232 -AUTOCONF2.233 -AUTOMAKE2.234 -AUTOHEADER2.235 -MAKEINFO2.236 -install_sh2.237 -STRIP2.238 -INSTALL_STRIP_PROGRAM2.239 -mkdir_p2.240 -AWK2.241 -SET_MAKE2.242 -am__leading_dot2.243 -AMTAR2.244 -am__tar2.245 -am__untar2.246 -MAINTAINER_MODE_TRUE2.247 -MAINTAINER_MODE_FALSE2.248 -MAINT2.249 -CC2.250 -CFLAGS2.251 -LDFLAGS2.252 -CPPFLAGS2.253 -ac_ct_CC2.254 -EXEEXT2.255 -OBJEXT2.256 -DEPDIR2.257 -am__include2.258 -am__quote2.259 -AMDEP_TRUE2.260 -AMDEP_FALSE2.261 -AMDEPBACKSLASH2.262 -CCDEPMODE2.263 -am__fastdepCC_TRUE2.264 -am__fastdepCC_FALSE2.265 -OBJC2.266 -OBJCFLAGS2.267 -ac_ct_OBJC2.268 -SED2.269 -CCAS2.270 -CCASFLAGS2.271 -CPP2.272 -GREP2.273 -EGREP2.274 -build2.275 -build_cpu2.276 -build_vendor2.277 -build_os2.278 -host2.279 -host_cpu2.280 -host_vendor2.281 -host_os2.282 -OBJCDEPMODE2.283 -am__fastdepOBJC_TRUE2.284 -am__fastdepOBJC_FALSE2.285 -POD2MAN2.286 -POD2HTML2.287 -GUI_COCOA_TRUE2.288 -GUI_COCOA_FALSE2.289 -PKG_CONFIG2.290 -LIBPNG_CFLAGS2.291 -LIBPNG_LIBS2.292 -GLIB_CFLAGS2.293 -GLIB_LIBS2.294 -GTK_CFLAGS2.295 -GTK_LIBS2.296 -GUI_GTK_TRUE2.297 -GUI_GTK_FALSE2.298 -VIDEO_OSMESA_TRUE2.299 -VIDEO_OSMESA_FALSE2.300 -VIDEO_GLX_TRUE2.301 -VIDEO_GLX_FALSE2.302 -VIDEO_NSGL_TRUE2.303 -VIDEO_NSGL_FALSE2.304 -BUILD_SH4X86_TRUE2.305 -BUILD_SH4X86_FALSE2.306 -AUDIO_OSX_TRUE2.307 -AUDIO_OSX_FALSE2.308 -SDL_CFLAGS2.309 -SDL_LIBS2.310 -AUDIO_SDL_TRUE2.311 -AUDIO_SDL_FALSE2.312 -PULSE_CFLAGS2.313 -PULSE_LIBS2.314 -AUDIO_PULSE_TRUE2.315 -AUDIO_PULSE_FALSE2.316 -ESOUND_CFLAGS2.317 -ESOUND_LIBS2.318 -AUDIO_ESOUND_TRUE2.319 -AUDIO_ESOUND_FALSE2.320 -ALSA_CFLAGS2.321 -ALSA_LIBS2.322 -AUDIO_ALSA_TRUE2.323 -AUDIO_ALSA_FALSE2.324 -CDROM_LINUX_TRUE2.325 -CDROM_LINUX_FALSE2.326 -CDROM_OSX_TRUE2.327 -CDROM_OSX_FALSE2.328 -CDROM_NONE_TRUE2.329 -CDROM_NONE_FALSE2.330 -JOY_LINUX_TRUE2.331 -JOY_LINUX_FALSE2.332 -SHCC2.333 -SHLD2.334 -SHOBJCOPY2.335 -ARMCC2.336 -ARMLD2.337 -ARMOBJCOPY2.338 -BUILD_SYSTEST_TRUE2.339 -BUILD_SYSTEST_FALSE2.340 -BUILD_ARMTEST_TRUE2.341 -BUILD_ARMTEST_FALSE2.342 -GETTEXT_PACKAGE2.343 -USE_NLS2.344 -MSGFMT2.345 -MSGFMT_OPTS2.346 -GMSGFMT2.347 -XGETTEXT2.348 -CATALOGS2.349 -CATOBJEXT2.350 -DATADIRNAME2.351 -GMOFILES2.352 -INSTOBJEXT2.353 -INTLLIBS2.354 -PO_IN_DATADIR_TRUE2.355 -PO_IN_DATADIR_FALSE2.356 -POFILES2.357 -POSUB2.358 -MKINSTALLDIRS2.359 -LIBOBJS2.360 -LTLIBOBJS'2.361 +SHELL'2.362 ac_subst_files=''2.363 ac_user_opts='2.364 enable_option_checking2.365 @@ -1276,9 +1278,9 @@2.366 if test -n "$ac_unrecognized_opts"; then2.367 case $enable_option_checking in2.368 no) ;;2.369 - fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&22.370 + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&22.371 { (exit 1); exit 1; }; } ;;2.372 - *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;2.373 + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;2.374 esac2.375 fi2.377 @@ -1331,7 +1333,7 @@2.378 ac_pwd=`pwd` && test -n "$ac_pwd" &&2.379 ac_ls_di=`ls -di .` &&2.380 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||2.381 - { $as_echo "$as_me: error: Working directory cannot be determined" >&22.382 + { $as_echo "$as_me: error: working directory cannot be determined" >&22.383 { (exit 1); exit 1; }; }2.384 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||2.385 { $as_echo "$as_me: error: pwd does not report name of working directory" >&22.386 @@ -1605,7 +1607,7 @@2.387 if $ac_init_version; then2.388 cat <<\_ACEOF2.389 configure2.390 -generated by GNU Autoconf 2.622.391 +generated by GNU Autoconf 2.632.393 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,2.394 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.2.395 @@ -1619,7 +1621,7 @@2.396 running configure, to aid debugging if configure makes a mistake.2.398 It was created by $as_me, which was2.399 -generated by GNU Autoconf 2.62. Invocation command line was2.400 +generated by GNU Autoconf 2.63. Invocation command line was2.402 $ $0 $@2.404 @@ -1742,8 +1744,8 @@2.405 case $ac_val in #(2.406 *${as_nl}*)2.407 case $ac_var in #(2.408 - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&52.409 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;2.410 + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&52.411 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;2.412 esac2.413 case $ac_var in #(2.414 _ | IFS | as_nl) ;; #(2.415 @@ -1946,6 +1948,8 @@2.416 fi2.417 done2.418 if $ac_cache_corrupted; then2.419 + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.420 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.421 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&52.422 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}2.423 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&52.424 @@ -2421,12 +2425,8 @@2.425 else2.426 case $cross_compiling:$ac_tool_warned in2.427 yes:)2.428 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.429 -whose name does not start with the host triplet. If you think this2.430 -configuration is useful to you, please write to autoconf@gnu.org." >&52.431 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.432 -whose name does not start with the host triplet. If you think this2.433 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.434 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.435 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.436 ac_tool_warned=yes ;;2.437 esac2.438 STRIP=$ac_ct_STRIP2.439 @@ -2629,12 +2629,8 @@2.440 else2.441 case $cross_compiling:$ac_tool_warned in2.442 yes:)2.443 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.444 -whose name does not start with the host triplet. If you think this2.445 -configuration is useful to you, please write to autoconf@gnu.org." >&52.446 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.447 -whose name does not start with the host triplet. If you think this2.448 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.449 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.450 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.451 ac_tool_warned=yes ;;2.452 esac2.453 CC=$ac_ct_CC2.454 @@ -2833,12 +2829,8 @@2.455 else2.456 case $cross_compiling:$ac_tool_warned in2.457 yes:)2.458 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.459 -whose name does not start with the host triplet. If you think this2.460 -configuration is useful to you, please write to autoconf@gnu.org." >&52.461 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.462 -whose name does not start with the host triplet. If you think this2.463 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.464 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.465 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.466 ac_tool_warned=yes ;;2.467 esac2.468 CC=$ac_ct_CC2.469 @@ -2848,11 +2840,13 @@2.470 fi2.473 -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH2.474 +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.475 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.476 +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH2.477 See \`config.log' for more details." >&52.478 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH2.479 See \`config.log' for more details." >&2;}2.480 - { (exit 1); exit 1; }; }2.481 + { (exit 1); exit 1; }; }; }2.483 # Provide some information about the compiler.2.484 $as_echo "$as_me:$LINENO: checking for C compiler version" >&52.485 @@ -2982,11 +2976,13 @@2.486 $as_echo "$as_me: failed program was:" >&52.487 sed 's/^/| /' conftest.$ac_ext >&52.489 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.490 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.491 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables2.492 See \`config.log' for more details." >&52.493 $as_echo "$as_me: error: C compiler cannot create executables2.494 See \`config.log' for more details." >&2;}2.495 - { (exit 77); exit 77; }; }2.496 + { (exit 77); exit 77; }; }; }2.497 fi2.499 ac_exeext=$ac_cv_exeext2.500 @@ -3014,13 +3010,15 @@2.501 if test "$cross_compiling" = maybe; then2.502 cross_compiling=yes2.503 else2.504 - { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.2.505 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.506 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.507 +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.2.508 If you meant to cross compile, use \`--host'.2.509 See \`config.log' for more details." >&52.510 $as_echo "$as_me: error: cannot run C compiled programs.2.511 If you meant to cross compile, use \`--host'.2.512 See \`config.log' for more details." >&2;}2.513 - { (exit 1); exit 1; }; }2.514 + { (exit 1); exit 1; }; }; }2.515 fi2.516 fi2.517 fi2.518 @@ -3063,11 +3061,13 @@2.519 esac2.520 done2.521 else2.522 - { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link2.523 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.524 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.525 +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link2.526 See \`config.log' for more details." >&52.527 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link2.528 See \`config.log' for more details." >&2;}2.529 - { (exit 1); exit 1; }; }2.530 + { (exit 1); exit 1; }; }; }2.531 fi2.533 rm -f conftest$ac_cv_exeext2.534 @@ -3121,11 +3121,13 @@2.535 $as_echo "$as_me: failed program was:" >&52.536 sed 's/^/| /' conftest.$ac_ext >&52.538 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.539 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.540 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile2.541 See \`config.log' for more details." >&52.542 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile2.543 See \`config.log' for more details." >&2;}2.544 - { (exit 1); exit 1; }; }2.545 + { (exit 1); exit 1; }; }; }2.546 fi2.548 rm -f conftest.$ac_cv_objext conftest.$ac_ext2.549 @@ -3649,7 +3651,7 @@2.550 fi2.551 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&52.552 $as_echo "$ac_cv_lib_cposix_strerror" >&6; }2.553 -if test $ac_cv_lib_cposix_strerror = yes; then2.554 +if test "x$ac_cv_lib_cposix_strerror" = x""yes; then2.555 LIBS="$LIBS -lcposix"2.556 fi2.558 @@ -3742,12 +3744,8 @@2.559 else2.560 case $cross_compiling:$ac_tool_warned in2.561 yes:)2.562 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.563 -whose name does not start with the host triplet. If you think this2.564 -configuration is useful to you, please write to autoconf@gnu.org." >&52.565 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.566 -whose name does not start with the host triplet. If you think this2.567 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.568 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.569 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.570 ac_tool_warned=yes ;;2.571 esac2.572 CC=$ac_ct_CC2.573 @@ -3946,12 +3944,8 @@2.574 else2.575 case $cross_compiling:$ac_tool_warned in2.576 yes:)2.577 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.578 -whose name does not start with the host triplet. If you think this2.579 -configuration is useful to you, please write to autoconf@gnu.org." >&52.580 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.581 -whose name does not start with the host triplet. If you think this2.582 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.583 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.584 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.585 ac_tool_warned=yes ;;2.586 esac2.587 CC=$ac_ct_CC2.588 @@ -3961,11 +3955,13 @@2.589 fi2.592 -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH2.593 +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.594 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.595 +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH2.596 See \`config.log' for more details." >&52.597 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH2.598 See \`config.log' for more details." >&2;}2.599 - { (exit 1); exit 1; }; }2.600 + { (exit 1); exit 1; }; }; }2.602 # Provide some information about the compiler.2.603 $as_echo "$as_me:$LINENO: checking for C compiler version" >&52.604 @@ -4540,12 +4536,8 @@2.605 else2.606 case $cross_compiling:$ac_tool_warned in2.607 yes:)2.608 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.609 -whose name does not start with the host triplet. If you think this2.610 -configuration is useful to you, please write to autoconf@gnu.org." >&52.611 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.612 -whose name does not start with the host triplet. If you think this2.613 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.614 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.615 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.616 ac_tool_warned=yes ;;2.617 esac2.618 CC=$ac_ct_CC2.619 @@ -4744,12 +4736,8 @@2.620 else2.621 case $cross_compiling:$ac_tool_warned in2.622 yes:)2.623 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.624 -whose name does not start with the host triplet. If you think this2.625 -configuration is useful to you, please write to autoconf@gnu.org." >&52.626 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.627 -whose name does not start with the host triplet. If you think this2.628 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.629 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.630 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.631 ac_tool_warned=yes ;;2.632 esac2.633 CC=$ac_ct_CC2.634 @@ -4759,11 +4747,13 @@2.635 fi2.638 -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH2.639 +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.640 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.641 +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH2.642 See \`config.log' for more details." >&52.643 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH2.644 See \`config.log' for more details." >&2;}2.645 - { (exit 1); exit 1; }; }2.646 + { (exit 1); exit 1; }; }; }2.648 # Provide some information about the compiler.2.649 $as_echo "$as_me:$LINENO: checking for C compiler version" >&52.650 @@ -5351,12 +5341,8 @@2.651 else2.652 case $cross_compiling:$ac_tool_warned in2.653 yes:)2.654 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.655 -whose name does not start with the host triplet. If you think this2.656 -configuration is useful to you, please write to autoconf@gnu.org." >&52.657 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.658 -whose name does not start with the host triplet. If you think this2.659 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.660 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.661 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.662 ac_tool_warned=yes ;;2.663 esac2.664 OBJC=$ac_ct_OBJC2.665 @@ -5923,11 +5909,13 @@2.666 if $ac_preproc_ok; then2.667 :2.668 else2.669 - { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check2.670 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.671 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.672 +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check2.673 See \`config.log' for more details." >&52.674 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check2.675 See \`config.log' for more details." >&2;}2.676 - { (exit 1); exit 1; }; }2.677 + { (exit 1); exit 1; }; }; }2.678 fi2.680 ac_ext=c2.681 @@ -6310,8 +6298,9 @@2.682 $as_echo "$as_val"'`2.683 { $as_echo "$as_me:$LINENO: result: $ac_res" >&52.684 $as_echo "$ac_res" >&6; }2.685 -if test `eval 'as_val=${'$as_ac_Header'}2.686 - $as_echo "$as_val"'` = yes; then2.687 +as_val=`eval 'as_val=${'$as_ac_Header'}2.688 + $as_echo "$as_val"'`2.689 + if test "x$as_val" = x""yes; then2.690 cat >>confdefs.h <<_ACEOF2.691 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 12.692 _ACEOF2.693 @@ -6572,11 +6561,13 @@2.694 case $ac_lo in2.695 ?*) ac_cv_sizeof_void_p=$ac_lo;;2.696 '') if test "$ac_cv_type_void_p" = yes; then2.697 - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)2.698 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.699 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.700 +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)2.701 See \`config.log' for more details." >&52.702 $as_echo "$as_me: error: cannot compute sizeof (void *)2.703 See \`config.log' for more details." >&2;}2.704 - { (exit 77); exit 77; }; }2.705 + { (exit 77); exit 77; }; }; }2.706 else2.707 ac_cv_sizeof_void_p=02.708 fi ;;2.709 @@ -6652,11 +6643,13 @@2.711 ( exit $ac_status )2.712 if test "$ac_cv_type_void_p" = yes; then2.713 - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)2.714 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.715 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.716 +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)2.717 See \`config.log' for more details." >&52.718 $as_echo "$as_me: error: cannot compute sizeof (void *)2.719 See \`config.log' for more details." >&2;}2.720 - { (exit 77); exit 77; }; }2.721 + { (exit 77); exit 77; }; }; }2.722 else2.723 ac_cv_sizeof_void_p=02.724 fi2.725 @@ -7328,12 +7321,8 @@2.726 else2.727 case $cross_compiling:$ac_tool_warned in2.728 yes:)2.729 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.730 -whose name does not start with the host triplet. If you think this2.731 -configuration is useful to you, please write to autoconf@gnu.org." >&52.732 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.733 -whose name does not start with the host triplet. If you think this2.734 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.735 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.736 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.737 ac_tool_warned=yes ;;2.738 esac2.739 OBJC=$ac_ct_OBJC2.740 @@ -7689,7 +7678,7 @@2.741 fi2.742 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Cocoa_Cocoa_h" >&52.743 $as_echo "$ac_cv_header_Cocoa_Cocoa_h" >&6; }2.744 -if test $ac_cv_header_Cocoa_Cocoa_h = yes; then2.745 +if test "x$ac_cv_header_Cocoa_Cocoa_h" = x""yes; then2.747 HAVE_COCOA='yes'2.748 APPLE_BUILD='yes'2.749 @@ -7831,11 +7820,13 @@2.750 { $as_echo "$as_me:$LINENO: checking support for fastcall calling conventions" >&52.751 $as_echo_n "checking support for fastcall calling conventions... " >&6; };2.752 if test "$cross_compiling" = yes; then2.753 - { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling2.754 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.755 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.756 +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling2.757 See \`config.log' for more details." >&52.758 $as_echo "$as_me: error: cannot run test program while cross compiling2.759 See \`config.log' for more details." >&2;}2.760 - { (exit 1); exit 1; }; }2.761 + { (exit 1); exit 1; }; }; }2.762 else2.763 cat >conftest.$ac_ext <<_ACEOF2.765 @@ -7905,11 +7896,13 @@2.766 { $as_echo "$as_me:$LINENO: checking if we have a working __builtin_frame_address()" >&52.767 $as_echo_n "checking if we have a working __builtin_frame_address()... " >&6; };2.768 if test "$cross_compiling" = yes; then2.769 - { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling2.770 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.771 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.772 +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling2.773 See \`config.log' for more details." >&52.774 $as_echo "$as_me: error: cannot run test program while cross compiling2.775 See \`config.log' for more details." >&2;}2.776 - { (exit 1); exit 1; }; }2.777 + { (exit 1); exit 1; }; }; }2.778 else2.779 cat >conftest.$ac_ext <<_ACEOF2.781 @@ -8256,12 +8249,8 @@2.782 else2.783 case $cross_compiling:$ac_tool_warned in2.784 yes:)2.785 -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools2.786 -whose name does not start with the host triplet. If you think this2.787 -configuration is useful to you, please write to autoconf@gnu.org." >&52.788 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools2.789 -whose name does not start with the host triplet. If you think this2.790 -configuration is useful to you, please write to autoconf@gnu.org." >&2;}2.791 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&52.792 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}2.793 ac_tool_warned=yes ;;2.794 esac2.795 PKG_CONFIG=$ac_pt_PKG_CONFIG2.796 @@ -8364,7 +8353,9 @@2.797 " >&2;}2.798 { (exit 1); exit 1; }; }2.799 elif test $pkg_failed = untried; then2.800 - { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it2.801 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.802 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.803 +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it2.804 is in your PATH or set the PKG_CONFIG environment variable to the full2.805 path to pkg-config.2.807 @@ -8384,7 +8375,7 @@2.809 To get pkg-config, see <http://pkg-config.freedesktop.org/>.2.810 See \`config.log' for more details." >&2;}2.811 - { (exit 1); exit 1; }; }2.812 + { (exit 1); exit 1; }; }; }2.813 else2.814 LIBPNG_CFLAGS=$pkg_cv_LIBPNG_CFLAGS2.815 LIBPNG_LIBS=$pkg_cv_LIBPNG_LIBS2.816 @@ -8459,7 +8450,7 @@2.817 fi2.818 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&52.819 $as_echo "$ac_cv_lib_z_uncompress" >&6; }2.820 -if test $ac_cv_lib_z_uncompress = yes; then2.821 +if test "x$ac_cv_lib_z_uncompress" = x""yes; then2.822 cat >>confdefs.h <<_ACEOF2.823 #define HAVE_LIBZ 12.824 _ACEOF2.825 @@ -8553,7 +8544,9 @@2.826 " >&2;}2.827 { (exit 1); exit 1; }; }2.828 elif test $pkg_failed = untried; then2.829 - { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it2.830 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.831 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.832 +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it2.833 is in your PATH or set the PKG_CONFIG environment variable to the full2.834 path to pkg-config.2.836 @@ -8573,7 +8566,7 @@2.838 To get pkg-config, see <http://pkg-config.freedesktop.org/>.2.839 See \`config.log' for more details." >&2;}2.840 - { (exit 1); exit 1; }; }2.841 + { (exit 1); exit 1; }; }; }2.842 else2.843 GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS2.844 GLIB_LIBS=$pkg_cv_GLIB_LIBS2.845 @@ -8661,7 +8654,9 @@2.846 " >&2;}2.847 { (exit 1); exit 1; }; }2.848 elif test $pkg_failed = untried; then2.849 - { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it2.850 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.851 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.852 +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it2.853 is in your PATH or set the PKG_CONFIG environment variable to the full2.854 path to pkg-config.2.856 @@ -8681,7 +8676,7 @@2.858 To get pkg-config, see <http://pkg-config.freedesktop.org/>.2.859 See \`config.log' for more details." >&2;}2.860 - { (exit 1); exit 1; }; }2.861 + { (exit 1); exit 1; }; }; }2.862 else2.863 GTK_CFLAGS=$pkg_cv_GTK_CFLAGS2.864 GTK_LIBS=$pkg_cv_GTK_LIBS2.865 @@ -8783,7 +8778,7 @@2.866 fi2.867 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gdk_x11_display_get_xdisplay" >&52.868 $as_echo "$ac_cv_func_gdk_x11_display_get_xdisplay" >&6; }2.869 -if test $ac_cv_func_gdk_x11_display_get_xdisplay = yes; then2.870 +if test "x$ac_cv_func_gdk_x11_display_get_xdisplay" = x""yes; then2.872 HAVE_GTK_X11='yes'2.874 @@ -8878,7 +8873,7 @@2.875 fi2.876 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gdk_quartz_window_get_nsview" >&52.877 $as_echo "$ac_cv_func_gdk_quartz_window_get_nsview" >&6; }2.878 -if test $ac_cv_func_gdk_quartz_window_get_nsview = yes; then2.879 +if test "x$ac_cv_func_gdk_quartz_window_get_nsview" = x""yes; then2.881 HAVE_GTK_OSX='yes'2.883 @@ -8970,7 +8965,7 @@2.884 fi2.885 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_OSMesaCreateContext" >&52.886 $as_echo "$ac_cv_lib_OSMesa_OSMesaCreateContext" >&6; }2.887 -if test $ac_cv_lib_OSMesa_OSMesaCreateContext = yes; then2.888 +if test "x$ac_cv_lib_OSMesa_OSMesaCreateContext" = x""yes; then2.889 cat >>confdefs.h <<_ACEOF2.890 #define HAVE_LIBOSMESA 12.891 _ACEOF2.892 @@ -8978,11 +8973,13 @@2.893 LIBS="-lOSMesa $LIBS"2.895 else2.896 - { { $as_echo "$as_me:$LINENO: error: --with-osmesa was given, but OSMesa library could not be found2.897 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.898 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.899 +{ { $as_echo "$as_me:$LINENO: error: --with-osmesa was given, but OSMesa library could not be found2.900 See \`config.log' for more details." >&52.901 $as_echo "$as_me: error: --with-osmesa was given, but OSMesa library could not be found2.902 See \`config.log' for more details." >&2;}2.903 - { (exit 1); exit 1; }; }2.904 + { (exit 1); exit 1; }; }; }2.905 fi2.907 if test "${ac_cv_header_GL_osmesa_h+set}" = set; then2.908 @@ -9112,14 +9109,16 @@2.909 $as_echo "$ac_cv_header_GL_osmesa_h" >&6; }2.911 fi2.912 -if test $ac_cv_header_GL_osmesa_h = yes; then2.913 - :2.914 -else2.915 - { { $as_echo "$as_me:$LINENO: error: --with-osmesa was given, but osmesa.h could not be found2.916 +if test "x$ac_cv_header_GL_osmesa_h" = x""yes; then2.917 + :2.918 +else2.919 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.920 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.921 +{ { $as_echo "$as_me:$LINENO: error: --with-osmesa was given, but osmesa.h could not be found2.922 See \`config.log' for more details." >&52.923 $as_echo "$as_me: error: --with-osmesa was given, but osmesa.h could not be found2.924 See \`config.log' for more details." >&2;}2.925 - { (exit 1); exit 1; }; }2.926 + { (exit 1); exit 1; }; }; }2.927 fi2.930 @@ -9200,7 +9199,7 @@2.931 fi2.932 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glVertex3f" >&52.933 $as_echo "$ac_cv_lib_GL_glVertex3f" >&6; }2.934 -if test $ac_cv_lib_GL_glVertex3f = yes; then2.935 +if test "x$ac_cv_lib_GL_glVertex3f" = x""yes; then2.936 cat >>confdefs.h <<_ACEOF2.937 #define HAVE_LIBGL 12.938 _ACEOF2.939 @@ -9209,11 +9208,13 @@2.941 else2.943 - { { $as_echo "$as_me:$LINENO: error: \"The OpenGL library (libGL.so) could not be found, but is required.\"2.944 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.945 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.946 +{ { $as_echo "$as_me:$LINENO: error: \"The OpenGL library (libGL.so) could not be found, but is required.\"2.947 See \`config.log' for more details." >&52.948 $as_echo "$as_me: error: \"The OpenGL library (libGL.so) could not be found, but is required.\"2.949 See \`config.log' for more details." >&2;}2.950 - { (exit 1); exit 1; }; }2.951 + { (exit 1); exit 1; }; }; }2.952 fi2.954 if test "${ac_cv_header_GL_gl_h+set}" = set; then2.955 @@ -9343,15 +9344,17 @@2.956 $as_echo "$ac_cv_header_GL_gl_h" >&6; }2.958 fi2.959 -if test $ac_cv_header_GL_gl_h = yes; then2.960 - :2.961 -else2.962 -2.963 - { { $as_echo "$as_me:$LINENO: error: \"The OpenGL header files (eg GL/gl.h) could not be found, but are required.\"2.964 +if test "x$ac_cv_header_GL_gl_h" = x""yes; then2.965 + :2.966 +else2.967 +2.968 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.969 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.970 +{ { $as_echo "$as_me:$LINENO: error: \"The OpenGL header files (eg GL/gl.h) could not be found, but are required.\"2.971 See \`config.log' for more details." >&52.972 $as_echo "$as_me: error: \"The OpenGL header files (eg GL/gl.h) could not be found, but are required.\"2.973 See \`config.log' for more details." >&2;}2.974 - { (exit 1); exit 1; }; }2.975 + { (exit 1); exit 1; }; }; }2.976 fi2.979 @@ -9441,7 +9444,7 @@2.980 fi2.981 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_NSOpenGLGetVersion" >&52.982 $as_echo "$ac_cv_func_NSOpenGLGetVersion" >&6; }2.983 -if test $ac_cv_func_NSOpenGLGetVersion = yes; then2.984 +if test "x$ac_cv_func_NSOpenGLGetVersion" = x""yes; then2.986 HAVE_NSGL='yes'2.987 VIDEO_DRIVERS="$VIDEO_DRIVERS nsgl"2.988 @@ -9543,7 +9546,7 @@2.989 fi2.990 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_glXQueryVersion" >&52.991 $as_echo "$ac_cv_func_glXQueryVersion" >&6; }2.992 -if test $ac_cv_func_glXQueryVersion = yes; then2.993 +if test "x$ac_cv_func_glXQueryVersion" = x""yes; then2.995 HAVE_GLX='yes'2.996 VIDEO_DRIVERS="$VIDEO_DRIVERS glx"2.997 @@ -9678,7 +9681,7 @@2.998 fi2.999 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_glGenFramebuffersEXT" >&52.1000 $as_echo "$ac_cv_func_glGenFramebuffersEXT" >&6; }2.1001 -if test $ac_cv_func_glGenFramebuffersEXT = yes; then2.1002 +if test "x$ac_cv_func_glGenFramebuffersEXT" = x""yes; then2.1004 cat >>confdefs.h <<\_ACEOF2.1005 #define HAVE_OPENGL_FBO 12.1006 @@ -9771,7 +9774,7 @@2.1007 fi2.1008 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_glCreateShader" >&52.1009 $as_echo "$ac_cv_func_glCreateShader" >&6; }2.1010 -if test $ac_cv_func_glCreateShader = yes; then2.1011 +if test "x$ac_cv_func_glCreateShader" = x""yes; then2.1013 cat >>confdefs.h <<\_ACEOF2.1014 #define HAVE_OPENGL_SHADER 12.1015 @@ -9864,7 +9867,7 @@2.1016 fi2.1017 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_glCreateShaderObjectARB" >&52.1018 $as_echo "$ac_cv_func_glCreateShaderObjectARB" >&6; }2.1019 -if test $ac_cv_func_glCreateShaderObjectARB = yes; then2.1020 +if test "x$ac_cv_func_glCreateShaderObjectARB" = x""yes; then2.1022 cat >>confdefs.h <<\_ACEOF2.1023 #define HAVE_OPENGL_SHADER_ARB 12.1024 @@ -9957,7 +9960,7 @@2.1025 fi2.1026 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_glClampColorARB" >&52.1027 $as_echo "$ac_cv_func_glClampColorARB" >&6; }2.1028 -if test $ac_cv_func_glClampColorARB = yes; then2.1029 +if test "x$ac_cv_func_glClampColorARB" = x""yes; then2.1031 cat >>confdefs.h <<\_ACEOF2.1032 #define HAVE_OPENGL_CLAMP_COLOR 12.1033 @@ -10117,7 +10120,7 @@2.1034 $as_echo "$ac_cv_header_CoreAudio_CoreAudio_h" >&6; }2.1036 fi2.1037 -if test $ac_cv_header_CoreAudio_CoreAudio_h = yes; then2.1038 +if test "x$ac_cv_header_CoreAudio_CoreAudio_h" = x""yes; then2.1040 HAVE_CORE_AUDIO=yes2.1041 LIBS="$LIBS -framework CoreAudio"2.1042 @@ -10203,21 +10206,25 @@2.1043 $as_echo "no" >&6; }2.1045 if test "x$with_sdl" = "xyes"; then2.1046 - { { $as_echo "$as_me:$LINENO: error: \"SDL libraries could not be found (but were required)2.1047 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.1048 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.1049 +{ { $as_echo "$as_me:$LINENO: error: \"SDL libraries could not be found (but were required)2.1050 See \`config.log' for more details." >&52.1051 $as_echo "$as_me: error: \"SDL libraries could not be found (but were required)2.1052 See \`config.log' for more details." >&2;}2.1053 - { (exit 1); exit 1; }; }2.1054 + { (exit 1); exit 1; }; }; }2.1055 fi2.1057 elif test $pkg_failed = untried; then2.1059 if test "x$with_sdl" = "xyes"; then2.1060 - { { $as_echo "$as_me:$LINENO: error: \"SDL libraries could not be found (but were required)2.1061 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.1062 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.1063 +{ { $as_echo "$as_me:$LINENO: error: \"SDL libraries could not be found (but were required)2.1064 See \`config.log' for more details." >&52.1065 $as_echo "$as_me: error: \"SDL libraries could not be found (but were required)2.1066 See \`config.log' for more details." >&2;}2.1067 - { (exit 1); exit 1; }; }2.1068 + { (exit 1); exit 1; }; }; }2.1069 fi2.1071 else2.1072 @@ -10307,21 +10314,25 @@2.1073 $as_echo "no" >&6; }2.1075 if test "x$with_pulse" = "xyes"; then2.1076 - { { $as_echo "$as_me:$LINENO: error: PulseAudio audio package could not be found (but was required)2.1077 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.1078 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.1079 +{ { $as_echo "$as_me:$LINENO: error: PulseAudio audio package could not be found (but was required)2.1080 See \`config.log' for more details." >&52.1081 $as_echo "$as_me: error: PulseAudio audio package could not be found (but was required)2.1082 See \`config.log' for more details." >&2;}2.1083 - { (exit 1); exit 1; }; }2.1084 + { (exit 1); exit 1; }; }; }2.1085 fi2.1087 elif test $pkg_failed = untried; then2.1089 if test "x$with_pulse" = "xyes"; then2.1090 - { { $as_echo "$as_me:$LINENO: error: PulseAudio audio package could not be found (but was required)2.1091 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.1092 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.1093 +{ { $as_echo "$as_me:$LINENO: error: PulseAudio audio package could not be found (but was required)2.1094 See \`config.log' for more details." >&52.1095 $as_echo "$as_me: error: PulseAudio audio package could not be found (but was required)2.1096 See \`config.log' for more details." >&2;}2.1097 - { (exit 1); exit 1; }; }2.1098 + { (exit 1); exit 1; }; }; }2.1099 fi2.1101 else2.1102 @@ -10411,21 +10422,25 @@2.1103 $as_echo "no" >&6; }2.1105 if test "x$with_esd" = "xyes"; then2.1106 - { { $as_echo "$as_me:$LINENO: error: ESounD audio package could not be found (but was required)2.1107 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.1108 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.1109 +{ { $as_echo "$as_me:$LINENO: error: ESounD audio package could not be found (but was required)2.1110 See \`config.log' for more details." >&52.1111 $as_echo "$as_me: error: ESounD audio package could not be found (but was required)2.1112 See \`config.log' for more details." >&2;}2.1113 - { (exit 1); exit 1; }; }2.1114 + { (exit 1); exit 1; }; }; }2.1115 fi2.1117 elif test $pkg_failed = untried; then2.1119 if test "x$with_esd" = "xyes"; then2.1120 - { { $as_echo "$as_me:$LINENO: error: ESounD audio package could not be found (but was required)2.1121 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&52.1122 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}2.1123 +{ { $as_echo "$as_me:$LINENO: error: ESounD audio package could not be found (but was required)2.1124 See \`config.log' for more details." >&52.1125 $as_echo "$as_me: error: ESounD audio package could not be found (but was required)2.1126 See \`config.log' for more details." >&2;}2.1127 - { (exit 1); exit 1; }; }2.1128 + { (exit 1); exit 1; }; }; }2.1129 fi2.1131 else2.1132 @@ -10668,7 +10683,7 @@2.1133 $as_echo "$ac_cv_header_linux_cdrom_h" >&6; }2.1135 fi2.1136 -if test $ac_cv_header_linux_cdrom_h = yes; then2.1137 +if test "x$ac_cv_header_linux_cdrom_h" = x""yes; then2.1139 CDROM_DRIVER=linux2.1140 { $as_echo "$as_me:$LINENO: checking C99 compliant kernel headers" >&52.1141 @@ -10855,7 +10870,7 @@2.1142 $as_echo "$ac_cv_header_IOKit_IOKitLib_h" >&6; }2.1144 fi2.1145 -if test $ac_cv_header_IOKit_IOKitLib_h = yes; then2.1146 +if test "x$ac_cv_header_IOKit_IOKitLib_h" = x""yes; then2.1148 CDROM_DRIVER=osx2.1149 LIBS="$LIBS -framework IOKit"2.1150 @@ -11022,7 +11037,7 @@2.1151 $as_echo "$ac_cv_header_linux_joystick_h" >&6; }2.1153 fi2.1154 -if test $ac_cv_header_linux_joystick_h = yes; then2.1155 +if test "x$ac_cv_header_linux_joystick_h" = x""yes; then2.1157 HAVE_LINUX_JOYSTICK_H=yes2.1159 @@ -11046,6 +11061,159 @@2.1160 fi2.1163 +if test "x$with_lirc" != "xno"; then2.1164 + if test "${ac_cv_header_lirc_lirc_client_h+set}" = set; then2.1165 + { $as_echo "$as_me:$LINENO: checking for lirc/lirc_client.h" >&52.1166 +$as_echo_n "checking for lirc/lirc_client.h... " >&6; }2.1167 +if test "${ac_cv_header_lirc_lirc_client_h+set}" = set; then2.1168 + $as_echo_n "(cached) " >&62.1169 +fi2.1170 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lirc_lirc_client_h" >&52.1171 +$as_echo "$ac_cv_header_lirc_lirc_client_h" >&6; }2.1172 +else2.1173 + # Is the header compilable?2.1174 +{ $as_echo "$as_me:$LINENO: checking lirc/lirc_client.h usability" >&52.1175 +$as_echo_n "checking lirc/lirc_client.h usability... " >&6; }2.1176 +cat >conftest.$ac_ext <<_ACEOF2.1177 +/* confdefs.h. */2.1178 +_ACEOF2.1179 +cat confdefs.h >>conftest.$ac_ext2.1180 +cat >>conftest.$ac_ext <<_ACEOF2.1181 +/* end confdefs.h. */2.1182 +$ac_includes_default2.1183 +#include <lirc/lirc_client.h>2.1184 +_ACEOF2.1185 +rm -f conftest.$ac_objext2.1186 +if { (ac_try="$ac_compile"2.1187 +case "(($ac_try" in2.1188 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.1189 + *) ac_try_echo=$ac_try;;2.1190 +esac2.1191 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""2.1192 +$as_echo "$ac_try_echo") >&52.1193 + (eval "$ac_compile") 2>conftest.er12.1194 + ac_status=$?2.1195 + grep -v '^ *+' conftest.er1 >conftest.err2.1196 + rm -f conftest.er12.1197 + cat conftest.err >&52.1198 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&52.1199 + (exit $ac_status); } && {2.1200 + test -z "$ac_c_werror_flag" ||2.1201 + test ! -s conftest.err2.1202 + } && test -s conftest.$ac_objext; then2.1203 + ac_header_compiler=yes2.1204 +else2.1205 + $as_echo "$as_me: failed program was:" >&52.1206 +sed 's/^/| /' conftest.$ac_ext >&52.1207 +2.1208 + ac_header_compiler=no2.1209 +fi2.1210 +2.1211 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext2.1212 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&52.1213 +$as_echo "$ac_header_compiler" >&6; }2.1214 +2.1215 +# Is the header present?2.1216 +{ $as_echo "$as_me:$LINENO: checking lirc/lirc_client.h presence" >&52.1217 +$as_echo_n "checking lirc/lirc_client.h presence... " >&6; }2.1218 +cat >conftest.$ac_ext <<_ACEOF2.1219 +/* confdefs.h. */2.1220 +_ACEOF2.1221 +cat confdefs.h >>conftest.$ac_ext2.1222 +cat >>conftest.$ac_ext <<_ACEOF2.1223 +/* end confdefs.h. */2.1224 +#include <lirc/lirc_client.h>2.1225 +_ACEOF2.1226 +if { (ac_try="$ac_cpp conftest.$ac_ext"2.1227 +case "(($ac_try" in2.1228 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;2.1229 + *) ac_try_echo=$ac_try;;2.1230 +esac2.1231 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""2.1232 +$as_echo "$ac_try_echo") >&52.1233 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er12.1234 + ac_status=$?2.1235 + grep -v '^ *+' conftest.er1 >conftest.err2.1236 + rm -f conftest.er12.1237 + cat conftest.err >&52.1238 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&52.1239 + (exit $ac_status); } >/dev/null && {2.1240 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||2.1241 + test ! -s conftest.err2.1242 + }; then2.1243 + ac_header_preproc=yes2.1244 +else2.1245 + $as_echo "$as_me: failed program was:" >&52.1246 +sed 's/^/| /' conftest.$ac_ext >&52.1247 +2.1248 + ac_header_preproc=no2.1249 +fi2.1250 +2.1251 +rm -f conftest.err conftest.$ac_ext2.1252 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&52.1253 +$as_echo "$ac_header_preproc" >&6; }2.1254 +2.1255 +# So? What about this header?2.1256 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in2.1257 + yes:no: )2.1258 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: accepted by the compiler, rejected by the preprocessor!" >&52.1259 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: accepted by the compiler, rejected by the preprocessor!" >&2;}2.1260 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: proceeding with the compiler's result" >&52.1261 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: proceeding with the compiler's result" >&2;}2.1262 + ac_header_preproc=yes2.1263 + ;;2.1264 + no:yes:* )2.1265 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: present but cannot be compiled" >&52.1266 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: present but cannot be compiled" >&2;}2.1267 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: check for missing prerequisite headers?" >&52.1268 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: check for missing prerequisite headers?" >&2;}2.1269 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: see the Autoconf documentation" >&52.1270 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: see the Autoconf documentation" >&2;}2.1271 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: section \"Present But Cannot Be Compiled\"" >&52.1272 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: section \"Present But Cannot Be Compiled\"" >&2;}2.1273 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: proceeding with the preprocessor's result" >&52.1274 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: proceeding with the preprocessor's result" >&2;}2.1275 + { $as_echo "$as_me:$LINENO: WARNING: lirc/lirc_client.h: in the future, the compiler will take precedence" >&52.1276 +$as_echo "$as_me: WARNING: lirc/lirc_client.h: in the future, the compiler will take precedence" >&2;}2.1277 +2.1278 + ;;2.1279 +esac2.1280 +{ $as_echo "$as_me:$LINENO: checking for lirc/lirc_client.h" >&52.1281 +$as_echo_n "checking for lirc/lirc_client.h... " >&6; }2.1282 +if test "${ac_cv_header_lirc_lirc_client_h+set}" = set; then2.1283 + $as_echo_n "(cached) " >&62.1284 +else2.1285 + ac_cv_header_lirc_lirc_client_h=$ac_header_preproc2.1286 +fi2.1287 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lirc_lirc_client_h" >&52.1288 +$as_echo "$ac_cv_header_lirc_lirc_client_h" >&6; }2.1289 +2.1290 +fi2.1291 +if test "x$ac_cv_header_lirc_lirc_client_h" = x""yes; then2.1292 +2.1293 + HAVE_LIRC_CLIENT_H=yes2.1294 +2.1295 +cat >>confdefs.h <<\_ACEOF2.1296 +#define HAVE_LIRC 12.1297 +_ACEOF2.1298 +2.1299 +else2.1300 + echo "LIRC support not found, building without it."2.1301 +fi2.1302 +2.1303 +2.1304 +fi2.1305 +2.1306 +2.1307 +if test "$HAVE_LIRC_CLIENT_H" = "yes"; then2.1308 + INPUT_LIRC_TRUE=2.1309 + INPUT_LIRC_FALSE='#'2.1310 +else2.1311 + INPUT_LIRC_TRUE='#'2.1312 + INPUT_LIRC_FALSE=2.1313 +fi2.1314 +2.1315 +2.1316 # Extract the first word of "sh-elf-gcc", so it can be a program name with args.2.1317 set dummy sh-elf-gcc; ac_word=$22.1318 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&52.1319 @@ -11467,8 +11635,9 @@2.1320 $as_echo "$ac_res" >&6; }2.1322 fi2.1323 -if test `eval 'as_val=${'$as_ac_Header'}2.1324 - $as_echo "$as_val"'` = yes; then2.1325 +as_val=`eval 'as_val=${'$as_ac_Header'}2.1326 + $as_echo "$as_val"'`2.1327 + if test "x$as_val" = x""yes; then2.1328 cat >>confdefs.h <<_ACEOF2.1329 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 12.1330 _ACEOF2.1331 @@ -11677,7 +11846,7 @@2.1332 $as_echo "$ac_cv_header_libintl_h" >&6; }2.1334 fi2.1335 -if test $ac_cv_header_libintl_h = yes; then2.1336 +if test "x$ac_cv_header_libintl_h" = x""yes; then2.1337 gt_cv_func_dgettext_libintl="no"2.1338 libintl_extra_libs=""2.1340 @@ -11896,8 +12065,9 @@2.1341 $as_echo "$as_val"'`2.1342 { $as_echo "$as_me:$LINENO: result: $ac_res" >&52.1343 $as_echo "$ac_res" >&6; }2.1344 -if test `eval 'as_val=${'$as_ac_var'}2.1345 - $as_echo "$as_val"'` = yes; then2.1346 +as_val=`eval 'as_val=${'$as_ac_var'}2.1347 + $as_echo "$as_val"'`2.1348 + if test "x$as_val" = x""yes; then2.1349 cat >>confdefs.h <<_ACEOF2.1350 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 12.1351 _ACEOF2.1352 @@ -11979,7 +12149,7 @@2.1353 fi2.1354 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&52.1355 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }2.1356 -if test $ac_cv_lib_intl_bindtextdomain = yes; then2.1357 +if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then2.1358 { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&52.1359 $as_echo_n "checking for ngettext in -lintl... " >&6; }2.1360 if test "${ac_cv_lib_intl_ngettext+set}" = set; then2.1361 @@ -12045,7 +12215,7 @@2.1362 fi2.1363 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&52.1364 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }2.1365 -if test $ac_cv_lib_intl_ngettext = yes; then2.1366 +if test "x$ac_cv_lib_intl_ngettext" = x""yes; then2.1367 { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&52.1368 $as_echo_n "checking for dgettext in -lintl... " >&6; }2.1369 if test "${ac_cv_lib_intl_dgettext+set}" = set; then2.1370 @@ -12111,7 +12281,7 @@2.1371 fi2.1372 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&52.1373 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }2.1374 -if test $ac_cv_lib_intl_dgettext = yes; then2.1375 +if test "x$ac_cv_lib_intl_dgettext" = x""yes; then2.1376 gt_cv_func_dgettext_libintl=yes2.1377 fi2.1379 @@ -12190,7 +12360,7 @@2.1380 fi2.1381 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&52.1382 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }2.1383 -if test $ac_cv_lib_intl_ngettext = yes; then2.1384 +if test "x$ac_cv_lib_intl_ngettext" = x""yes; then2.1385 { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&52.1386 $as_echo_n "checking for dcgettext in -lintl... " >&6; }2.1387 if test "${ac_cv_lib_intl_dcgettext+set}" = set; then2.1388 @@ -12256,7 +12426,7 @@2.1389 fi2.1390 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&52.1391 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }2.1392 -if test $ac_cv_lib_intl_dcgettext = yes; then2.1393 +if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then2.1394 gt_cv_func_dgettext_libintl=yes2.1395 libintl_extra_libs=-liconv2.1396 else2.1397 @@ -12369,8 +12539,9 @@2.1398 $as_echo "$as_val"'`2.1399 { $as_echo "$as_me:$LINENO: result: $ac_res" >&52.1400 $as_echo "$ac_res" >&6; }2.1401 -if test `eval 'as_val=${'$as_ac_var'}2.1402 - $as_echo "$as_val"'` = yes; then2.1403 +as_val=`eval 'as_val=${'$as_ac_var'}2.1404 + $as_echo "$as_val"'`2.1405 + if test "x$as_val" = x""yes; then2.1406 cat >>confdefs.h <<_ACEOF2.1407 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 12.1408 _ACEOF2.1409 @@ -12535,8 +12706,9 @@2.1410 $as_echo "$as_val"'`2.1411 { $as_echo "$as_me:$LINENO: result: $ac_res" >&52.1412 $as_echo "$ac_res" >&6; }2.1413 -if test `eval 'as_val=${'$as_ac_var'}2.1414 - $as_echo "$as_val"'` = yes; then2.1415 +as_val=`eval 'as_val=${'$as_ac_var'}2.1416 + $as_echo "$as_val"'`2.1417 + if test "x$as_val" = x""yes; then2.1418 cat >>confdefs.h <<_ACEOF2.1419 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 12.1420 _ACEOF2.1421 @@ -12780,7 +12952,7 @@2.1422 fi2.1423 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&52.1424 $as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }2.1425 -if test $ac_cv_func_bind_textdomain_codeset = yes; then2.1426 +if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then2.1427 CATOBJEXT=.gmo2.1428 DATADIRNAME=share2.1429 else2.1430 @@ -12942,8 +13114,8 @@2.1431 case $ac_val in #(2.1432 *${as_nl}*)2.1433 case $ac_var in #(2.1434 - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&52.1435 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;2.1436 + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&52.1437 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;2.1438 esac2.1439 case $ac_var in #(2.1440 _ | IFS | as_nl) ;; #(2.1441 @@ -13159,6 +13331,13 @@2.1442 Usually this means the macro was only invoked conditionally." >&2;}2.1443 { (exit 1); exit 1; }; }2.1444 fi2.1445 +if test -z "${INPUT_LIRC_TRUE}" && test -z "${INPUT_LIRC_FALSE}"; then2.1446 + { { $as_echo "$as_me:$LINENO: error: conditional \"INPUT_LIRC\" was never defined.2.1447 +Usually this means the macro was only invoked conditionally." >&52.1448 +$as_echo "$as_me: error: conditional \"INPUT_LIRC\" was never defined.2.1449 +Usually this means the macro was only invoked conditionally." >&2;}2.1450 + { (exit 1); exit 1; }; }2.1451 +fi2.1452 if test -z "${BUILD_SYSTEST_TRUE}" && test -z "${BUILD_SYSTEST_FALSE}"; then2.1453 { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_SYSTEST\" was never defined.2.1454 Usually this means the macro was only invoked conditionally." >&52.1455 @@ -13496,7 +13675,7 @@2.1456 # values after options handling.2.1457 ac_log="2.1458 This file was extended by $as_me, which was2.1459 -generated by GNU Autoconf 2.62. Invocation command line was2.1460 +generated by GNU Autoconf 2.63. Invocation command line was2.1462 CONFIG_FILES = $CONFIG_FILES2.1463 CONFIG_HEADERS = $CONFIG_HEADERS2.1464 @@ -13509,6 +13688,15 @@2.1466 _ACEOF2.1468 +case $ac_config_files in *"2.1469 +"*) set x $ac_config_files; shift; ac_config_files=$*;;2.1470 +esac2.1471 +2.1472 +case $ac_config_headers in *"2.1473 +"*) set x $ac_config_headers; shift; ac_config_headers=$*;;2.1474 +esac2.1475 +2.1476 +2.1477 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=12.1478 # Files that config.status was made for.2.1479 config_files="$ac_config_files"2.1480 @@ -13522,16 +13710,17 @@2.1481 \`$as_me' instantiates files from templates according to the2.1482 current configuration.2.1484 -Usage: $0 [OPTIONS] [FILE]...2.1485 +Usage: $0 [OPTION]... [FILE]...2.1487 -h, --help print this help, then exit2.1488 -V, --version print version number and configuration settings, then exit2.1489 - -q, --quiet do not print progress messages2.1490 + -q, --quiet, --silent2.1491 + do not print progress messages2.1492 -d, --debug don't remove temporary files2.1493 --recheck update $as_me by reconfiguring in the same conditions2.1494 - --file=FILE[:TEMPLATE]2.1495 + --file=FILE[:TEMPLATE]2.1496 instantiate the configuration file FILE2.1497 - --header=FILE[:TEMPLATE]2.1498 + --header=FILE[:TEMPLATE]2.1499 instantiate the configuration header FILE2.1501 Configuration files:2.1502 @@ -13549,7 +13738,7 @@2.1503 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=12.1504 ac_cs_version="\\2.1505 config.status2.1506 -configured by $0, generated by GNU Autoconf 2.62,2.1507 +configured by $0, generated by GNU Autoconf 2.63,2.1508 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"2.1510 Copyright (C) 2008 Free Software Foundation, Inc.2.1511 @@ -13760,7 +13949,8 @@2.1512 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}2.1513 { (exit 1); exit 1; }; }2.1515 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then2.1516 + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`2.1517 + if test $ac_delim_n = $ac_delim_num; then2.1518 break2.1519 elif $ac_last_try; then2.1520 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&52.1521 @@ -13965,9 +14155,9 @@2.1522 }2.1523 split(mac1, mac2, "(") #)2.1524 macro = mac2[1]2.1525 + prefix = substr(line, 1, index(line, defundef) - 1)2.1526 if (D_is_set[macro]) {2.1527 # Preserve the white space surrounding the "#".2.1528 - prefix = substr(line, 1, index(line, defundef) - 1)2.1529 print prefix "define", macro P[macro] D[macro]2.1530 next2.1531 } else {2.1532 @@ -13975,7 +14165,7 @@2.1533 # in the case of _POSIX_SOURCE, which is predefined and required2.1534 # on some systems where configure will not decide to define it.2.1535 if (defundef == "undef") {2.1536 - print "/*", line, "*/"2.1537 + print "/*", prefix defundef, macro, "*/"2.1538 next2.1539 }2.1540 }2.1541 @@ -13999,8 +14189,8 @@2.1542 esac2.1543 case $ac_mode$ac_tag in2.1544 :[FHL]*:*);;2.1545 - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&52.1546 -$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}2.1547 + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&52.1548 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}2.1549 { (exit 1); exit 1; }; };;2.1550 :[FH]-) ac_tag=-:-;;2.1551 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;2.1552 @@ -14488,8 +14678,8 @@2.1553 $ac_cs_success || { (exit 1); exit 1; }2.1554 fi2.1555 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then2.1556 - { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&52.1557 -$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}2.1558 + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&52.1559 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}2.1560 fi2.1562 { as_dir=test/sh42.1563 @@ -14570,5 +14760,11 @@2.1564 if test "x$CDROM_DRIVER" = "x"; then2.1565 echo " CD-ROM driver: none (no supported cd-rom devices found)"2.1566 else2.1567 - echo " CD-ROM driver: $CDROM_DRIVER"2.1568 -fi2.1569 + echo " CD-ROM driver: $CDROM_DRIVER"2.1570 +fi2.1571 +2.1572 +if test "x$HAVE_LIRC_CLIENT_H" = "x"; then2.1573 + echo " LIRC support: no"2.1574 +else2.1575 + echo " LIRC support: yes"2.1576 +fi
3.1 --- a/configure.in Sun May 24 08:30:35 2009 +00003.2 +++ b/configure.in Tue Jun 02 23:16:26 2009 +00003.3 @@ -319,6 +319,15 @@3.4 [ echo "Linux Joystick support not found, building without it."] )3.5 AM_CONDITIONAL(JOY_LINUX, [test "$HAVE_LINUX_JOYSTICK_H" = "yes"])3.7 +dnl Check for LIRC3.8 +if test "x$with_lirc" != "xno"; then3.9 + AC_CHECK_HEADER([lirc/lirc_client.h], [3.10 + HAVE_LIRC_CLIENT_H=yes3.11 + AC_DEFINE([HAVE_LIRC],1,[Have LIRC support]) ],3.12 + [ echo "LIRC support not found, building without it." ] )3.13 +fi3.14 +AM_CONDITIONAL(INPUT_LIRC, [test "$HAVE_LIRC_CLIENT_H" = "yes"])3.15 +3.16 dnl Check for cross-compiler availability - needed for system tests3.17 AC_PATH_PROG(SHCC, [sh-elf-gcc])3.18 AC_PATH_PROG(SHLD, [sh-elf-ld])3.19 @@ -399,5 +408,11 @@3.20 if test "x$CDROM_DRIVER" = "x"; then3.21 echo " CD-ROM driver: none (no supported cd-rom devices found)"3.22 else3.23 - echo " CD-ROM driver: $CDROM_DRIVER"3.24 + echo " CD-ROM driver: $CDROM_DRIVER"3.25 fi3.26 +3.27 +if test "x$HAVE_LIRC_CLIENT_H" = "x"; then3.28 + echo " LIRC support: no"3.29 +else3.30 + echo " LIRC support: yes"3.31 +fi
4.1 --- a/src/Makefile.am Sun May 24 08:30:35 2009 +00004.2 +++ b/src/Makefile.am Tue Jun 02 23:16:26 2009 +00004.3 @@ -62,7 +62,8 @@4.4 display.c display.h dckeysyms.h \4.5 drivers/audio_null.c drivers/video_null.c \4.6 drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \4.7 - sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in4.8 + sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \4.9 + hotkeys.c hotkeys.h4.12 if BUILD_SH4X864.13 @@ -89,7 +90,7 @@4.14 gtkui/gtk_win.c gtkui/gtkcb.c \4.15 gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \4.16 gtkui/gtk_ctrl.c gtkui/gtk_path.c gtkui/gtk_gd.c \4.17 - drivers/net_glib.c drivers/video_gtk.c4.18 + gtkui/gtk_hotkeys.c drivers/net_glib.c drivers/video_gtk.c4.19 endif4.21 if GUI_COCOA4.22 @@ -151,8 +152,12 @@4.23 lxdream_SOURCES += drivers/joy_linux.c drivers/joy_linux.h4.24 endif4.26 +if INPUT_LIRC4.27 +lxdream_SOURCES += drivers/input_lirc.c drivers/input_lirc.h4.28 +LIRC_LIBS = -llirc_client4.29 +endif4.31 -lxdream_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @PULSE_LIBS@ @ESOUND_LIBS@ @ALSA_LIBS@ @SDL_LIBS@ $(INTLLIBS)4.32 +lxdream_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @PULSE_LIBS@ @ESOUND_LIBS@ @ALSA_LIBS@ @SDL_LIBS@ $(INTLLIBS) $(LIRC_LIBS)4.34 gendec_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)4.35 genglsl_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
5.1 --- a/src/Makefile.in Sun May 24 08:30:35 2009 +00005.2 +++ b/src/Makefile.in Tue Jun 02 23:16:26 2009 +00005.3 @@ -52,7 +52,7 @@5.4 @GUI_GTK_TRUE@ gtkui/gtk_win.c gtkui/gtkcb.c \5.5 @GUI_GTK_TRUE@ gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \5.6 @GUI_GTK_TRUE@ gtkui/gtk_ctrl.c gtkui/gtk_path.c gtkui/gtk_gd.c \5.7 -@GUI_GTK_TRUE@ drivers/net_glib.c drivers/video_gtk.c5.8 +@GUI_GTK_TRUE@ gtkui/gtk_hotkeys.c drivers/net_glib.c drivers/video_gtk.c5.10 @GUI_COCOA_TRUE@am__append_4 = cocoaui/cocoaui.m cocoaui/cocoaui.h \5.11 @GUI_COCOA_TRUE@ cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \5.12 @@ -73,6 +73,7 @@5.13 @CDROM_OSX_TRUE@am__append_15 = drivers/cd_osx.c drivers/osx_iokit.m drivers/osx_iokit.h5.14 @CDROM_NONE_TRUE@am__append_16 = drivers/cd_none.c5.15 @JOY_LINUX_TRUE@am__append_17 = drivers/joy_linux.c drivers/joy_linux.h5.16 +@INPUT_LIRC_TRUE@am__append_18 = drivers/input_lirc.c drivers/input_lirc.h5.17 subdir = src5.18 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in5.19 ACLOCAL_M4 = $(top_srcdir)/aclocal.m45.20 @@ -122,27 +123,27 @@5.21 gdlist.c gdlist.h display.c display.h dckeysyms.h \5.22 drivers/audio_null.c drivers/video_null.c drivers/video_gl.c \5.23 drivers/video_gl.h drivers/gl_fbo.c sh4/sh4.def sh4/sh4core.in \5.24 - sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in sh4/sh4x86.c \5.25 - xlat/x86/x86op.h xlat/x86/ia32abi.h xlat/x86/amd64abi.h \5.26 - sh4/sh4trans.c sh4/sh4trans.h sh4/mmux86.c x86dasm/x86dasm.c \5.27 - x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \5.28 - x86dasm/dis-buf.c x86dasm/ansidecl.h x86dasm/bfd.h \5.29 - x86dasm/dis-asm.h x86dasm/symcat.h x86dasm/sysdep.h \5.30 - gtkui/gtkui.c gtkui/gtkui.h gtkui/gtk_win.c gtkui/gtkcb.c \5.31 - gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \5.32 - gtkui/gtk_ctrl.c gtkui/gtk_path.c gtkui/gtk_gd.c \5.33 - drivers/net_glib.c drivers/video_gtk.c cocoaui/cocoaui.m \5.34 - cocoaui/cocoaui.h cocoaui/cocoa_win.m cocoaui/cocoa_gd.m \5.35 - cocoaui/cocoa_prefs.m cocoaui/cocoa_path.m \5.36 - cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m drivers/net_osx.m \5.37 - drivers/video_osx.m drivers/mac_keymap.h \5.38 + sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in hotkeys.c \5.39 + hotkeys.h sh4/sh4x86.c xlat/x86/x86op.h xlat/x86/ia32abi.h \5.40 + xlat/x86/amd64abi.h sh4/sh4trans.c sh4/sh4trans.h sh4/mmux86.c \5.41 + x86dasm/x86dasm.c x86dasm/x86dasm.h x86dasm/i386-dis.c \5.42 + x86dasm/dis-init.c x86dasm/dis-buf.c x86dasm/ansidecl.h \5.43 + x86dasm/bfd.h x86dasm/dis-asm.h x86dasm/symcat.h \5.44 + x86dasm/sysdep.h gtkui/gtkui.c gtkui/gtkui.h gtkui/gtk_win.c \5.45 + gtkui/gtkcb.c gtkui/gtk_mmio.c gtkui/gtk_debug.c \5.46 + gtkui/gtk_dump.c gtkui/gtk_ctrl.c gtkui/gtk_path.c \5.47 + gtkui/gtk_gd.c gtkui/gtk_hotkeys.c drivers/net_glib.c \5.48 + drivers/video_gtk.c cocoaui/cocoaui.m cocoaui/cocoaui.h \5.49 + cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \5.50 + cocoaui/cocoa_path.m cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m \5.51 + drivers/net_osx.m drivers/video_osx.m drivers/mac_keymap.h \5.52 drivers/mac_keymap.txt paths_unix.c drivers/video_gdk.c \5.53 drivers/video_glx.c drivers/video_glx.h drivers/video_nsgl.m \5.54 drivers/video_nsgl.h drivers/audio_osx.m drivers/audio_sdl.c \5.55 drivers/audio_pulse.c drivers/audio_esd.c drivers/audio_alsa.c \5.56 drivers/cd_linux.c drivers/cd_osx.c drivers/osx_iokit.m \5.57 drivers/osx_iokit.h drivers/cd_none.c drivers/joy_linux.c \5.58 - drivers/joy_linux.h5.59 + drivers/joy_linux.h drivers/input_lirc.c drivers/input_lirc.h5.60 @BUILD_SH4X86_TRUE@am__objects_1 = sh4x86.$(OBJEXT) sh4trans.$(OBJEXT) \5.61 @BUILD_SH4X86_TRUE@ mmux86.$(OBJEXT) x86dasm.$(OBJEXT) \5.62 @BUILD_SH4X86_TRUE@ i386-dis.$(OBJEXT) dis-init.$(OBJEXT) \5.63 @@ -151,8 +152,8 @@5.64 @GUI_GTK_TRUE@ gtkcb.$(OBJEXT) gtk_mmio.$(OBJEXT) \5.65 @GUI_GTK_TRUE@ gtk_debug.$(OBJEXT) gtk_dump.$(OBJEXT) \5.66 @GUI_GTK_TRUE@ gtk_ctrl.$(OBJEXT) gtk_path.$(OBJEXT) \5.67 -@GUI_GTK_TRUE@ gtk_gd.$(OBJEXT) net_glib.$(OBJEXT) \5.68 -@GUI_GTK_TRUE@ video_gtk.$(OBJEXT)5.69 +@GUI_GTK_TRUE@ gtk_gd.$(OBJEXT) gtk_hotkeys.$(OBJEXT) \5.70 +@GUI_GTK_TRUE@ net_glib.$(OBJEXT) video_gtk.$(OBJEXT)5.71 @GUI_COCOA_TRUE@am__objects_3 = cocoaui.$(OBJEXT) cocoa_win.$(OBJEXT) \5.72 @GUI_COCOA_TRUE@ cocoa_gd.$(OBJEXT) cocoa_prefs.$(OBJEXT) \5.73 @GUI_COCOA_TRUE@ cocoa_path.$(OBJEXT) cocoa_ctrl.$(OBJEXT) \5.74 @@ -171,6 +172,7 @@5.75 @CDROM_OSX_TRUE@am__objects_14 = cd_osx.$(OBJEXT) osx_iokit.$(OBJEXT)5.76 @CDROM_NONE_TRUE@am__objects_15 = cd_none.$(OBJEXT)5.77 @JOY_LINUX_TRUE@am__objects_16 = joy_linux.$(OBJEXT)5.78 +@INPUT_LIRC_TRUE@am__objects_17 = input_lirc.$(OBJEXT)5.79 am_lxdream_OBJECTS = main.$(OBJEXT) version.$(OBJEXT) config.$(OBJEXT) \5.80 mem.$(OBJEXT) sdram.$(OBJEXT) watch.$(OBJEXT) asic.$(OBJEXT) \5.81 syscall.$(OBJEXT) bios.$(OBJEXT) dcload.$(OBJEXT) \5.82 @@ -192,14 +194,15 @@5.83 lightgun.$(OBJEXT) loader.$(OBJEXT) bootstrap.$(OBJEXT) \5.84 util.$(OBJEXT) gdlist.$(OBJEXT) display.$(OBJEXT) \5.85 audio_null.$(OBJEXT) video_null.$(OBJEXT) video_gl.$(OBJEXT) \5.86 - gl_fbo.$(OBJEXT) $(am__objects_1) $(am__objects_2) \5.87 - $(am__objects_3) $(am__objects_4) $(am__objects_5) \5.88 - $(am__objects_6) $(am__objects_7) $(am__objects_8) \5.89 - $(am__objects_9) $(am__objects_10) $(am__objects_11) \5.90 - $(am__objects_12) $(am__objects_13) $(am__objects_14) \5.91 - $(am__objects_15) $(am__objects_16)5.92 + gl_fbo.$(OBJEXT) hotkeys.$(OBJEXT) $(am__objects_1) \5.93 + $(am__objects_2) $(am__objects_3) $(am__objects_4) \5.94 + $(am__objects_5) $(am__objects_6) $(am__objects_7) \5.95 + $(am__objects_8) $(am__objects_9) $(am__objects_10) \5.96 + $(am__objects_11) $(am__objects_12) $(am__objects_13) \5.97 + $(am__objects_14) $(am__objects_15) $(am__objects_16) \5.98 + $(am__objects_17)5.99 lxdream_OBJECTS = $(am_lxdream_OBJECTS)5.100 -lxdream_DEPENDENCIES = $(am__DEPENDENCIES_1)5.101 +lxdream_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)5.102 am__test_testsh4x86_SOURCES_DIST = test/testsh4x86.c x86dasm/x86dasm.c \5.103 x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \5.104 x86dasm/dis-buf.c sh4/sh4trans.c sh4/sh4x86.c xlat/xltcache.c \5.105 @@ -303,6 +306,8 @@5.106 GUI_COCOA_TRUE = @GUI_COCOA_TRUE@5.107 GUI_GTK_FALSE = @GUI_GTK_FALSE@5.108 GUI_GTK_TRUE = @GUI_GTK_TRUE@5.109 +INPUT_LIRC_FALSE = @INPUT_LIRC_FALSE@5.110 +INPUT_LIRC_TRUE = @INPUT_LIRC_TRUE@5.111 INSTALL_DATA = @INSTALL_DATA@5.112 INSTALL_PROGRAM = @INSTALL_PROGRAM@5.113 INSTALL_SCRIPT = @INSTALL_SCRIPT@5.114 @@ -458,12 +463,13 @@5.115 gdlist.c gdlist.h display.c display.h dckeysyms.h \5.116 drivers/audio_null.c drivers/video_null.c drivers/video_gl.c \5.117 drivers/video_gl.h drivers/gl_fbo.c sh4/sh4.def sh4/sh4core.in \5.118 - sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in $(am__append_1) \5.119 - $(am__append_3) $(am__append_4) $(am__append_5) \5.120 - $(am__append_6) $(am__append_7) $(am__append_8) \5.121 - $(am__append_9) $(am__append_10) $(am__append_11) \5.122 - $(am__append_12) $(am__append_13) $(am__append_14) \5.123 - $(am__append_15) $(am__append_16) $(am__append_17)5.124 + sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in hotkeys.c \5.125 + hotkeys.h $(am__append_1) $(am__append_3) $(am__append_4) \5.126 + $(am__append_5) $(am__append_6) $(am__append_7) \5.127 + $(am__append_8) $(am__append_9) $(am__append_10) \5.128 + $(am__append_11) $(am__append_12) $(am__append_13) \5.129 + $(am__append_14) $(am__append_15) $(am__append_16) \5.130 + $(am__append_17) $(am__append_18)5.131 @BUILD_SH4X86_TRUE@test_testsh4x86_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@5.132 @BUILD_SH4X86_TRUE@test_testsh4x86_SOURCES = test/testsh4x86.c x86dasm/x86dasm.c \5.133 @BUILD_SH4X86_TRUE@ x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \5.134 @@ -471,7 +477,8 @@5.135 @BUILD_SH4X86_TRUE@ sh4/sh4trans.c sh4/sh4x86.c xlat/xltcache.c \5.136 @BUILD_SH4X86_TRUE@ xlat/xltcache.h mem.c util.c5.138 -lxdream_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @PULSE_LIBS@ @ESOUND_LIBS@ @ALSA_LIBS@ @SDL_LIBS@ $(INTLLIBS)5.139 +@INPUT_LIRC_TRUE@LIRC_LIBS = -llirc_client5.140 +lxdream_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @PULSE_LIBS@ @ESOUND_LIBS@ @ALSA_LIBS@ @SDL_LIBS@ $(INTLLIBS) $(LIRC_LIBS)5.141 gendec_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)5.142 genglsl_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)5.143 test_testxlt_SOURCES = test/testxlt.c xlat/xltcache.c xlat/xltcache.h5.144 @@ -615,13 +622,16 @@5.145 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_debug.Po@am__quote@5.146 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_dump.Po@am__quote@5.147 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_gd.Po@am__quote@5.148 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_hotkeys.Po@am__quote@5.149 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_mmio.Po@am__quote@5.150 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_path.Po@am__quote@5.151 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_win.Po@am__quote@5.152 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcb.Po@am__quote@5.153 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkui.Po@am__quote@5.154 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hotkeys.Po@am__quote@5.155 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-dis.Po@am__quote@5.156 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ide.Po@am__quote@5.157 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input_lirc.Po@am__quote@5.158 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/insparse.Po@am__quote@5.159 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intc.Po@am__quote@5.160 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/joy_linux.Po@am__quote@5.161 @@ -1644,6 +1654,20 @@5.162 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@5.163 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtk_gd.obj `if test -f 'gtkui/gtk_gd.c'; then $(CYGPATH_W) 'gtkui/gtk_gd.c'; else $(CYGPATH_W) '$(srcdir)/gtkui/gtk_gd.c'; fi`5.165 +gtk_hotkeys.o: gtkui/gtk_hotkeys.c5.166 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtk_hotkeys.o -MD -MP -MF "$(DEPDIR)/gtk_hotkeys.Tpo" -c -o gtk_hotkeys.o `test -f 'gtkui/gtk_hotkeys.c' || echo '$(srcdir)/'`gtkui/gtk_hotkeys.c; \5.167 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gtk_hotkeys.Tpo" "$(DEPDIR)/gtk_hotkeys.Po"; else rm -f "$(DEPDIR)/gtk_hotkeys.Tpo"; exit 1; fi5.168 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtkui/gtk_hotkeys.c' object='gtk_hotkeys.o' libtool=no @AMDEPBACKSLASH@5.169 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@5.170 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtk_hotkeys.o `test -f 'gtkui/gtk_hotkeys.c' || echo '$(srcdir)/'`gtkui/gtk_hotkeys.c5.171 +5.172 +gtk_hotkeys.obj: gtkui/gtk_hotkeys.c5.173 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gtk_hotkeys.obj -MD -MP -MF "$(DEPDIR)/gtk_hotkeys.Tpo" -c -o gtk_hotkeys.obj `if test -f 'gtkui/gtk_hotkeys.c'; then $(CYGPATH_W) 'gtkui/gtk_hotkeys.c'; else $(CYGPATH_W) '$(srcdir)/gtkui/gtk_hotkeys.c'; fi`; \5.174 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gtk_hotkeys.Tpo" "$(DEPDIR)/gtk_hotkeys.Po"; else rm -f "$(DEPDIR)/gtk_hotkeys.Tpo"; exit 1; fi5.175 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtkui/gtk_hotkeys.c' object='gtk_hotkeys.obj' libtool=no @AMDEPBACKSLASH@5.176 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@5.177 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gtk_hotkeys.obj `if test -f 'gtkui/gtk_hotkeys.c'; then $(CYGPATH_W) 'gtkui/gtk_hotkeys.c'; else $(CYGPATH_W) '$(srcdir)/gtkui/gtk_hotkeys.c'; fi`5.178 +5.179 net_glib.o: drivers/net_glib.c5.180 @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net_glib.o -MD -MP -MF "$(DEPDIR)/net_glib.Tpo" -c -o net_glib.o `test -f 'drivers/net_glib.c' || echo '$(srcdir)/'`drivers/net_glib.c; \5.181 @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/net_glib.Tpo" "$(DEPDIR)/net_glib.Po"; else rm -f "$(DEPDIR)/net_glib.Tpo"; exit 1; fi5.182 @@ -1812,6 +1836,20 @@5.183 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@5.184 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o joy_linux.obj `if test -f 'drivers/joy_linux.c'; then $(CYGPATH_W) 'drivers/joy_linux.c'; else $(CYGPATH_W) '$(srcdir)/drivers/joy_linux.c'; fi`5.186 +input_lirc.o: drivers/input_lirc.c5.187 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT input_lirc.o -MD -MP -MF "$(DEPDIR)/input_lirc.Tpo" -c -o input_lirc.o `test -f 'drivers/input_lirc.c' || echo '$(srcdir)/'`drivers/input_lirc.c; \5.188 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/input_lirc.Tpo" "$(DEPDIR)/input_lirc.Po"; else rm -f "$(DEPDIR)/input_lirc.Tpo"; exit 1; fi5.189 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drivers/input_lirc.c' object='input_lirc.o' libtool=no @AMDEPBACKSLASH@5.190 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@5.191 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o input_lirc.o `test -f 'drivers/input_lirc.c' || echo '$(srcdir)/'`drivers/input_lirc.c5.192 +5.193 +input_lirc.obj: drivers/input_lirc.c5.194 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT input_lirc.obj -MD -MP -MF "$(DEPDIR)/input_lirc.Tpo" -c -o input_lirc.obj `if test -f 'drivers/input_lirc.c'; then $(CYGPATH_W) 'drivers/input_lirc.c'; else $(CYGPATH_W) '$(srcdir)/drivers/input_lirc.c'; fi`; \5.195 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/input_lirc.Tpo" "$(DEPDIR)/input_lirc.Po"; else rm -f "$(DEPDIR)/input_lirc.Tpo"; exit 1; fi5.196 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drivers/input_lirc.c' object='input_lirc.obj' libtool=no @AMDEPBACKSLASH@5.197 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@5.198 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o input_lirc.obj `if test -f 'drivers/input_lirc.c'; then $(CYGPATH_W) 'drivers/input_lirc.c'; else $(CYGPATH_W) '$(srcdir)/drivers/input_lirc.c'; fi`5.199 +5.200 testsh4x86.o: test/testsh4x86.c5.201 @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testsh4x86.o -MD -MP -MF "$(DEPDIR)/testsh4x86.Tpo" -c -o testsh4x86.o `test -f 'test/testsh4x86.c' || echo '$(srcdir)/'`test/testsh4x86.c; \5.202 @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/testsh4x86.Tpo" "$(DEPDIR)/testsh4x86.Po"; else rm -f "$(DEPDIR)/testsh4x86.Tpo"; exit 1; fi
6.1 --- a/src/cocoaui/cocoaui.m Sun May 24 08:30:35 2009 +00006.2 +++ b/src/cocoaui/cocoaui.m Tue Jun 02 23:16:26 2009 +00006.3 @@ -179,7 +179,7 @@6.4 {6.5 if( cocoa_gui_autorun ) {6.6 cocoa_gui_autorun = NO;6.7 - cocoa_gui_run_later();6.8 + gui_run_later();6.9 }6.10 }6.11 - (void)windowDidBecomeKey: (NSNotification *)notice6.12 @@ -196,7 +196,7 @@6.13 const gchar *cname = [filename UTF8String];6.14 if( file_load_magic(cname) ) {6.15 // Queue up a run event6.16 - cocoa_gui_run_later();6.17 + gui_run_later();6.18 return YES;6.19 } else {6.20 return NO;6.21 @@ -274,7 +274,7 @@6.22 - (void) run_action: (id)sender6.23 {6.24 if( !dreamcast_is_running() ) {6.25 - cocoa_gui_run_later();6.26 + gui_run_later();6.27 }6.28 }6.29 - (void) run_immediate6.30 @@ -301,7 +301,7 @@6.31 return TRUE;6.32 }6.34 -gboolean gui_init( gboolean withDebug )6.35 +gboolean gui_init( gboolean withDebug, gboolean withFullscreen )6.36 {6.37 dreamcast_register_module( &cocoa_gui_module );6.39 @@ -435,7 +435,7 @@6.40 /**6.41 * Queue a dreamcast_run() to execute after the currently event(s)6.42 */6.43 -void cocoa_gui_run_later( void )6.44 +void gui_run_later( void )6.45 {6.46 [[NSRunLoop currentRunLoop] performSelector: @selector(run_immediate)6.47 target: [NSApp delegate] argument: nil order: 1
7.1 --- a/src/config.c Sun May 24 08:30:35 2009 +00007.2 +++ b/src/config.c Tue Jun 02 23:16:26 2009 +00007.3 @@ -29,6 +29,7 @@7.6 extern struct lxdream_config_entry alsa_config[];7.7 +extern struct lxdream_config_entry hotkeys_config[];7.9 gboolean lxdream_load_config_file( const gchar *filename );7.10 gboolean lxdream_save_config_file( const gchar *filename );7.11 @@ -52,6 +53,7 @@7.12 struct lxdream_config_group lxdream_config_root[] =7.13 {{ "global", global_config },7.14 { "controllers", NULL },7.15 + { "hotkeys", hotkeys_config },7.16 { "serial", serial_config },7.17 #ifdef HAVE_ALSA7.18 { "alsa", alsa_config },
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00008.2 +++ b/src/drivers/input_lirc.c Tue Jun 02 23:16:26 2009 +00008.3 @@ -0,0 +1,156 @@8.4 +/**8.5 + * $Id: $8.6 + *8.7 + * LIRC input device support8.8 + *8.9 + * Copyright (c) 2009 wahrhaft8.10 + *8.11 + * This program is free software; you can redistribute it and/or modify8.12 + * it under the terms of the GNU General Public License as published by8.13 + * the Free Software Foundation; either version 2 of the License, or8.14 + * (at your option) any later version.8.15 + *8.16 + * This program is distributed in the hope that it will be useful,8.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of8.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the8.19 + * GNU General Public License for more details.8.20 + */8.21 +8.22 +#ifndef _GNU_SOURCE8.23 +#define _GNU_SOURCE8.24 +#endif8.25 +#include <sys/types.h>8.26 +#include <sys/ioctl.h>8.27 +#include <errno.h>8.28 +#include <stdio.h>8.29 +#include <signal.h>8.30 +#include <string.h>8.31 +#include <stdlib.h>8.32 +#include <unistd.h>8.33 +#include <fcntl.h>8.34 +#include <dirent.h>8.35 +#include <ctype.h>8.36 +8.37 +#include <glib/giochannel.h>8.38 +#include <glib.h>8.39 +8.40 +#include <lirc/lirc_client.h>8.41 +8.42 +#include "lxdream.h"8.43 +#include "display.h"8.44 +#include "maple/maple.h"8.45 +#include "drivers/input_lirc.h"8.46 +8.47 +typedef struct input_lirc {8.48 + struct input_driver driver;8.49 + char name[5];8.50 + int fd;8.51 + GIOChannel *channel;8.52 +} *input_lirc_t;8.53 +8.54 +#define MAX_KEYSYMS 2568.55 +static char *keysyms[MAX_KEYSYMS];8.56 +8.57 +static uint16_t input_lirc_resolve_keysym( input_driver_t dev, const gchar *str );8.58 +static gchar *input_lirc_keysym_for_keycode( input_driver_t dev, uint16_t keycode );8.59 +static gboolean input_lirc_callback( GIOChannel *source, GIOCondition condition, gpointer data );8.60 +8.61 +input_driver_t system_lirc_driver;8.62 +8.63 +void input_lirc_create()8.64 +{8.65 + input_lirc_t system_lirc_driver = g_malloc0(sizeof(struct input_lirc));8.66 + strcpy(system_lirc_driver->name, "LIRC");8.67 + system_lirc_driver->driver.id = system_lirc_driver->name;8.68 + system_lirc_driver->driver.resolve_keysym = input_lirc_resolve_keysym;8.69 + system_lirc_driver->driver.get_keysym_for_keycode = input_lirc_keysym_for_keycode;8.70 + system_lirc_driver->driver.destroy = NULL;8.71 +8.72 + system_lirc_driver->fd = lirc_init("lxdream", 1);8.73 + if (system_lirc_driver->fd == -1) {8.74 + WARN("Could not initialize LIRC. LIRC hotkeys will be disabled.");8.75 + return;8.76 + }8.77 +8.78 + system_lirc_driver->channel = g_io_channel_unix_new(system_lirc_driver->fd);8.79 + g_io_channel_set_flags(system_lirc_driver->channel, G_IO_FLAG_IS_READABLE | G_IO_FLAG_NONBLOCK, NULL);8.80 + g_io_add_watch(system_lirc_driver->channel, G_IO_IN|G_IO_ERR|G_IO_HUP, input_lirc_callback, system_lirc_driver);8.81 + memset(keysyms, 0, MAX_KEYSYMS);8.82 + input_register_device((input_driver_t)system_lirc_driver, MAX_KEYSYMS - 1);8.83 + INFO("LIRC initialized");8.84 +}8.85 +8.86 +void input_lirc_shutdown(void)8.87 +{8.88 + input_lirc_t lirc = (input_lirc_t)system_lirc_driver;8.89 + g_io_channel_shutdown(lirc->channel, FALSE, NULL );8.90 + g_io_channel_unref(lirc->channel);8.91 + lirc_deinit();8.92 + g_free(system_lirc_driver);8.93 +}8.94 +8.95 +static uint16_t input_lirc_resolve_keysym( input_driver_t dev, const gchar *str )8.96 +{8.97 + //LIRC uses keysyms but no keycodes. To generate a keycode, we'll just make them up as we go.8.98 + //As long as we store keysyms instead of keycodes in any config files, this should be fine.8.99 + uint16_t i;8.100 + for (i = 1; i < MAX_KEYSYMS && keysyms[i] != NULL; i++) {8.101 + if (strcasecmp(str, keysyms[i]) == 0) {8.102 + //keycode already exists8.103 + return i;8.104 + }8.105 + }8.106 +8.107 + if (i < MAX_KEYSYMS) {8.108 + //this key is not in the list yet, so make a new keycode for it8.109 + keysyms[i] = g_strdup(str);8.110 + return i;8.111 + } else {8.112 + //if your remote has more than 256 buttons, you may need to increase MAX_KEYSYMS8.113 + ERROR("LIRC has too many keysyms!");8.114 + return 0;8.115 + }8.116 +}8.117 +8.118 +static gchar *input_lirc_keysym_for_keycode( input_driver_t dev, uint16_t keycode )8.119 +{8.120 + //This won't work if you send in keycodes that haven't been fired by the callback8.121 + //or looked up using resolve_keysym yet. This shouldn't be a problem, since these8.122 + //two functions are the only way to get a keycode in the first place.8.123 +8.124 + if (keycode < MAX_KEYSYMS)8.125 + return g_strdup(keysyms[keycode]);8.126 + else8.127 + return NULL;8.128 +}8.129 +8.130 +gboolean input_lirc_callback( GIOChannel *source, GIOCondition condition, gpointer data )8.131 +{8.132 + int ret;8.133 + char *code, *c;8.134 + char keysym[256];8.135 +8.136 + input_lirc_t lirc = (input_lirc_t)data;8.137 +8.138 + if (condition & G_IO_IN)8.139 + {8.140 + //loop through all queued commands8.141 + while ((ret = lirc_nextcode(&code)) == 0 && code != NULL)8.142 + {8.143 + INFO("LIRC code (%s)", code);8.144 + //code contains id, repeat count, and keysym separated by spaces8.145 + gchar **code_split = g_strsplit(code, " ", 4);8.146 +8.147 + //eliminate repeats by only accepting the first instance of a keysym8.148 + if (atoi(code_split[1]) == 0)8.149 + {8.150 + input_event_keydown((input_driver_t)lirc, input_lirc_resolve_keysym((input_driver_t)lirc, code_split[2]), MAX_PRESSURE);8.151 + }8.152 +8.153 + g_strfreev(code_split);8.154 + free(code);8.155 + }8.156 + }8.157 + return TRUE;8.158 +}8.159 +
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00009.2 +++ b/src/drivers/input_lirc.h Tue Jun 02 23:16:26 2009 +00009.3 @@ -0,0 +1,39 @@9.4 +/**9.5 + * $Id: $9.6 + *9.7 + * LIRC input device support9.8 + *9.9 + * Copyright (c) 2009 wahrhaft9.10 + *9.11 + * This program is free software; you can redistribute it and/or modify9.12 + * it under the terms of the GNU General Public License as published by9.13 + * the Free Software Foundation; either version 2 of the License, or9.14 + * (at your option) any later version.9.15 + *9.16 + * This program is distributed in the hope that it will be useful,9.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of9.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9.19 + * GNU General Public License for more details.9.20 + */9.21 +9.22 +#ifndef lxdream_input_lirc_H9.23 +#define lxdream_input_lirc_H9.24 +9.25 +#ifdef __cplusplus9.26 +extern "C" {9.27 +#endif9.28 +/**9.29 + * Initialize LIRC9.30 + */9.31 +void input_lirc_create();9.32 +9.33 +/**9.34 + * Shutdown LIRC9.35 + */9.36 +void input_lirc_shutdown();9.37 +9.38 +#ifdef __cplusplus9.39 +}9.40 +#endif9.41 +9.42 +#endif /* !lxdream_input_lirc_H */
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000010.2 +++ b/src/gtkui/gtk_hotkeys.c Tue Jun 02 23:16:26 2009 +000010.3 @@ -0,0 +1,187 @@10.4 +/**10.5 + * $Id: $10.6 + *10.7 + * GTK dialog for defining hotkeys10.8 + *10.9 + * Copyright (c) 2009 wahrhaft.10.10 + *10.11 + * This program is free software; you can redistribute it and/or modify10.12 + * it under the terms of the GNU General Public License as published by10.13 + * the Free Software Foundation; either version 2 of the License, or10.14 + * (at your option) any later version.10.15 + *10.16 + * This program is distributed in the hope that it will be useful,10.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of10.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10.19 + * GNU General Public License for more details.10.20 + */10.21 +10.22 +#include <assert.h>10.23 +#include <string.h>10.24 +#include <gtk/gtk.h>10.25 +#include <gdk/gdkkeysyms.h>10.26 +10.27 +#include "lxdream.h"10.28 +#include "display.h"10.29 +#include "gtkui/gtkui.h"10.30 +#include "hotkeys.h"10.31 +10.32 +10.33 +10.34 +static void config_keysym_hook( void *data, const gchar *keysym )10.35 +{10.36 + GtkWidget *widget = (GtkWidget *)data;10.37 + gtk_entry_set_text( GTK_ENTRY(widget), keysym );10.38 + g_object_set_data( G_OBJECT(widget), "keypress_mode", GINT_TO_POINTER(FALSE) );10.39 + input_set_keysym_hook(NULL, NULL);10.40 +}10.41 +10.42 +static gboolean config_key_buttonpress( GtkWidget *widget, GdkEventButton *event, gpointer user_data )10.43 +{10.44 + gboolean keypress_mode = GPOINTER_TO_INT(g_object_get_data( G_OBJECT(widget), "keypress_mode"));10.45 + if( keypress_mode ) {10.46 + gchar *keysym = input_keycode_to_keysym( &system_mouse_driver, event->button);10.47 + if( keysym != NULL ) {10.48 + config_keysym_hook( widget, keysym );10.49 + g_free(keysym);10.50 + }10.51 + return TRUE;10.52 + } else {10.53 + gtk_entry_set_text( GTK_ENTRY(widget), _("<press key>") );10.54 + g_object_set_data( G_OBJECT(widget), "keypress_mode", GINT_TO_POINTER(TRUE) );10.55 + input_set_keysym_hook(config_keysym_hook, widget);10.56 + }10.57 + return FALSE;10.58 +}10.59 +10.60 +static gboolean config_key_keypress( GtkWidget *widget, GdkEventKey *event, gpointer user_data )10.61 +{10.62 + gboolean keypress_mode = GPOINTER_TO_INT(g_object_get_data( G_OBJECT(widget), "keypress_mode"));10.63 + if( keypress_mode ) {10.64 + if( event->keyval == GDK_Escape ) {10.65 + gtk_entry_set_text( GTK_ENTRY(widget), "" );10.66 + g_object_set_data( G_OBJECT(widget), "keypress_mode", GINT_TO_POINTER(FALSE) );10.67 + return TRUE;10.68 + }10.69 + GdkKeymap *keymap = gdk_keymap_get_default();10.70 + guint keyval;10.71 +10.72 + gdk_keymap_translate_keyboard_state( keymap, event->hardware_keycode, 0, 0, &keyval,10.73 + NULL, NULL, NULL );10.74 + gtk_entry_set_text( GTK_ENTRY(widget), gdk_keyval_name(keyval) );10.75 + g_object_set_data( G_OBJECT(widget), "keypress_mode", GINT_TO_POINTER(FALSE) );10.76 + input_set_keysym_hook(NULL, NULL);10.77 + return TRUE;10.78 + } else {10.79 + switch( event->keyval ) {10.80 + case GDK_Return:10.81 + case GDK_KP_Enter:10.82 + gtk_entry_set_text( GTK_ENTRY(widget), _("<press key>") );10.83 + g_object_set_data( G_OBJECT(widget), "keypress_mode", GINT_TO_POINTER(TRUE) );10.84 + input_set_keysym_hook(config_keysym_hook, widget);10.85 + return TRUE;10.86 + case GDK_BackSpace:10.87 + case GDK_Delete:10.88 + gtk_entry_set_text( GTK_ENTRY(widget), "" );10.89 + return TRUE;10.90 + }10.91 + return FALSE;10.92 + }10.93 +10.94 +}10.95 +10.96 +void hotkeys_dialog_done( GtkWidget *panel, gboolean isOK )10.97 +{10.98 + if( isOK ) {10.99 + hotkeys_unregister_keys();10.100 + lxdream_config_entry_t conf = hotkeys_get_config();10.101 + int i;10.102 + for( i=0; conf[i].key != NULL; i++ ) {10.103 + char buf[64];10.104 + GtkWidget *entry1, *entry2;10.105 + const gchar *key1, *key2;10.106 + snprintf( buf, sizeof(buf), "%s.1", conf[i].key );10.107 + entry1 = GTK_WIDGET(g_object_get_qdata( G_OBJECT(panel), g_quark_from_string(buf)));10.108 + key1 = gtk_entry_get_text(GTK_ENTRY(entry1));10.109 + snprintf( buf, sizeof(buf), "%s.2", conf[i].key );10.110 + entry2 = GTK_WIDGET(g_object_get_qdata( G_OBJECT(panel), g_quark_from_string(buf)));10.111 + key2 = gtk_entry_get_text(GTK_ENTRY(entry2));10.112 + if( key1 == NULL || key1[0] == '\0') {10.113 + lxdream_set_config_value( &conf[i], key2 );10.114 + } else if( key2 == NULL || key2[0] == '\0') {10.115 + lxdream_set_config_value( &conf[i], key1 );10.116 + } else {10.117 + char buf[64];10.118 + snprintf( buf, sizeof(buf), "%s, %s", key1, key2 );10.119 + lxdream_set_config_value( &conf[i], buf );10.120 + }10.121 + }10.122 + lxdream_save_config();10.123 + hotkeys_register_keys();10.124 + }10.125 +}10.126 +10.127 +GtkWidget *hotkeys_panel_new()10.128 +{10.129 + lxdream_config_entry_t conf = hotkeys_get_config();10.130 + int count, i;10.131 + for( count=0; conf[count].key != NULL; count++ );10.132 +10.133 + GtkWidget *table = gtk_table_new( (count+1)>>1, 6, FALSE );10.134 + GList *focus_chain = NULL;10.135 + //gtk_object_set_data( GTK_OBJECT(table), "maple_device", device );10.136 + for( i=0; i<count; i++ ) {10.137 + GtkWidget *text, *text2;10.138 + char buf[64];10.139 + int x=0;10.140 + int y=i;10.141 + if( i >= (count+1)>>1 ) {10.142 + x = 3;10.143 + y -= (count+1)>>1;10.144 + }10.145 + gtk_table_attach( GTK_TABLE(table), gtk_label_new(gettext(conf[i].label)), x, x+1, y, y+1,10.146 + GTK_SHRINK, GTK_SHRINK, 0, 0 );10.147 + text = gtk_entry_new();10.148 + gtk_entry_set_width_chars( GTK_ENTRY(text), 11 );10.149 + gtk_entry_set_editable( GTK_ENTRY(text), FALSE );10.150 + g_signal_connect( text, "key_press_event",10.151 + G_CALLBACK(config_key_keypress), NULL );10.152 + g_signal_connect( text, "button_press_event",10.153 + G_CALLBACK(config_key_buttonpress), NULL );10.154 + snprintf( buf, sizeof(buf), "%s.1", conf[i].key );10.155 + g_object_set_data( G_OBJECT(text), "keypress_mode", GINT_TO_POINTER(FALSE) );10.156 + g_object_set_qdata( G_OBJECT(table), g_quark_from_string(buf), text );10.157 + gtk_table_attach_defaults( GTK_TABLE(table), text, x+1, x+2, y, y+1);10.158 + focus_chain = g_list_append( focus_chain, text );10.159 + text2 = gtk_entry_new();10.160 + gtk_entry_set_width_chars( GTK_ENTRY(text2), 11 );10.161 + gtk_entry_set_editable( GTK_ENTRY(text2), FALSE );10.162 + g_signal_connect( text2, "key_press_event",10.163 + G_CALLBACK(config_key_keypress), NULL );10.164 + g_signal_connect( text2, "button_press_event",10.165 + G_CALLBACK(config_key_buttonpress), NULL );10.166 + snprintf( buf, sizeof(buf), "%s.2", conf[i].key );10.167 + g_object_set_data( G_OBJECT(text2), "keypress_mode", GINT_TO_POINTER(FALSE) );10.168 + g_object_set_qdata( G_OBJECT(table), g_quark_from_string(buf), text2 );10.169 + gtk_table_attach_defaults( GTK_TABLE(table), text2, x+2, x+3, y, y+1);10.170 + focus_chain = g_list_append( focus_chain, text2 );10.171 + if( conf[i].value != NULL ) {10.172 + gchar **parts = g_strsplit(conf[i].value,",",3);10.173 + if( parts[0] != NULL ) {10.174 + gtk_entry_set_text( GTK_ENTRY(text), g_strstrip(parts[0]) );10.175 + if( parts[1] != NULL ) {10.176 + gtk_entry_set_text( GTK_ENTRY(text2), g_strstrip(parts[1]) );10.177 + }10.178 + }10.179 + g_strfreev(parts);10.180 + }10.181 + }10.182 + gtk_container_set_focus_chain( GTK_CONTAINER(table), focus_chain );10.183 +10.184 + return table;10.185 +}10.186 +10.187 +void hotkeys_dialog_run( )10.188 +{10.189 + gtk_gui_run_property_dialog( _("Hotkey Settings"), hotkeys_panel_new(), hotkeys_dialog_done );10.190 +}
11.1 --- a/src/gtkui/gtk_win.c Sun May 24 08:30:35 2009 +000011.2 +++ b/src/gtkui/gtk_win.c Tue Jun 02 23:16:26 2009 +000011.3 @@ -248,26 +248,31 @@11.4 main_window_t win = (main_window_t)userdata;11.5 if( state->changed_mask & GDK_WINDOW_STATE_FULLSCREEN ) {11.6 gboolean fs = (state->new_window_state & GDK_WINDOW_STATE_FULLSCREEN);11.7 - GtkWidget *frame = gtk_widget_get_parent(win->video);11.8 - if( frame->style == NULL ) {11.9 - gtk_widget_set_style( frame, gtk_style_new() );11.10 - }11.11 - if( fs ) {11.12 - gtk_widget_hide( win->menubar );11.13 - gtk_widget_hide( win->toolbar );11.14 - gtk_widget_hide( win->statusbar );11.15 + main_window_show_gui(win, fs);11.16 + }11.17 +}11.19 - frame->style->xthickness = 0;11.20 - frame->style->ythickness = 0;11.21 - } else {11.22 - frame->style->xthickness = 2;11.23 - frame->style->ythickness = 2;11.24 - gtk_widget_show( win->menubar );11.25 - gtk_widget_show( win->toolbar );11.26 - gtk_widget_show( win->statusbar );11.27 - }11.28 - gtk_widget_queue_draw( win->window );11.29 +void main_window_show_gui(main_window_t win, gboolean fullscreen)11.30 +{11.31 + GtkWidget *frame = gtk_widget_get_parent(win->video);11.32 + if( frame->style == NULL ) {11.33 + gtk_widget_set_style( frame, gtk_style_new() );11.34 }11.35 + if( fullscreen ) {11.36 + gtk_widget_hide( win->menubar );11.37 + gtk_widget_hide( win->toolbar );11.38 + gtk_widget_hide( win->statusbar );11.39 +11.40 + frame->style->xthickness = 0;11.41 + frame->style->ythickness = 0;11.42 + } else {11.43 + frame->style->xthickness = 2;11.44 + frame->style->ythickness = 2;11.45 + gtk_widget_show( win->menubar );11.46 + gtk_widget_show( win->toolbar );11.47 + gtk_widget_show( win->statusbar );11.48 + }11.49 + gtk_widget_queue_draw( win->window );11.50 }11.52 main_window_t main_window_new( const gchar *title, GtkWidget *menubar, GtkWidget *toolbar,
12.1 --- a/src/gtkui/gtkcb.c Sun May 24 08:30:35 2009 +000012.2 +++ b/src/gtkui/gtkcb.c Tue Jun 02 23:16:26 2009 +000012.3 @@ -216,6 +216,11 @@12.4 {12.5 }12.7 +void hotkey_settings_callback( GtkAction *action, gpointer user_data)12.8 +{12.9 + hotkeys_dialog_run();12.10 +}12.11 +12.12 void fullscreen_toggle_callback( GtkToggleAction *action, gpointer user_data)12.13 {12.14 main_window_set_fullscreen(gtk_gui_get_main(), gtk_toggle_action_get_active(action));
13.1 --- a/src/gtkui/gtkui.c Sun May 24 08:30:35 2009 +000013.2 +++ b/src/gtkui/gtkui.c Tue Jun 02 23:16:26 2009 +000013.3 @@ -85,6 +85,7 @@13.4 { "ControllerSettings", NULL, N_("_Controllers..."), NULL, N_("Configure controllers"), G_CALLBACK(maple_settings_callback) },13.5 { "NetworkSettings", NULL, N_("_Network..."), NULL, N_("Configure network settings"), G_CALLBACK(network_settings_callback) },13.6 { "VideoSettings", NULL, N_("_Video..."), NULL,N_( "Configure video output"), G_CALLBACK(video_settings_callback) },13.7 + { "HotkeySettings", NULL, N_("_Hotkeys..."), NULL,N_( "Configure hotkeys"), G_CALLBACK(hotkey_settings_callback) },13.8 { "About", GTK_STOCK_ABOUT, N_("_About..."), NULL, N_("About lxdream"), G_CALLBACK(about_action_callback) },13.9 { "DebugMenu", NULL, N_("_Debug") },13.10 { "Debugger", NULL, N_("_Debugger"), NULL, N_("Open debugger window"), G_CALLBACK(debugger_action_callback) },13.11 @@ -123,6 +124,7 @@13.12 " <menuitem action='ControllerSettings'/>"13.13 " <menuitem action='NetworkSettings'/>"13.14 " <menuitem action='VideoSettings'/>"13.15 + " <menuitem action='HotkeySettings'/>"13.16 " <separator/>"13.17 " <menuitem action='FullScreen'/>"13.18 " </menu>"13.19 @@ -167,6 +169,7 @@13.20 " <menuitem action='ControllerSettings'/>"13.21 " <menuitem action='NetworkSettings'/>"13.22 " <menuitem action='VideoSettings'/>"13.23 + " <menuitem action='HotkeySettings'/>"13.24 " <separator/>"13.25 " <menuitem action='FullScreen'/>"13.26 " </menu>"13.27 @@ -201,7 +204,7 @@13.28 return TRUE;13.29 }13.31 -gboolean gui_init( gboolean withDebug )13.32 +gboolean gui_init( gboolean withDebug, gboolean withFullscreen )13.33 {13.34 if( gtk_gui_init_ok ) {13.35 GError *error = NULL;13.36 @@ -236,6 +239,13 @@13.37 if( withDebug ) {13.38 gtk_gui_show_debugger();13.39 }13.40 +13.41 + if (withFullscreen) {13.42 + main_window_set_fullscreen(main_win, TRUE);13.43 + //manually call full-screen state code for non-compliant window managers13.44 + main_window_show_gui(main_win, TRUE);13.45 + }13.46 +13.47 register_gdrom_disc_change_hook( gtk_gui_disc_changed, NULL );13.49 return TRUE;13.50 @@ -265,7 +275,7 @@13.51 if( main_win != NULL ) {13.52 main_window_set_use_grab(main_win, flag);13.53 }13.54 -}13.55 +}13.57 gboolean gui_error_dialog( const char *msg, ... )13.58 {13.59 @@ -291,6 +301,17 @@13.61 }13.63 +static gboolean gtk_run_later_callback( gpointer unused )13.64 +{13.65 + dreamcast_run();13.66 + return FALSE;13.67 +}13.68 +13.69 +void gui_run_later(void)13.70 +{13.71 + g_timeout_add_seconds(0, gtk_run_later_callback, NULL);13.72 +}13.73 +13.74 void gtk_gui_show_debugger()13.75 {13.76 if( debug_win ) {
14.1 --- a/src/gtkui/gtkui.h Sun May 24 08:30:35 2009 +000014.2 +++ b/src/gtkui/gtkui.h Tue Jun 02 23:16:26 2009 +000014.3 @@ -50,6 +50,7 @@14.4 void main_window_set_fullscreen( main_window_t win, gboolean fullscreen );14.5 void main_window_set_use_grab( main_window_t win, gboolean grab );14.6 void main_window_update_title( main_window_t win );14.7 +void main_window_show_gui( main_window_t win, gboolean fullscreen );14.9 debug_window_t debug_window_new( const gchar *title, GtkWidget *menubar,14.10 GtkWidget *toolbar, GtkAccelGroup *accel );14.11 @@ -70,6 +71,7 @@14.13 void maple_dialog_run();14.14 void path_dialog_run();14.15 +void hotkeys_dialog_run();14.17 void gtk_gui_update( void );14.18 main_window_t gtk_gui_get_main();14.19 @@ -141,6 +143,7 @@14.20 void maple_settings_callback( GtkAction *action, gpointer user_data);14.21 void network_settings_callback( GtkAction *action, gpointer user_data);14.22 void video_settings_callback( GtkAction *action, gpointer user_data);14.23 +void hotkey_settings_callback( GtkAction *action, gpointer user_data);14.24 void fullscreen_toggle_callback( GtkToggleAction *action, gpointer user_data);14.26 void debugger_action_callback( GtkAction *action, gpointer user_data);
15.1 --- a/src/gui.h Sun May 24 08:30:35 2009 +000015.2 +++ b/src/gui.h Tue Jun 02 23:16:26 2009 +000015.3 @@ -42,8 +42,9 @@15.4 * GUI has one).15.5 *15.6 * @param debug TRUE if the system should start in debugging mode.15.7 + * @param fullscreen TRUE if the system should start in fullscreen mode.15.8 */15.9 -gboolean gui_init( gboolean debug );15.10 +gboolean gui_init( gboolean debug, gboolean fullscreen );15.12 /**15.13 * Enter the GUI main loop. If this method ever returns, the system will15.14 @@ -76,6 +77,12 @@15.15 */15.16 void gui_update_io_activity( io_activity_type activity, gboolean active );15.18 +/**15.19 + * Queue an event to call dreamcast_run() at the next opportunity (used to15.20 + * avoid invoking dreamcast_run() directly from the middle of things.15.21 + */15.22 +void gui_run_later(void);15.23 +15.24 #ifdef __cplusplus15.25 }15.26 #endif
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000016.2 +++ b/src/hotkeys.c Tue Jun 02 23:16:26 2009 +000016.3 @@ -0,0 +1,173 @@16.4 +/**16.5 + * $Id: $16.6 + *16.7 + * Handles hotkeys for pause/continue, save states, quit, etc16.8 + *16.9 + * Copyright (c) 2009 wahrhaft16.10 + *16.11 + * This program is free software; you can redistribute it and/or modify16.12 + * it under the terms of the GNU General Public License as published by16.13 + * the Free Software Foundation; either version 2 of the License, or16.14 + * (at your option) any later version.16.15 + *16.16 + * This program is distributed in the hope that it will be useful,16.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of16.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16.19 + * GNU General Public License for more details.16.20 + */16.21 +#include <assert.h>16.22 +#include <glib.h>16.23 +#include <sys/stat.h>16.24 +#include <stdint.h>16.25 +#include <stdlib.h>16.26 +#include "lxdream.h"16.27 +#include "dreamcast.h"16.28 +#include "display.h"16.29 +#include "hotkeys.h"16.30 +#include "gui.h"16.31 +#include "drivers/input_lirc.h"16.32 +#include "config.h"16.33 +16.34 +static void hotkey_resume_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown );16.35 +static void hotkey_stop_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown );16.36 +static void hotkey_reset_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown );16.37 +static void hotkey_exit_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown );16.38 +static void hotkey_state_select_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown );16.39 +static void hotkey_state_save_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown );16.40 +static void hotkey_state_load_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown );16.41 +16.42 +static char *set_current_state_filename(int filenum);16.43 +16.44 +static char *current_save_state;16.45 +16.46 +struct lxdream_config_entry hotkeys_config[] = {16.47 + {"resume", N_("Resume emulation"), CONFIG_TYPE_KEY},16.48 + {"stop", N_("Stop emulation"), CONFIG_TYPE_KEY},16.49 + {"reset", N_("Reset emulator"), CONFIG_TYPE_KEY},16.50 + {"exit", N_("Exit emulator"), CONFIG_TYPE_KEY},16.51 + {"save", N_("Save current quick save"), CONFIG_TYPE_KEY},16.52 + {"load", N_("Load current quick save"), CONFIG_TYPE_KEY},16.53 + {"state1", N_("Select quick save state 1"), CONFIG_TYPE_KEY},16.54 + {"state2", N_("Select quick save state 2"), CONFIG_TYPE_KEY},16.55 + {"state3", N_("Select quick save state 3"), CONFIG_TYPE_KEY},16.56 + {"state4", N_("Select quick save state 4"), CONFIG_TYPE_KEY},16.57 + {"state5", N_("Select quick save state 5"), CONFIG_TYPE_KEY},16.58 + {"state6", N_("Select quick save state 6"), CONFIG_TYPE_KEY},16.59 + {"state7", N_("Select quick save state 7"), CONFIG_TYPE_KEY},16.60 + {"state8", N_("Select quick save state 8"), CONFIG_TYPE_KEY},16.61 + {"state9", N_("Select quick save state 9"), CONFIG_TYPE_KEY},16.62 + {NULL, CONFIG_TYPE_NONE}16.63 +};16.64 +16.65 +void hotkeys_init() {16.66 +16.67 +#ifdef HAVE_LIRC16.68 + input_lirc_create();16.69 +#endif16.70 +16.71 + char *home = getenv("HOME");16.72 + char *save_path = g_strdup_printf("%s/.lxdream", home);16.73 + mkdir(save_path, S_IRWXU);16.74 + g_free(save_path);16.75 +16.76 + set_current_state_filename(1);16.77 +16.78 + hotkeys_register_keys();16.79 +}16.80 +16.81 +void hotkeys_register_keys()16.82 +{16.83 + input_register_key(hotkeys_config[0].value, &hotkey_resume_callback, NULL, 0);16.84 + input_register_key(hotkeys_config[1].value, &hotkey_stop_callback, NULL, 0);16.85 + input_register_key(hotkeys_config[2].value, &hotkey_reset_callback, NULL, 0);16.86 + input_register_key(hotkeys_config[3].value, &hotkey_exit_callback, NULL, 0);16.87 + input_register_key(hotkeys_config[4].value, &hotkey_state_save_callback, NULL, 0);16.88 + input_register_key(hotkeys_config[5].value, &hotkey_state_load_callback, NULL, 0);16.89 + for (int i = 0; i < 9; i++)16.90 + {16.91 + input_register_key(hotkeys_config[6 + i].value, &hotkey_state_select_callback, NULL, i);16.92 + }16.93 +}16.94 +16.95 +void hotkeys_unregister_keys()16.96 +{16.97 + input_unregister_key(hotkeys_config[0].value, &hotkey_resume_callback, NULL, 0);16.98 + input_unregister_key(hotkeys_config[1].value, &hotkey_stop_callback, NULL, 0);16.99 + input_unregister_key(hotkeys_config[2].value, &hotkey_reset_callback, NULL, 0);16.100 + input_unregister_key(hotkeys_config[3].value, &hotkey_exit_callback, NULL, 0);16.101 + input_unregister_key(hotkeys_config[4].value, &hotkey_state_save_callback, NULL, 0);16.102 + input_unregister_key(hotkeys_config[5].value, &hotkey_state_load_callback, NULL, 0);16.103 + for (int i = 0; i < 9; i++)16.104 + {16.105 + input_unregister_key(hotkeys_config[6 + i].value, &hotkey_state_select_callback, NULL, i);16.106 + }16.107 +}16.108 +16.109 +lxdream_config_entry_t hotkeys_get_config()16.110 +{16.111 + return hotkeys_config;16.112 +}16.113 +16.114 +16.115 +static void hotkey_resume_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown )16.116 +{16.117 + if (isKeyDown && !dreamcast_is_running() ) {16.118 + gui_run_later();16.119 + }16.120 +}16.121 +16.122 +static void hotkey_stop_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown )16.123 +{16.124 + if (isKeyDown && dreamcast_is_running() ) {16.125 + dreamcast_stop();16.126 + }16.127 +}16.128 +16.129 +static void hotkey_reset_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown )16.130 +{16.131 + if (isKeyDown) {16.132 + dreamcast_reset();16.133 + }16.134 +}16.135 +16.136 +static void hotkey_exit_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown )16.137 +{16.138 + if (isKeyDown) {16.139 + dreamcast_shutdown();16.140 + }16.141 + exit(0);16.142 +}16.143 +16.144 +static void hotkey_state_select_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown )16.145 +{16.146 + if (isKeyDown) {16.147 + INFO("state select callback called (%d)", value);16.148 + assert(value > 0 && value <= 9);16.149 + set_current_state_filename(value);16.150 + }16.151 +}16.152 +16.153 +static void hotkey_state_save_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown )16.154 +{16.155 + if (isKeyDown) {16.156 + if (current_save_state != NULL)16.157 + dreamcast_save_state(current_save_state);16.158 + }16.159 +}16.160 +16.161 +static void hotkey_state_load_callback( void *mdev, uint32_t value, uint32_t pressure, gboolean isKeyDown )16.162 +{16.163 + if (isKeyDown) {16.164 + if (current_save_state != NULL)16.165 + dreamcast_load_state(current_save_state);16.166 + }16.167 +}16.168 +16.169 +static char *set_current_state_filename(int filenum)16.170 +{16.171 + char *home = getenv("HOME");16.172 + if (current_save_state != NULL)16.173 + g_free(current_save_state);16.174 + current_save_state = g_strdup_printf("%s/.lxdream/quicksave%d.dst", home, filenum);16.175 +}16.176 +
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +000017.2 +++ b/src/hotkeys.h Tue Jun 02 23:16:26 2009 +000017.3 @@ -0,0 +1,37 @@17.4 +/**17.5 + * $Id: $17.6 + *17.7 + * Handles hotkeys for pause/continue, save states, quit, etc17.8 + *17.9 + * Copyright (c) 2009 wahrhaft.17.10 + *17.11 + * This program is free software; you can redistribute it and/or modify17.12 + * it under the terms of the GNU General Public License as published by17.13 + * the Free Software Foundation; either version 2 of the License, or17.14 + * (at your option) any later version.17.15 + *17.16 + * This program is distributed in the hope that it will be useful,17.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of17.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17.19 + * GNU General Public License for more details.17.20 + */17.21 +17.22 +#ifndef lxdream_hotkeys_H17.23 +#define lxdream_hotkeys_H17.24 +17.25 +#include "config.h"17.26 +17.27 +#ifdef __cplusplus17.28 +extern "C" {17.29 +#endif17.30 +17.31 + void hotkeys_init();17.32 + lxdream_config_entry_t hotkeys_get_config();17.33 + void hotkeys_register_keys();17.34 + void hotkeys_unregister_keys();17.35 +17.36 +#ifdef __cplusplus17.37 +}17.38 +#endif17.39 +17.40 +#endif
18.1 --- a/src/main.c Sun May 24 08:30:35 2009 +000018.2 +++ b/src/main.c Tue Jun 02 23:16:26 2009 +000018.3 @@ -35,13 +35,15 @@18.4 #include "maple/maple.h"18.5 #include "sh4/sh4.h"18.6 #include "aica/armdasm.h"18.7 +#include "hotkeys.h"18.9 -char *option_list = "a:A:c:dg:G:hHl:m:npt:T:uvV:x?";18.10 +char *option_list = "a:A:c:dfg:G:hHl:m:npt:T:uvV:x?";18.11 struct option longopts[] = {18.12 { "aica", required_argument, NULL, 'a' },18.13 { "audio", required_argument, NULL, 'A' },18.14 { "config", required_argument, NULL, 'c' },18.15 { "debugger", no_argument, NULL, 'D' },18.16 + { "fullscreen", no_argument, NULL, 'f' },18.17 { "gdb-sh4", required_argument, NULL, 'g' },18.18 { "gdb-arm", required_argument, NULL, 'G' },18.19 { "help", no_argument, NULL, 'h' },18.20 @@ -65,6 +67,7 @@18.21 gboolean headless = FALSE;18.22 gboolean use_xlat = TRUE;18.23 gboolean show_debugger = FALSE;18.24 +gboolean show_fullscreen = FALSE;18.25 extern uint32_t sh4_cpu_multiplier;18.27 static void print_version()18.28 @@ -82,6 +85,7 @@18.29 printf( " -A, --audio=DRIVER %s\n", _("Use the specified audio driver (? to list)") );18.30 printf( " -c, --config=CONFFILE %s\n", _("Load configuration from CONFFILE") );18.31 printf( " -d, --debugger %s\n", _("Start in debugger mode") );18.32 + printf( " -f, --fullscreen %s\n", _("Start in fullscreen mode") );18.33 printf( " -g, --gdb-sh4=PORT %s\n", _("Start GDB remote server on PORT for SH4") );18.34 printf( " -G, --gdb-arm=PORT %s\n", _("Start GDB remote server on PORT for ARM") );18.35 printf( " -h, --help %s\n", _("Display this usage information") );18.36 @@ -136,6 +140,9 @@18.37 case 'd': /* Launch w/ debugger */18.38 show_debugger = TRUE;18.39 break;18.40 + case 'f':18.41 + show_fullscreen = TRUE;18.42 + break;18.43 case 'g':18.44 sh4_gdb_port = optarg;18.45 break;18.46 @@ -216,7 +223,7 @@18.47 if( headless ) {18.48 display_set_driver( &display_null_driver );18.49 } else {18.50 - gui_init(show_debugger);18.51 + gui_init(show_debugger, show_fullscreen);18.53 display_driver_t display_driver = get_display_driver_by_name(display_driver_name);18.54 if( display_driver == NULL ) {18.55 @@ -228,6 +235,8 @@18.56 exit(2);18.57 }18.58 }18.59 +18.60 + hotkeys_init();18.62 maple_reattach_all();18.63 INFO( "%s! ready...", APP_NAME );
.