comparison m4/acinclude.m4 @ 25114:f191e1a26095 stable

if a Qt version appears partially installed, don't check another version * acinclude.m4 (OCTAVE_CHECK_QT): If a given Qt version appears to be partially installed, then don't check for any other version. Instead, display warning and list of missing modules in summary. (OCTAVE_CHECK_QT_VERSION): Also accumulate list of avaiable Qt modules.
author John W. Eaton <jwe@octave.org>
date Wed, 04 Apr 2018 08:06:23 -0400
parents 5dce8aa80652
children 14b9e2a1f3e1
comparison
equal deleted inserted replaced
25113:476fc012d09a 25114:f191e1a26095
1709 for ver in $octave_qt_versions; do 1709 for ver in $octave_qt_versions; do
1710 OCTAVE_CHECK_QT_VERSION([$ver]) 1710 OCTAVE_CHECK_QT_VERSION([$ver])
1711 if test $build_qt_gui = yes; then 1711 if test $build_qt_gui = yes; then
1712 have_qt_version=$ver 1712 have_qt_version=$ver
1713 break 1713 break
1714 elif test -n "$QT_MODULES_AVAILABLE"; then
1715 ## If some modules were found for $ver, then warn about possible
1716 ## incomplete or broken Qt installation instead of checking for
1717 ## next version in the list.
1718 warn_qt_modules="Your installation of Qt version $ver appears incomplete or broken in some way. Fix that or use --with-qt=VER to use another version."
1719 break
1714 fi 1720 fi
1715 done 1721 done
1716 1722
1717 if test $build_qt_gui = yes; then 1723 if test $build_qt_gui = yes; then
1718 BUILD_QT_SUMMARY_MSG="yes (version: $have_qt_version)" 1724 BUILD_QT_SUMMARY_MSG="yes (version: $have_qt_version)"
1725 else 1731 else
1726 if test -n "$QT_MODULES_MISSING"; then 1732 if test -n "$QT_MODULES_MISSING"; then
1727 BUILD_QT_SUMMARY_MSG="no (missing:$QT_MODULES_MISSING)" 1733 BUILD_QT_SUMMARY_MSG="no (missing:$QT_MODULES_MISSING)"
1728 else 1734 else
1729 BUILD_QT_SUMMARY_MSG="no" 1735 BUILD_QT_SUMMARY_MSG="no"
1736 fi
1737 if test -n "$warn_qt_modules"; then
1738 OCTAVE_CONFIGURE_WARNING([warn_qt_modules])
1730 fi 1739 fi
1731 if test -n "$warn_qt_libraries"; then 1740 if test -n "$warn_qt_libraries"; then
1732 OCTAVE_CONFIGURE_WARNING([warn_qt_libraries]) 1741 OCTAVE_CONFIGURE_WARNING([warn_qt_libraries])
1733 fi 1742 fi
1734 if test -n "$warn_qt_version"; then 1743 if test -n "$warn_qt_version"; then
1915 *) 1924 *)
1916 AC_MSG_ERROR([Unrecognized Qt version $qt_version]) 1925 AC_MSG_ERROR([Unrecognized Qt version $qt_version])
1917 ;; 1926 ;;
1918 esac 1927 esac
1919 1928
1929 ## Use this check to get info in the log file.
1920 PKG_CHECK_MODULES(QT, [$QT_MODULES], 1930 PKG_CHECK_MODULES(QT, [$QT_MODULES],
1921 [], 1931 [],
1922 [build_qt_gui=no 1932 [build_qt_gui=no
1923 warn_qt_libraries="Qt libraries not found; disabling Qt GUI"]) 1933 warn_qt_libraries="Qt libraries not found; disabling Qt GUI"])
1924 1934
1935 ## Check the modules again individually to get lists of modules that
1936 ## are available and/or missing
1937 QT_MODULES_AVAILABLE=
1925 QT_MODULES_MISSING= 1938 QT_MODULES_MISSING=
1926 if test $build_qt_gui = no; then 1939 for qt_mod in $QT_MODULES; do
1927 ## Get list of modules that are missing 1940 if $PKG_CONFIG --exists $qt_mod; then
1928 for pkg in $QT_MODULES; do 1941 QT_MODULES_AVAILABLE="$QT_MODULES_AVAILABLE $qt_mod"
1929 if ! $PKG_CONFIG --exists $pkg; then 1942 else
1930 QT_MODULES_MISSING="$QT_MODULES_MISSING $pkg" 1943 QT_MODULES_MISSING="$QT_MODULES_MISSING $qt_mod"
1931 fi 1944 fi
1932 done 1945 done
1933 fi
1934 1946
1935 if test $build_qt_gui = yes; then 1947 if test $build_qt_gui = yes; then
1936 ## Retrieve Qt compilation and linker flags 1948 ## Retrieve Qt compilation and linker flags
1937 QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')" 1949 QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')"
1938 QT_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_MODULES | $SED -e 's/^ *$//')" 1950 QT_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_MODULES | $SED -e 's/^ *$//')"