From 447a83159b6702d3644370774d334f3ba17c1bf4 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 23 Nov 2008 15:36:14 +0100 Subject: [PATCH] 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. Signed-off-by: Ralf Wildenhues --- ChangeLog | 9 +++++++++ libltdl/m4/libtool.m4 | 13 +++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index af83a7281..d7ae7cd65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-11-23 Ralf Wildenhues + Eric Blake + + 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 (tiny change) Fix func_win32_libid for 64-bit Windows. diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 633d8f8e4..5d1a131c3 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -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]) -- 2.47.3