The m4 macro `AC_DEFINE()` seems to write the definition into a file
that's later evaluated and from which `config.h` is built. This
temporary file must reside in the proper directory, otherwise
`configure` will only know that `HAVE_QTDBUS` might be defined but not
that it should actually be set.
The function checking for Qt6 uses a different temporary directory for
its checks whether `qmake` can compile with certain modules. For the
invocations it changes the current working directory to the temporary
directory. If `AC_DEFINE()` is used while the working directory is
changed, this will break the mechanism described above.
The solution is to only use `AC_DEFINE()` once the current working
directory's been changed back to the original one.
fixes#3744
Otherwise `qmake` might add compiler flags that aren't understood by
the other one.
Actual issue that triggered this change: on Arch with Qt 6.5.2 no
matter what `CC`/`CXX` are set to, `qmake` always assumes `g++` & uses
`linux-g++` as the spec, adding `-mno-direct-extern-access`. `clang`'s
equivalent is `-fno-direct-access-external-data`, though.
Qt 6.5 has been released, and with it proper support for Windows 10's
& 11's dark application mode, but only for those styles that support
it. "Fusion" is one such style, but the old "Windows Vista" that
MKVToolNix had been using until now isn't.
As this is proper support for the dark application mode, the option
for disabling said mode has been removed — also due to it not being
easy to really disable the mode in Qt, nor to retrieve the default
light palette if Windows' dark application mode is on.
Fixes#3264 and others.
This is in preparation of fixing #3137. The plan is not to use
libfile's MIME type detection but Qt's. As both mkvmerge and the GUI
need to auto-detect the MIME type, this means that the command line
applications will have to be linked against Qt's core library (but not
the GUI libraries).
Prevents using the system qmake6 in cross-compilation situations.
Also cleans up the paths to `lconvert`, `moc`, `rcc` and `uic` from
the Qt 6 detection so that Qt 5 can detect their own version.
Part of the implementation of #3115.
Qt 6
`configure` will look for Qt 6 first and only continue looking for Qt
5 if Qt 6 isn't found or disabled via `--disable-qt6`.
Qt 6 detection works by first looking for the `qmake6` binary. Its location
can be specified with the `--with-qmake6=…` option.
All other Qt 6 related facts (such as compiler & linker flags or the
position of the other required tools such as `lconvert`, `moc`, `rcc` and
`uic`) will be derived from the output generated by `qmake6`.
Note that at this point Qt 6 is not yet supported for the cross-compilation
build to Windows, nor is a static Qt 6 build supported yet.
Note that the command line options `--enable-static-qt`,
`--with-qt-pkg-config-modules` and `--without-qt-pkg-config` only apply to
the Qt 5 and have no effect on Qt 6.
Qt 5
The options for specifying the position of the tools (`--with-moc=…`,
`--with-rcc=…` and `--with-uic=…`) have been removed. Their position
will now be derived from the output generated by `qmake`.
General
Completely disabling the GUI now requires passing both `--disable-qt6`
and `--disable-qt` options.
Part of the implementation of #3115.