While building a libvirt-php package for Gentoo Linux I had to workaround a couple of build issues. The first two patches are the results. The last patch is a fix for the case libvirt has been built without Xen support. In this case libvirt_connect (and phpinfo()) fails because virGetVersion is called with a non-NULL typeVer argument and libvirt therefore checks for Xen version. I guess the documentation for virGetVersion should be updated since it also returns 0 if both type and typeVer are NULL. [PATCH 1/3] Fix building with threaded php. [PATCH 2/3] add --with-php-config flag [PATCH 3/3] fix libvirt_connect failure without Xen -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list