autotools, cmake: set SDL_SYSTEM_ICONV to OFF for windows (like SDL3.)

This commit is contained in:
Ozkan Sezer 2023-11-23 01:33:50 +03:00 committed by Ozkan Sezer
parent 0e9d050296
commit 8cf7e9e7da
3 changed files with 22 additions and 5 deletions

View File

@ -241,6 +241,11 @@ 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)
set(SDL_SYSTEM_ICONV_DEFAULT OFF)
else()
set(SDL_SYSTEM_ICONV_DEFAULT ON)
endif()
if(NOT ("$ENV{CFLAGS}" STREQUAL ""))
if(CMAKE_VERSION VERSION_LESS 3.11.0)
@ -420,7 +425,7 @@ set_option(SDL_DIRECTFB "Use DirectFB video driver" OFF)
dep_option(SDL_DIRECTFB_SHARED "Dynamically load directfb support" ON "SDL_DIRECTFB" OFF)
set_option(SDL_DUMMYVIDEO "Use dummy video driver" ON)
dep_option(SDL_IBUS "Enable IBus support" ON ${UNIX_SYS} OFF)
set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ON)
set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ${SDL_SYSTEM_ICONV_DEFAULT})
set_option(SDL_LIBICONV "Prefer iconv() from libiconv, if available, over libc version" OFF)
set_option(SDL_OPENGL "Include OpenGL support" ON)
set_option(SDL_OPENGLES "Include OpenGL ES support" ON)

10
configure vendored
View File

@ -1642,7 +1642,7 @@ Optional Features:
Use gcc -MMD -MT dependency tracking [default=yes]
--enable-libc Use the system C library [default=yes]
--enable-system-iconv Use iconv() from system-installed libraries
[default=yes]
[default=no for windows, yes for others]
--enable-libiconv Prefer iconv() from libiconv, if available, over
libc version [default=no]
--enable-gcc-atomics Use gcc builtin atomics [default=yes]
@ -18823,12 +18823,18 @@ else $as_nop
fi
enable_system_iconv_default=yes
case "$host" in
*-*-cygwin*|*-*-mingw*)
enable_system_iconv_default=no
;;
esac
# Check whether --enable-system-iconv was given.
if test ${enable_system_iconv+y}
then :
enableval=$enable_system_iconv;
else $as_nop
enable_system_iconv=yes
enable_system_iconv=$enable_system_iconv_default
fi
# Check whether --enable-libiconv was given.

View File

@ -320,9 +320,15 @@ AC_ARG_ENABLE(libc,
, enable_libc=yes)
dnl See whether we are allowed to use system iconv
enable_system_iconv_default=yes
case "$host" in
*-*-cygwin*|*-*-mingw*)
enable_system_iconv_default=no
;;
esac
AC_ARG_ENABLE(system-iconv,
[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=yes]])],
, enable_system_iconv=yes)
[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=no for windows, yes for others]])],
, enable_system_iconv=$enable_system_iconv_default)
dnl See whether we prefer libiconv over libc
AC_ARG_ENABLE(libiconv,
[AS_HELP_STRING([--enable-libiconv], [Prefer iconv() from libiconv, if available, over libc version [default=no]])],