Get rid of nesting backquotes

Also executing variable containing an option may not be portable.
Follow up of dd378c5a2483002d50053cf81d00004c1fb3c8bd.
This commit is contained in:
Nobuyoshi Nakada 2024-06-22 10:58:32 +09:00
parent dd378c5a24
commit cab0d03037
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -982,10 +982,17 @@ AC_ARG_WITH(opt-dir,
[OPT_DIR="${OPT_DIR:+$OPT_DIR$PATH_SEPARATOR}$withval"], [])
AS_IF([test "x$OPT_DIR" != x], [
save_IFS="$IFS" IFS="$PATH_SEPARATOR" val= PWD=
for dir in $OPT_DIR; do
test -z "$dir" && continue
dir=`eval $CHDIR '"$dir"' && pwd` || continue
val="${val:+$val$PATH_SEPARATOR}$dir"
done
IFS="$save_IFS" OPT_DIR="$val"
unset PWD
unset save_IFS
val=`IFS="$PATH_SEPARATOR"
for dir in $OPT_DIR; do
test -z "$dir" && continue
dir="`$CHDIR "$dir" && pwd` || continue
echo x ${LIBPATHFLAG} ${RPATHFLAG} |
sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${dir}/lib${IFS}g;s${IFS}%s${IFS}${dir}/lib${IFS}g"
done | tr '\012' ' ' | sed 's/ *$//'`
@ -3494,7 +3501,7 @@ done
BTESTRUBY='$(MINIRUBY)'
AS_IF([test x"$cross_compiling" = xyes], [
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-$BASERUBY} -I`$CHDIR .; pwd` "-r'$(arch)-fake'
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-$BASERUBY} -I$ac_abs_builddir "-r'$(arch)-fake'
XRUBY_LIBDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["libdir"]']`
XRUBY_RUBYLIBDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["rubylibdir"]']`
XRUBY_RUBYHDRDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["rubyhdrdir"]']`