aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2014-12-05 21:17:23 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2014-12-10 10:33:39 +0100
commitd94a9a42acce9251ebb723f3b5b31d976e4398c5 (patch)
treef6be3a6fc5d490207627da70aa6c59c0e976521f
parente8d0e58338404872bab0bbe17eaec75818433090 (diff)
configure.ac: add qt5 detection support
Disable QTGL for qt5 because of qv4l2 crash on startup. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--configure.ac42
1 files changed, 28 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 7bf9bf63..588dd9ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,29 +131,43 @@ AS_IF([test "x$with_jpeg" != xno],
AM_CONDITIONAL([HAVE_JPEG], [$have_jpeg])
-PKG_CHECK_MODULES(QT, [QtCore >= 4.4 QtGui >= 4.4], [qt_pkgconfig=true], [qt_pkgconfig=false])
+PKG_CHECK_MODULES(QT5, [Qt5Core >= 5.0 Qt5Gui >= 5.0 Qt5Widgets >= 5.0], [qt_pkgconfig=true], [qt_pkgconfig=false])
if test "x$qt_pkgconfig" = "xtrue"; then
+ QT_CFLAGS="$QT5_CFLAGS -fPIC"
+ QT_LIBS="$QT5_LIBS"
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
- MOC=`$PKG_CONFIG --variable=moc_location QtCore`
- UIC=`$PKG_CONFIG --variable=uic_location QtCore`
- RCC=`$PKG_CONFIG --variable=rcc_location QtCore`
- if test -z "$RCC"; then
- RCC="rcc"
- fi
+ AC_CHECK_PROGS(MOC, [moc-qt5 moc])
+ AC_CHECK_PROGS(UIC, [uic-qt5 uic])
+ AC_CHECK_PROGS(RCC, [rcc-qt5 rcc])
AC_SUBST(MOC)
AC_SUBST(UIC)
AC_SUBST(RCC)
+# disable QTGL for qt5 because qv4l2 crash
+ qt_pkgconfig_gl=false
else
- AC_MSG_WARN(Qt4 or higher is not available)
+ PKG_CHECK_MODULES(QT, [QtCore >= 4.0 QtGui >= 4.0], [qt_pkgconfig=true], [qt_pkgconfig=false])
+ if test "x$qt_pkgconfig" = "xtrue"; then
+ MOC=`$PKG_CONFIG --variable=moc_location QtCore`
+ UIC=`$PKG_CONFIG --variable=uic_location QtCore`
+ RCC=`$PKG_CONFIG --variable=rcc_location QtCore`
+ if test -z "$RCC"; then
+ RCC="rcc"
+ fi
+ AC_SUBST(MOC)
+ AC_SUBST(UIC)
+ AC_SUBST(RCC)
+ PKG_CHECK_MODULES(QTGL, [QtOpenGL >= 4.8 gl], [qt_pkgconfig_gl=true], [qt_pkgconfig_gl=false])
+ if test "x$qt_pkgconfig_gl" = "xtrue"; then
+ AC_DEFINE([HAVE_QTGL], [1], [qt has opengl support])
+ else
+ AC_MSG_WARN(Qt4 OpenGL is not available)
+ fi
+ else
+ AC_MSG_WARN(Qt4 or higher is not available)
+ fi
fi
-PKG_CHECK_MODULES(QTGL, [QtOpenGL >= 4.8 gl], [qt_pkgconfig_gl=true], [qt_pkgconfig_gl=false])
-if test "x$qt_pkgconfig_gl" = "xtrue"; then
- AC_DEFINE([HAVE_QTGL], [1], [qt has opengl support])
-else
- AC_MSG_WARN(Qt4 OpenGL or higher is not available)
-fi
PKG_CHECK_MODULES(ALSA, [alsa], [alsa_pkgconfig=true], [alsa_pkgconfig=false])
if test "x$alsa_pkgconfig" = "xtrue"; then

Privacy Policy