the configure script is written in 'sh', not
perl.
Second, I've looked at it and its one of the
poorer configure scripts because generally,
you can tell the script where to find libraries.
Fink puts all of its stuff in /sw/.... and its
libraries in /sw/lib.
If your running...