aboutsummaryrefslogtreecommitdiff
path: root/gcc/aclocal.m4
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2003-09-23 22:57:53 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2003-09-23 22:57:53 +0000
commit269a734355231cf7b16f94c93cd29dcabca37c16 (patch)
treeea4b179c3e6ca7bc7c28e38bf2771cb7292ab57c /gcc/aclocal.m4
parentd84a4ef1dd14d8d7b670a0758d302874c2dc0f1d (diff)
downloadgcc-269a734355231cf7b16f94c93cd29dcabca37c16.zip
gcc-269a734355231cf7b16f94c93cd29dcabca37c16.tar.gz
gcc-269a734355231cf7b16f94c93cd29dcabca37c16.tar.bz2
Makefile.in (gnucompare*): Merge into ...
* Makefile.in (gnucompare*): Merge into ... (slowcompare*): ... here. (fastcompare*): New targets. * aclocal.m4 (gcc_AC_PROG_CMP_IGNORE_INITIAL): Add checks for other "fast" cmp programs. * configure: Regenerate. From-SVN: r71703
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r--gcc/aclocal.m418
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
index d772ee9..9cd18a1 100644
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -104,19 +104,29 @@ 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.
+dnl but we need to sink errors and handle broken shells. We also test
+dnl for the parameter format "cmp file1 file2 skip1 skip2" which is
+dnl accepted by cmp on some systems.
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
+ gcc_cv_prog_cmp_skip=slowcompare
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
+ if test $gcc_cv_prog_cmp_skip = slowcompare ; then
+ if cmp t1 t2 2 2 > /dev/null 2>&1; then
+ if cmp t1 t2 1 1 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip=fastcompare
+ fi
+ fi
fi
rm t1 t2
])