COCO is part 3 of the Fortran 95 standard. Dan Nagle provides a GPL licensed implementation at http://users.erols.com/dnagle/coco.html, perhaps it's possible to use that?
-- Summary: gfortran does not support the COCO preprocessor Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jb at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35385