Logged In: YES
user_id=7859

This looks as though there is a problem with the shell
that you are using.
./configure: line 1: PNG_INCLUDE: command not found
./configure: line 1: CFLAGS: command not found

What happens if you run from the bourne shell instead?

Glenn