summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-02-23 09:12:34 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-02-23 11:01:10 (GMT)
commit2724520fd551512138731058467c9acea0aa3951 (patch)
tree6edebddd31e50a92ca0b6281df1aac14005352ce
parent53aaca8bc08150db3b446fbb70de3271fe5ea398 (diff)
downloadQt-2724520fd551512138731058467c9acea0aa3951.zip
Qt-2724520fd551512138731058467c9acea0aa3951.tar.gz
Qt-2724520fd551512138731058467c9acea0aa3951.tar.bz2
Add a configure test for XVideo support
Reviewed-By: TrustMe
-rw-r--r--config.tests/x11/xvideo/xvideo.cpp10
-rw-r--r--config.tests/x11/xvideo/xvideo.pro3
-rwxr-xr-xconfigure43
3 files changed, 55 insertions, 1 deletions
diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/x11/xvideo/xvideo.cpp
new file mode 100644
index 0000000..9d0eef6
--- /dev/null
+++ b/config.tests/x11/xvideo/xvideo.cpp
@@ -0,0 +1,10 @@
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+int main(int argc, char** argv)
+{
+ unsigned int count = 0;
+ XvAdaptorInfo *adaptors = 0;
+ XvQueryAdaptors(0, 0, &count, &adaptors);
+ return 0;
+}
diff --git a/config.tests/x11/xvideo/xvideo.pro b/config.tests/x11/xvideo/xvideo.pro
new file mode 100644
index 0000000..114cbd3
--- /dev/null
+++ b/config.tests/x11/xvideo/xvideo.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xvideo.cpp
diff --git a/configure b/configure
index cd29e95..cfff066 100755
--- a/configure
+++ b/configure
@@ -640,6 +640,7 @@ CFG_SHARED=yes
CFG_SM=auto
CFG_XSHAPE=auto
CFG_XSYNC=auto
+CFG_XVIDEO=auto
CFG_XINERAMA=runtime
CFG_XFIXES=runtime
CFG_ZLIB=auto
@@ -921,7 +922,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xvideo|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1533,6 +1534,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ xvideo)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_XVIDEO="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
xsync)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XSYNC="$VAL"
@@ -3624,6 +3632,13 @@ if [ "$PLATFORM_X11" = "yes" ]; then
SHY="*"
SHN=" "
fi
+ if [ "$CFG_XVIDEO" = "no" ]; then
+ XVY=" "
+ XVN="*"
+ else
+ XVY="*"
+ XVN=" "
+ fi
if [ "$CFG_XINERAMA" = "no" ]; then
XAY=" "
XAN="*"
@@ -3727,6 +3742,10 @@ Qt/X11 only:
$SHY -xshape ............ Compile XShape support.
Requires X11/extensions/shape.h.
+ $XVN -no-xvideo ......... Do not compile XVideo support.
+ $XVY -xvideo ............ Compile XVideo support.
+ Requires X11/extensions/Xv.h & Xvlib.h.
+
$SHN -no-xsync .......... Do not compile XSync support.
$SHY -xsync ............. Compile XSync support.
Requires X11/extensions/sync.h.
@@ -5304,6 +5323,23 @@ if [ "$PLATFORM_X11" = "yes" ]; then
fi
fi
+ # auto-detect XVideo support
+ if [ "$CFG_XVIDEO" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_XVIDEO=yes
+ else
+ if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "XVideo support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XVIDEO=no
+ fi
+ fi
+ fi
+
# auto-detect XSync support
if [ "$CFG_XSYNC" != "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
@@ -6245,6 +6281,9 @@ if [ "$PLATFORM_X11" = "yes" ]; then
if [ "$CFG_XSHAPE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG xshape"
fi
+ if [ "$CFG_XVIDEO" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xvideo"
+ fi
if [ "$CFG_XSYNC" = "yes" ]; then
QT_CONFIG="$QT_CONFIG xsync"
fi
@@ -7038,6 +7077,7 @@ fi
[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
[ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
[ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
+[ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
[ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
[ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
@@ -7516,6 +7556,7 @@ fi
if [ "$PLATFORM_X11" = "yes" ]; then
echo "NAS sound support ... $CFG_NAS"
echo "XShape support ...... $CFG_XSHAPE"
+ echo "XVideo support ...... $CFG_XVIDEO"
echo "XSync support ....... $CFG_XSYNC"
echo "Xinerama support .... $CFG_XINERAMA"
echo "Xcursor support ..... $CFG_XCURSOR"