After a bit of effort I finally tweaked the configure.in for Qfsm so it works with a separate build directory. I needed this so I could build the project inside KDevelop.
The solution I used was to hack a large portion of the autoqt m4 macros into Qfsm's configure.in. A similar approach was used here.
A better solution would probably be to update autoqt so it works with a dual Qt3/Qt4 installation. There was also some useful info at Qtnode. Also, FreeMat's configure.in might be a good source for autoconf macros that are Qt4 related.