diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-23 22:57:53 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-23 22:57:53 +0000 |
commit | a918b4b1b26aeedd0f21826d0f2f56f660f94d9c (patch) | |
tree | ea4b179c3e6ca7bc7c28e38bf2771cb7292ab57c /gcc/aclocal.m4 | |
parent | daeb6b83130235e15dbb8573cc0d1bb73a1aacae (diff) | |
download | gcc-a918b4b1b26aeedd0f21826d0f2f56f660f94d9c.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r-- | gcc/aclocal.m4 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index d772ee91f5b..9cd18a17c4c 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 ]) |