From: Ian Lynagh Date: Sun, 12 Jun 2011 11:59:04 +0000 (+0100) Subject: In configure, set $WINDOWS to YES or NO X-Git-Url: http://git.megacz.com/?p=ghc-base.git;a=commitdiff_plain;h=04ad1d1046b16c51e4ba8f0eb47a11b5738c48ef;hp=a4f3f0790c84739ab08ee0e41a4b7a7132cdba0b In configure, set $WINDOWS to YES or NO rather than inlining the implementation of the test. --- 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.