summaryrefslogtreecommitdiff
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-31 00:33:07 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-31 00:33:07 -0300
commit335c52ba03ecbccd0c9af8f9278b69da09a3e931 (patch)
tree5e4f5e2ea0d735228de7733e2fb689abbc2bc9c9 /platform/x11/detect.py
parentfd836cad270f7eb9645356cd583c8f11bf737b0f (diff)
parentac13c8c0c6fc346462b21ee00139dddd2e4ec1e3 (diff)
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index c93905ed3c..0226c8b8c0 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -45,10 +45,6 @@ def can_build():
print("xinerama not found.. x11 disabled.")
return False
- x11_error=os.system("pkg-config libevdev --modversion > /dev/null ")
- if (x11_error):
- print("evdev not found.. x11 disabled.")
- return False
return True # X11 enabled
@@ -133,7 +129,6 @@ def configure(env):
env.ParseConfig('pkg-config x11 --cflags --libs')
env.ParseConfig('pkg-config xinerama --cflags --libs')
env.ParseConfig('pkg-config xcursor --cflags --libs')
- env.ParseConfig('pkg-config libevdev --cflags --libs')
if (env["openssl"]=="yes"):
env.ParseConfig('pkg-config openssl --cflags --libs')
@@ -155,7 +150,18 @@ def configure(env):
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
if platform.system() == 'Linux':
env.Append(CPPFLAGS=["-DALSA_ENABLED"])
- env.Append(LIBS=['asound', 'udev'])
+ env.Append(LIBS=['asound'])
+
+ if not os.system("pkg-config --exists libudev"):
+ if not os.system("pkg-config --exists libevdev"):
+ print("Enabling udev/evdev")
+ env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"])
+ env.ParseConfig('pkg-config libudev --cflags --libs')
+ env.ParseConfig('pkg-config libevdev --cflags --libs')
+ else:
+ print("libevdev development libraries not found, disabling gamepad support")
+ else:
+ print("libudev development libraries not found, disabling gamepad support")
if (env["pulseaudio"]=="yes"):
if not os.system("pkg-config --exists libpulse-simple"):