[commit: base] master: In configure, set $WINDOWS to YES or NO (9f05936)
Ian Lynagh
igloo at earth.li
Sun Jun 12 17:21:40 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9f0593645aff461745d6f656b24a363b47f6fd53
>---------------------------------------------------------------
commit 9f0593645aff461745d6f656b24a363b47f6fd53
Author: Ian Lynagh <igloo at earth.li>
Date: Sun Jun 12 12:59:04 2011 +0100
In configure, set $WINDOWS to YES or NO
rather than inlining the implementation of the test.
>---------------------------------------------------------------
configure.ac | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
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.
More information about the Cvs-libraries
mailing list