qt: fix static linking
`-ldl` option is used unconditionally in `QMAKE_LIBS_DYNLOAD` while libdl is
not supported when libc is static. As the value of `QMAKE_LIBS_DYNLOAD` goes
into 'Libs.private' field of the pkgconfig files created by qmake, static
linking with qt will fail with:
/usr/bin/ld: cannot find -ldl
Fix this issue by adding a build test to configure to check if libdl is
supported. `QMAKE_LIBS_DYNLOAD` in "src/corelib/plugin/plugin.pri" is now used
only if libdl is available.
Fixes:
http://autobuild.buildroot.net/results/459/
4596b9c69cbc387f1071c730aaac76723afaa853/
http://autobuild.buildroot.net/results/459/
4596b9c69cbc387f1071c730aaac76723afaa853/
Backported from Qt5:
https://github.com/qtproject/qtbase/commit/
f669ea0d54302de31456d57286aa0e4ca1443e98
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>