]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acspecific.m4 (_AC_PROG_ECHO): Modernize.
authorAkim Demaille <akim@epita.fr>
Mon, 10 Jul 2000 10:55:48 +0000 (10:55 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 10 Jul 2000 10:55:48 +0000 (10:55 +0000)
ChangeLog
acspecific.m4
lib/autoconf/specific.m4

index f7c835aa98f79abe5404afbbee59099042254c3c..6c7250305013d0d8e5f87740bf770d7b50c41d37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-07-10  Akim Demaille  <akim@epita.fr>
+
+       * acspecific.m4 (_AC_PROG_ECHO): Modernize.
+
 2000-07-10  Akim Demaille  <akim@epita.fr>
 
        Stop being ridiculous :*(
index 5db7b7201dbbe763d5453452a58c02cfe93a72cc..c3a31148875d9a217d478558ef150d07c3fc943e 100644 (file)
 # Don't try to cache, since the results of this macro are needed to
 # display the checking message.  In addition, caching something used once
 # has little interest.
-# Idea borrowed from dist 3.0.
+# Idea borrowed from dist 3.0.  Use `*c*,', not `*c,' because if `\c'
+# failed there is also a new-line to match.
 define([_AC_PROG_ECHO],
-[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says Kaveh R. Ghazi.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ECHO_N= ECHO_C='
-' ECHO_T='     '
-  else
-    ECHO_N=-n ECHO_C= ECHO_T=
-  fi
-else
-  ECHO_N= ECHO_C='\c' ECHO_T=
-fi
+[case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
 AC_SUBST(ECHO_C)dnl
 AC_SUBST(ECHO_N)dnl
 AC_SUBST(ECHO_T)dnl
index 5db7b7201dbbe763d5453452a58c02cfe93a72cc..c3a31148875d9a217d478558ef150d07c3fc943e 100644 (file)
 # Don't try to cache, since the results of this macro are needed to
 # display the checking message.  In addition, caching something used once
 # has little interest.
-# Idea borrowed from dist 3.0.
+# Idea borrowed from dist 3.0.  Use `*c*,', not `*c,' because if `\c'
+# failed there is also a new-line to match.
 define([_AC_PROG_ECHO],
-[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says Kaveh R. Ghazi.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ECHO_N= ECHO_C='
-' ECHO_T='     '
-  else
-    ECHO_N=-n ECHO_C= ECHO_T=
-  fi
-else
-  ECHO_N= ECHO_C='\c' ECHO_T=
-fi
+[case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
 AC_SUBST(ECHO_C)dnl
 AC_SUBST(ECHO_N)dnl
 AC_SUBST(ECHO_T)dnl