wscript: look for libm when compiling for Android on Android device itself (e.g. Termux)

This commit is contained in:
Alibek Omarov
2025-04-24 20:52:55 +03:00
parent 75eb1f1e8b
commit 296e642f09

View File

@@ -456,7 +456,10 @@ def configure(conf):
elif conf.env.DEST_OS == 'android':
conf.check_cc(lib='dl')
conf.check_cc(lib='log')
# LIB_M added in xcompile!
if not conf.options.ANDROID_OPTS:
# if we're compiling on device itself
conf.check_cc(lib='m')
# otherwise LIB_M is defined by xcompile (as it might be libm_hard, depending on NDK configuration)
elif conf.env.DEST_OS == 'win32':
# Common Win32 libraries
# Don't check them more than once, to save time