Libvirt is available on macOS via homebrew, however, building a git version (rather than from a release tarball) might be a little tricky.
Recently, I've fixed some minor issues concerning building on macOS, so here is a little guide on building that on macOS.
The first thing needed is a relatively fresh rpcgen, as the one that comes with macOS is too old. I've created a homebrew formula for rpcgen from FreeBSD, you can grab it here: https://gist.github.com/novel/0d74cdbc7b71f60640a42b52c9cc1459 and install it. Please consult homebrew docs if you're not sure how to do that.
Now it's just a matter to point it to the proper rpcgen and build it as usual:
$ ./configure ac_cv_path_RPCGEN=/usr/local/bin/bsdrpcgen --without-sasl $ make $ make check
There are some tests failing, need to figure out why, but at least test suite is working.