public inbox for ofono@lists.linux.dev
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@queued.net>
To: ofono@lists.linux.dev
Cc: jbb.prv@gmx.de
Subject: [PATCH phonesim 3/3] Make configure script detect and enable Qt6 if available
Date: Sat, 28 Feb 2026 04:17:32 -0500	[thread overview]
Message-ID: <20260228041732.346c5b16@5400> (raw)
In-Reply-To: <20260228041213.45bc0030@5400>

From: Andres Salomon <dilinger@queued.net>

We also bump the C++ standard up to C++17.
---
 configure.ac | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index ec40d8c..fd8d9fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,17 +26,25 @@ AC_ARG_ENABLE(optimization, AS_HELP_STRING([--disable-optimization],
 	fi
 ])
 
-PKG_CHECK_MODULES(QT, Qt5Core Qt5Gui Qt5Xml Qt5Network Qt5Qml Qt5DBus [Qt5Widgets >= 5.10],
-				dummy=yes, AC_MSG_ERROR(Qt5 is required))
+PKG_CHECK_MODULES(QT6, Qt6Core Qt6Gui Qt6Xml Qt6Network Qt6Qml Qt6DBus Qt6Core5Compat [Qt6Widgets >= 6.0.0], AC_SUBST(QT6_ENABLED, "yes"),
+	[PKG_CHECK_MODULES(QT5, Qt5Core Qt5Gui Qt5Xml Qt5Network Qt5Qml Qt5DBus [Qt5Widgets >= 5.10], dummy=yes, AC_MSG_ERROR(Qt5 is required))]
+)
 
 # Needed for qOverload
-CXXFLAGS="$CXXFLAGS --std=gnu++14"
-
-AC_SUBST(QT_CFLAGS)
-AC_SUBST(QT_LIBS)
-
-AC_MSG_CHECKING(for Qt5 host_bins)
-PKG_CHECK_VAR(QMAKE_PATH_HOST_BINS, Qt5Core, host_bins)
+CXXFLAGS="$CXXFLAGS --std=gnu++17"
+
+AC_SUBST(QT_CFLAGS, "${QT5_CFLAGS} ${QT6_CFLAGS}")
+AC_SUBST(QT_LIBS, "${QT6_LIBS} ${QT5_LIBS}")
+
+AS_IF([test "x$QT6_ENABLED" = "xyes"], [
+	# Try for Qt6
+	AC_MSG_CHECKING(for Qt6 host_bins)
+	PKG_CHECK_VAR(QMAKE_PATH_HOST_BINS, Qt6Core, libexecdir)
+], [
+	# Try for Qt5
+	AC_MSG_CHECKING(for Qt5 host_bins)
+	PKG_CHECK_VAR(QMAKE_PATH_HOST_BINS, Qt5Core, host_bins)
+])
 AC_SUBST(QMAKE_PATH_HOST_BINS)
 AC_MSG_RESULT($QMAKE_PATH_HOST_BINS)
 
-- 
2.51.0


      parent reply	other threads:[~2026-02-28  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  9:12 [PATCH phonesim 0/3] Port to Qt6 (v2) Andres Salomon
2026-02-28  9:15 ` [PATCH phonesim 1/3] Fix compatibility with Qt6 Andres Salomon
2026-02-28  9:16 ` [PATCH phonesim 2/3] Only call QTextStream::setCodec in Qt5 Andres Salomon
2026-02-28  9:17 ` Andres Salomon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260228041732.346c5b16@5400 \
    --to=dilinger@queued.net \
    --cc=jbb.prv@gmx.de \
    --cc=ofono@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox