The config.m4 file is responsible for parsing the command-line options passed to configure at configuration time.
If you're unfamiliar with M4 files (now is certainly a good time to get familiar), this might be a bit confusing at first; but it's actually quite easy.