Remove redundant tests for whether we're in a GHC tree
[ghc-hetmet.git] / aclocal.m4
index 0e72d22..51aef93 100644 (file)
@@ -181,8 +181,8 @@ AC_DEFUN([FP_EVAL_STDERR],
 # --------------------
 # XXX
 #
-# $1 = the command to look for
-# $2 = the variable to set
+# $1 = the variable to set
+# $2 = the command to look for
 #
 AC_DEFUN([FP_ARG_WITH_PATH_GNU_PROG],
 [
@@ -702,7 +702,7 @@ if test -z "$GCC"; then
 else
    fp_have_gcc=YES
 fi
-if test "$fp_have_gcc" = "NO" -a -d $srcdir/ghc; then
+if test "$fp_have_gcc" = "NO"; then
   AC_MSG_ERROR([gcc is required])
 fi
 GccLT34=
@@ -1116,7 +1116,7 @@ if test "$RELEASE" = "NO"; then
         AC_MSG_RESULT(given $PACKAGE_VERSION)
     elif test -d .git; then
         changequote(, )dnl
-        ver_date=`git log -n 1 --date=short --pretty=format:%ci | sed "s/^.*\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\).*$/\1\2\3/"`
+        ver_date=`git log -n 1 --date=short --pretty=format:%ci | cut -d ' ' -f 1 | tr -d -`
         if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else
         changequote([, ])dnl
                 AC_MSG_ERROR([failed to detect version date: check that git is in your path])