Skip to content

Commit

Permalink
BUILD: don't fail if Qt5 is not found
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Westerfeld <[email protected]>
  • Loading branch information
swesterfeld committed May 30, 2024
1 parent 206ea19 commit 1352acf
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,17 @@ dnl libqt5
dnl
AC_DEFUN([AC_QT_REQUIREMENTS],
[
PKG_CHECK_MODULES(QTCORE, [Qt5Core >= 5.0.0],[:],[
AC_MSG_ERROR([You need to install Qt5 to build this package.
You can manually disable Qt5 using --without-qt (in this case some tools will not be built).
])
])
PKG_CHECK_MODULES(QT, [Qt5Core >= 5.0.0 Qt5Gui >= 5.0.0 Qt5Widgets >= 5.0.0],[:],[
AC_MSG_ERROR([You need to install Qt5 to build this package.])
])
QTCORE_CFLAGS="-DQT_NO_EMIT $QTCORE_CFLAGS"
QT_CFLAGS="-DQT_NO_EMIT $QT_CFLAGS"
AC_SUBST(QTCORE_CFLAGS)
AC_SUBST(QTCORE_LIBS)
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
MOC=`pkg-config --variable host_bins Qt5Core`/moc
AC_SUBST(MOC)
PKG_CHECK_MODULES(QT, [Qt5Core >= 5.0.0 Qt5Gui >= 5.0.0 Qt5Widgets >= 5.0.0], [with_qt="yes"], [with_qt="no"])
if test "x$with_qt" = "yes"; then
QTCORE_CFLAGS="-DQT_NO_EMIT $QTCORE_CFLAGS"
QT_CFLAGS="-DQT_NO_EMIT $QT_CFLAGS"
AC_SUBST(QTCORE_CFLAGS)
AC_SUBST(QTCORE_LIBS)
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
MOC=`pkg-config --variable host_bins Qt5Core`/moc
AC_SUBST(MOC)
fi
])
dnl
dnl libao
Expand Down Expand Up @@ -281,12 +275,10 @@ fi
AM_CONDITIONAL([COND_WITH_JACK], [test "x$with_jack" != "xno"])
dnl -------------------------------------------------------------------------

dnl -------------- qt support can be disabled manually ----------------------
dnl -------------- qt support is optional -----------------------------------
AC_ARG_WITH([qt], [AS_HELP_STRING([--with-qt], [build tools which need Qt5])])
if test "x$with_qt" != "xno"; then
dnl this check will abort if Qt5 is not found
AC_QT_REQUIREMENTS
with_qt=yes
fi
AM_CONDITIONAL([COND_WITH_QT], [test "x$with_qt" != "xno"])
dnl -------------------------------------------------------------------------
Expand Down

0 comments on commit 1352acf

Please sign in to comment.