[libvirt-php][PATCH 02/14] configure: Provide default for php-confdir

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

 



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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]