From a453acdc324c9d56935ba927e0f35ee00b47059a Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Thu, 23 Sep 2004 00:13:02 +0000 Subject: [PATCH] * m4/libtool.m4: _LT_DECL uppercase ECHO. * config/ltmain.in: Use it throughout. (func_mkdir_p): Now matches the other implementations in tests/defs and libtoolize.in. * tests/sh.test: Updated to detect ECHO misuse. --- ChangeLog | 8 + config/ltmain.in | 705 ++++++++++++++++++++++++----------------------- m4/libtool.m4 | 2 +- tests/sh.test | 2 +- 4 files changed, 363 insertions(+), 354 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47f96afe8..ab76958f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-09-23 Gary V. Vaughan + + * m4/libtool.m4: _LT_DECL uppercase ECHO. + * config/ltmain.in: Use it throughout. + (func_mkdir_p): Now matches the other implementations in + tests/defs and libtoolize.in. + * tests/sh.test: Updated to detect ECHO misuse. + 2004-09-22 Gary V. Vaughan * config/ltmain.in (func_mode_link): Propagate a convenience diff --git a/config/ltmain.in b/config/ltmain.in index 43846d28f..812799f1b 100644 --- a/config/ltmain.in +++ b/config/ltmain.in @@ -86,9 +86,10 @@ DUALCASE=1; export DUALCASE # for MKS sh (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +: ${ECHO="echo"} : ${MKDIR="mkdir"} -: ${RM="rm -f"} : ${MV="mv -f"} +: ${RM="rm -f"} dirname="s,/[^/]*$,," basename="s,^.*/,,g" @@ -102,12 +103,12 @@ progpath="$0" # The name of this program: PROGRAM=ltmain.sh -progname=`echo "$progpath" | $SED "$basename"` +progname=`$ECHO "$progpath" | $SED "$basename"` # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; - *) progdir=`echo "$progpath" | $SED "$dirname"` + *) progdir=`$ECHO "$progpath" | $SED "$dirname"` progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; @@ -124,18 +125,18 @@ VERSION=@VERSION@ TIMESTAMP="@TIMESTAMP@" package_revision=@package_revision@ -# Check that we have a working $echo. +# Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! +elif test "X`($ECHO '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! : else - # Restart under the correct shell, and then maybe $echo will work. + # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi @@ -157,7 +158,7 @@ magic="%%%MAGIC variable%%%" Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' # test EBCDIC or ASCII -case `$echo A|tr A '\301'` in +case `$ECHO A|tr A '\301'` in A) # EBCDIC based system SP2NL="tr '\100' '\n'" NL2SP="tr '\r\n' '\100\100'" @@ -188,7 +189,7 @@ fi mode=$default_mode nonopt= run= -show="$echo" +show="$ECHO" execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" @@ -207,7 +208,7 @@ exec_cmd= # name if it has been set yet. func_echo () { - $echo $progname${mode+: }$mode: ${1+"$@"} + $ECHO $progname${mode+: }$mode: ${1+"$@"} } # func_verbose arg... @@ -221,14 +222,14 @@ func_verbose () # Echo program name prefixed message to standard error. func_error () { - $echo $progname${mode+: }$mode: ${1+"$@"} 1>&2 + $ECHO $progname${mode+: }$mode: ${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $echo $progname${mode+: }$mode: warning: ${1+"$@"} 1>&2 + $ECHO $progname${mode+: }$mode: warning: ${1+"$@"} 1>&2 } # func_fatal_error arg... @@ -288,8 +289,8 @@ func_usage () s/\$progname/'$progname'/; p; }; d' < "$progpath" - echo - echo "run \`$progname --help | more' for full usage" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" exit $EXIT_SUCCESS } @@ -334,16 +335,16 @@ func_config () # Display the features supported by this script. func_features () { - $echo "host: $host" + $ECHO "host: $host" if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" + $ECHO "enable shared libraries" else - $echo "disable shared libraries" + $ECHO "disable shared libraries" fi if test "$build_old_libs" = yes; then - $echo "enable static libraries" + $ECHO "enable static libraries" else - $echo "disable static libraries" + $ECHO "disable static libraries" fi exit $EXIT_SUCCESS @@ -402,7 +403,7 @@ func_mode_help () ;; clean) - $echo \ + $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. @@ -416,7 +417,7 @@ with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) - $echo \ + $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. @@ -439,7 +440,7 @@ library object suffix, \`.lo'." ;; execute) - $echo \ + $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. @@ -459,7 +460,7 @@ Then, COMMAND is executed, with ARGS as arguments." ;; finish) - $echo \ + $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. @@ -471,7 +472,7 @@ the \`--dry-run' option if you just want to see what would be executed." ;; install) - $echo \ + $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. @@ -488,7 +489,7 @@ BSD-compatible install options are recognized)." ;; link) - $echo \ + $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to @@ -546,7 +547,7 @@ is created, otherwise an executable program is created." ;; uninstall) - $echo \ + $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. @@ -564,8 +565,8 @@ Otherwise, only FILE itself is deleted using RM." ;; esac - $echo - $echo "Try \`$progname --help' for more information about other modes." + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." exit $EXIT_SUCCESS } @@ -669,22 +670,22 @@ Otherwise, only FILE itself is deleted using RM." # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) - arg=`echo "$opt" | $SED "$my_sed_long_arg"` - opt=`echo "$opt" | $SED "$my_sed_long_opt"` + arg=`$ECHO "$opt" | $SED "$my_sed_long_arg"` + opt=`$ECHO "$opt" | $SED "$my_sed_long_opt"` set -- "$opt" "$arg" ${1+"$@"} ;; # Separate optargs to short options: # -x*|-y*) -# arg=`echo "$opt" |$SED "$my_sed_single_rest"` -# opt=`echo "$opt" |$SED "$my_sed_single_opt"` +# arg=`$ECHO "$opt" |$SED "$my_sed_single_rest"` +# opt=`$ECHO "$opt" |$SED "$my_sed_single_opt"` # set -- "$opt" "$arg" ${1+"$@"} # ;; # Separate non-argument short options: # -z*|-z*|-y*) -# rest=`echo "$opt" |$SED "$my_sed_single_rest"` -# opt=`echo "$opt" |$SED "$my_sed_single_opt"` +# rest=`$ECHO "$opt" |$SED "$my_sed_single_rest"` +# opt=`$ECHO "$opt" |$SED "$my_sed_single_opt"` # set -- "$opt" "-$rest" ${1+"$@"} # ;; @@ -743,9 +744,9 @@ func_mkdir_p () case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$echo "$my_directory_path" | $SED "$dirname"` + my_directory_path=`$ECHO "$my_directory_path" | $SED "$dirname"` done - my_dir_list=`$echo $my_dir_list | $SED 's,:*$,,'` + my_dir_list=`$ECHO $my_dir_list | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do @@ -794,7 +795,7 @@ func_mktempdir () func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - echo "$my_tmpdir" + $ECHO "$my_tmpdir" } @@ -888,7 +889,7 @@ func_win32_libid () { esac ;; esac - $echo $win32_libid_type + $ECHO $win32_libid_type } @@ -909,7 +910,7 @@ func_infer_tag () { case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) @@ -924,7 +925,7 @@ func_infer_tag () { CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. @@ -957,7 +958,7 @@ func_generate_dlsyms () { my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" - my_prefix=`echo "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then @@ -981,7 +982,7 @@ func_generate_dlsyms () { # Parse the name list into a source file. func_echo "creating $output_objdir/$my_dlsyms" - test -z "$run" && $echo > "$output_objdir/$my_dlsyms" "\ + test -z "$run" && $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ @@ -995,10 +996,10 @@ extern \"C\" { if test "$dlself" = yes; then func_echo "generating symbol list for \`$output'" - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + test -z "$run" && $ECHO ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_echo "extracting global C symbols from \`$progfile'" $run eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" @@ -1038,8 +1039,8 @@ extern \"C\" { for dlprefile in $dlprefiles; do func_echo "extracting global C symbols from \`$dlprefile'" - name=`$echo "$dlprefile" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' + name=`$ECHO "$dlprefile" | ${SED} -e 's%^.*/%%'` + $run eval '$ECHO ": $name " >> "$nlist"' $run eval "$NM $dlprefile | $global_symbol_pipe >> '$nlist'" done @@ -1068,16 +1069,16 @@ extern \"C\" { if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - $echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - $echo >> "$output_objdir/$my_dlsyms" "\ + $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) - $echo >> "$output_objdir/$my_dlsyms" "\ + $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ @@ -1085,13 +1086,13 @@ extern \"C\" { " ;; *) - $echo >> "$output_objdir/$my_dlsyms" "\ + $ECHO >> "$output_objdir/$my_dlsyms" "\ const struct { " ;; esac - $echo >> "$output_objdir/$my_dlsyms" "\ + $ECHO >> "$output_objdir/$my_dlsyms" "\ const char *name; void *address; } @@ -1102,7 +1103,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] = eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - $echo >> "$output_objdir/$my_dlsyms" "\ + $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; @@ -1155,16 +1156,16 @@ static const void *lt_preloaded_setup() { case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; @@ -1178,8 +1179,8 @@ static const void *lt_preloaded_setup() { # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } @@ -1198,7 +1199,7 @@ func_extract_archives () { [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib=`$ECHO "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xdir="$my_gentop/$my_xlib" func_mkdir_p "$my_xdir" @@ -1215,7 +1216,7 @@ func_extract_archives () { darwin_base_archive=`basename $darwin_archive` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_echo "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do @@ -1266,7 +1267,7 @@ func_extract_archives () { name_to="$name" while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to" do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + name_to=`$ECHO "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $MV '$name' '$name_to')" $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $MV '$name' '$name_to')" || exit $? @@ -1336,7 +1337,7 @@ func_mode_compile () ;; # replaced later. I would guess that would be a bug. -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + args=`$ECHO "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do @@ -1345,7 +1346,7 @@ func_mode_compile () lastarg="$lastarg $func_quote_for_eval_result" done IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + lastarg=`$ECHO "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" @@ -1364,7 +1365,7 @@ func_mode_compile () esac # case $arg_mode # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + lastarg=`$ECHO "X$lastarg" | $Xsed -e "$sed_quote_subst"` func_quote_for_eval "$lastarg" base_compile="$base_compile $func_quote_for_eval_result" done # for arg @@ -1378,7 +1379,7 @@ func_mode_compile () ;; *) # Get the name of the library object. - test -z "$libobj" && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + test -z "$libobj" && libobj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac @@ -1401,10 +1402,10 @@ func_mode_compile () *.java) xform=java ;; esac - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + libobj=`$ECHO "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *.lo) obj=`$ECHO "X$libobj" | $Xsed -e "$lo2o"` ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; @@ -1439,8 +1440,8 @@ func_mode_compile () esac done - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + objname=`$ECHO "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$ECHO "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else @@ -1475,7 +1476,7 @@ func_mode_compile () # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $RM $removelist; exit $EXIT_FAILURE" 1 2 15 @@ -1494,7 +1495,7 @@ func_mode_compile () done elif test "$need_locks" = warn; then if test -f "$lockfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` @@ -1508,7 +1509,7 @@ compiler." $run $RM $removelist exit $EXIT_FAILURE fi - $echo $srcfile > "$lockfile" + $ECHO $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then @@ -1559,7 +1560,7 @@ EOF if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1631,7 +1632,7 @@ EOF if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $echo "\ + $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1726,7 +1727,7 @@ func_mode_execute () continue fi - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then @@ -1738,7 +1739,7 @@ func_mode_execute () *.lo) # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; @@ -1785,7 +1786,7 @@ func_mode_execute () ;; esac # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + file=`$ECHO "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done @@ -1808,10 +1809,10 @@ func_mode_execute () else # Display what would be done. if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" fi - $echo "$cmd$args" + $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } @@ -1855,40 +1856,40 @@ func_mode_finish () # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS - $echo "----------------------------------------------------------------------" - $echo "Libraries have been installed in:" + $ECHO "----------------------------------------------------------------------" + $ECHO "Libraries have been installed in:" for libdir in $libdirs; do - $echo " $libdir" + $ECHO " $libdir" done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" fi if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $echo " - use the \`$flag' linker flag" + $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" + $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "----------------------------------------------------------------------" + $ECHO + $ECHO "See any operating system documentation about shared libraries for" + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + $ECHO "----------------------------------------------------------------------" exit $EXIT_SUCCESS } @@ -1900,9 +1901,9 @@ func_mode_install () # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | $Xsed | $GREP shtool > /dev/null; then + $ECHO "X$nonopt" | $Xsed | $GREP shtool > /dev/null; then # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + arg=`$ECHO "X$nonopt" | $Xsed -e "$sed_quote_subst"` func_quote_for_eval "$arg" install_prog="$func_quote_for_eval_result " arg="$1" @@ -1914,7 +1915,7 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + arg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"` func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" @@ -1958,7 +1959,7 @@ func_mode_install () esac # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + arg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"` func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done @@ -1978,7 +1979,7 @@ func_mode_install () fi # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + dest=`$ECHO "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes @@ -1986,9 +1987,9 @@ func_mode_install () destdir="$dest" destname= else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + destdir=`$ECHO "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + destname=`$ECHO "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files @@ -2053,13 +2054,13 @@ func_mode_install () esac fi - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -2072,9 +2073,9 @@ func_mode_install () if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" @@ -2126,7 +2127,7 @@ func_mode_install () fi # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + name=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? @@ -2142,14 +2143,14 @@ func_mode_install () if test -n "$destname"; then destfile="$destdir/$destname" else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + staticdest=`$ECHO "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" @@ -2169,7 +2170,7 @@ func_mode_install () # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + staticobj=`$ECHO "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? @@ -2182,7 +2183,7 @@ func_mode_install () if test -n "$destname"; then destfile="$destdir/$destname" else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi @@ -2193,7 +2194,7 @@ func_mode_install () case $file in *.exe) if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` + file=`$ECHO $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; @@ -2202,7 +2203,7 @@ func_mode_install () # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + wrapper=`$ECHO $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file @@ -2240,7 +2241,7 @@ func_mode_install () *) . ./$lib ;; esac fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no @@ -2265,10 +2266,10 @@ func_mode_install () if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then func_mktempdir "${TMPDIR-/tmp}/libtool-XXXXXXXX" - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + file=`$ECHO "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : @@ -2283,7 +2284,7 @@ func_mode_install () fi else # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi @@ -2299,7 +2300,7 @@ func_mode_install () destfile=$destfile.exe ;; *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + destfile=`$ECHO $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; @@ -2312,7 +2313,7 @@ func_mode_install () done for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + name=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" @@ -2463,7 +2464,7 @@ func_mode_link () while test "$#" -gt 0; do arg="$1" shift - qarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + qarg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"` libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. @@ -2576,7 +2577,7 @@ func_mode_link () fi # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else @@ -2634,15 +2635,15 @@ func_mode_link () # Dry-run case. # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + pic_object=`$ECHO "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$ECHO "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi @@ -2796,7 +2797,7 @@ func_mode_link () ;; -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + dir=`$ECHO "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2919,7 +2920,7 @@ func_mode_link () ;; -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + dir=`$ECHO "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2975,7 +2976,7 @@ func_mode_link () ;; -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + args=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do @@ -2985,11 +2986,11 @@ func_mode_link () compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + arg=`$ECHO "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + args=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do @@ -3000,7 +3001,7 @@ func_mode_link () linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + arg=`$ECHO "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) @@ -3024,7 +3025,7 @@ func_mode_link () # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC -64|-mips[0-9]|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + arg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"` func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" compile_command="$compile_command $arg" @@ -3035,7 +3036,7 @@ func_mode_link () # Some other compiler flag. -* | +*) - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + arg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"` func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; @@ -3068,7 +3069,7 @@ func_mode_link () fi # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else @@ -3126,15 +3127,15 @@ func_mode_link () # Dry-run case. # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + pic_object=`$ECHO "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$ECHO "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi @@ -3169,7 +3170,7 @@ func_mode_link () *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + arg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"` func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; @@ -3193,19 +3194,19 @@ func_mode_link () oldlibs= # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + outputname=`$ECHO "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + output_objdir=`$ECHO "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else @@ -3326,7 +3327,7 @@ func_mode_link () # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do - deplib_base=`echo "$deplib" |$SED "$basename"` + deplib_base=`$ECHO "$deplib" |$SED "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; @@ -3363,7 +3364,7 @@ func_mode_link () deplibs="$deplib $deplibs" continue fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + name=`$ECHO "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library @@ -3407,7 +3408,7 @@ func_mode_link () done if test "X$ll" = "X$old_library" ; then # only static version available found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + ladir=`$ECHO "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then @@ -3447,7 +3448,7 @@ func_mode_link () deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + newlib_search_path="$newlib_search_path "`$ECHO "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then @@ -3460,7 +3461,7 @@ func_mode_link () compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + newlib_search_path="$newlib_search_path "`$ECHO "X$deplib" | $Xsed -e 's/^-L//'` ;; *) func_warning "\`-L' is ignored for archives/objects" @@ -3470,7 +3471,7 @@ func_mode_link () ;; # -L -R*) if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + dir=`$ECHO "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; @@ -3498,7 +3499,7 @@ func_mode_link () match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ + if eval $ECHO \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes @@ -3509,17 +3510,17 @@ func_mode_link () ;; esac if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not use here." + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; @@ -3570,7 +3571,7 @@ func_mode_link () func_fatal_error "\`$lib' is not a valid libtool archive" fi - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + ladir=`$ECHO "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= @@ -3595,9 +3596,9 @@ func_mode_link () *-*-darwin*) # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then - inherited_linker_flags=`$echo "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` fi - dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -3675,7 +3676,7 @@ func_mode_link () fi ;; esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + laname=`$ECHO "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then @@ -3701,7 +3702,7 @@ func_mode_link () notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + name=`$ECHO "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then @@ -3751,7 +3752,7 @@ func_mode_link () tmp_libs= for deplib in $dependency_libs; do case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + -L*) newlib_search_path="$newlib_search_path "`$ECHO "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then @@ -3835,13 +3836,13 @@ func_mode_link () fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $echo + $ECHO if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" + $ECHO "*** Warning: Linking the executable $output against the loadable module" else - $echo "*** Warning: Linking the shared library $output against the loadable module" + $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi - $echo "*** $linklib is not portable!" + $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then @@ -3873,7 +3874,7 @@ func_mode_link () set dummy $library_names realname="$2" shift; shift - libname=`eval \\$echo \"$libname_spec\"` + libname=`eval \\$ECHO \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" @@ -3892,8 +3893,8 @@ func_mode_link () # Make a new name for the extract_expsyms_cmds to use soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + soname=`$ECHO $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$ECHO $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : @@ -3945,11 +3946,11 @@ func_mode_link () if /usr/bin/file -L $add 2> /dev/null | $GREP "bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then - $echo "*** Warning: lib $linklib is a module, not a shared library" + $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then - $echo - $echo "*** And there doesn't seem to be a static archive available" - $echo "*** The link will probably fail, sorry" + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi @@ -4087,21 +4088,21 @@ func_mode_link () # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module @@ -4127,7 +4128,7 @@ func_mode_link () temp_deplibs= for libdir in $dependency_libs; do case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + -R*) temp_xrpath=`$ECHO "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; @@ -4159,7 +4160,7 @@ func_mode_link () case $deplib in -L*) path="$deplib" ;; *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + dir=`$ECHO "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in @@ -4351,7 +4352,7 @@ func_mode_link () # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + name=`$ECHO "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; @@ -4361,11 +4362,11 @@ func_mode_link () if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + name=`$ECHO "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + libname=`$ECHO "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac @@ -4374,9 +4375,9 @@ func_mode_link () if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi @@ -4629,14 +4630,14 @@ func_mode_link () # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= - tempremovelist=`$echo "$output_objdir/*"` + tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + if $ECHO $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi @@ -4657,14 +4658,14 @@ func_mode_link () oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` - deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` + lib_search_path=`$ECHO "$lib_search_path " | ${SED} -e 's% $path % %g'` + deplibs=`$ECHO "$deplibs " | ${SED} -e 's% -L$path % %g'` + dependency_libs=`$ECHO "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then @@ -4777,21 +4778,21 @@ EOF esac fi if test -n "$i" ; then - libname=`eval \\$echo \"$libname_spec\"` - deplib_matches=`eval \\$echo \"$library_names_spec\"` + libname=`eval \\$ECHO \"$libname_spec\"` + deplib_matches=`eval \\$ECHO \"$library_names_spec\"` set dummy $deplib_matches deplib_match=$2 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then newdeplibs="$newdeplibs $i" else droppeddeps=yes - $echo - $echo "*** Warning: dynamic linker does not accept needed library $i." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which I believe you do not have" - $echo "*** because a test_compile did reveal that the linker did not use it for" - $echo "*** its dynamic dependency list that programs get resolved with at runtime." + $ECHO + $ECHO "*** Warning: dynamic linker does not accept needed library $i." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which I believe you do not have" + $ECHO "*** because a test_compile did reveal that the linker did not use it for" + $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." fi fi else @@ -4819,30 +4820,30 @@ EOF esac fi if test -n "$i" ; then - libname=`eval \\$echo \"$libname_spec\"` - deplib_matches=`eval \\$echo \"$library_names_spec\"` + libname=`eval \\$ECHO \"$libname_spec\"` + deplib_matches=`eval \\$ECHO \"$library_names_spec\"` set dummy $deplib_matches deplib_match=$2 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then newdeplibs="$newdeplibs $i" else droppeddeps=yes - $echo - $echo "*** Warning: dynamic linker does not accept needed library $i." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because a test_compile did reveal that the linker did not use this one" - $echo "*** as a dynamic dependency that programs can get resolved with at runtime." + $ECHO + $ECHO "*** Warning: dynamic linker does not accept needed library $i." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because a test_compile did reveal that the linker did not use this one" + $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes - $echo - $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" - $echo "*** library that it depends on before this library will be fully" - $echo "*** functional. Installing it before continuing would be even better." + $ECHO + $ECHO "*** Warning! Library $i is needed by this library but I was not able to" + $ECHO "*** make it link in! You will probably need to install it or some" + $ECHO "*** library that it depends on before this library will be fully" + $ECHO "*** functional. Installing it before continuing would be even better." fi else newdeplibs="$newdeplibs $i" @@ -4866,7 +4867,7 @@ EOF esac fi if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` + libname=`eval \\$ECHO \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do @@ -4885,7 +4886,7 @@ EOF potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | @@ -4900,17 +4901,17 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" fi fi else @@ -4935,12 +4936,12 @@ EOF esac fi if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` + libname=`eval \\$ECHO \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null | + if eval $ECHO \"$potent_lib\" 2>/dev/null | ${SED} 10q | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" @@ -4952,17 +4953,17 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi else @@ -4973,23 +4974,23 @@ EOF ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed \ + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + tmp_deplibs=`$ECHO "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then - $echo + $ECHO if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else - $echo "*** Warning: inter-library dependencies are not known to be supported." + $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi - $echo "*** All declared inter-library dependencies are being dropped." + $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; @@ -5003,23 +5004,23 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" @@ -5029,16 +5030,16 @@ EOF build_libtool_libs=no fi else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module @@ -5055,9 +5056,9 @@ EOF # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - inherited_linker_flags=`$echo "X $inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$echo "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + inherited_linker_flags=`$ECHO "X $inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -5150,7 +5151,7 @@ EOF done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then @@ -5185,7 +5186,7 @@ EOF fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + $run eval '$ECHO "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= @@ -5262,7 +5263,7 @@ EOF save_libobjs=$libobjs fi save_output=$output - output_la=`echo "$output" | $SED $basename` + output_la=`$ECHO "$output" | $SED $basename` # Clear the reloadable object creation command queue and # initialize k to one. @@ -5276,12 +5277,12 @@ EOF if test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnk func_echo "creating GNU ld script: $output" - $echo 'INPUT (' > $output + $ECHO 'INPUT (' > $output for obj in $save_libobjs do - $echo \""$obj"\" >> $output + $ECHO \""$obj"\" >> $output done - $echo ')' >> $output + $ECHO ')' >> $output else func_echo "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext @@ -5469,7 +5470,7 @@ EOF func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` + obj=`$ECHO "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= @@ -5503,7 +5504,7 @@ EOF fi # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds @@ -5534,8 +5535,8 @@ EOF # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? + # $show "$ECHO timestamp > $libobj" + # $run eval "$ECHO timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi @@ -5564,7 +5565,7 @@ EOF prog) case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + *cygwin*) output=`$ECHO $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" @@ -5581,8 +5582,8 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac @@ -5599,8 +5600,8 @@ EOF esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -5701,15 +5702,15 @@ EOF if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -5776,7 +5777,7 @@ EOF # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $RM $output # Link the executable and exit @@ -5796,7 +5797,7 @@ EOF if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -5808,7 +5809,7 @@ EOF fi # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname @@ -5828,23 +5829,23 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + var_value=`$ECHO "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. @@ -5852,21 +5853,21 @@ EOF # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + *.exe) output=`$ECHO $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + outputname=`$ECHO $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` - cwrappersource=`$echo "$output_path/$objdir/lt-$output_name.c"` - cwrapper=`$echo "$output_path/$output_name.exe"` + cwrappersource=`$ECHO "$output_path/$objdir/lt-$output_name.c"` + cwrapper=`$ECHO "$output_path/$output_name.exe"` $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -6210,7 +6211,7 @@ EOF $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - $echo > $output "\ + $ECHO > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname @@ -6238,33 +6239,33 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else - # When we are sourced in execute mode, \$file and \$echo are already set. + # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" + ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! + elif test \"X\`(\$ECHO '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! : else - # Restart under the correct shell, and then maybe \$echo will work. + # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " - $echo >> $output "\ + $ECHO >> $output "\ # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then @@ -6274,7 +6275,7 @@ else esac fi - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done @@ -6284,7 +6285,7 @@ else " if test "$fast_install" = yes; then - $echo >> $output "\ + $ECHO >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" @@ -6300,13 +6301,13 @@ else $RM \"\$progdir/\$file\" fi" - $echo >> $output "\ + $ECHO >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $echo \"\$relink_command_output\" >&2 + $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -6318,25 +6319,25 @@ else $RM \"\$progdir/\$file\" fi" else - $echo >> $output "\ + $ECHO >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi - $echo >> $output "\ + $ECHO >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ + $ECHO >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " @@ -6344,39 +6345,39 @@ else # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then - $echo >> $output "\ + $ECHO >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi - $echo >> $output "\ + $ECHO >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) - $echo >> $output "\ + $ECHO >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) - $echo >> $output "\ + $ECHO >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + $ECHO >> $output "\ + \$ECHO \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi else # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + \$ECHO \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ @@ -6448,7 +6449,7 @@ fi\ # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do - $echo "X$obj" | $Xsed -e 's%^.*/%%' + $ECHO "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else @@ -6518,13 +6519,13 @@ fi\ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + var_value=`$ECHO "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -6542,7 +6543,7 @@ fi\ for deplib in $dependency_libs; do case $deplib in *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + name=`$ECHO "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" @@ -6557,7 +6558,7 @@ fi\ for lib in $dlfiles; do case $lib in *.la) - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + name=`$ECHO "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" @@ -6575,7 +6576,7 @@ fi\ # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + name=`$ECHO "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" @@ -6610,7 +6611,7 @@ fi\ case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac - $echo > $output "\ + $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # @@ -6653,7 +6654,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ + $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done @@ -6697,14 +6698,14 @@ func_mode_uninstall () origobjdir="$objdir" for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + name=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates @@ -6805,8 +6806,8 @@ func_mode_uninstall () noexename=$name case $file in *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` + file=`$ECHO $file|${SED} 's,.exe$,,'` + noexename=`$ECHO $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" @@ -6870,7 +6871,7 @@ func_mode_uninstall () # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" - $echo "$help" 1>&2 + $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi @@ -6920,7 +6921,7 @@ build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` +build_old_libs=`case $build_libtool_libs in yes) $ECHO no;; *) $ECHO yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 19fa65601..c847dda05 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -830,7 +830,7 @@ fi AC_SUBST(ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [echo], [1], +_LT_DECL([ECHO], [echo], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH diff --git a/tests/sh.test b/tests/sh.test index 37b4a8b56..ff8ee5895 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -78,7 +78,7 @@ if $EGREP -n -e '[^ ]=[^ ].*(break|continue)' $scripts; then fi # Check for uses of Xsed without corresponding echo "X -if $EGREP -n -e '\$Xsed' $scripts | $EGREP -v -n -e '\$echo \\*"X'; then +if $EGREP -n -e '\$Xsed' $scripts | $EGREP -v -n -e '\$ECHO \\*"X'; then echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line" status=$EXIT_FAILURE fi -- 2.47.2