This is not just applicable to qt configure but to CMake when it does
try_compile-v1
Simple add the flag
--debug-trycompile