diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/configure.json | 220 | ||||
-rw-r--r-- | src/gui/configure.json | 484 | ||||
-rw-r--r-- | src/network/configure.json | 58 | ||||
-rw-r--r-- | src/plugins/sqldrivers/configure.json | 56 | ||||
-rw-r--r-- | src/printsupport/configure.json | 5 |
5 files changed, 743 insertions, 80 deletions
diff --git a/src/corelib/configure.json b/src/corelib/configure.json index 67a1a2ad4b..5596280250 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -22,14 +22,26 @@ "libraries": { "doubleconversion": { "label": "DoubleConversion", - "test": "unix/doubleconversion", + "test": { + "include": "double-conversion/double-conversion.h", + "main": "(void) double_conversion::StringToDoubleConverter::NO_FLAGS;" + }, "sources": [ "-ldouble-conversion" ] }, "glib": { "label": "GLib", - "test": "unix/glib", + "test": { + "head": "typedef struct _GMainContext GMainContext;", + "include": "glib.h", + "main": [ + "g_thread_init(NULL);", + "(void) g_main_context_default();", + "(void) g_source_new(0, 0);", + "g_source_add_poll(NULL, NULL);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "glib-2.0 gthread-2.0" } ] @@ -44,7 +56,22 @@ }, "icu": { "label": "ICU", - "test": "unix/icu", + "test": { + "include": [ "unicode/utypes.h", "unicode/ucol.h", "unicode/ustring.h" ], + "main": [ + "UErrorCode status = U_ZERO_ERROR;", + "UCollator *collator = ucol_open(\"ru_RU\", &status);", + "if (!U_FAILURE(status))", + " ucol_close(collator);" + ], + "qmake": [ + "CONFIG += build_all", + "CONFIG(debug, debug|release): \\", + " LIBS += $$LIBS_DEBUG", + "else: \\", + " LIBS += $$LIBS_RELEASE" + ] + }, "sources": [ { "builds": { @@ -62,7 +89,10 @@ }, "journald": { "label": "journald", - "test": "unix/journald", + "test": { + "include": [ "systemd/sd-journal.h", "syslog.h" ], + "main": "sd_journal_send(\"PRIORITY=%i\", LOG_INFO, NULL);" + }, "sources": [ { "type": "pkgConfig", "args": "libsystemd" }, { "type": "pkgConfig", "args": "libsystemd-journal" } @@ -70,7 +100,26 @@ }, "libatomic": { "label": "64 bit atomics", - "test": "common/atomic64", + "test": { + "include": [ "atomic", "cstdint" ], + "tail": [ + "void test(volatile std::atomic<std::int64_t> &a)", + "{", + " std::int64_t v = a.load(std::memory_order_acquire);", + " while (!a.compare_exchange_strong(v, v + 1,", + " std::memory_order_acq_rel,", + " std::memory_order_acquire)) {", + " v = a.exchange(v - 1);", + " }", + " a.store(v + 1, std::memory_order_release);", + "}" + ], + "main": [ + "void *ptr = (void*)0xffffffc0; // any random pointer", + "test(*reinterpret_cast<std::atomic<std::int64_t> *>(ptr));" + ], + "qmake": "CONFIG += c++11" + }, "sources": [ "", "-latomic" @@ -78,7 +127,10 @@ }, "libdl": { "label": "dlopen()", - "test": "unix/dlopen", + "test": { + "include": "dlfcn.h", + "main": "dlopen(0, 0);" + }, "sources": [ "", "-ldl" @@ -86,7 +138,10 @@ }, "librt": { "label": "clock_gettime()", - "test": "unix/clock-gettime", + "test": { + "include": [ "unistd.h", "time.h" ], + "main": "timespec ts; clock_gettime(CLOCK_REALTIME, &ts);" + }, "sources": [ "", "-lrt" @@ -94,21 +149,38 @@ }, "pcre2": { "label": "PCRE2", - "test": "unix/pcre2", + "test": { + "head": "#define PCRE2_CODE_UNIT_WIDTH 16", + "include": "pcre2.h", + "tail": [ + "#if (PCRE2_MAJOR < 10) || ((PCRE2_MAJOR == 10) && (PCRE2_MINOR < 20))", + "# error This PCRE version is not supported", + "#endif" + ] + }, "sources": [ "-lpcre2-16" ] }, "pps": { "label": "PPS", - "test": "unix/pps", + "test": { + "include": "sys/pps.h", + "main": [ + "pps_decoder_t decoder;", + "pps_decoder_initialize(&decoder, NULL);" + ] + }, "sources": [ "-lpps" ] }, "slog2": { "label": "slog2", - "test": "unix/slog2", + "test": { + "include": "slog2.h", + "main": "slog2_set_default_buffer((slog2_buffer_t)-1);" + }, "export": "", "sources": [ "-lslog2" @@ -120,23 +192,77 @@ "atomicfptr": { "label": "working std::atomic for function pointers", "type": "compile", - "test": "common/atomicfptr" + "test": { + "include": "atomic", + "tail": [ + "typedef void (*fptr)(int);", + "typedef std::atomic<fptr> atomicfptr;", + "void testfunction(int) { }", + "void test(volatile atomicfptr &a)", + "{", + " fptr v = a.load(std::memory_order_acquire);", + " while (!a.compare_exchange_strong(v, &testfunction,", + " std::memory_order_acq_rel,", + " std::memory_order_acquire)) {", + " v = a.exchange(&testfunction);", + " }", + " a.store(&testfunction, std::memory_order_release);", + "}" + ], + "main": [ + "atomicfptr fptr(testfunction);", + "test(fptr);" + ], + "qmake": "CONFIG += c++11" + } }, "clock-monotonic": { "label": "POSIX monotonic clock", "type": "compile", - "test": "unix/clock-monotonic", + "test": { + "include": [ "unistd.h", "time.h" ], + "main": [ + "#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)", + "timespec ts;", + "clock_gettime(CLOCK_MONOTONIC, &ts);", + "#else", + "# error Feature _POSIX_MONOTONIC_CLOCK not available", + "#endif" + ] + }, "use": "librt" }, "cloexec": { "label": "O_CLOEXEC", "type": "compile", - "test": "unix/cloexec" + "test": { + "head": "#define _GNU_SOURCE 1", + "include": [ "sys/types.h", "sys/socket.h", "fcntl.h", "unistd.h" ], + "main": [ + "int pipes[2];", + "(void) pipe2(pipes, O_CLOEXEC | O_NONBLOCK);", + "(void) fcntl(0, F_DUPFD_CLOEXEC, 0);", + "(void) dup3(0, 3, O_CLOEXEC);", + "#if defined(__NetBSD__)", + "(void) paccept(0, 0, 0, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK);", + "#else", + "(void) accept4(0, 0, 0, SOCK_CLOEXEC | SOCK_NONBLOCK);", + "#endif" + ] + } }, "eventfd": { "label": "eventfd", "type": "compile", - "test": "unix/eventfd" + "test": { + "include": "sys/eventfd.h", + "main": [ + "eventfd_t value;", + "int fd = eventfd(0, EFD_CLOEXEC);", + "eventfd_read(fd, &value);", + "eventfd_write(fd, value);" + ] + } }, "posix-iconv": { "label": "POSIX iconv", @@ -151,37 +277,89 @@ "inotify": { "label": "inotify", "type": "compile", - "test": "unix/inotify" + "test": { + "include": "sys/inotify.h", + "main": [ + "inotify_init();", + "inotify_add_watch(0, \"foobar\", IN_ACCESS);", + "inotify_rm_watch(0, 1);" + ] + } }, "ipc_sysv": { "label": "SysV IPC", "type": "compile", - "test": "unix/ipc_sysv" + "test": { + "include": [ "sys/types.h", "sys/ipc.h", "sys/sem.h", "sys/shm.h", "fcntl.h" ], + "main": [ + "key_t unix_key = ftok(\"test\", 'Q');", + "semctl(semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL), 0, IPC_RMID, 0);", + "shmget(unix_key, 0, 0666 | IPC_CREAT | IPC_EXCL);", + "shmctl(0, 0, (struct shmid_ds *)(0));" + ] + } }, "ipc_posix": { "label": "POSIX IPC", "type": "compile", - "test": "unix/ipc_posix" + "test": { + "include": [ "sys/types.h", "sys/mman.h", "semaphore.h", "fcntl.h" ], + "main": [ + "sem_close(sem_open(\"test\", O_CREAT | O_EXCL, 0666, 0));", + "shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666);", + "shm_unlink(\"test\");" + ], + "qmake": "linux: LIBS += -lpthread -lrt" + } }, "ppoll": { "label": "ppoll()", "type": "compile", - "test": "unix/ppoll" + "test": { + "include": [ "signal.h", "poll.h" ], + "main": [ + "struct pollfd pfd;", + "struct timespec ts;", + "sigset_t sig;", + "ppoll(&pfd, 1, &ts, &sig);" + ] + } }, "pollts": { "label": "pollts()", "type": "compile", - "test": "unix/pollts" + "test": { + "include": [ "poll.h", "signal.h", "time.h" ], + "main": [ + "struct pollfd pfd;", + "struct timespec ts;", + "sigset_t sig;", + "pollts(&pfd, 1, &ts, &sig);" + ] + } }, "poll": { "label": "poll()", "type": "compile", - "test": "unix/poll" + "test": { + "include": "poll.h", + "main": [ + "struct pollfd pfd;", + "poll(&pfd, 1, 0);" + ] + } }, "syslog": { "label": "syslog", "type": "compile", - "test": "unix/syslog" + "test": { + "include": "syslog.h", + "main": [ + "openlog(\"qt\", 0, LOG_USER);", + "syslog(LOG_INFO, \"configure\");", + "closelog();" + ] + } }, "xlocalescanprint": { "label": "xlocale.h (or equivalents)", diff --git a/src/gui/configure.json b/src/gui/configure.json index a51557e6cd..062171606e 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -66,14 +66,30 @@ "direct2d": { "label": "Direct 2D", "export": "", - "test": "qpa/direct2d", + "test": { + "include": [ "d3d11_1.h", "d2d1_1.h", "d2d1_1helper.h", "dxgi1_2.h", "wrl.h", "dwrite.h" ], + "tail": "using Microsoft::WRL::ComPtr;", + "main": [ + "ComPtr<ID2D1Factory1> d2dFactory;", + "D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, d2dFactory.ReleaseAndGetAddressOf());", + "ComPtr<IDXGISurface1> surface;", + "(void) surface;" + ] + }, "sources": [ "-ld2d1 -ldwrite -ld3d11" ] }, "directfb": { "label": "DirectFB", - "test": "qpa/directfb", + "test": { + "include": "directfb.h", + "tail": [ + "#ifdef __typeof__", + "# error DirectFB headers are unclean and cannot compile", + "#endif" + ] + }, "sources": [ { "type": "pkgConfig", "args": "directfb" } ] @@ -81,14 +97,30 @@ "directwrite": { "label": "DirectWrite", "export": "", - "test": "win/directwrite", + "test": { + "include": [ "dwrite.h", "d2d1.h" ], + "main": [ + "IDWriteFactory *factory = 0;", + "DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory),", + " (IUnknown **)(&factory));" + ] + }, "sources": [ "-ldwrite" ] }, "drm": { "label": "KMS", - "test": "qpa/kms", + "test": { + "include": [ "stdlib.h", "stdint.h" ], + "tail": [ + "extern \"C\" {", + "#include <xf86drmMode.h>", + "#include <xf86drm.h>", + "}" + ], + "main": "(void) drmModeGetCrtc(0, 0);" + }, "sources": [ { "type": "pkgConfig", "args": "libdrm" }, { "libs": "-ldrm", "condition": "!config.integrity" }, @@ -97,7 +129,13 @@ }, "egl": { "label": "EGL", - "test": "qpa/egl", + "test": { + "include": "EGL/egl.h", + "main": [ + "EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;", + "eglDestroyContext(dpy, ctx);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "egl" }, { "type": "makeSpec", "spec": "EGL" } @@ -105,7 +143,18 @@ }, "freetype": { "label": "FreeType", - "test": "unix/freetype", + "test": { + "head": [ + "#include <ft2build.h>", + "#include FT_FREETYPE_H", + "#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20200)", + "# error This version of freetype is too old.", + "#endif" + ], + "main": [ + "FT_Face face = 0;" + ] + }, "sources": [ { "type": "pkgConfig", "args": "freetype2" }, { "type": "freetype", "libs": "-lfreetype" } @@ -113,7 +162,23 @@ }, "fontconfig": { "label": "Fontconfig", - "test": "unix/fontconfig", + "test": { + "head": [ + "#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) < 20110)", + "# error This version of freetype is too old.", + "#endif" + ], + "main": [ + "FT_Face face = 0;", + "FcPattern *pattern = 0;" + ] + }, "sources": [ { "type": "pkgConfig", "args": "fontconfig freetype2" }, { "type": "freetype", "libs": "-lfontconfig -lfreetype" } @@ -121,14 +186,37 @@ }, "gbm": { "label": "GBM", - "test": "qpa/gbm", + "test": { + "include": [ "stdlib.h", "stdint.h" ], + "tail": [ + "extern \"C\" {", + "#include <gbm.h>", + "}" + ], + "main": "gbm_surface *surface = 0;" + }, "sources": [ { "type": "pkgConfig", "args": "gbm" } ] }, "harfbuzz": { "label": "HarfBuzz", - "test": "unix/harfbuzz", + "test": { + "include": "harfbuzz/hb.h", + "tail": [ + "#if !HB_VERSION_ATLEAST(0, 9, 42)", + "# error This version of harfbuzz is too old.", + "#endif" + ], + "main": [ + "hb_buffer_t *buffer = hb_buffer_create();", + "const uint16_t string[] = { 'A', 'b', 'c' };", + "hb_buffer_add_utf16(buffer, string, 3, 0, 3);", + "hb_buffer_guess_segment_properties(buffer);", + "hb_buffer_set_flags(buffer, hb_buffer_flags_t(HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES));", + "hb_buffer_destroy(buffer);" + ] + }, "sources": [ "-lharfbuzz" ] @@ -136,35 +224,62 @@ "imf": { "label": "IMF", "export": "", - "test": "unix/qqnx_imf", + "test": { + "include": "imf/imf_client.h", + "main": "imf_client_init();" + }, "sources": [ "-linput_client" ] }, "lgmon": { "label": "lgmon", - "test": "unix/lgmon", + "test": { + "include": "lgmon.h", + "main": "lgmon_supported(getpid());" + }, "sources": [ "-llgmon" ] }, "libinput": { "label": "libinput", - "test": "unix/libinput", + "test": { + "include": "libinput.h", + "main": "libinput_udev_create_context(NULL, NULL, NULL);" + }, "sources": [ { "type": "pkgConfig", "args": "libinput" } ] }, "integrityhid": { "label": "integrityhid", - "test": "qpa/integrityhid", + "test": { + "include": [ "stdlib.h", "stdint.h", "device/hiddriver.h" ], + "main": [ + "HIDDriver *driver;", + "uintptr_t devicecontext;", + "uint32_t device_id;", + "gh_hid_enum_devices(driver, &device_id, &devicecontext);" + ] + }, "sources": [ { "libs": "-lhiddev -lusbhid -lusb" } ] }, "libjpeg": { "label": "libjpeg", - "test": "unix/libjpeg", + "test": { + "include": [ "sys/types.h", "stdio.h" ], + "tail": [ + "extern \"C\" {", + "#include <jpeglib.h>", + "}", + "", + "j_compress_ptr cinfo;" + ], + "main": "jpeg_create_compress(cinfo);" + }, "sources": [ { "libs": "-llibjpeg", "condition": "config.msvc" }, { "libs": "-ljpeg", "condition": "!config.msvc" } @@ -172,7 +287,10 @@ }, "libpng": { "label": "libpng", - "test": "unix/libpng", + "test": { + "include": "png.h", + "main": "(void) png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);" + }, "sources": [ { "type": "pkgConfig", "args": "libpng" }, { "libs": "-llibpng", "condition": "config.msvc" }, @@ -184,21 +302,50 @@ }, "mirclient": { "label": "Mir client libraries", - "test": "qpa/mirclient", + "test": { + "include": [ "mir_toolkit/mir_client_library.h", "ubuntu/application/lifecycle_delegate.h", "EGL/egl.h" ], + "tail": "static void surfaceCreateCallback(MirSurface*, void*) {}", + "main": [ + "u_application_lifecycle_delegate_new();", + "mir_surface_create(0, surfaceCreateCallback, 0);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "egl mirclient ubuntu-platform-api libcontent-hub >= 0.2.0" } ] }, "mtdev": { "label": "mtdev", - "test": "unix/mtdev", + "test": { + "include": "mtdev.h", + "main": [ + "mtdev m;", + "mtdev_open(&m, 0);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "mtdev" } ] }, "opengl": { "label": "Desktop OpenGL", - "test": "unix/opengldesktop", + "test": { + "head": [ + "#ifdef __APPLE__", + "# include <OpenGL/gl.h>", + "#else", + "# define GL_GLEXT_PROTOTYPES", + "# include <GL/gl.h>", + "#endif" + ], + "main": [ + "glBegin(GL_TRIANGLES);", + " glVertex2f(20.0f, 10.0f);", + " glVertex2f(10.0f, 30.0f);", + " glVertex2f(20.0f, 50.0f);", + "glEnd();" + ] + }, "sources": [ { "type": "pkgConfig", "args": "gl", "condition": "!config.darwin" }, { "type": "makeSpec", "spec": "OPENGL" } @@ -206,7 +353,20 @@ }, "opengl_es2": { "label": "OpenGL ES 2.0", - "test": "unix/opengles2", + "test": { + "head": [ + "#ifdef __APPLE__", + "# include <OpenGLES/ES2/gl.h>", + "#else", + "# define GL_GLEXT_PROTOTYPES", + "# include <GLES2/gl2.h>", + "#endif" + ], + "main": [ + "glUniform1f(1, GLfloat(1.0));", + "glClear(GL_COLOR_BUFFER_BIT);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "glesv2", "condition": "!config.darwin" }, { "type": "makeSpec", "spec": "OPENGL_ES2" } @@ -214,7 +374,10 @@ }, "openvg": { "label": "OpenVG", - "test": "unix/openvg", + "test": { + "include": "VG/openvg.h", + "main": "VGint i = 2; vgFlush();" + }, "sources": [ { "type": "pkgConfig", "args": "vg" }, { "type": "makeSpec", "spec": "OPENVG" } @@ -222,14 +385,20 @@ }, "tslib": { "label": "tslib", - "test": "unix/tslib", + "test": { + "include": "tslib.h", + "main": "ts_open(\"foo\", 0);" + }, "sources": [ "-lts" ] }, "wayland_server": { "label": "Wayland Server", - "test": "qpa/wayland-server", + "test": { + "include": "wayland-server.h", + "main": "wl_display_create();" + }, "sources": [ { "type": "pkgConfig", "args": "wayland-server" } ] @@ -242,7 +411,15 @@ }, "xcb": { "label": "XCB >= 1.5 (core)", - "test": "qpa/xcb", + "test": { + "include": "xcb/xcb.h", + "main": [ + "int primaryScreen = 0;", + "(void)xcb_connect(\"\", &primaryScreen);", + "// This won't compile unless libxcb >= 1.5 which defines XCB_ATOM_PRIMARY.", + "int xcbAtomPrimary = XCB_ATOM_PRIMARY;" + ] + }, "sources": [ { "type": "pkgConfig", "args": "xcb >= 1.5" }, "-lxcb" @@ -250,7 +427,27 @@ }, "xcb_syslibs": { "label": "XCB (extensions)", - "test": "qpa/xcb-syslibs", + "test": { + "include": [ + "xcb/xcb.h", + "xcb/xfixes.h", + "xcb/xcb_image.h", + "xcb/xcb_keysyms.h", + "xcb/sync.h", + "xcb/randr.h", + "xcb/shm.h" + ], + "tail": [ + "// This workaround can be removed for xcb-icccm > 3.8", + "#define class class_name", + "#include <xcb/xcb_icccm.h>", + "#undef class" + ], + "main": [ + "int primaryScreen = 0;", + "(void) xcb_connect(\"\", &primaryScreen);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape" }, @@ -259,7 +456,13 @@ }, "xcb_xlib": { "label": "XCB Xlib", - "test": "qpa/xcb-xlib", + "test": { + "include": [ "xcb/xcb.h", "X11/Xlib.h", "X11/Xlib-xcb.h" ], + "main": [ + "Display *dpy = XOpenDisplay(\"\");", + "(void) XGetXCBConnection(dpy);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "x11-xcb x11 xcb" }, "-lxcb -lX11 -lX11-xcb" @@ -267,7 +470,18 @@ }, "xcb_xkb": { "label": "XCB XKB >= 1.10", - "test": "qpa/xcb-xkb", + "test": { + "head": [ + "// xkb.h is using a variable called 'explicit', which is a reserved keyword in C++", + "#define explicit dont_use_cxx_explicit" + ], + "include": "xcb/xkb.h", + "tail": "#undef explicit", + "main": [ + "// This takes more arguments in xcb-xkb < 1.10.", + "xcb_xkb_get_kbd_by_name_unchecked(NULL, 0, 0, 0, 0);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "xcb-xkb >= 1.10 xcb" }, "-lxcb-xkb -lxcb" @@ -275,7 +489,30 @@ }, "xcb_render": { "label": "XCB XRender", - "test": "qpa/xcb-render", + "test": { + "include": [ "xcb/xcb.h", "xcb/render.h" ], + "tail": [ + "// 'template' is used as a function argument name in xcb_renderutil.h", + "#define template template_param", + "// extern \"C\" is missing, too", + "extern \"C\" {", + "#include <xcb/xcb_renderutil.h>", + "}", + "#undef template" + ], + "main": [ + "int primaryScreen = 0;", + "xcb_generic_error_t *error = 0;", + "xcb_connection_t *connection = xcb_connect(\"\", &primaryScreen);", + "xcb_render_query_pict_formats_cookie_t formatsCookie =", + " xcb_render_query_pict_formats(connection);", + "xcb_render_query_pict_formats_reply_t *formatsReply =", + " xcb_render_query_pict_formats_reply(", + " connection, formatsCookie, &error);", + "xcb_render_util_find_standard_format(", + " formatsReply, XCB_PICT_STANDARD_ARGB_32);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "xcb-renderutil xcb-render xcb" }, "-lxcb-render-util -lxcb-render -lxcb" @@ -283,7 +520,17 @@ }, "xcb_glx": { "label": "XCB GLX", - "test": "qpa/xcb-glx", + "test": { + "include": [ "xcb/xcb.h", "xcb/glx.h" ], + "main": [ + "int primaryScreen = 0;", + "xcb_connection_t *connection = xcb_connect(\"\", &primaryScreen);", + "xcb_generic_error_t *error = 0;", + "xcb_glx_query_version_cookie_t xglx_query_cookie = xcb_glx_query_version(", + " connection, XCB_GLX_MAJOR_VERSION, XCB_GLX_MINOR_VERSION);", + "xcb_glx_query_version_reply(connection, xglx_query_cookie, &error);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "xcb-glx xcb" }, "-lxcb-glx -lxcb" @@ -291,7 +538,28 @@ }, "xinput2": { "label": "Xinput2", - "test": "x11/xinput2", + "test": { + "include": [ "X11/Xlib.h", "X11/extensions/XInput2.h", "X11/extensions/Xge.h" ], + "tail": [ + "#ifndef XInput_2_0", + "# error Missing XInput_2_0 #define", + "#endif" + ], + "main": [ + "// need XGenericEventCookie for XInput2 to work", + "Display *dpy = 0;", + "XEvent xevent;", + "XIEvent *xievent = 0;", + "XIDeviceEvent *xideviceevent = 0;", + "XIHierarchyEvent *xihierarchyevent = 0;", + "int deviceid = 0;", + "int len = 0;", + "(void) XGetEventData(dpy, &xevent.xcookie);", + "XFreeEventData(dpy, &xevent.xcookie);", + "(void) XIListProperties(dpy, deviceid, &len);" + ], + "qmake": "CONFIG += x11" + }, "sources": [ { "type": "pkgConfig", "args": "xi" }, "-lXi" @@ -300,7 +568,10 @@ "xkbcommon": { "label": "xkbcommon", "export": "xkbcommon_evdev", - "test": "unix/xkbcommon", + "test": { + "include": [ "xkbcommon/xkbcommon.h", "xkbcommon/xkbcommon-keysyms.h", "xkbcommon/xkbcommon-names.h" ], + "main": "xkb_context_new(XKB_CONTEXT_NO_FLAGS);" + }, "sources": [ { "type": "pkgConfig", "args": "xkbcommon" } ] @@ -323,7 +594,15 @@ "directwrite2": { "label": "DirectWrite 2", "type": "compile", - "test": "win/directwrite2", + "test": { + "include": [ "dwrite_2.h", "d2d1.h" ], + "main": [ + "IUnknown *factory = 0;", + "(void)(size_t(DWRITE_E_NOCOLOR) + sizeof(IDWriteFontFace2));", + "DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory2),", + " &factory);" + ] + }, "use": "directwrite" }, "directx": { @@ -338,70 +617,180 @@ "egl-x11": { "label": "EGL on X11", "type": "compile", - "test": "qpa/egl-x11", + "test": { + "head": [ + "// Check if EGL is compatible with X. Some EGL implementations, typically on", + "// embedded devices, are not intended to be used together with X. EGL support", + "// has to be disabled in plugins like xcb in this case since the native display,", + "// window and pixmap types will be different than what an X-based platform", + "// plugin would expect." + ], + "include": [ "EGL/egl.h", "xcb/xcb.h", "X11/Xlib.h", "X11/Xlib-xcb.h" ], + "main": [ + "Display *dpy = EGL_DEFAULT_DISPLAY;", + "EGLNativeDisplayType egldpy = XOpenDisplay(\"\");", + "dpy = egldpy;", + "EGLNativeWindowType w = XCreateWindow(dpy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);", + "XDestroyWindow(dpy, w);", + "XCloseDisplay(dpy);" + ] + }, "use": "egl xcb_xlib" }, "egl-brcm": { "label": "Broadcom EGL (Raspberry Pi)", "type": "compile", - "test": "qpa/eglfs-brcm", + "test": { + "include": [ "EGL/egl.h", "bcm_host.h" ], + "main": "vc_dispmanx_display_open(0);" + }, "use": "egl bcm_host" }, "egl-egldevice": { "label": "EGLDevice", "type": "compile", - "test": "qpa/eglfs-egldevice", + "test": { + "include": [ "EGL/egl.h", "EGL/eglext.h" ], + "main": [ + "EGLDeviceEXT device = 0;", + "EGLStreamKHR stream = 0;", + "EGLOutputLayerEXT layer = 0;", + "(void) EGL_DRM_CRTC_EXT;" + ] + }, "use": "egl" }, "egl-mali": { "label": "Mali EGL", "type": "compile", - "test": "qpa/eglfs-mali", + "test": { + "include": [ "EGL/fbdev_window.h", "EGL/egl.h", "GLES2/gl2.h" ], + "main": "fbdev_window *w = 0;" + }, "use": "egl" }, "egl-mali-2": { "label": "Mali 2 EGL", "type": "compile", - "test": "qpa/eglfs-mali-2", + "test": { + "include": [ "EGL/egl.h", "GLES2/gl2.h" ], + "main": "mali_native_window *w = 0;" + }, "use": "egl" }, "egl-viv": { "label": "i.Mx6 EGL", "type": "compile", - "test": "qpa/eglfs-viv", + "test": { + "include": [ "EGL/egl.h", "EGL/eglvivante.h" ], + "main": [ + "#ifdef __INTEGRITY", + "fbGetDisplay();", + "#else", + "// Do not rely on fbGetDisplay(), since the signature has changed over time.", + "// Stick to fbGetDisplayByIndex().", + "fbGetDisplayByIndex(0);", + "#endif" + ], + "qmake": [ + "DEFINES += EGL_API_FB=1", + "!integrity: DEFINES += LINUX=1" + ] + }, "use": "egl" }, "evdev": { "label": "evdev", "type": "compile", - "test": "unix/evdev" + "test": { + "head": [ + "#if defined(__FreeBSD__)", + "# include <dev/evdev/input.h>", + "#else", + "# include <linux/input.h>", + "# include <linux/kd.h>", + "#endif", + "enum {", + " e1 = ABS_PRESSURE,", + " e2 = ABS_X,", + " e3 = REL_X,", + " e4 = SYN_REPORT,", + "};" + ], + "main": [ + "input_event buf[32];", + "(void) buf;" + ] + } }, "integrityfb": { "label": "INTEGRITY framebuffer", "type": "compile", - "test": "qpa/integrityfb" + "test": { + "include": "device/fbdriver.h", + "main": "FBDriver *driver = 0;" + } }, "libinput_axis_api": { "label": "axis API in libinput", "type": "compile", - "test": "unix/libinput_axis_api", + "test": { + "include": "libinput.h", + "main": "libinput_event_pointer_has_axis(nullptr, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);" + }, "use": "libinput" }, "linuxfb": { "label": "LinuxFB", "type": "compile", - "test": "qpa/linuxfb" + "test": { + "include": [ "linux/fb.h", "sys/kd.h", "sys/ioctl.h" ], + "main": [ + "fb_fix_screeninfo finfo;", + "fb_var_screeninfo vinfo;", + "int fd = 3;", + "ioctl(fd, FBIOGET_FSCREENINFO, &finfo);", + "ioctl(fd, FBIOGET_VSCREENINFO, &vinfo);" + ] + } }, "opengles3": { "label": "OpenGL ES 3.0", "type": "compile", - "test": "unix/opengles3", + "test": { + "head": [ + "#ifdef __APPLE__", + "# include <OpenGLES/ES3/gl.h>", + "#else", + "# define GL_GLEXT_PROTOTYPES", + "# include <GLES3/gl3.h>", + "#endif" + ], + "main": [ + "static GLfloat f[6];", + "glGetStringi(GL_EXTENSIONS, 0);", + "glReadBuffer(GL_COLOR_ATTACHMENT1);", + "glUniformMatrix2x3fv(0, 0, GL_FALSE, f);", + "glMapBufferRange(GL_ARRAY_BUFFER, 0, 0, GL_MAP_READ_BIT);" + ] + }, + "comment": [ + "The library is expected to be the same as in ES 2.0 (libGLESv2).", + "The difference is the header and the presence of the functions in", + "the library." + ], "use": "opengl_es2" }, "opengles31": { "label": "OpenGL ES 3.1", "type": "compile", - "test": "unix/opengles31", + "test": { + "include": "GLES3/gl31.h", + "main": [ + "glDispatchCompute(1, 1, 1);", + "glProgramUniform1i(0, 0, 0);" + ] + }, "use": "opengl_es2" }, "qpa_default_platform": { @@ -427,7 +816,14 @@ "xlib": { "label": "XLib", "type": "compile", - "test": "x11/xlib" + "test": { + "include": "X11/Xlib.h", + "main": [ + "Display *d = XOpenDisplay(NULL);", + "XCloseDisplay(d);" + ], + "qmake": "CONFIG += x11" + } } }, diff --git a/src/network/configure.json b/src/network/configure.json index d35dda99bc..c77004d4ba 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -38,7 +38,14 @@ }, "libproxy": { "label": "libproxy", - "test": "common/libproxy", + "test": { + "include": [ "proxy.h" ], + "main": [ + "pxProxyFactory *factory = px_proxy_factory_new();", + "px_proxy_factory_get_proxies(factory, \"http://qt-project.org\");", + "px_proxy_factory_free(factory);" + ] + }, "sources": [ "-lproxy" ] @@ -85,25 +92,66 @@ "getaddrinfo": { "label": "getaddrinfo()", "type": "compile", - "test": "unix/getaddrinfo", + "test": { + "head": [ + "#include <stdio.h>", + "#include <stdlib.h>", + "#ifdef __MINGW32__", + "# include <winsock2.h>", + "# include <ws2tcpip.h>", + "#else", + "# include <sys/types.h>", + "# include <sys/socket.h>", + "# include <netdb.h>", + "#endif" + ], + "main": [ + "addrinfo *res = 0;", + "(void) getaddrinfo(\"foo\", 0, 0, &res);", + "freeaddrinfo(res);", + "gai_strerror(0);" + ] + }, "use": "network" }, "getifaddrs": { "label": "getifaddrs()", "type": "compile", - "test": "unix/getifaddrs", + "test": { + "include": [ "sys/types.h", "sys/socket.h", "net/if.h", "ifaddrs.h" ], + "main": [ + "ifaddrs *list;", + "getifaddrs(&list);", + "freeifaddrs(list);" + ] + }, "use": "network" }, "ipv6ifname": { "label": "IPv6 ifname", "type": "compile", - "test": "unix/ipv6ifname", + "test": { + "include": [ "sys/types.h", "sys/socket.h", "net/if.h" ], + "main": [ + "char buf[IFNAMSIZ];", + "if_nametoindex(\"eth0\");", + "if_indextoname(1, buf);" + ] + }, "use": "network" }, "sctp": { "label": "SCTP support", "type": "compile", - "test": "unix/sctp", + "test": { + "include": [ "sys/types.h", "sys/socket.h", "netinet/in.h", "netinet/sctp.h" ], + "main": [ + "sctp_initmsg sctpInitMsg;", + "socklen_t sctpInitMsgSize = sizeof(sctpInitMsg);", + "(void) socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);", + "(void) getsockopt(-1, SOL_SCTP, SCTP_INITMSG, &sctpInitMsg, &sctpInitMsgSize);" + ] + }, "use": "network" } }, diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json index 5603ceb37b..234f880579 100644 --- a/src/plugins/sqldrivers/configure.json +++ b/src/plugins/sqldrivers/configure.json @@ -39,7 +39,9 @@ "libraries": { "db2": { "label": "DB2 (IBM)", - "test": "unix/db2", + "test": { + "include": [ "sqlcli.h", "sqlcli1.h" ] + }, "sources": [ { "libs": "-ldb2cli", "condition": "config.win32" }, { "libs": "-ldb2", "condition": "!config.win32" } @@ -47,7 +49,9 @@ }, "ibase": { "label": "InterBase", - "test": "unix/ibase", + "test": { + "include": "ibase.h" + }, "sources": [ { "libs": "-lgds32_ms", "condition": "config.win32" }, { "libs": "-lgds", "condition": "!config.win32" } @@ -55,7 +59,15 @@ }, "mysql": { "label": "MySQL", - "test": "unix/mysql", + "test": { + "head": [ + "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__)", + "# include <windows.h>", + "#endif" + ], + "include": "mysql.h", + "main": "mysql_get_client_version();" + }, "sources": [ { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true }, { "type": "mysqlConfig", "query": "--libs", "cleanlibs": true }, @@ -68,7 +80,13 @@ }, "psql": { "label": "PostgreSQL", - "test": "unix/psql", + "test": { + "include": "libpq-fe.h", + "main": [ + "PQescapeBytea(0, 0, 0);", + "PQunescapeBytea(0, 0);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "libpq" }, { "type": "psqlConfig" }, @@ -78,7 +96,9 @@ }, "tds": { "label": "TDS (Sybase)", - "test": "unix/tds", + "test": { + "include": [ "sybfront.h", "sybdb.h" ] + }, "sources": [ { "type": "sybaseEnv", "libs": "-lNTWDBLIB", "condition": "config.win32" }, { "type": "sybaseEnv", "libs": "-lsybdb", "condition": "!config.win32" } @@ -86,7 +106,9 @@ }, "oci": { "label": "OCI (Oracle)", - "test": "unix/oci", + "test": { + "include": "oci.h" + }, "sources": [ { "libs": "-loci", "condition": "config.win32" }, { "libs": "-lclntsh", "condition": "!config.win32" } @@ -94,7 +116,18 @@ }, "odbc": { "label": "ODBC", - "test": "unix/odbc", + "test": { + "head": [ + "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__)", + "# include <windows.h>", + "#endif" + ], + "include": [ "sql.h", "sqlext.h" ], + "main": [ + "SQLHANDLE env;", + "SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env);" + ] + }, "sources": [ { "libs": "-lodbc32", "condition": "config.win32" }, { "libs": "-liodbc", "condition": "config.darwin" }, @@ -103,7 +136,9 @@ }, "sqlite2": { "label": "SQLite (version 2)", - "test": "unix/sqlite2", + "test": { + "include": "sqlite.h" + }, "sources": [ "-lsqlite" ] @@ -111,7 +146,10 @@ "sqlite3": { "label": "SQLite (version 3)", "export": "sqlite", - "test": "unix/sqlite", + "test": { + "include": "sqlite3.h", + "main": "sqlite3_open_v2(0, 0, 0, 0);" + }, "sources": [ { "type": "pkgConfig", "args": "sqlite3" }, "-lsqlite3" diff --git a/src/printsupport/configure.json b/src/printsupport/configure.json index ad38281145..e8cec22c09 100644 --- a/src/printsupport/configure.json +++ b/src/printsupport/configure.json @@ -16,7 +16,10 @@ "libraries": { "cups": { "label": "CUPS", - "test": "unix/cups", + "test": { + "include": "cups/cups.h", + "main": "cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL); // CUPS 1.4 test" + }, "sources": [ "-lcups" ] |