summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLada Trimasova <ltrimas@synopsys.com>2016-02-03 22:33:02 +0300
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-02-05 16:29:09 +0000
commitf669ea0d54302de31456d57286aa0e4ca1443e98 (patch)
tree98847dd27ed38f654286d922a9ec8da050809a5d /configure
parenta107c5394a37df068d2f7b304004178a3c361750 (diff)
Link with -ldl option only when it is supported
-ldl option was used unconditionally while libdl is not supported when libc is static. Add build test to configure which checks if libdl is supported. QMAKE_LIBS_DYNLOAD in "src/corelib/plugin/plugin.pri" is now used only if libdl is available. qt_linux_find_symbol_sys from qlibrary_unix is now used only if QT_NO_DYNAMIC_LIBRARY is not defined. Initially reported by Buildroot autobuilder here: http://autobuild.buildroot.net/results/a85/a85a1839a45fb6102e53131ecc8f6dadf92bcdc2 Change-Id: I0397472456efdc4f3ab5f24d01253bee8048a9d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index 0c579b3e74..1473a62c5b 100755
--- a/configure
+++ b/configure
@@ -4734,6 +4734,12 @@ if [ "$CFG_LIBPNG" = "auto" ]; then
fi
fi
+# detect dl
+if ! compileTest unix/libdl "libdl"; then
+ QMakeVar add DEFINES QT_NO_DYNAMIC_LIBRARY
+ QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
+fi
+
if [ "$CFG_EGLFS" = "yes" ]; then
if [ "$CFG_EGL" = "no" ]; then
echo "The EGLFS plugin requires EGL support and cannot be built"