Browse Source

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

Ozkan Sezer 3 years ago
parent
commit
339f0d4097
2 changed files with 6 additions and 4 deletions
  1. 3 2
      configure
  2. 3 2
      configure.ac

+ 3 - 2
configure

@@ -26677,8 +26677,9 @@ $as_echo "#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"
-        # 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.
         # Use the Unix locale APIs.
         SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
         SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
         have_locale=yes
         have_locale=yes

+ 3 - 2
configure.ac

@@ -4416,8 +4416,9 @@ case "$host" in
 
 
         # 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"
-        # 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.
         # Use the Unix locale APIs.
         SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
         SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
         have_locale=yes
         have_locale=yes