--without-gif was only checked against X11; with this patch it is now checked against all the options.