gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r12342: Don't try to use tslib, even


From: Rob Savoye
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r12342: Don't try to use tslib, even if it's enabled, but not installed.
Date: Fri, 30 Jul 2010 08:40:56 -0600
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 12342
committer: Rob Savoye <address@hidden>
branch nick: trunk
timestamp: Fri 2010-07-30 08:40:56 -0600
message:
  Don't try to use tslib, even if it's enabled, but not installed.
  Improve input device configure tests for automake conditionals.
modified:
  configure.ac
  gui/InputDevice.cpp
  gui/Makefile.am
  gui/TouchDevice.cpp
=== modified file 'configure.ac'
--- a/configure.ac      2010-07-29 18:45:30 +0000
+++ b/configure.ac      2010-07-30 14:40:56 +0000
@@ -807,12 +807,12 @@
   AC_DEFINE(USE_TSLIB, [1], [Use a tslib supported touchscreen])
   GNASH_PKG_FIND(ts, [tslib.h], [Touchscreen library], ts_config)
 fi
-AM_CONDITIONAL(ENABLE_TSLIB, [test x"$build_tslib" = xyes])
+AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} != xno])
 
 if test x"${build_ps2mouse}" = xyes; then
   AC_DEFINE(USE_MOUSE_PS2, [1], [Add support for a directly using a PS/2 
Mouse])
 fi
-AM_CONDITIONAL(USE_PS2_MOUSE, [test x"${build_ps2mouse}" = xyes])
+AM_CONDITIONAL(ENABLE_MOUSE, [test x"${build_ps2mouse}" = xyes])
 
 if test x"${build_ps2keyboard}" = xyes; then
   AC_DEFINE(USE_KEYBOARD_PS2, [1], [Add support for directly using a PS/2 
Keyboard])
@@ -820,8 +820,11 @@
 if test x"${build_input_events}" = xyes; then
   AC_DEFINE(USE_INPUT_EVENTS, [1], [Add support for a directly using Linux 
Input Event Devices])
 fi
-AM_CONDITIONAL(USE_INPUT_EVENTS, [test x"${build_input_events}" = xyes])
+AM_CONDITIONAL(ENABLE_INPUT_EVENTS, [test x"${build_input_events}" = xyes])
+dnl this is enabled if we have any input devices at all
+AM_CONDITIONAL(ENABLE_INPUT_DEVICES, [test x"${input_events}" != x])
 
+input_events=
 dnl By default, we want to to build all renderers
 build_ovg=no
 build_gles=no

=== modified file 'gui/InputDevice.cpp'
--- a/gui/InputDevice.cpp       2010-07-29 18:45:30 +0000
+++ b/gui/InputDevice.cpp       2010-07-30 14:40:56 +0000
@@ -176,7 +176,7 @@
         devices.push_back(*it);
     }
 #endif
-#ifdef USE_TSLIB
+#if defined(HAVE_TSLIB_H) && defined(USE_TSLIB)
     id = TouchDevice::scanForDevices(gui);
     for (it=id.begin(); it!=id.end(); ++it) {
         devices.push_back(*it);

=== modified file 'gui/Makefile.am'
--- a/gui/Makefile.am   2010-07-29 18:45:30 +0000
+++ b/gui/Makefile.am   2010-07-30 14:40:56 +0000
@@ -109,6 +109,7 @@
        $(LIRC_LIBS) \
        $(MYSQL_LIBS) \
        $(INTLLIBS) \
+       $(TSLIB_LIBS)
        $(BOOST_LIBS) \
        $(PTHREAD_LIBS) \
        $(NULL)
@@ -201,24 +202,35 @@
 # touchscreen. These are only used by the Framebuffer GUI, as without
 # X11, it has no event handling. We do it this way so the optionally
 # built source files still get included in the source tarball.
-DEVICES = \
-       InputDevice.cpp InputDevice.h \
+DEVICES =
+if ENABLE_INPUT_DEVICES
+DEVICES += InputDevice.cpp InputDevice.h
+
+# Touchscreen
+if ENABLE_TSLIB
+DEVICES += TouchDevice.cpp
+endif
+# PS/2 Mouse
+if ENABLE_MOUSE
+DEVICES += MouseDevice.cpp
+endif
+# Linux input events
+if ENABLE_INPUT_EVENTS
+DEVICES += EventDevice.cpp
+endif
+endif
+
+# Always include the device files in the source tarball
+EXTRA_DIST += \
        TouchDevice.cpp \
        MouseDevice.cpp \
        EventDevice.cpp
-EXTRA_DIST += $(DEVICES)
-
-if USE_INPUT_EVENTS
-INPUTDEVS = $(DEVICES)
-else
-INPUTDEVS = 
-endif
 
 GUI_SRCS = gnash.cpp \
        gui.cpp gui.h \
        Player.cpp Player.h \
        NullGui.cpp NullGui.h \
-       $(INPUTDEVS) \
+       $(DEVICES) \
        $(NULL)
 
 if BUILD_AQUA_GUI

=== modified file 'gui/TouchDevice.cpp'
--- a/gui/TouchDevice.cpp       2010-07-29 16:23:03 +0000
+++ b/gui/TouchDevice.cpp       2010-07-30 14:40:56 +0000
@@ -27,14 +27,15 @@
 #ifdef HAVE_TSLIB_H
 # include <tslib.h>
 #endif
-#if defined(ENABLE_TSLIB) && !defined(HAVE_TSLIB_H)
+#if defined(USE_TSLIB) && !defined(HAVE_TSLIB_H)
 # warning "No tslib.h! Disabling touchscreen support"
-# undef ENABLE_TSLIB
 #endif
 
 #include "log.h"
 #include "InputDevice.h"
 
+namespace gnash {
+
 #ifdef USE_TSLIB
 // Either use environment variable or hardcoded value
 // Hint: /dev/ts can be a symlink to the real ts device.
@@ -44,8 +45,6 @@
 static const char *TSLIB_DEVICE_NAME = "/dev/ts";
 #endif
 
-namespace gnash {
-
 //static const char *MOUSE_DEVICE = "/dev/usb/tkpanel0";
 
 TouchDevice::TouchDevice()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]