Ticket #5489: iconv.patch

File iconv.patch, 1.3 KB (added by btutt, 3 years ago)

Skip iconv/libcharset detection on Windows

  • configure.ac

    diff --git a/configure.ac b/configure.ac
    index 1db0c26..f69b12c 100644
    a b FP_CHECK_CONST([O_BINARY], [#include <fcntl.h>], [0]) 
    141141# header needs to be included as iconv_open is #define'd to something 
    142142# else. We therefore use our own FP_SEARCH_LIBS_PROTO, which allows us 
    143143# to give prototype text. 
     144# 
     145# Windows note: newer mingw installs include libiconv and libcharset 
     146# Continue to ignore iconv/libcharset support on Windows machines 
     147if test "$WINDOWS" != "YES"; then 
    144148FP_SEARCH_LIBS_PROTO(iconv, 
    145149                     [ 
    146150#include <stddef.h> 
    FP_SEARCH_LIBS_PROTO(iconv, 
    156160                      then 
    157161                          AC_MSG_ERROR([iconv is required on non-Windows platforms]) 
    158162                      fi]) 
    159  
    160163# If possible, we use libcharset instead of nl_langinfo(CODESET) to 
    161164# determine the current locale's character encoding. 
    162165FP_SEARCH_LIBS_PROTO( 
    FP_SEARCH_LIBS_PROTO( 
    166169    [charset], 
    167170    [AC_DEFINE([HAVE_LIBCHARSET], [1], [Define to 1 if you have libcharset.]) 
    168171     EXTRA_LIBS="$EXTRA_LIBS $ac_lib"]) 
     172else 
     173echo "skipped checking for iconv and libcharset on Windows: GHC doesn't support using iconv on Windows currently" 
     174fi 
     175 
    169176 
    170177# Hack - md5.h needs HsFFI.h.  Is there a better way to do this? 
    171178CFLAGS="-I../../includes $CFLAGS"