As the documentation says, gui needs png, so doing ./configure --enable-gui --disable-png leads to a linking problem. So maybe configure should complain about --disable-png if gui is wanted?