In case your package goes beyond standard configure or has its own non compliant installation procedure some scripting is required.
It is quite possible you need to do some patching. In the case of xfig, XPM was needed and after copying the original Imakefile to Imakefile.old it was changed and a diff was run:
diff -uN ./Imakefile.old ./Imakefile
And the output can be added as a patch into the configuration directory. The T2 Linux build scripts will automatically apply the patches (see the section called “Patch Files (.patch)”).