mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-30 21:42:18 +00:00
qb: Fix the qt configure check with older compilers.
This commit is contained in:
parent
243505b7cb
commit
d41b7770c4
2
Makefile
2
Makefile
@ -109,7 +109,7 @@ endif
|
||||
DEF_FLAGS += -Wall $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
|
||||
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
CXXFLAGS += $(DEF_FLAGS) -D__STDC_CONSTANT_MACROS
|
||||
OBJCFLAGS := $(CFLAGS) -D__STDC_CONSTANT_MACROS
|
||||
|
||||
ifeq ($(HAVE_CXX), 1)
|
||||
|
@ -7,6 +7,10 @@ ifeq ($(HAVE_STACK_USAGE), 1)
|
||||
DEF_FLAGS += -fstack-usage
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CXX11), 1)
|
||||
CXXFLAGS += $(CXX11_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT),)
|
||||
HAVE_GL_CONTEXT = 0
|
||||
HAVE_GL_MODERN = 0
|
||||
|
@ -5,9 +5,10 @@
|
||||
# check_header, check_macro and check_switch are not used.
|
||||
|
||||
check_switch '' C99 -std=gnu99 "Cannot find C99 compatible compiler."
|
||||
check_switch '' NOUNUSED -Wno-unused-result
|
||||
check_switch cxx CXX11 -std=c++11 ''
|
||||
check_switch '' NOUNUSED -Wno-unused-result ''
|
||||
add_define MAKEFILE NOUNUSED "$HAVE_NOUNUSED"
|
||||
check_switch '' NOUNUSED_VARIABLE -Wno-unused-variable
|
||||
check_switch '' NOUNUSED_VARIABLE -Wno-unused-variable ''
|
||||
add_define MAKEFILE NOUNUSED_VARIABLE "$HAVE_NOUNUSED_VARIABLE"
|
||||
|
||||
# There are still broken 64-bit Linux distros out there. :)
|
||||
@ -264,6 +265,8 @@ if [ "$HAVE_SDL2" = 'yes' ] && [ "$HAVE_SDL" = 'yes' ]; then
|
||||
HAVE_SDL=no
|
||||
fi
|
||||
|
||||
check_enabled CXX11 CXX C++ 'C++11 support is' false
|
||||
|
||||
check_platform Haiku DISCORD 'Discord is' false
|
||||
check_enabled CXX DISCORD discord 'The C++ compiler is' false
|
||||
check_enabled CXX QT 'Qt companion' 'The C++ compiler is' false
|
||||
|
@ -1,4 +1,4 @@
|
||||
QT_VERSION=qt5
|
||||
QT_FLAGS="$QT5CORE_CFLAGS $QT5CORE_LIBS"
|
||||
QT_FLAGS="$CXX11_CFLAGS $QT5CORE_CFLAGS $QT5CORE_LIBS"
|
||||
|
||||
add_define MAKEFILE QT_VERSION "$QT_VERSION"
|
||||
|
@ -343,12 +343,16 @@ check_switch()
|
||||
printf %s\\n 'int main(void) { return 0; }' > "$TEMP_CODE"
|
||||
answer='no'
|
||||
printf %s "Checking for availability of switch $3 in $COMPILER ... "
|
||||
$(printf %s "$COMPILER") -o "$TEMP_EXE" "$TEMP_CODE" "$3" \
|
||||
$(printf %s "$COMPILER") -o "$TEMP_EXE" "$TEMP_CODE" \
|
||||
$(printf %s "$BUILD_DIRS $CFLAGS $3 -Werror $LDFLAGS") \
|
||||
>>config.log 2>&1 && answer='yes'
|
||||
eval "HAVE_$2=\"$answer\""
|
||||
printf %s\\n "$answer"
|
||||
rm -f -- "$TEMP_CODE" "$TEMP_EXE"
|
||||
if [ "$answer" = 'no' ] && [ "${4:-}" ]; then
|
||||
if [ "$answer" = 'yes' ]; then
|
||||
eval "${2}_CFLAGS=\"$3\""
|
||||
PKG_CONF_USED="$PKG_CONF_USED $2"
|
||||
elif [ "${4:-}" ]; then
|
||||
die 1 "$4"
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user