Hi there! On this page you can find the old quagga AS4 patch which has been superseded by it being encompassed into quagga mainline with quagga-CVS-2007-10-15.
The free choice of as number output format has not been included at that point, though. To remedy that, I promised a patch to support it again to some people (and on this website). Actually, Paul has also asked to provide something like that, and he is "of a mind to merge it (with certain caveats possibly)". And while I did plan to create the freeasformat patch when the next official quagga release appears Pauls inquiry gave the priority for that patch a boost.
So, as of 20071105, you will find the freeasformat patch for quagga > CVS20071015 on this site. That patch was specifically based on the quagga CVS snapshot of 20071029, but you should have no problems with a nearby version.
Look out for the quagga cvs changelog, at the time you are looking into this, the freeasformat patch may have entered mainline already and you will not need it at all. Be aware that Paul has every right to change some features while merging the freeasformat patch into mainline: YMMV regarding some special features I put in this thingy.
The RFC4893 which describes what a router dealing with AS4 should do (quagga does this).