X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=1cf01a4c646492668a1a0b95022bc014a17f4e1b;hb=04ad1d1046b16c51e4ba8f0eb47a11b5738c48ef;hp=b19e8008ff5c922f8689758f17bd118ac4e82f76;hpb=4d4e09c3de951466d81e9ade6273a5973079f4f1;p=ghc-base.git diff --git a/configure.ac b/configure.ac index b19e800..1cf01a4 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,13 @@ AC_ARG_WITH([cc], [CC=$withval]) AC_PROG_CC() +case `uname -s` in + MINGW*|CYGWIN*) + WINDOWS=YES;; + *) + WINDOWS=NO;; +esac + # do we have long longs? AC_CHECK_TYPES([long long]) @@ -138,11 +145,10 @@ FP_SEARCH_LIBS_PROTO(iconv, iconv_close(cd);], iconv, [EXTRA_LIBS="$EXTRA_LIBS $ac_lib"], - [case `uname -s` in - MINGW*|CYGWIN*) ;; - *) - AC_MSG_ERROR([iconv is required on non-Windows platforms]);; - esac]) + [if test "$WINDOWS" = "NO" + then + AC_MSG_ERROR([iconv is required on non-Windows platforms]) + fi]) # If possible, we use libcharset instead of nl_langinfo(CODESET) to # determine the current locale's character encoding.