On 09.04.2016 00:08, Neal Gompa wrote: > From: Remi Collet <fedora@xxxxxxxxxxxxxxxxx> > > --- > src/config.m4 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) > create mode 100644 src/config.m4 > > diff --git a/src/config.m4 b/src/config.m4 > new file mode 100644 > index 0000000..ee2b47d > --- /dev/null > +++ b/src/config.m4 > @@ -0,0 +1,52 @@ > +PHP_ARG_WITH(libvirt, for libvirt support, > +[ --with-libvirt Include varnish support]) What's varnish? It should have been libvirt instead. > + > +if test "$PHP_LIBVIRT" != "no"; then > + > + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) > + > + if test -x "$PKG_CONFIG" && $PKG_CONFIG varnishapi --exists ; then > + AC_MSG_CHECKING(libvirt version) > + if $PKG_CONFIG libvirt --atleast-version=1.2.8 ; then > + LIBVIRT_INCLUDE=`$PKG_CONFIG libvirt --cflags` > + LIBVIRT_LIBRARY=`$PKG_CONFIG libvirt --libs` > + LIBVIRT_VERSION=`$PKG_CONFIG libvirt --modversion` > + AC_MSG_RESULT($LIBVIRT_VERSION) > + else > + AC_MSG_ERROR(version too old) > + fi > + PHP_EVAL_INCLINE($LIBVIRT_INCLUDE) > + PHP_EVAL_LIBLINE($LIBVIRT_LIBRARY, LIBVIRT_SHARED_LIBADD) > + > + AC_MSG_CHECKING(libvirt-qemu version) > + if $PKG_CONFIG libvirt-qemu --atleast-version=1.2.8 ; then > + QEMU_INCLUDE=`$PKG_CONFIG libvirt-qemu --cflags` > + QEMU_LIBRARY=`$PKG_CONFIG libvirt-qemu --libs` > + QEMU_VERSION=`$PKG_CONFIG libvirt-qemu --modversion` > + AC_MSG_RESULT($QEMU_VERSION) > + else > + AC_MSG_ERROR(version too old) > + fi > + PHP_EVAL_INCLINE($QEMU_INCLUDE) > + PHP_EVAL_LIBLINE($QEMU_LIBRARY, LIBVIRT_SHARED_LIBADD) > + > + AC_MSG_CHECKING(libxml version) > + if $PKG_CONFIG libxml-2.0 --atleast-version=1.2.8 ; then > + LIBXML_INCLUDE=`$PKG_CONFIG libxml-2.0 --cflags` > + LIBXML_LIBRARY=`$PKG_CONFIG libxml-2.0 --libs` > + LIBXML_VERSION=`$PKG_CONFIG libxml-2.0 --modversion` > + AC_MSG_RESULT($LIBXML_VERSION) > + else > + AC_MSG_ERROR(version too old) > + fi > + 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 > + AC_MSG_ERROR(pkg-config not found) > + fi > +fi > Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list