Properly nest AC_MSG_CHECKING and AC_MSG_RESULT calls to avoid confusing output.