summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Stankowski <ak_ambi@op.pl>2015-05-31 13:50:53 +0100
committerMartyn Russell <martyn@lanedo.com>2015-05-31 13:50:53 +0100
commit67aae986ac2dc5ae4a4d5adcc747f00e77b79199 (patch)
tree7cc9ad5a2259a58eec9a2e2a433435f7825ddfef
parent2be6316009ff08400be7f64e12dc73bb017431ea (diff)
downloadlibmediaart-67aae986ac2dc5ae4a4d5adcc747f00e77b79199.tar.gz
build: Allow Qt4 or Qt5 to be forced
Adds optional configure flag "--with-qt-version=<4|5>" that may be used to enforce qt 4.x or qt 5.x version.
-rw-r--r--configure.ac25
1 files changed, 17 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index e9ead09..b347490 100644
--- a/configure.ac
+++ b/configure.ac
@@ -207,6 +207,11 @@ AC_ARG_ENABLE(qt,
[enable Qt support, (MP3 album art) [[default=auto]]]),,
[enable_qt=auto])
+AC_ARG_WITH(qt-version,
+ AS_HELP_STRING([--with-qt-version=major],
+ [Force specific Qt version [[default=auto]]]),,
+ [with_qt_version=auto])
+
selected_for_media_art="no (disabled)"
##################################################################
@@ -218,14 +223,18 @@ if test "x$enable_qt" == "xyes" && test "x$enable_gdkpixbuf" == "xyes"; then
fi
if test "x$enable_qt" != "xno" && test "x$enable_gdkpixbuf" != "xyes"; then
- PKG_CHECK_MODULES(QT5,
- [Qt5Gui >= $QT5_REQUIRED],
- [have_qt5=yes],
- [have_qt5=no])
- PKG_CHECK_MODULES(QT4,
- [QtGui >= $QT4_REQUIRED],
- [have_qt4=yes],
- [have_qt4=no])
+ if test "x$with_qt_version" == "xauto" || test "x$with_qt_version" == "x5"; then
+ PKG_CHECK_MODULES(QT5,
+ [Qt5Gui >= $QT5_REQUIRED],
+ [have_qt5=yes],
+ [have_qt5=no])
+ fi
+ if test "x$with_qt_version" == "xauto" || test "x$with_qt_version" == "x4"; then
+ PKG_CHECK_MODULES(QT4,
+ [QtGui >= $QT4_REQUIRED],
+ [have_qt4=yes],
+ [have_qt4=no])
+ fi
if test "x$have_qt5" = "xyes"; then
BACKEND_CFLAGS="$QT5_CFLAGS -fPIC"