change the iconv configuration option names to be more verbose.

This commit is contained in:
Ozkan Sezer 2022-10-06 03:37:50 +03:00
parent 4ca86dae2f
commit fa7ffa4e88
3 changed files with 19 additions and 17 deletions

View file

@ -448,7 +448,7 @@ set_option(SDL_DIRECTFB "Use DirectFB video driver" OFF)
dep_option(SDL_DIRECTFB_SHARED "Dynamically load directfb support" ON "SDL_DIRECTFB" OFF) dep_option(SDL_DIRECTFB_SHARED "Dynamically load directfb support" ON "SDL_DIRECTFB" OFF)
set_option(SDL_DUMMYVIDEO "Use dummy video driver" ON) set_option(SDL_DUMMYVIDEO "Use dummy video driver" ON)
dep_option(SDL_IBUS "Enable IBus support" ON ${UNIX_SYS} OFF) dep_option(SDL_IBUS "Enable IBus support" ON ${UNIX_SYS} OFF)
set_option(SDL_ICONV "Use iconv() from system-installed libraries" ON) set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ON)
set_option(SDL_OPENGL "Include OpenGL support" ON) set_option(SDL_OPENGL "Include OpenGL support" ON)
set_option(SDL_OPENGLES "Include OpenGL ES support" ON) set_option(SDL_OPENGLES "Include OpenGL ES support" ON)
set_option(SDL_PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT}) set_option(SDL_PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
@ -1024,15 +1024,17 @@ if(SDL_LIBC)
endif() endif()
endif() endif()
if(SDL_ICONV) if(SDL_SYSTEM_ICONV)
check_library_exists(iconv iconv_open "" HAVE_LIBICONV) check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
if(HAVE_LIBICONV) if(HAVE_LIBICONV)
list(APPEND EXTRA_LIBS iconv) list(APPEND EXTRA_LIBS iconv)
set(HAVE_ICONV 1) set(HAVE_ICONV 1)
set(HAVE_SYSTEM_ICONV TRUE)
else() else()
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV) check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
if(HAVE_BUILTIN_ICONV) if(HAVE_BUILTIN_ICONV)
set(HAVE_ICONV 1) set(HAVE_ICONV 1)
set(HAVE_SYSTEM_ICONV TRUE)
endif() endif()
endif() endif()
endif() endif()

18
configure vendored
View file

@ -840,7 +840,7 @@ enable_largefile
enable_assertions enable_assertions
enable_dependency_tracking enable_dependency_tracking
enable_libc enable_libc
enable_iconv enable_system_iconv
enable_gcc_atomics enable_gcc_atomics
enable_atomic enable_atomic
enable_audio enable_audio
@ -1632,7 +1632,7 @@ Optional Features:
--enable-dependency-tracking --enable-dependency-tracking
Use gcc -MMD -MT dependency tracking [default=yes] Use gcc -MMD -MT dependency tracking [default=yes]
--enable-libc Use the system C library [default=yes] --enable-libc Use the system C library [default=yes]
--enable-iconv Use iconv() from system-installed libraries --enable-system-iconv Use iconv() from system-installed libraries
[default=yes] [default=yes]
--enable-gcc-atomics Use gcc builtin atomics [default=yes] --enable-gcc-atomics Use gcc builtin atomics [default=yes]
--enable-atomic Enable the atomic operations subsystem [default=yes] --enable-atomic Enable the atomic operations subsystem [default=yes]
@ -18680,12 +18680,12 @@ else $as_nop
fi fi
# Check whether --enable-iconv was given. # Check whether --enable-system-iconv was given.
if test ${enable_iconv+y} if test ${enable_system_iconv+y}
then : then :
enableval=$enable_iconv; enableval=$enable_system_iconv;
else $as_nop else $as_nop
enable_iconv=yes enable_system_iconv=yes
fi fi
@ -19896,7 +19896,7 @@ then :
fi fi
if test x$enable_iconv = xyes; then if test x$enable_system_iconv = xyes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
printf %s "checking for iconv_open in -liconv... " >&6; } printf %s "checking for iconv_open in -liconv... " >&6; }
if test ${ac_cv_lib_iconv_iconv_open+y} if test ${ac_cv_lib_iconv_iconv_open+y}
@ -28983,7 +28983,7 @@ printf "%s\n" "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
SUMMARY_video="${SUMMARY_video} uikit" SUMMARY_video="${SUMMARY_video} uikit"
have_video=yes have_video=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"
if test x$enable_iconv = xyes; then if test x$enable_system_iconv = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"
fi fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
@ -29282,7 +29282,7 @@ printf "%s\n" "#define SDL_TIMER_UNIX 1" >>confdefs.h
# Set up the core platform files # Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/os2/*.c" SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
if test x$enable_iconv = xyes; then if test x$enable_system_iconv = xyes; then
if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c" SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
fi fi

View file

@ -319,9 +319,9 @@ AC_ARG_ENABLE(libc,
, enable_libc=yes) , enable_libc=yes)
dnl See whether we are allowed to use libiconv dnl See whether we are allowed to use libiconv
AC_ARG_ENABLE(iconv, AC_ARG_ENABLE(system-iconv,
[AS_HELP_STRING([--enable-iconv], [Use iconv() from system-installed libraries [default=yes]])], [AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=yes]])],
, enable_iconv=yes) , enable_system_iconv=yes)
if test x$enable_libc = xyes; then if test x$enable_libc = xyes; then
AC_DEFINE(HAVE_LIBC, 1, [ ]) AC_DEFINE(HAVE_LIBC, 1, [ ])
@ -353,7 +353,7 @@ dnl Checks for library functions.
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"]) AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf) AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
if test x$enable_iconv = xyes; then if test x$enable_system_iconv = xyes; then
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"]) AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
AC_CHECK_FUNCS(iconv) AC_CHECK_FUNCS(iconv)
fi fi
@ -4306,7 +4306,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
SUMMARY_video="${SUMMARY_video} uikit" SUMMARY_video="${SUMMARY_video} uikit"
have_video=yes have_video=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"
if test x$enable_iconv = xyes; then if test x$enable_system_iconv = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"
fi fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
@ -4571,7 +4571,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
# Set up the core platform files # Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/os2/*.c" SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
if test x$enable_iconv = xyes; then if test x$enable_system_iconv = xyes; then
if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c" SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
fi fi