We use some really weird logic to get the directory where
libvirt-php.ini should go. We try to parse 'php-config
--configure' output. However, it may happen, that we learn
nothing from that. If that's the case, we should provide some
sensible default, /etc/php.d/ for instance.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
m4/virt-php-confdir.m4 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/m4/virt-php-confdir.m4 b/m4/virt-php-confdir.m4
index 4820de0..904d0c8 100644
--- a/m4/virt-php-confdir.m4
+++ b/m4/virt-php-confdir.m4
@@ -27,6 +27,10 @@ AC_DEFUN([LIBVIRT_CHECK_PHP_CONFDIR],[
if test "x$with_php_confdir" != "xno" ; then
if test "x$with_php_confdir" = "xcheck" ; then
confdir="$($PHPCONFIG --configure-options | sed -n
's/.*--with-config-file-scan-dir=\(\S*\).*/\1/p')"
+ if test "x$confdir" == "x" ; then
+ dnl There's no usable result from phpconfig. Use some default.
+ confdir="/etc/php.d/"
+ fi
elif test "x$with_php_confdir" = "xno" || test
"x$with_php_confdir" = "xyes"; then
AC_MSG_ERROR([php-confdir must be used only with valid path])
else
--
2.8.4