In the following, I go through the ScummVM configure script sequentially, and roughly describe what each part does. Three of these sections are highlighted (dubbed sections A, B and C). These three do somewhat similar things, namely set settings based on _host_os, _host resp. _backends. They are the primary reason for this analysis: Right now, they are used in a very inconsistent fashion, people currently mostly guess when they decide which of the three sections to use. I would like to analyze what each is really good for. Also, possibly move section C further up (right after section B if possible), so that its settings also can affect detection of libraries.
The line numbers refer to this revision.
Anyway, here we go:
general setup, default settings, functions, etc.