[commit: ghc] master: Remove HaveGcc (it was always YES) (e75227f)

Ian Lynagh igloo at earth.li
Sat Apr 23 00:34:14 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e75227feacf1434a342c8a7e6ec3619dc6771c39

>---------------------------------------------------------------

commit e75227feacf1434a342c8a7e6ec3619dc6771c39
Author: Ian Lynagh <igloo at earth.li>
Date:   Fri Apr 22 22:45:04 2011 +0100

    Remove HaveGcc (it was always YES)

>---------------------------------------------------------------

 aclocal.m4      |   30 +++++++++++-------------------
 mk/config.mk.in |    3 ---
 2 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 51aef93..4b6e855 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -694,32 +694,24 @@ rm -f conftest
 # FP_HAVE_GCC
 # -----------
 # Extra testing of the result AC_PROG_CC, testing the gcc version no. Sets the
-# output variables HaveGcc and GccVersion.
+# output variable GccVersion.
 AC_DEFUN([FP_HAVE_GCC],
 [AC_REQUIRE([AC_PROG_CC])
-if test -z "$GCC"; then
-   fp_have_gcc=NO
-else
-   fp_have_gcc=YES
-fi
-if test "$fp_have_gcc" = "NO"; then
+if test -z "$GCC"
+then
   AC_MSG_ERROR([gcc is required])
 fi
 GccLT34=
 AC_CACHE_CHECK([version of gcc], [fp_cv_gcc_version],
-[if test "$fp_have_gcc" = "YES"; then
-   fp_cv_gcc_version="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [[^0-9]]*\([[0-9.]]*\).*/\1/g'`"
-   FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [3.0],
-     [AC_MSG_ERROR([Need at least gcc version 3.0 (3.4+ recommended)])])
-   # See #2770: gcc 2.95 doesn't work any more, apparently.  There probably
-   # isn't a very good reason for that, but for now just make configure
-   # fail.
-   FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [3.4], GccLT34=YES)
- else
-   fp_cv_gcc_version="not-installed"
- fi
+[
+    fp_cv_gcc_version="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [[^0-9]]*\([[0-9.]]*\).*/\1/g'`"
+    FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [3.0],
+                        [AC_MSG_ERROR([Need at least gcc version 3.0 (3.4+ recommended)])])
+    # See #2770: gcc 2.95 doesn't work any more, apparently.  There probably
+    # isn't a very good reason for that, but for now just make configure
+    # fail.
+    FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [3.4], GccLT34=YES)
 ])
-AC_SUBST([HaveGcc], [$fp_have_gcc])
 AC_SUBST([GccVersion], [$fp_cv_gcc_version])
 AC_SUBST(GccLT34)
 ])# FP_HAVE_GCC
diff --git a/mk/config.mk.in b/mk/config.mk.in
index be8b57b..e6126f6 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -540,18 +540,15 @@ endif
 # the flag --with-gcc=<blah> instead.  The reason is that the configure script
 # needs to know which gcc you're using in order to perform its tests.
 
-HaveGcc 	= @HaveGcc@
 UseGcc  	= YES
 WhatGccIsCalled = @WhatGccIsCalled@
 GccVersion      = @GccVersion@
 GccLT34		= @GccLT34@
-ifeq "$(strip $(HaveGcc))" "YES"
 ifneq "$(strip $(UseGcc))"  "YES"
   CC	= cc
 else
   CC	= $(WhatGccIsCalled)
 endif
-endif
 
 # C compiler and linker flags from configure (e.g. -m<blah> to select
 # correct C compiler backend). The stage number is the stage of GHC





More information about the Cvs-ghc mailing list