qb: Update configure checks to print the check before the result.

This is very helpful for debugging in case the check just exits or hangs
unexpectingly.
This commit is contained in:
orbea 2019-11-01 08:46:39 -07:00
parent 98de418b7a
commit b427f44908
2 changed files with 9 additions and 3 deletions

View File

@ -15,6 +15,8 @@ cat << EOF > "$TEMP_C"
int main(void) { puts("Hai world!"); return 0; }
EOF
printf %s 'Checking for suitable working C compiler ... '
cc_works=0
add_opt CC no
if [ "$CC" ]; then
@ -40,7 +42,7 @@ elif [ -z "$CC" ]; then
cc_status='not found'
fi
printf %s\\n "Checking for suitable working C compiler ... $CC $cc_status"
printf %s\\n "$CC $cc_status"
if [ "$cc_works" = '0' ] && [ "$USE_LANG_C" = 'yes' ]; then
die 1 'Error: Cannot proceed without a working C compiler.'
@ -52,6 +54,8 @@ cat << EOF > "$TEMP_CXX"
int main() { std::cout << "Hai guise" << std::endl; return 0; }
EOF
printf %s 'Checking for suitable working C++ compiler ... '
cxx_works=0
add_opt CXX no
if [ "$CXX" ]; then
@ -77,7 +81,7 @@ elif [ -z "$CXX" ]; then
cxx_status='not found'
fi
printf %s\\n "Checking for suitable working C++ compiler ... $CXX $cxx_status"
printf %s\\n "$CXX $cxx_status"
if [ "$cxx_works" = '0' ] && [ "$USE_LANG_CXX" = 'yes' ]; then
die : 'Warning: A working C++ compiler was not found, C++ features will be disabled.'

View File

@ -18,6 +18,8 @@ EOF
add_opt MOC no
if [ "$HAVE_QT" = "yes" ]; then
printf %s 'Checking for moc ... '
moc_works=0
if [ "$MOC" ]; then
QT_SELECT="$QT_VERSION" \
@ -49,7 +51,7 @@ if [ "$HAVE_QT" = "yes" ]; then
moc_status='not found'
fi
printf %s\\n "Checking for moc ... $MOC $moc_status"
printf %s\\n "$MOC $moc_status"
if [ "$HAVE_MOC" != 'yes' ]; then
HAVE_QT='no'