fi
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
# Unless the user overrides by setting SED, search the path for either GNU
# sed, or the sed that truncates its output the least.
test -z "$SED" && {
# Unless the user overrides by setting GREP, search the path for either GNU
-# grep, or the sed that truncates its output the least.
+# grep, or the grep that truncates its output the least.
test -z "$GREP" && {
func_check_prog_grep ()
{
for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
do
test -n "$_G_tc" && {
- _G_esc_tc=`$bs_echo "$_G_tc" | sed "$sed_make_literal_regex"`
- _G_indent=`$bs_echo "$_G_indent" | sed "s|$_G_esc_tc||g"`
+ _G_esc_tc=`$bs_echo "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$bs_echo "$_G_indent" | $SED "s|$_G_esc_tc||g"`
}
done
- _G_indent="$progname: "`echo "$_G_indent" | sed 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
func_echo_infix_1_IFS=$IFS
IFS=$nl
{
$debug_cmd
- test "x$1" = x`func_sort_ver "$1" "$2" | sed 1q`
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
}
# If we were passed a genuine file, make sure it calls AC_INIT.
test -f "$1" \
- && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |grep AC_INIT`
+ && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |$GREP AC_INIT`
# Otherwise it is not a genuine Autoconf input file.
test -n "$_G_ac_init"
func_ensure_changelog
else
$require_gnulib_cache
- if sed -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache 2>/dev/null |
+ if $SED -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache 2>/dev/null |
func_grep_q gitlog-to-changelog
then
func_ensure_changelog
# We use 'ls|grep' instead of 'ls *.m4' to avoid exceeding
# command line length limits in some shells.
- for file in `cd "$macro_dir" && ls -1 |grep '\.m4$'`; do
+ for file in `cd "$macro_dir" && ls -1 |$GREP '\.m4$'`; do
# Remove a macro file when aclocal.m4 does not m4_include it...
func_grep_q 'm4_include([[]'$macro_dir/$file'])' $aclocal_m4s \
{
$debug_cmd
- sed -e '/^#/d' -e '/^$/d' "$@"
+ $SED -e '/^#/d' -e '/^$/d' "$@"
}
linesnew=`{ $bs_echo "$str"; cat "$file"; } \
|func_gitignore_entries |sort -u |wc -l`
test "$linesold" -eq "$linesnew" \
- || { sed "1i\\$nl$str$nl" "$file" >"$file"T && mv "$file"T "$file"; } \
+ || { $SED "1i\\$nl$str$nl" "$file" >"$file"T && mv "$file"T "$file"; } \
|| func_permissions_error "$file"
done
}
for opt_mode in compile link execute install finish uninstall clean; do
func_mode_help
done
- } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
{
func_help noexit
for opt_mode in compile link execute install finish uninstall clean; do
func_mode_help
done
} |
- sed '1d
+ $SED '1d
/^When reporting/,/^Report/{
H
d
else
tmpdir=`func_mktempdir`
for lib in $libs; do
- sed -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
> $tmpdir/tmp-la
mv -f $tmpdir/tmp-la $lib
done
my_outputname=$1
my_originator=$2
my_pic_p=${3-false}
- 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 no != "$dlself"; then
func_ensure_changelog
else
$require_gnulib_cache
- if sed -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache 2>/dev/null |
+ if $SED -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache 2>/dev/null |
func_grep_q gitlog-to-changelog
then
func_ensure_changelog
# We use 'ls|grep' instead of 'ls *.m4' to avoid exceeding
# command line length limits in some shells.
- for file in `cd "$macro_dir" && ls -1 |grep '\.m4$'`; do
+ for file in `cd "$macro_dir" && ls -1 |$GREP '\.m4$'`; do
# Remove a macro file when aclocal.m4 does not m4_include it...
func_grep_q 'm4_include([[]'$macro_dir/$file'])' $aclocal_m4s \
{
$debug_cmd
- sed -e '/^#/d' -e '/^$/d' "$@"
+ $SED -e '/^#/d' -e '/^$/d' "$@"
}
linesnew=`{ $bs_echo "$str"; cat "$file"; } \
|func_gitignore_entries |sort -u |wc -l`
test "$linesold" -eq "$linesnew" \
- || { sed "1i\\$nl$str$nl" "$file" >"$file"T && mv "$file"T "$file"; } \
+ || { $SED "1i\\$nl$str$nl" "$file" >"$file"T && mv "$file"T "$file"; } \
|| func_permissions_error "$file"
done
}
# If we were passed a genuine file, make sure it calls AC_INIT.
test -f "$1" \
- && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |grep AC_INIT`
+ && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |$GREP AC_INIT`
# Otherwise it is not a genuine Autoconf input file.
test -n "$_G_ac_init"
for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
do
test -n "$_G_tc" && {
- _G_esc_tc=`$bs_echo "$_G_tc" | sed "$sed_make_literal_regex"`
- _G_indent=`$bs_echo "$_G_indent" | sed "s|$_G_esc_tc||g"`
+ _G_esc_tc=`$bs_echo "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$bs_echo "$_G_indent" | $SED "s|$_G_esc_tc||g"`
}
done
- _G_indent="$progname: "`echo "$_G_indent" | sed 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
func_echo_infix_1_IFS=$IFS
IFS=$nl
{
$debug_cmd
- test "x$1" = x`func_sort_ver "$1" "$2" | sed 1q`
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
}
my_sed_env_rest='1s/^[^,:; ]*[,:; ]*\(.*\)$/\1/;q'
while test -n "$LIBTOOLIZE_OPTIONS"; do
- opt=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_opt"`
- LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"`
+ opt=`echo "$LIBTOOLIZE_OPTIONS" | $SED "$my_sed_env_opt"`
+ LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | $SED "$my_sed_env_rest"`
case $opt in
--debug|--no-warn|--no-warning|--no-warnings|--quiet|--verbose)
# Don't trace for this, we're just checking the user didn't invoke it
# directly from configure.ac.
- $SED 's|dnl .*$||; s|# .*$||' "$configure_ac" | grep AC_PROG_RANLIB >/dev/null &&
+ $SED 's|dnl .*$||; s|# .*$||' "$configure_ac" | $GREP AC_PROG_RANLIB >/dev/null &&
func_echo "'AC_PROG_RANLIB' is rendered obsolete by 'LT_INIT'"
# FIXME: Ensure ltmain.sh, libtool.m4 and ltdl.m4 are from the same release
# If we were passed a genuine file, make sure it calls AC_INIT.
test -f "$1" \
- && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |grep AC_INIT`
+ && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |$GREP AC_INIT`
# Otherwise it is not a genuine Autoconf input file.
test -n "$_G_ac_init"