summaryrefslogtreecommitdiffstats
path: root/src/network/configure.json
blob: 3372d177c37a85b8e9ea549b7bc61b9e3ce27a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
{
    "module": "network",
    "depends": [
        "core"
    ],
    "testDir": "../../config.tests",

    "commandline": {
        "assignments": {
            "OPENSSL_LIBS": "openssl.libs",
            "OPENSSL_LIBS_DEBUG": "openssl.libs.debug",
            "OPENSSL_LIBS_RELEASE": "openssl.libs.release",
            "OPENSSL_PATH": "openssl.prefix"
        },
        "options": {
            "libproxy": "boolean",
            "openssl": { "type": "optionalString", "values": [ "no", "yes", "linked", "runtime" ] },
            "openssl-linked": { "type": "void", "name": "openssl", "value": "linked" },
            "openssl-runtime": { "type": "void", "name": "openssl", "value": "runtime" },
            "sctp": "boolean",
            "securetransport": "boolean",
            "ssl": "boolean",
            "system-proxies": "boolean"
        }
    },

    "libraries": {
        "corewlan": {
            "label": "CoreWLan",
            "export": "",
            "test": "mac/corewlan",
            "sources": [
                "-framework CoreWLAN -framework Foundation"
            ]
        },
        "network": {
            "export": "",
            "sources": [
                { "type": "makeSpec", "spec": "NETWORK" }
            ]
        },
        "libproxy": {
            "label": "libproxy",
            "test": "common/libproxy",
            "sources": [
                "-lproxy"
            ]
        },
        "openssl": {
            "label": "OpenSSL Libraries",
            "export": "",
            "sources": [
                { "type": "openssl" },
                {
                    "comment": "placeholder for OPENSSL_LIBS{,_{DEBUG,RELEASE}}",
                    "libs": "",
                    "builds": {
                        "debug": "",
                        "release": ""
                    },
                    "condition": "config.win32 && !features.shared"
                },
                { "libs": "-lssleay32 -llibeay32", "condition": "config.win32 && features.shared" },
                { "libs": "-lssl -lcrypto", "condition": "!config.win32" }
            ]
        }
    },

    "tests": {
        "getaddrinfo": {
            "label": "getaddrinfo()",
            "type": "compile",
            "test": "unix/getaddrinfo",
            "use": "network"
        },
        "getifaddrs": {
            "label": "getifaddrs()",
            "type": "compile",
            "test": "unix/getifaddrs",
            "use": "network"
        },
        "ipv6ifname": {
            "label": "IPv6 ifname",
            "type": "compile",
            "test": "unix/ipv6ifname",
            "use": "network"
        },
        "openssl": {
            "label": "OpenSSL",
            "type": "compile",
            "test": "unix/openssl"
        },
        "sctp": {
            "label": "SCTP support",
            "type": "compile",
            "test": "unix/sctp",
            "use": "network"
        }
    },

    "features": {
        "corewlan": {
            "label": "CoreWLan",
            "condition": "libs.corewlan",
            "emitIf": "config.darwin",
            "output": [ "feature", "privateFeature" ]
        },
        "getaddrinfo": {
            "label": "getaddrinfo()",
            "condition": "tests.getaddrinfo",
            "output": [ "feature" ]
        },
        "getifaddrs": {
            "label": "getifaddrs()",
            "condition": "tests.getifaddrs",
            "output": [ "feature" ]
        },
        "ipv6ifname": {
            "label": "IPv6 ifname",
            "condition": "tests.ipv6ifname",
            "output": [ "feature" ]
        },
        "libproxy": {
            "label": "libproxy",
            "autoDetect": false,
            "condition": "libs.libproxy",
            "output": [ "privateFeature" ]
        },
        "openssl": {
            "label": "OpenSSL",
            "enable": "input.openssl == 'yes' || input.openssl == 'linked' || input.openssl == 'runtime'",
            "disable": "input.openssl == 'no' || input.ssl == 'no'",
            "autoDetect": "!config.winrt",
            "condition": "!features.securetransport && tests.openssl",
            "output": [
                "privateFeature",
                { "type": "publicQtConfig", "condition": "!features.openssl-linked" },
                { "type": "define", "negative": true, "name": "QT_NO_OPENSSL" }
            ]
        },
        "openssl-linked": {
            "label": "  Qt directly linked to OpenSSL",
            "enable": "input.openssl == 'linked'",
            "disable": "input.openssl != 'linked'",
            "condition": "features.openssl && libs.openssl",
            "output": [
                "privateFeature",
                { "type": "varAssign", "name": "OPENSSL_LIBS", "value": "libs.openssl.libs", "eval": "true" },
                { "type": "varAssign", "name": "OPENSSL_LIBS_DEBUG", "value": "libs.openssl.builds.debug.libs",
                  "eval": "true", "condition": "config.win32" },
                { "type": "varAssign", "name": "OPENSSL_LIBS_RELEASE", "value": "libs.openssl.builds.release.libs",
                  "eval": "true", "condition": "config.win32" },
                { "type": "define", "name": "QT_LINKED_OPENSSL" }
            ]
        },
        "securetransport": {
            "label": "SecureTransport",
            "disable": "input.securetransport == 'no' || input.ssl == 'no'",
            "condition": "config.darwin && (input.openssl == '' || input.openssl == 'no')",
            "output": [
                "privateFeature",
                { "type": "define", "name": "QT_SECURETRANSPORT" }
            ]
        },
        "ssl": {
            "label": "SSL",
            "condition": "config.winrt || features.securetransport || features.openssl",
            "output": [ "publicFeature", "feature" ]
        },
        "sctp": {
            "label": "SCTP",
            "autoDetect": false,
            "condition": "tests.sctp",
            "output": [ "publicFeature", "feature" ]
        },
        "system-proxies": {
            "label": "Use system proxies",
            "output": [ "privateFeature" ]
        }
    },

    "report": [
        {
            "type": "note",
            "condition": "features.openssl-linked && libs.openssl.source != 0
                          && input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''",
            "message": "When linking against OpenSSL, you can override the default
library names through OPENSSL_LIBS.
For example:
    OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
        }
    ],

    "summary": [
        {
            "section": "Qt Network",
            "entries": [
                {
                    "type": "feature",
                    "args": "corewlan",
                    "condition": "config.darwin"
                },
                "getaddrinfo", "getifaddrs", "ipv6ifname", "libproxy",
                {
                    "type": "feature",
                    "args": "securetransport",
                    "condition": "config.darwin"
                },
                "openssl",
                "openssl-linked",
                "sctp",
                "system-proxies"
            ]
        }
    ]
}