# HG changeset patch # User Mike Miller # Date 1470851954 25200 # Node ID 945e7f9c11ff0a58b97e20e2cb737b3d44dbcd93 # Parent 0486ccf960c6584881ed8bb9136177556dabcd80 build: fix configure --without-qt or --with-qt * configure.ac (AC_ARG_WITH([qt])): Rewrite to handle --with-qt case. Display two help strings for --with-qt=N and --without-qt options. (QT_VERSIONS): Set to empty on --without-qt. (check_qt): Delete. (OCTAVE_CHECK_QT) Call unconditionally to ensure AM_CONDITIONALs are set. * acinclude.m4 (OCTAVE_CHECK_QT): Ensure build_qt_gui, build_qt_graphics, use_qscintilla, and win32_terminal are defined even if no Qt versions are checked. diff -r 0486ccf960c6 -r 945e7f9c11ff configure.ac --- a/configure.ac Wed Aug 10 12:29:59 2016 -0400 +++ b/configure.ac Wed Aug 10 10:59:14 2016 -0700 @@ -1753,21 +1753,25 @@ ### GUI/Qt related tests. QT_VERSIONS="5 4" -check_qt=yes AC_ARG_WITH([qt], - [AS_HELP_STRING([--without-qt], [don't use Qt libraries; disable Qt GUI. May also select Qt major version: --with-qt=5])], - [if test x"$withval" = xno; then - check_qt=no; - warn_qt_disabled="--without-qt specified. The Qt GUI will be disabled." - OCTAVE_CONFIGURE_WARNING([warn_qt_disabled]) - elif test -n "$withval"; then - QT_VERSIONS="$withval" - fi]) - -if test $check_qt = yes; then - OCTAVE_CHECK_QT([$QT_VERSIONS]) -fi + [AS_HELP_STRING([--with-qt=VER], [use the Qt major version VER]) +dnl Second help string must not be indented for correct alignment +AS_HELP_STRING([--without-qt], [don't use Qt libraries, disable Qt GUI])], + [case $withval in + yes | "") + ;; + no) + QT_VERSIONS= + warn_qt_disabled="--without-qt specified. The Qt GUI will be disabled." + OCTAVE_CONFIGURE_WARNING([warn_qt_disabled]) + ;; + *) + QT_VERSIONS="$withval" + ;; + esac]) + +OCTAVE_CHECK_QT([$QT_VERSIONS]) ## Check for FLTK (www.fltk.org) library diff -r 0486ccf960c6 -r 945e7f9c11ff m4/acinclude.m4 --- a/m4/acinclude.m4 Wed Aug 10 12:29:59 2016 -0400 +++ b/m4/acinclude.m4 Wed Aug 10 10:59:14 2016 -0700 @@ -1557,6 +1557,12 @@ dnl AC_DEFUN([OCTAVE_CHECK_QT], [ octave_qt_versions="$1" + + build_qt_gui=no + build_qt_graphics=no + use_qscintilla=no + win32_terminal=no + for ver in $octave_qt_versions; do OCTAVE_CHECK_QT_VERSION([$ver]) if test $build_qt_gui = yes; then