[libvirt-php 1/6] m4: ignore --php-binary if it doesn't exist

Daniel P. Berrangé berrange at redhat.com
Mon May 4 17:40:41 UTC 2020


On OpenSUSE 151,  "php-config --php-binary" reports a name of
"/usr/bin/php-cgi", but this binary doesn't actually exist. We
need to fallback to the plain "/usr/bin/php" command.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 m4/virt-php-extension.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/virt-php-extension.m4 b/m4/virt-php-extension.m4
index 5aa3cb7..2a97e74 100644
--- a/m4/virt-php-extension.m4
+++ b/m4/virt-php-extension.m4
@@ -26,7 +26,7 @@ AC_DEFUN([LIBVIRT_CHECK_PHP_EXTENSION],[
   AC_MSG_CHECKING([for php module $1])
 
   phpbinary="$($PHPCONFIG --php-binary)"
-  if test "x$phpbinary" = "x"; then
+  if test "x$phpbinary" = "x" || test ! -x "$phpbinary" ; then
     phpbinary="$($PHPCONFIG --prefix)/bin/php"
   fi
 
-- 
2.26.2




More information about the libvir-list mailing list