summaryrefslogtreecommitdiff
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index e035c72993..6b147db130 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -52,10 +52,11 @@ def get_opts():
return [
('use_llvm','Use llvm compiler','no'),
+ ('use_static_cpp','link stdc++ statically','no'),
('use_sanitizer','Use llvm compiler sanitize address','no'),
('use_leak_sanitizer','Use llvm compiler sanitize memory leaks','no'),
('pulseaudio','Detect & Use pulseaudio','yes'),
- ('gamepad','Gamepad support, requires libudev and libevdev','yes'),
+ ('udev','Use udev for gamepad connection callbacks','no'),
('new_wm_api', 'Use experimental window management API','no'),
('debug_release', 'Add debug symbols to release version','no'),
]
@@ -155,24 +156,18 @@ def configure(env):
else:
print("ALSA libraries not found, disabling driver")
- if (env["gamepad"]=="yes" and platform.system() == "Linux"):
+ if (platform.system() == "Linux"):
+ env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"])
+ if (env["udev"]=="yes"):
# pkg-config returns 0 when the lib exists...
found_udev = not os.system("pkg-config --exists libudev")
- found_evdev = not os.system("pkg-config --exists libevdev")
-
- if (found_udev and found_evdev):
- print("Enabling gamepad support with udev/evdev")
- env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"])
+
+ if (found_udev):
+ print("Enabling udev support")
+ env.Append(CPPFLAGS=["-DUDEV_ENABLED"])
env.ParseConfig('pkg-config libudev --cflags --libs')
- env.ParseConfig('pkg-config libevdev --cflags --libs')
else:
- if (not found_udev):
- print("libudev development libraries not found")
- if (not found_evdev):
- print("libevdev development libraries not found")
- print("Some libraries are missing for the required gamepad support, aborting!")
- print("Install the mentioned libraries or build with 'gamepad=no' to disable gamepad support.")
- sys.exit(255)
+ print("libudev development libraries not found, disabling udev support")
if (env["pulseaudio"]=="yes"):
if not os.system("pkg-config --exists libpulse-simple"):
@@ -207,5 +202,8 @@ def configure(env):
env.Append(CPPFLAGS=['-DNEW_WM_API'])
env.ParseConfig('pkg-config xinerama --cflags --libs')
+ if (env["use_static_cpp"]=="yes"):
+ env.Append(LINKFLAGS=['-static-libstdc++'])
+
env["x86_opt_gcc"]=True