Merge remote-tracking branch 'upstream/2.0.22' into switch-sdl2-2.0.14-dev

# Conflicts:
#	.gitignore
#	CMakeLists.txt
#	configure
#	configure.ac
#	include/SDL_config.h.cmake
#	include/SDL_config.h.in
#	sdl2-config.cmake.in
#	src/dynapi/SDL_dynapi.h
#	src/joystick/SDL_gamecontrollerdb.h
#	src/joystick/SDL_sysjoystick.h
#	src/video/SDL_video.c
#	src/video/khronos/EGL/eglplatform.h
This commit is contained in:
2022-05-31 13:17:31 -04:00
1289 changed files with 157347 additions and 56981 deletions

282
test/configure vendored
View File

@@ -581,9 +581,11 @@ PACKAGE_STRING=
PACKAGE_BUGREPORT=
PACKAGE_URL=
ac_unique_file="README"
ac_unique_file="loopwave.c"
ac_subst_vars='LTLIBOBJS
LIBOBJS
LIBUNWIND_LIBS
LIBUNWIND_CFLAGS
SDL_TTF_LIB
XLIB
GLES2LIB
@@ -600,6 +602,7 @@ SDL_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
ISOS2
ISUNIX
ISWINDOWS
ISMACOSX
@@ -682,7 +685,9 @@ PKG_CONFIG_LIBDIR
SDL_CFLAGS
SDL_LIBS
XMKMF
CPP'
CPP
LIBUNWIND_CFLAGS
LIBUNWIND_LIBS'
# Initialize some variables set by options.
@@ -1335,6 +1340,10 @@ Some influential environment variables:
SDL_LIBS linker flags for SDL, overriding pkg-config
XMKMF Path to xmkmf, Makefile generator for X Window System
CPP C preprocessor
LIBUNWIND_CFLAGS
C compiler flags for LIBUNWIND, overriding pkg-config
LIBUNWIND_LIBS
linker flags for LIBUNWIND, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1454,48 +1463,6 @@ fi
} # ac_fn_c_try_compile
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1542,6 +1509,48 @@ fi
} # ac_fn_c_try_link
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1933,7 +1942,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
for ac_dir in $srcdir/../build-scripts; do
for ac_dir in ../build-scripts "$srcdir"/../build-scripts; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -1949,7 +1958,7 @@ for ac_dir in $srcdir/../build-scripts; do
fi
done
if test -z "$ac_aux_dir"; then
as_fn_error $? "cannot find install-sh, install.sh, or shtool in $srcdir/../build-scripts" "$LINENO" 5
as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../build-scripts \"$srcdir\"/../build-scripts" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2909,9 +2918,10 @@ fi
ISUNIX="false"
ISWINDOWS="false"
ISMACOSX="false"
ISOS2="false"
case "$host" in
*-*-cygwin* | *-*-mingw32*)
*-*-cygwin* | *-*-mingw*)
ISWINDOWS="true"
EXE=".exe"
MATHLIB=""
@@ -2922,7 +2932,7 @@ case "$host" in
MATHLIB=""
SYS_GL_LIBS="-lGL"
;;
*-*-darwin* )
*-*-darwin*)
ISMACOSX="true"
EXE=""
MATHLIB=""
@@ -2994,21 +3004,68 @@ fi
MATHLIB=""
SYS_GL_LIBS="-lGLES_CM"
;;
*-*-emscripten* )
*-*-emscripten*)
EXE=".bc"
MATHLIB=""
SYS_GL_LIBS=""
;;
*-*-riscos* )
*-*-riscos*)
EXE=",e1f"
MATHLIB=""
SYS_GL_LIBS=""
;;
*-*-os2*)
ISOS2="true"
EXE=".exe"
MATHLIB=""
SYS_GL_LIBS=""
;;
*)
ISUNIX="true"
EXE=""
MATHLIB="-lm"
SYS_GL_LIBS="-lGL"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glBegin in -lOpenGL" >&5
$as_echo_n "checking for glBegin in -lOpenGL... " >&6; }
if ${ac_cv_lib_OpenGL_glBegin+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lOpenGL $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char glBegin ();
int
main ()
{
return glBegin ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_OpenGL_glBegin=yes
else
ac_cv_lib_OpenGL_glBegin=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenGL_glBegin" >&5
$as_echo "$ac_cv_lib_OpenGL_glBegin" >&6; }
if test "x$ac_cv_lib_OpenGL_glBegin" = xyes; then :
SYS_GL_LIBS="-lOpenGL"
else
SYS_GL_LIBS="-lGL"
fi
;;
esac
@@ -3017,7 +3074,8 @@ esac
SDL_VERSION=2.0.0
SDL_VERSION=2.0.18
@@ -3166,8 +3224,8 @@ fi
if test "x$sdl_prefix$sdl_exec_prefix" = x ; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5
$as_echo_n "checking for SDL... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdl2 >= $min_sdl_version" >&5
$as_echo_n "checking for sdl2 >= $min_sdl_version... " >&6; }
if test -n "$SDL_CFLAGS"; then
pkg_cv_SDL_CFLAGS="$SDL_CFLAGS"
@@ -3331,38 +3389,16 @@ else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
FILE *fp = fopen("conf.sdltest", "w");
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
if (fp) fclose(fp);
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
if (sscanf("$min_sdl_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
@@ -3874,15 +3910,12 @@ int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
have_opengl=yes
have_opengl=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengl" >&5
@@ -3903,15 +3936,12 @@ int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
have_opengles=yes
have_opengles=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles" >&5
@@ -3932,15 +3962,12 @@ int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
have_opengles2=yes
have_opengles2=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles2" >&5
@@ -4022,6 +4049,79 @@ if test x$have_SDL_ttf = xyes; then
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5
$as_echo_n "checking for libunwind... " >&6; }
if test -n "$LIBUNWIND_CFLAGS"; then
pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBUNWIND_LIBS"; then
pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libunwind" 2>&1`
else
LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "libunwind" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBUNWIND_PKG_ERRORS" >&5
have_libunwind=no
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
have_libunwind=no
else
LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS
LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
have_libunwind=yes
fi
if test x$have_libunwind = xyes ; then
LIBS="$LIBS $LIBUNWIND_LIBS"
fi
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF