I've been trying to install lpng142 on my fed 12 system. Seems like a problem to me. I get this error
[root@localhost lpng142]# ./configure
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
[root@localhost lpng142]#
Looks like you have a dos line ending file. The clue is the ^M
You need to re-save the file using Unix line endings.
You might have a dos2unix command line utility that will also do this for you.
To fix, open your script with vi or vim and enter in vi command mode (key ESC), then type this:
:set fileformat=unix