Commit 339f0d4097398c045482c091982848d0441768c8

Ozkan Sezer 2021-12-01T02:32:10

configure.ac: adjust os2 section for system iconv() use.

diff --git a/configure b/configure
index 91be8e5..a98fba1 100755
--- a/configure
+++ b/configure
@@ -26677,8 +26677,9 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
 
         # Set up the core platform files
         SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
-        # FIXME: use system iconv() if available?
-        SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
+        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
         # Use the Unix locale APIs.
         SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
         have_locale=yes
diff --git a/configure.ac b/configure.ac
index b7f0f66..442e406 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4416,8 +4416,9 @@ case "$host" in
 
         # Set up the core platform files
         SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
-        # FIXME: use system iconv() if available?
-        SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
+        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
         # Use the Unix locale APIs.
         SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
         have_locale=yes