summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorpanne <unknown>2003-08-19 09:23:09 +0000
committerpanne <unknown>2003-08-19 09:23:09 +0000
commit6a0b7a2f1075aa200aa4fde54d34efb7e58a21f8 (patch)
tree37d703cdfa2257a2f7fbd98b76f0e0741080c81b /aclocal.m4
parent9c75067ef972c8003dede073a68e953ed15c61ad (diff)
downloadhaskell-6a0b7a2f1075aa200aa4fde54d34efb7e58a21f8.tar.gz
[project @ 2003-08-19 09:23:08 by panne]
Revamped FPTOOLS_PROG_DIFF
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m449
1 files changed, 24 insertions, 25 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index d07f365225..995b19b33f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -4,6 +4,30 @@
# ensure we don't clash with any pre-supplied autoconf ones.
+# FP_PROG_CONTEXT_DIFF
+# --------------------
+# Figure out how to do context diffs. Sets the output variable ContextDiffCmd.
+# NB: NeXTStep thinks diff'ing a file against itself is "trouble".
+# Used by ghc, glafp-utils/ltx, and glafp-utils/runstdtest
+AC_DEFUN([FP_PROG_CONTEXT_DIFF],
+[AC_CACHE_CHECK([for a working context diff], [fp_cv_context_diff],
+[echo foo > conftest1
+echo foo > conftest2
+fp_cv_context_diff=no
+for fp_var in '-C 1' '-c1'
+do
+ if diff $fp_var conftest1 conftest2 > /dev/null 2>&1; then
+ fp_cv_context_diff="diff $fp_var"
+ break
+ fi
+done])
+if test x"$fp_cv_context_diff" = xno; then
+ AC_MSG_ERROR([cannot figure out how to do context diffs])
+fi
+AC_SUBST(ContextDiffCmd, [$fp_cv_context_diff])
+])# FP_PROG_CONTEXT_DIFF
+
+
# FP_ALTZONE
# -------------------
# Defines HAVE_DECL_ALTZONE to 1 if declared, 0 otherwise.
@@ -270,31 +294,6 @@ AlexVersion=$fptools_cv_alex_version;
AC_SUBST(AlexVersion)
])
-dnl
-dnl What's the best way of doing context diffs?
-dnl
-dnl (NB: NeXTStep thinks diff'ing a file against itself is "trouble")
-dnl
-AC_DEFUN(FPTOOLS_PROG_DIFF,
-[AC_CACHE_CHECK([for ok way to do context diffs], fptools_cv_context_diffs,
-[echo foo > conftest1
-echo foo > conftest2
-if diff -C 1 conftest1 conftest2 > /dev/null 2>&1 ; then
- fptools_cv_context_diffs='diff -C 1'
-else
- if diff -c1 conftest1 conftest2 > /dev/null 2>&1 ; then
- fptools_cv_context_diffs='diff -c1'
- else
- echo "Can't figure out how to do context diffs."
- echo "Neither \`diff -C 1' nor \`diff -c1' works."
- exit 1
- fi
-fi
-rm -f conftest1 conftest2
-])
-ContextDiffCmd=$fptools_cv_context_diffs
-AC_SUBST(ContextDiffCmd)
-])
dnl
dnl Check whether ld supports -x