Fix dynamic librariy support detection for platforms without libdl
Some platforms (e.g. FreeBSD) do not have libdl, but dlopen and related functions are part of libc. So first check for dlopen in libc, and only if that fails, look for it in libdl. Task-number: QTBUG-52951 Change-Id: I65a8ed18fce157da32f4e1ffeba30d7513385a8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
dd8745e1d4
commit
e9628fbd39
2
config.tests/unix/dlopen/dlopen.pro
Normal file
2
config.tests/unix/dlopen/dlopen.pro
Normal file
@ -0,0 +1,2 @@
|
||||
SOURCES = $$PWD/dlopen.cpp
|
||||
CONFIG -= qt dylib
|
@ -1,3 +1,2 @@
|
||||
SOURCES = libdl.cpp
|
||||
CONFIG -= qt dylib
|
||||
!qnx: LIBS += -ldl
|
||||
include(../dlopen/dlopen.pro)
|
||||
LIBS += -ldl
|
||||
|
8
configure
vendored
8
configure
vendored
@ -4743,9 +4743,13 @@ if [ "$CFG_LIBPNG" = "auto" ]; then
|
||||
fi
|
||||
|
||||
# detect dl
|
||||
if ! compileTest unix/libdl "libdl"; then
|
||||
QMakeVar add DEFINES QT_NO_DYNAMIC_LIBRARY
|
||||
if compileTest unix/dlopen "dlopen"; then
|
||||
QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
|
||||
else
|
||||
if ! compileTest unix/libdl "libdl"; then
|
||||
QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
|
||||
QMakeVar add DEFINES QT_NO_DYNAMIC_LIBRARY
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_EGLFS" = "yes" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user