summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-12-07 19:30:07 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-12-14 23:44:30 +0000
commite80bf655e922e9864f8843b5e7bbb47019a6d95a (patch)
tree7ffae51f5170a58b38f883ff30547e2f9d55843d
parenta227ea5bd5af50ac6f874ecf764858a43c53cada (diff)
configure: verify header presence against sources
in addition to the actual library resolution, also resolve the headers belonging to the library, to validate the include path, and possibly ensure that the right version of the library is present. the "include" entries were moved out of the "test" objects, and renamed to "headers". this cleanly permits libraries without compile tests. the headers were not put into the sources, because the variance among the includes is generally orthogonal to the variance among the libraries. note that this - like the library resolution - provides no support for darwin frameworks. consequently, the opengl libraries are excluded from the conversion on darwin. similarly, wasm is excluded (centrally), because emcc is magic and would need advanced wizardry to be dealt with. Change-Id: Ib390c75371efa2badcfec9b74274047ce67c3e5a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--configure.json6
-rw-r--r--mkspecs/features/qt_configure.prf58
-rw-r--r--src/corelib/configure.json22
-rw-r--r--src/gui/configure.json80
-rw-r--r--src/network/configure.json2
-rw-r--r--src/plugins/sqldrivers/configure.json33
-rw-r--r--src/plugins/sqldrivers/configure.pri4
-rw-r--r--src/printsupport/configure.json2
8 files changed, 125 insertions, 82 deletions
diff --git a/configure.json b/configure.json
index 69e058e0c2..2a717daf9a 100644
--- a/configure.json
+++ b/configure.json
@@ -152,13 +152,13 @@
"zlib": {
"label": "zlib",
"test": {
- "include": "zlib.h",
"main": [
"z_streamp stream = 0;",
"(void) zlibVersion();",
"(void) compress2(0, 0, 0, 0, 1); // compress2 was added in zlib version 1.0.8"
]
},
+ "headers": "zlib.h",
"sources": [
{ "libs": "-lzdll", "condition": "config.msvc" },
{ "libs": "-lzlib", "condition": "config.msvc" },
@@ -169,9 +169,9 @@
"dbus": {
"label": "D-Bus >= 1.2",
"test": {
- "include": "dbus/dbus.h",
"main": "(void) dbus_bus_get_private(DBUS_BUS_SYSTEM, (DBusError *)NULL);"
},
+ "headers": "dbus/dbus.h",
"sources": [
{ "type": "pkgConfig", "args": "dbus-1 >= 1.2" },
{
@@ -196,9 +196,9 @@
"libudev": {
"label": "udev",
"test": {
- "include": "libudev.h",
"main": "udev_unref(udev_new());"
},
+ "headers": "libudev.h",
"sources": [
{ "type": "pkgConfig", "args": "libudev" },
"-ludev"
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index e2e341770e..3483ddc5dc 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -582,7 +582,33 @@ defineTest(qtConfResolvePathLibs) {
return($$ret)
}
-# includes-var, includes
+defineReplace(qtConfGetTestIncludes) {
+ defined($${1}._KEYS_, var) {
+ 1st = $$first($${1}._KEYS_)
+ equals(1st, 0) {
+ # array; recurse for every element
+ ret =
+ for (k, $${1}._KEYS_): \
+ ret += $$qtConfGetTestIncludes($${1}.$$k)
+ return($$ret)
+ }
+ # object; try condition and recurse
+ !defined($${1}.headers, var):!defined($${1}.headers._KEYS_, var): \ # just plain broken without it
+ error("headers object '$$1' has no nested headers entry")
+ cond = $$eval($${1}.condition)
+ isEmpty(cond): \ # would be pointless otherwise
+ error("headers object '$$1' has no condition")
+ !$$qtConfEvaluate($$cond) {
+ qtLog("header entry '$$1' failed condition '$$cond'.")
+ return()
+ }
+ qtLog("header entry '$$1' passed condition.")
+ return($$qtConfGetTestIncludes($${1}.headers))
+ }
+ return($$eval($$1)) # plain string - or nothing (can happen for top-level call only)
+}
+
+# includes-var, in-paths, test-object-var
defineTest(qtConfResolvePathIncs) {
ret = true
for (incdir, 2) {
@@ -594,6 +620,21 @@ defineTest(qtConfResolvePathIncs) {
2 -= $$QMAKE_DEFAULT_INCDIRS
$$1 = $$2
export($$1)
+ wasm {
+ # FIXME: emcc downloads pre-built libraries and adds their include
+ # path to the clang call dynamically. it would be possible to parse
+ # the emcc -s USE_xyz=1 --cflags output to populate xzy_INCDIR and
+ # thus make the code below work.
+ return($$ret)
+ }
+ hdrs = $$qtConfGetTestIncludes($${3}.headers)
+ for (hdr, hdrs) {
+ h = $$qtConfFindInPathList($$hdr, $$2 $$EXTRA_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS)
+ isEmpty(h) {
+ qtLog("$$hdr not found in [$$val_escape(2)] and global paths.")
+ ret = false
+ }
+ }
return($$ret)
}
@@ -662,7 +703,7 @@ defineTest(qtConfLibrary_inline) {
!qtConfResolveAllLibs($$1): \
return(false)
- !qtConfResolvePathIncs($${1}.includedir, $$includes): \
+ !qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
return(false)
return(true)
@@ -678,7 +719,7 @@ defineTest(qtConfLibrary_makeSpec) {
!qtConfResolvePathLibs($${1}.libs, $$eval(QMAKE_LIBDIR_$$spec), $$eval(QMAKE_LIBS_$$spec)): \
return(false)
- !qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec)): \
+ !qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec), $$2): \
return(false)
# note that the object is re-exported, because we resolve the libraries.
@@ -741,7 +782,7 @@ defineTest(qtConfLibrary_pkgConfig) {
}
!isEmpty(ignored): \
qtLog("Note: Dropped compiler flags '$$ignored'.")
- !qtConfResolvePathIncs($${1}.includedir, $$includes): \
+ !qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
return(false)
$${1}.defines = $$defines
@@ -1054,7 +1095,7 @@ defineTest(qtConfTestPrepare_compile) {
}
defineTest(qtConfPrepareCompileTestSource) {
- test_dir = $$2
+ test_dir = $$3
test_lang = $$eval($${1}.lang)
isEmpty(test_lang): test_lang = "c++"
@@ -1071,7 +1112,10 @@ defineTest(qtConfPrepareCompileTestSource) {
for (ent, $$qtConfScalarOrList($${1}.head)): \
contents += $$ent
# Includes
- for (ent, $$qtConfScalarOrList($${1}.include)): \
+ hdrs = $$qtConfGetTestIncludes($${1}.include)
+ isEmpty(hdrs): \
+ hdrs = $$qtConfGetTestIncludes($$2)
+ for (ent, hdrs): \
contents += "$${LITERAL_HASH}include <$$ent>"
# Custom code after includes
for (ent, $$qtConfScalarOrList($${1}.tail)): \
@@ -1107,7 +1151,7 @@ defineTest(qtConfTest_compile) {
isEmpty(test) {
test_dir = $$test_base_out_dir/$$section(1, ".", -1)
test_out_dir = $$test_dir
- qtConfPrepareCompileTestSource($${1}.test, $$test_dir)
+ qtConfPrepareCompileTestSource($${1}.test, $${1}.headers, $$test_dir)
} else {
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
test_out_dir = $$test_base_out_dir/$$test
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index 183eb3a13e..81448174b6 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -24,9 +24,9 @@
"doubleconversion": {
"label": "DoubleConversion",
"test": {
- "include": "double-conversion/double-conversion.h",
"main": "(void) double_conversion::StringToDoubleConverter::NO_FLAGS;"
},
+ "headers": "double-conversion/double-conversion.h",
"sources": [
"-ldouble-conversion"
]
@@ -35,7 +35,6 @@
"label": "GLib",
"test": {
"head": "typedef struct _GMainContext GMainContext;",
- "include": "glib.h",
"main": [
"g_thread_init(NULL);",
"(void) g_main_context_default();",
@@ -43,6 +42,7 @@
"g_source_add_poll(NULL, NULL);"
]
},
+ "headers": "glib.h",
"sources": [
{ "type": "pkgConfig", "args": "glib-2.0 gthread-2.0" }
]
@@ -58,7 +58,6 @@
"icu": {
"label": "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);",
@@ -66,6 +65,7 @@
" ucol_close(collator);"
]
},
+ "headers": [ "unicode/utypes.h", "unicode/ucol.h", "unicode/ustring.h" ],
"sources": [
{
"builds": {
@@ -84,9 +84,9 @@
"journald": {
"label": "journald",
"test": {
- "include": [ "systemd/sd-journal.h", "syslog.h" ],
"main": "sd_journal_send(\"PRIORITY=%i\", LOG_INFO, NULL);"
},
+ "headers": [ "systemd/sd-journal.h", "syslog.h" ],
"sources": [
{ "type": "pkgConfig", "args": "libsystemd" },
{ "type": "pkgConfig", "args": "libsystemd-journal" }
@@ -95,7 +95,6 @@
"libatomic": {
"label": "64 bit atomics",
"test": {
- "include": [ "atomic", "cstdint" ],
"tail": [
"void test(volatile std::atomic<std::int64_t> &a)",
"{",
@@ -114,6 +113,7 @@
],
"qmake": "CONFIG += c++11"
},
+ "headers": [ "atomic", "cstdint" ],
"sources": [
"",
"-latomic"
@@ -122,13 +122,13 @@
"libdl": {
"label": "dlopen()",
"test": {
- "include": "dlfcn.h",
"main": [
"dlclose(dlopen(0, 0));",
"dlsym(RTLD_DEFAULT, 0);",
"dlerror();"
]
},
+ "headers": "dlfcn.h",
"sources": [
"",
"-ldl"
@@ -137,9 +137,9 @@
"librt": {
"label": "clock_gettime()",
"test": {
- "include": [ "unistd.h", "time.h" ],
"main": "timespec ts; clock_gettime(CLOCK_REALTIME, &ts);"
},
+ "headers": [ "unistd.h", "time.h" ],
"sources": [
"",
"-lrt"
@@ -148,9 +148,9 @@
"lttng-ust": {
"label": "lttng-ust",
"test": {
- "include": "lttng/ust-events.h",
"main": "lttng_session_destroy(nullptr);"
},
+ "headers": "lttng/ust-events.h",
"sources": [
{ "type": "pkgConfig", "args": "lttng-ust" },
"-llttng-ust"
@@ -161,13 +161,13 @@
"label": "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"
]
},
+ "headers": "pcre2.h",
"sources": [
{ "type": "pkgConfig", "args": "libpcre2-16" },
"-lpcre2-16"
@@ -176,12 +176,12 @@
"pps": {
"label": "PPS",
"test": {
- "include": "sys/pps.h",
"main": [
"pps_decoder_t decoder;",
"pps_decoder_initialize(&decoder, NULL);"
]
},
+ "headers": "sys/pps.h",
"sources": [
"-lpps"
]
@@ -189,10 +189,10 @@
"slog2": {
"label": "slog2",
"test": {
- "include": "sys/slog2.h",
"main": "slog2_set_default_buffer((slog2_buffer_t)-1);"
},
"export": "",
+ "headers": "sys/slog2.h",
"sources": [
"-lslog2"
]
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 7585e9c8d4..d0cca08b75 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -67,7 +67,6 @@
"label": "Direct 2D",
"export": "",
"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;",
@@ -76,6 +75,7 @@
"(void) surface;"
]
},
+ "headers": [ "d3d11_1.h", "d2d1_1.h", "d2d1_1helper.h", "dxgi1_2.h", "wrl.h", "dwrite.h" ],
"sources": [
"-ld2d1 -ldwrite -ld3d11"
]
@@ -83,13 +83,13 @@
"directfb": {
"label": "DirectFB",
"test": {
- "include": "directfb.h",
"tail": [
"#ifdef __typeof__",
"# error DirectFB headers are unclean and cannot compile",
"#endif"
]
},
+ "headers": "directfb.h",
"sources": [
{ "type": "pkgConfig", "args": "directfb" }
]
@@ -98,13 +98,13 @@
"label": "DirectWrite",
"export": "",
"test": {
- "include": [ "dwrite.h", "d2d1.h" ],
"main": [
"IDWriteFactory *factory = 0;",
"DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory),",
" (IUnknown **)(&factory));"
]
},
+ "headers": [ "dwrite.h", "d2d1.h" ],
"sources": [
"-ldwrite"
]
@@ -117,15 +117,12 @@
"#include <stdint.h>",
"extern \"C\" {"
],
- "include": [
- "xf86drmMode.h",
- "xf86drm.h"
- ],
"tail": [
"}"
],
"main": "(void) drmModeGetCrtc(0, 0);"
},
+ "headers": [ "xf86drmMode.h", "xf86drm.h" ],
"sources": [
{ "type": "pkgConfig", "args": "libdrm" },
{ "libs": "-ldrm", "condition": "!config.integrity" },
@@ -135,12 +132,12 @@
"egl": {
"label": "EGL",
"test": {
- "include": "EGL/egl.h",
"main": [
"EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;",
"eglDestroyContext(dpy, ctx);"
]
},
+ "headers": "EGL/egl.h",
"sources": [
{ "type": "pkgConfig", "args": "egl" },
{ "type": "makeSpec", "spec": "EGL" }
@@ -149,7 +146,6 @@
"freetype": {
"label": "FreeType",
"test": {
- "include": "ft2build.h",
"tail": [
"#include FT_FREETYPE_H",
"#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20200)",
@@ -160,6 +156,7 @@
"FT_Face face = 0;"
]
},
+ "headers": "ft2build.h",
"sources": [
{ "type": "pkgConfig", "args": "freetype2" },
{ "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" },
@@ -172,7 +169,6 @@
"fontconfig": {
"label": "Fontconfig",
"test": {
- "include": "fontconfig/fontconfig.h",
"tail": [
"#ifndef FC_RGBA_UNKNOWN",
"# error This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define",
@@ -182,6 +178,7 @@
"FcPattern *pattern = 0;"
]
},
+ "headers": "fontconfig/fontconfig.h",
"sources": [
{ "type": "pkgConfig", "args": "fontconfig" },
{ "type": "freetype", "libs": "-lfontconfig" }
@@ -196,12 +193,12 @@
"#include <stdint.h>",
"extern \"C\" {"
],
- "include": "gbm.h",
"tail": [
"}"
],
"main": "gbm_surface *surface = 0;"
},
+ "headers": "gbm.h",
"sources": [
{ "type": "pkgConfig", "args": "gbm" }
]
@@ -209,7 +206,6 @@
"harfbuzz": {
"label": "HarfBuzz",
"test": {
- "include": "harfbuzz/hb.h",
"tail": [
"#if !HB_VERSION_ATLEAST(1, 6, 0)",
"# error This version of harfbuzz is too old.",
@@ -224,6 +220,7 @@
"hb_buffer_destroy(buffer);"
]
},
+ "headers": "harfbuzz/hb.h",
"sources": [
"-lharfbuzz"
]
@@ -232,9 +229,9 @@
"label": "IMF",
"export": "",
"test": {
- "include": "imf/imf_client.h",
"main": "imf_client_init();"
},
+ "headers": "imf/imf_client.h",
"sources": [
"-linput_client"
]
@@ -242,9 +239,9 @@
"lgmon": {
"label": "lgmon",
"test": {
- "include": "lgmon.h",
"main": "lgmon_supported(getpid());"
},
+ "headers": "lgmon.h",
"sources": [
"-llgmon"
]
@@ -252,9 +249,9 @@
"libinput": {
"label": "libinput",
"test": {
- "include": "libinput.h",
"main": "libinput_udev_create_context(NULL, NULL, NULL);"
},
+ "headers": "libinput.h",
"sources": [
{ "type": "pkgConfig", "args": "libinput" }
]
@@ -266,7 +263,6 @@
"#include <stdlib.h>",
"#include <stdint.h>"
],
- "include": "device/hiddriver.h",
"main": [
"HIDDriver *driver;",
"uintptr_t devicecontext;",
@@ -274,6 +270,7 @@
"gh_hid_enum_devices(driver, &device_id, &devicecontext);"
]
},
+ "headers": "device/hiddriver.h",
"sources": [
{ "libs": "-lhiddev -lusbhid -lusb" }
]
@@ -286,7 +283,6 @@
"#include <stdio.h>",
"extern \"C\" {"
],
- "include": "jpeglib.h",
"tail": [
"}",
"",
@@ -294,6 +290,7 @@
],
"main": "jpeg_create_compress(cinfo);"
},
+ "headers": "jpeglib.h",
"sources": [
{ "libs": "-llibjpeg", "condition": "config.msvc" },
"-ljpeg"
@@ -302,9 +299,9 @@
"libpng": {
"label": "libpng",
"test": {
- "include": "png.h",
"main": "(void) png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);"
},
+ "headers": "png.h",
"sources": [
{ "type": "pkgConfig", "args": "libpng" },
{ "libs": "-llibpng16", "condition": "config.msvc" },
@@ -320,13 +317,13 @@
"mirclient": {
"label": "Mir client libraries",
"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);"
]
},
+ "headers": [ "mir_toolkit/mir_client_library.h", "ubuntu/application/lifecycle_delegate.h", "EGL/egl.h" ],
"sources": [
{ "type": "pkgConfig", "args": "egl mirclient ubuntu-platform-api libcontent-hub >= 0.2.0" }
]
@@ -334,12 +331,12 @@
"mtdev": {
"label": "mtdev",
"test": {
- "include": "mtdev.h",
"main": [
"mtdev m;",
"mtdev_open(&m, 0);"
]
},
+ "headers": "mtdev.h",
"sources": [
{ "type": "pkgConfig", "args": "mtdev" }
]
@@ -352,7 +349,6 @@
"# include <OpenGL/gl.h>",
"#else",
"# define GL_GLEXT_PROTOTYPES",
- "# include <GL/gl.h>",
"#endif"
],
"main": [
@@ -363,6 +359,12 @@
"glEnd();"
]
},
+ "headers": [
+ {
+ "condition": "!config.darwin",
+ "headers": "GL/gl.h"
+ }
+ ],
"sources": [
{ "type": "pkgConfig", "args": "gl", "condition": "!config.darwin" },
{ "type": "makeSpec", "spec": "OPENGL" }
@@ -376,7 +378,6 @@
"# include <OpenGLES/ES2/gl.h>",
"#else",
"# define GL_GLEXT_PROTOTYPES",
- "# include <GLES2/gl2.h>",
"#endif"
],
"main": [
@@ -384,6 +385,12 @@
"glClear(GL_COLOR_BUFFER_BIT);"
]
},
+ "headers": [
+ {
+ "condition": "!config.darwin",
+ "headers": "GLES2/gl2.h"
+ }
+ ],
"sources": [
{ "type": "pkgConfig", "args": "glesv2", "condition": "!config.darwin" },
{ "type": "makeSpec", "spec": "OPENGL_ES2" }
@@ -392,9 +399,9 @@
"openvg": {
"label": "OpenVG",
"test": {
- "include": "VG/openvg.h",
"main": "VGint i = 2; vgFlush();"
},
+ "headers": "VG/openvg.h",
"sources": [
{ "type": "pkgConfig", "args": "vg" },
{ "type": "makeSpec", "spec": "OPENVG" }
@@ -403,9 +410,9 @@
"tslib": {
"label": "tslib",
"test": {
- "include": "tslib.h",
"main": "ts_open(\"foo\", 0);"
},
+ "headers": "tslib.h",
"sources": [
"-lts"
]
@@ -417,10 +424,6 @@
"#include <cstddef>",
"extern \"C\" {"
],
- "include": [
- "mediactl/mediactl.h",
- "mediactl/v4l2subdev.h"
- ],
"tail": [
"}"
],
@@ -431,6 +434,7 @@
"v4l2_subdev_set_format(nullptr, nullptr, 0, V4L2_SUBDEV_FORMAT_ACTIVE);"
]
},
+ "headers": [ "mediactl/mediactl.h", "mediactl/v4l2subdev.h" ],
"sources": [
{ "type": "pkgConfig", "args": "libv4l2 libmediactl" },
"-lmediactl -lv4l2 -lv4l2subdev"
@@ -447,9 +451,9 @@
"wayland_server": {
"label": "Wayland Server",
"test": {
- "include": "wayland-server.h",
"main": "wl_display_create();"
},
+ "headers": "wayland-server.h",
"sources": [
{ "type": "pkgConfig", "args": "wayland-server" }
]
@@ -457,12 +461,12 @@
"xlib": {
"label": "XLib",
"test": {
- "include": "X11/Xlib.h",
"main": [
"Display *d = XOpenDisplay(NULL);",
"XCloseDisplay(d);"
]
},
+ "headers": "X11/Xlib.h",
"sources": [
{ "type": "makeSpec", "spec": "X11" }
]
@@ -476,7 +480,6 @@
"xcb": {
"label": "XCB >= 1.9 (core)",
"test": {
- "include": "xcb/xcb.h",
"main": [
"int primaryScreen = 0;",
"(void)xcb_connect(\"\", &primaryScreen);",
@@ -484,6 +487,7 @@
"int xcbScreenError = XCB_CONN_CLOSED_INVALID_SCREEN;"
]
},
+ "headers": "xcb/xcb.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb >= 1.9" },
"-lxcb"
@@ -517,9 +521,9 @@
"xcb_xlib": {
"label": "XCB Xlib",
"test": {
- "include": "X11/Xlib-xcb.h",
"main": "(void) XGetXCBConnection((Display *)0);"
},
+ "headers": "X11/Xlib-xcb.h",
"sources": [
{ "type": "pkgConfig", "args": "x11-xcb" },
"-lX11-xcb"
@@ -533,13 +537,13 @@
"// 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);"
]
},
+ "headers": "xcb/xkb.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-xkb >= 1.10" },
"-lxcb-xkb"
@@ -549,7 +553,6 @@
"xcb_render": {
"label": "XCB XRender",
"test": {
- "include": "xcb/render.h",
"tail": [
"// 'template' is used as a function argument name in xcb_renderutil.h",
"#define template template_param",
@@ -572,6 +575,7 @@
" formatsReply, XCB_PICT_STANDARD_ARGB_32);"
]
},
+ "headers": "xcb/render.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-renderutil xcb-render" },
"-lxcb-render-util -lxcb-render"
@@ -581,7 +585,6 @@
"xcb_glx": {
"label": "XCB GLX",
"test": {
- "include": "xcb/glx.h",
"main": [
"int primaryScreen = 0;",
"xcb_connection_t *connection = 0;",
@@ -591,6 +594,7 @@
"xcb_glx_query_version_reply(connection, xglx_query_cookie, &error);"
]
},
+ "headers": "xcb/glx.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-glx" },
"-lxcb-glx"
@@ -600,7 +604,6 @@
"xcb_xinput": {
"label": "XCB XInput",
"test": {
- "include": "xcb/xinput.h",
"main": [
"xcb_connection_t *connection = 0;",
"xcb_generic_error_t *error = 0;",
@@ -609,6 +612,7 @@
"xcb_input_xi_query_version_reply(connection, xinput_query_cookie, &error);"
]
},
+ "headers": "xcb/xinput.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-xinput >= 1.12" },
"-lxcb-xinput"
@@ -618,9 +622,9 @@
"xkbcommon": {
"label": "xkbcommon >= 0.5.0",
"test": {
- "include": [ "xkbcommon/xkbcommon.h" ],
"main": "xkb_context_new(XKB_CONTEXT_NO_FLAGS);"
},
+ "headers": [ "xkbcommon/xkbcommon.h" ],
"sources": [
{ "type": "pkgConfig", "args": "xkbcommon >= 0.5.0" }
]
@@ -628,9 +632,9 @@
"xkbcommon_x11": {
"label": "xkbcommon-x11",
"test": {
- "include": [ "xkbcommon/xkbcommon-x11.h" ],
"main": "xkb_x11_get_core_keyboard_device_id(nullptr);"
},
+ "headers": [ "xkbcommon/xkbcommon-x11.h" ],
"sources": [
{ "type": "pkgConfig", "args": "xkbcommon-x11" }
]
diff --git a/src/network/configure.json b/src/network/configure.json
index 019f8378c7..01ed1249e0 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -39,13 +39,13 @@
"libproxy": {
"label": "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);"
]
},
+ "headers": "proxy.h",
"sources": [
"-lproxy"
]
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index 4802d3b04d..cd20eef1df 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -39,9 +39,8 @@
"libraries": {
"db2": {
"label": "DB2 (IBM)",
- "test": {
- "include": [ "sqlcli.h", "sqlcli1.h" ]
- },
+ "test": {},
+ "headers": [ "sqlcli.h", "sqlcli1.h" ],
"sources": [
{ "libs": "-ldb2cli", "condition": "config.win32" },
{ "libs": "-ldb2", "condition": "!config.win32" }
@@ -49,9 +48,8 @@
},
"ibase": {
"label": "InterBase",
- "test": {
- "include": "ibase.h"
- },
+ "test": {},
+ "headers": "ibase.h",
"sources": [
{ "libs": "-lgds32_ms", "condition": "config.win32" },
{ "libs": "-lgds", "condition": "!config.win32" }
@@ -65,9 +63,9 @@
"# include <windows.h>",
"#endif"
],
- "include": "mysql.h",
"main": "mysql_get_client_version();"
},
+ "headers": "mysql.h",
"sources": [
{ "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true },
{ "type": "mysqlConfig", "query": "--libs", "cleanlibs": true },
@@ -81,12 +79,12 @@
"psql": {
"label": "PostgreSQL",
"test": {
- "include": "libpq-fe.h",
"main": [
"PQescapeBytea(0, 0, 0);",
"PQunescapeBytea(0, 0);"
]
},
+ "headers": "libpq-fe.h",
"sources": [
{ "type": "pkgConfig", "args": "libpq" },
{ "type": "psqlConfig" },
@@ -96,9 +94,8 @@
},
"tds": {
"label": "TDS (Sybase)",
- "test": {
- "include": [ "sybfront.h", "sybdb.h" ]
- },
+ "test": {},
+ "headers": [ "sybfront.h", "sybdb.h" ],
"sources": [
{ "type": "sybaseEnv", "libs": "-lNTWDBLIB", "condition": "config.win32" },
{ "type": "sybaseEnv", "libs": "-lsybdb", "condition": "!config.win32" }
@@ -106,9 +103,8 @@
},
"oci": {
"label": "OCI (Oracle)",
- "test": {
- "include": "oci.h"
- },
+ "test": {},
+ "headers": "oci.h",
"sources": [
{ "libs": "-loci", "condition": "config.win32" },
{ "libs": "-lclntsh", "condition": "!config.win32" }
@@ -122,12 +118,12 @@
"# include <windows.h>",
"#endif"
],
- "include": [ "sql.h", "sqlext.h" ],
"main": [
"SQLHANDLE env;",
"SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env);"
]
},
+ "headers": [ "sql.h", "sqlext.h" ],
"sources": [
{ "libs": "-lodbc32", "condition": "config.win32" },
{ "libs": "-liodbc", "condition": "config.darwin" },
@@ -136,9 +132,8 @@
},
"sqlite2": {
"label": "SQLite (version 2)",
- "test": {
- "include": "sqlite.h"
- },
+ "test": {},
+ "headers": "sqlite.h",
"sources": [
"-lsqlite"
]
@@ -147,9 +142,9 @@
"label": "SQLite (version 3)",
"export": "sqlite",
"test": {
- "include": "sqlite3.h",
"main": "sqlite3_open_v2(0, 0, 0, 0);"
},
+ "headers": "sqlite3.h",
"sources": [
{ "type": "pkgConfig", "args": "sqlite3" },
"-lsqlite3"
diff --git a/src/plugins/sqldrivers/configure.pri b/src/plugins/sqldrivers/configure.pri
index 747a47e7b8..84c8114c7b 100644
--- a/src/plugins/sqldrivers/configure.pri
+++ b/src/plugins/sqldrivers/configure.pri
@@ -9,7 +9,7 @@ defineTest(qtConfLibrary_psqlConfig) {
!qtConfResolvePathLibs($${1}.libs, $$libdir, -lpq): \
return(false)
qtRunLoggedCommand("$$pg_config --includedir", includedir)|return(false)
- !qtConfResolvePathIncs($${1}.includedir, $$includedir): \
+ !qtConfResolvePathIncs($${1}.includedir, $$includedir, $$2): \
return(false)
return(true)
}
@@ -63,7 +63,7 @@ defineTest(qtConfLibrary_mysqlConfig) {
includedir =
for (id, rawincludedir): \
includedir += $$clean_path($$id)
- !qtConfResolvePathIncs($${1}.includedir, $$includedir): \
+ !qtConfResolvePathIncs($${1}.includedir, $$includedir, $$2): \
return(false)
return(true)
}
diff --git a/src/printsupport/configure.json b/src/printsupport/configure.json
index abc704fa18..7183d2e737 100644
--- a/src/printsupport/configure.json
+++ b/src/printsupport/configure.json
@@ -17,9 +17,9 @@
"cups": {
"label": "CUPS",
"test": {
- "include": "cups/cups.h",
"main": "cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL); // CUPS 1.4 test"
},
+ "headers": "cups/cups.h",
"sources": [
"-lcups"
]