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

[libvirt] [libvirt-php 1/2] Fixed the php configuration file



Install the libvirt-php.ini to a appropriate location.

* src/Makefile.am: Set $PHPCDIR to the php configuration file
  directory, and replace $sysconfdir/php.d with $PHPCDIR. Added
  suffix ".so" in libvirt-php.ini.
---
 src/Makefile.am |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 206fa68..059de2c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,6 +5,7 @@ RM=rm
 ECHO=echo
 PHPINC=`php-config --includes`
 PHPEDIR=`php-config --extension-dir`
+PHPCDIR=`php-config --configure-options | sed -n 's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'`
 XMLCFLAGS=`pkg-config libxml-2.0 --cflags`
 XMLLIBS=`pkg-config libxml-2.0 --libs`
 
@@ -20,11 +21,11 @@ build:
 install-exec-local:
 	mkdir -p $(DESTDIR)$(PHPEDIR)
 	$(CP) $(NAME).so $(DESTDIR)$(PHPEDIR)
-	mkdir -p $(DESTDIR)$(sysconfdir)/php.d
-	$(ECHO) "extension=$(NAME)" > $(DESTDIR)$(sysconfdir)/php.d/libvirt-php.ini
+	mkdir -p $(DESTDIR)$(PHPCDIR)
+	$(ECHO) "extension=$(NAME).so" > $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
 
 uninstall-local:
-	$(RM) -f $(sysconfdir)/php.d/$(NAME).ini
+	$(RM) -f $(DESTDIR)$(PHPCDIR)/$(NAME).ini
 	$(RM) -f $(DESTDIR)$(PHPEDIR)/$(NAME).so
 
 clean-temp:
-- 
1.7.1


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