summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-15 15:22:11 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-07 11:19:03 (GMT)
commit79c488a28819b58eed519fb3df2705b8c6e35e05 (patch)
treedeff561a11f6fc1ab41271a858f9f331918dcba2
parent41d27eac40cecbc0067be9622c9bc1c579582a47 (diff)
downloadQt-79c488a28819b58eed519fb3df2705b8c6e35e05.zip
Qt-79c488a28819b58eed519fb3df2705b8c6e35e05.tar.gz
Qt-79c488a28819b58eed519fb3df2705b8c6e35e05.tar.bz2
Add functionality tests for XSync.
It was reported to be auto-detected, but wasn't. Apparently, AIX 6's X11 doesn't have this. Reviewed-By: Denis Dzyubenko <denis.dzyubenko@nokia.com> (cherry picked from commit 0a63875d787e1b035ace2c76fa1d0de6329127d7)
-rw-r--r--config.tests/x11/xsync/xsync.cpp11
-rw-r--r--config.tests/x11/xsync/xsync.pro3
-rwxr-xr-xconfigure36
3 files changed, 49 insertions, 1 deletions
diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp
new file mode 100644
index 0000000..a23fb08
--- /dev/null
+++ b/config.tests/x11/xsync/xsync.cpp
@@ -0,0 +1,11 @@
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/sync.h>
+
+int main(int, char **)
+{
+ XSyncValue value;
+ (void*)&XSyncIntToValue;
+ (void*)&XSyncCreateCounter;
+ return 0;
+}
diff --git a/config.tests/x11/xsync/xsync.pro b/config.tests/x11/xsync/xsync.pro
new file mode 100644
index 0000000..58b8238
--- /dev/null
+++ b/config.tests/x11/xsync/xsync.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xsync.cpp
diff --git a/configure b/configure
index 2b81cab..b5baadb 100755
--- a/configure
+++ b/configure
@@ -570,6 +570,7 @@ CFG_DEBUG_RELEASE=no
CFG_SHARED=yes
CFG_SM=auto
CFG_XSHAPE=auto
+CFG_XSYNC=auto
CFG_XINERAMA=runtime
CFG_XFIXES=runtime
CFG_ZLIB=auto
@@ -831,7 +832,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-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|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-svg|-webkit|-scripttools|-rpath|-force-pkg-config)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xshape|-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|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-svg|-webkit|-scripttools|-rpath|-force-pkg-config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1419,6 +1420,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ xsync)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_XSYNC="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
xinput)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
CFG_XINPUT="$VAL"
@@ -3480,6 +3488,10 @@ Qt/X11 only:
$SHY -xshape ............ Compile XShape support.
Requires X11/extensions/shape.h.
+ $SHN -no-xsync .......... Do not compile XSync support.
+ $SHY -xsync ............. Compile XSync support.
+ Requires X11/extensions/sync.h.
+
$XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
$XAY -xinerama .......... Compile Xinerama support.
Requires X11/extensions/Xinerama.h and libXinerama.
@@ -4993,6 +5005,23 @@ if [ "$PLATFORM_X11" = "yes" ]; then
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
+ CFG_XSYNC=yes
+ else
+ if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "XSync 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_XSYNC=no
+ fi
+ fi
+ fi
+
# auto-detect Xinerama support
if [ "$CFG_XINERAMA" != "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
@@ -5791,6 +5820,9 @@ if [ "$PLATFORM_X11" = "yes" ]; then
if [ "$CFG_XSHAPE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG xshape"
fi
+ if [ "$CFG_XSYNC" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xsync"
+ fi
if [ "$CFG_XINERAMA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG xinerama"
QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
@@ -6503,6 +6535,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_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
[ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
[ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
@@ -6944,6 +6977,7 @@ fi
if [ "$PLATFORM_X11" = "yes" ]; then
echo "NAS sound support ... $CFG_NAS"
echo "XShape support ...... $CFG_XSHAPE"
+ echo "XSync support ....... $CFG_XSYNC"
echo "Xinerama support .... $CFG_XINERAMA"
echo "Xcursor support ..... $CFG_XCURSOR"
echo "Xfixes support ...... $CFG_XFIXES"