mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-27 03:56:06 +00:00
qb: Extend check_enabled.
This also disables vulkan support when threads are also disabled. Fixes https://github.com/libretro/RetroArch/issues/8091
This commit is contained in:
parent
5302a1e61c
commit
8e798405ad
@ -255,14 +255,8 @@ if [ "$HAVE_SDL2" = 'yes' ] && [ "$HAVE_SDL" = 'yes' ]; then
|
||||
HAVE_SDL=no
|
||||
fi
|
||||
|
||||
check_enabled DISCORD discord
|
||||
|
||||
if [ "$HAVE_DISCORD" != 'no' ]; then
|
||||
# Enable discord by default if it hasn't been disabled by check_enabled.
|
||||
HAVE_DISCORD=yes
|
||||
fi
|
||||
|
||||
check_enabled QT 'Qt companion'
|
||||
check_enabled CXX DISCORD discord 'the C++ compiler is'
|
||||
check_enabled CXX QT 'Qt companion' 'the C++ compiler is'
|
||||
|
||||
if [ "$HAVE_QT" != 'no' ]; then
|
||||
check_pkgconf QT5CORE Qt5Core 5.2
|
||||
@ -325,6 +319,7 @@ if [ "$HAVE_SSL" != 'no' ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
check_enabled THREADS LIBUSB libusb 'threads are'
|
||||
check_val '' LIBUSB -lusb-1.0 libusb-1.0 libusb-1.0 1.0.13 '' false
|
||||
|
||||
if [ "$OS" = 'Win32' ]; then
|
||||
@ -503,7 +498,8 @@ fi
|
||||
check_lib '' STRCASESTR "$CLIB" strcasestr
|
||||
check_lib '' MMAP "$CLIB" mmap
|
||||
|
||||
check_enabled VULKAN vulkan
|
||||
check_enabled CXX VULKAN vulkan 'the C++ compiler is'
|
||||
check_enabled THREADS VULKAN vulkan 'threads are'
|
||||
|
||||
if [ "$HAVE_VULKAN" != "no" ] && [ "$OS" = 'Win32' ]; then
|
||||
HAVE_VULKAN=yes
|
||||
@ -550,15 +546,7 @@ if [ "$HAVE_DEBUG" = 'yes' ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$HAVE_ZLIB" = 'no' ] && [ "$HAVE_RPNG" != 'no' ]; then
|
||||
HAVE_RPNG=no
|
||||
die : 'Notice: zlib is not available, RPNG will also be disabled.'
|
||||
fi
|
||||
|
||||
if [ "$HAVE_THREADS" = 'no' ] && [ "$HAVE_LIBUSB" != 'no' ]; then
|
||||
HAVE_LIBUSB=no
|
||||
die : 'Notice: Threads are not available, libusb will also be disabled.'
|
||||
fi
|
||||
check_enabled ZLIB RPNG RPNG 'zlib is'
|
||||
|
||||
if [ "$HAVE_V4L2" != 'no' ] && [ "$HAVE_VIDEOPROCESSOR" != 'no' ]; then
|
||||
HAVE_VIDEO_PROCESSOR=yes
|
||||
|
@ -121,7 +121,7 @@ HAVE_CHEEVOS=yes # Retro Achievements
|
||||
HAVE_NEW_CHEEVOS=no # Use rcheevos to process RetroAchievements
|
||||
C89_NEW_CHEEVOS=no
|
||||
HAVE_LUA=no # Lua support (for Retro Achievements)
|
||||
HAVE_DISCORD=auto # Discord Integration
|
||||
HAVE_DISCORD=yes # Discord Integration
|
||||
C89_DISCORD=no
|
||||
HAVE_SHADERPIPELINE=yes # Additional shader-based pipelines
|
||||
C89_SHADERPIPELINE=no
|
||||
|
@ -39,18 +39,21 @@ check_compiler()
|
||||
}
|
||||
|
||||
# check_enabled:
|
||||
# $1 = HAVE_$1
|
||||
# $2 = lib
|
||||
# $1 = HAVE_$1 [Disabled feature]
|
||||
# $2 = USER_$2 [Enabled feature]
|
||||
# $3 = lib
|
||||
# $4 = feature
|
||||
check_enabled()
|
||||
{ [ "$HAVE_CXX" != 'no' ] && return 0
|
||||
tmpval="$(eval "printf %s \"\$HAVE_$1\"")"
|
||||
{ tmpvar="$(eval "printf %s \"\$HAVE_$1\"")"
|
||||
[ "$tmpvar" != 'no' ] && return 0
|
||||
tmpval="$(eval "printf %s \"\$USER_$2\"")"
|
||||
|
||||
if [ "$tmpval" != 'yes' ]; then
|
||||
eval "HAVE_$1=no"
|
||||
eval "HAVE_$2=no"
|
||||
return 0
|
||||
fi
|
||||
|
||||
die 1 "Forced to build with $2 support and the C++ compiler is disabled. Exiting ..."
|
||||
die 1 "Forced to build with $3 support and $4 disabled. Exiting ..."
|
||||
}
|
||||
|
||||
# check_lib:
|
||||
|
@ -86,10 +86,12 @@ parse_input() # Parse stuff :V
|
||||
--enable-*)
|
||||
opt_exists "${1##--enable-}" "$1"
|
||||
eval "HAVE_$opt=yes"
|
||||
eval "USER_$opt=yes"
|
||||
;;
|
||||
--disable-*)
|
||||
opt_exists "${1##--disable-}" "$1"
|
||||
eval "HAVE_$opt=no"
|
||||
eval "USER_$opt=no"
|
||||
eval "HAVE_NO_$opt=yes"
|
||||
;;
|
||||
--with-*)
|
||||
|
Loading…
x
Reference in New Issue
Block a user