[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCHv2] 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.
Reported by Matthias Bolte.
---
 configure.ac |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 86a864b..26c030a 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
-- 
1.7.2.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]