Automatic detection of (Windows) dependencies from source code

The emulator Amiga Forever has the ability to analyze an .adf file and spin up the most appropriate configuration – Amiga version, type of memory required, etc.

We have a project with someone working to auto-detect Windows (and other) dependencies by looking at the source code. The goal is to be able to discover things like DLLs, sound card, graphics card, libraries, and the other requirements of a game or media art or other program, and automatically spin up an emulator with that configuration.

Has anybody else worked on such a thing? Can you point me to other projects, papers, websites?

Thanks!