diff options
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r-- | platform/x11/detect.py | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 478b42f9f7..ad2620c9f5 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -42,6 +42,11 @@ def can_build(): print("xrandr not found.. x11 disabled.") return False + x11_error = os.system("pkg-config xrender --modversion > /dev/null ") + if (x11_error): + print("xrender not found.. x11 disabled.") + return False + return True def get_opts(): @@ -49,12 +54,13 @@ def get_opts(): return [ BoolVariable('use_llvm', 'Use the LLVM compiler', False), - BoolVariable('use_static_cpp', 'Link stdc++ statically', False), + BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False), BoolVariable('use_sanitizer', 'Use LLVM compiler address sanitizer', False), BoolVariable('use_leak_sanitizer', 'Use LLVM compiler memory leaks sanitizer (implies use_sanitizer)', False), 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('separate_debug_symbols', 'Create a separate file with the debug symbols', False), BoolVariable('touch', 'Enable touch events', True), ] @@ -64,7 +70,6 @@ def get_flags(): return [ ('builtin_freetype', False), ('builtin_libpng', False), - ('builtin_openssl', False), ('builtin_zlib', False), ] @@ -141,6 +146,7 @@ def configure(env): env.ParseConfig('pkg-config xcursor --cflags --libs') env.ParseConfig('pkg-config xinerama --cflags --libs') env.ParseConfig('pkg-config xrandr --cflags --libs') + env.ParseConfig('pkg-config xrender --cflags --libs') if (env['touch']): x11_error = os.system("pkg-config xi --modversion > /dev/null ") @@ -152,8 +158,9 @@ def configure(env): # FIXME: Check for existence of the libs before parsing their flags with pkg-config - if not env['builtin_openssl']: - env.ParseConfig('pkg-config openssl --cflags --libs') + if not env['builtin_mbedtls']: + # mbedTLS does not provide a pkgconfig config yet. See https://github.com/ARMmbed/mbedtls/issues/228 + env.Append(LIBS=['mbedtls', 'mbedcrypto', 'mbedx509']) if not env['builtin_libwebp']: env.ParseConfig('pkg-config libwebp --cflags --libs') @@ -172,6 +179,16 @@ def configure(env): if not env['builtin_libpng']: env.ParseConfig('pkg-config libpng --cflags --libs') + if not env['builtin_bullet']: + # We need at least version 2.88 + import subprocess + bullet_version = subprocess.check_output(['pkg-config', 'bullet', '--modversion']).strip() + if bullet_version < "2.88": + # Abort as system bullet was requested but too old + print("Bullet: System version {0} does not match minimal requirements ({1}). Aborting.".format(bullet_version, "2.88")) + sys.exit(255) + env.ParseConfig('pkg-config bullet --cflags --libs') + if not env['builtin_enet']: env.ParseConfig('pkg-config libenet --cflags --libs') @@ -223,10 +240,10 @@ def configure(env): print("ALSA libraries not found, disabling driver") if env['pulseaudio']: - if (os.system("pkg-config --exists libpulse-simple") == 0): # 0 means found + if (os.system("pkg-config --exists libpulse") == 0): # 0 means found print("Enabling PulseAudio") env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"]) - env.ParseConfig('pkg-config --cflags --libs libpulse-simple') + env.ParseConfig('pkg-config --cflags --libs libpulse') else: print("PulseAudio development libraries not found, disabling driver") @@ -264,6 +281,6 @@ def configure(env): env.Append(CPPFLAGS=['-m64']) env.Append(LINKFLAGS=['-m64', '-L/usr/lib/i686-linux-gnu']) - + # Link those statically for portability if env['use_static_cpp']: - env.Append(LINKFLAGS=['-static-libstdc++']) + env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++']) |