summaryrefslogtreecommitdiff
path: root/gcc/aclocal.m4
diff options
context:
space:
mode:
authorkcook <kcook@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-12 22:35:22 +0000
committerkcook <kcook@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-12 22:35:22 +0000
commit8fea036f5a3c87749a5604d695c1f07891d9bde9 (patch)
tree6c5aa4b2b905b67311a369a7b7b55d265ed4e28f /gcc/aclocal.m4
parent8172be2250c74e18eb090963103ca829b5270272 (diff)
downloadgcc-8fea036f5a3c87749a5604d695c1f07891d9bde9.tar.gz
2003-08-08 Kelley Cook <kelleycook@wideopenwest.com>
* configure.in (make_compare_target): Move test to ... * aclocal.m4 (gcc_AC_PROG_CMP_IGNORE_INITIAL): here. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r--gcc/aclocal.m423
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
index ebdb5b28007..d772ee91f5b 100644
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -101,6 +101,29 @@ if test x = y ; then
fi
])
+dnl 'make compare' can be significantly faster, if cmp itself can
+dnl skip bytes instead of using tail. The test being performed is
+dnl "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
+dnl but we need to sink errors and handle broken shells.
+AC_DEFUN(gcc_AC_PROG_CMP_IGNORE_INITIAL,
+[AC_CACHE_CHECK([for cmp's capabilities], gcc_cv_prog_cmp_skip,
+[ echo abfoo >t1
+ echo cdfoo >t2
+ if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
+ if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
+ gcc_cv_prog_cmp_skip=slowcompare
+ else
+ gcc_cv_prog_cmp_skip=gnucompare
+ fi
+ else
+ gcc_cv_prog_cmp_skip=slowcompare
+ fi
+ rm t1 t2
+])
+make_compare_target=$gcc_cv_prog_cmp_skip
+AC_SUBST(make_compare_target)
+])
+
dnl See if the printf functions in libc support %p in format strings.
AC_DEFUN(gcc_AC_FUNC_PRINTF_PTR,
[AC_CACHE_CHECK(whether the printf functions support %p,