There were three errors in CC detection:
1. The wrong variable was used in the for loop.
2. The selected CC was checked for existence and execute perm,
but instead of the full path to the executable just the basename
was passed to test -x.
3. The info log message accidentally printed the value of CC.