Ahhh well this seems to be the block that is doing it
Code:
# Required Libraries
echo "$as_me:2831: checking for png_read_info in -lpng" >&5
echo $ECHO_N "checking for png_read_info in -lpng... $ECHO_C" >&6
if test "${ac_cv_lib_png_png_read_info+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpng $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 2839 "configure"
#include "confdefs.h"
Now to find out what that is actually doing.