[libvirt] [libvirt-php PATCH 02/35] include config.h earlier

Neal Gompa ngompa13 at gmail.com
Fri Apr 8 22:08:11 UTC 2016


From: Remi Collet <fedora at famillecollet.com>

---
 src/config.m4     |  2 --
 src/libvirt-php.h | 14 ++++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/config.m4 b/src/config.m4
index ee2b47d..d255f77 100644
--- a/src/config.m4
+++ b/src/config.m4
@@ -42,8 +42,6 @@ if test "$PHP_LIBVIRT" != "no"; then
     PHP_EVAL_INCLINE($LIBXML_INCLUDE)
     PHP_EVAL_LIBLINE($LIBXML_LIBRARY, LIBVIRT_SHARED_LIBADD)
 
-    CFLAGS="$CFLAGS -DCOMPILE_DL_LIBVIRT=1"
-
     PHP_SUBST(LIBVIRT_SHARED_LIBADD)
     PHP_NEW_EXTENSION(libvirt, libvirt-php.c sockets.c vncfunc.c, $ext_shared)
   else
diff --git a/src/libvirt-php.h b/src/libvirt-php.h
index eb4b7f4..6b56547 100644
--- a/src/libvirt-php.h
+++ b/src/libvirt-php.h
@@ -48,14 +48,18 @@
 #define COMPILE_DL_LIBVIRT
 #endif
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef COMPILE_DL_LIBVIRT
-#include "php.h"
 #undef PACKAGE_BUGREPORT
 #undef PACKAGE_NAME
 #undef PACKAGE_STRING
 #undef PACKAGE_TARNAME
 #undef PACKAGE_URL
 #undef PACKAGE_VERSION
+#include "php.h"
 
 #ifdef ZTS
 #include "TSRM.h"
@@ -69,13 +73,11 @@
 #endif
 #endif
 
-#ifdef HAVE_CONFIG_H
-#include "../config.h"
-#else
-#define VERSION "0.5.0"
+#ifndef VERSION
+#define VERSION "0.5.1"
 #define VERSION_MAJOR 0
 #define VERSION_MINOR 5
-#define VERSION_MICRO 0
+#define VERSION_MICRO 1
 #endif
 
 #include <libvirt/libvirt.h>
-- 
2.5.5




More information about the libvir-list mailing list