Only add compiler switches to CFLAGS if supported by current compiler

Use `CC_CHECK_CFLAG_APPEND` to check for compiler's understanding of particular switches.

Using `-W` warnings such as `-Wno-implicit-int` in `Makefile.am` is not ideal, as some compilers may not support these precise warnings.

Borrow `CC_CHECK_CFLAG_APPEND` macro from Xine project to check for whether the compiler supports a switch, and add it to `CFLAGS` only if so.