These m4 scripts (used by libvirt) may also be of interest to upstream developers:
http://libvirt.org/git/?p=libvirt.git;a=blob;f=m4/virt-compile-pie.m4;hb=HEA... http://libvirt.org/git/?p=libvirt.git;a=blob;f=m4/virt-linker-relro.m4;hb=HE...
Rich.