]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix $ECHO test to not influence other _AS_DETECT_SUGGESTED code.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 23 Nov 2008 14:36:14 +0000 (15:36 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 23 Nov 2008 14:36:14 +0000 (15:36 +0100)
* libltdl/m4/libtool.m4 (_LT_PROG_ECHO_BACKSLASH): Fix test to
not influence further tests registered with _AS_DETECT_SUGGESTED
and do not use a PATH below /tmp, to avoid influence by a third
party.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/m4/libtool.m4

index af83a7281cbcf2017f41108d4acdc5c6b3fea7f3..d7ae7cd6576ba404c6955f9a963b745760242b68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-11-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+           Eric Blake  <ebb9@byu.net>
+
+       Fix $ECHO test to not influence other _AS_DETECT_SUGGESTED code.
+       * libltdl/m4/libtool.m4 (_LT_PROG_ECHO_BACKSLASH): Fix test to
+       not influence further tests registered with _AS_DETECT_SUGGESTED
+       and do not use a PATH below /tmp, to avoid influence by a third
+       party.
+
 2008-11-23  Alon Bar-Lev  <alon.barlev@gmail.com>  (tiny change)
 
        Fix func_win32_libid for 64-bit Windows.
index 633d8f8e4dc8eac969607b0af6b01a31c1c6d28d..5d1a131c30210416c8a5205fc33aef921ec06f9c 100644 (file)
@@ -1114,12 +1114,13 @@ esac
 
 m4_ifdef([_AS_DETECT_SUGGESTED],
 [_AS_DETECT_SUGGESTED([
-  ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-  ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-  ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-  PATH=/tmp/nonexistent; export PATH;
-  FPATH=$PATH; export FPATH;
-  test "X`printf %s $ECHO`" = "X$ECHO"])])
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])