Commit Graph

366 Commits

Author SHA1 Message Date
Moritz Bunkus
941e47d97c
build system: look for & require the PCRE2 library 2020-08-20 13:29:29 +02:00
Moritz Bunkus
91579569b5
build system: require libMatroska v1.6.1 2020-08-02 14:08:17 +02:00
Moritz Bunkus
dd8a03a909
fix detection of QtDBus
Fixes #2886.
2020-07-30 13:34:06 +02:00
Moritz Bunkus
28608963d3
require libEBML 1.4.0, libMatroska 1.6.0 2020-06-22 12:47:37 +02:00
Moritz Bunkus
34b4ef1fbd
fmtlib: require at least 6.1.0 2020-05-15 10:33:12 +02:00
Moritz Bunkus
afa1d1437f
configure: add check for fmt::to_string function
That function is part of fmtlib v4 or newer. Use bundled copy if not
found.
2020-05-15 08:36:48 +02:00
Moritz Bunkus
540ba7f122
configure: remove tests for C++11 & C++14 features & corresponding -std= flags
The compilers that I support that implement the required C++17
functionality also implement the full C++11 and C++14 specifications.
2020-05-13 16:37:44 +02:00
Moritz Bunkus
f13c9c83fe
configure: add test for C++17 feature "constexpr if" 2020-05-13 16:34:17 +02:00
Moritz Bunkus
6570d48c53
use std::istringstream instead of boost::lexical_cast for parsing numbers 2020-05-12 22:04:42 +02:00
Moritz Bunkus
75cd193bea
use std::variant instead of boost::variant 2020-05-12 21:12:50 +02:00
Moritz Bunkus
debdc919d2
use std::gcd instead of boost::gcd 2020-05-12 19:01:56 +02:00
Moritz Bunkus
9cd9542ab5
use std::optional<bool> instead of boost::logic::tribool 2020-05-12 14:30:22 +02:00
Moritz Bunkus
b26288eb3b
use stdlib instead of Boost's Range & Adaptors libraries 2020-05-11 21:09:51 +02:00
Moritz Bunkus
067722bc96
switch from Boost's Date/Time library to std::chrono 2020-05-11 21:09:51 +02:00
Moritz Bunkus
77f686c15c
configure: fix --without-dvdread so that HAVE_DVDREAD isn't defined 2020-05-05 17:33:06 +02:00
Moritz Bunkus
c41e75013e
configure: add option for disabling building with libdvdread 2020-05-05 14:06:39 +02:00
Moritz Bunkus
a8139750c5
build system: look for and use libdvdread if found
This library is required for reading chapters from DVDs.

Part of the implementation of #2808.
2020-05-03 11:53:20 +02:00
Moritz Bunkus
9eb4a11b35
build system: run xsltproc with higher maximum recursion depth
On macOS the default `xsltproc` installation has the same limit (3000)
as on Linux, but for some reason it exceeds that limit on
macOS. Bumping it to 10000 lets builds succeed on macOS, too.

Fixes #2754.
2020-04-07 18:35:17 +02:00
Moritz Bunkus
ce3bdf3c9d
macOS: require 10.14 or newer
Several functions of `std::optional` are only available
on Mojave (10.14) and newer, unfortunately.
2019-12-31 16:08:55 +01:00
Moritz Bunkus
080dfeda57
source: use std::regex instead of boost::regex 2019-12-31 15:53:03 +01:00
Moritz Bunkus
ebf0ba5b6a
source: use std::optional instead of boost::optional 2019-12-30 21:37:46 +01:00
Moritz Bunkus
8630264aaa
GUI: require Qt ≥ 5.9.0; remove compatibility code for older versions 2019-11-07 21:28:34 +01:00
Moritz Bunkus
1a7b9ad4da
build system: require Boost 1.60.0 or newer 2019-11-03 14:30:34 +01:00
Moritz Bunkus
68d1f155e5
build system: require C++17 feature "nested namespace definition" 2019-10-31 18:34:04 +01:00
Moritz Bunkus
ff761e44c4
build system: require several C++17 features
* `[[maybe_unused]]` attribute
* structured bindings
2019-10-13 13:40:19 +02:00
Moritz Bunkus
8b078cb297
build system: fix configure handling of undefined behavior sanitizer arguments 2019-10-08 19:45:03 +02:00
Moritz Bunkus
0d962e30c4
build system: move flag generation to Rakefile for several features
Features include debuging, profiling, optimizations & sanitizers. The
flags don't depend on something that's actually tested, but only on
which features are enabled and which compiler & compiler version is
used. Therefore doing it in Ruby instead of sh is easier.
2019-10-08 00:44:08 +02:00
Moritz Bunkus
a47add8196
version_number_t: provide all comparison operators via Boost::Operators 2019-09-11 20:54:41 +02:00
Moritz Bunkus
598fe5e69e
configure: fix detection of libebml::FindNextChild
The internal libEBML was updated to v1.3.9. That version contains
changes to cmake to build an additional header file, ebml_export.h. In
MKVToolNix, which isn't cmake-based, that file has to be created
manually, and the Rakefile does so.

However, when configure runs the file doesn't exist yet. This means
that any attempt to compile a test program with the internal libebml
will fail due to the header not being found. configure's compilation
checks will therefore fail.

For the detection of libebml::FindNextChild doing a compilation check
against the internal libebml isn't really needed as we know that the
version does include it. So just hardcode that knowledge and avoid the
compilation check.
2019-05-25 17:48:24 +02:00
Moritz Bunkus
1e7a6b6e31
build system: test for and use -std=c++17 compiler flag if supported 2019-05-18 17:12:27 +02:00
Moritz Bunkus
3e8fa4b95e
build system: Docbook: look for & prefer -nons XSL stylesheets 2019-04-16 10:37:57 +02:00
Moritz Bunkus
218a6d71b4
build system: require libMatroska 1.5.0 2019-03-12 21:02:44 +01:00
Moritz Bunkus
82b8b1ba86
build system: require libEBML v1.3.7
This pulls the fixes for handling Unicode code points >
U+FFFF.

Part of the fix of #2516.
2019-03-06 22:41:03 +01:00
Moritz Bunkus
3cbd95b003
build system: move compiler flag determination to Rakefile
Logic's more straight forward to implement there instead of having to
check in `configure`, adding a variable to `build-local.in` and using
that variable later on. The logic's the same in both places anyway.
2019-02-23 21:11:19 +01:00
Moritz Bunkus
00468a549b
macOS build: move certain compiler & linker flags to build system
That way they don't have to be set manually before running `configure`.

Fixes #2485.
2019-01-26 12:02:55 +01:00
Moritz Bunkus
8cde39725e
build system: update Qt requirement to 5.4.0 or newer 2019-01-06 15:29:33 +01:00
Moritz Bunkus
b71b2b27c1
configure: there's only one GUI left, so talk about its name, not "GUIs" 2018-12-12 09:15:47 +01:00
Moritz Bunkus
6e7f04a142
fmt conversion: integrate bundled fmt into build system 2018-11-20 21:30:27 +01:00
Moritz Bunkus
3ee0b9276e
GUI: don't compile logind sleep inhibitor if QtDBus isn't available 2018-11-05 09:08:47 +01:00
Moritz Bunkus
1ebbb284bd
GUI: inhibit sleep via logind while the job queue is running
This method works for systems where a logind-compatible D-Bus
interface is available for inhibiting sleep & idle states. Requires
Qt's D-Bus library.

Part of the implementation of #2411.
2018-11-04 18:58:06 +01:00
Moritz Bunkus
7f3d89d9e6
build system: optionally link against Dr. MinGW's crash backtrace library 2018-09-11 19:13:31 +02:00
Moritz Bunkus
a21ee36733
configure: fix name of PO4A_TRANSLATE override variable 2018-09-11 17:36:29 +02:00
Moritz Bunkus
4eefc50110
JSON identification: replace invalid UTF-8 bytes with placeholder characters
nlohmann's JSON libraries in version 2.x used to strip bytes that
aren't valid UTF-8 from strings (e.g. service/station names in MPEG
transport streams) before outputting the JSON data structures. With
MKVToolNix v24 that bundled library was updated to v3 which now throws
an exception on such invalid data.

Therefore mkvmerge now takes care of replacing invalid bytes with
placeholder characters itself before passing the strings to nlohmann's
JSON library.

Fixes #2327.
2018-06-15 17:45:22 +02:00
Moritz Bunkus
471fc84ed2
nlohmann-json: update to v3.1.1 (git revision g183390c1) 2018-06-08 22:17:08 +02:00
Moritz Bunkus
2f4daa5454
boost: use boost/integer/common_factor.hpp if available
The header `boost/math/common_factor.hpp` has been deprecated.
2018-06-08 22:17:08 +02:00
Moritz Bunkus
c9e931d69e configure: add test for C++14 feature "user-defined literals for std::string" 2018-04-20 20:03:57 +02:00
Moritz Bunkus
c78177e99b build system: use version number comparison for -Wshadow-compatible-local test
clang++ doesn't error out on unknown flags, it only spews
warnings. Therefore AC_TRY_COMPILE is useless for detecting support
for it.
2018-04-17 23:41:32 +02:00
Moritz Bunkus
9eaf235c76 build system: only use -Wshadow-compatible-local if compiler supports it 2018-04-17 23:28:50 +02:00
Moritz Bunkus
f99bea1f4a Windwos build: support shared libraries 2018-04-08 12:26:03 +02:00
Moritz Bunkus
ccd92f0594 configure: redirect error of qmake to /dev/null
Recent `qmake` versions warn about plugins being added multiple times
via the `QT_PLUGIN` setting. However, our configure must add the
plugins manually as it cannot rely on them being present automatically
in older Qt versions. So just ignore those warnings.
2018-04-07 11:45:51 +02:00
Moritz Bunkus
8baed3aaf9 configure: don't generate static_plugins.cpp for mkvinfo anymore 2018-02-05 19:13:33 +01:00
Timo Gurr
8b229b399c cmark.m4: don't hardcode the pkg-config command 2018-01-22 19:05:06 +01:00
Moritz Bunkus
a26be1f600 configure: verify presence of msgfmt instead of relying on it 2018-01-21 13:04:29 +01:00
Moritz Bunkus
ce191d097b configure: handle --disable-ubsan and --disable-addrsan correctly
Fixes #2199.
2018-01-16 09:09:25 +01:00
Moritz Bunkus
038f61aa0e build system: use Qt's Windows Vista style plugin on static Qt >= 5.10.0 2018-01-01 19:45:23 +01:00
Moritz Bunkus
f700dfbd1e build system: require cmark when building the GUIs 2018-01-01 16:42:06 +01:00
Moritz Bunkus
0fc23cd7bd build system: option for running unit tests with valgrind 2017-12-18 22:02:50 +01:00
darealshinji
4c5ca7ebe5 AppImage compatibility build option 2017-12-12 09:59:34 +01:00
Moritz Bunkus
9de81581f2 configure: enable strong stack protection for clang >= 3.5.0 2017-11-18 10:46:36 +01:00
Moritz Bunkus
cd155df59b configure rework compiler type & version check 2017-11-18 10:46:36 +01:00
Moritz Bunkus
4f2cebac01 build system: silence output of po4a-translate during configure run
Messages that are silenced are ones such as this:

> Your input po file ./doc/man/po4a/po/ja.po seems outdated (The
> amount of entries differ between files: 958 is not 633). Please
> consider running po4a-updatepo to refresh it.
2017-11-17 23:15:41 +01:00
Moritz Bunkus
336726825b build system: use llvm's lld linker when building with clang 2017-11-17 22:44:54 +01:00
Moritz Bunkus
4d5a052472 configure: use -O3 with mingw 7.2.0
Older versions suffered from issues such as segmentation faults on
startup with optimization levels higher than `-O2` or with
`-fipa-icf`. v7.2.0 is OK, though.
2017-11-17 22:21:40 +01:00
Moritz Bunkus
989e5df1eb configure: use -O3 with clang++ 3.8.0 or newer
Older versions suffered from excessive memory usage with optimization
levels higher than `-O1`:

%https://bugs.llvm.org/show_bug.cgi?id=11962

v3.8.0 is known to be OK, though.
2017-11-17 21:57:32 +01:00
Moritz Bunkus
de093c2913 configure: get real version for clang(++)
`clang++ -dumpversion` always outputs 4.2.1 as it was designed to be
compatible with `g++` in that version. So parse `clang++ --version`
for `clang++` instead.
2017-11-17 21:49:36 +01:00
Moritz Bunkus
abb66a5486 build system: check for Google Benchmark, compile benchmark if source exists 2017-11-16 15:15:46 +01:00
Moritz Bunkus
2e238ed122 configure: require libMatroska v1.4.8
That version fixes writing block groups and simple blocks for tracks
with track number 128 (see #2103).

Also adds a test case for writing 130 tracks.
2017-09-25 20:27:25 +02:00
Moritz Bunkus
493cda8dd1 configure, README, NEWS: fix requirements for libEBML and libMatroska
Fixes #2088.
2017-09-01 09:39:28 +02:00
Moritz Bunkus
c262de4888 configure: require libEBML v1.3.5
libEBML v1.3.5 contains the following change:

------------------------------------------------------------
EbmlMaster::CheckMandatory: only fail for default-value-less mandatory elements

The function EbmlMaster::CheckMandatory() will now only return false
if a mandatory element is missing for which there's no default value
in the specifications. This means that callers such as
EbmlMaster::UpdateSize() and by extension EbmlMaster::Render() will
not insist on all mandatory elements being present anymore, but only
those for which there's no default value.
------------------------------------------------------------

This allows mkvmerge, mkvpropedit and the GUI's header editor to only
actually add those elements that have to be added to a master before
writing it to the file. Adding e.g. the TrackLanguage element isn't
necessary anymore if should be set to "eng" anyway as "eng" is its
default value. Before the change libEBML was insisting on it being
present in the "TrackEntry" master, though, no matter what it was set
to.
2017-08-12 10:51:33 +02:00
Moritz Bunkus
7c6e16b436 configure: EBML FindNextChild check: cached variable names must contain _cv_ 2017-08-06 15:52:18 +02:00
Moritz Bunkus
5904da93bf all: libEBML now contains FindNextChild; use that if present 2017-08-06 13:54:49 +02:00
Moritz Bunkus
d31fb3961a configure: add option for disabling the update check code 2017-07-23 17:25:13 +02:00
Moritz Bunkus
41c0eac064 configure: DocBook detection: don't use bashisms
The `{variant-a,variant-b}` globbing doesn't work on dash. Patch by
Steve Dibb. Fixes #2054.
2017-07-22 20:27:59 +02:00
Moritz Bunkus
f8e425714e configure: look for nlohmann/json.hpp first, json.hpp second
The upstream project intends the include files to be installed in
`$includedir/nlohmann/json.hpp`,
e.g. `/usr/include/nlohmann/json.hpp`. Debian did not follow that
recommendation and installed them directly in `$includedir`. Therefore
`configure` was only looking for the latter, not the former.

However, Debian will soon follow suit. Therefore detection has been
extended to check for the intended location first.

Fixes #2048.
2017-07-17 20:58:19 +02:00
Moritz Bunkus
504209ce71 configure: options for enabling address/undefined behavior sanitizers
The `Rakefile` has supported both for a while now, but the values had
to be set manually in `build-config`.
2017-07-15 16:59:58 +02:00
Moritz Bunkus
ed6586569a build system: require Boost 1.49.0 or newer
Earlier versions fail to build on both my development system as well
as my CentOS 7 BuildBot CI instance. Therefore I cannot properly
support that version anymore.

See #2037.
2017-07-11 19:44:27 +02:00
Moritz Bunkus
bc89d0268c configure: don't abort if moc/uic/rcc/qmake is found but too old
Fixes #1979.
2017-05-09 20:54:15 +02:00
Moritz Bunkus
aa959233b5 configure: link gtest with pthreads during check
googletest on openSUSE uses threads, so…
2017-04-20 22:01:24 +02:00
Moritz Bunkus
66c7078bd7 GUI: run programs: implement action "playing an audio file" 2017-04-04 19:26:54 +02:00
Moritz Bunkus
1752969589 configure: use AC_CHECK_TOOL for strings
Fixes #1923.
2017-03-27 19:27:00 +02:00
Moritz Bunkus
ce1bdcb1b1 build system: re-work static Qt plugin handling
This changes several things:

1. The path to the plugins is no longer determined by looking through
   the include flags in QT_LIBS. This process was broken for paths
   with file names. Instead, qmake is queried for the installation
   location for the plugins.

2. Similar to qmake, configure now generates a file for both mkvinfo
   and mkvtoolnix-gui that includes the appropriate #include
   directives for the chosen plugins. Therefore no additional #ifdef…
   logic is required for the static plugins in other parts of the two
   programs.

3. For platforms other than Windows or macOS, configure will now add
   the Xcb platform integration plugin. This is required for using a
   static Qt on Linux. This change should implement #1898.
2017-03-09 22:06:40 +01:00
Moritz Bunkus
8b295e1332 build system: fix pugixml again
Another part of the implementation of #1891.
2017-02-13 21:37:29 +01:00
Moritz Bunkus
fb306e3921 build system: link against system pugixml if library's found
Fixes the incomplete implementation of #1891.
2017-02-13 21:00:00 +01:00
Moritz Bunkus
c1213feac3 build system: try detecting pugixml via pkg-config with fallback
Implements #1891.
2017-02-13 20:47:45 +01:00
Moritz Bunkus
6f7b760d34 build system: explicitly check for the C++ preprocessor
Otherwise setting PKG_CONFIG_PATH may interfere, and CXXCPP won't be
set. This in turn leads to problems detecting Boost.
2017-02-13 20:21:27 +01:00
Moritz Bunkus
113450f23c build system: make xsltproc, DocBook mandatory for man pages
Additionally don't try to build or install the translated man pages if
po4a wasn't found or doesn't work.

See #1865.
2017-01-25 21:19:10 +01:00
Moritz Bunkus
f07203fb42 configure: add -stdc++ flag during check for nlohmann-jsoncpp
See #1858.
2017-01-24 22:44:58 +01:00
Moritz Bunkus
05919681f6 configure: find DocBook man page stylesheets on openSUSE 2017-01-22 22:00:23 +01:00
Moritz Bunkus
e52f878720 build system: look for & use system-wide version of nlohmann json-cpp
If one is found, it will be used. Otherwise the included version in
lib/nlohmann-json will be used.

Implements #1858.
2017-01-20 23:07:34 +01:00
Moritz Bunkus
d7b691b6f5 all: remove --check-for-updates command line option & dependency on CURL 2016-12-30 15:01:30 +01:00
Moritz Bunkus
cfe6e85eb6 build system: don't use -fipa-icf optimization on i686 mingw target
The result are segfaulting executables.
2016-12-22 18:20:25 +01:00
Moritz Bunkus
5097f0da6c GUIs: require Qt v5.3.0 or newer & remove compatibility code for older versions 2016-12-17 12:41:24 +01:00
Moritz Bunkus
0271688719 build system: remove checks for etags/ebrowse 2016-12-16 14:15:39 +01:00
Moritz Bunkus
c827f9d0b6 build system: require more C++14 features
The source will start using the following features from the C++14
standard:

• the "std::make_unique()" Standard Library function
• digit separators
• binary literals
• generic lambdas

gcc's v4.9.x and clang's v3.4 are the oldest releases to support all of
them.
2016-12-13 22:37:14 +01:00
Moritz Bunkus
f3900953d4 build system: rename c++11.m4 to c++-features.m4
I'll add tests for features from later standard versions soon.
2016-12-13 22:16:28 +01:00
Moritz Bunkus
449e2bf82c GUI: mux: cache file identification results
The GUI will now cache file identification results on disc. When the
same file is identified a second time the cached results are used
instead leading to a huge speed gain, especially when scanning Blu-ray
playlists multiple times.

Both positive and negative results are cached.

Cache results are invalidated whenever one of the following conditions
is met:

• if the source file's modification time stamp differs from when the
  result was cached
• if the source file's size in bytes differs from when the result was
  cached
• if the current version of MKVToolNix GUI differs from the version used
  to write the cached result
2016-12-03 12:24:17 +01:00
Moritz Bunkus
d7afc32412 build system: look for libQt5PlatformSupport.a and link it if found
Newer versions of Qt (definitely 5.7.0 but not yet 5.5.1) contain part
of the platform-specific code not in e.g. libqwindows.a but in
libQt5PlatformSupport.a. That library doesn't seem to be mentioned in
the LDFLAGS gathered from pkg-config. But its functionality is actually
required for libqwindows.a.

Therefore look for the library manually and link it if it's found.

Required in at least the static mingw cross-compiled build.
2016-10-29 00:24:21 +02:00
Moritz Bunkus
6d85fbc046 build system: require libEBML v1.3.4, libMatroska v1.4.5 2016-07-13 18:39:12 +02:00
Moritz Bunkus
684f7c7c7b configure: enable C++11/14 during Qt detection
Starting with v5.7.0 Qt requires the compiler to be in C++11 mode.
2016-07-02 20:23:36 +02:00
Moritz Bunkus
8b6b876d2a configure: add switch for circumventing pkg-config for Qt detection
Normally configure uses pkg-config for detecting Qt and setting
QT_CFLAGS and QT_LIBS. With this option configure won't use pkg-config
and rely on the user having set both variables before running
configure. This enables using Qt on systems where no pkg-config files
are generated (e.g. Qt 5.6.0 on MacOS with frameworks enabled).

See https://github.com/Homebrew/homebrew/pull/50234
2016-03-20 10:01:14 +01:00