In trying to compile an old version of libvirt (to see if I can get some old patches up to date, see https://www.redhat.com/archives/libvir-list/2014-March/msg00106.html), I get the error:
getopt.h:85:29: fatal error: getopt-pfx-core.h: No such file or directory
when I run make (after running ./autogen.sh).
This is on libvirt commit aa50a5c.
In searching for this error ("fatal error: getopt-pfx-core.h: No such file or directory") I find very few results, but it does not seem specific to libvirt, which makes sense since the error seems to be something with getopt.