diff --git a/qb/config.params.sh b/qb/config.params.sh index 4eae5f30c1..34f83cddfc 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -20,6 +20,7 @@ HAVE_SSL=auto # SSL/mbedtls support C89_SSL=no HAVE_BUILTINMBEDTLS=yes # Bake in the mbedtls library C89_BUILTINMBEDTLS=no +CXX_BUILTINMBEDTLS=no HAVE_OVERLAY=yes # Overlay support HAVE_DYNAMIC=yes # Dynamic loading of libretro library HAVE_SDL=auto # SDL support @@ -105,6 +106,7 @@ HAVE_SSE=no # x86 SSE optimizations (SSE, SSE2) HAVE_FLOATHARD=no # Force hard float ABI (for ARM) HAVE_FLOATSOFTFP=no # Force soft float ABI (for ARM) HAVE_CHD=yes # Compile in chd support +CXX_CHD=no HAVE_7ZIP=yes # Compile in 7z support HAVE_FLAC=auto # Compile in flac support HAVE_BUILTINFLAC=yes # Bake in flac support diff --git a/qb/qb.libs.sh b/qb/qb.libs.sh index b453541670..b142776e5b 100644 --- a/qb/qb.libs.sh +++ b/qb/qb.libs.sh @@ -295,12 +295,26 @@ create_config_header() while [ "$1" ]; do case "$(eval "printf %s \"\$HAVE_$1\"")" in 'yes') - if [ "$(eval "printf %s \"\$C89_$1\"")" = 'no' ]; then - printf %s\\n '#if __cplusplus || __STDC_VERSION__ >= 199901L' \ - "#define HAVE_$1 1" '#endif' - else - printf %s\\n "#define HAVE_$1 1" + n='0' + c89_build="$(eval "printf %s \"\$C89_$1\"")" + cxx_build="$(eval "printf %s \"\$CXX_$1\"")" + + if [ "$c89_build" = 'no' ]; then + n=$(($n+1)) + printf %s\\n '#if __cplusplus || __STDC_VERSION__ >= 199901L' fi + + if [ "$cxx_build" = 'no' ]; then + n=$(($n+1)) + printf %s\\n '#ifndef CXX_BUILD' + fi + + printf %s\\n "#define HAVE_$1 1" + + while [ $n != '0' ]; do + n=$(($n-1)) + printf %s\\n '#endif' + done ;; 'no') printf %s\\n "/* #undef HAVE_$1 */";; esac @@ -350,12 +364,23 @@ create_config_make() while [ "$1" ]; do case "$(eval "printf %s \"\$HAVE_$1\"")" in 'yes') - if [ "$(eval "printf %s \"\$C89_$1\"")" = 'no' ]; then - printf %s\\n "ifneq (\$(C89_BUILD),1)" \ - "HAVE_$1 = 1" 'endif' - else - printf %s\\n "HAVE_$1 = 1" - fi + n='0' + c89_build="C89_$1" + cxx_build="CXX_$1" + + for build in "$c89_build" "$cxx_build"; do + if [ "$(eval "printf %s \"\$$build\"")" = 'no' ]; then + n=$(($n+1)) + printf %s\\n "ifneq (\$(${build%%_*}_BUILD),1)" + fi + done + + printf %s\\n "HAVE_$1 = 1" + + while [ $n != '0' ]; do + n=$(($n-1)) + printf %s\\n 'endif' + done ;; 'no') printf %s\\n "HAVE_$1 = 0";; esac diff --git a/qb/qb.params.sh b/qb/qb.params.sh index 3d7ec4fd4d..fd20165c3c 100644 --- a/qb/qb.params.sh +++ b/qb/qb.params.sh @@ -40,7 +40,7 @@ EOF VAL="${VAR#*=}" VAR="$(printf %s "${TMPVAR#HAVE_}" | tr '[:upper:]' '[:lower:]')" case "$VAR" in - 'c89_'*) continue;; + 'c89_'*|'cxx_'*) continue;; *) case "$VAL" in 'yes'*)