SDL: fix have_audio/video flags, add uikit to SUMMARY_video in configure

From 398f9a0e40419d44c5338ee4ce03ab461c9b1976 Mon Sep 17 00:00:00 2001
From: pionere <[EMAIL REDACTED]>
Date: Thu, 13 Jan 2022 09:32:41 +0100
Subject: [PATCH] fix have_audio/video flags, add uikit to SUMMARY_video in
 configure

---
 configure    | 8 ++++++++
 configure.ac | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/configure b/configure
index 3545f72e65c..75f8fdef45e 100755
--- a/configure
+++ b/configure
@@ -20180,6 +20180,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_DISK 1" >>confdefs.h
 
         SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
         SUMMARY_audio="${SUMMARY_audio} disk"
+        have_audio=yes
     fi
 }
 
@@ -20198,6 +20199,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_DUMMY 1" >>confdefs.h
 
         SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
         SUMMARY_audio="${SUMMARY_audio} dummy"
+        have_audio=yes
     fi
 }
 
@@ -20765,8 +20767,10 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
         SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
         SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
         SUMMARY_audio="${SUMMARY_audio} nacl"
+        have_audio=yes
         SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
         SUMMARY_video="${SUMMARY_video} nacl opengles2"
+        have_video=yes
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -20911,6 +20915,7 @@ $as_echo "$have_video_rpi" >&6; }
 $as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
 
             SUMMARY_video="${SUMMARY_video} rpi"
+            have_video=yes
         fi
     fi
 }
@@ -25774,6 +25779,7 @@ case "$host" in
 $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
 
                     SUMMARY_video="${SUMMARY_video} android"
+                    have_video=yes
                 fi
                 ;;
             *-*-linux*)         ARCH=linux ;;
@@ -26489,6 +26495,8 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES 1" >>confdefs.h
 $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
 
         SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
+        SUMMARY_video="${SUMMARY_video} uikit"
+        have_video=yes
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
diff --git a/configure.ac b/configure.ac
index 48c61c0814f..c70a1edeb8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1298,6 +1298,7 @@ CheckDiskAudio()
         AC_DEFINE(SDL_AUDIO_DRIVER_DISK, 1, [ ])
         SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
         SUMMARY_audio="${SUMMARY_audio} disk"
+        have_audio=yes
     fi
 }
 
@@ -1311,6 +1312,7 @@ CheckDummyAudio()
         AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
         SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
         SUMMARY_audio="${SUMMARY_audio} dummy"
+        have_audio=yes
     fi
 }
 
@@ -1684,8 +1686,10 @@ CheckNativeClient()
         SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
         SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
         SUMMARY_audio="${SUMMARY_audio} nacl"
+        have_audio=yes
         SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
         SUMMARY_video="${SUMMARY_video} nacl opengles2"
+        have_video=yes
         ],[])
 }
 
@@ -1735,6 +1739,7 @@ CheckRPI()
             SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
             AC_DEFINE(SDL_VIDEO_DRIVER_RPI, 1, [ ])
             SUMMARY_video="${SUMMARY_video} rpi"
+            have_video=yes
         fi
     fi
 }
@@ -3659,6 +3664,7 @@ case "$host" in
                     SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"
                     AC_DEFINE(SDL_VIDEO_DRIVER_ANDROID, 1, [ ])
                     SUMMARY_video="${SUMMARY_video} android"
+                    have_video=yes
                 fi
                 ;;
             *-*-linux*)         ARCH=linux ;;
@@ -4218,6 +4224,8 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
         AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
         AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
         SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
+        SUMMARY_video="${SUMMARY_video} uikit"
+        have_video=yes
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"