configure: group tests' includes properly

this puts the actually relevant includes into the correct field, which
potentially allows early header resolution, and is generally just
cleaner.

Change-Id: I9db870442d22a329441eafe53098d18cdc91ce16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Oswald Buddenhagen 2017-12-07 19:31:17 +01:00
parent 6b4f2f7556
commit 05d49415ea

View File

@ -114,11 +114,16 @@
"drm": { "drm": {
"label": "KMS", "label": "KMS",
"test": { "test": {
"include": [ "stdlib.h", "stdint.h" ], "head": [
"#include <stdlib.h>",
"#include <stdint.h>",
"extern \"C\" {"
],
"include": [
"xf86drmMode.h",
"xf86drm.h"
],
"tail": [ "tail": [
"extern \"C\" {",
"#include <xf86drmMode.h>",
"#include <xf86drm.h>",
"}" "}"
], ],
"main": "(void) drmModeGetCrtc(0, 0);" "main": "(void) drmModeGetCrtc(0, 0);"
@ -146,8 +151,8 @@
"freetype": { "freetype": {
"label": "FreeType", "label": "FreeType",
"test": { "test": {
"head": [ "include": "ft2build.h",
"#include <ft2build.h>", "tail": [
"#include FT_FREETYPE_H", "#include FT_FREETYPE_H",
"#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20200)", "#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20200)",
"# error This version of freetype is too old.", "# error This version of freetype is too old.",
@ -165,8 +170,8 @@
"fontconfig": { "fontconfig": {
"label": "Fontconfig", "label": "Fontconfig",
"test": { "test": {
"head": [ "include": "fontconfig/fontconfig.h",
"#include <fontconfig/fontconfig.h>", "tail": [
"#ifndef FC_RGBA_UNKNOWN", "#ifndef FC_RGBA_UNKNOWN",
"# error This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define", "# error This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define",
"#endif" "#endif"
@ -184,10 +189,13 @@
"gbm": { "gbm": {
"label": "GBM", "label": "GBM",
"test": { "test": {
"include": [ "stdlib.h", "stdint.h" ], "head": [
"#include <stdlib.h>",
"#include <stdint.h>",
"extern \"C\" {"
],
"include": "gbm.h",
"tail": [ "tail": [
"extern \"C\" {",
"#include <gbm.h>",
"}" "}"
], ],
"main": "gbm_surface *surface = 0;" "main": "gbm_surface *surface = 0;"
@ -252,7 +260,11 @@
"integrityhid": { "integrityhid": {
"label": "integrityhid", "label": "integrityhid",
"test": { "test": {
"include": [ "stdlib.h", "stdint.h", "device/hiddriver.h" ], "head": [
"#include <stdlib.h>",
"#include <stdint.h>"
],
"include": "device/hiddriver.h",
"main": [ "main": [
"HIDDriver *driver;", "HIDDriver *driver;",
"uintptr_t devicecontext;", "uintptr_t devicecontext;",
@ -267,10 +279,13 @@
"libjpeg": { "libjpeg": {
"label": "libjpeg", "label": "libjpeg",
"test": { "test": {
"include": [ "sys/types.h", "stdio.h" ], "head": [
"#include <sys/types.h>",
"#include <stdio.h>",
"extern \"C\" {"
],
"include": "jpeglib.h",
"tail": [ "tail": [
"extern \"C\" {",
"#include <jpeglib.h>",
"}", "}",
"", "",
"j_compress_ptr cinfo;" "j_compress_ptr cinfo;"
@ -393,13 +408,15 @@
"v4l2": { "v4l2": {
"label": "V4L2", "label": "V4L2",
"test": { "test": {
"head": [
"#include <cstddef>",
"extern \"C\" {"
],
"include": [ "include": [
"cstddef" "mediactl/mediactl.h",
"mediactl/v4l2subdev.h"
], ],
"tail": [ "tail": [
"extern \"C\" {",
"#include <mediactl/mediactl.h>",
"#include <mediactl/v4l2subdev.h>",
"}" "}"
], ],
"main": [ "main": [