2010/10/26 Eric Blake <eblake@xxxxxxxxxx>: > 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. ÂDefine a C string literal, not raw tokens. > Reported by Matthias Bolte. > --- > > Fixed in v3: the AC_DEFINE needs to output a string literal > rather than raw text. > > Fixed in v2: don't call command -v on an empty substitution > > Actually tested by myself this time rather than relying on others, by > manually overriding my /bin/sh with a broken dash, and double-checking > the resulting config.h. > > Âconfigure.ac | Â Â6 +++--- > Â1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 86a864b..d942d3c 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -616,13 +616,13 @@ if test "$with_qemu" = yes; then > Â Â Â Â test $lv_cv_wrapper_shell = none && > Â Â Â Â Â AC_MSG_ERROR([could not find decent shell]) > Â Â Â Â 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 > Â Â Â Â Â a./*) break;; dnl /bin/sh is good enough > Â Â Â Â Â a.*) dnl bash, ksh, and zsh all understand 'command', use that > Â Â Â Â Â Â Â Âdnl to determine the absolute path of the shell > Â Â Â Â Â Â 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 > Â Â Â Â Â Â Â /*) break;; > Â Â Â Â Â Â esac > @@ -636,7 +636,7 @@ if test "$with_qemu" = yes; then > Â Â lv_wrapper_shell=$lv_cv_wrapper_shell > Â fi > Â 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 > Â Â Â Â<> redirection, if /bin/sh does not fit the bill]) > Â fi > -- > 1.7.2.3 > Tested on Ubuntu 10.04 with broken dash. ACK. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list