add some extra warnings

and some configure checks from the emacs configure script