Ok, the SPF implementation situation is kinda pathetic.
There seems to be exactly one maintained C implementation. And it's windows-only.
- libspf's website seems to have disappeared
- libspf2's not RFC-compliant (verified for 1.2.5) and their issue reporting system bounces.
So, I have taken the most compliant one I found whose code I can actually follow (that would be the python one) and am reimplementing it in C (using bstrlib and libdjbdns).
It will probably not come to a good end, but hey, it may work ;-)