mirror of https://gitee.com/openkylin/libvirt.git
build: fix shell detection bug
A missing shell was noisy, and the use of command to decipher a shell's absolute path requires "" rather than ''. * configure.ac (lv_cv_wrapper_shell): Fix logic errors if candidate shell is not available. * .gitignore: Ignore file created when /bin/sh is old dash. Reported by Matthias Bolte.
This commit is contained in:
parent
1987b09093
commit
5ee03c25f7
|
@ -33,6 +33,7 @@ config.rpath
|
||||||
config.status
|
config.status
|
||||||
config.sub
|
config.sub
|
||||||
configure
|
configure
|
||||||
|
configure.lineno
|
||||||
coverage
|
coverage
|
||||||
cscope.files
|
cscope.files
|
||||||
cscope.out
|
cscope.out
|
||||||
|
|
|
@ -616,13 +616,13 @@ if test "$with_qemu" = yes; then
|
||||||
test $lv_cv_wrapper_shell = none &&
|
test $lv_cv_wrapper_shell = none &&
|
||||||
AC_MSG_ERROR([could not find decent shell])
|
AC_MSG_ERROR([could not find decent shell])
|
||||||
echo a > conftest.a
|
echo a > conftest.a
|
||||||
$lv_cv_wrapper_shell -c ': 1<>conftest.a'
|
($lv_cv_wrapper_shell -c ': 1<>conftest.a') 2>/dev/null &&
|
||||||
case `cat conftest.a`.$lv_cv_wrapper_shell in
|
case `cat conftest.a`.$lv_cv_wrapper_shell in
|
||||||
a./*) break;; dnl /bin/sh is good enough
|
a./*) break;; dnl /bin/sh is good enough
|
||||||
a.*) dnl bash, ksh, and zsh all understand 'command', use that
|
a.*) dnl bash, ksh, and zsh all understand 'command', use that
|
||||||
dnl to determine the absolute path of the shell
|
dnl to determine the absolute path of the shell
|
||||||
lv_cv_wrapper_shell=`$lv_cv_wrapper_shell -c \
|
lv_cv_wrapper_shell=`$lv_cv_wrapper_shell -c \
|
||||||
'command -v $lv_cv_wrapper_shell'`
|
"command -v $lv_cv_wrapper_shell"`
|
||||||
case $lv_cv_wrapper_shell in
|
case $lv_cv_wrapper_shell in
|
||||||
/*) break;;
|
/*) break;;
|
||||||
esac
|
esac
|
||||||
|
@ -636,7 +636,7 @@ if test "$with_qemu" = yes; then
|
||||||
lv_wrapper_shell=$lv_cv_wrapper_shell
|
lv_wrapper_shell=$lv_cv_wrapper_shell
|
||||||
fi
|
fi
|
||||||
if test "x$lv_wrapper_shell" != x; then
|
if test "x$lv_wrapper_shell" != x; then
|
||||||
AC_DEFINE_UNQUOTED([VIR_WRAPPER_SHELL], [$lv_wrapper_shell],
|
AC_DEFINE_UNQUOTED([VIR_WRAPPER_SHELL], ["$lv_wrapper_shell"],
|
||||||
[Define to the absolute path of a shell that does not truncate on
|
[Define to the absolute path of a shell that does not truncate on
|
||||||
<> redirection, if /bin/sh does not fit the bill])
|
<> redirection, if /bin/sh does not fit the bill])
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue