Cos you need HDR file formats for a LaTeX editor

Now that pkgsrc is working on the main Solaris box on work, I've been trying to compile Kile, the lovely KDE-based LaTeX editor. KDE, of course, brings in lots of other stuff; in other situations there are probably ways of keeping things out (this is where Portage's USE flags are nice), but as far as I could tell there was no way of keeping, say, libogg out of the KDE build.

But the annoying part is when the build of KDE stuff failed because OpenEXR, ILM's open-source high dynamic range graphics file format, failed to compile. And why? Because hypotf isn't defined, along with a bunch of similarly-named functions (atanf, cosf, sinf and so on). I tried throwing -lm into LDFLAGS, but that did nothing.

Some digging around in include files on a couple different machines turned up the problem: these functions were added in Solaris 10, and thus are not present on Solaris 9. I haven't been able to find any mention of this problem yet, at least for OpenEXR and/or pkgsrc; I'm hoping that there will be some other way of making this work.