SDL: autotools, cmake, macOS: Do not use the system iconv() by default (dd427)

From dd42795131a40b89f9cc000d44146681c6382900 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 3 May 2024 11:56:50 +0300
Subject: [PATCH] autotools, cmake, macOS: Do not use the system iconv() by
 default

backport from PR #9676 by @flibitijibibo

(cherry picked from commit d8fbeec096c91c180b3b3656af60ac76350e3f34)
---
 CMakeLists.txt | 2 +-
 configure      | 2 +-
 configure.ac   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a91824c8bef9..e65c149ddf2a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -241,7 +241,7 @@ endif()
 if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS)
   set(OPT_DEF_LIBC ON)
 endif()
-if(WINDOWS OR IOS OR TVOS)
+if(WINDOWS OR DARWIN OR MACOSX OR IOS OR TVOS)
   set(SDL_SYSTEM_ICONV_DEFAULT OFF)
 else()
   set(SDL_SYSTEM_ICONV_DEFAULT ON)
diff --git a/configure b/configure
index 8183ec88c2872..2a004fef2cacb 100755
--- a/configure
+++ b/configure
@@ -18816,7 +18816,7 @@ fi
 
 enable_system_iconv_default=yes
 case "$host" in
-  *-*-cygwin*|*-*-mingw*)
+  *-*-cygwin*|*-*-mingw*|*-*-darwin*|*-ios-*)
     enable_system_iconv_default=no
     ;;
 esac
diff --git a/configure.ac b/configure.ac
index 631ea773e7e3f..a968c4c606ecc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -322,7 +322,7 @@ AC_ARG_ENABLE(libc,
 dnl See whether we are allowed to use system iconv
 enable_system_iconv_default=yes
 case "$host" in
-  *-*-cygwin*|*-*-mingw*)
+  *-*-cygwin*|*-*-mingw*|*-*-darwin*|*-ios-*)
     enable_system_iconv_default=no
     ;;
 esac