diy: use configure as the heuristic for autotools

Closes #30912.