From ce22b5878cdfa8bd3b976d946d563a180d0e26f0 Mon Sep 17 00:00:00 2001 From: crumpled-acronym <60061744+crumpled-acronym@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:17:21 +0100 Subject: [PATCH] Fix #173 - qmake detection in configure Fix finding qmake5 when requested and installed alongside qmake. --- configure | 9 ++++----- configure.acr | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 6c1ff38f..95d6fcc7 100755 --- a/configure +++ b/configure @@ -469,14 +469,13 @@ else echo no fi ; fi if [ "$WANT_QMAKE6" = "1" ]; then -QMAKE=""; fi -if [ "$HAVE_QMAKE" = "1" ]; then -QMAKE_BIN="${QMAKE}" -else if [ "$HAVE_QMAKE6" = "1" ]; then QMAKE_BIN="${QMAKE6}" else -case "$undefined_variable" in 0|"") echo ; echo "ERROR: Missing qmake" >&2 ; echo ; exit 1 ;; esac; fi; fi +case "$undefined_variable" in 0|"") echo ; echo "ERROR: Missing qmake6" >&2 ; echo ; exit 1 ;; esac; fi +else +if [ "$HAVE_QMAKE" = "1" ]; then +QMAKE_BIN="${QMAKE}"; fi; fi if [ "$QMAKE_BIN" = """" ]; then case "$undefined_variable" in 0|"") echo ; echo "ERROR: Missing qmake" >&2 ; echo ; exit 1 ;; esac; fi WANT_PYTHON="0" diff --git a/configure.acr b/configure.acr index 3fdaea35..14784300 100644 --- a/configure.acr +++ b/configure.acr @@ -12,22 +12,22 @@ CHKPRG QMAKE6 qmake6 (( CHKPRG! LRELEASE lrelease )) ARG_WITH WANT_QMAKE6 qmake6 ignore qmake in path when qmake6 is found ; -IF WANT_QMAKE6 { - QMAKE = "" ; -} -IFEQ HAVE_QMAKE 1 ; { - QMAKE_BIN = ${QMAKE} ; +IFEQ WANT_QMAKE6 1 ; { + IFEQ HAVE_QMAKE6 1 ; { + QMAKE_BIN = ${QMAKE6} ; + }{ + DIENOW Missing qmake6 ; + } }{ - IFEQ HAVE_QMAKE6 1 ; { - QMAKE_BIN = ${QMAKE6} ; - }{ - DIENOW Missing qmake ; - } + IFEQ HAVE_QMAKE 1 ; { + QMAKE_BIN = ${QMAKE} ; + } + } IFEQ QMAKE_BIN "" ; { - DIENOW Missing qmake ; + DIENOW Missing qmake ; } WANT_PYTHON = 0 ;