# ensure we don't clash with any pre-supplied autoconf ones.
-# FP_ALTZONE
+# 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_DECL_ALTZONE
# -------------------
# Defines HAVE_DECL_ALTZONE to 1 if declared, 0 otherwise.
# Used by base package.
-AC_DEFUN([FP_ALTZONE],
+AC_DEFUN([FP_DECL_ALTZONE],
[AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_DECLS([altzone], [], [],[#if TIME_WITH_SYS_TIME
# include <time.h>
# endif
#endif])
-])# FP_ALTZONE
+])# FP_DECL_ALTZONE
# FP_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
FP_COMPUTE_INT([(long) (&((struct { char c; $1 ty; } *)0)->ty)],
[AS_TR_SH([fp_cv_alignment_$1])],
[AC_INCLUDES_DEFAULT([$3])],
- [AC_MSG_FAILURE([cannot compute alignment ($1), 77])])
+ [AC_MSG_ERROR([cannot compute alignment ($1)
+See `config.log' for more details.], [77])])
else
AS_TR_SH([fp_cv_alignment_$1])=0
fi])dnl
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
)])]
)
-dnl check for prototypes
-dnl
-AC_DEFUN([AC_C_PROTOTYPES],
-[AC_CACHE_CHECK([prototypes], ac_cv_prototypes,
-[AC_TRY_COMPILE([
-void foo(int);
-void foo(i)
-int i; {
-return;
-}
-],
-[int i;],
-ac_cv_prototypes=yes,
-ac_cv_prototypes=no)])
-if test "$ac_cv_prototypes" = yes; then
-AC_DEFINE([HAVE_PROTOTYPES])
-fi
-])
dnl ** Check which CATALOG file we have to use with DocBook SGML.
dnl