I've been working on something like that! I've used it myself, but it
needs a lot more work still (and I don't have much experience with
Autotools so I don't know what it's missing). It also needs my Lua
branch to compile, so I've been hesitant to mention it. I've used it
on Windows and Linux so far.
It basically runs a Lua script that requests system information and
then processes the information. I use it to just generate a
tup.config file, initialze tup, and create variant directories, but I
suppose you could generate Tupfiles as well. I wanted to make it Tup
independent in case there were other use cases (ninja, maybe, or other
projects that need system information). The principal I kept in mind
while designing this was to make a way for the configure script to
retrieve information from the user directly even if A. the information
can't be found from the system, B. the information is found
incorrectly, or C. there is no automatic detection implemented.
Here's the github:
https://github.com/Rendaw/selfdiscovery
And here's a project I've been working on that uses it:
https://github.com/Rendaw/inscribist
Although github is giving me server errors for all my projects right
now.
It would be awesome if you could use it or have some suggestions, and
if you think it's rubbish that's A-OK too. I just thought this was a
good time to plug one of my projects.