Mozilla is a mess

I am currently trying to get GNOME running on FreeBSD-powerpc, the first big problem is mozilla, which is required for yelp, the GNOME online help browser.
It uses NSPR “Netscape Portable Runtime” which uses headerfiles to define the architecture feature like size of specific types etc of known Architecture/Operating System combinations. Additional is uses a GNU autoconf like configure script and there is a architecture dependant file called xptcinvoke_$ARCH_$OS.cpp *Argh* A portability nightmare.
I expect KDE to have a lot less problems.