{ "module": "network", "depends": [ "core" ], "testDir": "../../config.tests", "commandline": { "assignments": { "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": "corewlan", "sources": [ "-framework CoreWLAN -framework Foundation" ] }, "network": { "export": "", "sources": [ { "type": "makeSpec", "spec": "NETWORK" } ] }, "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);" ] }, "sources": [ "-lproxy" ] }, "openssl_headers": { "label": "OpenSSL Headers", "export": "openssl", "test": "openssl", "sources": [ { "comment": "placeholder for OPENSSL_PATH", "libs": "" } ] }, "openssl": { "label": "OpenSSL", "test": "openssl", "sources": [ { "type": "openssl" }, { "comment": "placeholder for OPENSSL_{PATH,LIBS{,_{DEBUG,RELEASE}}}", "libs": "", "builds": { "debug": "", "release": "" }, "condition": "config.win32 && !features.shared" }, { "libs": "-lssleay32 -llibeay32", "builds": { "debug": "", "release": "" }, "condition": "config.win32 && features.shared" }, { "libs": "-lssl -lcrypto", "condition": "!config.win32" } ] } }, "tests": { "getifaddrs": { "label": "getifaddrs()", "type": "compile", "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": { "include": [ "sys/types.h", "sys/socket.h", "net/if.h" ], "main": [ "char buf[IFNAMSIZ];", "if_nametoindex(\"eth0\");", "if_indextoname(1, buf);", "if_freenameindex(if_nameindex());" ] }, "use": "network" }, "linux-netlink": { "label": "Linux AF_NETLINK sockets", "type": "compile", "test": { "include": [ "asm/types.h", "linux/netlink.h", "linux/rtnetlink.h", "sys/socket.h" ], "main": [ "struct rtattr rta = { };", "struct ifinfomsg ifi = {};", "struct ifaddrmsg ifa = {};", "struct ifa_cacheinfo ci;", "ci.ifa_prefered = ci.ifa_valid = 0;", "(void)RTM_NEWLINK; (void)RTM_NEWADDR;", "(void)IFLA_ADDRESS; (void)IFLA_IFNAME;", "(void)IFA_ADDRESS; (void)IFA_LABEL; (void)IFA_CACHEINFO;", "(void)(IFA_F_SECONDARY | IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_MANAGETEMPADDR);" ] } }, "sctp": { "label": "SCTP support", "type": "compile", "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" }, "openssl11": { "label": "OpenSSL v. 1.1 support", "type": "compile", "test": "unix/openssl11", "use": "network" } }, "features": { "corewlan": { "label": "CoreWLan", "condition": "libs.corewlan", "emitIf": "config.darwin", "output": [ "feature", "privateFeature" ] }, "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" ] }, "linux-netlink": { "label": "Linux AF_NETLINK", "condition": "config.linux && tests.linux-netlink", "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 && (features.openssl-linked || libs.openssl_headers)", "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.securetransport && libs.openssl", "output": [ "privateFeature", { "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" ] }, "opensslv11": { "label": "OpenSSL v. 1.1", "condition": "tests.openssl11", "output": ["publicFeature", "feature"] }, "sctp": { "label": "SCTP", "autoDetect": false, "condition": "tests.sctp", "output": [ "publicFeature", "feature" ] }, "system-proxies": { "label": "Use system proxies", "output": [ "privateFeature" ] }, "ftp": { "label": "FTP", "purpose": "Provides support for the File Transfer Protocol in QNetworkAccessManager.", "section": "Networking", "condition": "features.textdate", "output": [ "publicFeature", "feature" ] }, "http": { "label": "HTTP", "purpose": "Provides support for the Hypertext Transfer Protocol in QNetworkAccessManager.", "section": "Networking", "output": [ "publicFeature", "feature" ] }, "udpsocket": { "label": "QUdpSocket", "purpose": "Provides access to UDP sockets.", "section": "Networking", "output": [ "publicFeature", "feature" ] }, "networkproxy": { "label": "QNetworkProxy", "purpose": "Provides network proxy support.", "section": "Networking", "output": [ "publicFeature", "feature" ] }, "socks5": { "label": "SOCKS5", "purpose": "Provides SOCKS5 support in QNetworkProxy.", "section": "Networking", "condition": "features.networkproxy", "output": [ "publicFeature", "feature" ] }, "networkinterface": { "label": "QNetworkInterface", "purpose": "Supports enumerating a host's IP addresses and network interfaces.", "section": "Networking", "output": [ "publicFeature", "feature" ] }, "networkdiskcache": { "label": "QNetworkDiskCache", "purpose": "Provides a disk cache for network resources.", "section": "Networking", "condition": "features.temporaryfile", "output": [ "publicFeature", "feature" ] }, "bearermanagement": { "label": "Bearer management", "purpose": "Provides bearer management for the network stack.", "section": "Networking", "condition": "features.library && features.networkinterface && features.properties", "output": [ "publicFeature", "feature" ] }, "localserver": { "label": "QLocalServer", "purpose": "Provides a local socket based server.", "section": "Networking", "condition": "features.temporaryfile", "output": [ "publicFeature", "feature" ] }, "dnslookup": { "label": "QDnsLookup", "purpose": "Provides API for DNS lookups.", "section": "Networking", "output": [ "publicFeature" ] } }, "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" }, { "type": "warning", "condition": "features.libproxy && input.qt_namespace == ''", "message": "Some of libproxy's plugins may use incompatible Qt versions. Some platforms and distributions ship libproxy with plugins, such as config_kde4.so, that are linked against old versions of Qt; and libproxy loads these plugins automatically when initialized. If Qt is not in a namespace, that loading causes a crash. Even if the systems on which you build and test have no such plugins, your users' systems may have them. We therefore recommend that you combine -libproxy with -qtnamespace when configuring Qt." } ], "summary": [ { "section": "Qt Network", "entries": [ { "type": "feature", "args": "corewlan", "condition": "config.darwin" }, "getifaddrs", "ipv6ifname", "libproxy", { "type": "feature", "args": "linux-netlink", "condition": "config.linux" }, { "type": "feature", "args": "securetransport", "condition": "config.darwin" }, "openssl", "openssl-linked", "sctp", "system-proxies" ] } ] }