summaryrefslogtreecommitdiffstats
path: root/config.tests/x11
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 09:18:55 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 09:18:55 (GMT)
commite5fcad302d86d316390c6b0f62759a067313e8a9 (patch)
treec2afbf6f1066b6ce261f14341cf6d310e5595bc1 /config.tests/x11
downloadQt-e5fcad302d86d316390c6b0f62759a067313e8a9.zip
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.gz
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.bz2
Long live Qt 4.5!
Diffstat (limited to 'config.tests/x11')
-rw-r--r--config.tests/x11/fontconfig/fontconfig.cpp20
-rw-r--r--config.tests/x11/fontconfig/fontconfig.pro5
-rw-r--r--config.tests/x11/glxfbconfig/glxfbconfig.cpp10
-rw-r--r--config.tests/x11/glxfbconfig/glxfbconfig.pro10
-rw-r--r--config.tests/x11/mitshm/mitshm.cpp22
-rw-r--r--config.tests/x11/mitshm/mitshm.pro5
-rwxr-xr-xconfig.tests/x11/notype.test49
-rw-r--r--config.tests/x11/notype/notypetest.cpp11
-rw-r--r--config.tests/x11/notype/notypetest.pro5
-rw-r--r--config.tests/x11/opengl/opengl.cpp13
-rw-r--r--config.tests/x11/opengl/opengl.pro10
-rw-r--r--config.tests/x11/sm/sm.cpp8
-rw-r--r--config.tests/x11/sm/sm.pro4
-rw-r--r--config.tests/x11/xcursor/xcursor.cpp25
-rw-r--r--config.tests/x11/xcursor/xcursor.pro4
-rw-r--r--config.tests/x11/xfixes/xfixes.cpp14
-rw-r--r--config.tests/x11/xfixes/xfixes.pro3
-rw-r--r--config.tests/x11/xinerama/xinerama.cpp9
-rw-r--r--config.tests/x11/xinerama/xinerama.pro4
-rw-r--r--config.tests/x11/xinput/xinput.cpp18
-rw-r--r--config.tests/x11/xinput/xinput.pro6
-rw-r--r--config.tests/x11/xkb/xkb.cpp30
-rw-r--r--config.tests/x11/xkb/xkb.pro3
-rw-r--r--config.tests/x11/xrandr/xrandr.cpp13
-rw-r--r--config.tests/x11/xrandr/xrandr.pro4
-rw-r--r--config.tests/x11/xrender/xrender.cpp13
-rw-r--r--config.tests/x11/xrender/xrender.pro4
-rw-r--r--config.tests/x11/xshape/xshape.cpp10
-rw-r--r--config.tests/x11/xshape/xshape.pro3
29 files changed, 335 insertions, 0 deletions
diff --git a/config.tests/x11/fontconfig/fontconfig.cpp b/config.tests/x11/fontconfig/fontconfig.cpp
new file mode 100644
index 0000000..8501162
--- /dev/null
+++ b/config.tests/x11/fontconfig/fontconfig.cpp
@@ -0,0 +1,20 @@
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include <fontconfig/fontconfig.h>
+
+#ifndef FC_RGBA_UNKNOWN
+# error "This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define"
+#endif
+
+#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20103)
+# error "This version of freetype is too old."
+#endif
+
+int main(int, char **)
+{
+ FT_Face face;
+ face = 0;
+ FcPattern *pattern;
+ pattern = 0;
+ return 0;
+}
diff --git a/config.tests/x11/fontconfig/fontconfig.pro b/config.tests/x11/fontconfig/fontconfig.pro
new file mode 100644
index 0000000..718a820
--- /dev/null
+++ b/config.tests/x11/fontconfig/fontconfig.pro
@@ -0,0 +1,5 @@
+SOURCES = fontconfig.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lfreetype -lfontconfig
+include(../../unix/freetype/freetype.pri)
diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.cpp b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
new file mode 100644
index 0000000..e86b02a
--- /dev/null
+++ b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
@@ -0,0 +1,10 @@
+#include <GL/gl.h>
+#include <GL/glx.h>
+
+int main(int, char **)
+{
+ GLXFBConfig config;
+ config = 0;
+
+ return 0;
+}
diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.pro b/config.tests/x11/glxfbconfig/glxfbconfig.pro
new file mode 100644
index 0000000..4705ca6
--- /dev/null
+++ b/config.tests/x11/glxfbconfig/glxfbconfig.pro
@@ -0,0 +1,10 @@
+SOURCES = glxfbconfig.cpp
+CONFIG += x11
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += -lGL -lGLU
diff --git a/config.tests/x11/mitshm/mitshm.cpp b/config.tests/x11/mitshm/mitshm.cpp
new file mode 100644
index 0000000..b9be2e0
--- /dev/null
+++ b/config.tests/x11/mitshm/mitshm.cpp
@@ -0,0 +1,22 @@
+#ifdef Q_OS_HPUX
+#error "MITSHM not supported on HP-UX."
+#else
+#include <X11/Xlib.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
+
+int main(int, char **)
+{
+ Display *dpy = 0;
+ int minor;
+ int major;
+ int pixmaps;
+ if (dpy && XShmQueryVersion(dpy, &major, &minor, &pixmaps)) {
+ minor = 0;
+ major = 0;
+ pixmaps = 0;
+ }
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/mitshm/mitshm.pro b/config.tests/x11/mitshm/mitshm.pro
new file mode 100644
index 0000000..8a40317
--- /dev/null
+++ b/config.tests/x11/mitshm/mitshm.pro
@@ -0,0 +1,5 @@
+SOURCES = mitshm.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXext
+hpux*:DEFINES+=Q_OS_HPUX
diff --git a/config.tests/x11/notype.test b/config.tests/x11/notype.test
new file mode 100755
index 0000000..a522491
--- /dev/null
+++ b/config.tests/x11/notype.test
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+QMKSPEC=$1
+XPLATFORM=`basename $1`
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Detecting broken X11 headers... ($*)"
+
+# Detect broken X11 headers when using GCC 2.95 or later
+# Xsun on Solaris 2.5.1:
+# Patches are available for Solaris 2.6, 7, and 8 but
+# not for Solaris 2.5.1.
+# HP-UX:
+# Patches are available for HP-UX 10.20, 11.00, and 11.11.
+# AIX 4.3.3 and AIX 5.1:
+# Headers are clearly broken on all AIX versions, and we
+# don't know of any patches. The strange thing is that we
+# did not get any reports about this issue until very
+# recently, long after gcc 3.0.x was released. It seems to
+# work for us with gcc 2.95.2.
+NOTYPE=no
+
+if [ $XPLATFORM = "solaris-g++" -o $XPLATFORM = "hpux-g++" -o $XPLATFORM = "aix-g++" -o $XPLATFORM = "aix-g++-64" ]; then
+ NOTYPE=yes
+
+ test -d "$OUTDIR/config.tests/x11/notype" || mkdir -p "$OUTDIR/config.tests/x11/notype"
+ "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "$SRCDIR/config.tests/x11/notype/notypetest.pro" -o "$OUTDIR/config.tests/x11/notype/Makefile" >/dev/null 2>&1
+ cd "$OUTDIR/config.tests/x11/notype"
+
+ if [ "$VERBOSE" = "yes" ]; then
+ make
+ else
+ make >/dev/null 2>&1
+ fi
+
+ [ -x notypetest ] && NOTYPE=no
+fi
+
+# done
+if [ "$NOTYPE" = "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Broken X11 headers detected."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "X11 headers look good."
+ exit 1
+fi
diff --git a/config.tests/x11/notype/notypetest.cpp b/config.tests/x11/notype/notypetest.cpp
new file mode 100644
index 0000000..b33949c
--- /dev/null
+++ b/config.tests/x11/notype/notypetest.cpp
@@ -0,0 +1,11 @@
+/* Sample program for configure to test for broken X11 headers that
+confuse gcc 2.95 and better on target platforms such as Solaris.
+*/
+
+#include <X11/Xlib.h>
+#include <X11/ICE/ICElib.h>
+
+int main()
+{
+ return 0;
+}
diff --git a/config.tests/x11/notype/notypetest.pro b/config.tests/x11/notype/notypetest.pro
new file mode 100644
index 0000000..6ce2c62
--- /dev/null
+++ b/config.tests/x11/notype/notypetest.pro
@@ -0,0 +1,5 @@
+TEMPLATE=app
+TARGET=notypetest
+CONFIG-=qt
+CONFIG+=x11
+SOURCES=notypetest.cpp
diff --git a/config.tests/x11/opengl/opengl.cpp b/config.tests/x11/opengl/opengl.cpp
new file mode 100644
index 0000000..ad69379
--- /dev/null
+++ b/config.tests/x11/opengl/opengl.cpp
@@ -0,0 +1,13 @@
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+#ifndef GLU_VERSION_1_2
+# error "Required GLU version 1.2 not found."
+#endif
+
+int main(int, char **)
+{
+ GLuint x;
+ x = 0;
+ return 0;
+}
diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro
new file mode 100644
index 0000000..432bd8d
--- /dev/null
+++ b/config.tests/x11/opengl/opengl.pro
@@ -0,0 +1,10 @@
+SOURCES = opengl.cpp
+CONFIG += x11
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += -lGL -lGLU
diff --git a/config.tests/x11/sm/sm.cpp b/config.tests/x11/sm/sm.cpp
new file mode 100644
index 0000000..8bb5ffb
--- /dev/null
+++ b/config.tests/x11/sm/sm.cpp
@@ -0,0 +1,8 @@
+#include <X11/SM/SMlib.h>
+
+int main(int, char **)
+{
+ SmPointer pointer;
+ pointer = 0;
+ return 0;
+}
diff --git a/config.tests/x11/sm/sm.pro b/config.tests/x11/sm/sm.pro
new file mode 100644
index 0000000..9be43d8
--- /dev/null
+++ b/config.tests/x11/sm/sm.pro
@@ -0,0 +1,4 @@
+SOURCES += sm.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_X11SM
diff --git a/config.tests/x11/xcursor/xcursor.cpp b/config.tests/x11/xcursor/xcursor.cpp
new file mode 100644
index 0000000..08cd94b
--- /dev/null
+++ b/config.tests/x11/xcursor/xcursor.cpp
@@ -0,0 +1,25 @@
+#include <X11/Xlib.h>
+#include <X11/Xcursor/Xcursor.h>
+
+#if !defined(XCURSOR_LIB_MAJOR)
+# define XCURSOR_LIB_MAJOR XCURSOR_MAJOR
+#endif
+#if !defined(XCURSOR_LIB_MINOR)
+# define XCURSOR_LIB_MINOR XCURSOR_MINOR
+#endif
+
+#if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR >= 0
+# define XCURSOR_FOUND
+#else
+# define
+# error "Required Xcursor version 1.0 not found."
+#endif
+
+int main(int, char **)
+{
+ XcursorImage *image;
+ image = 0;
+ XcursorCursors *cursors;
+ cursors = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xcursor/xcursor.pro b/config.tests/x11/xcursor/xcursor.pro
new file mode 100644
index 0000000..b1e69be
--- /dev/null
+++ b/config.tests/x11/xcursor/xcursor.pro
@@ -0,0 +1,4 @@
+SOURCES = xcursor.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXcursor
diff --git a/config.tests/x11/xfixes/xfixes.cpp b/config.tests/x11/xfixes/xfixes.cpp
new file mode 100644
index 0000000..fd36480
--- /dev/null
+++ b/config.tests/x11/xfixes/xfixes.cpp
@@ -0,0 +1,14 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xfixes.h>
+
+#if XFIXES_MAJOR < 2
+# error "Required Xfixes version 2.0 not found."
+#endif
+
+int main(int, char **)
+{
+ XFixesSelectionNotifyEvent event;
+ event.type = 0;
+ return 0;
+}
+
diff --git a/config.tests/x11/xfixes/xfixes.pro b/config.tests/x11/xfixes/xfixes.pro
new file mode 100644
index 0000000..cc94a11
--- /dev/null
+++ b/config.tests/x11/xfixes/xfixes.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xfixes.cpp
diff --git a/config.tests/x11/xinerama/xinerama.cpp b/config.tests/x11/xinerama/xinerama.cpp
new file mode 100644
index 0000000..2cb3cf9
--- /dev/null
+++ b/config.tests/x11/xinerama/xinerama.cpp
@@ -0,0 +1,9 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xinerama.h>
+
+int main(int, char **)
+{
+ XineramaScreenInfo *info;
+ info = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xinerama/xinerama.pro b/config.tests/x11/xinerama/xinerama.pro
new file mode 100644
index 0000000..54d1af0
--- /dev/null
+++ b/config.tests/x11/xinerama/xinerama.pro
@@ -0,0 +1,4 @@
+SOURCES = xinerama.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXinerama
diff --git a/config.tests/x11/xinput/xinput.cpp b/config.tests/x11/xinput/xinput.cpp
new file mode 100644
index 0000000..9a61bc2
--- /dev/null
+++ b/config.tests/x11/xinput/xinput.cpp
@@ -0,0 +1,18 @@
+#ifdef Q_OS_SOLARIS
+#error "Not supported."
+#else
+
+#include <X11/Xlib.h>
+#include <X11/extensions/XInput.h>
+
+#ifdef Q_OS_IRIX
+# include <wacom.h>
+#endif
+
+int main(int, char **)
+{
+ XDeviceButtonEvent *event;
+ event = 0;
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/xinput/xinput.pro b/config.tests/x11/xinput/xinput.pro
new file mode 100644
index 0000000..8acaede
--- /dev/null
+++ b/config.tests/x11/xinput/xinput.pro
@@ -0,0 +1,6 @@
+SOURCES = xinput.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXi
+irix-*:DEFINES+=Q_OS_IRIX
+solaris-*:DEFINES+=Q_OS_SOLARIS
diff --git a/config.tests/x11/xkb/xkb.cpp b/config.tests/x11/xkb/xkb.cpp
new file mode 100644
index 0000000..afe3c57
--- /dev/null
+++ b/config.tests/x11/xkb/xkb.cpp
@@ -0,0 +1,30 @@
+#include <X11/Xlib.h>
+#include <X11/XKBlib.h>
+
+int main(int, char **)
+{
+ Display *display = 0;
+
+ int opcode = -1;
+ int xkbEventBase = -1;
+ int xkbErrorBase = -1;
+ int xkblibMajor = XkbMajorVersion;
+ int xkblibMinor = XkbMinorVersion;
+ XkbQueryExtension(display, &opcode, &xkbEventBase, &xkbErrorBase, &xkblibMajor, &xkblibMinor);
+
+ int keycode = 0;
+ unsigned int state = 0;
+ KeySym keySym;
+ unsigned int consumedModifiers;
+ XkbLookupKeySym(display, keycode, state, &consumedModifiers, &keySym);
+
+ XkbDescPtr xkbDesc = XkbGetMap(display, XkbAllClientInfoMask, XkbUseCoreKbd);
+ int w = XkbKeyGroupsWidth(xkbDesc, keycode);
+ keySym = XkbKeySym(xkbDesc, keycode, w-1);
+ XkbFreeClientMap(xkbDesc, XkbAllClientInfoMask, true);
+
+ state = XkbPCF_GrabsUseXKBStateMask;
+ (void) XkbSetPerClientControls(display, state, &state);
+
+ return 0;
+}
diff --git a/config.tests/x11/xkb/xkb.pro b/config.tests/x11/xkb/xkb.pro
new file mode 100644
index 0000000..d4ec222
--- /dev/null
+++ b/config.tests/x11/xkb/xkb.pro
@@ -0,0 +1,3 @@
+SOURCES = xkb.cpp
+CONFIG += x11
+CONFIG -= qt
diff --git a/config.tests/x11/xrandr/xrandr.cpp b/config.tests/x11/xrandr/xrandr.cpp
new file mode 100644
index 0000000..cd61c2d
--- /dev/null
+++ b/config.tests/x11/xrandr/xrandr.cpp
@@ -0,0 +1,13 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrandr.h>
+
+#if RANDR_MAJOR != 1 || RANDR_MINOR < 1
+# error "Requried Xrandr version 1.1 not found."
+#endif
+
+int main(int, char **)
+{
+ XRRScreenSize *size;
+ size = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xrandr/xrandr.pro b/config.tests/x11/xrandr/xrandr.pro
new file mode 100644
index 0000000..3fb2910
--- /dev/null
+++ b/config.tests/x11/xrandr/xrandr.pro
@@ -0,0 +1,4 @@
+SOURCES = xrandr.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXrender -lXrandr
diff --git a/config.tests/x11/xrender/xrender.cpp b/config.tests/x11/xrender/xrender.cpp
new file mode 100644
index 0000000..7974d73
--- /dev/null
+++ b/config.tests/x11/xrender/xrender.cpp
@@ -0,0 +1,13 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrender.h>
+
+#if RENDER_MAJOR == 0 && RENDER_MINOR < 5
+# error "Required Xrender version 0.6 not found."
+#else
+int main(int, char **)
+{
+ XRenderPictFormat *format;
+ format = 0;
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/xrender/xrender.pro b/config.tests/x11/xrender/xrender.pro
new file mode 100644
index 0000000..e778642
--- /dev/null
+++ b/config.tests/x11/xrender/xrender.pro
@@ -0,0 +1,4 @@
+SOURCES = xrender.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXrender
diff --git a/config.tests/x11/xshape/xshape.cpp b/config.tests/x11/xshape/xshape.cpp
new file mode 100644
index 0000000..01b5ef4
--- /dev/null
+++ b/config.tests/x11/xshape/xshape.cpp
@@ -0,0 +1,10 @@
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/shape.h>
+
+int main(int, char **)
+{
+ XShapeEvent shapeevent;
+ shapeevent.type = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xshape/xshape.pro b/config.tests/x11/xshape/xshape.pro
new file mode 100644
index 0000000..611c048
--- /dev/null
+++ b/config.tests/x11/xshape/xshape.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xshape.cpp