From d74147dd8b199dc967750a2df2a6a97df5ae0ee8 Mon Sep 17 00:00:00 2001 From: cpasjuste Date: Thu, 24 Jun 2021 16:15:28 +0200 Subject: [PATCH] switch: update configure.ac --- configure.ac | 23 ++++++++++++++++------- include/SDL_config.h.in | 3 ++- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 200722b64..74c7c4f64 100644 --- a/configure.ac +++ b/configure.ac @@ -4239,8 +4239,23 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS -g -O3" EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_VIDEO_STATIC_ANGLE" EXTRA_LDFLAGS="-march=armv8-a -fPIE -L${DEVKITPRO}/libnx/lib -lEGL -lglapi -ldrm_nouveau -lnx" - CheckDeclarationAfterStatement + CheckDeclarationAfterStatement + CheckClockGettime + CheckPTHREAD + + # Set up files for the power library + if test x$enable_power = xyes; then + AC_DEFINE(SDL_POWER_SWITCH, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/power/switch/SDL_syspower.c" + have_power=yes + fi + # Set up files for the filesystem library + if test x$enable_filesystem = xyes; then + AC_DEFINE(SDL_FILESYSTEM_SWITCH, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/filesystem/switch/SDL_sysfilesystem.c" + have_filesystem=yes + fi # Set up files for the video library if test x$enable_video = xyes; then SOURCES="$SOURCES $srcdir/src/video/switch/*.c" @@ -4271,12 +4286,6 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau SOURCES="$SOURCES $srcdir/src/timer/switch/*.c" have_timers=yes fi - # Set up files for the thread library - if test x$enable_threads = xyes; then - AC_DEFINE(SDL_THREAD_SWITCH, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/thread/switch/*.c" - have_threads=yes - fi ;; *) AC_MSG_ERROR([ diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index 6fe2298ba..9636f6080 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -333,7 +333,6 @@ #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP #undef SDL_THREAD_WINDOWS -#undef SDL_THREAD_SWITCH /* Enable various timer systems */ #undef SDL_TIMER_HAIKU @@ -422,6 +421,7 @@ #undef SDL_POWER_ANDROID #undef SDL_POWER_EMSCRIPTEN #undef SDL_POWER_HARDWIRED +#undef SDL_POWER_SWITCH /* Enable system filesystem support */ #undef SDL_FILESYSTEM_HAIKU @@ -432,6 +432,7 @@ #undef SDL_FILESYSTEM_NACL #undef SDL_FILESYSTEM_ANDROID #undef SDL_FILESYSTEM_EMSCRIPTEN +#undef SDL_FILESYSTEM_SWITCH /* Enable assembly routines */ #undef SDL_ASSEMBLY_ROUTINES