This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Followup to configure.in patch for make_compare_target


2003-08-07 Kelley Cook <kelleycook@wideopenwest.com>

* configure.in (gcc_cv_prog_cmp_skip): Flipflop make_compare_target
and gcc_cv_prog_cmp_skip.
This is OK for mainline.
Remember to add:
	* configure: Regenerate.

Done and committed.


Incidentally, the whole test should be abstracted. It should be a separate autoconf feature test, AC_PROG_CMP_IGNORE_INITIAL, living in aclocal.m4, which encapsulates the cache check, the assignment to the variable, and the AC_SUBST. Then configure.in should simply call it. But I'm not going to demand that you do that. :-)

Demand or not, it wasn't really that hard to do :)


Tested by configure; make configure-gcc

gcc/Makefile was the same before and after the test
config.cache still contains gcc_cv_prog_cmp_skip=gnucompare
Bootstrapped c-only on i686-pc-cygwin.

Is this OK?



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.

--- aclocal.m4.orig	2003-08-08 10:27:16.077201600 -0400
+++ aclocal.m4	2003-08-08 10:37:04.032640000 -0400
@@ -101,6 +101,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.
+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,
--- configure.in.orig	2003-08-08 10:30:40.421033600 -0400
+++ configure.in	2003-08-08 10:37:09.730833600 -0400
@@ -598,6 +598,9 @@
 AC_PROG_RANLIB
 gcc_AC_PROG_INSTALL
 
+# See if cmp has --ignore-initial.
+gcc_AC_PROG_CMP_IGNORE_INITIAL
+
 # See if we have the mktemp command.
 AC_CHECK_PROG(have_mktemp_command, mktemp, yes, no)
 
@@ -633,27 +636,6 @@
   GENERATED_MANPAGES=
 fi
 
-# 'make compare' can be significantly faster, if cmp itself can
-# skip bytes instead of using tail.  The test being performed is
-# "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
-# but we need to sink errors and handle broken shells.
-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)
-
 # How about lex?
 dnl Don't use AC_PROG_LEX; we insist on flex.
 dnl LEXLIB is not useful in gcc.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]