From fa7ffa4e8870bc572b6e09ae7f56444d971467ec Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 6 Oct 2022 03:37:50 +0300 Subject: [PATCH] change the iconv configuration option names to be more verbose. --- CMakeLists.txt | 6 ++++-- configure | 18 +++++++++--------- configure.ac | 12 ++++++------ 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 57bf37485..bc4510a27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) set_option(SDL_DUMMYVIDEO "Use dummy video driver" ON) 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_OPENGLES "Include OpenGL ES support" ON) set_option(SDL_PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT}) @@ -1024,15 +1024,17 @@ if(SDL_LIBC) endif() endif() - if(SDL_ICONV) + if(SDL_SYSTEM_ICONV) check_library_exists(iconv iconv_open "" HAVE_LIBICONV) if(HAVE_LIBICONV) list(APPEND EXTRA_LIBS iconv) set(HAVE_ICONV 1) + set(HAVE_SYSTEM_ICONV TRUE) else() check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV) if(HAVE_BUILTIN_ICONV) set(HAVE_ICONV 1) + set(HAVE_SYSTEM_ICONV TRUE) endif() endif() endif() diff --git a/configure b/configure index 3eba8ebeb..de1b13f72 100755 --- a/configure +++ b/configure @@ -840,7 +840,7 @@ enable_largefile enable_assertions enable_dependency_tracking enable_libc -enable_iconv +enable_system_iconv enable_gcc_atomics enable_atomic enable_audio @@ -1632,7 +1632,7 @@ Optional Features: --enable-dependency-tracking Use gcc -MMD -MT dependency tracking [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] --enable-gcc-atomics Use gcc builtin atomics [default=yes] --enable-atomic Enable the atomic operations subsystem [default=yes] @@ -18680,12 +18680,12 @@ else $as_nop fi -# Check whether --enable-iconv was given. -if test ${enable_iconv+y} +# Check whether --enable-system-iconv was given. +if test ${enable_system_iconv+y} then : - enableval=$enable_iconv; + enableval=$enable_system_iconv; else $as_nop - enable_iconv=yes + enable_system_iconv=yes fi @@ -19896,7 +19896,7 @@ then : 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 "checking for iconv_open in -liconv... " >&6; } 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" have_video=yes 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" fi 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 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 SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c" fi diff --git a/configure.ac b/configure.ac index c8921aad6..b9b10f499 100644 --- a/configure.ac +++ b/configure.ac @@ -319,9 +319,9 @@ AC_ARG_ENABLE(libc, , enable_libc=yes) dnl See whether we are allowed to use libiconv -AC_ARG_ENABLE(iconv, -[AS_HELP_STRING([--enable-iconv], [Use iconv() from system-installed libraries [default=yes]])], - , enable_iconv=yes) +AC_ARG_ENABLE(system-iconv, +[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=yes]])], + , enable_system_iconv=yes) if test x$enable_libc = xyes; then 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_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_FUNCS(iconv) fi @@ -4306,7 +4306,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan. SUMMARY_video="${SUMMARY_video} uikit" have_video=yes 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" fi 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 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 SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c" fi