[libvirt] libvirt-php --with-php-config=/path/to/php is broken.

When running the following command I ended up getting errors that phpize was missing. Trying to dig into this further i found that configure.ac was just trying to run php-config without providing a path. The following patch corrects the issue by using the $PHPCONFIG variable instead. ./configure --prefix=/opt/libvirt-php --with-php-config=/path/to/php-config` diff --git a/configure.ac b/configure.ac index f232756..d93e946 100644 --- a/configure.ac +++ b/configure.ac @@ -159,7 +159,7 @@ if test "x$PHPCONFIG" = "xno"; then AC_MSG_ERROR([php-config not found; please install the PHP SDK]) fi -AC_PATH_PROG([PHPIZE], [phpize], [no], [`php-config --prefix`/bin$PATH_SEPARATOR$PATH]) +AC_PATH_PROG([PHPIZE], [phpize], [no], [`$PHPCONFIG --prefix`/bin$PATH_SEPARATOR$PATH]) if test "x$PHPIZE" = "xno"; then AC_MSG_ERROR([phpize not found; please install the PHP SDK]) fi -- Shaun Reitan Network Data Center Host, Inc.

On 02/10/2017 07:46 PM, Shaun Reitan wrote:
When running the following command I ended up getting errors that phpize was missing. Trying to dig into this further i found that configure.ac was just trying to run php-config without providing a path. The following patch corrects the issue by using the $PHPCONFIG variable instead.
./configure --prefix=/opt/libvirt-php --with-php-config=/path/to/php-config`
diff --git a/configure.ac b/configure.ac index f232756..d93e946 100644 --- a/configure.ac +++ b/configure.ac @@ -159,7 +159,7 @@ if test "x$PHPCONFIG" = "xno"; then AC_MSG_ERROR([php-config not found; please install the PHP SDK]) fi
-AC_PATH_PROG([PHPIZE], [phpize], [no], [`php-config --prefix`/bin$PATH_SEPARATOR$PATH]) +AC_PATH_PROG([PHPIZE], [phpize], [no], [`$PHPCONFIG --prefix`/bin$PATH_SEPARATOR$PATH]) if test "x$PHPIZE" = "xno"; then AC_MSG_ERROR([phpize not found; please install the PHP SDK]) fi
Hey, sorry for the late reply. It's only now that I've noticed this e-mail. This is obviously a bug and your fix is correct. I've turned it into a commit and pushed it. Thank you! Michal
participants (2)
-
Michal Privoznik
-
Shaun Reitan