Detect incompatible libtorrent v2 versions in build systems

Although the detection is working, the error message in autotools is not
perfect, i.e. it would only mention valid range for libtorrent v1 and it
shouldn't be a problem since v2 support isn't fully ready yet.
This commit is contained in:
Chocobo1 2021-07-29 14:15:59 +08:00
commit 7d7f967d5e
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
5 changed files with 236 additions and 63 deletions

View file

@ -177,9 +177,11 @@ AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.2.14],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS"
LIBS="$libtorrent_LIBS $LIBS"])
[libtorrent-rasterbar >= 2.0.4],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"],
[PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"])])
PKG_CHECK_MODULES(openssl,
[openssl >= 1.1.1],