summaryrefslogtreecommitdiffstats
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2017-11-29 21:01:26 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2017-12-06 23:47:09 +0100
commit6decbec46180d6876103fbea6188c7a1176da4a7 (patch)
treeaf5c9b7d870f5d4f106318c8830d932eab020cf0 /platform/x11/detect.py
parent9e2fad7e647e67aba90fae60ceb5a709eea68759 (diff)
downloadredot-engine-6decbec46180d6876103fbea6188c7a1176da4a7.tar.gz
Implement multitouch on X11
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 3d07851c4f..d7dbe71da4 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -55,6 +55,7 @@ def get_opts():
BoolVariable('pulseaudio', 'Detect & use pulseaudio', True),
BoolVariable('udev', 'Use udev for gamepad connection callbacks', False),
EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
+ BoolVariable('touch', 'Enable touch events', True),
]
@@ -141,6 +142,14 @@ def configure(env):
env.ParseConfig('pkg-config xinerama --cflags --libs')
env.ParseConfig('pkg-config xrandr --cflags --libs')
+ if (env['touch']):
+ x11_error = os.system("pkg-config xi --modversion > /dev/null ")
+ if (x11_error):
+ print("xi not found.. cannot build with touch. Aborting.")
+ sys.exit(255)
+ env.ParseConfig('pkg-config xi --cflags --libs')
+ env.Append(CPPFLAGS=['-DTOUCH_ENABLED'])
+
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
if not env['builtin_openssl']: