changeset 25097:cc21f66ecb1c stable

display more info in configure summary about Qt version and missing features If Qt is found, display Qt version in summary. If it is not found or is not functional, display list of missing modules, if any. * acinclude.m4 (OCTAVE_CHECK_QT): Set BUILD_QT_SUMMARY_MSG. * configure.ac: Use it.
author John W. Eaton <jwe@octave.org>
date Mon, 02 Apr 2018 20:32:35 -0400
parents 71ed409b2ffb
children 5dce8aa80652
files configure.ac m4/acinclude.m4
diffstat 2 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Mon Apr 02 17:26:38 2018 -0700
+++ b/configure.ac	Mon Apr 02 20:32:35 2018 -0400
@@ -3409,7 +3409,7 @@
   Default pager:                 $DEFAULT_PAGER
   gnuplot:                       $GNUPLOT
 
-  Build Octave Qt GUI:                  $build_qt_gui
+  Build Octave Qt GUI:                  $BUILD_QT_SUMMARY_MSG
   JIT compiler for loops:               $ENABLE_JIT
   Build Java interface:                 $build_java
   Build static libraries:               $STATIC_LIBS
--- a/m4/acinclude.m4	Mon Apr 02 17:26:38 2018 -0700
+++ b/m4/acinclude.m4	Mon Apr 02 20:32:35 2018 -0400
@@ -1715,6 +1715,7 @@
   done
 
   if test $build_qt_gui = yes; then
+    BUILD_QT_SUMMARY_MSG="yes (version: $have_qt_version)"
     if test x"$have_qt_version" = x4; then
       AC_DEFINE(HAVE_QT4, 1, [Define to 1 if using Qt version 4.])
     fi
@@ -1722,6 +1723,11 @@
       AC_DEFINE(HAVE_QT5, 1, [Define to 1 if using Qt version 5.])
     fi
   else
+    if test -n "$QT_MODULES_MISSING"; then
+      BUILD_QT_SUMMARY_MSG="no (missing:$QT_MODULES_MISSING)"
+    else
+      BUILD_QT_SUMMARY_MSG="no"
+    fi
     if test -n "$warn_qt_libraries"; then
       OCTAVE_CONFIGURE_WARNING([warn_qt_libraries])
     fi
@@ -1916,6 +1922,16 @@
     [build_qt_gui=no
      warn_qt_libraries="Qt libraries not found; disabling Qt GUI"])
 
+  QT_MODULES_MISSING=
+  if test $build_qt_gui = no; then
+    ## Get list of modules that are missing
+    for pkg in $QT_MODULES; do
+      if ! $PKG_CONFIG --exists $pkg; then
+        QT_MODULES_MISSING="$QT_MODULES_MISSING $pkg"
+      fi
+    done
+  fi
+
   if test $build_qt_gui = yes; then
     ## Retrieve Qt compilation and linker flags
     QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')"