Yes, yes, this is just a configure test, but why do something stupid
in the code and then have to shut up Coverity manually?
Fix by making it a global, which means it will be zero-initialized
(I didn't want to do the obvious = 0, as that could protentially
create a "0 used as nullptr" warning at some point in the future.
Coverity-Id: 59485
Change-Id: I49ecd28be983a0e42b420d20da0db34a872c6f44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows setting of variables, like FOO=bar.
Yes, it's intentional that there are no quotes.
Change-Id: Ib306f8f647014b399b87ffff13f1d9e6a10fa2f8
(cherry picked from commit e79200bf7f)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
On macOS, the test script is passed the full path to the compiler, like
/usr/local/bin/icpc. That doesn't match "icpc".
Change-Id: I149e0540c00745fe8119fffd1463c87b8f6a89b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reference an SQLite3 function to verify that the library is being
linked. Discovered that the test didn't do this when I switched the
Windows configure to use a compile test to determine whether the
system has SQLite3. The test passed even though the initial
configure changes failed to provide the test with information about
the SQLite3 libraries.
Change-Id: I3114cfc2dec3a42a60c8e1e432eb8375b440d7e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Where accept4() is used, NetBSD offers paccept() as a replacement function.
Modify check for using accept4() and use paccept() on NetBSD.
See http://netbsd.gw.com/cgi-bin/man-cgi?paccept++NetBSD-current
and http://reviews.llvm.org/D12485
Change-Id: I9b3ecba5f3afad6c357d3f7b8f89589bf313e273
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add pkg-config to the libpng usages as not all systems have the
symlink libpng.so -> libpng<version>.so (affected: NetBSD) that changes
with the version of the lib. If no-pkg-config is used, use -lpng as
before. Tested with FreeBSD 10.3, NetBSD 7.0.1 using png 1.6.21
Change-Id: I5c87f380c84da3d5c56c94da53adb900791c8caa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The use of clock_gettime() is limited to systems having _POSIX_TIMERS
defined, however OpenBSD implements clock_gettime() but does not have the
posix define. Enable using clock_gettime() on OpenBSD as well.
Change-Id: I785954fe61b42b15755ca625a766c9a95179ae8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt does not support libressl which reports itself as openssl but uses
a high version number. This means that we expect it to have features
that it doesn't and will fail to build. Instead detect this situation
at configure time and disable the ssl support.
Change-Id: I73cca4d1544df2aaca0723c38ba63758c287ec41
Reviewed-by: Ralf Nolden <nolden@kde.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This fixes a problem where the configure test may produce a false
positive on iOS if a copy of libmysql for OS X is located, due to the
fact that linking to a dynamic library of a different architecture than
expected is not (yet) an error.
Change-Id: Id41765f49e31d9c9c3becc3436ff5a69b160b8e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Qt 3/4 had NIS configure options and tests for NIS defines,
those were used in QPrintDialog at the time to support
NIS-printers. As the implementation went away a long time ago
and no NIS featueres are implemented anywhere in Qt, the
configure options and config.tests for NIS can be removed.
Change-Id: Ie920e6a422540bf938623265b6ee68c793aeff84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Until now the check didn't use pkgconfig at all, but using pkgconfig
alone does not work for some devices (special cases), so we have to
use a combination of both here.
Change-Id: Ia19a279d80a65352c467661d91a3762448c23ae6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
OpenBSD iconv is in -liconv, so it needs to be added here. NetBSD
has iconv in libc, so only OpenBSD is affected.
Patch obtained from Vadim Zhukov <persgray@gmail.com>,
OpenBSD qt ports maintainer.
Change-Id: Icce25d154857f0ce161b5f6b7ddac3c150a02bb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Having the debug info in separate files is very helpful, especially on
memory constrained 32bit systems. When the debug info is compiled into
the object files, processes can run out of memory when trying to load
them.
Change-Id: I1808a32e855d6a62e17e1b734c511b31db5f03f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
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>
To compile the kms qpa plugin, only libdrm is needed.
Remove the libudev dependency for the compile check to enable
building of the qpa plugin on platforms where libudev is not present
such as BSD systems (but where KMS works)
Change-Id: Icd0be70a8949578a6158d523428706890a9674eb
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The "checking for xxx... [yes|no]" is chosen so that it matches exactly
what GNU Autoconf does. That way, any tools that parse the output will
have less trouble.
This feature is useful for us when debugging a build, as not all checks
produce output in the configure summary.
Change-Id: Id75834dab9ed466e94c7ffff14456edb646a1ced
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Makes it easier to add stuff to it.
Change-Id: Id75834dab9ed466e94c7ffff1445727a2ed975cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We should really start using -L=/foo and -I=/foo inside of sysroots,
this test was preventing us from doing so (while arguably buying us
nothing).
Change-Id: If6e67631c585493871231e5d8a9354fa72e07343
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The journald test was failing as sysroot was not being passed to the
compiler in the compile test. This is due to the fact we were explicitly
defining sysroot in the CXXFLAGS and not in CFLAGS.
Change-Id: I4b4bda71f9aabc8e420e0e89ff3cc8fa3bbca201
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
systemd >= 209 merged the individual libraries libsystemd-journal,
libsystemd-login, libsystemd-id128 and libsystemd-daemon into
a single library, libsystemd. To ease the transition one could pass
an option to its build to generate stub libraries and matching
pkg-config files. With systemd >= 229 this option has now been
removed, causing the build to fail when the journald option is
enabled.
Change-Id: I26670f207f1a9e79c16be5ce8c8a49353143c5ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
-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>
When building application statically, it's important to keep libraries
we're linking against in order. qmake's "*=" operator fails to do that,
so use "+=" instead.
Change-Id: Id3627da47d07c70fd07185a777f2f07bb4057f03
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The C++ standard says it must, but some badly-configured toolchains seem
to be lacking support.
In particular, for some 32-bit platforms without native support for
them, GCC implements 64-bit atomics via out-of-line functions in
libatomic. If that library is missing... well, then std::atomic 64-bit
doesn't work and we mustn't try to use it.
This was found when trying to compile Qt 5.6 for MIPS 32-bit:
Linking library libQt5Core.so.5.6.0
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:500: undefined reference to `__atomic_load_8'
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:478: undefined reference to `__atomic_store_8'
Yocto bug report: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8274
Change-Id: I42e7ef1a481840699a8dffff140224d6614e5c36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3d7586b760)
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
The __ARM_NEON is the standard define for NEON instructions support
__ARM_NEON__ is only legacy, and specifically not defined in
AArch64 builds, which causes us not to detect NEON support there.
The NEON assembler files doesn't build with AArch64, so the NEON
drawhelper methods must be excluded for now.
Change-Id: Ie32f855bde94ee7efd8a8ddb7766c931778e729b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A wayland compositor on i.MX6 needs to create the wl_display
before creating the EGL display. This wl_display then needs to be
exposed so that QWaylandCompositor can use it.
Change-Id: Id60f6dd2fbba05140ca0671da6f17dbc2ecce3a3
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit removes the legacy ptrsize check, which was deficient
because it did not work for multiarch systems (when we supported fat
OS X binaries) and did not work for bootstrap builds because the size
might be different when cross-compiling.
Instead, let's rely on the predefined preprocessor macros to detect
correctly. As a nice side-effect, this fixes 64-bit Android builds
cross-compiled from Windows.
Task-number: QTBUG-48932
Change-Id: I1d0f78915b5942aab07cffff140f9a52b9342f23
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
KMS is no longer a platform plugin so the relevant leftover bits are
now removed.
As the introduction of the EGLDevice-based backend for eglfs shows,
using DRM/KMS is not tied to GBM, separate buffer management
approaches, like EGLStreams, work fine as well. Therefore separate KMS
from GBM and remove the EGL and GLES dependency in the tests - this
way there is nothing preventing us from using GBM without GL for
example.
Change-Id: Id7ebe172b44b315f9a637892237d2bb62d99aed2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
For now we pick one crtc and find the corresponding layer. If this is
not desired, set QT_QPA_EGLFS_LAYER_INDEX to override the layer to be
used. Enable qt.qpa.eglfs.kms to get logs about the available layers.
Change-Id: I762783f960739e32966c8cde17d8f55fbe40091f
Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Don't use gst_is_initialized(). It was added in 0.10.31, but we don't
actually require that version.
Change-Id: If5d662e18511cf636861bf93eeccc1f5b69e26f1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
In addition to the proprietary Mali Linux driver bundle from ARM, there
are a couple of semi open source alternative bundles out in the wild,
which are mostly derivatives from the sunxi-mali bundle.
The non-ARM bundles lacks the proprietary header file fbdev_window.h
which defines the fbdev_window struct. Instead, it has an equivalent
mali_native_window struct in the EGL/eglplatform.h (which in turn is
included by EGL/egl.h).
This change adds an alternative configure test which detects the non-ARM
bundles are used. It also removes the dependency on fbdev_window.h by
defining the structure ourselves, which actually makes the plugin
potentially compilable with *any* EGL SDK.
Change-Id: I78ab4b618e8e9c774c889fe9896105cf2cf4228e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The C++ standard says it must, but some badly-configured toolchains seem
to be lacking support.
In particular, for some 32-bit platforms without native support for
them, GCC implements 64-bit atomics via out-of-line functions in
libatomic. If that library is missing... well, then std::atomic 64-bit
doesn't work and we mustn't try to use it.
This was found when trying to compile Qt 5.6 for MIPS 32-bit:
Linking library libQt5Core.so.5.6.0
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:500: undefined reference to `__atomic_load_8'
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:478: undefined reference to `__atomic_store_8'
Yocto bug report: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8274
Change-Id: I42e7ef1a481840699a8dffff140224d6614e5c36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][General Improvements] Qt's buildsystem now detects whether
the compiler supports C++14 and experimental support for C++1z. If the
compiler supports it, then Qt is automatically compiled using that
support.
\
This does not apply to user applications built using qmake: those are
still built with C++11 support only. To enable support for C++14 in your
application, add to your .pro file: CONFIG += c++14 (similarly for
C++1z).
Change-Id: Ib056b47dde3341ef9a52ffff13ef1f5d01c42596
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The initial configure fails to build the pointer size test correctly
due to the missing --sysroot argument. This breaks 64-bit targets
as the pointer size is set to 4. A subsequent configure correctly
builds and picks 8 up, but we expect the first attempt to work as well.
Task-number: QTBUG-47840
Change-Id: Iaf9450635f1bbc12e18062fa0a51f35cf690ce08
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
[ChangeLog][QtCore][Logging] Systems with syslog may now pass -syslog to
configure to send logging output to syslog.
Change-Id: I80d58ee6e70d8deb2409fc666e7e7f2d7f52b8e1
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Since libstdc++ builds on OS X and QNX 6.5 are no longer supported,
simply require <initializer_list> and std::move in order to claim C++11
support works.
The minimum OS X versions need to be fixed elsewhere.
Change-Id: Ib056b47dde3341ef9a52ffff13ef1d2ac3923f5c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This will automatically add DirectWrite support if the required
headers are found. The note about platform support from the help
screen has also been removed, since Windows XP is not officially
supported. Applications that need to run on XP can still build
with -no-directwrite.
Also changed the configure test to be a proper compile test, since
cross-compiled builds for Windows CE may break otherwise.
Change-Id: I7fc7bfb25f2f86ced8a4d4c78a69527de0273707
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The pipe2/dup3/accept4 functions and SOCK_CLOEXEC are quite old nowadays
on Linux. They were introduced on Linux 2.6.28 and glibc 2.10, all from
2008. They were also picked up by uClibc in 2011 and FreeBSD as of
version 10.0. So we no longer need the runtime detection of whether the
feature is available.
Instead, if the libc has support for it, use it unconditionally and fail
at runtime if the syscall isn't implemented.
Change-Id: Ib056b47dde3341ef9a52ffff13efcc39ef8dff7d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>