autotools, cmake, macOS: Do not use the system iconv() by default
backport from PR #9676 by @flibitijibibo
diff --git a/CMakeLists.txt b/CMakeLists.txt
index feda11e..d2c65c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -242,7 +242,7 @@
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 671f2a1..c3a2509 100755
--- a/configure
+++ b/configure
@@ -18816,7 +18816,7 @@
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 5d38978..2477191 100644
--- a/configure.ac
+++ b/configure.ac
@@ -322,7 +322,7 @@
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