Lines 1-66
Link Here
|
1 |
--- platform/x11/detect.py.orig 2016-11-15 18:44:21 UTC |
1 |
--- platform/x11/detect.py.orig 2017-12-28 05:14:45 UTC |
2 |
+++ platform/x11/detect.py |
2 |
+++ platform/x11/detect.py |
3 |
@@ -31,11 +31,6 @@ def can_build(): |
3 |
@@ -52,7 +52,9 @@ def get_opts(): |
4 |
print("X11 not found.. x11 disabled.") |
4 |
BoolVariable('use_static_cpp', 'Link stdc++ statically', False), |
5 |
return False |
5 |
BoolVariable('use_sanitizer', 'Use LLVM compiler address sanitizer', False), |
|
|
6 |
BoolVariable('use_leak_sanitizer', 'Use LLVM compiler memory leaks sanitizer (implies use_sanitizer)', False), |
7 |
- BoolVariable('pulseaudio', 'Detect & use pulseaudio', True), |
8 |
+ BoolVariable('alsa','Detect & Use alsa audio',False), |
9 |
+ BoolVariable('oss','Detect & Use OSS audio',False), |
10 |
+ BoolVariable('pulseaudio', 'Detect & Use pulseaudio', False), |
11 |
BoolVariable('udev', 'Use udev for gamepad connection callbacks', False), |
12 |
EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), |
13 |
BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False), |
14 |
@@ -154,7 +156,7 @@ def configure(env): |
15 |
# FIXME: Check for existence of the libs before parsing their flags with pkg-config |
6 |
|
16 |
|
7 |
- ssl_error = os.system("pkg-config openssl --modversion > /dev/null ") |
17 |
if not env['builtin_openssl']: |
8 |
- if (ssl_error): |
|
|
9 |
- print("OpenSSL not found.. x11 disabled.") |
10 |
- return False |
11 |
- |
12 |
x11_error = os.system("pkg-config xcursor --modversion > /dev/null ") |
13 |
if (x11_error): |
14 |
print("xcursor not found.. x11 disabled.") |
15 |
@@ -61,7 +56,9 @@ def get_opts(): |
16 |
('use_static_cpp', 'link stdc++ statically', 'no'), |
17 |
('use_sanitizer', 'Use llvm compiler sanitize address', 'no'), |
18 |
('use_leak_sanitizer', 'Use llvm compiler sanitize memory leaks', 'no'), |
19 |
- ('pulseaudio', 'Detect & Use pulseaudio', 'yes'), |
20 |
+ ('alsa','Detect & Use alsa audio','no'), |
21 |
+ ('oss','Detect & Use OSS audio','no'), |
22 |
+ ('pulseaudio', 'Detect & Use pulseaudio', 'no'), |
23 |
('udev', 'Use udev for gamepad connection callbacks', 'no'), |
24 |
('debug_release', 'Add debug symbols to release version', 'no'), |
25 |
] |
26 |
@@ -134,7 +131,7 @@ def configure(env): |
27 |
env.ParseConfig('pkg-config xrandr --cflags --libs') |
28 |
|
29 |
if (env['builtin_openssl'] == 'no'): |
30 |
- env.ParseConfig('pkg-config openssl --cflags --libs') |
18 |
- env.ParseConfig('pkg-config openssl --cflags --libs') |
31 |
+ env.ParseConfig('echo -lssl -lcrypto') |
19 |
+ env.ParseConfig('echo -lssl -lcrypto') |
32 |
|
20 |
|
33 |
if (env['builtin_libwebp'] == 'no'): |
21 |
if not env['builtin_libwebp']: |
34 |
env.ParseConfig('pkg-config libwebp --cflags --libs') |
22 |
env.ParseConfig('pkg-config libwebp --cflags --libs') |
35 |
@@ -173,12 +170,13 @@ def configure(env): |
23 |
@@ -226,12 +228,18 @@ def configure(env): |
36 |
if (env['builtin_glew'] == 'no'): |
24 |
|
37 |
env.ParseConfig('pkg-config glew --cflags --libs') |
25 |
## Flags |
38 |
|
26 |
|
39 |
- if os.system("pkg-config --exists alsa") == 0: |
27 |
- if (os.system("pkg-config --exists alsa") == 0): # 0 means found |
40 |
- print("Enabling ALSA") |
28 |
- print("Enabling ALSA") |
41 |
- env.Append(CPPFLAGS=["-DALSA_ENABLED"]) |
29 |
- env.Append(CPPFLAGS=["-DALSA_ENABLED"]) |
42 |
- env.ParseConfig('pkg-config alsa --cflags --libs') |
30 |
- env.ParseConfig('pkg-config alsa --cflags --libs') |
43 |
- else: |
31 |
- else: |
44 |
- print("ALSA libraries not found, disabling driver") |
32 |
- print("ALSA libraries not found, disabling driver") |
45 |
+ if (env["alsa"]=="yes"): |
33 |
+ if env['alsa']: |
46 |
+ if os.system("pkg-config --exists alsa")==0: |
34 |
+ if os.system("pkg-config --exists alsa")==0: |
47 |
+ print("Enabling ALSA") |
35 |
+ print("Enabling ALSA") |
48 |
+ env.Append(CPPFLAGS=["-DALSA_ENABLED"]) |
36 |
+ env.Append(CPPFLAGS=["-DALSA_ENABLED"]) |
49 |
+ env.Append(LIBS=['asound']) |
37 |
+ env.Append(LIBS=['asound']) |
50 |
+ else: |
38 |
+ else: |
51 |
+ print("ALSA libraries not found, disabling driver") |
39 |
+ print("ALSA libraries not found, disabling driver") |
52 |
|
40 |
+ |
53 |
if (platform.system() == "Linux"): |
41 |
+ if env['oss']: |
54 |
env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"]) |
|
|
55 |
@@ -193,6 +191,11 @@ def configure(env): |
56 |
else: |
57 |
print("libudev development libraries not found, disabling udev support") |
58 |
|
59 |
+ if (env["oss"]=="yes"): |
60 |
+ print("Enabling OSS Audio") |
42 |
+ print("Enabling OSS Audio") |
61 |
+ env.Append(CPPFLAGS=["-DOSS_ENABLED"]) |
43 |
+ env.Append(CPPFLAGS=["-DOSS_ENABLED"]) |
62 |
+ env.Append(CCFLAGS=['-Ithirdparty/rtaudio']) |
44 |
+ env.Append(CCFLAGS=['-Ithirdparty/rtaudio']) |
63 |
+ |
45 |
|
64 |
if (env["pulseaudio"] == "yes"): |
46 |
if env['pulseaudio']: |
65 |
if not os.system("pkg-config --exists libpulse-simple"): |
47 |
if (os.system("pkg-config --exists libpulse-simple") == 0): # 0 means found |
66 |
print("Enabling PulseAudio") |
|
|