compilation-ask-about-save

compilation-ask-about-save is a variable defined in `compile.el'.
Its value is
t


Documentation:
Non-nil means M-x compile asks which buffers to save before compiling.
Otherwise, it saves all modified buffers without asking.

You can customize this variable.