diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 000000000..2ff70898f
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,101 @@
+version: '{branch}-{build}'
+
+# Do not build on tags (GitHub only)
+skip_tags: true
+
+image: Visual Studio 2022
+
+branches:
+ except: # blacklist
+ - coverity_scan
+
+environment:
+ REPO_DIR: &REPO_DIR c:\qbittorrent
+ CACHE_DIR: &CACHE_DIR c:\qbt_cache
+
+ QBT_VER_URL: https://builds.shiki.hu/appveyor/version_64
+ QBT_LIB_URL: https://builds.shiki.hu/appveyor/qbt_libraries_64.7z
+
+# project directory
+clone_folder: *REPO_DIR
+
+# cache size should < 100MB (after compressing with fastest option):
+# see: https://www.appveyor.com/docs/build-cache#save-update-cache-before-build-finishes
+cache:
+ - *CACHE_DIR
+
+clone_depth: 50
+
+install:
+ # check if library needs update
+ - appveyor DownloadFile "%QBT_VER_URL%" -FileName "c:\version_new" && SET /P newVersion=<"c:\version_new"
+ - IF EXIST "%CACHE_DIR%\version" (SET /P oldVersion=<"%CACHE_DIR%\version")
+ - IF NOT EXIST "%CACHE_DIR%\version" (SET updateCache=1)
+ - IF NOT "%oldVersion%" == "%newVersion%" (SET updateCache=1)
+ # update library
+ - IF "%updateCache%" == "1" (ECHO "--- Will redownload libraries ---" &&
+ RMDIR /S /Q "%CACHE_DIR%" & MKDIR "%CACHE_DIR%" &&
+ appveyor DownloadFile "%QBT_LIB_URL%" -FileName "c:\qbt_lib.7z" && 7z x "c:\qbt_lib.7z" -o"%CACHE_DIR%" > nul &&
+ COPY "c:\version_new" "%CACHE_DIR%\version")
+
+before_build:
+ # setup env
+ - CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
+ - SET PATH=%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;%CACHE_DIR%\jom
+ # setup project
+ - COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
+ # workarounds
+ - MKDIR "c:\qbt"
+ - MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
+
+build_script:
+ - cd "%REPO_DIR%"
+ # lupdate chokes when it parses headers from system includes, especially Boost
+ # it also chokes with the sources from src/app/qtlocalpeer (formerly qtsingleapplication)
+ # Workaround: temporarily rename them to run lupdate with the .pro file
+ - RENAME conf.pri conf.pri.temp
+ - RENAME src\app\qtlocalpeer qtlocalpeer.temp
+ - lupdate qbittorrent.pro
+ - RENAME conf.pri.temp conf.pri
+ - RENAME src\app\qtlocalpeer.temp qtlocalpeer
+ - qmake qbittorrent.pro && cd src && qmake src.pro
+ - jom -j2 -f Makefile.Release
+
+after_build:
+ - cd "%REPO_DIR%"
+ - MKDIR upload
+ - COPY dist\windows\qt.conf upload
+ - COPY src\release\qbittorrent.exe upload
+ - COPY src\release\qbittorrent.pdb upload
+ - COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.dll" upload
+ - COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.pdb" upload
+ - COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.dll" upload
+ - COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.pdb" upload
+ - COPY "%CACHE_DIR%\base\bin\torrent-rasterbar.dll" upload
+ - COPY "%CACHE_DIR%\base\bin\torrent-rasterbar.pdb" upload
+ - COPY "%CACHE_DIR%\base\lib\zlib1.dll" upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Core.dll upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Gui.dll upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Network.dll upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Sql.dll upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Svg.dll upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Widgets.dll upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5WinExtras.dll upload
+ - COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Xml.dll upload
+ - MKDIR upload\plugins\iconengines
+ - COPY C:\Qt\5.15.2\msvc2019_64\plugins\iconengines\qsvgicon.dll upload\plugins\iconengines
+ - MKDIR upload\plugins\imageformats
+ - COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qico.dll upload\plugins\imageformats
+ - COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qsvg.dll upload\plugins\imageformats
+ - MKDIR upload\plugins\platforms
+ - COPY C:\Qt\5.15.2\msvc2019_64\plugins\platforms\qwindows.dll upload\plugins\platforms
+ - MKDIR upload\plugins\sqldrivers
+ - COPY C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\qsqlite.dll upload\plugins\sqldrivers
+ - MKDIR upload\plugins\styles
+ - COPY C:\Qt\5.15.2\msvc2019_64\plugins\styles\qwindowsvistastyle.dll upload\plugins\styles
+
+test: off
+
+artifacts:
+ - path: upload
+ name: qBittorrent-Appveyor_Windows-x64
diff --git a/.clang-tidy b/.clang-tidy
index fec7d003d..5143187d0 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -35,6 +35,7 @@ Checks: >
-modernize-use-auto,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
+ -modernize-use-using,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
diff --git a/.editorconfig b/.editorconfig
index 035f99e58..f58613fb0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,10 +1,8 @@
-# EditorConfig is awesome: https://EditorConfig.org
+# EditorConfig is awesome: http://EditorConfig.org
root = true
[*]
-charset = utf-8
-end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
diff --git a/.gitattributes b/.gitattributes
index 5191b9022..237f6e762 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6,5 +6,4 @@ core.eol=lf
*.qm binary
*.zip binary
-dist/windows/license.txt text eol=crlf
test/testdata/crlf.txt text eol=crlf
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 59808a89f..5fd81dc09 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1 +1 @@
-custom: "https://www.qbittorrent.org/donate"
+custom: "https://www.qbittorrent.org/donate.php"
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 1302695fb..c77cc888e 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -7,17 +7,19 @@ body:
#### ADVISORY
"We do not support any versions older than the current release series"
- "We do not support any 3rd party/forked versions e.g. `portableapps`/`Enhanced Edition` etc."
+ "We do not support any 3rd party/forked versions e.g. `portableapps`/`Enhanced Edition`etc."
"Please post all details in **English**."
#### Prerequisites before submitting an issue!
- Read the issue reporting section in the **[contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)**, to know how to submit a good bug report with the required information.
- Verify that the issue is not fixed and is reproducible in the **[latest official qBittorrent version](https://www.qbittorrent.org/download.php).**
- - (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (**[macOS](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3Amaster+event%3Apush)** / **[Ubuntu](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_ubuntu.yaml?query=branch%3Amaster+event%3Apush)** / **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- - Perform a **[search of the issue tracker (including closed ones)](https://github.com/qbittorrent/qBittorrent/issues?q=is%3Aissue+is%3Aopen+-label%3A%22Feature+request%22)** to avoid posting a duplicate.
+ - (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (currently only on **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
+ - Check the **[frequent/common issues list](https://github.com/qbittorrent/qBittorrent/projects/2)** and perform a **[search of the issue tracker (including closed ones)](https://github.com/qbittorrent/qBittorrent/issues)** to avoid posting a duplicate.
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/qbittorrent/qBittorrent/discussions)**, **[forum](https://qbforums.shiki.hu/)**, or **[subreddit](https://www.reddit.com/r/qBittorrent/)**.
- Verify that the **[wiki](https://github.com/qbittorrent/qBittorrent/wiki)** did not contain a suitable solution either.
+ - If relevant to issue/when asked, the qBittorrent preferences file, qBittorrent.log & watched_folders.json (if using "Watched Folders" feature) must be provided.
+ See **[Where does qBittorrent save its settings?](https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings)**
- type: textarea
attributes:
@@ -26,10 +28,10 @@ body:
Qt and libtorrent-rasterbar versions are required when: 1. You are using linux. 2. You are not using an official build downloaded from our website.
Example of preferred formatting:
- qBittorrent: 4.6.6 x64
- Operating system: Windows 10 Pro x64 (22H2) 10.0.19045
- Qt: 6.4.3
- libtorrent-rasterbar: 1.2.19
+ qBittorrent: 4.3.7 x64
+ Operating system: Windows 10 Pro 21H1/2009 x64
+ Qt: 5.15.2
+ libtorrent-rasterbar: 1.2.14
placeholder: |
qBittorrent:
Operating system:
@@ -71,4 +73,4 @@ body:
See **[Where does qBittorrent save its settings?](https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings)**
#### Note: It's the user's responsibility to redact any sensitive information
validations:
- required: true
+ required: false
diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md
index d82929e16..788387cd8 100644
--- a/.github/SUPPORT.md
+++ b/.github/SUPPORT.md
@@ -9,7 +9,7 @@ For such questions, use one of the following community support resources:
* The [discussions section][discussions-url]
-* The [official forum][forum-url]
+* The official forum [official forum][forum-url]
* The [qBittorrent subreddit][subreddit-url]
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 572dc50ea..000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-version: 2
-
-updates:
- - package-ecosystem: "github-actions"
- directory: "/"
- commit-message:
- prefix: "GHA CI"
- groups:
- github-actions:
- patterns:
- - "*"
- labels:
- - "CI"
- schedule:
- interval: "monthly"
diff --git a/.github/workflows/ci_file_health.yaml b/.github/workflows/ci_file_health.yaml
index 54c87a104..eb151513c 100644
--- a/.github/workflows/ci_file_health.yaml
+++ b/.github/workflows/ci_file_health.yaml
@@ -12,60 +12,14 @@ jobs:
ci:
name: Check
runs-on: ubuntu-latest
- permissions:
- security-events: write
steps:
- name: Checkout repository
- uses: actions/checkout@v4
- with:
- persist-credentials: false
+ uses: actions/checkout@v3
- - name: Setup python
- uses: actions/setup-python@v5
+ - name: Install tools
+ uses: actions/setup-python@v4
with:
python-version: "*"
- name: Check files
- uses: pre-commit/action@v3.0.1
-
- - name: Check doc
- env:
- pandoc_path: "${{ github.workspace }}/../pandoc"
- run: |
- # install pandoc
- curl \
- -L \
- -o "${{ runner.temp }}/pandoc.tar.gz" \
- "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz"
- tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.."
- mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}"
- # run pandoc
- for lang in doc/*/; do
- "${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent.1.md" -o "$lang/qbittorrent.1"
- "${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent-nox.1.md" -o "$lang/qbittorrent-nox.1"
- done
- # check diff, ignore "Automatically generated by ..." part
- git diff -I '\.\\".*' --exit-code
-
- - name: Check GitHub Actions workflow
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- pip install zizmor
- IGNORE_RULEID='(.ruleId != "zizmor/template-injection")
- and (.ruleId != "zizmor/unpinned-uses")'
- IGNORE_ID='(.id != "zizmor/template-injection")
- and (.id != "zizmor/unpinned-uses")'
- zizmor \
- --format sarif \
- --persona auditor \
- ./ \
- | jq "(.runs[].results |= map(select($IGNORE_RULEID)))
- | (.runs[].tool.driver.rules |= map(select($IGNORE_ID)))" \
- > "${{ runner.temp }}/zizmor_results.sarif"
-
- - name: Upload zizmor results
- uses: github/codeql-action/upload-sarif@v3
- with:
- category: zizmor
- sarif_file: "${{ runner.temp }}/zizmor_results.sarif"
+ uses: pre-commit/action@v3.0.0
diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml
index abc6c9f7d..4b2709516 100644
--- a/.github/workflows/ci_macos.yaml
+++ b/.github/workflows/ci_macos.yaml
@@ -2,7 +2,8 @@ name: CI - macOS
on: [pull_request, push]
-permissions: {}
+permissions:
+ actions: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -12,28 +13,27 @@ jobs:
ci:
name: Build
runs-on: macos-latest
- permissions:
- actions: write
strategy:
fail-fast: false
matrix:
- libt_version: ["2.0.11", "1.2.20"]
+ libt_version: ["2.0.9", "1.2.19"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
- qt_version: ["6.9.1"]
+ qt_version: ["5.15.2", "6.5.0"]
+ exclude:
+ - libt_version: "1.2.19"
+ qt_version: "6.5.0"
env:
boost_path: "${{ github.workspace }}/../boost"
- libtorrent_path: "${{ github.workspace }}/../libtorrent"
+ openssl_root: /usr/local/opt/openssl@1.1
steps:
- name: Checkout repository
- uses: actions/checkout@v4
- with:
- persist-credentials: false
+ uses: actions/checkout@v3
- name: Install dependencies
- uses: Wandalen/wretry.action@v3
+ uses: Wandalen/wretry.action@v1
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
@@ -44,38 +44,25 @@ jobs:
brew update > /dev/null
brew install \
cmake ninja \
- openssl@3 zlib
+ openssl@1.1 zlib
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
- store_cache: ${{ github.ref == 'refs/heads/master' }}
+ store_cache: ${{ startsWith(github.ref, 'refs/heads/') }}
update_packager_index: false
- ccache_options: |
- max_size=1G
- name: Install boost
- env:
- BOOST_MAJOR_VERSION: "1"
- BOOST_MINOR_VERSION: "86"
- BOOST_PATCH_VERSION: "0"
run: |
- boost_url="https://archives.boost.io/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- set +e
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
- if [ "$_exitCode" -ne "0" ]; then
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
- fi
+ curl \
+ -L \
+ -o "${{ runner.temp }}/boost.tar.bz2" \
+ "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.bz2"
+ tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.."
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- cd "${{ env.boost_path }}"
- ./bootstrap.sh
- ./b2 stage --stagedir=./ --with-headers
- name: Install Qt
- uses: jurplel/install-qt-action@v4
+ uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
archives: qtbase qtdeclarative qtsvg qttools
@@ -88,31 +75,53 @@ jobs:
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
- https://github.com/arvidn/libtorrent.git \
- ${{ env.libtorrent_path }}
- cd ${{ env.libtorrent_path }}
+ https://github.com/arvidn/libtorrent.git
+ cd libtorrent
cmake \
-B build \
-G "Ninja" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DCMAKE_CXX_STANDARD=20 \
+ -DCMAKE_CXX_STANDARD=17 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
- -Ddeprecated-functions=OFF
+ -DBOOST_ROOT="${{ env.boost_path }}" \
+ -Ddeprecated-functions=OFF \
+ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
cmake --build build
sudo cmake --install build
- - name: Build qBittorrent
+ - name: Build qBittorrent (Qt5)
+ if: startsWith(matrix.qt_version, 5)
run: |
- CXXFLAGS="$CXXFLAGS -DQT_FORCE_ASSERTS -Werror -Wno-error=deprecated-declarations" \
+ CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
+ -DBOOST_ROOT="${{ env.boost_path }}" \
+ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
+ -DTESTING=ON \
+ -DVERBOSE_CONFIGURE=ON \
+ -D${{ matrix.qbt_gui }}
+ cmake --build build --target qbt_update_translations
+ cmake --build build
+ cmake --build build --target check
+
+ - name: Build qBittorrent (Qt6)
+ if: startsWith(matrix.qt_version, 6)
+ run: |
+ CXXFLAGS="$CXXFLAGS -Wno-gnu-zero-variadic-macro-arguments -Werror -Wno-error=deprecated-declarations" \
+ LDFLAGS="$LDFLAGS -gz" \
+ cmake \
+ -B build \
+ -G "Ninja" \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
+ -DBOOST_ROOT="${{ env.boost_path }}" \
+ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
+ -DQT6=ON \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
@@ -122,30 +131,13 @@ jobs:
- name: Prepare build artifacts
run: |
+ # create .dmg
appName="qbittorrent"
if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then
appName="qbittorrent-nox"
fi
pushd build
- # packaging
- macdeployqt "$appName.app" -no-strip
- # code signing
- xattr -cr "$appName.app"
- codesign --force --sign - \
- "$appName.app" \
- "$appName.app/Contents/Frameworks"/* \
- "$appName.app/Contents/MacOS/$appName"
- codesign --verify --deep --strict -v "$appName.app"
- # create .dmg
- PACKAGE_RETRY=0
- while [ "$PACKAGE_RETRY" -lt "3" ]; do
- if hdiutil create -fs HFS+ -srcfolder "$appName.app" -volname "$appName" "$appName.dmg"; then
- break
- fi
- sleep 5
- PACKAGE_RETRY=$((PACKAGE_RETRY + 1))
- echo "Retry $PACKAGE_RETRY..."
- done
+ macdeployqt "$appName.app" -dmg -no-strip
popd
# prepare upload folder
mkdir upload
@@ -153,10 +145,10 @@ jobs:
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
- cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
+ cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload
diff --git a/.github/workflows/ci_python.yaml b/.github/workflows/ci_python.yaml
deleted file mode 100644
index ef8a73598..000000000
--- a/.github/workflows/ci_python.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
-name: CI - Python
-
-on: [pull_request, push]
-
-permissions: {}
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: ${{ github.head_ref != '' }}
-
-jobs:
- ci:
- name: Check
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- with:
- persist-credentials: false
-
- - name: Setup python (auxiliary scripts)
- uses: actions/setup-python@v5
- with:
- python-version: '3' # use default version
-
- - name: Install tools (auxiliary scripts)
- run: pip install bandit isort pycodestyle pyflakes
-
- - name: Gather files (auxiliary scripts)
- run: |
- export "PY_FILES=$(find . -type f -name '*.py' ! -path '*searchengine*' -printf '%p ')"
- echo $PY_FILES
- echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
-
- - name: Lint code (auxiliary scripts)
- run: |
- pyflakes $PY_FILES
- bandit --skip B101,B314,B405 $PY_FILES
-
- - name: Format code (auxiliary scripts)
- run: |
- pycodestyle \
- --max-line-length=1000 \
- --statistics \
- $PY_FILES
- isort \
- --check \
- --diff \
- $PY_FILES
-
- - name: Build code (auxiliary scripts)
- run: |
- python -m compileall $PY_FILES
-
- - name: Setup python (search engine)
- uses: actions/setup-python@v5
- with:
- python-version: '3.9'
-
- - name: Install tools (search engine)
- run: pip install bandit isort mypy pycodestyle pyflakes pyright
-
- - name: Gather files (search engine)
- run: |
- export "PY_FILES=$(find . -type f -name '*.py' -path '*searchengine*' ! -name 'socks.py' -printf '%p ')"
- echo $PY_FILES
- echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
-
- - name: Check typings (search engine)
- run: |
- MYPYPATH="src/searchengine/nova3" \
- mypy \
- --follow-imports skip \
- --strict \
- $PY_FILES
- pyright \
- $PY_FILES
-
- - name: Lint code (search engine)
- run: |
- pyflakes $PY_FILES
- bandit --skip B110,B310,B314,B405 $PY_FILES
-
- - name: Format code (search engine)
- run: |
- pycodestyle \
- --ignore=E265,E402 \
- --max-line-length=1000 \
- --statistics \
- $PY_FILES
- isort \
- --check \
- --diff \
- $PY_FILES
-
- - name: Build code (search engine)
- run: |
- python -m compileall $PY_FILES
diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml
index 807eef19f..313275b07 100644
--- a/.github/workflows/ci_ubuntu.yaml
+++ b/.github/workflows/ci_ubuntu.yaml
@@ -2,7 +2,9 @@ name: CI - Ubuntu
on: [pull_request, push]
-permissions: {}
+permissions:
+ actions: write
+ security-events: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -12,68 +14,41 @@ jobs:
ci:
name: Build
runs-on: ubuntu-latest
- permissions:
- actions: write
- security-events: write
strategy:
fail-fast: false
matrix:
- libt_version: ["2.0.11", "1.2.20"]
+ libt_version: ["2.0.9", "1.2.19"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
- qt_version: ["6.6.3"]
-
- env:
- boost_path: "${{ github.workspace }}/../boost"
- harden_flags: "-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS"
- libtorrent_path: "${{ github.workspace }}/../libtorrent"
+ qt_version: ["5.15.2", "6.2.0"]
+ exclude:
+ - libt_version: "1.2.19"
+ qt_version: "6.2.0"
steps:
- name: Checkout repository
- uses: actions/checkout@v4
- with:
- persist-credentials: false
+ uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
- build-essential cmake ninja-build \
- libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
+ build-essential cmake ninja-build pkg-config \
+ libboost-dev libssl-dev libxkbcommon-x11-dev zlib1g-dev
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
- store_cache: ${{ github.ref == 'refs/heads/master' }}
+ store_cache: ${{ startsWith(github.ref, 'refs/heads/') }}
update_packager_index: false
ccache_options: |
- max_size=1G
-
- - name: Install boost
- env:
- BOOST_MAJOR_VERSION: "1"
- BOOST_MINOR_VERSION: "77"
- BOOST_PATCH_VERSION: "0"
- run: |
- boost_url="https://archives.boost.io/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- set +e
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
- if [ "$_exitCode" -ne "0" ]; then
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
- fi
- mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- cd "${{ env.boost_path }}"
- ./bootstrap.sh
- ./b2 stage --stagedir=./ --with-headers
+ max_size=2G
- name: Install Qt
- uses: jurplel/install-qt-action@v4
+ uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
- archives: icu qtbase qtdeclarative qtsvg qttools
+ archives: icu qtbase qtsvg qttools
cache: true
- name: Install libtorrent
@@ -82,40 +57,36 @@ jobs:
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
- https://github.com/arvidn/libtorrent.git \
- ${{ env.libtorrent_path }}
- cd ${{ env.libtorrent_path }}
- CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }}" \
+ https://github.com/arvidn/libtorrent.git
+ cd libtorrent
cmake \
-B build \
-G "Ninja" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DCMAKE_CXX_STANDARD=20 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
# to avoid scanning 3rdparty codebases, initialize it just before building qbt
- name: Initialize CodeQL
- uses: github/codeql-action/init@v3
- if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
+ uses: github/codeql-action/init@v2
+ if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') && startsWith(matrix.qt_version, 6)
with:
config-file: ./.github/workflows/helper/codeql/cpp.yaml
languages: cpp
- - name: Build qBittorrent
+ - name: Build qBittorrent (Qt5)
+ if: startsWith(matrix.qt_version, 5)
run: |
- CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -DQT_FORCE_ASSERTS -Werror" \
+ CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
@@ -125,9 +96,29 @@ jobs:
cmake --build build --target check
DESTDIR="qbittorrent" cmake --install build
+ - name: Build qBittorrent (Qt6)
+ if: startsWith(matrix.qt_version, 6)
+ run: |
+ CXXFLAGS="$CXXFLAGS -Werror" \
+ LDFLAGS="$LDFLAGS -gz" \
+ cmake \
+ -B build \
+ -G "Ninja" \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ -DQT6=ON \
+ -DTESTING=ON \
+ -DVERBOSE_CONFIGURE=ON \
+ -D${{ matrix.qbt_gui }}
+ cmake --build build --target qbt_update_translations
+ cmake --build build
+ cmake --build build --target check
+ DESTDIR="qbittorrent" cmake --install build
+
- name: Run CodeQL analysis
- uses: github/codeql-action/analyze@v3
- if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
+ uses: github/codeql-action/analyze@v2
+ if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') && startsWith(matrix.qt_version, 6)
with:
category: ${{ github.base_ref || github.ref_name }}
@@ -137,41 +128,37 @@ jobs:
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
- cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
+ cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- - name: Install AppImage
+ - name: 'AppImage: Prepare env'
run: |
- curl \
- -L \
- -Z \
- -O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \
- -O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage \
- -O https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
- chmod +x \
- linuxdeploy-x86_64.AppImage \
- linuxdeploy-plugin-qt-x86_64.AppImage \
- linuxdeploy-plugin-appimage-x86_64.AppImage
+ sudo apt install libfuse2
+ wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
+ wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
+ wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
+ chmod +x linuxdeploy-x86_64.AppImage
+ chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
+ chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage
- - name: Prepare files for AppImage
+ - name: 'AppImage: Prepare nox'
if: matrix.qbt_gui == 'GUI=OFF'
run: |
- mkdir -p qbittorrent/usr/share/applications
- cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
- mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps
+ mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps/
+ mkdir -p qbittorrent/usr/share/applications/
cp dist/unix/menuicons/scalable/apps/qbittorrent.svg qbittorrent/usr/share/icons/hicolor/scalable/apps/qbittorrent.svg
+ cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
- - name: Package AppImage
+ - name: 'AppImage: Package'
run: |
- rm -f "${{ runner.workspace }}/Qt/${{ matrix.qt_version }}/gcc_64/plugins/sqldrivers/libqsqlmimer.so"
- ./linuxdeploy-x86_64.AppImage --appdir qbittorrent --plugin qt
+ ./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --plugin qt
rm qbittorrent/apprun-hooks/*
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh
NO_APPSTREAM=1 \
- OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
- ./linuxdeploy-x86_64.AppImage --appdir qbittorrent --output appimage
+ OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
+ ./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --output appimage
- name: Upload build artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload
diff --git a/.github/workflows/ci_webui.yaml b/.github/workflows/ci_webui.yaml
index a46e003ca..08daaae6f 100644
--- a/.github/workflows/ci_webui.yaml
+++ b/.github/workflows/ci_webui.yaml
@@ -2,7 +2,8 @@ name: CI - WebUI
on: [pull_request, push]
-permissions: {}
+permissions:
+ security-events: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -12,8 +13,6 @@ jobs:
ci:
name: Check
runs-on: ubuntu-latest
- permissions:
- security-events: write
defaults:
run:
@@ -21,25 +20,15 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
- with:
- persist-credentials: false
+ uses: actions/checkout@v3
- name: Setup nodejs
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install tools
- run: |
- npm install
- npm ls
- echo "::group::npm ls --all"
- npm ls --all
- echo "::endgroup::"
-
- - name: Run tests
- run: npm test
+ run: npm install
- name: Lint code
run: npm run lint
@@ -50,10 +39,10 @@ jobs:
git diff --exit-code
- name: Initialize CodeQL
- uses: github/codeql-action/init@v3
+ uses: github/codeql-action/init@v2
with:
- config-file: .github/workflows/helper/codeql/js.yaml
+ config-file: ./.github/workflows/helper/codeql/js.yaml
languages: javascript
- name: Run CodeQL analysis
- uses: github/codeql-action/analyze@v3
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml
index a5e06b1a2..e6aeb4bd6 100644
--- a/.github/workflows/ci_windows.yaml
+++ b/.github/workflows/ci_windows.yaml
@@ -2,7 +2,8 @@ name: CI - Windows
on: [pull_request, push]
-permissions: {}
+permissions:
+ actions: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -12,44 +13,35 @@ jobs:
ci:
name: Build
runs-on: windows-latest
- permissions:
- actions: write
strategy:
fail-fast: false
matrix:
- libt_version: ["2.0.11", "1.2.20"]
+ libt_version: ["2.0.9", "1.2.19"]
env:
boost_path: "${{ github.workspace }}/../boost"
- libtorrent_path: "${{ github.workspace }}/../libtorrent"
- vcpkg_path: "c:/vcpkg"
+ libtorrent_path: "${{ github.workspace }}/libtorrent"
+ vpkg_triplet_path: "${{ github.workspace }}/../triplets_overlay"
steps:
- name: Checkout repository
- uses: actions/checkout@v4
- with:
- persist-credentials: false
+ uses: actions/checkout@v3
- name: Setup devcmd
uses: ilammy/msvc-dev-cmd@v1
- name: Install build tools
run: |
- if ((Get-Command "ninja.exe" -ErrorAction SilentlyContinue) -eq $null)
- {
- choco install ninja
- }
- where.exe ninja
- ninja --version
+ choco install ninja
- # https://learn.microsoft.com/en-us/vcpkg/users/binarycaching#gha
- - name: Set variables for vcpkg
- uses: actions/github-script@v7
+ # use the preinstalled vcpkg from image
+ # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#package-management
+ - name: Setup vcpkg
+ uses: lukka/run-vcpkg@v10
with:
- script: |
- core.exportVariable('ACTIONS_CACHE_URL', (process.env.ACTIONS_CACHE_URL || ''));
- core.exportVariable('ACTIONS_RUNTIME_TOKEN', (process.env.ACTIONS_RUNTIME_TOKEN || ''));
+ vcpkgDirectory: C:/vcpkg
+ doNotUpdateVcpkg: true # the preinstalled vcpkg is updated regularly
- name: Install dependencies with vcpkg
run: |
@@ -57,57 +49,41 @@ jobs:
New-Item `
-Force `
-ItemType File `
- -Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake"
- # OpenSSL isn't compatible with `/guard:cf` flag so we omit it for now, see: https://github.com/openssl/openssl/issues/22554
+ -Path "${{ env.vpkg_triplet_path }}/x64-windows-static-md-release.cmake"
Add-Content `
- -Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake" `
+ -Path "${{ env.vpkg_triplet_path }}/x64-windows-static-md-release.cmake" `
-Value @("set(VCPKG_TARGET_ARCHITECTURE x64)",
"set(VCPKG_LIBRARY_LINKAGE static)",
"set(VCPKG_CRT_LINKAGE dynamic)",
- "set(VCPKG_BUILD_TYPE release)")
+ "set(VCPKG_BUILD_TYPE release)",
+ "set(VCPKG_C_FLAGS /guard:cf)",
+ "set(VCPKG_CXX_FLAGS /guard:cf)",
+ "set(VCPKG_LINKER_FLAGS /guard:cf)")
# clear buildtrees after each package installation to reduce disk space requirements
$packages = `
- "boost-build:x64-windows-static-md-release",
"openssl:x64-windows-static-md-release",
"zlib:x64-windows-static-md-release"
- ${{ env.vcpkg_path }}/vcpkg.exe upgrade `
+ ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
--no-dry-run `
- --overlay-triplets="${{ env.vcpkg_path }}/triplets_overlay"
- ${{ env.vcpkg_path }}/vcpkg.exe install `
- --binarysource="clear;x-gha,readwrite" `
+ --overlay-triplets="${{ env.vpkg_triplet_path }}"
+ ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install `
--clean-after-build `
- --overlay-triplets="${{ env.vcpkg_path }}/triplets_overlay" `
+ --overlay-triplets="${{ env.vpkg_triplet_path }}" `
$packages
- name: Install boost
- env:
- BOOST_MAJOR_VERSION: "1"
- BOOST_MINOR_VERSION: "86"
- BOOST_PATCH_VERSION: "0"
run: |
- $boost_url="https://archives.boost.io/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- $boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
- if ($LastExitCode -ne 0)
- {
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
- }
+ aria2c `
+ "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.7z" `
+ -d "${{ runner.temp }}" `
+ -o "boost.7z"
+ 7z x "${{ runner.temp }}/boost.7z" -o"${{ github.workspace }}/.."
move "${{ github.workspace }}/../boost_*" "${{ env.boost_path }}"
- cd "${{ env.boost_path }}"
- #.\bootstrap.bat
- ${{ env.vcpkg_path }}/installed/x64-windows-static-md-release/tools/boost-build/b2.exe `
- stage `
- toolset=msvc `
- --stagedir=.\ `
- --with-headers
- name: Install Qt
- uses: jurplel/install-qt-action@v4
+ uses: jurplel/install-qt-action@v3
with:
- version: "6.9.1"
- arch: win64_msvc2022_64
+ version: "6.5.0"
archives: qtbase qtsvg qttools
cache: true
@@ -117,20 +93,18 @@ jobs:
--branch v${{ matrix.libt_version }} `
--depth 1 `
--recurse-submodules `
- https://github.com/arvidn/libtorrent.git `
- ${{ env.libtorrent_path }}
- cd ${{ env.libtorrent_path }}
+ https://github.com/arvidn/libtorrent.git
+ cd libtorrent
$env:CXXFLAGS+=" /guard:cf"
- $env:LDFLAGS+=" /GUARD:CF"
+ $env:LDFLAGS+=" /guard:cf"
cmake `
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
- -DCMAKE_CXX_STANDARD=20 `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
- -DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}/install" `
- -DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" `
+ -DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}" `
+ -DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
+ -DBOOST_ROOT="${{ env.boost_path }}" `
-DBUILD_SHARED_LIBS=OFF `
-Ddeprecated-functions=OFF `
-Dstatic_runtime=OFF `
@@ -140,16 +114,17 @@ jobs:
- name: Build qBittorrent
run: |
- $env:CXXFLAGS+="/DQT_FORCE_ASSERTS /WX"
+ $env:CXXFLAGS+=" /WX"
cmake `
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
- -DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" `
- -DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/install/lib/cmake/LibtorrentRasterbar" `
+ -DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
+ -DBOOST_ROOT="${{ env.boost_path }}" `
+ -DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/lib/cmake/LibtorrentRasterbar" `
-DMSVC_RUNTIME_DYNAMIC=ON `
+ -DQT6=ON `
-DTESTING=ON `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-release `
-DVERBOSE_CONFIGURE=ON `
@@ -161,51 +136,39 @@ jobs:
- name: Prepare build artifacts
run: |
mkdir upload
- mkdir upload/qBittorrent
- copy build/qbittorrent.exe upload/qBittorrent
- copy build/qbittorrent.pdb upload/qBittorrent
- copy dist/windows/qt.conf upload/qBittorrent
+ copy build/qbittorrent.exe upload
+ copy build/qbittorrent.pdb upload
+ copy dist/windows/qt.conf upload
# runtimes
- copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Core.dll" upload/qBittorrent
- copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Gui.dll" upload/qBittorrent
- copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Network.dll" upload/qBittorrent
- copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Sql.dll" upload/qBittorrent
- copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Svg.dll" upload/qBittorrent
- copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Widgets.dll" upload/qBittorrent
- copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Xml.dll" upload/qBittorrent
- mkdir upload/qBittorrent/plugins/iconengines
- copy "${{ env.Qt_ROOT_DIR }}/plugins/iconengines/qsvgicon.dll" upload/qBittorrent/plugins/iconengines
- mkdir upload/qBittorrent/plugins/imageformats
- copy "${{ env.Qt_ROOT_DIR }}/plugins/imageformats/qico.dll" upload/qBittorrent/plugins/imageformats
- copy "${{ env.Qt_ROOT_DIR }}/plugins/imageformats/qsvg.dll" upload/qBittorrent/plugins/imageformats
- mkdir upload/qBittorrent/plugins/platforms
- copy "${{ env.Qt_ROOT_DIR }}/plugins/platforms/qwindows.dll" upload/qBittorrent/plugins/platforms
- mkdir upload/qBittorrent/plugins/sqldrivers
- copy "${{ env.Qt_ROOT_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/qBittorrent/plugins/sqldrivers
- mkdir upload/qBittorrent/plugins/styles
- copy "${{ env.Qt_ROOT_DIR }}/plugins/styles/qmodernwindowsstyle.dll" upload/qBittorrent/plugins/styles
- mkdir upload/qBittorrent/plugins/tls
- copy "${{ env.Qt_ROOT_DIR }}/plugins/tls/qschannelbackend.dll" upload/qBittorrent/plugins/tls
+ copy "${{ env.Qt6_DIR }}/bin/Qt6Core.dll" upload
+ copy "${{ env.Qt6_DIR }}/bin/Qt6Gui.dll" upload
+ copy "${{ env.Qt6_DIR }}/bin/Qt6Network.dll" upload
+ copy "${{ env.Qt6_DIR }}/bin/Qt6Sql.dll" upload
+ copy "${{ env.Qt6_DIR }}/bin/Qt6Svg.dll" upload
+ copy "${{ env.Qt6_DIR }}/bin/Qt6Widgets.dll" upload
+ copy "${{ env.Qt6_DIR }}/bin/Qt6Xml.dll" upload
+ mkdir upload/plugins/iconengines
+ copy "${{ env.Qt6_DIR }}/plugins/iconengines/qsvgicon.dll" upload/plugins/iconengines
+ mkdir upload/plugins/imageformats
+ copy "${{ env.Qt6_DIR }}/plugins/imageformats/qico.dll" upload/plugins/imageformats
+ copy "${{ env.Qt6_DIR }}/plugins/imageformats/qsvg.dll" upload/plugins/imageformats
+ mkdir upload/plugins/platforms
+ copy "${{ env.Qt6_DIR }}/plugins/platforms/qwindows.dll" upload/plugins/platforms
+ mkdir upload/plugins/sqldrivers
+ copy "${{ env.Qt6_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/plugins/sqldrivers
+ mkdir upload/plugins/styles
+ copy "${{ env.Qt6_DIR }}/plugins/styles/qwindowsvistastyle.dll" upload/plugins/styles
+ mkdir upload/plugins/tls
+ copy "${{ env.Qt6_DIR }}/plugins/tls/qschannelbackend.dll" upload/plugins/tls
# cmake additionals
mkdir upload/cmake
copy build/compile_commands.json upload/cmake
copy build/target_graph.dot upload/cmake
mkdir upload/cmake/libtorrent
- copy ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
+ copy libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}
path: upload
-
- - name: Create installer
- run: |
- 7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip"
- makensis /DQBT_DIST_DIR="../../upload/qBittorrent" /WX dist/windows/qbittorrent.nsi
-
- - name: Upload installer
- uses: actions/upload-artifact@v4
- with:
- name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}-setup
- path: dist/windows/qbittorrent_*_setup.exe
diff --git a/.github/workflows/coverity-scan.yaml b/.github/workflows/coverity-scan.yaml
index dc561ac4a..b3fcace21 100644
--- a/.github/workflows/coverity-scan.yaml
+++ b/.github/workflows/coverity-scan.yaml
@@ -12,88 +12,48 @@ jobs:
name: Scan
runs-on: ubuntu-latest
- strategy:
- matrix:
- libt_version: ["2.0.11"]
- qbt_gui: ["GUI=ON"]
- qt_version: ["6.9.1"]
-
- env:
- boost_path: "${{ github.workspace }}/../boost"
- coverity_path: "${{ github.workspace }}/../coverity"
- libtorrent_path: "${{ github.workspace }}/../libtorrent"
-
steps:
- name: Checkout repository
- uses: actions/checkout@v4
- with:
- persist-credentials: false
+ uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
- build-essential cmake ninja-build \
- libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
-
- - name: Install boost
- env:
- BOOST_MAJOR_VERSION: "1"
- BOOST_MINOR_VERSION: "88"
- BOOST_PATCH_VERSION: "0"
- run: |
- boost_url="https://archives.boost.io/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
- set +e
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
- if [ "$_exitCode" -ne "0" ]; then
- curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
- tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
- fi
- mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- cd "${{ env.boost_path }}"
- ./bootstrap.sh
- ./b2 stage --stagedir=./ --with-headers
+ build-essential cmake ninja-build pkg-config \
+ libboost-dev libssl-dev zlib1g-dev
- name: Install Qt
- uses: jurplel/install-qt-action@v4
+ uses: jurplel/install-qt-action@v3
with:
- version: ${{ matrix.qt_version }}
- archives: icu qtbase qtdeclarative qtsvg qttools
- cache: true
+ version: "6.5.0"
+ archives: icu qtbase qtsvg qttools
- name: Install libtorrent
run: |
git clone \
- --branch v${{ matrix.libt_version }} \
+ --branch "v2.0.9" \
--depth 1 \
--recurse-submodules \
- https://github.com/arvidn/libtorrent.git \
- ${{ env.libtorrent_path }}
- cd ${{ env.libtorrent_path }}
+ https://github.com/arvidn/libtorrent.git
+ cd libtorrent
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DCMAKE_CXX_STANDARD=20 \
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
- name: Download Coverity Build Tool
run: |
- curl \
- -L \
- -d "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
- -o "${{ runner.temp }}/coverity_tool.tgz" \
- "https://scan.coverity.com/download/linux64"
- mkdir -p ${{ env.coverity_path }}
- tar \
- -xf "${{ runner.temp }}/coverity_tool.tgz" \
- -C "${{ env.coverity_path }}" \
- --strip-components 1
+ wget \
+ -q \
+ https://scan.coverity.com/download/linux64 \
+ --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
+ -O coverity_tool.tgz
+ mkdir coverity_tool
+ tar xzf coverity_tool.tgz --strip 1 -C coverity_tool
- name: Build qBittorrent
run: |
@@ -101,13 +61,11 @@ jobs:
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
- -DVERBOSE_CONFIGURE=ON \
- -D${{ matrix.qbt_gui }}
- PATH="${{ env.coverity_path }}/bin:$PATH" \
- cov-build \
- --dir cov-int \
- cmake --build build
+ -DGUI=ON \
+ -DQT6=ON \
+ -DVERBOSE_CONFIGURE=ON
+ export PATH="$(pwd)/coverity_tool/bin:$PATH"
+ cov-build --dir cov-int cmake --build build
- name: Submit the result to Coverity Scan
run: |
diff --git a/.github/workflows/helper/pre-commit/.typos.toml b/.github/workflows/helper/pre-commit/.typos.toml
index 90d6e1746..0f33373ad 100644
--- a/.github/workflows/helper/pre-commit/.typos.toml
+++ b/.github/workflows/helper/pre-commit/.typos.toml
@@ -16,5 +16,3 @@ ths = "ths"
[default.extend-words]
BA = "BA"
helo = "helo"
-Pn = "Pn"
-UIU = "UIU"
diff --git a/.github/workflows/helper/pre-commit/check_grid_items_order.py b/.github/workflows/helper/pre-commit/check_grid_items_order.py
deleted file mode 100755
index dfd1bba68..000000000
--- a/.github/workflows/helper/pre-commit/check_grid_items_order.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python3
-
-# A pre-commit hook for checking items order in grid layouts
-# Copyright (C) 2024 Mike Tzou (Chocobo1)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# In addition, as a special exception, the copyright holders give permission to
-# link this program with the OpenSSL project's "OpenSSL" library (or with
-# modified versions of it that use the same license as the "OpenSSL" library),
-# and distribute the linked executables. You must obey the GNU General Public
-# License in all respects for all of the code used other than "OpenSSL". If you
-# modify file(s), you may extend this exception to your version of the file(s),
-# but you are not obligated to do so. If you do not wish to do so, delete this
-# exception statement from your version.
-
-import argparse
-import re
-import sys
-import xml.etree.ElementTree as ElementTree
-from collections.abc import Callable, Sequence
-from typing import Optional
-
-
-def traversePostOrder(root: ElementTree.Element, visitFunc: Callable[[ElementTree.Element], None]) -> None:
- stack = [(root, False)]
-
- while len(stack) > 0:
- (element, visit) = stack.pop()
- if visit:
- visitFunc(element)
- else:
- stack.append((element, True))
- stack.extend((child, False) for child in reversed(element))
-
-
-def modifyElement(element: ElementTree.Element) -> None:
- def getSortKey(e: ElementTree.Element) -> tuple[int, int]:
- if e.tag == 'item':
- return (int(e.attrib['row']), int(e.attrib['column']))
- return (-1, -1) # don't care
-
- if element.tag == 'layout' and element.attrib['class'] == 'QGridLayout' and len(element) > 0:
- element[:] = sorted(element, key=getSortKey)
-
- # workaround_2a: ElementTree will unescape `"` and we need to escape it back
- if element.tag == 'string' and element.text is not None:
- element.text = element.text.replace('"', '"')
-
-
-def main(argv: Optional[Sequence[str]] = None) -> int:
- parser = argparse.ArgumentParser()
- parser.add_argument('filenames', nargs='*', help='Filenames to check')
- args = parser.parse_args(argv)
-
- for filename in args.filenames:
- with open(filename, 'r+') as f:
- orig = f.read()
- root = ElementTree.fromstring(orig)
- traversePostOrder(root, modifyElement)
- ElementTree.indent(root, ' ')
-
- # workaround_1: cannot use `xml_declaration=True` since it uses single quotes instead of Qt preferred double quotes
- ret = f'\n{ElementTree.tostring(root, 'unicode')}\n'
-
- # workaround_2b: ElementTree will turn `"` into `"`, so revert it back
- ret = ret.replace('"', '"')
-
- # workaround_3: Qt prefers no whitespaces in self-closing tags
- ret = re.sub('<(.+) +/>', r'<\1/>', ret)
-
- if ret != orig:
- print(f'Tip: run this script to apply the fix: `python {__file__} {filename}`', file=sys.stderr)
-
- f.seek(0)
- f.write(ret)
- f.truncate()
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/.github/workflows/helper/pre-commit/check_translation_tag.py b/.github/workflows/helper/pre-commit/check_translation_tag.py
index 547a2a992..34705f74d 100755
--- a/.github/workflows/helper/pre-commit/check_translation_tag.py
+++ b/.github/workflows/helper/pre-commit/check_translation_tag.py
@@ -26,12 +26,9 @@
# but you are not obligated to do so. If you do not wish to do so, delete this
# exception statement from your version.
+from typing import Optional, Sequence
import argparse
import re
-import sys
-from collections.abc import Sequence
-from typing import Optional
-
def main(argv: Optional[Sequence[str]] = None) -> int:
parser = argparse.ArgumentParser()
@@ -50,12 +47,12 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
for line in file:
if (match := regex.match(line)) is not None:
error_buffer += str(f"Defect file: \"{filename}\"\n"
- f"Line: {line_counter}\n"
- f"Column span: {match.span()}\n"
- f"Part: \"{match.group()}\"\n\n")
+ f"Line: {line_counter}\n"
+ f"Column span: {match.span()}\n"
+ f"Part: \"{match.group()}\"\n\n")
line_counter += 1
- except UnicodeDecodeError:
+ except UnicodeDecodeError as error:
# not a text file, skip
continue
@@ -67,6 +64,5 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
return 0
-
if __name__ == '__main__':
- sys.exit(main())
+ exit(main())
diff --git a/.github/workflows/stale_bot.yaml b/.github/workflows/stale_bot.yaml
index 705f6a5c9..d5b23095f 100644
--- a/.github/workflows/stale_bot.yaml
+++ b/.github/workflows/stale_bot.yaml
@@ -4,16 +4,15 @@ on:
schedule:
- cron: '0 0 * * *'
-permissions: {}
+permissions:
+ pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
- permissions:
- pull-requests: write
steps:
- name: Mark and close stale PRs
- uses: actions/stale@v9
+ uses: actions/stale@v8
with:
stale-pr-message: "This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity."
close-pr-message: "This PR was closed because it has been stalled for some time with no activity."
diff --git a/.gitignore b/.gitignore
index 17b925842..b1d504978 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-.vscode/
src/gui/geoip/GeoIP.dat
src/gui/geoip/GeoIP.dat.gz
src/qbittorrent
@@ -17,7 +16,6 @@ Makefile*
*.o
*.pdb
*.exe
-*.dll
# Generated MOC, resource and UI files
moc_*.cpp
@@ -25,7 +23,8 @@ moc_*.h
qrc_*.cpp
ui_*.h
*.moc
-*.qm
+src/lang/qbittorrent_*.qm
+src/webui/www/translations/webui_*.qm
.DS_Store
.qmake.stash
src/qbittorrent.app
@@ -41,3 +40,7 @@ src/icons/skin/build-icons/icons/*.png
# CMake build directory
build/
+
+# Web UI tools
+node_modules
+package-lock.json
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 90beea365..51be1d0cd 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,12 +1,6 @@
repos:
- repo: local
hooks:
- - id: check-grid-order
- name: Check items order in grid layouts
- entry: .github/workflows/helper/pre-commit/check_grid_items_order.py
- language: script
- files: \.ui$
-
- id: check-translation-tag
name: Check newline characters in tag
entry: .github/workflows/helper/pre-commit/check_translation_tag.py
@@ -19,7 +13,7 @@ repos:
- ts
- repo: https://github.com/pre-commit/pre-commit-hooks.git
- rev: v6.0.0
+ rev: v4.4.0
hooks:
- id: check-json
name: Check JSON files
@@ -41,7 +35,6 @@ repos:
(?x)^(
src/webui/www/private/css/lib/.* |
src/webui/www/private/scripts/lib/.* |
- dist/windows/license.txt |
test/testdata/crlf.txt
)$
@@ -68,18 +61,20 @@ repos:
exclude_types:
- ts
- - repo: https://github.com/codespell-project/codespell.git
- rev: v2.4.1
+ - repo: https://github.com/codespell-project/codespell
+ rev: v2.2.5
hooks:
- id: codespell
name: Check spelling (codespell)
- args: ["--ignore-words-list", "additionals,categor,curren,fo,indexIn,ist,ket,notin,searchin,sectionin,superseeding,te,ths"]
+ args: ["--ignore-words-list", "additionals,curren,fo,ket,superseeding,te,ths"]
exclude: |
(?x)^(
.*\.desktop |
.*\.qrc |
+ build-aux/.* |
Changelog |
dist/windows/installer-translations/.* |
+ m4/.* |
src/base/3rdparty/.* |
src/searchengine/nova3/socks.py |
src/webui/www/private/scripts/lib/.*
@@ -87,8 +82,8 @@ repos:
exclude_types:
- ts
- - repo: https://github.com/crate-ci/typos.git
- rev: v1.35.3
+ - repo: https://github.com/crate-ci/typos
+ rev: v1.15.5
hooks:
- id: typos
name: Check spelling (typos)
@@ -99,8 +94,11 @@ repos:
.*\.desktop |
.*\.qrc |
\.pre-commit-config\.yaml |
+ build-aux/.* |
Changelog |
+ configure.* |
dist/windows/installer-translations/.* |
+ m4/.* |
src/base/3rdparty/.* |
src/searchengine/nova3/socks.py |
src/webui/www/private/scripts/lib/.*
diff --git a/.tx/config b/.tx/config
index 95d5b1afa..287c2319a 100644
--- a/.tx/config
+++ b/.tx/config
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
-[o:sledgehammer999:p:qbittorrent:r:qbittorrent_master]
+[o:sledgehammer999:p:qbittorrent:r:qbittorrent_v46x]
file_filter = src/lang/qbittorrent_.ts
source_file = src/lang/qbittorrent_en.ts
source_lang = en
@@ -9,7 +9,7 @@ type = QT
minimum_perc = 23
lang_map = pt: pt_PT, zh: zh_CN
-[o:sledgehammer999:p:qbittorrent:r:qbittorrent_webui]
+[o:sledgehammer999:p:qbittorrent:r:qbittorrent_webui_v46x]
file_filter = src/webui/www/translations/webui_.ts
source_file = src/webui/www/translations/webui_en.ts
source_lang = en
diff --git a/AUTHORS b/AUTHORS
index d63d1f994..533cc63dc 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -53,7 +53,7 @@ Images Authors:
* file: src/icons/qbittorrent-tray-dark.svg src/icons/qbittorrent-tray-light.svg
copyright: Daniel Eguren
- modified by: now-im (@now-im)
+ modified by: Nowshed H. Imran (@now-im)
license: LGPL
* folder: src/icons/
@@ -63,7 +63,7 @@ Images Authors:
media-seek-forward.svg, network-connect.svg, object-locked.svg, queued.svg, ratio.svg, reannounce.svg, slow_off.svg, slow.svg,
speedometer.svg, system-log-out.svg, tags.svg, task-complete.svg, task-reject.svg, tracker-error.svg, tracker-warning.svg,
trackerless.svg, trackers.svg, view-categories.svg
- copyright: now-im (@now-im) modified from La-Capitaine icon theme (https://github.com/keeferrourke/la-capitaine-icon-theme)
+ copyright: Nowshed H. Imran (@now-im) modified from La-Capitaine icon theme (https://github.com/keeferrourke/la-capitaine-icon-theme)
license: GPLv3+
* folder: src/icons/
@@ -76,18 +76,18 @@ Images Authors:
name.svg, network-server.svg, office-chart-line.svg, plugins.svg, preferences-desktop.svg, preferences-other.svg,
preferences-system-network.svg, security-high.svg, security-low.svg, set-location.svg, torrent-creator.svg, user-group-delete.svg,
user-group-new.svg, view-preview.svg, view-refresh.svg, view-statistics.svg, wallet-open.svg, webui.svg
- copyright: now-im (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
+ copyright: Nowshed H. Imran (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
license: MIT
* folder: src/icons/
files: force-recheck.svg
- copyright: now-im (@now-im) modified from Font-Awesome icon theme (https://github.com/FortAwesome/Font-Awesome)
+ copyright: Nowshed H. Imran (@now-im) modified from Font-Awesome icon theme (https://github.com/FortAwesome/Font-Awesome)
license: CC BY 4.0 License
* folder: src/icons/
files: downloading.svg, edit-clear.svg, error.svg, filter-active.svg, filter-inactive.svg, filter-stalled.svg, kt-set-max-download-speed.svg,
kt-set-max-upload-speed.svg, list-add.svg, preferences-web-browser-cookies.svg, stalledDL.svg, stalledUP.svg
- copyright: now-im (@now-im)
+ copyright: Nowshed H. Imran (@now-im)
license: BSD 2-Clause License
Translations authors:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97ecb3684..9c833f90b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,13 +7,15 @@ project(qBittorrent
)
# version requirements - older versions may work, but you are on your own
-set(minBoostVersion 1.76)
-set(minQt6Version 6.6.0)
-set(minOpenSSLVersion 3.0.2)
+set(minBoostVersion 1.71)
+set(minQt5Version 5.15.2)
+set(minQt6Version 6.2)
+set(minOpenSSLVersion 1.1.1)
set(minLibtorrent1Version 1.2.19)
-set(minLibtorrentVersion 2.0.10)
+set(minLibtorrentVersion 2.0.9)
set(minZlibVersion 1.2.11)
+include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
include(GNUInstallDirs)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
@@ -23,6 +25,7 @@ include(FeatureOptionsSetup)
# features, list is loosely sorted by user's interests
feature_option(GUI "Build GUI application" ON)
feature_option(WEBUI "Enable built-in HTTP server for remote control" ON)
+feature_option(QT6 "Build with Qt 6 instead of Qt 5" OFF)
feature_option(STACKTRACE "Enable stacktrace support" ON)
feature_option(TESTING "Build internal testing suite" OFF)
feature_option(VERBOSE_CONFIGURE "Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts)" OFF)
diff --git a/CODING_GUIDELINES.md b/CODING_GUIDELINES.md
index 4562dc842..0bbf0e2c6 100644
--- a/CODING_GUIDELINES.md
+++ b/CODING_GUIDELINES.md
@@ -276,7 +276,7 @@ struct StructName {};
enum EnumName {};
-using SomeList = QList;
+typedef QList SomeList;
namespace NamespaceName
{
@@ -318,7 +318,7 @@ The headers should be ordered alphabetically within each group. \
If there are conditionals for the same header group, then put them at the bottom of the respective group. \
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
-One exception is the header containing the library version (for example, QtVersionChecks), this particular header isn't constrained by the aforementioned order.
+One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
Example:
@@ -331,7 +331,7 @@ Example:
// exceptions, headers containing version number
#include
#include
-#include
+#include
// C++ Standard Library headers
#include
@@ -342,7 +342,7 @@ Example:
// System headers
#ifdef Q_OS_WIN
-#include
+#include
#endif
// Boost library headers
diff --git a/COPYING.GPLv2 b/COPYING.GPLv2
index 9efa6fbc9..d159169d1 100644
--- a/COPYING.GPLv2
+++ b/COPYING.GPLv2
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
-
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -304,7 +304,8 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, see .
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
@@ -328,8 +329,8 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
- , 1 April 1989
- Moe Ghoul, President of Vice
+ , 1 April 1989
+ Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
diff --git a/Changelog b/Changelog
index 453c4bcdc..33b62e606 100644
--- a/Changelog
+++ b/Changelog
@@ -1,156 +1,3 @@
-Unreleased - sledgehammer999 - v5.1.0
-
-Mon Oct 28th 2024 - sledgehammer999 - v5.0.1
- - FEATURE: Add "Simple pread/pwrite" disk IO type (Hanabishi)
- - BUGFIX: Don't ignore SSL errors (sledgehammer999)
- - BUGFIX: Don't try to apply Mark-of-the-Web to nonexistent files (glassez)
- - BUGFIX: Disable "Move to trash" option by default (glassez)
- - BUGFIX: Disable the ability to create torrents with a piece size of 256MiB (stalkerok)
- - BUGFIX: Allow to choose Qt style (glassez)
- - BUGFIX: Always notify user about duplicate torrent (glassez)
- - BUGFIX: Correctly handle "torrent finished after move" event (glassez)
- - BUGFIX: Correctly apply filename filter when `!qB` extension is enabled (glassez)
- - BUGFIX: Improve color scheme change detection (glassez)
- - BUGFIX: Fix button state for SSL certificate check (Chocobo1)
- - WEBUI: Fix CSS that results in hidden torrent list in some browsers (skomerko)
- - WEBUI: Use proper text color to highlight items in all filter lists (skomerko)
- - WEBUI: Fix 'rename files' dialog cannot be opened more than once (Chocobo1)
- - WEBUI: Fix UI of Advanced Settings to show all settings (glassez)
- - WEBUI: Free resources allocated by web session once it is destructed (dyseg)
- - SEARCH: Import correct libraries (Chocobo1)
- - OTHER: Sync flag icons with upstream (xavier2k6)
-
-Sun Sep 29th 2024 - sledgehammer999 - v5.0.0
- - FEATURE: Support creating .torrent with larger piece size (Chocobo1)
- - FEATURE: Improve tracker entries handling (glassez)
- - FEATURE: Add separate filter item for tracker errors (glassez)
- - FEATURE: Allow to remove tracker from tracker filter widget menu (glassez)
- - FEATURE: Implement `Reannounce In` column (Hanabishi)
- - FEATURE: Expose `DHT bootstrap nodes` setting (Chocobo1)
- - FEATURE: Add support for [Mark-of-the-Web](https://redcanary.com/threat-detection-report/techniques/mark-of-the-web-bypass/) (Chocobo1)
- - FEATURE: Allow to keep unwanted files in separate folder (glassez)
- - FEATURE: Add `Copy Comment` to the torrent list's context menu (thalieht)
- - FEATURE: Allow relative profile paths (Victor Chernyakin)
- - FEATURE: Enable Ctrl+F hotkey for more inputs (thalieht)
- - FEATURE: Add seeding limits to RSS and Watched folders options UI (glassez)
- - FEATURE: Subcategories implicitly follow the parent category options (glassez)
- - FEATURE: Add option to name each qbittorrent instance (Chocobo1)
- - FEATURE: Add button for sending test email (Thomas Piccirello)
- - FEATURE: Allow torrents to override default share limit action (glassez)
- - FEATURE: Use Start/Stop instead of Resume/Pause (thalieht)
- - FEATURE: Add the Popularity metric (Aliaksei Urbanski)
- - FEATURE: Focus on Download button if torrent link retrieved from the clipboard (glassez)
- - FEATURE: Add ability to pause/resume entire BitTorrent session (glassez)
- - FEATURE: Add an option to set BitTorrent session shutdown timeout (glassez)
- - FEATURE: Apply "Excluded file names" to folder names as well (glassez)
- - FEATURE: Allow to use regular expression to filter torrent content (glassez)
- - FEATURE: Allow to move content files to Trash instead of deleting them (glassez)
- - FEATURE: Add ability to display torrent "privateness" in UI (ManiMatter)
- - FEATURE: Add a flag in `Peers` tab denoting a connection using NAT hole punching (stalkerok)
- - BUGFIX: Display error message when unrecoverable error occurred (glassez)
- - BUGFIX: Update size of selected files when selection is changed (glassez)
- - BUGFIX: Normalize tags by trimming leading/trailing whitespace (glassez)
- - BUGFIX: Correctly handle share limits in torrent options dialog (glassez)
- - BUGFIX: Adjust tracker tier when adding additional trackers (Chocobo1)
- - BUGFIX: Fix inconsistent naming between `Done/Progress` column (luzpaz)
- - BUGFIX: Sanitize peer client names (Hanabishi)
- - BUGFIX: Apply share limits immediately when torrent downloading is finished (glassez)
- - BUGFIX: Show download progress for folders with zero byte size as 100 instead of 0 (vikas_c)
- - BUGFIX: Fix highlighted piece color (Prince Gupta)
- - BUGFIX: Apply "merge trackers" logic regardless of way the torrent is added (glassez)
- - WEBUI: Improve WebUI responsiveness (Chocobo1)
- - WEBUI: Do not exit the app when WebUI has failed to start (Hanabishi)
- - WEBUI: Add `Moving` filter to side panel (xavier2k6)
- - WEBUI: Add dark theme (d47081)
- - WEBUI: Allow to remember torrent content files deletion (David)
- - WEBUI: Leave the fields empty when value is invalid (Chocobo1)
- - WEBUI: Use natural sorting (Chocobo1)
- - WEBUI: Improve WebUI login behavior (JayRet)
- - WEBUI: Conditionally show filters sidebar (Thomas Piccirello)
- - WEBUI: Add support for running concurrent searches (Thomas Piccirello)
- - WEBUI: Improve accuracy of trackers list (Thomas Piccirello)
- - WEBUI: Fix error when category doesn't exist (Thomas Piccirello)
- - WEBUI: Improve table scrolling and selection on mobile (Thomas Piccirello)
- - WEBUI: Restore search tabs on load (Thomas Piccirello)
- - WEBUI: Restore previously used tab on load (Thomas Piccirello)
- - WEBUI: Increase default height of `Share ratio limit` dialog (thalieht)
- - WEBUI: Use enabled search plugins by default (Thomas Piccirello)
- - WEBUI: Add columns `Incomplete Save Path`, `Info Hash v1`, `Info Hash v2` (thalieht)
- - WEBUI: Always create generic filter items (skomerko)
- - WEBUI: Provide `Use Category paths in Manual Mode` option (skomerko)
- - WEBUI: Provide `Merge trackers to existing torrent` option (skomerko)
- - WEBAPI: Fix wrong timestamp values (Chocobo1)
- - WEBAPI: Send binary data with filename and mime type specified (glassez)
- - WEBAPI: Expose API for the torrent creator (glassez, Radu Carpa)
- - WEBAPI: Add support for SSL torrents (Chocobo1, Radu Carpa)
- - WEBAPI: Provide endpoint for listing directory content (Paweł Kotiuk)
- - WEBAPI: Provide "private" flag via "torrents/info" endpoint (ManiMatter)
- - WEBAPI: Add a way to download .torrent file using search plugin (glassez)
- - WEBAPI: Add "private" filter for "torrents/info" endpoint (ManiMatter)
- - WEBAPI: Add root_path to "torrents/info" result (David Newhall)
- - RSS: Show RSS feed title in HTML browser (Jay)
- - RSS: Allow to set delay between requests to the same host (jNullj)
- - SEARCH: Allow users to specify Python executable path (Chocobo1)
- - SEARCH: Lazy load search plugins (milahu)
- - SEARCH: Add date column to the built-in search engine (ducalex)
- - SEARCH: Allow to rearrange search tabs (glassez)
- - WINDOWS: Use Fusion style on Windows 10+. It has better compatibility with dark mode (glassez)
- - WINDOWS: Allow to set qBittorrent as default program (glassez)
- - WINDOWS: Don't access "Favorites" folder unexpectedly (glassez)
- - LINUX: Add support for systemd power management (Chocobo1)
- - LINUX: Add support for localized man pages (Victor Chernyakin)
- - LINUX: Specify a locale if none is set (Chocobo1)
- - MACOS: Display download/upload speed in dock icon (Nick Korotysh)
- - MACOS: Add support for quarantine on macOS (Chocobo1)
- - OTHER: Drop support for Qt5, qmake, autotools, Windows < 10, Windows 32-bit
- - OTHER: Minimum supported versions: Qt: 6.5, Boost: 1.76, OpenSSL: 3.0.2
- - OTHER: Switch to C++20
-
-Mon Sep 16th 2024 - sledgehammer999 - v4.6.7
- - BUGFIX: The updater will launch the link to the build variant you're currently using (sledgehammer999)
- - BUGFIX: Focus on Download button if torrent link retrieved from the clipboard (glassez)
- - WEBUI: RSS: The list of feeds wouldn't load for Apply Rule (glassez)
-
-Sun Aug 18th 2024 - sledgehammer999 - v4.6.6
- - BUGFIX: Fix handling of tags containing '&' character (glassez)
- - BUGFIX: Show scroll bar in Torrent Tags dialog (glassez)
- - BUGFIX: Apply bulk changes to correct content widget items (glassez)
- - BUGFIX: Hide zero status filters when torrents are removed (glassez)
- - BUGFIX: Fix `Incomplete Save Path` cannot be changed for torrents without metadata (glassez)
- - WEBUI: Correctly apply changed "save path" of RSS rules (glassez)
- - WEBUI: Clear tracker list on full update (skomerko)
- - OTHER: Update User-Agent string for internal downloader and search engines (cayenne17)
-
-Sun May 26th 2024 - sledgehammer999 - v4.6.5
- - BUGFIX: Prevent app from being closed when disabling system tray icon (glassez)
- - BUGFIX: Fix Enter key behavior in Add new torrent dialog (glassez)
- - BUGFIX: Prevent invalid status filter index from being used (glassez)
- - BUGFIX: Add extra offset for dialog frame (glassez)
- - BUGFIX: Don't overwrite stored layout of main window with incorrect one (glassez)
- - BUGFIX: Don't forget to resume "missing files" torrent when rechecking (glassez)
- - WEBUI: Restore ability to use server-side translation by custom WebUI (glassez)
- - WEBUI: Fix wrong peer number (Chocobo1)
- - LINUX: Improve AppStream metadata (Chocobo1)
-
-Sun Mar 24th 2024 - sledgehammer999 - v4.6.4
- - BUGFIX: Correctly adjust "Add New torrent" dialog position in all the cases (glassez)
- - BUGFIX: Change "metadata received" stop condition behavior (glassez)
- - BUGFIX: Add a small delay before processing the key input of search boxes (Chocobo1)
- - BUGFIX: Ensure the profile path is pointing to a directory (Chocobo1)
- - RSS: Use better icons for RSS articles (glassez)
- - WINDOWS: NSIS: Update French, Hungarian translations (MarcDrieu, foxi69)
- - LINUX: Fix sorting when ICU isn't used (Chocobo1)
- - LINUX: Fix invisible tray icon on Plasma 6 (tehcneko)
-
-Mon Jan 15th 2024 - sledgehammer999 - v4.6.3
- - BUGFIX: Correctly update number of filtered items (glassez)
- - BUGFIX: Don't forget to store Stop condition value (glassez)
- - BUGFIX: Show correctly decoded filename in log (glassez)
- - BUGFIX: Specify a locale if none is set (Chocobo1)
- - BUGFIX: Apply inactive seeding time limit set on new torrents (glassez)
- - BUGFIX: Show URL seeds for torrents that have no metadata (glassez)
- - BUGFIX: Don't get stuck loading on mismatched info-hashes in resume data (glassez)
-
Mon Nov 27th 2023 - sledgehammer999 - v4.6.2
- BUGFIX: Do not apply share limit if the previous one was applied (glassez)
- BUGFIX: Show Add new torrent dialog on main window screen (glassez)
@@ -159,7 +6,7 @@ Mon Nov 27th 2023 - sledgehammer999 - v4.6.2
- WINDOWS: NSIS: Display correct Minimum Windows OS requirement (xavier2k6)
- WINDOWS: NSIS: Add Hebrew translation (avivmu)
- LINUX: WAYLAND: Fix parent widget of "Lock qBittorrent" submenu (Vlad Zahorodnii)
-
+
Mon Nov 20th 2023 - sledgehammer999 - v4.6.1
- FEATURE: Add option to enable previous Add new torrent dialog behavior (glassez)
- BUGFIX: Prevent crash due to race condition when adding magnet link (glassez)
@@ -242,79 +89,7 @@ Sun Oct 22nd 2023 - sledgehammer999 - v4.6.0
- OTHER: Enable DBUS cmake option on FreeBSD (yuri@FreeBSD)
- OTHER: Numerous code improvements and refactorings (glassez, Chocobo1)
-Tue Aug 29 2023 - sledgehammer999 - v4.5.5
- - BUGFIX: Fix transfer list tab hotkey (thalieht)
- - BUGFIX: Don't forget to enable the Apply button in the Options dialog (glassez)
- - BUGFIX: Immediately update torrent status on moving files (glassez)
- - BUGFIX: Improve performance when scrolling the file list of large torrents (gdim47)
- - BUGFIX: Don't operate on random torrents when multiple are selected and a sort/filter is applied (glassez)
- - RSS: Fix overwriting feeds.json with an incomplete load of it (Omar Abdul Azeez)
- - WINDOWS: Software update check logic is disabled for < Win10 (sledgehammer999)
- - WINDOWS: NSIS: Update Turkish and French translations (Burak Yavuz, MarcDrieu)
- - WINDOWS: NSIS: Add Romanian translation (rusu-afanasie)
-
-Sun Jun 18 2023 - sledgehammer999 - v4.5.4
- - BUGFIX: Allow to disable confirmation of Pause/Resume All (glassez)
- - BUGFIX: Sync flag icons with upstream (Priit Uring)
- - WEBUI: Fix category save path (Raymond Ha)
-
-Sun May 28 2023 - sledgehammer999 - v4.5.3
- - BUGFIX: Correctly check if database needs to be updated (glassez)
- - BUGFIX: Prevent incorrect log message about torrent content deletion (glassez)
- - BUGFIX: Improve finished torrent handling (glassez)
- - BUGFIX: Correctly initialize group box children as disabled in Preferences (thalieht)
- - BUGFIX: Don't miss saving "download path" in SQLite storage (glassez)
- - BUGFIX: Improve logging of running external program (glassez)
- - WEBUI: Disable UPnP for web UI by default (glassez)
- - WEBUI: Use workaround for IOS file picker (DivineHawk)
- - WEBUI: Work around Chrome download limit (Chocobo1)
- - WEBUI: Improve 'exporting torrent' behavior (Chocobo1)
- - WINDOWS: NSIS: Add Slovak translation (Christian Danížek)
-
-Tue Feb 28 2023 - sledgehammer999 - v4.5.2
- - BUGFIX: Don't unexpectedly activate queued torrents when prefetching metadata for added magnets (glassez)
- - BUGFIX: Update the cached torrent state once recheck is started (glassez)
- - BUGFIX: Be more likely to allow the system to use power saving modes (glassez)
- - WEBUI: Migrate away from unsafe function (Chocobo1)
- - WEBUI: Blacklist bad ciphers for TLS in the server (sledgehammer999)
- - WEBUI: Allow only TLS 1.2+ in the server (sledgehammer999)
- - WEBUI: Allow to set read-only directory as torrent location (glassez)
- - WEBUI: Reject requests that contain backslash in path (glassez)
- - RSS: Prevent RSS folder from being moved into itself (glassez)
- - WINDOWS: NSIS: Update Turkish, Uzbek translation (Burak Yavuz, shitcod3r)
-
-Sun Feb 12 2023 - sledgehammer999 - v4.5.1
- - FEATURE: Re-allow to use icons from system theme (glassez)
- - BUGFIX: Fix Speed limit icon size (Nowshed H. Imran)
- - BUGFIX: Revise and fix some text colors (Chocobo1, Nowshed H. Imran)
- - BUGFIX: Correctly load folder based UI theme (glassez)
- - BUGFIX: Fix crash due to invalid encoding of tracker URLs (glassez)
- - BUGFIX: Don't drop !qB extension when renaming incomplete file (glassez)
- - BUGFIX: Correctly count the number of torrents in subcategories (glassez)
- - BUGFIX: Use "additional trackers" when metadata retrieving (glassez)
- - BUGFIX: Apply correct tab order to Category options dialog (glassez)
- - BUGFIX: Add all torrents passed via the command line (glassez)
- - BUGFIX: Fix startup performance on Qt5 (glassez)
- - BUGFIX: Automatic move will now overwrite existing files (aka previous behavior) (glassez)
- - BUGFIX: Some fixes for loading Chinese locales (sledgehammer999)
- - BUGFIX: New Pause icon color for toolbar/menu (Nowshed H. Imran, sledgehammer999)
- - BUGFIX: Adjust env variable for PDB discovery (sledgehammer999)
- - WEBUI: Fix missing "queued" icon (thalieht)
- - WEBUI: Return paths using platform-independent separator format (glassez)
- - WEBUI: Change order of accepted types of file input (Jason Carr)
- - WEBUI: Add missing icons (brvphoenix)
- - WEBUI: Add "Resume data storage type" option (thalieht)
- - WEBUI: Make rename file dialog resizable (Torsten Schwarz)
- - WEBUI: Prevent incorrect line breaking (David Xuang)
- - WEBUI: Improve hotkeys (Fidel Selva)
- - WEBUI: Remove suggestions while searching for torrents (Midhun V Nadh)
- - WEBUI: Expose "IS PRIVATE" flag (sotiris-bos)
- - WEBUI: Return name/hash/infohash_v1/infohash_v2 torrent properties (qbittorrentfan)
- - WINDOWS: Correctly detect drive letter in path (glassez)
- - WINDOWS: NSIS: Update Swedish, Lithuanian translations (Jonatan, Deividas)
- - LINUX: Fix tray icon issues (glassez)
-
-Sat Nov 26 2022 - sledgehammer999 - v4.5.0
+Unreleased - sledgehammer999 - v4.5.0
- FEATURE: Add `Auto resize columns` functionality (Chocobo1)
- FEATURE: Allow to use Category paths in `Manual` mode (glassez)
- FEATURE: Allow to disable Automatic mode when default "temp" path changed (glassez)
@@ -396,70 +171,6 @@ Sat Nov 26 2022 - sledgehammer999 - v4.5.0
- MACOS: Fix wrong background color in properties widget (NotTsunami)
- OTHER: Binary distributions of qbittorrent are GPLv3+ licensed (sledgehammer999)
-Tue Aug 30 2022 - sledgehammer999 - v4.4.5
- - BUGFIX: Fix missing trackers when adding magnet link. Affects libtorrent 2.0.x builds. (glassez)
-
-Mon Aug 22 2022 - sledgehammer999 - v4.4.4
- - BUGFIX: Correctly handle data decompression with Qt 6.3 (brvphoenix)
- - BUGFIX: Fix wrong file names displayed in tooltip (Chocobo1)
- - BUGFIX: Fix incorrect "max outgoing port" setting (glassez)
- - BUGFIX: Make working set limit available only on libtorrent 2.0.x builds (summer)
- - BUGFIX: Try to recover missing tags (summer)
- - RSS: Clear RSS parsing error after use (glassez)
- - WEBAPI: Set HTTP method restriction on WebAPI actions (Chocobo1)
- - WINDOWS: Work around application stuttering on Windows (Chocobo1)
- - WINDOWS: NSIS: Update Portuguese, Italian, Korean, Latvian translations(Blackspirits, bovirus, Minseo Lee, Coool)
- - LINUX: Improve D-Bus notifications handling (glassez)
- - MACOS: Open destination folders on macOS in separate thread (Nick Korotysh)
-
-Tue May 24 2022 - sledgehammer999 - v4.4.3.1
- - BUGFIX: Fix broken translations (sledgehammer999)
-
-Sun May 22 2022 - sledgehammer999 - v4.4.3
- - BUGFIX: Correctly handle changing of temp save path (glassez)
- - BUGFIX: Fix storage in SQLite (glassez)
- - BUGFIX: Correctly apply content layout when "Skip hash check" is enabled (glassez)
- - BUGFIX: Don't corrupt IDs of v2 torrents (glassez)
- - BUGFIX: Reduce the number of hashing threads by default (improves hashing speed on HDDs) (summer)
- - BUGFIX: Prevent the "update dialog" from blocking input on other windows (summer)
- - BUGFIX: Add trackers in exported .torrent files (glassez)
- - BUGFIX: Fix wrong GUI behavior in "Optional IP address to bind to" setting (Chocobo1)
- - WEBUI: Fix WebUI crash due to missing tags from config (An0n)
- - WEBUI: Show correct location path (Chocobo1)
- - MACOS: Fix main window freezing after opening a files dialog (glassez)
-
-Tue Mar 22 2022 - sledgehammer999 - v4.4.2
- - FEATURE: Allow to limit max memory working set size (glassez)
- - BUGFIX: Fix UI crash when torrent is in a non-existent category (Kevin Cox)
- - BUGFIX: Correctly handle changing of global save paths (glassez)
- - BUGFIX: Disable performance alert (Chocobo1)
- - BUGFIX: Prevent loading resume data with inconsistent ID (glassez)
- - BUGFIX: Properly handle metadata download for an existing torrent (glassez)
- - BUGFIX: Prevent crash when open torrent destination folder (glassez)
- - WINDOWS: NSIS: Update Spanish, Spanish International and French translations(Juanjo Jiménez, RqndomHax)
-
-Tue Feb 15 2022 - sledgehammer999 - v4.4.1
- - FEATURE: Restore all torrent settings to the torrent's main context menu (thalieht)
- - FEATURE: Add confirmation for enabling Auto TMM from context menu (thalieht)
- - FEATURE: Add tooltip to Automatic Torrent Management context menu action (thalieht)
- - FEATURE: Add Select All/None buttons in new torrent dialog (thalieht)
- - BUGFIX: Keep "torrent info" alive while generate .torrent file (glassez)
- - BUGFIX: Correctly handle Auto TMM in Torrent Files Watcher (glassez)
- - BUGFIX: Correctly track the root folder name change (glassez)
- - BUGFIX: Various fixes to the moving torrent code (glassez)
- - BUGFIX: Update the torrent's download path field when changing category (thalieht)
- - BUGFIX: Correctly handle received metadata (glassez)
- - BUGFIX: Store hybrid torrents using legacy filenames (glassez)
- - BUGFIX: Open correct directory when clicked on Browse button (glassez)
- - BUGFIX: Fix crash when shutting down and clicing on system tray icon (Chocobo1)
- - BUGFIX: Fix "Free space on disk" in new torrent dialog (thalieht)
- - BUGFIX: Optimize completed files handling (Prince Gupta)
- - BUGFIX: Migrate proxy settings (sledgehammer999)
- - BUGFIX: Try to recover missing categories (glassez)
- - WEBUI: WebAPI: fix wrong key used for categories (Chocobo1)
- - WEBUI: Remove hack for outdated IE 6 browser (Chocobo1)
- - RSS: Correctly handle XML parsing errors (glassez)
-
Thu Jan 06 2022 - sledgehammer999 - v4.4.0
- FEATURE: Support for v2 torrents along with libtorrent 2.0.x support (glassez, Chocobo1)
- FEATURE: Support for Qt6 (glassez)
diff --git a/INSTALL b/INSTALL
index b17e323fb..328eeed5e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -3,22 +3,22 @@ qBittorrent - A BitTorrent client in C++ / Qt
1) Install these dependencies:
- - Boost >= 1.76
+ - Boost >= 1.71
- - libtorrent-rasterbar 1.2.19 - 1.2.x || 2.0.10 - 2.0.x
+ - libtorrent-rasterbar 1.2.19 - 1.2.x || 2.0.9 - 2.0.x
* By Arvid Norberg, https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name
- - OpenSSL >= 3.0.2
+ - OpenSSL >= 1.1.1
- - Qt 6.6.0 - 6.x
+ - Qt 5.15.2 - 5.x || 6.2.0 - 6.x
- zlib >= 1.2.11
- - CMake >= 3.16
- * Compile-time only
+ - pkg-config *
+ * Compile-time only on *nix systems
- - Python >= 3.9.0
+ - Python >= 3.7.0
* Optional, run-time only
* Used by the bundled search engine
@@ -28,18 +28,16 @@ Please ensure you are building with an officially supported configuration when r
2a) Compile and install qBittorrent with Qt graphical interface
- $ cmake -B build -DCMAKE_BUILD_TYPE=Release
- $ cmake --build build
- $ cmake --install build
+ $ ./configure
+ $ make && make install
$ qbittorrent
will install and execute qBittorrent.
2b) Compile and install qBittorrent without Qt graphical interface
- $ cmake -B build -DCMAKE_BUILD_TYPE=Release -DGUI=OFF
- $ cmake --build build
- $ cmake --install build
+ $ ./configure --disable-gui
+ $ make && make install
$ qbittorrent-nox
will install and execute qBittorrent.
diff --git a/README.md b/README.md
index d3054bbf2..45c57956f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
qBittorrent - A BitTorrent client in Qt
------------------------------------------
-[](https://github.com/qbittorrent/qBittorrent/actions)
+[](https://ci.appveyor.com/project/qbittorrent/qBittorrent)
+[](https://github.com/qbittorrent/qBittorrent/actions)
[](https://scan.coverity.com/projects/5494)
********************************
### Description:
@@ -15,8 +16,15 @@ support as well as many features.
The free [IP to Country Lite database](https://db-ip.com/db/download/ip-to-country-lite) by [DB-IP](https://db-ip.com/) is used for resolving the countries of peers. The database is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
### Installation:
+For installation, follow the instructions from INSTALL file, but simple:
-Refer to the [INSTALL](INSTALL) file.
+```
+./configure
+make && make install
+qbittorrent
+```
+
+will install and execute qBittorrent hopefully without any problem.
### Public key:
Starting from v3.3.4 all source tarballs and binaries are signed.
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index 6c931a30c..000000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Security Policy
-
-qBittorrent takes the security of our software seriously, including all source code repositories managed through our GitHub organisation.
-If you believe you have found a security vulnerability in qBittorrent, please report it to us as described below.
-
-## Reporting Security Issues
-
-Please do not report security vulnerabilities through public GitHub issues. Instead, please use GitHubs private vulnerability reporting functionality associated to this repository. Additionally, you may email us with all security-related inquiries and notifications at `security@qbittorrent.org`.
-
-Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
-1. Type of issue
-2. Step-by-step instructions to reproduce the issue
-3. Proof-of-concept or exploit code (if possible)
-4. Potential impact of the issue, including how an attacker might exploit the issue
-
-This information will help us triage your report more quickly. Any and all CVEs will be requested and issued through GitHubs private vulnerability reporting functionality, which will be published alongside the disclosure.
-
-This security policy only applies to the most recent stable branch of qBittorrent. Flaws in old versions that are not present in the current stable branch will not be fixed.
diff --git a/WebAPI_Changelog.md b/WebAPI_Changelog.md
deleted file mode 100644
index 2cb5fe033..000000000
--- a/WebAPI_Changelog.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# WebAPI Changelog
-
-## 2.13.0
-* [#23045](https://github.com/qbittorrent/qBittorrent/pull/23045)
- * `torrents/trackers` returns three new fields: `next_announce`, `min_announce` and `endpoints`
- * `endpoints` is an array of tracker endpoints, each with `name`, `updating`, `status`, `msg`, `bt_version`, `num_peers`, `num_peers`, `num_leeches`, `num_downloaded`, `next_announce` and `min_announce` fields
- * `torrents/trackers` now returns `5` and `6` in `status` field as possible values
- * `5` for `Tracker error` and `6` for `Unreachable`
-* [#22963](https://github.com/qbittorrent/qBittorrent/pull/22963)
- * `torrents/editTracker` endpoint now supports setting a tracker's tier via `tier` parameter
- * `torrents/editTracker` endpoint always responds with a 204 when successful
- * `torrents/editTracker` endpoint `origUrl` parameter renamed to `url`
-
-## 2.12.1
-* [#23031](https://github.com/qbittorrent/qBittorrent/pull/23031)
- * Add `torrents/setComment` endpoint with parameters `hashes` and `comment` for setting a new torrent comment
-
-## 2.12.0
-
-* [#22989](https://github.com/qbittorrent/qBittorrent/pull/22989)
- * `sync/maindata` returns one new field: `share_limit_action`
- * `torrents/setShareLimits` now requires a new `shareLimitAction` param that sets a torrent's shareLimitAction property
- * possible values `Default`, `Stop`, `Remove`, `RemoveWithContent` and `EnableSuperSeeding`
-
-## 2.11.10
-
-* [#22958](https://github.com/qbittorrent/qBittorrent/pull/22958)
- * `torrents/categories` and `sync/maindata` now serialize categories' `downloadPath` to `null`, rather than `undefined`
-* [#22954](https://github.com/qbittorrent/qBittorrent/pull/22954)
- * `torrents/reannounce` supports specifying individual trackers via `trackers` field
-
-## 2.11.9
-
-* [#21015](https://github.com/qbittorrent/qBittorrent/pull/21015)
- * Add `torrents/fetchMetadata` endpoint for retrieving torrent metadata associated with a URL
- * Add `torrents/parseMetadata` endpoint for retrieving torrent metadata associated with a .torrent file
- * Add `torrents/saveMetadata` endpoint for saving retrieved torrent metadata to a .torrent file
- * `torrents/add` allows adding a torrent with metadata previously retrieved via `torrents/fetchMetadata` or `torrents/parseMetadata`
- * `torrents/add` allows specifying a torrent's file priorities
-* [#22698](https://github.com/qbittorrent/qBittorrent/pull/22698)
- * `torrents/addTrackers` and `torrents/removeTrackers` now accept `hash=all` and adds/removes the tracker to/from *all* torrents
- * For compatibility, `torrents/removeTrackers` still accepts `hash=*` internally we transform it into `all`
- * Allow passing a pipe (`|`) separated list of hashes in `hash` for `torrents/addTrackers` and `torrents/removeTrackers`
-
-## 2.11.8
-
-* [#21349](https://github.com/qbittorrent/qBittorrent/pull/21349)
- * Handle sending `204 No Content` status code when response contains no data
- * Some endpoints still return `200 OK` to ensure smooth transition
-* [#22750](https://github.com/qbittorrent/qBittorrent/pull/22750)
- * `torrents/info` allows an optional parameter `includeFiles` that defaults to `false`
- * Each torrent will contain a new key `files` which will list all files similar to the `torrents/files` endpoint
-* [#22813](https://github.com/qbittorrent/qBittorrent/pull/22813)
- * `app/getDirectoryContent` allows an optional parameter `withMetadata` to send file metadata
- * Fields are `name`, `type`, `size`, `creation_date`, `last_access_date`, `last_modification_date`
- * See PR for TypeScript types
-
-## 2.11.7
-
-* [#22166](https://github.com/qbittorrent/qBittorrent/pull/22166)
- * `sync/maindata` returns 3 new torrent fields: `has_tracker_warning`, `has_tracker_error`, `has_other_announce_error`
-
-## 2.11.6
-
-* [#22460](https://github.com/qbittorrent/qBittorrent/pull/22460)
- * `app/setPreferences` allows only one of `max_ratio_enabled`, `max_ratio` to be present
- * `app/setPreferences` allows only one of `max_seeding_time_enabled`, `max_seeding_time` to be present
- * `app/setPreferences` allows only one of `max_inactive_seeding_time_enabled`, `max_inactive_seeding_time` to be present
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 000000000..f005e2ec8
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+aclocal -I m4
+autoconf
diff --git a/build-aux/compile b/build-aux/compile
new file mode 100755
index 000000000..99e50524b
--- /dev/null
+++ b/build-aux/compile
@@ -0,0 +1,348 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Written by Tom Tromey .
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to or send patches to
+# .
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to .
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/config.guess b/build-aux/config.guess
new file mode 100755
index 000000000..7f9ebbe31
--- /dev/null
+++ b/build-aux/config.guess
@@ -0,0 +1,1665 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-09-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see .
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to .
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$driver"
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "$UNAME_SYSTEM" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
+ echo unknown)`
+ case "$UNAME_MACHINE_ARCH" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
+ ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "$UNAME_VERSION" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "$machine-${os}${release}${abi-}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
+ exit ;;
+ *:SolidBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+ exit ;;
+ *:OS108:*:*)
+ echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:MirBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:Sortix:*:*)
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Twizzler:*:*)
+ echo "$UNAME_MACHINE"-unknown-twizzler
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix"$UNAME_RELEASE"
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux"$UNAME_RELEASE"
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ ;;
+ sun4)
+ echo sparc-sun-sunos"$UNAME_RELEASE"
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint"$UNAME_RELEASE"
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint"$UNAME_RELEASE"
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint"$UNAME_RELEASE"
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos"$UNAME_RELEASE"
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+ then
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
+ then
+ echo m88k-dg-dgux"$UNAME_RELEASE"
+ else
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+ fi
+ else
+ echo i586-dg-dgux"$UNAME_RELEASE"
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ fi
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ fi
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "$sc_cpu_version" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "$sc_kernel_bits" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "$HP_ARCH" = "" ]; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ "$HP_ARCH" = hppa2.0w ]
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
+ exit ;;
+ 3050*:HI-UX:*:*)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo "$UNAME_MACHINE"-unknown-osf1mk
+ else
+ echo "$UNAME_MACHINE"-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ *:BSD/OS:*:*)
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+ else
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+ fi
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case "$UNAME_PROCESSOR" in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
+ i*:CYGWIN*:*)
+ echo "$UNAME_MACHINE"-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo "$UNAME_MACHINE"-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo "$UNAME_MACHINE"-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo "$UNAME_MACHINE"-pc-msys
+ exit ;;
+ i*:PW*:*)
+ echo "$UNAME_MACHINE"-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case "$UNAME_MACHINE" in
+ x86)
+ echo i586-pc-interix"$UNAME_RELEASE"
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ esac ;;
+ i*:UWIN*:*)
+ echo "$UNAME_MACHINE"-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-pc-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
+ exit ;;
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+ else
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ cris:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ crisv32:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ e2k:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ frv:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ hexagon:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
+ ia64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ k1om:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m32r*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m68*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ MIPS_ENDIAN=el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ MIPS_ENDIAN=
+ #else
+ MIPS_ENDIAN=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-"$LIBC"
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-"$LIBC"
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-"$LIBC"
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-"$LIBC"
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-"$LIBC"
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-"$LIBC"
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
+ exit ;;
+ sh64*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sh*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ tile*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ vax:Linux:*:*)
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
+ exit ;;
+ x86_64:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo "$UNAME_MACHINE"-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo "$UNAME_MACHINE"-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo "$UNAME_MACHINE"-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo "$UNAME_MACHINE"-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ i*86:*DOS:*:*)
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv"$UNAME_RELEASE"
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo "$UNAME_MACHINE"-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo "$UNAME_MACHINE"-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux"$UNAME_RELEASE"
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv"$UNAME_RELEASE"
+ else
+ echo mips-unknown-sysv"$UNAME_RELEASE"
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ *:Rhapsody:*:*)
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
+ fi
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
+ fi
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ # shellcheck disable=SC2154
+ if test "$cputype" = 386; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo "$UNAME_MACHINE"-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux"$UNAME_RELEASE"
+ exit ;;
+ *:DragonFly:*:*)
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "$UNAME_MACHINE" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
+ exit ;;
+ i*86:rdos:*:*)
+ echo "$UNAME_MACHINE"-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo "$UNAME_MACHINE"-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo "$UNAME_MACHINE"-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
+ *:Unleashed:*:*)
+ echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
+ exit ;;
+esac
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <
+#include
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <&2 </dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/config.sub b/build-aux/config.sub
new file mode 100755
index 000000000..0f2234c17
--- /dev/null
+++ b/build-aux/config.sub
@@ -0,0 +1,1793 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-06-30'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see .
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to .
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo "$1"
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+IFS="-" read field1 field2 field3 field4 <&2
+ exit 1
+ ;;
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
+ ;;
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300 | hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
+ ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
+ ;;
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ ibm*)
+ cpu=i370
+ vendor=ibm
+ ;;
+ orion105)
+ cpu=clipper
+ vendor=highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
+ ;;
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
+ ;;
+
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ cpu=m68000
+ vendor=att
+ ;;
+ 3b*)
+ cpu=we32k
+ vendor=att
+ ;;
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ os=cnk
+ ;;
+ decsystem10* | dec10*)
+ cpu=pdp10
+ vendor=dec
+ os=tops10
+ ;;
+ decsystem20* | dec20*)
+ cpu=pdp10
+ vendor=dec
+ os=tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ os=sysv3
+ ;;
+ encore | umax | mmax)
+ cpu=ns32k
+ vendor=encore
+ ;;
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ os=${os:-bsd}
+ ;;
+ fx2800)
+ cpu=i860
+ vendor=alliant
+ ;;
+ genix)
+ cpu=ns32k
+ vendor=ns
+ ;;
+ h3050r* | hiux*)
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ cpu=m68000
+ vendor=hp
+ ;;
+ hp9k3[2-9][0-9])
+ cpu=m68k
+ vendor=hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ i*86v32)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv32
+ ;;
+ i*86v4*)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv4
+ ;;
+ i*86v)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv
+ ;;
+ i*86sol2)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=solaris2
+ ;;
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ os=${os:-unicos}
+ ;;
+ iris | iris4d)
+ cpu=mips
+ vendor=sgi
+ case $os in
+ irix*)
+ ;;
+ *)
+ os=irix4
+ ;;
+ esac
+ ;;
+ miniframe)
+ cpu=m68000
+ vendor=convergent
+ ;;
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ os=mint
+ ;;
+ news-3600 | risc-news)
+ cpu=mips
+ vendor=sony
+ os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $os in
+ openstep*)
+ ;;
+ nextstep*)
+ ;;
+ ns2*)
+ os=nextstep2
+ ;;
+ *)
+ os=nextstep3
+ ;;
+ esac
+ ;;
+ np1)
+ cpu=np1
+ vendor=gould
+ ;;
+ op50n-* | op60c-*)
+ cpu=hppa1.1
+ vendor=oki
+ os=proelf
+ ;;
+ pa-hitachi)
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
+ ;;
+ pbd)
+ cpu=sparc
+ vendor=tti
+ ;;
+ pbb)
+ cpu=m68k
+ vendor=tti
+ ;;
+ pc532)
+ cpu=ns32k
+ vendor=pc532
+ ;;
+ pn)
+ cpu=pn
+ vendor=gould
+ ;;
+ power)
+ cpu=power
+ vendor=ibm
+ ;;
+ ps2)
+ cpu=i386
+ vendor=ibm
+ ;;
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
+ ;;
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
+ ;;
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ os=${os:-elf}
+ ;;
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ os=vxworks
+ ;;
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
+ ;;
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
+ ;;
+ w65)
+ cpu=w65
+ vendor=wdc
+ ;;
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ os=proelf
+ ;;
+ none)
+ cpu=none
+ vendor=none
+ ;;
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
+ ;;
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ IFS="-" read cpu vendor <&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+ digital*)
+ vendor=dec
+ ;;
+ commodore*)
+ vendor=cbm
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x$os != x ]
+then
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ solaris)
+ os=solaris2
+ ;;
+ unixware*)
+ os=sysv4.2uw
+ ;;
+ gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ qnx*)
+ case $cpu in
+ x86 | i*86)
+ ;;
+ *)
+ os=nto-$os
+ ;;
+ esac
+ ;;
+ hiux*)
+ os=hiuxwe2
+ ;;
+ nto-qnx*)
+ ;;
+ nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
+ ;;
+ linux-dietlibc)
+ os=linux-dietlibc
+ ;;
+ linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
+ ;;
+ opened*)
+ os=openedition
+ ;;
+ os400*)
+ os=os400
+ ;;
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ ;;
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ ;;
+ wince*)
+ os=wince
+ ;;
+ utek*)
+ os=bsd
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ tpf*)
+ os=tpf
+ ;;
+ triton*)
+ os=sysv3
+ ;;
+ oss*)
+ os=sysv3
+ ;;
+ svr4*)
+ os=sysv4
+ ;;
+ svr3)
+ os=sysv3
+ ;;
+ sysvr4)
+ os=sysv4
+ ;;
+ # This must come after sysvr4.
+ sysv*)
+ ;;
+ ose*)
+ os=ose
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
+ ;;
+ zvmoe)
+ os=zvmoe
+ ;;
+ dicos*)
+ os=dicos
+ ;;
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
+ ;;
+ nacl*)
+ ;;
+ ios)
+ ;;
+ none)
+ ;;
+ *-eabi)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ os=linux
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=tops20
+ ;;
+ pdp11-*)
+ os=none
+ ;;
+ *-dec | vax-*)
+ os=ultrix4.2
+ ;;
+ m68*-apollo)
+ os=domain
+ ;;
+ i386-sun)
+ os=sunos4.0.2
+ ;;
+ m68000-sun)
+ os=sunos3
+ ;;
+ m68*-cisco)
+ os=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=sysv
+ ;;
+ *-cbm)
+ os=amigaos
+ ;;
+ *-dg)
+ os=dgux
+ ;;
+ *-dolphin)
+ os=sysv3
+ ;;
+ m68k-ccur)
+ os=rtu
+ ;;
+ m88k-omron*)
+ os=luna
+ ;;
+ *-next)
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
+ ;;
+ *-gould)
+ os=sysv
+ ;;
+ *-highlevel)
+ os=bsd
+ ;;
+ *-encore)
+ os=bsd
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+case $vendor in
+ unknown)
+ case $os in
+ riscix*)
+ vendor=acorn
+ ;;
+ sunos*)
+ vendor=sun
+ ;;
+ cnk*|-aix*)
+ vendor=ibm
+ ;;
+ beos*)
+ vendor=be
+ ;;
+ hpux*)
+ vendor=hp
+ ;;
+ mpeix*)
+ vendor=hp
+ ;;
+ hiux*)
+ vendor=hitachi
+ ;;
+ unos*)
+ vendor=crds
+ ;;
+ dgux*)
+ vendor=dg
+ ;;
+ luna*)
+ vendor=omron
+ ;;
+ genix*)
+ vendor=ns
+ ;;
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
+ vendor=ibm
+ ;;
+ os400*)
+ vendor=ibm
+ ;;
+ ptx*)
+ vendor=sequent
+ ;;
+ tpf*)
+ vendor=ibm
+ ;;
+ vxsim* | vxworks* | windiss*)
+ vendor=wrs
+ ;;
+ aux*)
+ vendor=apple
+ ;;
+ hms*)
+ vendor=hitachi
+ ;;
+ mpw* | macos*)
+ vendor=apple
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ vendor=atari
+ ;;
+ vos*)
+ vendor=stratus
+ ;;
+ esac
+ ;;
+esac
+
+echo "$cpu-$vendor-$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/install-sh b/build-aux/install-sh
new file mode 100755
index 000000000..8175c640f
--- /dev/null
+++ b/build-aux/install-sh
@@ -0,0 +1,518 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2018-03-11.20; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ # Note that $RANDOM variable is not portable (e.g. dash); Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p' feature.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/missing b/build-aux/missing
new file mode 100755
index 000000000..625aeb118
--- /dev/null
+++ b/build-aux/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard , 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to ."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/cmake/Modules/CheckPackages.cmake b/cmake/Modules/CheckPackages.cmake
index 6b082ea11..672cbd9d2 100644
--- a/cmake/Modules/CheckPackages.cmake
+++ b/cmake/Modules/CheckPackages.cmake
@@ -46,14 +46,22 @@ set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH)
find_package(Boost ${minBoostVersion} REQUIRED)
find_package(OpenSSL ${minOpenSSLVersion} REQUIRED)
find_package(ZLIB ${minZlibVersion} REQUIRED)
-find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
-if (Qt6_FOUND AND (Qt6_VERSION VERSION_GREATER_EQUAL 6.10))
- find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS CorePrivate)
-endif()
-if (DBUS)
- find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS DBus)
- set_package_properties(Qt6DBus PROPERTIES
- DESCRIPTION "Qt6 module for inter-process communication over the D-Bus protocol"
- PURPOSE "Required by the DBUS feature"
- )
+if (QT6)
+ find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
+ if (DBUS)
+ find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS DBus)
+ set_package_properties(Qt6DBus PROPERTIES
+ DESCRIPTION "Qt6 module for inter-process communication over the D-Bus protocol"
+ PURPOSE "Required by the DBUS feature"
+ )
+ endif()
+else()
+ find_package(Qt5 ${minQt5Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
+ if (DBUS)
+ find_package(Qt5 ${minQt5Version} REQUIRED COMPONENTS DBus)
+ set_package_properties(Qt5DBus PROPERTIES
+ DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol"
+ PURPOSE "Required by the DBUS feature"
+ )
+ endif()
endif()
diff --git a/cmake/Modules/CommonConfig.cmake b/cmake/Modules/CommonConfig.cmake
index b66019fd6..57072e594 100644
--- a/cmake/Modules/CommonConfig.cmake
+++ b/cmake/Modules/CommonConfig.cmake
@@ -8,23 +8,22 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTORCC_OPTIONS --compress-algo best --threshold 5)
+set(CMAKE_AUTORCC_OPTIONS --compress 9 --threshold 5)
add_library(qbt_common_cfg INTERFACE)
-# C++ 20 support is required
+# Full C++ 17 support is required
# See also https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
# for a breakdown of the features that CMake recognizes for each C++ standard
target_compile_features(qbt_common_cfg INTERFACE
- cxx_std_20
+ cxx_std_17
)
target_compile_definitions(qbt_common_cfg INTERFACE
- QT_DISABLE_DEPRECATED_UP_TO=0x060600
+ QT_DISABLE_DEPRECATED_BEFORE=0x050f02
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
- QT_NO_CONTEXTLESS_CONNECT
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
QT_USE_QSTRINGBUILDER
QT_STRICT_ITERATORS
@@ -39,9 +38,9 @@ endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(qbt_common_cfg INTERFACE
- NTDDI_VERSION=0x0A000006
- _WIN32_WINNT=0x0A00
- _WIN32_IE=0x0A00
+ NTDDI_VERSION=0x06010000
+ _WIN32_WINNT=0x0601
+ _WIN32_IE=0x0601
WIN32_LEAN_AND_MEAN
NOMINMAX
UNICODE
@@ -84,13 +83,12 @@ endif()
if (MSVC)
target_compile_options(qbt_common_cfg INTERFACE
/guard:cf
- /permissive-
/utf-8
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
/Zc:__cplusplus
)
target_link_options(qbt_common_cfg INTERFACE
- /GUARD:CF
+ /guard:cf
$<$>:/OPT:REF /OPT:ICF>
# suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON
$<$:/INCREMENTAL:NO>
diff --git a/conf.pri.in b/conf.pri.in
new file mode 100644
index 000000000..1a9e84335
--- /dev/null
+++ b/conf.pri.in
@@ -0,0 +1,26 @@
+# @configure_input@
+
+PREFIX = @EXPAND_PREFIX@
+BINDIR = @EXPAND_BINDIR@
+DATADIR = @EXPAND_DATADIR@
+MANPREFIX = @EXPAND_MANDIR@
+
+QMAKE_CC = @QBT_CC@
+QMAKE_CXX = @QBT_CXX@
+QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@
+
+EXTERNAL_INCLUDES = @QBT_CONF_INCLUDES@
+EXTERNAL_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
+# added /usr/local/include due to Qt 5.7.0 bug on macOS
+macx: EXTERNAL_INCLUDES += "/usr/local/include"
+INCLUDEPATH += $$EXTERNAL_INCLUDES
+
+EXTERNAL_LIBS = @LDFLAGS@ @LIBS@
+EXTERNAL_LIBS -= $$QMAKE_DEFAULT_LIBDIRS
+LIBS += $$EXTERNAL_LIBS
+
+CONFIG += @QBT_ADD_CONFIG@
+CONFIG -= @QBT_REMOVE_CONFIG@
+
+DEFINES += @QBT_ADD_DEFINES@
+DEFINES -= @QBT_REMOVE_DEFINES@
diff --git a/conf.pri.windows b/conf.pri.windows
new file mode 100644
index 000000000..0b845b618
--- /dev/null
+++ b/conf.pri.windows
@@ -0,0 +1,58 @@
+# Adapt these paths
+# Point these to the include folders
+INCLUDEPATH += $$quote(C:/qBittorrent/boost)
+INCLUDEPATH += $$quote(C:/qBittorrent/libtorrent/include)
+INCLUDEPATH += $$quote(C:/qBittorrent/zlib/include)
+INCLUDEPATH += $$quote(C:/qBittorrent/openssl/include)
+# Point these to the lib folders
+LIBS += $$quote(-LC:/qBittorrent/boost/stage/lib)
+LIBS += $$quote(-LC:/qBittorrent/libtorrent/lib)
+LIBS += $$quote(-LC:/qBittorrent/zlib/lib)
+LIBS += $$quote(-LC:/qBittorrent/openssl/lib)
+
+# Adapt the lib names/versions accordingly
+# If you want to use Boost auto-linking then disable
+# BOOST_ALL_NO_LIB below and omit Boost libraries here
+LIBS += libcrypto.lib libssl.lib libtorrent.lib zlib.lib
+CONFIG(debug, debug|release) {
+ LIBS += boost_system-vc140-mt-d.lib
+}
+else {
+ LIBS += boost_system-vc140-mt.lib
+}
+
+# ...or if you use MinGW
+#LIBS += libcrypto libssl libz
+#CONFIG(debug, debug|release) {
+# LIBS += libtorrent-rasterbar \
+# libboost_system-mt
+#}
+#else {
+# LIBS += libtorrent-rasterbar \
+# libboost_system-mt
+#}
+
+# Disable to use Boost auto-linking
+DEFINES += BOOST_ALL_NO_LIB
+# Use one of the following options
+DEFINES += BOOST_SYSTEM_STATIC_LINK
+#DEFINES += BOOST_SYSTEM_DYN_LINK
+# Enable it if compiling with libtorrent 3.x
+#DEFINES += BOOST_SYSTEM_USE_UTF8
+
+# Enable if libtorrent was built with this flag defined
+#DEFINES += TORRENT_NO_DEPRECATE
+# Enable if linking dynamically against libtorrent
+#DEFINES += TORRENT_LINKING_SHARED
+
+# Enable this if compiling with libtorrent 2.x
+#DEFINES += QBT_USES_LIBTORRENT2
+
+# Enable stack trace support
+CONFIG += stacktrace
+
+win32-msvc* {
+ QMAKE_CXXFLAGS += "/guard:cf"
+ QMAKE_LFLAGS += "/guard:cf"
+ QMAKE_LFLAGS_RELEASE += "/OPT:REF /OPT:ICF"
+}
diff --git a/configure b/configure
new file mode 100755
index 000000000..6da002afc
--- /dev/null
+++ b/configure
@@ -0,0 +1,7999 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.2.
+#
+# Report bugs to .
+#
+#
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else \$as_nop
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
+
+else \$as_nop
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null
+then :
+ as_have_required=yes
+else $as_nop
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
+
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
+
+
+ if test "x$CONFIG_SHELL" != x
+then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
+$0: bugs.qbittorrent.org about your system, including any
+$0: error possibly output before this message. Then install
+$0: a modern shell, or manually run the script under such a
+$0: shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 &1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='qbittorrent'
+PACKAGE_TARNAME='qbittorrent'
+PACKAGE_VERSION='v4.6.2'
+PACKAGE_STRING='qbittorrent v4.6.2'
+PACKAGE_BUGREPORT='bugs.qbittorrent.org'
+PACKAGE_URL='https://www.qbittorrent.org/'
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+QBT_REMOVE_DEFINES
+QBT_ADD_DEFINES
+QBT_REMOVE_CONFIG
+QBT_ADD_CONFIG
+QBT_CONF_EXTRA_CFLAGS
+QBT_CONF_INCLUDES
+QBT_CXX
+QBT_CC
+EXPAND_MANDIR
+EXPAND_DATADIR
+EXPAND_BINDIR
+EXPAND_PREFIX
+zlib_LIBS
+zlib_CFLAGS
+openssl_LIBS
+openssl_CFLAGS
+libtorrent_LIBS
+libtorrent_CFLAGS
+BOOST_LDFLAGS
+BOOST_CPPFLAGS
+Qt5Svg_LIBS
+Qt5Svg_CFLAGS
+QT_QMAKE
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__include
+DEPDIR
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+SED
+ac_ct_CXX
+CXXFLAGS
+CXX
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL
+am__quote'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_silent_rules
+enable_debug
+enable_stacktrace
+enable_gui
+enable_systemd
+enable_webui
+enable_qt_dbus
+with_boost
+with_boost_libdir
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+QT_QMAKE
+Qt5Svg_CFLAGS
+Qt5Svg_LIBS
+libtorrent_CFLAGS
+libtorrent_LIBS
+openssl_CFLAGS
+openssl_LIBS
+zlib_CFLAGS
+zlib_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures qbittorrent v4.6.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/qbittorrent]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of qbittorrent v4.6.2:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-debug Enable debug build
+ --enable-stacktrace Enable stacktrace feature (default=auto)
+ --disable-gui Disable the GUI for headless running. Disables
+ QtDBus and the GeoIP Database.
+ --enable-systemd Install the systemd service file (headless only).
+ --disable-webui Disable the WebUI.
+ --disable-qt-dbus Disable use of QtDBus (GUI only)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-boost[=ARG] use Boost library from a standard location
+ (ARG=yes), from the specified location (ARG=),
+ or disable it (ARG=no) [ARG=yes]
+ --with-boost-libdir=LIB_DIR
+ Force given directory for boost libraries. Note that
+ this will override library path detection, so use
+ this parameter only if default library detection
+ fails and you know exactly where your boost
+ libraries are located.
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L if you have libraries in a
+ nonstandard directory
+ LIBS libraries to pass to the linker, e.g. -l
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if
+ you have headers in a nonstandard directory
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ QT_QMAKE value of host_bins for Qt5Core >= 5.15.2, overriding pkg-config
+ Qt5Svg_CFLAGS
+ C compiler flags for Qt5Svg, overriding pkg-config
+ Qt5Svg_LIBS linker flags for Qt5Svg, overriding pkg-config
+ libtorrent_CFLAGS
+ C compiler flags for libtorrent, overriding pkg-config
+ libtorrent_LIBS
+ linker flags for libtorrent, overriding pkg-config
+ openssl_CFLAGS
+ C compiler flags for openssl, overriding pkg-config
+ openssl_LIBS
+ linker flags for openssl, overriding pkg-config
+ zlib_CFLAGS C compiler flags for zlib, overriding pkg-config
+ zlib_LIBS linker flags for zlib, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to .
+qbittorrent home page: .
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+qbittorrent configure v4.6.2
+generated by GNU Autoconf 2.71
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by qbittorrent $as_me v4.6.2, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ $ $0$ac_configure_args_raw
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ printf "%s\n" "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ printf "%s\n" "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ printf "%s\n" "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ printf "%s\n" "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+printf "%s\n" "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ ac_site_files="$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
+else
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+fi
+
+for ac_site_file in $ac_site_files
+do
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include
+#include
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+# Test code for whether the C++ compiler supports C++98 (global declarations)
+ac_cxx_conftest_cxx98_globals='
+// Does the compiler advertise C++98 conformance?
+#if !defined __cplusplus || __cplusplus < 199711L
+# error "Compiler does not advertise C++98 conformance"
+#endif
+
+// These inclusions are to reject old compilers that
+// lack the unsuffixed header files.
+#include
+#include
+
+// and are *not* freestanding headers in C++98.
+extern void assert (int);
+namespace std {
+ extern int strcmp (const char *, const char *);
+}
+
+// Namespaces, exceptions, and templates were all added after "C++ 2.0".
+using std::exception;
+using std::strcmp;
+
+namespace {
+
+void test_exception_syntax()
+{
+ try {
+ throw "test";
+ } catch (const char *s) {
+ // Extra parentheses suppress a warning when building autoconf itself,
+ // due to lint rules shared with more typical C programs.
+ assert (!(strcmp) (s, "test"));
+ }
+}
+
+template struct test_template
+{
+ T const val;
+ explicit test_template(T t) : val(t) {}
+ template T add(U u) { return static_cast(u) + val; }
+};
+
+} // anonymous namespace
+'
+
+# Test code for whether the C++ compiler supports C++98 (body of main)
+ac_cxx_conftest_cxx98_main='
+ assert (argc);
+ assert (! argv[0]);
+{
+ test_exception_syntax ();
+ test_template tt (2.0);
+ assert (tt.add (4) == 6.0);
+ assert (true && !false);
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (global declarations)
+ac_cxx_conftest_cxx11_globals='
+// Does the compiler advertise C++ 2011 conformance?
+#if !defined __cplusplus || __cplusplus < 201103L
+# error "Compiler does not advertise C++11 conformance"
+#endif
+
+namespace cxx11test
+{
+ constexpr int get_val() { return 20; }
+
+ struct testinit
+ {
+ int i;
+ double d;
+ };
+
+ class delegate
+ {
+ public:
+ delegate(int n) : n(n) {}
+ delegate(): delegate(2354) {}
+
+ virtual int getval() { return this->n; };
+ protected:
+ int n;
+ };
+
+ class overridden : public delegate
+ {
+ public:
+ overridden(int n): delegate(n) {}
+ virtual int getval() override final { return this->n * 2; }
+ };
+
+ class nocopy
+ {
+ public:
+ nocopy(int i): i(i) {}
+ nocopy() = default;
+ nocopy(const nocopy&) = delete;
+ nocopy & operator=(const nocopy&) = delete;
+ private:
+ int i;
+ };
+
+ // for testing lambda expressions
+ template Ret eval(Fn f, Ret v)
+ {
+ return f(v);
+ }
+
+ // for testing variadic templates and trailing return types
+ template auto sum(V first) -> V
+ {
+ return first;
+ }
+ template auto sum(V first, Args... rest) -> V
+ {
+ return first + sum(rest...);
+ }
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (body of main)
+ac_cxx_conftest_cxx11_main='
+{
+ // Test auto and decltype
+ auto a1 = 6538;
+ auto a2 = 48573953.4;
+ auto a3 = "String literal";
+
+ int total = 0;
+ for (auto i = a3; *i; ++i) { total += *i; }
+
+ decltype(a2) a4 = 34895.034;
+}
+{
+ // Test constexpr
+ short sa[cxx11test::get_val()] = { 0 };
+}
+{
+ // Test initializer lists
+ cxx11test::testinit il = { 4323, 435234.23544 };
+}
+{
+ // Test range-based for
+ int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
+ 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
+ for (auto &x : array) { x += 23; }
+}
+{
+ // Test lambda expressions
+ using cxx11test::eval;
+ assert (eval ([](int x) { return x*2; }, 21) == 42);
+ double d = 2.0;
+ assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
+ assert (d == 5.0);
+ assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
+ assert (d == 5.0);
+}
+{
+ // Test use of variadic templates
+ using cxx11test::sum;
+ auto a = sum(1);
+ auto b = sum(1, 2);
+ auto c = sum(1.0, 2.0, 3.0);
+}
+{
+ // Test constructor delegation
+ cxx11test::delegate d1;
+ cxx11test::delegate d2();
+ cxx11test::delegate d3(45);
+}
+{
+ // Test override and final
+ cxx11test::overridden o1(55464);
+}
+{
+ // Test nullptr
+ char *c = nullptr;
+}
+{
+ // Test template brackets
+ test_template<::test_template> v(test_template(12));
+}
+{
+ // Unicode literals
+ char const *utf8 = u8"UTF-8 string \u2500";
+ char16_t const *utf16 = u"UTF-8 string \u2500";
+ char32_t const *utf32 = U"UTF-32 string \u2500";
+}
+'
+
+# Test code for whether the C compiler supports C++11 (complete).
+ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
+${ac_cxx_conftest_cxx11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ ${ac_cxx_conftest_cxx11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C++98 (complete).
+ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ return ok;
+}
+"
+
+
+# Auxiliary files required by this configure script.
+ac_aux_files="missing install-sh config.guess config.sub compile"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/build-aux"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+: ${CFLAGS=""}
+: ${CXXFLAGS=""}
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else $as_nop
+ ac_file=''
+fi
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main (void)
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+printf "%s\n" "$CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+printf "%s\n" "$ac_ct_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
+printf %s "checking whether the compiler supports GNU C++... " >&6; }
+if test ${ac_cv_cxx_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+y}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+printf %s "checking whether $CXX accepts -g... " >&6; }
+if test ${ac_cv_prog_cxx_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+else $as_nop
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
+if test $ac_test_CXXFLAGS; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_prog_cxx_stdcxx=no
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
+printf %s "checking for $CXX option to enable C++11 features... " >&6; }
+if test ${ac_cv_prog_cxx_11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_11=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx11_program
+_ACEOF
+for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx11"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
+ ac_prog_cxx_stdcxx=cxx11
+fi
+fi
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
+printf %s "checking for $CXX option to enable C++98 features... " >&6; }
+if test ${ac_cv_prog_cxx_98+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_98=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx98_program
+_ACEOF
+for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx98=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx98" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx98" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx98"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+ ac_prog_cxx_stdcxx=cxx98
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.16'
+
+
+ # Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test ${ac_cv_path_install+y}; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test ${ac_cv_path_mkdir+y}; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SET_MAKE=
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
+
+# Check whether --enable-dependency-tracking was given.
+if test ${enable_dependency_tracking+y}
+then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='qbittorrent'
+ VERSION='v4.6.2'
+
+
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
+
+
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+#
+#
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+depcc="$CXX" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CXX_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard:
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: .
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+
+# use compiler from env variables if available
+QBT_CC="$CC"
+QBT_CXX="$CXX"
+
+# Define --wth-* and --enable-* arguments
+
+# Check whether --enable-debug was given.
+if test ${enable_debug+y}
+then :
+ enableval=$enable_debug;
+else $as_nop
+ enable_debug=no
+fi
+
+
+# Check whether --enable-stacktrace was given.
+if test ${enable_stacktrace+y}
+then :
+ enableval=$enable_stacktrace;
+else $as_nop
+ enable_stacktrace=auto
+fi
+
+
+# Check whether --enable-gui was given.
+if test ${enable_gui+y}
+then :
+ enableval=$enable_gui;
+else $as_nop
+ enable_gui=yes
+fi
+
+
+# Check whether --enable-systemd was given.
+if test ${enable_systemd+y}
+then :
+ enableval=$enable_systemd;
+else $as_nop
+ enable_systemd=no
+fi
+
+
+# Check whether --enable-webui was given.
+if test ${enable_webui+y}
+then :
+ enableval=$enable_webui;
+else $as_nop
+ enable_webui=yes
+fi
+
+
+# Check whether --enable-qt-dbus was given.
+if test ${enable_qt_dbus+y}
+then :
+ enableval=$enable_qt_dbus;
+else $as_nop
+ enable_qt_dbus=yes
+fi
+
+
+# Detect OS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable specific tweaks for current host \"$host_os\"" >&5
+printf %s "checking whether to enable specific tweaks for current host \"$host_os\"... " >&6; }
+case "$host_os" in
+ *darwin*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ enable_qt_dbus=no
+ ;;
+
+ *freebsd*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ LIBS="-lexecinfo $LIBS"
+ ;;
+
+ *haiku*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ LIBS="-lnetwork $LIBS"
+ ;;
+
+ *openbsd*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ LIBS="-lexecinfo $LIBS"
+ ;;
+
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ ;;
+esac
+
+# Require 0.23 pkg-config
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.23
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+if test "x$PKG_CONFIG" = "x"
+then :
+ as_fn_error $? "Could not find pkg-config" "$LINENO" 5
+fi
+
+# Check which arguments were set and act accordingly
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the Debug build" >&5
+printf %s "checking whether to enable the Debug build... " >&6; }
+case "x$enable_debug" in #(
+ "xno") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG release"
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG debug" ;; #(
+ "xyes") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG debug"
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG release" ;; #(
+ *) :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_debug" >&5
+printf "%s\n" "$enable_debug" >&6; }
+ as_fn_error $? "Unknown option \"$enable_debug\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the stacktrace feature" >&5
+printf %s "checking whether to enable the stacktrace feature... " >&6; }
+
+case "x$enable_stacktrace" in #(
+ "xno") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace" ;; #(
+ "xyes") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace" ;; #(
+ "xauto") :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; #(
+ *) :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_stacktrace" >&5
+printf "%s\n" "$enable_stacktrace" >&6; }
+ as_fn_error $? "Unknown option \"$enable_stacktrace\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the GUI" >&5
+printf %s "checking whether to enable the GUI... " >&6; }
+case "x$enable_gui" in #(
+ "xyes") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ enable_systemd=no
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG nogui" ;; #(
+ "xno") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ enable_qt_dbus=no
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG nogui" ;; #(
+ *) :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gui" >&5
+printf "%s\n" "$enable_gui" >&6; }
+ as_fn_error $? "Unknown option \"$enable_gui\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to install the systemd service file" >&5
+printf %s "checking whether to install the systemd service file... " >&6; }
+case "x$enable_systemd" in #(
+ "xyes") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG systemd" ;; #(
+ "xno") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG systemd" ;; #(
+ *) :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_systemd" >&5
+printf "%s\n" "$enable_systemd" >&6; }
+ as_fn_error $? "Unknown option \"$enable_systemd\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the WebUI" >&5
+printf %s "checking whether to enable the WebUI... " >&6; }
+case "x$enable_webui" in #(
+ "xyes") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG nowebui" ;; #(
+ "xno") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG nowebui" ;; #(
+ *) :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_webui" >&5
+printf "%s\n" "$enable_webui" >&6; }
+ as_fn_error $? "Unknown option \"$enable_webui\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
+esac
+
+if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.15.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.15.2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+if test -n "$QT_QMAKE"; then
+ pkg_cv_QT_QMAKE="$QT_QMAKE"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.15.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.15.2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.15.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+QT_QMAKE=$pkg_cv_QT_QMAKE
+
+if test "x$QT_QMAKE" = x""
+then :
+
+fi
+
+fi
+
+if test -f "$QT_QMAKE/qmake"
+then :
+ QT_QMAKE="$QT_QMAKE/qmake"
+else $as_nop
+ if test -f "$QT_QMAKE/qmake-qt5"
+then :
+ QT_QMAKE="$QT_QMAKE/qmake-qt5"
+else $as_nop
+ QT_QMAKE=""
+fi
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.15.2" >&5
+printf %s "checking for Qt5 qmake >= 5.15.2... " >&6; }
+if test "x$QT_QMAKE" != "x"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_QMAKE" >&5
+printf "%s\n" "$QT_QMAKE" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+printf "%s\n" "not found" >&6; }
+
+fi
+
+if test "x$QT_QMAKE" = "x"
+then :
+ as_fn_error $? "Could not find qmake" "$LINENO" 5
+
+fi
+if test "x$enable_gui" = "xyes"
+then :
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5Svg >= 5.15.2" >&5
+printf %s "checking for Qt5Svg >= 5.15.2... " >&6; }
+
+if test -n "$Qt5Svg_CFLAGS"; then
+ pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.15.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.15.2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_Qt5Svg_CFLAGS=`$PKG_CONFIG --cflags "Qt5Svg >= 5.15.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$Qt5Svg_LIBS"; then
+ pkg_cv_Qt5Svg_LIBS="$Qt5Svg_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.15.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.15.2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_Qt5Svg_LIBS=`$PKG_CONFIG --libs "Qt5Svg >= 5.15.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Svg >= 5.15.2" 2>&1`
+ else
+ Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Svg >= 5.15.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$Qt5Svg_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (Qt5Svg >= 5.15.2) were not met:
+
+$Qt5Svg_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables Qt5Svg_CFLAGS
+and Qt5Svg_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables Qt5Svg_CFLAGS
+and Qt5Svg_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ Qt5Svg_CFLAGS=$pkg_cv_Qt5Svg_CFLAGS
+ Qt5Svg_LIBS=$pkg_cv_Qt5Svg_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether QtDBus should be enabled" >&5
+printf %s "checking whether QtDBus should be enabled... " >&6; }
+case "x$enable_qt_dbus" in #(
+ "xyes") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.15.2" >&5
+printf %s "checking for Qt5DBus >= 5.15.2... " >&6; }
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.15.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.15.2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
+printf "%s\n" "found" >&6; }
+ HAVE_QTDBUS=true
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+printf "%s\n" "not found" >&6; }
+ HAVE_QTDBUS=false
+fi
+
+ if test "x$HAVE_QTDBUS" = "xfalse"
+then :
+ as_fn_error $? "Could not find QtDBus" "$LINENO" 5
+else $as_nop
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG dbus" QBT_ADD_DEFINES="$QBT_ADD_DEFINES QBT_USES_DBUS"
+
+fi ;; #(
+ "xno") :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG dbus" ;; #(
+ *) :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_qt_dbus" >&5
+printf "%s\n" "$enable_qt_dbus" >&6; }
+ as_fn_error $? "Unknown option \"$enable_qt_dbus\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
+esac
+
+
+
+
+# Check whether --with-boost was given.
+if test ${with_boost+y}
+then :
+ withval=$with_boost;
+ case $withval in #(
+ no) :
+ want_boost="no";_AX_BOOST_BASE_boost_path="" ;; #(
+ yes) :
+ want_boost="yes";_AX_BOOST_BASE_boost_path="" ;; #(
+ *) :
+ want_boost="yes";_AX_BOOST_BASE_boost_path="$withval" ;;
+esac
+
+else $as_nop
+ want_boost="yes"
+fi
+
+
+
+
+# Check whether --with-boost-libdir was given.
+if test ${with_boost_libdir+y}
+then :
+ withval=$with_boost_libdir;
+ if test -d "$withval"
+then :
+ _AX_BOOST_BASE_boost_lib_path="$withval"
+else $as_nop
+ as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
+fi
+
+else $as_nop
+ _AX_BOOST_BASE_boost_lib_path=""
+fi
+
+
+BOOST_LDFLAGS=""
+BOOST_CPPFLAGS=""
+if test "x$want_boost" = "xyes"
+then :
+
+
+ if test "x1.71" = "x"
+then :
+ _AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"
+else $as_nop
+ _AX_BOOST_BASE_TONUMERICVERSION_req="1.71"
+fi
+ _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\.[0-9]*\)'`
+ _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\)'`
+ if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"
+then :
+ as_fn_error $? "You should at least specify libboost major version" "$LINENO" 5
+fi
+ _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.\([0-9]*\)'`
+ if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"
+then :
+ _AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"
+fi
+ _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ if test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"
+then :
+ _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"
+fi
+ _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
+ WANT_BOOST_VERSION=$_AX_BOOST_BASE_TONUMERICVERSION_RET
+
+ succeeded=no
+
+
+
+ case ${host_cpu} in #(
+ x86_64) :
+ libsubdirs="lib64 libx32 lib lib64" ;; #(
+ mips*64*) :
+ libsubdirs="lib64 lib32 lib lib64" ;; #(
+ ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64|e2k) :
+ libsubdirs="lib64 lib lib64" ;; #(
+ *) :
+ libsubdirs="lib"
+ ;;
+esac
+
+ case ${host_cpu} in #(
+ i?86) :
+ multiarch_libsubdir="lib/i386-${host_os}" ;; #(
+ armv7l) :
+ multiarch_libsubdir="lib/arm-${host_os}" ;; #(
+ *) :
+ multiarch_libsubdir="lib/${host_cpu}-${host_os}"
+ ;;
+esac
+
+ if test "x$_AX_BOOST_BASE_boost_path" != "x"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.71 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"" >&5
+printf %s "checking for boostlib >= 1.71 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"... " >&6; }
+ if test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
+ for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.71 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"" >&5
+printf %s "checking for boostlib >= 1.71 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"... " >&6; }
+ if test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
+ break;
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+ done
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+else $as_nop
+
+ if test X"$cross_compiling" = Xyes; then
+ search_libsubdirs=$multiarch_libsubdir
+ else
+ search_libsubdirs="$multiarch_libsubdir $libsubdirs"
+ fi
+ for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
+ if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
+ for libsubdir in $search_libsubdirs ; do
+ if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
+ break;
+ fi
+ done
+
+fi
+
+ if test "x$_AX_BOOST_BASE_boost_lib_path" != "x"
+then :
+ BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.71 ($WANT_BOOST_VERSION)" >&5
+printf %s "checking for boostlib >= 1.71 ($WANT_BOOST_VERSION)... " >&6; }
+ CPPFLAGS_SAVED="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+
+ LDFLAGS_SAVED="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include
+
+int
+main (void)
+{
+
+(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($WANT_BOOST_VERSION))]));
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ succeeded=yes
+ found_system=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+ if test "x$succeeded" != "xyes" ; then
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ BOOST_CPPFLAGS=
+ if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
+ BOOST_LDFLAGS=
+ fi
+ _version=0
+ if test -n "$_AX_BOOST_BASE_boost_path" ; then
+ if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
+ for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "x$V_CHECK" = "x1" ; then
+ _version=$_version_tmp
+ fi
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
+ done
+ if test -z "$BOOST_CPPFLAGS"; then
+ if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
+ fi
+ fi
+ if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
+ fi
+ fi
+ else
+ if test "x$cross_compiling" != "xyes" ; then
+ for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
+ if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
+ for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "x$V_CHECK" = "x1" ; then
+ _version=$_version_tmp
+ best_path=$_AX_BOOST_BASE_boost_path
+ fi
+ done
+ fi
+ done
+
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
+ if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$best_path/$libsubdir"
+ fi
+ fi
+
+ if test -n "$BOOST_ROOT" ; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
+ version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
+ stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
+ stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'`
+ V_CHECK=`expr $stage_version_shorten \>\= $_version`
+ if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5
+printf "%s\n" "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;}
+ BOOST_CPPFLAGS="-I$BOOST_ROOT"
+ BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
+ fi
+ fi
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include
+
+int
+main (void)
+{
+
+(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($WANT_BOOST_VERSION))]));
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ succeeded=yes
+ found_system=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ fi
+
+ if test "x$succeeded" != "xyes" ; then
+ if test "x$_version" = "x0" ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version 1.71 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&5
+printf "%s\n" "$as_me: We could not detect the boost libraries (version 1.71 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&6;}
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5
+printf "%s\n" "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
+ fi
+ # execute ACTION-IF-NOT-FOUND (if present):
+ as_fn_error $? "Could not find Boost" "$LINENO" 5
+ else
+
+printf "%s\n" "#define HAVE_BOOST /**/" >>confdefs.h
+
+ # execute ACTION-IF-FOUND (if present):
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost CXXFLAGS: \"$BOOST_CPPFLAGS\"" >&5
+printf "%s\n" "$as_me: Boost CXXFLAGS: \"$BOOST_CPPFLAGS\"" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&5
+printf "%s\n" "$as_me: Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&6;}
+ fi
+
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+
+
+fi
+
+
+
+CXXFLAGS="$BOOST_CPPFLAGS $CXXFLAGS"
+LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
+
+# add workaround for problematic boost version
+# taken from ax_boost_base.m4
+
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent-rasterbar >= 2.0.9" >&5
+printf %s "checking for libtorrent-rasterbar >= 2.0.9... " >&6; }
+
+if test -n "$libtorrent_CFLAGS"; then
+ pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 2.0.9\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 2.0.9") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 2.0.9" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$libtorrent_LIBS"; then
+ pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 2.0.9\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 2.0.9") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 2.0.9" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 2.0.9" 2>&1`
+ else
+ libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 2.0.9" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$libtorrent_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" >&5
+printf %s "checking for libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2... " >&6; }
+
+if test -n "$libtorrent_CFLAGS"; then
+ pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$libtorrent_LIBS"; then
+ pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>&1`
+ else
+ libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$libtorrent_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2) were not met:
+
+$libtorrent_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables libtorrent_CFLAGS
+and libtorrent_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables libtorrent_CFLAGS
+and libtorrent_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ libtorrent_CFLAGS=$pkg_cv_libtorrent_CFLAGS
+ libtorrent_LIBS=$pkg_cv_libtorrent_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" >&5
+printf %s "checking for libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2... " >&6; }
+
+if test -n "$libtorrent_CFLAGS"; then
+ pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$libtorrent_LIBS"; then
+ pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>&1`
+ else
+ libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$libtorrent_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2) were not met:
+
+$libtorrent_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables libtorrent_CFLAGS
+and libtorrent_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables libtorrent_CFLAGS
+and libtorrent_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ libtorrent_CFLAGS=$pkg_cv_libtorrent_CFLAGS
+ libtorrent_LIBS=$pkg_cv_libtorrent_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"
+fi
+else
+ libtorrent_CFLAGS=$pkg_cv_libtorrent_CFLAGS
+ libtorrent_LIBS=$pkg_cv_libtorrent_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS" QBT_ADD_DEFINES="$QBT_ADD_DEFINES QBT_USES_LIBTORRENT2"
+fi
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl >= 1.1.1" >&5
+printf %s "checking for openssl >= 1.1.1... " >&6; }
+
+if test -n "$openssl_CFLAGS"; then
+ pkg_cv_openssl_CFLAGS="$openssl_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_openssl_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.1.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$openssl_LIBS"; then
+ pkg_cv_openssl_LIBS="$openssl_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_openssl_LIBS=`$PKG_CONFIG --libs "openssl >= 1.1.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ openssl_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
+ else
+ openssl_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$openssl_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (openssl >= 1.1.1) were not met:
+
+$openssl_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables openssl_CFLAGS
+and openssl_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables openssl_CFLAGS
+and openssl_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ openssl_CFLAGS=$pkg_cv_openssl_CFLAGS
+ openssl_LIBS=$pkg_cv_openssl_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ CXXFLAGS="$openssl_CFLAGS $CXXFLAGS"
+ LIBS="$openssl_LIBS $LIBS"
+fi
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.11" >&5
+printf %s "checking for zlib >= 1.2.11... " >&6; }
+
+if test -n "$zlib_CFLAGS"; then
+ pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.11" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$zlib_LIBS"; then
+ pkg_cv_zlib_LIBS="$zlib_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.11" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
+ else
+ zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$zlib_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (zlib >= 1.2.11) were not met:
+
+$zlib_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables zlib_CFLAGS
+and zlib_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables zlib_CFLAGS
+and zlib_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ zlib_CFLAGS=$pkg_cv_zlib_CFLAGS
+ zlib_LIBS=$pkg_cv_zlib_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ CXXFLAGS="$zlib_CFLAGS $CXXFLAGS"
+ LIBS="$zlib_LIBS $LIBS"
+fi
+
+# Check if already in >= C++17 mode because of the flags returned by one of the above packages
+TMP_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=""
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler defaults to C++17 or later mode" >&5
+printf %s "checking if compiler defaults to C++17 or later mode... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifndef __cplusplus
+ #error "This is not a C++ compiler"
+ #elif __cplusplus < 201703L
+ #error "This is not a C++17 compiler"
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ QBT_CXX17_FOUND="yes"
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_CXX17_FOUND="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+# In case of no, check if the compiler can support at least C++17
+# and if yes, enable it leaving a warning to the user
+if test "x$QBT_CXX17_FOUND" = "xno"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports C++17" >&5
+printf %s "checking if compiler supports C++17... " >&6; }
+ CXXFLAGS="-std=c++17"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifndef __cplusplus
+ #error "This is not a C++ compiler"
+ #elif __cplusplus < 201703L
+ #error "This is not a C++17 compiler"
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C++17 is disabled by the set compiler flags" >&5
+printf %s "checking if C++17 is disabled by the set compiler flags... " >&6; }
+ # prepend the flag so it won't override conflicting user defined flags
+ CXXFLAGS="-std=c++17 $TMP_CXXFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifndef __cplusplus
+ #error "This is not a C++ compiler"
+ #elif __cplusplus < 201703L
+ #error "This is not a C++17 compiler"
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++17"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: C++17 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors." >&5
+printf "%s\n" "$as_me: WARNING: C++17 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors." >&2;}
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ as_fn_error $? "The compiler supports C++17 but the user or a dependency has explicitly enabled a lower mode." "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "A compiler supporting C++17 is required." "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+CXXFLAGS="$TMP_CXXFLAGS"
+
+# These are required because autoconf doesn't expand these **particular**
+# vars automatically. And qmake cannot autoexpand them.
+
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ax_define_dir="\"$prefix\""
+ eval ax_define_dir="\"$ax_define_dir\""
+ EXPAND_PREFIX="$ax_define_dir"
+
+ printf "%s\n" "#define EXPAND_PREFIX \"$ax_define_dir\"" >>confdefs.h
+
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ax_define_dir="\"$bindir\""
+ eval ax_define_dir="\"$ax_define_dir\""
+ EXPAND_BINDIR="$ax_define_dir"
+
+ printf "%s\n" "#define EXPAND_BINDIR \"$ax_define_dir\"" >>confdefs.h
+
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ax_define_dir="\"$datadir\""
+ eval ax_define_dir="\"$ax_define_dir\""
+ EXPAND_DATADIR="$ax_define_dir"
+
+ printf "%s\n" "#define EXPAND_DATADIR \"$ax_define_dir\"" >>confdefs.h
+
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ax_define_dir="\"$mandir\""
+ eval ax_define_dir="\"$ax_define_dir\""
+ EXPAND_MANDIR="$ax_define_dir"
+
+ printf "%s\n" "#define EXPAND_MANDIR \"$ax_define_dir\"" >>confdefs.h
+
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+# Original extract() function contributed by pmzqla
+# $*: Strings to parse
+# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
+extract() {
+ if [ -z "$*" ]; then
+ echo "Input string required"
+ return 1
+ fi
+
+ # BSD sed needs an actual newline character in the substitute command
+ new_line='
+'
+ # Convert " -" to "\n" if not between quotes and remove possible leading white spaces
+ string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//')
+ SAVEIFS=$IFS
+ IFS=$(printf "\n\b")
+ for i in $string; do
+ case "$(echo "$i" | cut -c1)" in
+ '') ;;
+ D) QBT_CONF_DEFINES="$QBT_CONF_DEFINES $(echo $i | cut -c2-)";;
+ I) QBT_CONF_INCLUDES="$QBT_CONF_INCLUDES $(echo $i | cut -c2-)";;
+ *) QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS -$i";;
+ esac
+ done
+ IFS=$SAVEIFS
+}
+
+extract "$CFLAGS $CXXFLAGS"
+QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
+
+# Substitute the values of these vars in conf.pri.in
+
+
+
+
+
+
+
+
+
+QBT_CONFIG_FILES="conf.pri"
+
+if test "x$enable_systemd" = "xyes"
+then :
+ QBT_CONFIG_FILES="$QBT_CONFIG_FILES dist/unix/systemd/qbittorrent-nox@.service"
+fi
+
+ac_config_files="$ac_config_files "$QBT_CONFIG_FILES""
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by qbittorrent $as_me v4.6.2, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to .
+qbittorrent home page: ."
+
+_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config='$ac_cs_config_escaped'
+ac_cs_version="\\
+qbittorrent config.status v4.6.2
+configured by $0, generated by GNU Autoconf 2.71,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ printf "%s\n" "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ printf "%s\n" "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ printf "%s\n" "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ printf "%s\n" "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ ""$QBT_CONFIG_FILES"") CONFIG_FILES="$CONFIG_FILES "$QBT_CONFIG_FILES"" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' >$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Running qmake to generate the makefile..." >&5
+printf "%s\n" "$as_me: Running qmake to generate the makefile..." >&6;}
+TOPDIR="$(cd "$(dirname "$0")" && pwd)"
+$QT_QMAKE -r "$TOPDIR/qbittorrent.pro" "QMAKE_LRELEASE=$QMAKE_LRELEASE"
+qmake_ret="$?"
+
+printf "%s\n"
+if test "x$qmake_ret" != "x0"
+then :
+ as_fn_error $? "$QT_QMAKE failed to generate the makefile" "$LINENO" 5
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Good, the configure finished." >&5
+printf "%s\n" "$as_me: Good, the configure finished." >&6;}
+printf "%s\n"
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 000000000..214c24518
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,303 @@
+AC_INIT([qbittorrent], [v4.6.2], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+: ${CFLAGS=""}
+: ${CXXFLAGS=""}
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_SED
+AC_LANG(C++)
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE([foreign])
+
+# use compiler from env variables if available
+QBT_CC="$CC"
+QBT_CXX="$CXX"
+
+# Define --wth-* and --enable-* arguments
+
+AC_ARG_ENABLE(debug,
+ [AS_HELP_STRING([--enable-debug],
+ [Enable debug build])],
+ [],
+ [enable_debug=no])
+
+AC_ARG_ENABLE(stacktrace,
+ [AS_HELP_STRING([--enable-stacktrace],
+ [Enable stacktrace feature (default=auto)])],
+ [],
+ [enable_stacktrace=auto])
+
+AC_ARG_ENABLE(gui,
+ [AS_HELP_STRING([--disable-gui],
+ [Disable the GUI for headless running. Disables QtDBus and the GeoIP Database.])],
+ [],
+ [enable_gui=yes])
+
+AC_ARG_ENABLE(systemd,
+ [AS_HELP_STRING([--enable-systemd],
+ [Install the systemd service file (headless only).])],
+ [],
+ [enable_systemd=no])
+
+AC_ARG_ENABLE(webui,
+ [AS_HELP_STRING([--disable-webui],
+ [Disable the WebUI.])],
+ [],
+ [enable_webui=yes])
+
+AC_ARG_ENABLE(qt-dbus,
+ [AS_HELP_STRING([--disable-qt-dbus],
+ [Disable use of QtDBus (GUI only)])],
+ [],
+ [enable_qt_dbus=yes])
+
+# Detect OS
+AC_MSG_CHECKING([whether to enable specific tweaks for current host "$host_os"])
+case "$host_os" in
+ *darwin*)
+ AC_MSG_RESULT([yes])
+ enable_qt_dbus=no
+ ;;
+
+ *freebsd*)
+ AC_MSG_RESULT([yes])
+ LIBS="-lexecinfo $LIBS"
+ ;;
+
+ *haiku*)
+ AC_MSG_RESULT([yes])
+ LIBS="-lnetwork $LIBS"
+ ;;
+
+ *openbsd*)
+ AC_MSG_RESULT([yes])
+ LIBS="-lexecinfo $LIBS"
+ ;;
+
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+esac
+
+# Require 0.23 pkg-config
+PKG_PROG_PKG_CONFIG([0.23])
+AS_IF([test "x$PKG_CONFIG" = "x"],
+ [AC_MSG_ERROR([Could not find pkg-config])])
+
+# Check which arguments were set and act accordingly
+AC_MSG_CHECKING([whether to enable the Debug build])
+AS_CASE(["x$enable_debug"],
+ ["xno"],
+ [AC_MSG_RESULT([no])
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG release"
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG debug"],
+ ["xyes"],
+ [AC_MSG_RESULT([yes])
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG debug"
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG release"],
+ [AC_MSG_RESULT([$enable_debug])
+ AC_MSG_ERROR([Unknown option "$enable_debug". Use either "yes" or "no".])])
+
+AC_MSG_CHECKING([whether to enable the stacktrace feature])
+AS_CASE(["x$enable_stacktrace"],
+ ["xno"],
+ [AC_MSG_RESULT([no])
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"],
+ ["xyes"],
+ [AC_MSG_RESULT([yes])
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"],
+ ["xauto"],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include ]])],
+ [AC_MSG_RESULT([yes])
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"],
+ [AC_MSG_RESULT([no])
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"])],
+ [AC_MSG_RESULT([$enable_stacktrace])
+ AC_MSG_ERROR([Unknown option "$enable_stacktrace". Use either "yes" or "no".])])
+
+AC_MSG_CHECKING([whether to enable the GUI])
+AS_CASE(["x$enable_gui"],
+ ["xyes"],
+ [AC_MSG_RESULT([yes])
+ enable_systemd=[no]
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG nogui"],
+ ["xno"],
+ [AC_MSG_RESULT([no])
+ enable_qt_dbus=[no]
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG nogui"],
+ [AC_MSG_RESULT([$enable_gui])
+ AC_MSG_ERROR([Unknown option "$enable_gui". Use either "yes" or "no".])])
+
+AC_MSG_CHECKING([whether to install the systemd service file])
+AS_CASE(["x$enable_systemd"],
+ ["xyes"],
+ [AC_MSG_RESULT([yes])
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG systemd"],
+ ["xno"],
+ [AC_MSG_RESULT([no])
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG systemd"],
+ [AC_MSG_RESULT([$enable_systemd])
+ AC_MSG_ERROR([Unknown option "$enable_systemd". Use either "yes" or "no".])])
+
+AC_MSG_CHECKING([whether to enable the WebUI])
+AS_CASE(["x$enable_webui"],
+ ["xyes"],
+ [AC_MSG_RESULT([yes])
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG nowebui"],
+ ["xno"],
+ [AC_MSG_RESULT([no])
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG nowebui"],
+ [AC_MSG_RESULT([$enable_webui])
+ AC_MSG_ERROR([Unknown option "$enable_webui". Use either "yes" or "no".])])
+
+FIND_QT5()
+AS_IF([test "x$QT_QMAKE" = "x"],
+ [AC_MSG_ERROR([Could not find qmake])
+ ])
+AS_IF([test "x$enable_gui" = "xyes"],
+ [PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.15.2])
+ ])
+AC_MSG_CHECKING([whether QtDBus should be enabled])
+AS_CASE(["x$enable_qt_dbus"],
+ ["xyes"],
+ [AC_MSG_RESULT([yes])
+ FIND_QTDBUS()
+ AS_IF([test "x$HAVE_QTDBUS" = "xfalse"],
+ [AC_MSG_ERROR([Could not find QtDBus])],
+ [QBT_ADD_CONFIG="$QBT_ADD_CONFIG dbus" QBT_ADD_DEFINES="$QBT_ADD_DEFINES QBT_USES_DBUS"]
+ )],
+ ["xno"],
+ [AC_MSG_RESULT([no])
+ QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG dbus"],
+ [AC_MSG_RESULT([$enable_qt_dbus])
+ AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
+
+
+AX_BOOST_BASE([1.71],
+ [AC_MSG_NOTICE([Boost CXXFLAGS: "$BOOST_CPPFLAGS"])
+ AC_MSG_NOTICE([Boost LDFLAGS: "$BOOST_LDFLAGS"])],
+ [AC_MSG_ERROR([Could not find Boost])])
+CXXFLAGS="$BOOST_CPPFLAGS $CXXFLAGS"
+LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
+
+# add workaround for problematic boost version
+# taken from ax_boost_base.m4
+m4_define([DETECT_BOOST_VERSION_PROGRAM],
+ [AC_LANG_PROGRAM([[#include ]],
+ [[(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));]])])
+
+PKG_CHECK_MODULES(libtorrent,
+ [libtorrent-rasterbar >= 2.0.9],
+ [CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS" QBT_ADD_DEFINES="$QBT_ADD_DEFINES QBT_USES_LIBTORRENT2"],
+ [PKG_CHECK_MODULES(libtorrent,
+ [libtorrent-rasterbar >= 1.2.19 libtorrent-rasterbar < 2],
+ [CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"])])
+
+PKG_CHECK_MODULES(openssl,
+ [openssl >= 1.1.1],
+ [CXXFLAGS="$openssl_CFLAGS $CXXFLAGS"
+ LIBS="$openssl_LIBS $LIBS"])
+
+PKG_CHECK_MODULES(zlib,
+ [zlib >= 1.2.11],
+ [CXXFLAGS="$zlib_CFLAGS $CXXFLAGS"
+ LIBS="$zlib_LIBS $LIBS"])
+
+# Check if already in >= C++17 mode because of the flags returned by one of the above packages
+TMP_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=""
+AC_MSG_CHECKING([if compiler defaults to C++17 or later mode])
+AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
+ [AC_MSG_RESULT([yes])
+ QBT_CXX17_FOUND="yes"],
+ [AC_MSG_RESULT([no])
+ QBT_CXX17_FOUND="no"])
+
+# In case of no, check if the compiler can support at least C++17
+# and if yes, enable it leaving a warning to the user
+AS_IF([test "x$QBT_CXX17_FOUND" = "xno"],
+ [AC_MSG_CHECKING([if compiler supports C++17])
+ CXXFLAGS="-std=c++17"
+ AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
+ [AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([if C++17 is disabled by the set compiler flags])
+ # prepend the flag so it won't override conflicting user defined flags
+ CXXFLAGS="-std=c++17 $TMP_CXXFLAGS"
+ AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
+ [AC_MSG_RESULT([no])
+ QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++17"
+ AC_MSG_WARN([C++17 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors.])],
+ [AC_MSG_RESULT([yes])
+ AC_MSG_ERROR([The compiler supports C++17 but the user or a dependency has explicitly enabled a lower mode.])])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([A compiler supporting C++17 is required.])])
+ ])
+CXXFLAGS="$TMP_CXXFLAGS"
+
+# These are required because autoconf doesn't expand these **particular**
+# vars automatically. And qmake cannot autoexpand them.
+AX_DEFINE_DIR([EXPAND_PREFIX], [prefix])
+AX_DEFINE_DIR([EXPAND_BINDIR], [bindir])
+AX_DEFINE_DIR([EXPAND_DATADIR], [datadir])
+AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
+
+# Original extract() function contributed by pmzqla
+# $*: Strings to parse
+# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
+extract() {
+ if [[ -z "$*" ]]; then
+ echo "Input string required"
+ return 1
+ fi
+
+ # BSD sed needs an actual newline character in the substitute command
+ new_line='
+'
+ # Convert " -" to "\n" if not between quotes and remove possible leading white spaces
+ string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[[:space:]]]*//')
+ SAVEIFS=$IFS
+ IFS=$(printf "\n\b")
+ for i in $string; do
+ case "$(echo "$i" | cut -c1)" in
+ '') ;;
+ D) QBT_CONF_DEFINES="$QBT_CONF_DEFINES $(echo $i | cut -c2-)";;
+ I) QBT_CONF_INCLUDES="$QBT_CONF_INCLUDES $(echo $i | cut -c2-)";;
+ *) QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS -$i";;
+ esac
+ done
+ IFS=$SAVEIFS
+}
+
+extract "$CFLAGS $CXXFLAGS"
+QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
+
+# Substitute the values of these vars in conf.pri.in
+AC_SUBST(QBT_CC)
+AC_SUBST(QBT_CXX)
+AC_SUBST(QBT_CONF_INCLUDES)
+AC_SUBST(QBT_CONF_EXTRA_CFLAGS)
+AC_SUBST(QBT_ADD_CONFIG)
+AC_SUBST(QBT_REMOVE_CONFIG)
+AC_SUBST(QBT_ADD_DEFINES)
+AC_SUBST(QBT_REMOVE_DEFINES)
+
+QBT_CONFIG_FILES="conf.pri"
+
+AS_IF([test "x$enable_systemd" = "xyes"],
+ [QBT_CONFIG_FILES="$QBT_CONFIG_FILES dist/unix/systemd/qbittorrent-nox@.service"])
+
+AC_CONFIG_FILES(["$QBT_CONFIG_FILES"])
+AC_OUTPUT
+
+AC_MSG_NOTICE([Running qmake to generate the makefile...])
+TOPDIR="$(cd "$(dirname "$0")" && pwd)"
+$QT_QMAKE -r "$TOPDIR/qbittorrent.pro" "QMAKE_LRELEASE=$QMAKE_LRELEASE"
+qmake_ret="$?"
+
+AS_ECHO()
+AS_IF([test "x$qmake_ret" != "x0"],
+ [AC_MSG_ERROR([$QT_QMAKE failed to generate the makefile])])
+
+AC_MSG_NOTICE([Good, the configure finished.])
+AS_ECHO()
diff --git a/dist/mac/Info.plist b/dist/mac/Info.plist
index bebe2f1fb..736796fe7 100644
--- a/dist/mac/Info.plist
+++ b/dist/mac/Info.plist
@@ -55,7 +55,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 5.2.0
+ 4.6.2
CFBundleExecutable
${EXECUTABLE_NAME}
CFBundleIdentifier
@@ -67,7 +67,7 @@
NSAppleScriptEnabled
YES
NSHumanReadableCopyright
- Copyright © 2006-2025 The qBittorrent project
+ Copyright © 2006-2023 The qBittorrent project
UTExportedTypeDeclarations
diff --git a/dist/mac/qBitTorrentDocument.icns b/dist/mac/qBitTorrentDocument.icns
index d257dc2d9..efd7fc1e5 100644
Binary files a/dist/mac/qBitTorrentDocument.icns and b/dist/mac/qBitTorrentDocument.icns differ
diff --git a/dist/mac/qbittorrent_mac.icns b/dist/mac/qbittorrent_mac.icns
index a618a87a4..58684a09e 100644
Binary files a/dist/mac/qbittorrent_mac.icns and b/dist/mac/qbittorrent_mac.icns differ
diff --git a/dist/unix/CMakeLists.txt b/dist/unix/CMakeLists.txt
index c731ebbaf..ad27776c6 100644
--- a/dist/unix/CMakeLists.txt
+++ b/dist/unix/CMakeLists.txt
@@ -18,28 +18,25 @@ if (SYSTEMD)
)
endif()
-set(manPageLanguages
- en
- ru
-)
+if (GUI)
+ list(APPEND MAN_FILES ${PROJECT_SOURCE_DIR}/doc/qbittorrent.1)
+else()
+ list(APPEND MAN_FILES ${PROJECT_SOURCE_DIR}/doc/qbittorrent-nox.1)
+endif()
-foreach(manPageLanguage ${manPageLanguages})
- install(FILES ${PROJECT_SOURCE_DIR}/doc/${manPageLanguage}/$,qbittorrent.1,qbittorrent-nox.1>
- # English man pages are installed into ${CMAKE_INSTALL_MANDIR}/man1, while man pages
- # in other languages are installed into ${CMAKE_INSTALL_MANDIR}/${manPageLanguage}/man1.
- DESTINATION ${CMAKE_INSTALL_MANDIR}/$<$>:${manPageLanguage}/>man1
- COMPONENT doc
- )
-endforeach()
+install(FILES ${MAN_FILES}
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
+ COMPONENT doc
+)
if (GUI)
install(FILES org.qbittorrent.qBittorrent.desktop
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
COMPONENT data
)
- install(FILES org.qbittorrent.qBittorrent.metainfo.xml
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
+ install(FILES org.qbittorrent.qBittorrent.appdata.xml
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
COMPONENT data
)
@@ -55,9 +52,4 @@ if (GUI)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
COMPONENT data
)
-else()
- install(FILES org.qbittorrent.qBittorrent-nox.metainfo.xml
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
- COMPONENT data
- )
endif()
diff --git a/dist/unix/menuicons/16x16/apps/qbittorrent.png b/dist/unix/menuicons/16x16/apps/qbittorrent.png
index 3dcb87856..bf74dc0e6 100644
Binary files a/dist/unix/menuicons/16x16/apps/qbittorrent.png and b/dist/unix/menuicons/16x16/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/16x16/status/qbittorrent-tray.png b/dist/unix/menuicons/16x16/status/qbittorrent-tray.png
index 3dcb87856..bf74dc0e6 100644
Binary files a/dist/unix/menuicons/16x16/status/qbittorrent-tray.png and b/dist/unix/menuicons/16x16/status/qbittorrent-tray.png differ
diff --git a/dist/unix/menuicons/192x192/apps/qbittorrent.png b/dist/unix/menuicons/192x192/apps/qbittorrent.png
index af1c69a74..799b5c2c0 100644
Binary files a/dist/unix/menuicons/192x192/apps/qbittorrent.png and b/dist/unix/menuicons/192x192/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/192x192/status/qbittorrent-tray.png b/dist/unix/menuicons/192x192/status/qbittorrent-tray.png
index af1c69a74..799b5c2c0 100644
Binary files a/dist/unix/menuicons/192x192/status/qbittorrent-tray.png and b/dist/unix/menuicons/192x192/status/qbittorrent-tray.png differ
diff --git a/dist/unix/menuicons/24x24/apps/qbittorrent.png b/dist/unix/menuicons/24x24/apps/qbittorrent.png
index 1c9c69451..a17e0398a 100644
Binary files a/dist/unix/menuicons/24x24/apps/qbittorrent.png and b/dist/unix/menuicons/24x24/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/24x24/status/qbittorrent-tray.png b/dist/unix/menuicons/24x24/status/qbittorrent-tray.png
index 1c9c69451..a17e0398a 100644
Binary files a/dist/unix/menuicons/24x24/status/qbittorrent-tray.png and b/dist/unix/menuicons/24x24/status/qbittorrent-tray.png differ
diff --git a/dist/unix/menuicons/32x32/apps/qbittorrent.png b/dist/unix/menuicons/32x32/apps/qbittorrent.png
index 59cdb93f9..a1c56efd2 100644
Binary files a/dist/unix/menuicons/32x32/apps/qbittorrent.png and b/dist/unix/menuicons/32x32/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/32x32/status/qbittorrent-tray.png b/dist/unix/menuicons/32x32/status/qbittorrent-tray.png
index 59cdb93f9..a1c56efd2 100644
Binary files a/dist/unix/menuicons/32x32/status/qbittorrent-tray.png and b/dist/unix/menuicons/32x32/status/qbittorrent-tray.png differ
diff --git a/dist/unix/menuicons/36x36/apps/qbittorrent.png b/dist/unix/menuicons/36x36/apps/qbittorrent.png
index b7e65a6a2..11c7278e5 100644
Binary files a/dist/unix/menuicons/36x36/apps/qbittorrent.png and b/dist/unix/menuicons/36x36/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/36x36/status/qbittorrent-tray.png b/dist/unix/menuicons/36x36/status/qbittorrent-tray.png
index b7e65a6a2..11c7278e5 100644
Binary files a/dist/unix/menuicons/36x36/status/qbittorrent-tray.png and b/dist/unix/menuicons/36x36/status/qbittorrent-tray.png differ
diff --git a/dist/unix/menuicons/64x64/apps/qbittorrent.png b/dist/unix/menuicons/64x64/apps/qbittorrent.png
index fdd8df4ea..243f82cc6 100644
Binary files a/dist/unix/menuicons/64x64/apps/qbittorrent.png and b/dist/unix/menuicons/64x64/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/64x64/status/qbittorrent-tray.png b/dist/unix/menuicons/64x64/status/qbittorrent-tray.png
index fdd8df4ea..243f82cc6 100644
Binary files a/dist/unix/menuicons/64x64/status/qbittorrent-tray.png and b/dist/unix/menuicons/64x64/status/qbittorrent-tray.png differ
diff --git a/dist/unix/menuicons/72x72/apps/qbittorrent.png b/dist/unix/menuicons/72x72/apps/qbittorrent.png
index 5d4162322..017e4fe18 100644
Binary files a/dist/unix/menuicons/72x72/apps/qbittorrent.png and b/dist/unix/menuicons/72x72/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/72x72/status/qbittorrent-tray.png b/dist/unix/menuicons/72x72/status/qbittorrent-tray.png
index 5d4162322..017e4fe18 100644
Binary files a/dist/unix/menuicons/72x72/status/qbittorrent-tray.png and b/dist/unix/menuicons/72x72/status/qbittorrent-tray.png differ
diff --git a/dist/unix/menuicons/96x96/apps/qbittorrent.png b/dist/unix/menuicons/96x96/apps/qbittorrent.png
index 996aa6fc0..e87302310 100644
Binary files a/dist/unix/menuicons/96x96/apps/qbittorrent.png and b/dist/unix/menuicons/96x96/apps/qbittorrent.png differ
diff --git a/dist/unix/menuicons/96x96/status/qbittorrent-tray.png b/dist/unix/menuicons/96x96/status/qbittorrent-tray.png
index 996aa6fc0..e87302310 100644
Binary files a/dist/unix/menuicons/96x96/status/qbittorrent-tray.png and b/dist/unix/menuicons/96x96/status/qbittorrent-tray.png differ
diff --git a/dist/unix/org.qbittorrent.qBittorrent-nox.metainfo.xml b/dist/unix/org.qbittorrent.qBittorrent-nox.metainfo.xml
deleted file mode 100644
index c0aebf988..000000000
--- a/dist/unix/org.qbittorrent.qBittorrent-nox.metainfo.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
- org.qbittorrent.qBittorrent-nox
- CC0-1.0
- GPL-3.0-or-later and OpenSSL
- qBittorrent-nox
- An open-source Bittorrent client (nox version)
-
-
- The qBittorrent project aims to provide an open-source software alternative to µTorrent.
- Additionally, qBittorrent runs and provides the same features on all major platforms (FreeBSD, Linux, macOS, OS/2, Windows).
- qBittorrent is based on the Qt toolkit and libtorrent-rasterbar library.
-
-
- - Polished µTorrent-like User Interface
- - Well-integrated and extensible Search Engine
- - RSS feed support with advanced download filters (incl. regex)
- - Many Bittorrent extensions supported
- - Remote control through Web user interface, written with AJAX
- - Sequential downloading (Download in order)
- - Advanced control over torrents, trackers and peers
- - Bandwidth scheduler
- - Torrent creation tool
- - IP Filtering (eMule & PeerGuardian format compatible)
- - IPv6 compliant
- - UPnP / NAT-PMP port forwarding support
- - Available on all platforms: Windows, Linux, macOS, FreeBSD, OS/2
- - Available in ~70 languages
-
-
-
- qbittorrent-nox
-
-
-
- Running headless (nox) version
- https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/43fcf4550f567c38fb879b984922b659e90982cc/src/img/screenshots/linux/5.webp
-
-
- sledgehammer999@qbittorrent.org
-
- The qBittorrent Project
-
- https://www.qbittorrent.org/
- https://bugs.qbittorrent.org/
- https://wiki.qbittorrent.org/Frequently-Asked-Questions
- https://forum.qbittorrent.org/
- https://www.qbittorrent.org/donate
- https://wiki.qbittorrent.org/How-to-translate-qBittorrent
- https://github.com/qbittorrent/qBittorrent
- https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md
-
-
-
-
-
diff --git a/dist/unix/org.qbittorrent.qBittorrent.metainfo.xml b/dist/unix/org.qbittorrent.qBittorrent.appdata.xml
similarity index 55%
rename from dist/unix/org.qbittorrent.qBittorrent.metainfo.xml
rename to dist/unix/org.qbittorrent.qBittorrent.appdata.xml
index 4aacf15ce..38f58afd2 100644
--- a/dist/unix/org.qbittorrent.qBittorrent.metainfo.xml
+++ b/dist/unix/org.qbittorrent.qBittorrent.appdata.xml
@@ -1,6 +1,6 @@
-
+
org.qbittorrent.qBittorrent
CC0-1.0
GPL-3.0-or-later and OpenSSL
@@ -14,12 +14,33 @@
- Polished µTorrent-like User Interface
- - Well-integrated and extensible Search Engine
+ -
+ Well-integrated and extensible Search Engine
+
+ - Simultaneous search in many Torrent search sites
+ - Category-specific search requests (e.g. Books, Music, Software)
+
+
- RSS feed support with advanced download filters (incl. regex)
- - Many Bittorrent extensions supported
+ -
+ Many Bittorrent extensions supported:
+
+ - Magnet links
+ - Distributed hash table (DHT), peer exchange protocol (PEX), local peer discovery (LSD)
+ - Private torrents
+ - Encrypted connections
+ - and many more...
+
+
- Remote control through Web user interface, written with AJAX
- Sequential downloading (Download in order)
- - Advanced control over torrents, trackers and peers
+ -
+ Advanced control over torrents, trackers and peers
+
+ - Torrents queueing and prioritizing
+ - Torrent content selection and prioritizing
+
+
- Bandwidth scheduler
- Torrent creation tool
- IP Filtering (eMule & PeerGuardian format compatible)
@@ -32,36 +53,27 @@
org.qbittorrent.qBittorrent.desktop
- Main window (General tab collapsed)
- https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/1.webp
+ https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_01.png
- Main window (General tab expanded)
- https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/2.webp
+ https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_02.png
- Options dialog
- https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/3.webp
+ https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_03.png
- Search engine
- https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/4.webp
+ https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_04.png
sledgehammer999@qbittorrent.org
-
- The qBittorrent Project
-
+ The qBittorrent Project
https://www.qbittorrent.org/
https://bugs.qbittorrent.org/
- https://wiki.qbittorrent.org/Frequently-Asked-Questions
- https://forum.qbittorrent.org/
https://www.qbittorrent.org/donate
- https://wiki.qbittorrent.org/How-to-translate-qBittorrent
- https://github.com/qbittorrent/qBittorrent
- https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md
+ https://forum.qbittorrent.org/
+ https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent
-
+
diff --git a/dist/unix/org.qbittorrent.qBittorrent.desktop b/dist/unix/org.qbittorrent.qBittorrent.desktop
index 1b71eb024..59f396ce9 100644
--- a/dist/unix/org.qbittorrent.qBittorrent.desktop
+++ b/dist/unix/org.qbittorrent.qBittorrent.desktop
@@ -105,7 +105,7 @@ GenericName[ka]=BitTorrent კლიენტი
Comment[ka]=გადმოტვირთეთ და გააზიარეთ ფაილები BitTorrent-ის საშუალებით
Name[ka]=qBittorrent
GenericName[ko]=BitTorrent 클라이언트
-Comment[ko]=BitTorrent를 통해 파일 다운로드 및 공유
+Comment[ko]=BitTorrent를 통한 파일 내려받기 및 공유
Name[ko]=qBittorrent
GenericName[lt]=BitTorrent klientas
Comment[lt]=Atsisiųskite bei dalinkitės failais BitTorrent tinkle
@@ -143,11 +143,9 @@ Name[sk]=qBittorrent
GenericName[sl]=BitTorrent odjemalec
Comment[sl]=Prenesite in delite datoteke preko BitTorrenta
Name[sl]=qBittorrent
-GenericName[sq]=Klienti BitTorrent
-Comment[sq]=Shkarko dhe shpërndaj skedarë në BitTorrent
Name[sq]=qBittorrent
-GenericName[sr]=BitTorrent клијент
-Comment[sr]=Преузимајте и делите фајлове преко BitTorrent-а
+GenericName[sr]=BitTorrent-клијент
+Comment[sr]=Преузимајте и делите фајлове преко BitTorrent протокола
Name[sr]=qBittorrent
GenericName[sr@latin]=BitTorrent klijent
Comment[sr@latin]=Preuzimanje i deljenje fajlova preko BitTorrent-a
@@ -161,8 +159,8 @@ Name[ta]=qBittorrent
GenericName[te]=క్యు బిట్ టొరెంట్ క్లయింట్
Comment[te]=క్యు బిట్ టొరెంట్ తో ఫైల్స్ దిగుమతి చేసుకోండి , పంచుకోండి
Name[te]=qBittorrent
-GenericName[th]=ไคลเอนต์บิททอร์เรนต์
-Comment[th]=ดาวน์โหลดและแชร์ไฟล์ผ่านบิตทอร์เรนต์
+GenericName[th]=โปรแกรมบิททอเร้นท์
+Comment[th]=ดาวน์โหลดและแชร์ไฟล์ผ่าน BitTorrent
Name[th]=qBittorrent
GenericName[tr]=BitTorrent istemcisi
Comment[tr]=Dosyaları BitTorrent üzerinden indirin ve paylaşın
@@ -228,6 +226,4 @@ Name[ne_NP]=qBittorrent
GenericName[pt_PT]=Cliente BitTorrent
Comment[pt_PT]=Transferir e partilhar ficheiros por BitTorrent
Name[pt_PT]=qBittorrent
-GenericName[si_LK]=BitTorrent සේවාදායකයා
-Comment[si_LK]=BitTorrent හරහා ගොනු බාගත කර බෙදාගන්න.
Name[si_LK]=qBittorrent
diff --git a/dist/windows/NSISPlugins.zip b/dist/windows/NSISPlugins.zip
deleted file mode 100644
index 6ec673a4d..000000000
Binary files a/dist/windows/NSISPlugins.zip and /dev/null differ
diff --git a/dist/windows/README.txt b/dist/windows/README.txt
index 1a2e4a6bf..fe5bb562c 100644
--- a/dist/windows/README.txt
+++ b/dist/windows/README.txt
@@ -21,40 +21,46 @@ You will need NSIS 3 to make the installer. UPX is an optional requirement.
1. Open the config.nsi file in an editor and change line that contains
"!define QBT_VERSION "3.0.3"" to the version of qbittorrent you just built.
2. config.nsi contains some other defines that control the installer output. Read the comments in that file.
-3. Extract "NSISPlugins.zip" next to "qbittorrent.nsi" script or into your
- NSIS's unicode Plugin directory (usually "C:\Program Files\NSIS\Plugins\x86-unicode").
+3. Extract the plugins found in the folder "nsis plugins" into your
+ NSIS's unicode Plugin directory(usually C:\Program Files\NSIS\Plugins\x86-unicode).
+ Only the *.dll files are needed. Use the unicode version of the dlls.
4. The script you need to compile is "qbittorrent.nsi". It includes all other necessary scripts.
5. The script expects the following file tree:
+The installer script expects the following file tree:
+
+Root:
installer-translations
- afrikaans.nsh
- ....
- (all the .nsh files found here in every source release)
- welsh.nsh
-installer.nsh
+ afrikaans.nsi
+ ....
+ (all the .nsi files found here in every source release)
+ welsh.nsi
+translations
+ qt_ar.qm
+ ...
+ (All the .qm files found in the 'translations' folder of your Qt install. Those files differ between Qt5 and Qt6.
+ You will need the files that conform to this globbing expression 'qt_??.qm qt_??_??.qm qtbase_??.qm qtbase_??_??.qm'.
+ Some of those files will be stubs. Filter any file that is smaller than 10KB in size.
+ Alternatively you can use the 'gather_qt_translations.py' script found in the same folder as this file.
+ Run it with '--help' to see its usage.)
+ qt_zh_TW.qm
+installer.nsi
license.txt
-config.nsh
+config.nsi
+helper.nsi
+qbittorrent.exe
+qbittorrent.pdb
qbittorrent.nsi
qt.conf
-translations.nsh
+translations.nsi
UAC.nsh
-uninstaller.nsh
-qBittorrent
- qbittorrent.exe (required)
- qbittorrent.pdb (optional but recommended)
- translations (optional)
- qt_ar.qm
- ..
- (All the .qm files found in the 'translations' folder of your Qt install. Those files differ between Qt5 and Qt6.
- You will need the files that conform to this globbing expression 'qt_??.qm qt_??_??.qm qtbase_??.qm qtbase_??_??.qm'.
- Some of those files will be stubs. Filter any file that is smaller than 10KB in size.
- Alternatively you can use the 'gather_qt_translations.py' script found in the same folder as this file.
- Run it with '--help' to see its usage.)
- qt_zh_TW.qm
- (Any other files including the ones from all subdirectories will be also included in the installer.)
+uninstaller.nsi
-6. "qbittorrent.exe" is the compiled binary file.
-7. "qbittorrent.pdb" is the compiled binary's PDB file.
+
+6. "license.txt" is a text file that contains the text rendered
+ from src\gui\gpl.html
+7. "qbittorrent.exe" is the compiled binary file.
+8. "qbittorrent.pdb" is the compiled binary's PDB file.
SCRIPT HACKERS:
diff --git a/dist/windows/config.nsh b/dist/windows/config.nsi
similarity index 73%
rename from dist/windows/config.nsh
rename to dist/windows/config.nsi
index 19558c1d6..edfeea8cb 100644
--- a/dist/windows/config.nsh
+++ b/dist/windows/config.nsi
@@ -5,6 +5,17 @@
; Doing so may make antivirus software flag the installer as virus/malware
;!define USE_UPX
+; Uncomment when packaging 64bit qbittorrent
+;!define QBT_IS_X64
+
+; Uncomment when packaging qt6 qbittorrent
+; It will also define QBT_IS_X64
+;!define QBT_USES_QT6
+
+!ifdef QBT_USES_QT6
+!define /redef QBT_IS_X64
+!endif
+
; qBittorrent version
; The string MUST contain ONLY numbers delimited by dots.
; It MUST contain a maximum of 4 delimited numbers
@@ -14,12 +25,12 @@
; 4.5.1.3 -> good
; 4.5.1.3.2 -> bad
; 4.5.0beta -> bad
-!define /ifndef QBT_VERSION "5.2.0"
+!define /ifndef QBT_VERSION "4.6.2"
; Option that controls the installer's window name
; If set, its value will be used like this:
; "qBittorrent ${QBT_INSTALLER_FILENAME}"
-; If not set, the window name will be auto composed from QBT_VERSION
+; If not set, the window name will be auto composed from QBT_VERSION, QBT_USES_QT6, QBT_IS_X64
; If you set this define then you MUST set QBT_INSTALLER_FILENAME too. Otherwise it will be ignored.
; This define is meant to ease automation from scripts/commandline
;!define QBT_INSTALLER_WINDOWNAME
@@ -27,7 +38,7 @@
; Option that controls the installer's window name
; If set, its value will be used like this:
; "qbittorrent_${QBT_INSTALLER_FILENAME}_setup.exe"
-; If not set, the installer filename will be auto composed from QBT_VERSION
+; If not set, the window name will be auto composed from QBT_VERSION, QBT_USES_QT6, QBT_IS_X64
; If you set this define then you MUST set QBT_INSTALLER_WINDOWNAME too. Otherwise it will be ignored.
; This define is meant to ease automation from scripts/commandline
;!define QBT_INSTALLER_FILENAME
@@ -36,16 +47,29 @@
;==============================================================================
!ifndef QBT_INSTALLER_WINDOWNAME | QBT_INSTALLER_FILENAME
- ; The name of the installer
- !define QBT_INSTALLER_WINDOWNAME "${QBT_VERSION} x64"
+ !ifndef QBT_IS_X64
+ ; The name of the installer
+ !define QBT_INSTALLER_WINDOWNAME "${QBT_VERSION}"
- ; The file to write
- !define QBT_INSTALLER_FILENAME "${QBT_VERSION}_x64"
+ ; The file to write
+ !define QBT_INSTALLER_FILENAME "${QBT_VERSION}"
+ !else ; QBT_IS_X64
+ !ifndef QBT_USES_QT6
+ ; The name of the installer
+ !define QBT_INSTALLER_WINDOWNAME "${QBT_VERSION} x64"
+
+ ; The file to write
+ !define QBT_INSTALLER_FILENAME "${QBT_VERSION}_x64"
+ !else ; QBT_USES_QT6
+ ; The name of the installer
+ !define QBT_INSTALLER_WINDOWNAME "${QBT_VERSION} (qt6) x64"
+
+ ; The file to write
+ !define QBT_INSTALLER_FILENAME "${QBT_VERSION}_qt6_x64"
+ !endif ; QBT_USES_QT6
+ !endif ; QBT_IS_X64
!endif
-!define /ifndef QBT_DIST_DIR "qBittorrent"
-!define /ifndef QBT_NSIS_PLUGINS_DIR "NSISPlugins"
-
Unicode true
ManifestDPIAware true
@@ -62,7 +86,9 @@ XPStyle on
!include "UAC.nsh"
!include "FileFunc.nsh"
!include "WinVer.nsh"
+!ifdef QBT_IS_X64
!include "x64.nsh"
+!endif
!include "3rdparty\VersionCompleteXXXX.nsi"
;For the file association
@@ -86,7 +112,7 @@ OutFile "qbittorrent_${QBT_INSTALLER_FILENAME}_setup.exe"
;Installer Version Information
VIAddVersionKey "ProductName" "qBittorrent"
VIAddVersionKey "CompanyName" "The qBittorrent project"
-VIAddVersionKey "LegalCopyright" "Copyright ©2006-2025 The qBittorrent project"
+VIAddVersionKey "LegalCopyright" "Copyright ©2006-2023 The qBittorrent project"
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
VIAddVersionKey "FileVersion" "${QBT_VERSION}"
@@ -95,8 +121,15 @@ VIAddVersionKey "FileVersion" "${QBT_VERSION}"
${VersionCompleteXXXX} ${QBT_VERSION} VERSION_4_PART
VIProductVersion "${VERSION_4_PART}"
-; The default installation directory.
-InstallDir $PROGRAMFILES64\qBittorrent
+; The default installation directory. It changes depending if we install in the 64bit dir or not.
+; A caveat of this is if a user has installed a 32bit version and then runs the 64bit installer
+; (which in turn launches the 32bit uninstaller first) the value will still point to the 32bit location.
+; The user has to manually uninstall the old version and THEN run the 64bit installer
+!ifndef QBT_IS_X64
+ InstallDir $PROGRAMFILES32\qBittorrent
+!else
+ InstallDir $PROGRAMFILES64\qBittorrent
+!endif
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
@@ -111,12 +144,11 @@ RequestExecutionLevel user
!define MUI_HEADERIMAGE
!define MUI_COMPONENTSPAGE_NODESC
;!define MUI_ICON "qbittorrent.ico"
-!define MUI_LICENSEPAGE_BUTTON $(^NextBtn)
-!define MUI_LICENSEPAGE_TEXT_BOTTOM "$_CLICK"
+!define MUI_LICENSEPAGE_CHECKBOX
!define MUI_LANGDLL_ALLLANGUAGES
;--------------------------------
-;Remember the uninstaller/installer language
+;Remember the unistaller/installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
!define MUI_LANGDLL_REGISTRY_KEY "Software\qbittorrent"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
@@ -139,10 +171,8 @@ RequestExecutionLevel user
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_RESERVEFILE_LANGDLL
-
-!addplugindir /x86-unicode "${QBT_NSIS_PLUGINS_DIR}"
-ReserveFile /plugin FindProcDLL.dll
-ReserveFile /plugin UAC.dll
+ReserveFile "${NSISDIR}\Plugins\x86-unicode\FindProcDLL.dll"
+ReserveFile "${NSISDIR}\Plugins\x86-unicode\UAC.dll"
!macro Init thing
uac_tryagain:
diff --git a/dist/windows/gather_qt_translations.py b/dist/windows/gather_qt_translations.py
index cfa212c8c..d1ff44499 100644
--- a/dist/windows/gather_qt_translations.py
+++ b/dist/windows/gather_qt_translations.py
@@ -7,11 +7,9 @@ import shutil
import sys
from typing import List
-
def isNotStub(path: str) -> bool:
return (os.path.getsize(path) >= (10 * 1024))
-
def main() -> int:
parser = argparse.ArgumentParser(description='Gather valid Qt translations for NSIS packaging.')
parser.add_argument("qt_translations_folder", help="Qt's translations folder")
@@ -29,6 +27,5 @@ def main() -> int:
return 0
-
if __name__ == '__main__':
sys.exit(main())
diff --git a/dist/windows/installer-translations/afrikaans.nsh b/dist/windows/installer-translations/afrikaans.nsi
similarity index 95%
rename from dist/windows/installer-translations/afrikaans.nsh
rename to dist/windows/installer-translations/afrikaans.nsi
index 511e306e1..4473df4d9 100644
--- a/dist/windows/installer-translations/afrikaans.nsh
+++ b/dist/windows/installer-translations/afrikaans.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_AFRIKAANS} "Uninstalling previous version."
LangString launch_qbt ${LANG_AFRIKAANS} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_AFRIKAANS} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_AFRIKAANS} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_AFRIKAANS} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/albanian.nsh b/dist/windows/installer-translations/albanian.nsi
similarity index 100%
rename from dist/windows/installer-translations/albanian.nsh
rename to dist/windows/installer-translations/albanian.nsi
diff --git a/dist/windows/installer-translations/arabic.nsh b/dist/windows/installer-translations/arabic.nsi
similarity index 96%
rename from dist/windows/installer-translations/arabic.nsh
rename to dist/windows/installer-translations/arabic.nsi
index 7b7952957..272c836f6 100644
--- a/dist/windows/installer-translations/arabic.nsh
+++ b/dist/windows/installer-translations/arabic.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_ARABIC} "جاري ازالة النسخة السا
LangString launch_qbt ${LANG_ARABIC} "تشغيل البرنامج"
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ARABIC} "هذا المثبت يعمل فقط في نسخ ويندوز 64 بت"
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_ARABIC} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_ARABIC} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/basque.nsh b/dist/windows/installer-translations/basque.nsi
similarity index 95%
rename from dist/windows/installer-translations/basque.nsh
rename to dist/windows/installer-translations/basque.nsi
index d3e78748d..697e70e7c 100644
--- a/dist/windows/installer-translations/basque.nsh
+++ b/dist/windows/installer-translations/basque.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_BASQUE} "Aurreko bertsioa kentzen."
LangString launch_qbt ${LANG_BASQUE} "Abiarazi qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_BASQUE} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_BASQUE} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_BASQUE} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/belarusian.nsh b/dist/windows/installer-translations/belarusian.nsi
similarity index 95%
rename from dist/windows/installer-translations/belarusian.nsh
rename to dist/windows/installer-translations/belarusian.nsi
index 8c712f573..60b47ba66 100644
--- a/dist/windows/installer-translations/belarusian.nsh
+++ b/dist/windows/installer-translations/belarusian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_BELARUSIAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_BELARUSIAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_BELARUSIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_BELARUSIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_BELARUSIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/bosnian.nsh b/dist/windows/installer-translations/bosnian.nsi
similarity index 95%
rename from dist/windows/installer-translations/bosnian.nsh
rename to dist/windows/installer-translations/bosnian.nsi
index 418603e3e..4abff45fb 100644
--- a/dist/windows/installer-translations/bosnian.nsh
+++ b/dist/windows/installer-translations/bosnian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_BOSNIAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_BOSNIAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_BOSNIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_BOSNIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_BOSNIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/breton.nsh b/dist/windows/installer-translations/breton.nsi
similarity index 95%
rename from dist/windows/installer-translations/breton.nsh
rename to dist/windows/installer-translations/breton.nsi
index a60a21918..31755264a 100644
--- a/dist/windows/installer-translations/breton.nsh
+++ b/dist/windows/installer-translations/breton.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_BRETON} "Uninstalling previous version."
LangString launch_qbt ${LANG_BRETON} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_BRETON} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_BRETON} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_BRETON} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/bulgarian.nsh b/dist/windows/installer-translations/bulgarian.nsi
similarity index 95%
rename from dist/windows/installer-translations/bulgarian.nsh
rename to dist/windows/installer-translations/bulgarian.nsi
index d3e9eb7e3..a1a955b14 100644
--- a/dist/windows/installer-translations/bulgarian.nsh
+++ b/dist/windows/installer-translations/bulgarian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_BULGARIAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_BULGARIAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_BULGARIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_BULGARIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_BULGARIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/catalan.nsh b/dist/windows/installer-translations/catalan.nsi
similarity index 95%
rename from dist/windows/installer-translations/catalan.nsh
rename to dist/windows/installer-translations/catalan.nsi
index f061c7eec..4ab34c3b1 100644
--- a/dist/windows/installer-translations/catalan.nsh
+++ b/dist/windows/installer-translations/catalan.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_CATALAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_CATALAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_CATALAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_CATALAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_CATALAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/croatian.nsh b/dist/windows/installer-translations/croatian.nsi
similarity index 95%
rename from dist/windows/installer-translations/croatian.nsh
rename to dist/windows/installer-translations/croatian.nsi
index b7e435891..481bf373f 100644
--- a/dist/windows/installer-translations/croatian.nsh
+++ b/dist/windows/installer-translations/croatian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_CROATIAN} "Deinstaliraj prethodnu verziju."
LangString launch_qbt ${LANG_CROATIAN} "Pokreni qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_CROATIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_CROATIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_CROATIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/czech.nsh b/dist/windows/installer-translations/czech.nsi
similarity index 95%
rename from dist/windows/installer-translations/czech.nsh
rename to dist/windows/installer-translations/czech.nsi
index 686b996c4..8fc42480f 100644
--- a/dist/windows/installer-translations/czech.nsh
+++ b/dist/windows/installer-translations/czech.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_CZECH} "Odinstalace předchozí verze."
LangString launch_qbt ${LANG_CZECH} "Spustit qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_CZECH} "Tento instalátor funguje pouze v 64-bit Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_CZECH} "Tato verze qBittorrent vyžaduje minimálně Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_CZECH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/danish.nsh b/dist/windows/installer-translations/danish.nsi
similarity index 95%
rename from dist/windows/installer-translations/danish.nsh
rename to dist/windows/installer-translations/danish.nsi
index b97d59511..aad04f0ed 100644
--- a/dist/windows/installer-translations/danish.nsh
+++ b/dist/windows/installer-translations/danish.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_DANISH} "Afinstallerer tidligere version."
LangString launch_qbt ${LANG_DANISH} "Start qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_DANISH} "Installationsprogrammet virker kun i Windows-versioner som er 64-bit."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_DANISH} "qBittorrent-versionen kræver mindst Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_DANISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/dutch.nsh b/dist/windows/installer-translations/dutch.nsi
similarity index 95%
rename from dist/windows/installer-translations/dutch.nsh
rename to dist/windows/installer-translations/dutch.nsi
index 9406e53a2..507f219e0 100644
--- a/dist/windows/installer-translations/dutch.nsh
+++ b/dist/windows/installer-translations/dutch.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_DUTCH} "Vorige versie verwijderen."
LangString launch_qbt ${LANG_DUTCH} "qBittorrent starten."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_DUTCH} "Dit installatieprogramma werkt alleen in 64-bit Windows-versies."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_DUTCH} "Deze versie van qBittorrent vereist ten minste Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_DUTCH} "Dit installatieprogramma vereist ten minste Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/english.nsh b/dist/windows/installer-translations/english.nsi
similarity index 95%
rename from dist/windows/installer-translations/english.nsh
rename to dist/windows/installer-translations/english.nsi
index b359f0486..3450d9f9d 100644
--- a/dist/windows/installer-translations/english.nsh
+++ b/dist/windows/installer-translations/english.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/esperanto.nsh b/dist/windows/installer-translations/esperanto.nsi
similarity index 95%
rename from dist/windows/installer-translations/esperanto.nsh
rename to dist/windows/installer-translations/esperanto.nsi
index cff4aa035..cbc02f334 100644
--- a/dist/windows/installer-translations/esperanto.nsh
+++ b/dist/windows/installer-translations/esperanto.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_ESPERANTO} "Uninstalling previous version."
LangString launch_qbt ${LANG_ESPERANTO} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ESPERANTO} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_ESPERANTO} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_ESPERANTO} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/estonian.nsh b/dist/windows/installer-translations/estonian.nsi
similarity index 95%
rename from dist/windows/installer-translations/estonian.nsh
rename to dist/windows/installer-translations/estonian.nsi
index 4ca234707..2d8250730 100644
--- a/dist/windows/installer-translations/estonian.nsh
+++ b/dist/windows/installer-translations/estonian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_ESTONIAN} "Desinstallitakse eelmist versiooni."
LangString launch_qbt ${LANG_ESTONIAN} "Käivita qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ESTONIAN} "See installer töötab ainult 64-bit Windowsi versioonides."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_ESTONIAN} "Selle qBittorrenti versiooni jaoks on vajalik vähemalt Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_ESTONIAN} "Selle installeri jaoks on vajalik vähemalt Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/farsi.nsh b/dist/windows/installer-translations/farsi.nsi
similarity index 95%
rename from dist/windows/installer-translations/farsi.nsh
rename to dist/windows/installer-translations/farsi.nsi
index 8851a833e..819ccc1fd 100644
--- a/dist/windows/installer-translations/farsi.nsh
+++ b/dist/windows/installer-translations/farsi.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_FARSI} "Uninstalling previous version."
LangString launch_qbt ${LANG_FARSI} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_FARSI} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_FARSI} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_FARSI} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/finnish.nsh b/dist/windows/installer-translations/finnish.nsi
similarity index 95%
rename from dist/windows/installer-translations/finnish.nsh
rename to dist/windows/installer-translations/finnish.nsi
index 1645d7548..cf8815275 100644
--- a/dist/windows/installer-translations/finnish.nsh
+++ b/dist/windows/installer-translations/finnish.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_FINNISH} "Poistetaan aiempi asennus."
LangString launch_qbt ${LANG_FINNISH} "Käynnistä qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_FINNISH} "Tämä asennusohjelma toimii vain 64-bittisellä Windowsin versiolla."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_FINNISH} "Tämä qBittorrent versio tarvitsee vähintään Windows 7:n."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_FINNISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/french.nsh b/dist/windows/installer-translations/french.nsi
similarity index 89%
rename from dist/windows/installer-translations/french.nsh
rename to dist/windows/installer-translations/french.nsi
index fc7c4efe7..3685f8d7a 100644
--- a/dist/windows/installer-translations/french.nsh
+++ b/dist/windows/installer-translations/french.nsi
@@ -3,9 +3,9 @@
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_FRENCH} "qBittorrent (requis)"
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
-LangString inst_desktop ${LANG_FRENCH} "Créer un raccourci sur le Bureau"
+LangString inst_desktop ${LANG_FRENCH} "Créer un Raccourci sur le Bureau"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
-LangString inst_startmenu ${LANG_FRENCH} "Créer un raccourci dans le Menu Démarrer"
+LangString inst_startmenu ${LANG_FRENCH} "Créer un Raccourci dans le Menu Démarrer"
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
LangString inst_startup ${LANG_FRENCH} "Démarrer qBittorrent au démarrage de Windows"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_FRENCH} "Désinstallation de la version antérieure
LangString launch_qbt ${LANG_FRENCH} "Lancer qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_FRENCH} "Cet installateur ne fonctionne que dans les versions 64 bits de Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_FRENCH} "Cette version de qBittorrent nécessite au moins Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_FRENCH} "Cet installateur nécessite au moins Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
@@ -55,6 +57,6 @@ LangString remove_cache ${LANG_FRENCH} "Supprimer les torrents et données en ca
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_FRENCH} "qBittorrent est en cours d'exécution. Fermez l'application avant de la désinstaller."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
-LangString uninst_tor_warn ${LANG_FRENCH} "Impossible de supprimer l'association .torrent. Elle est associée avec :"
+LangString uninst_tor_warn ${LANG_FRENCH} "Ne peut pas supprimer l'association du .torrent. Elle est associée avec :"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
-LangString uninst_mag_warn ${LANG_FRENCH} "Impossible de supprimer l'association magnet. Elle est associée avec :"
+LangString uninst_mag_warn ${LANG_FRENCH} "Ne peut pas supprimer l'association du magnet. Elle est associée avec :"
diff --git a/dist/windows/installer-translations/galician.nsh b/dist/windows/installer-translations/galician.nsi
similarity index 95%
rename from dist/windows/installer-translations/galician.nsh
rename to dist/windows/installer-translations/galician.nsi
index 8eaa3085f..35abdf15c 100644
--- a/dist/windows/installer-translations/galician.nsh
+++ b/dist/windows/installer-translations/galician.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_GALICIAN} "Desinstalando a versión anterior."
LangString launch_qbt ${LANG_GALICIAN} "Iniciar qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_GALICIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_GALICIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_GALICIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/german.nsh b/dist/windows/installer-translations/german.nsi
similarity index 95%
rename from dist/windows/installer-translations/german.nsh
rename to dist/windows/installer-translations/german.nsi
index 80f64e40e..957d76d05 100644
--- a/dist/windows/installer-translations/german.nsh
+++ b/dist/windows/installer-translations/german.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_GERMAN} "Vorherige Version wird deinstalliert."
LangString launch_qbt ${LANG_GERMAN} "Starte qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_GERMAN} "Diese Installation funktioniert nur mit einer 64-bit Version von Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_GERMAN} "Diese Version von qBittorrent erfordert mindestens Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_GERMAN} "Diese Installation erfordert mindestens Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/greek.nsh b/dist/windows/installer-translations/greek.nsi
similarity index 96%
rename from dist/windows/installer-translations/greek.nsh
rename to dist/windows/installer-translations/greek.nsi
index 77800e4e3..798ea87de 100644
--- a/dist/windows/installer-translations/greek.nsh
+++ b/dist/windows/installer-translations/greek.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_GREEK} "Γίνεται απεγκατάσταση
LangString launch_qbt ${LANG_GREEK} "Εκκίνηση του qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_GREEK} "Αυτό το αρχείο εγκατάστασης λειτουργεί μόνο σε 64-bit εκδόσεις των Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_GREEK} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_GREEK} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/hebrew.nsh b/dist/windows/installer-translations/hebrew.nsi
similarity index 100%
rename from dist/windows/installer-translations/hebrew.nsh
rename to dist/windows/installer-translations/hebrew.nsi
diff --git a/dist/windows/installer-translations/hungarian.nsh b/dist/windows/installer-translations/hungarian.nsi
similarity index 93%
rename from dist/windows/installer-translations/hungarian.nsh
rename to dist/windows/installer-translations/hungarian.nsi
index b3580a2bd..6536c3a85 100644
--- a/dist/windows/installer-translations/hungarian.nsh
+++ b/dist/windows/installer-translations/hungarian.nsi
@@ -28,8 +28,10 @@ LangString inst_unist ${LANG_HUNGARIAN} "Előző verzió eltávolítása."
LangString launch_qbt ${LANG_HUNGARIAN} "qBittorrent indítása."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_HUNGARIAN} "A telepítő csak 64-bites Windows verziókon működik."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_HUNGARIAN} "A qBittorrent ezen verziójához minimum Windows 7 szükséges."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
-LangString inst_requires_win10 ${LANG_HUNGARIAN} "A telepítéshez minimum Windows 10 (1809) / Windows Server 2019 szükséges."
+LangString inst_requires_win10 ${LANG_HUNGARIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
LangString inst_uninstall_link_description ${LANG_HUNGARIAN} "qBittorrent eltávolítása"
diff --git a/dist/windows/installer-translations/icelandic.nsh b/dist/windows/installer-translations/icelandic.nsi
similarity index 95%
rename from dist/windows/installer-translations/icelandic.nsh
rename to dist/windows/installer-translations/icelandic.nsi
index b9415596a..b4d93fcdf 100644
--- a/dist/windows/installer-translations/icelandic.nsh
+++ b/dist/windows/installer-translations/icelandic.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_ICELANDIC} "Uninstalling previous version."
LangString launch_qbt ${LANG_ICELANDIC} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ICELANDIC} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_ICELANDIC} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_ICELANDIC} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/indonesian.nsh b/dist/windows/installer-translations/indonesian.nsi
similarity index 95%
rename from dist/windows/installer-translations/indonesian.nsh
rename to dist/windows/installer-translations/indonesian.nsi
index 8e96f66bd..cf8343119 100644
--- a/dist/windows/installer-translations/indonesian.nsh
+++ b/dist/windows/installer-translations/indonesian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_INDONESIAN} "Menghapus versi sebelumnya."
LangString launch_qbt ${LANG_INDONESIAN} "Buka qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_INDONESIAN} "Aplikasi ini hanya berjalan pada versi Windows 64-bit."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_INDONESIAN} "Versi qBittorrent ini membutuhkan setidaknya Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_INDONESIAN} "Penginstal ini membutuhkan setidaknya Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/irish.nsh b/dist/windows/installer-translations/irish.nsi
similarity index 95%
rename from dist/windows/installer-translations/irish.nsh
rename to dist/windows/installer-translations/irish.nsi
index 17bea6893..1468f896c 100644
--- a/dist/windows/installer-translations/irish.nsh
+++ b/dist/windows/installer-translations/irish.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_IRISH} "Uninstalling previous version."
LangString launch_qbt ${LANG_IRISH} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_IRISH} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_IRISH} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_IRISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/italian.nsh b/dist/windows/installer-translations/italian.nsi
similarity index 93%
rename from dist/windows/installer-translations/italian.nsh
rename to dist/windows/installer-translations/italian.nsi
index 2668dc5ca..78c143c59 100644
--- a/dist/windows/installer-translations/italian.nsh
+++ b/dist/windows/installer-translations/italian.nsi
@@ -28,8 +28,10 @@ LangString inst_unist ${LANG_ITALIAN} "Disinstallazione versione precedente."
LangString launch_qbt ${LANG_ITALIAN} "Esegui qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ITALIAN} "Questo installer funziona solo con versioni di Windows a 64bit."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_ITALIAN} "Questa versione di qBittorrent richiede Windows 7 o versioni successive."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
-LangString inst_requires_win10 ${LANG_ITALIAN} "Questo installer richiede almeno Windows 10 (1809) / Windows Server 2019."
+LangString inst_requires_win10 ${LANG_ITALIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
LangString inst_uninstall_link_description ${LANG_ITALIAN} "Disinstalla qBittorrent"
diff --git a/dist/windows/installer-translations/japanese.nsh b/dist/windows/installer-translations/japanese.nsi
similarity index 95%
rename from dist/windows/installer-translations/japanese.nsh
rename to dist/windows/installer-translations/japanese.nsi
index 8cfef7bf9..7f7eeacff 100644
--- a/dist/windows/installer-translations/japanese.nsh
+++ b/dist/windows/installer-translations/japanese.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_JAPANESE} "以前のバージョンをアンイン
LangString launch_qbt ${LANG_JAPANESE} "qBittorrent を起動"
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_JAPANESE} "このインストーラは 64 ビット版の Windows でのみ実行できます。"
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_JAPANESE} "このバージョンの qBittorrent には Windows 7 以降が必要です。"
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_JAPANESE} "このインストーラの実行には Windows 10 (1809) / Windows Server 2019 以降が必要です。"
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/korean.nsh b/dist/windows/installer-translations/korean.nsi
similarity index 95%
rename from dist/windows/installer-translations/korean.nsh
rename to dist/windows/installer-translations/korean.nsi
index db0fddf6d..36f605cff 100644
--- a/dist/windows/installer-translations/korean.nsh
+++ b/dist/windows/installer-translations/korean.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_KOREAN} "이전 버전을 제거하는 중입니다
LangString launch_qbt ${LANG_KOREAN} "qBittorrent를 실행합니다."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_KOREAN} "이 설치 프로그램은 64비트 Windows 버전에서만 작동합니다."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_KOREAN} "이 qBittorrent 버전에는 Windows 7 이상이 필요합니다."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_KOREAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/kurdish.nsh b/dist/windows/installer-translations/kurdish.nsi
similarity index 95%
rename from dist/windows/installer-translations/kurdish.nsh
rename to dist/windows/installer-translations/kurdish.nsi
index c9804082c..d876f8389 100644
--- a/dist/windows/installer-translations/kurdish.nsh
+++ b/dist/windows/installer-translations/kurdish.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_KURDISH} "Uninstalling previous version."
LangString launch_qbt ${LANG_KURDISH} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_KURDISH} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_KURDISH} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_KURDISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/latvian.nsh b/dist/windows/installer-translations/latvian.nsi
similarity index 95%
rename from dist/windows/installer-translations/latvian.nsh
rename to dist/windows/installer-translations/latvian.nsi
index 0f762f888..e4ef707c6 100644
--- a/dist/windows/installer-translations/latvian.nsh
+++ b/dist/windows/installer-translations/latvian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_LATVIAN} "Iepriekšējās versijas atinstalēšana.
LangString launch_qbt ${LANG_LATVIAN} "Palaist qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_LATVIAN} "Šī instalēšanas programma darbojas tikai 64 bitu Windows versijās."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_LATVIAN} "Šai qBittorrent versijai ir nepieciešama vismaz Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_LATVIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/lithuanian.nsh b/dist/windows/installer-translations/lithuanian.nsi
similarity index 96%
rename from dist/windows/installer-translations/lithuanian.nsh
rename to dist/windows/installer-translations/lithuanian.nsi
index 1748ecabb..c4ed2bea0 100644
--- a/dist/windows/installer-translations/lithuanian.nsh
+++ b/dist/windows/installer-translations/lithuanian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_LITHUANIAN} "Šalinama ankstesnė versija."
LangString launch_qbt ${LANG_LITHUANIAN} "Paleisti qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_LITHUANIAN} "Šis įdiegėjas veikia tik su 64 bitų Windows versija."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_LITHUANIAN} "Ši qBittorent versija reikalauja bent Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_LITHUANIAN} "Šis įdiegėjas reikalauja bent Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/luxembourgish.nsh b/dist/windows/installer-translations/luxembourgish.nsh
deleted file mode 100644
index 4a30e954a..000000000
--- a/dist/windows/installer-translations/luxembourgish.nsh
+++ /dev/null
@@ -1,60 +0,0 @@
-;Installer strings
-
-;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
-LangString inst_qbt_req ${LANG_LUXEMBOURGISH} "qBittorrent (noutwendeg)"
-;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
-LangString inst_desktop ${LANG_LUXEMBOURGISH} "Verknëppung um Desktop erstellen"
-;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
-LangString inst_startmenu ${LANG_LUXEMBOURGISH} "Verknëppung am Startmenü erstellen"
-;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
-LangString inst_startup ${LANG_LUXEMBOURGISH} "qBittorrent mat Windows starten"
-;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
-LangString inst_torrent ${LANG_LUXEMBOURGISH} ".torrent-Dateien mat qBittorrent opmaachen"
-;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
-LangString inst_magnet ${LANG_LUXEMBOURGISH} "Magnet-Linken mat qBittorrent opmaachen"
-;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
-LangString inst_firewall ${LANG_LUXEMBOURGISH} "Reegel an der Windows Firewall dobäisetzen"
-;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
-LangString inst_pathlimit ${LANG_LUXEMBOURGISH} "D'Windows path length (Padlängtbeschränkung) desaktivéieren (260 Zeechen MAX_PATH Beschränkung, erfuerdert min. Windows 10 1607)"
-;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
-LangString inst_firewallinfo ${LANG_LUXEMBOURGISH} "Reegel an der Windows Firewall dobäisetzen"
-;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
-LangString inst_warning ${LANG_LUXEMBOURGISH} "qBittorrent leeft grad. W.e.g. d'Applikatioun zoumaachen ier installéiert gëtt."
-;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
-LangString inst_uninstall_question ${LANG_LUXEMBOURGISH} "Aktuell Versioun gëtt deinstalléiert. Benotzerastellungen a Torrents bleiwen erhalen."
-;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
-LangString inst_unist ${LANG_LUXEMBOURGISH} "Vireg Versioun gëtt deinstalléiert."
-;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
-LangString launch_qbt ${LANG_LUXEMBOURGISH} "qBittorrent starten."
-;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
-LangString inst_requires_64bit ${LANG_LUXEMBOURGISH} "Dësen Installateur funktionnéiert nëmmen mat 64-Bit Windows Versiounen."
-;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 1809."
-LangString inst_requires_win10 ${LANG_LUXEMBOURGISH} "Dësen Installateur erfuerdert mindestens Windows 10 (1809) / Windows Server 2019."
-;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
-LangString inst_uninstall_link_description ${LANG_LUXEMBOURGISH} "qBittorrent deinstalléieren"
-
-;------------------------------------
-;Uninstaller strings
-
-;LangString remove_files ${LANG_ENGLISH} "Remove files"
-LangString remove_files ${LANG_LUXEMBOURGISH} "Dateien läschen"
-;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
-LangString remove_shortcuts ${LANG_LUXEMBOURGISH} "Verknëppungen läschen"
-;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
-LangString remove_associations ${LANG_LUXEMBOURGISH} "Dateiverknëppungen läschen"
-;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
-LangString remove_registry ${LANG_LUXEMBOURGISH} "Registry-Schlësselen läschen"
-;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
-LangString remove_conf ${LANG_LUXEMBOURGISH} "Konfiguratiounsdateien läschen"
-;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
-LangString remove_firewall ${LANG_LUXEMBOURGISH} "Reegel an der Windows Firewall läschen"
-;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
-LangString remove_firewallinfo ${LANG_LUXEMBOURGISH} "Reegel aus der Windows Firewall läschen"
-;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
-LangString remove_cache ${LANG_LUXEMBOURGISH} "Torrenten a zwëschegespäichert Donnéeën läschen"
-;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
-LangString uninst_warning ${LANG_LUXEMBOURGISH} "qBittorrent leeft grad. W.e.g. d'Applikatioun zoumaachen ier deinstalléiert gëtt."
-;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
-LangString uninst_tor_warn ${LANG_LUXEMBOURGISH} "Dateiverknëppung mat der .torrent-Datei gëtt net ewechgeholl, se ass nach verbonnen mat:"
-;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
-LangString uninst_mag_warn ${LANG_LUXEMBOURGISH} "Dateiverknëppung mat Magnet-Link gëtt net ewechgeholl, se ass nach verbonnen mat:"
diff --git a/dist/windows/installer-translations/luxembourgish.nsi b/dist/windows/installer-translations/luxembourgish.nsi
new file mode 100644
index 000000000..766d68533
--- /dev/null
+++ b/dist/windows/installer-translations/luxembourgish.nsi
@@ -0,0 +1,62 @@
+;Installer strings
+
+;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
+LangString inst_qbt_req ${LANG_LUXEMBOURGISH} "qBittorrent (required)"
+;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
+LangString inst_desktop ${LANG_LUXEMBOURGISH} "Create Desktop Shortcut"
+;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
+LangString inst_startmenu ${LANG_LUXEMBOURGISH} "Create Start Menu Shortcut"
+;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
+LangString inst_startup ${LANG_LUXEMBOURGISH} "Start qBittorrent on Windows start up"
+;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
+LangString inst_torrent ${LANG_LUXEMBOURGISH} "Open .torrent files with qBittorrent"
+;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
+LangString inst_magnet ${LANG_LUXEMBOURGISH} "Open magnet links with qBittorrent"
+;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
+LangString inst_firewall ${LANG_LUXEMBOURGISH} "Add Windows Firewall rule"
+;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
+LangString inst_pathlimit ${LANG_LUXEMBOURGISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
+;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
+LangString inst_firewallinfo ${LANG_LUXEMBOURGISH} "Adding Windows Firewall rule"
+;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
+LangString inst_warning ${LANG_LUXEMBOURGISH} "qBittorrent is running. Please close the application before installing."
+;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
+LangString inst_uninstall_question ${LANG_LUXEMBOURGISH} "Current version will be uninstalled. User settings and torrents will remain intact."
+;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
+LangString inst_unist ${LANG_LUXEMBOURGISH} "Uninstalling previous version."
+;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
+LangString launch_qbt ${LANG_LUXEMBOURGISH} "Launch qBittorrent."
+;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
+LangString inst_requires_64bit ${LANG_LUXEMBOURGISH} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_LUXEMBOURGISH} "This qBittorrent version requires at least Windows 7."
+;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
+LangString inst_requires_win10 ${LANG_LUXEMBOURGISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
+;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
+LangString inst_uninstall_link_description ${LANG_LUXEMBOURGISH} "Uninstall qBittorrent"
+
+;------------------------------------
+;Uninstaller strings
+
+;LangString remove_files ${LANG_ENGLISH} "Remove files"
+LangString remove_files ${LANG_LUXEMBOURGISH} "Remove files"
+;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
+LangString remove_shortcuts ${LANG_LUXEMBOURGISH} "Remove shortcuts"
+;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
+LangString remove_associations ${LANG_LUXEMBOURGISH} "Remove file associations"
+;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
+LangString remove_registry ${LANG_LUXEMBOURGISH} "Remove registry keys"
+;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
+LangString remove_conf ${LANG_LUXEMBOURGISH} "Remove configuration files"
+;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
+LangString remove_firewall ${LANG_LUXEMBOURGISH} "Remove Windows Firewall rule"
+;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
+LangString remove_firewallinfo ${LANG_LUXEMBOURGISH} "Removing Windows Firewall rule"
+;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
+LangString remove_cache ${LANG_LUXEMBOURGISH} "Remove torrents and cached data"
+;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
+LangString uninst_warning ${LANG_LUXEMBOURGISH} "qBittorrent is running. Please close the application before uninstalling."
+;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
+LangString uninst_tor_warn ${LANG_LUXEMBOURGISH} "Not removing .torrent association. It is associated with:"
+;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
+LangString uninst_mag_warn ${LANG_LUXEMBOURGISH} "Not removing magnet association. It is associated with:"
diff --git a/dist/windows/installer-translations/macedonian.nsh b/dist/windows/installer-translations/macedonian.nsi
similarity index 95%
rename from dist/windows/installer-translations/macedonian.nsh
rename to dist/windows/installer-translations/macedonian.nsi
index 2d8083352..424c86b2f 100644
--- a/dist/windows/installer-translations/macedonian.nsh
+++ b/dist/windows/installer-translations/macedonian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_MACEDONIAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_MACEDONIAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_MACEDONIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_MACEDONIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_MACEDONIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/malay.nsh b/dist/windows/installer-translations/malay.nsi
similarity index 95%
rename from dist/windows/installer-translations/malay.nsh
rename to dist/windows/installer-translations/malay.nsi
index 2bf915d8b..e3cd5ebee 100644
--- a/dist/windows/installer-translations/malay.nsh
+++ b/dist/windows/installer-translations/malay.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_MALAY} "Uninstalling previous version."
LangString launch_qbt ${LANG_MALAY} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_MALAY} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_MALAY} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_MALAY} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/mongolian.nsh b/dist/windows/installer-translations/mongolian.nsi
similarity index 95%
rename from dist/windows/installer-translations/mongolian.nsh
rename to dist/windows/installer-translations/mongolian.nsi
index a11115504..794d027d1 100644
--- a/dist/windows/installer-translations/mongolian.nsh
+++ b/dist/windows/installer-translations/mongolian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_MONGOLIAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_MONGOLIAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_MONGOLIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_MONGOLIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_MONGOLIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/norwegian.nsh b/dist/windows/installer-translations/norwegian.nsi
similarity index 95%
rename from dist/windows/installer-translations/norwegian.nsh
rename to dist/windows/installer-translations/norwegian.nsi
index 5406cf7e8..b65e110c1 100644
--- a/dist/windows/installer-translations/norwegian.nsh
+++ b/dist/windows/installer-translations/norwegian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_NORWEGIAN} "Avinstallerer forrige versjon."
LangString launch_qbt ${LANG_NORWEGIAN} "Sett i gang qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_NORWEGIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_NORWEGIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_NORWEGIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/norwegiannynorsk.nsh b/dist/windows/installer-translations/norwegiannynorsk.nsi
similarity index 95%
rename from dist/windows/installer-translations/norwegiannynorsk.nsh
rename to dist/windows/installer-translations/norwegiannynorsk.nsi
index 705edd98b..daf0475d6 100644
--- a/dist/windows/installer-translations/norwegiannynorsk.nsh
+++ b/dist/windows/installer-translations/norwegiannynorsk.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_NORWEGIANNYNORSK} "Uninstalling previous version."
LangString launch_qbt ${LANG_NORWEGIANNYNORSK} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_NORWEGIANNYNORSK} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_NORWEGIANNYNORSK} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_NORWEGIANNYNORSK} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/polish.nsh b/dist/windows/installer-translations/polish.nsi
similarity index 95%
rename from dist/windows/installer-translations/polish.nsh
rename to dist/windows/installer-translations/polish.nsi
index f4a235ee7..a1731137e 100644
--- a/dist/windows/installer-translations/polish.nsh
+++ b/dist/windows/installer-translations/polish.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_POLISH} "Odinstalowywanie poprzedniej wersji."
LangString launch_qbt ${LANG_POLISH} "Uruchom qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_POLISH} "Ten instalator działa tylko w 64-bitowych wersjach systemu Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_POLISH} "Ta wersja qBittorrent wymaga co najmniej systemu Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_POLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/portuguese.nsh b/dist/windows/installer-translations/portuguese.nsi
similarity index 92%
rename from dist/windows/installer-translations/portuguese.nsh
rename to dist/windows/installer-translations/portuguese.nsi
index c149119f4..ea9d45f03 100644
--- a/dist/windows/installer-translations/portuguese.nsh
+++ b/dist/windows/installer-translations/portuguese.nsi
@@ -7,7 +7,7 @@ LangString inst_desktop ${LANG_PORTUGUESE} "Criar atalho no ambiente de trabalho
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_PORTUGUESE} "Criar atalho no menu Iniciar"
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
-LangString inst_startup ${LANG_PORTUGUESE} "Iniciar o qBittorrent no arranque do Windows"
+LangString inst_startup ${LANG_PORTUGUESE} "Iniciar o qBittorrent na inicialização do Windows"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_PORTUGUESE} "Abrir ficheiros .torrent com o qBittorrent"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
@@ -28,8 +28,10 @@ LangString inst_unist ${LANG_PORTUGUESE} "A desinstalar versão anterior."
LangString launch_qbt ${LANG_PORTUGUESE} "Iniciar qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_PORTUGUESE} "Este instalador funciona apenas em versões Windows de 64 bits."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_PORTUGUESE} "Esta versão qBittorrent requer pelo menos o Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
-LangString inst_requires_win10 ${LANG_PORTUGUESE} "Este instalador requer, pelo menos, o Windows 10 (1809) / Windows Server 2019."
+LangString inst_requires_win10 ${LANG_PORTUGUESE} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
LangString inst_uninstall_link_description ${LANG_PORTUGUESE} "Desinstalar qBittorrent"
diff --git a/dist/windows/installer-translations/portugueseBR.nsh b/dist/windows/installer-translations/portugueseBR.nsi
similarity index 95%
rename from dist/windows/installer-translations/portugueseBR.nsh
rename to dist/windows/installer-translations/portugueseBR.nsi
index ef79df94c..ba1438fa4 100644
--- a/dist/windows/installer-translations/portugueseBR.nsh
+++ b/dist/windows/installer-translations/portugueseBR.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_PORTUGUESEBR} "Desinstalando a versão anterior."
LangString launch_qbt ${LANG_PORTUGUESEBR} "Executar o qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_PORTUGUESEBR} "Este instalador só funciona nas versões 64 bits do Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_PORTUGUESEBR} "Esta versão do qBittorrent requer no mínimo o Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_PORTUGUESEBR} "Este instalador requer no mínimo o Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/romanian.nsh b/dist/windows/installer-translations/romanian.nsi
similarity index 95%
rename from dist/windows/installer-translations/romanian.nsh
rename to dist/windows/installer-translations/romanian.nsi
index e60d51da9..ac6d9d21e 100644
--- a/dist/windows/installer-translations/romanian.nsh
+++ b/dist/windows/installer-translations/romanian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_ROMANIAN} "Se dezinstalează versiunea anterioară.
LangString launch_qbt ${LANG_ROMANIAN} "Lansați qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ROMANIAN} "Acest program de instalare funcționează doar pe versiunile Windows pe 64 de biți."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_ROMANIAN} "Această versiune de qBittorrent necesită cel puțin Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_ROMANIAN} "Acest program de instalare necesită cel puțin Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/russian.nsh b/dist/windows/installer-translations/russian.nsi
similarity index 95%
rename from dist/windows/installer-translations/russian.nsh
rename to dist/windows/installer-translations/russian.nsi
index 01b7e67f6..f231eb69a 100644
--- a/dist/windows/installer-translations/russian.nsh
+++ b/dist/windows/installer-translations/russian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_RUSSIAN} "Удаляется старая верс
LangString launch_qbt ${LANG_RUSSIAN} "Запустить qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_RUSSIAN} "Этот установщик работает только на 64-битных версиях Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_RUSSIAN} "Для работы этой версии qBittorrent требуется Windows 7 или выше."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_RUSSIAN} "Для работы этого установщика требуется Windows 10 (1809) / Windows Server 2019 или выше."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/serbian.nsh b/dist/windows/installer-translations/serbian.nsi
similarity index 95%
rename from dist/windows/installer-translations/serbian.nsh
rename to dist/windows/installer-translations/serbian.nsi
index e21b016f2..72774d355 100644
--- a/dist/windows/installer-translations/serbian.nsh
+++ b/dist/windows/installer-translations/serbian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_SERBIAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_SERBIAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SERBIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SERBIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_SERBIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/serbianlatin.nsh b/dist/windows/installer-translations/serbianlatin.nsi
similarity index 95%
rename from dist/windows/installer-translations/serbianlatin.nsh
rename to dist/windows/installer-translations/serbianlatin.nsi
index 4509120c6..282fbc6b1 100644
--- a/dist/windows/installer-translations/serbianlatin.nsh
+++ b/dist/windows/installer-translations/serbianlatin.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_SERBIANLATIN} "Uninstalling previous version."
LangString launch_qbt ${LANG_SERBIANLATIN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SERBIANLATIN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SERBIANLATIN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_SERBIANLATIN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/simpchinese.nsh b/dist/windows/installer-translations/simpchinese.nsi
similarity index 91%
rename from dist/windows/installer-translations/simpchinese.nsh
rename to dist/windows/installer-translations/simpchinese.nsi
index f0256e046..9459dab3b 100644
--- a/dist/windows/installer-translations/simpchinese.nsh
+++ b/dist/windows/installer-translations/simpchinese.nsi
@@ -23,13 +23,15 @@ LangString inst_warning ${LANG_SIMPCHINESE} "qBittorrent 正在运行。 安装
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
LangString inst_uninstall_question ${LANG_SIMPCHINESE} "当前版本会被卸载。 用户设置和种子会被完整保留。"
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
-LangString inst_unist ${LANG_SIMPCHINESE} "正在卸载以前的版本。"
+LangString inst_unist ${LANG_SIMPCHINESE} "卸载以前的版本。"
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_SIMPCHINESE} "启动 qBittorrent。"
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SIMPCHINESE} "此安装程序仅支持 64 位 Windows 系统。"
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SIMPCHINESE} "这个版本的 qBittorrent 仅支持 Windows 7 及更新的系统。"
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
-LangString inst_requires_win10 ${LANG_SIMPCHINESE} "此安装程序仅支持 Windows 10 (1809) / Windows Server 2019 或更新的系统。"
+LangString inst_requires_win10 ${LANG_SIMPCHINESE} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
LangString inst_uninstall_link_description ${LANG_SIMPCHINESE} "卸载 qBittorrent"
diff --git a/dist/windows/installer-translations/slovak.nsh b/dist/windows/installer-translations/slovak.nsi
similarity index 95%
rename from dist/windows/installer-translations/slovak.nsh
rename to dist/windows/installer-translations/slovak.nsi
index fd960b65b..b3a97a739 100644
--- a/dist/windows/installer-translations/slovak.nsh
+++ b/dist/windows/installer-translations/slovak.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_SLOVAK} "Odinštalácia predchádzajúcej verzie."
LangString launch_qbt ${LANG_SLOVAK} "Spustiť qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SLOVAK} "Táto inštalácia funguje iba na 64-bitových verziách Windowsu."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SLOVAK} "Táto qBittorrent verzia vyžaduje aspoň Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_SLOVAK} "Tento inštalátor vyžaduje aspoň Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/slovenian.nsh b/dist/windows/installer-translations/slovenian.nsi
similarity index 95%
rename from dist/windows/installer-translations/slovenian.nsh
rename to dist/windows/installer-translations/slovenian.nsi
index 9a1e481e2..af319a487 100644
--- a/dist/windows/installer-translations/slovenian.nsh
+++ b/dist/windows/installer-translations/slovenian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_SLOVENIAN} "Uninstalling previous version."
LangString launch_qbt ${LANG_SLOVENIAN} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SLOVENIAN} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SLOVENIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_SLOVENIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/spanish.nsh b/dist/windows/installer-translations/spanish.nsi
similarity index 95%
rename from dist/windows/installer-translations/spanish.nsh
rename to dist/windows/installer-translations/spanish.nsi
index 9749a0bea..b0c842617 100644
--- a/dist/windows/installer-translations/spanish.nsh
+++ b/dist/windows/installer-translations/spanish.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_SPANISH} "Desinstalando la versión anterior."
LangString launch_qbt ${LANG_SPANISH} "Iniciar qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SPANISH} "Este instalador solo funciona en versiones de 64-bit de Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SPANISH} "Esta versión de qBittorrent requiere Windows 7 o superior."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_SPANISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/spanishinternational.nsh b/dist/windows/installer-translations/spanishinternational.nsi
similarity index 95%
rename from dist/windows/installer-translations/spanishinternational.nsh
rename to dist/windows/installer-translations/spanishinternational.nsi
index 904d86061..7927c00b9 100644
--- a/dist/windows/installer-translations/spanishinternational.nsh
+++ b/dist/windows/installer-translations/spanishinternational.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_SPANISHINTERNATIONAL} "Desinstalando la versión an
LangString launch_qbt ${LANG_SPANISHINTERNATIONAL} "Iniciar qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SPANISHINTERNATIONAL} "Este instalador solo funciona en versiones de 64-bit de Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SPANISHINTERNATIONAL} "Esta versión de qBittorrent requiere Windows 7 o superior."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_SPANISHINTERNATIONAL} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/swedish.nsh b/dist/windows/installer-translations/swedish.nsi
similarity index 87%
rename from dist/windows/installer-translations/swedish.nsh
rename to dist/windows/installer-translations/swedish.nsi
index 51912d112..3b8032c23 100644
--- a/dist/windows/installer-translations/swedish.nsh
+++ b/dist/windows/installer-translations/swedish.nsi
@@ -7,27 +7,29 @@ LangString inst_desktop ${LANG_SWEDISH} "Skapa skrivbordsgenväg"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_SWEDISH} "Skapa startmenygenväg"
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
-LangString inst_startup ${LANG_SWEDISH} "Starta qBittorrent vid Windows-uppstart"
+LangString inst_startup ${LANG_SWEDISH} "Starta qBittorrent vid Windows start"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_SWEDISH} "Öppna .torrent-filer med qBittorrent"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
LangString inst_magnet ${LANG_SWEDISH} "Öppna magnetlänkar med qBittorrent"
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
-LangString inst_firewall ${LANG_SWEDISH} "Lägg till Windows-brandväggsregel"
+LangString inst_firewall ${LANG_SWEDISH} "Lägg till Windows-brandväggregel"
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_SWEDISH} "Inaktivera gränsen för Windows-sökvägslängd (260 tecken MAX_PATH-begränsning, kräver Windows 10 1607 eller senare)"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
-LangString inst_firewallinfo ${LANG_SWEDISH} "Lägger till Windows-brandväggsregel"
+LangString inst_firewallinfo ${LANG_SWEDISH} "Lägger till Windows-brandväggregel"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
-LangString inst_warning ${LANG_SWEDISH} "qBittorrent körs. Stäng programmet innan du installerar."
+LangString inst_warning ${LANG_SWEDISH} "qBittorrent körs. Vänligen stäng programmet innan du installerar."
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
-LangString inst_uninstall_question ${LANG_SWEDISH} "Aktuell version avinstalleras. Användarinställningar och torrenter kommer att förbli intakta."
+LangString inst_uninstall_question ${LANG_SWEDISH} "Nuvarande version avinstalleras. Användarinställningar och torrenter kommer att förbli intakta."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_SWEDISH} "Avinstallerar tidigare version."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_SWEDISH} "Kör qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_SWEDISH} "Det här installationsprogrammet fungerar endast i 64-bitars Windows-versioner."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_SWEDISH} "Den här qBittorrent-versionen kräver minst Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_SWEDISH} "Det här installationsprogrammet kräver minst Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
@@ -53,7 +55,7 @@ LangString remove_firewallinfo ${LANG_SWEDISH} "Tar bort Windows-brandväggsrege
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_SWEDISH} "Ta bort torrenter och cachade data"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
-LangString uninst_warning ${LANG_SWEDISH} "qBittorrent körs. Stäng programmet innan du avinstallerar."
+LangString uninst_warning ${LANG_SWEDISH} "qBittorrent körs. Vänligen stäng programmet innan du avinstallerar."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_SWEDISH} "Tar inte bort .torrent-association. Den är associerad med:"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
diff --git a/dist/windows/installer-translations/thai.nsh b/dist/windows/installer-translations/thai.nsi
similarity index 95%
rename from dist/windows/installer-translations/thai.nsh
rename to dist/windows/installer-translations/thai.nsi
index ac003757f..4eac8fc9c 100644
--- a/dist/windows/installer-translations/thai.nsh
+++ b/dist/windows/installer-translations/thai.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_THAI} "Uninstalling previous version."
LangString launch_qbt ${LANG_THAI} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_THAI} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_THAI} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_THAI} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/tradchinese.nsh b/dist/windows/installer-translations/tradchinese.nsi
similarity index 93%
rename from dist/windows/installer-translations/tradchinese.nsh
rename to dist/windows/installer-translations/tradchinese.nsi
index 49bcff874..d66abb388 100644
--- a/dist/windows/installer-translations/tradchinese.nsh
+++ b/dist/windows/installer-translations/tradchinese.nsi
@@ -28,8 +28,10 @@ LangString inst_unist ${LANG_TRADCHINESE} "正在移除先前版本"
LangString launch_qbt ${LANG_TRADCHINESE} "啟動 qBittorrent"
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_TRADCHINESE} "此安裝程式僅支援 64 位元版本的 Windows。"
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_TRADCHINESE} "此 qBittorrent 版本僅支援 Windows 7 以上的系統。"
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
-LangString inst_requires_win10 ${LANG_TRADCHINESE} "此安裝程式僅支援 Windows 10 (1809) / Windows Server 2019 以上的系統。"
+LangString inst_requires_win10 ${LANG_TRADCHINESE} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
LangString inst_uninstall_link_description ${LANG_TRADCHINESE} "移除 qBittorrent"
diff --git a/dist/windows/installer-translations/turkish.nsh b/dist/windows/installer-translations/turkish.nsi
similarity index 96%
rename from dist/windows/installer-translations/turkish.nsh
rename to dist/windows/installer-translations/turkish.nsi
index fd6435f5c..e7733a25f 100644
--- a/dist/windows/installer-translations/turkish.nsh
+++ b/dist/windows/installer-translations/turkish.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_TURKISH} "Önceki sürüm kaldırılıyor."
LangString launch_qbt ${LANG_TURKISH} "qBittorrent'i başlat."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_TURKISH} "Bu yükleyici sadece 64-bit Windows sürümlerinde çalışır."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_TURKISH} "Bu qBittorrent sürümü en az Windows 7 gerektirir."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_TURKISH} "Bu yükleyici en az Windows 10 (1809) / Windows Server 2019 gerektirir."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/ukrainian.nsh b/dist/windows/installer-translations/ukrainian.nsi
similarity index 96%
rename from dist/windows/installer-translations/ukrainian.nsh
rename to dist/windows/installer-translations/ukrainian.nsi
index bf6c1b283..533e24dec 100644
--- a/dist/windows/installer-translations/ukrainian.nsh
+++ b/dist/windows/installer-translations/ukrainian.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_UKRAINIAN} "Видалення попередньо
LangString launch_qbt ${LANG_UKRAINIAN} "Запустити qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_UKRAINIAN} "Ця програма установки працює тільки в 64-розрядних версіях Windows."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_UKRAINIAN} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_UKRAINIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/uzbek.nsh b/dist/windows/installer-translations/uzbek.nsi
similarity index 95%
rename from dist/windows/installer-translations/uzbek.nsh
rename to dist/windows/installer-translations/uzbek.nsi
index 138fe2717..671402075 100644
--- a/dist/windows/installer-translations/uzbek.nsh
+++ b/dist/windows/installer-translations/uzbek.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_UZBEK} "Oldingi versiyani oʻchirish."
LangString launch_qbt ${LANG_UZBEK} "qBittorrent ishga tushirilsin."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_UZBEK} "Bu oʻrnatuvchi faqat Windows 64-bit versiyalarda ishlaydi."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_UZBEK} "qBittorrent bu versiyasi kamida Windows 7 talab qiladi."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_UZBEK} "Bu oʻrnatuvchi kamida Windows 10 (1809) / Windows Server 2019 talab qiladi."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer-translations/welsh.nsh b/dist/windows/installer-translations/welsh.nsi
similarity index 95%
rename from dist/windows/installer-translations/welsh.nsh
rename to dist/windows/installer-translations/welsh.nsi
index d56987a72..efb37c554 100644
--- a/dist/windows/installer-translations/welsh.nsh
+++ b/dist/windows/installer-translations/welsh.nsi
@@ -28,6 +28,8 @@ LangString inst_unist ${LANG_WELSH} "Uninstalling previous version."
LangString launch_qbt ${LANG_WELSH} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_WELSH} "This installer works only in 64-bit Windows versions."
+;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
+LangString inst_requires_win7 ${LANG_WELSH} "This qBittorrent version requires at least Windows 7."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_WELSH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
diff --git a/dist/windows/installer.nsh b/dist/windows/installer.nsi
similarity index 54%
rename from dist/windows/installer.nsh
rename to dist/windows/installer.nsi
index a6025898d..8f9311c4d 100644
--- a/dist/windows/installer.nsh
+++ b/dist/windows/installer.nsi
@@ -25,34 +25,22 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put files there
- File "${QBT_DIST_DIR}\qbittorrent.exe"
+ File "qbittorrent.exe"
+ File "qbittorrent.pdb"
File "qt.conf"
- File /nonfatal /r /x "${QBT_DIST_DIR}\qbittorrent.exe" "${QBT_DIST_DIR}\*.*"
+
+ ;Create 'translations' directory
+ CreateDirectory $INSTDIR\translations
+ ; Set output path to the installation\translations directory.
+ SetOutPath "$INSTDIR\translations"
+ ; Put files there
+ File /r "translations\qt*.qm"
+ ; Restore output path because it affects `CreateShortCut`. It affects the "Start in" field.
+ SetOutPath $INSTDIR
; Write the installation path into the registry
WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"
- ; Register qBittorrent as possible default program for .torrent files and magnet links
- WriteRegStr HKLM "Software\qBittorrent\Capabilities" "ApplicationDescription" "A BitTorrent client in Qt"
- WriteRegStr HKLM "Software\qBittorrent\Capabilities" "ApplicationName" "qBittorrent"
- WriteRegStr HKLM "Software\qBittorrent\Capabilities\FileAssociations" ".torrent" "qBittorrent.File.Torrent"
- WriteRegStr HKLM "Software\qBittorrent\Capabilities\UrlAssociations" "magnet" "qBittorrent.Url.Magnet"
- WriteRegStr HKLM "Software\RegisteredApplications" "qBittorrent" "Software\qBittorrent\Capabilities"
- ; Register qBittorrent ProgIDs
- WriteRegStr HKLM "Software\Classes\qBittorrent.File.Torrent" "" "Torrent File"
- WriteRegStr HKLM "Software\Classes\qBittorrent.File.Torrent\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
- WriteRegStr HKLM "Software\Classes\qBittorrent.File.Torrent\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
- WriteRegStr HKLM "Software\Classes\qBittorrent.Url.Magnet" "" "Magnet URI"
- WriteRegStr HKLM "Software\Classes\qBittorrent.Url.Magnet\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
- WriteRegStr HKLM "Software\Classes\qBittorrent.Url.Magnet\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
-
- WriteRegStr HKLM "Software\Classes\.torrent" "Content Type" "application/x-bittorrent"
- WriteRegStr HKLM "Software\Classes\magnet" "" "URL:Magnet URI"
- WriteRegStr HKLM "Software\Classes\magnet" "Content Type" "application/x-magnet"
- WriteRegStr HKLM "Software\Classes\magnet" "URL Protocol" ""
-
- System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p 0, p 0)'
-
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "DisplayName" "qBittorrent"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "UninstallString" '"$INSTDIR\uninst.exe"'
@@ -67,6 +55,13 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "EstimatedSize" "$0"
+ ; qBittorrent ProgID
+ WriteRegStr HKLM "Software\Classes\qBittorrent" "" "qBittorrent Torrent File"
+ WriteRegStr HKLM "Software\Classes\qBittorrent" "FriendlyTypeName" "qBittorrent Torrent File"
+ WriteRegStr HKLM "Software\Classes\qBittorrent\shell" "" "open"
+ WriteRegStr HKLM "Software\Classes\qBittorrent\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
+ WriteRegStr HKLM "Software\Classes\qBittorrent\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
+
SectionEnd
; Optional section (can be disabled by the user)
@@ -96,6 +91,72 @@ Function inst_startup_user
FunctionEnd
+Section $(inst_torrent) ;"Open .torrent files with qBittorrent"
+
+ ReadRegStr $0 HKLM "Software\Classes\.torrent" ""
+
+ StrCmp $0 "qBittorrent" clear_errors 0
+ ;Check if empty string
+ StrCmp $0 "" clear_errors 0
+ ;Write old value to OpenWithProgIds
+ WriteRegStr HKLM "Software\Classes\.torrent\OpenWithProgIds" $0 ""
+
+ clear_errors:
+ ClearErrors
+
+ WriteRegStr HKLM "Software\Classes\.torrent" "" "qBittorrent"
+ WriteRegStr HKLM "Software\Classes\.torrent" "Content Type" "application/x-bittorrent"
+
+ !insertmacro UAC_AsUser_Call Function inst_torrent_user ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR}
+
+ System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p 0, p 0)'
+
+SectionEnd
+
+Function inst_torrent_user
+
+ ReadRegStr $0 HKCU "Software\Classes\.torrent" ""
+
+ StrCmp $0 "qBittorrent" clear_errors 0
+ ;Check if empty string
+ StrCmp $0 "" clear_errors 0
+ ;Write old value to OpenWithProgIds
+ WriteRegStr HKCU "Software\Classes\.torrent\OpenWithProgIds" $0 ""
+
+ clear_errors:
+ ClearErrors
+
+ WriteRegStr HKCU "Software\Classes\.torrent" "" "qBittorrent"
+ WriteRegStr HKCU "Software\Classes\.torrent" "Content Type" "application/x-bittorrent"
+
+FunctionEnd
+
+Section $(inst_magnet) ;"Open magnet links with qBittorrent"
+
+ WriteRegStr HKLM "Software\Classes\magnet" "" "URL:Magnet link"
+ WriteRegStr HKLM "Software\Classes\magnet" "Content Type" "application/x-magnet"
+ WriteRegStr HKLM "Software\Classes\magnet" "URL Protocol" ""
+ WriteRegStr HKLM "Software\Classes\magnet\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
+ WriteRegStr HKLM "Software\Classes\magnet\shell" "" "open"
+ WriteRegStr HKLM "Software\Classes\magnet\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
+
+ !insertmacro UAC_AsUser_Call Function inst_magnet_user ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR}
+
+ System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p 0, p 0)'
+
+SectionEnd
+
+Function inst_magnet_user
+
+ WriteRegStr HKCU "Software\Classes\magnet" "" "URL:Magnet link"
+ WriteRegStr HKCU "Software\Classes\magnet" "Content Type" "application/x-magnet"
+ WriteRegStr HKCU "Software\Classes\magnet" "URL Protocol" ""
+ WriteRegStr HKCU "Software\Classes\magnet\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
+ WriteRegStr HKCU "Software\Classes\magnet\shell" "" "open"
+ WriteRegStr HKCU "Software\Classes\magnet\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
+
+FunctionEnd
+
Section $(inst_firewall)
DetailPrint $(inst_firewallinfo)
@@ -116,17 +177,24 @@ Function .onInit
!insertmacro Init "installer"
!insertmacro MUI_LANGDLL_DISPLAY
- ${IfNot} ${AtLeastWaaS} 1809 ; Windows 10 (1809) / Windows Server 2019. Min supported version by Qt6
- MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_win10) /SD IDOK
- SetErrorLevel 1654 # WinError.h: `ERROR_INSTALL_REJECTED`
- Abort
- ${EndIf}
+ !ifndef QBT_USES_QT6
+ ${IfNot} ${AtLeastWin7}
+ MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_win7)
+ Abort
+ ${EndIf}
+ !else
+ ${IfNot} ${AtLeastWaaS} 1809 ; Windows 10 (1809) / Windows Server 2019. Min supported version by Qt6
+ MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_win10)
+ Abort
+ ${EndIf}
+ !endif
- ${IfNot} ${RunningX64}
- MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_64bit) /SD IDOK
- SetErrorLevel 1654 # WinError.h: `ERROR_INSTALL_REJECTED`
- Abort
- ${EndIf}
+ !ifdef QBT_IS_X64
+ ${IfNot} ${RunningX64}
+ MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_64bit)
+ Abort
+ ${EndIf}
+ !endif
;Search if qBittorrent is already installed.
FindFirst $0 $1 "$INSTDIR\uninst.exe"
@@ -149,10 +217,9 @@ Function check_instance
check:
FindProcDLL::FindProc "qbittorrent.exe"
StrCmp $R0 "1" 0 notfound
- MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(inst_warning) /SD IDCANCEL IDRETRY check IDCANCEL canceled
+ MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(inst_warning) IDRETRY check IDCANCEL done
- canceled:
- SetErrorLevel 15618 # WinError.h: `ERROR_PACKAGES_IN_USE`
+ done:
Abort
notfound:
diff --git a/dist/windows/license.txt b/dist/windows/license.txt
deleted file mode 100644
index 3fe9d6cb2..000000000
--- a/dist/windows/license.txt
+++ /dev/null
@@ -1,691 +0,0 @@
-The qBittorrent source code is licensed under the GNU General Public License,
-version 2 or (at your option) any later version (GPLv2+). However, the binary
-distribution is licensed under GNU General Public License, version 3 or (at
-your option) any later version (GPLv3+), because it contains GPLv3+ assets
-(eg images). In both cases, the following special exception is added:
-
-In addition, as a special exception, the copyright holders give permission to
-link this program with the OpenSSL project's "OpenSSL" library (or with
-modified versions of it that use the same license as the "OpenSSL" library),
-and distribute the linked executables. You must obey the GNU General Public
-License in all respects for all of the code used other than "OpenSSL". If you
-modify file(s), you may extend this exception to your version of the file(s),
-but you are not obligated to do so. If you do not wish to do so, delete this
-exception statement from your version.
-
-----------
-
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/dist/windows/nsis plugins/FindProcDLL_mod_by_hnedka.7z b/dist/windows/nsis plugins/FindProcDLL_mod_by_hnedka.7z
new file mode 100644
index 000000000..01cc54de6
Binary files /dev/null and b/dist/windows/nsis plugins/FindProcDLL_mod_by_hnedka.7z differ
diff --git a/dist/windows/nsis plugins/UAC.zip b/dist/windows/nsis plugins/UAC.zip
new file mode 100644
index 000000000..66489aacd
Binary files /dev/null and b/dist/windows/nsis plugins/UAC.zip differ
diff --git a/dist/windows/nsis plugins/nsisFirewall.zip b/dist/windows/nsis plugins/nsisFirewall.zip
new file mode 100644
index 000000000..3d34ac4e7
Binary files /dev/null and b/dist/windows/nsis plugins/nsisFirewall.zip differ
diff --git a/dist/windows/qbittorrent.nsi b/dist/windows/qbittorrent.nsi
index a9a3ce5c5..0c786bd90 100644
--- a/dist/windows/qbittorrent.nsi
+++ b/dist/windows/qbittorrent.nsi
@@ -1,4 +1,4 @@
-!include config.nsh
-!include translations.nsh
-!include installer.nsh
-!include uninstaller.nsh
+!include config.nsi
+!include translations.nsi
+!include installer.nsi
+!include uninstaller.nsi
diff --git a/dist/windows/translations.nsh b/dist/windows/translations.nsi
similarity index 64%
rename from dist/windows/translations.nsh
rename to dist/windows/translations.nsi
index 0cad4ef71..e8b6331f1 100644
--- a/dist/windows/translations.nsh
+++ b/dist/windows/translations.nsi
@@ -63,61 +63,61 @@
!addincludedir installer-translations
;The languages should be in alphabetical order
-!include afrikaans.nsh
-!include albanian.nsh
-!include arabic.nsh
-!include basque.nsh
-!include belarusian.nsh
-!include bosnian.nsh
-!include breton.nsh
-!include bulgarian.nsh
-!include catalan.nsh
-!include croatian.nsh
-!include czech.nsh
-!include danish.nsh
-!include dutch.nsh
-!include english.nsh
-!include esperanto.nsh
-!include estonian.nsh
-!include farsi.nsh
-!include finnish.nsh
-!include french.nsh
-!include galician.nsh
-!include german.nsh
-!include greek.nsh
-!include hebrew.nsh
-!include hungarian.nsh
-!include icelandic.nsh
-!include indonesian.nsh
-!include irish.nsh
-!include italian.nsh
-!include japanese.nsh
-!include korean.nsh
-!include kurdish.nsh
-!include latvian.nsh
-!include lithuanian.nsh
-!include luxembourgish.nsh
-!include macedonian.nsh
-!include malay.nsh
-!include mongolian.nsh
-!include norwegian.nsh
-!include norwegiannynorsk.nsh
-!include polish.nsh
-!include portuguese.nsh
-!include portuguesebr.nsh
-!include romanian.nsh
-!include russian.nsh
-!include serbian.nsh
-!include serbianlatin.nsh
-!include simpchinese.nsh
-!include slovak.nsh
-!include slovenian.nsh
-!include spanish.nsh
-!include spanishinternational.nsh
-!include swedish.nsh
-!include thai.nsh
-!include tradchinese.nsh
-!include turkish.nsh
-!include ukrainian.nsh
-!include uzbek.nsh
-!include welsh.nsh
+!include afrikaans.nsi
+!include albanian.nsi
+!include arabic.nsi
+!include basque.nsi
+!include belarusian.nsi
+!include bosnian.nsi
+!include breton.nsi
+!include bulgarian.nsi
+!include catalan.nsi
+!include croatian.nsi
+!include czech.nsi
+!include danish.nsi
+!include dutch.nsi
+!include english.nsi
+!include esperanto.nsi
+!include estonian.nsi
+!include farsi.nsi
+!include finnish.nsi
+!include french.nsi
+!include galician.nsi
+!include german.nsi
+!include greek.nsi
+!include hebrew.nsi
+!include hungarian.nsi
+!include icelandic.nsi
+!include indonesian.nsi
+!include irish.nsi
+!include italian.nsi
+!include japanese.nsi
+!include korean.nsi
+!include kurdish.nsi
+!include latvian.nsi
+!include lithuanian.nsi
+!include luxembourgish.nsi
+!include macedonian.nsi
+!include malay.nsi
+!include mongolian.nsi
+!include norwegian.nsi
+!include norwegiannynorsk.nsi
+!include polish.nsi
+!include portuguese.nsi
+!include portuguesebr.nsi
+!include romanian.nsi
+!include russian.nsi
+!include serbian.nsi
+!include serbianlatin.nsi
+!include simpchinese.nsi
+!include slovak.nsi
+!include slovenian.nsi
+!include spanish.nsi
+!include spanishinternational.nsi
+!include swedish.nsi
+!include thai.nsi
+!include tradchinese.nsi
+!include turkish.nsi
+!include ukrainian.nsi
+!include uzbek.nsi
+!include welsh.nsi
diff --git a/dist/windows/uninstaller.nsh b/dist/windows/uninstaller.nsi
similarity index 55%
rename from dist/windows/uninstaller.nsh
rename to dist/windows/uninstaller.nsi
index 51b47a42b..72a13749d 100644
--- a/dist/windows/uninstaller.nsh
+++ b/dist/windows/uninstaller.nsi
@@ -19,14 +19,48 @@ Section "un.$(remove_shortcuts)" ;"un.Remove shortcuts"
Delete "$DESKTOP\qBittorrent.lnk"
SectionEnd
+Section "un.$(remove_associations)" ;"un.Remove file associations"
+ SectionIn RO
+ ReadRegStr $0 HKLM "Software\Classes\.torrent" ""
+ StrCmp $0 "qBittorrent" 0 torrent_end
+ DetailPrint "$(uninst_tor_warn) $0"
+ DeleteRegValue HKLM "Software\Classes\.torrent" ""
+ DeleteRegKey /ifempty HKLM "Software\Classes\.torrent"
+ torrent_end:
+
+ ReadRegStr $0 HKLM "Software\Classes\magnet\shell\open\command" ""
+ StrCmp $0 '"$INSTDIR\qbittorrent.exe" "%1"' 0 magnet_end
+ DetailPrint "$(uninst_mag_warn) $0"
+ DeleteRegKey HKLM "Software\Classes\magnet"
+ magnet_end:
+
+ !insertmacro UAC_AsUser_Call Function un.remove_associations_user ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR}
+
+ System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p 0, p 0)'
+SectionEnd
+
+Function un.remove_associations_user
+ ReadRegStr $0 HKCU "Software\Classes\.torrent" ""
+ StrCmp $0 "qBittorrent" 0 torrent_end
+ DetailPrint "$(uninst_tor_warn) $0"
+ DeleteRegValue HKCU "Software\Classes\.torrent" ""
+ DeleteRegKey /ifempty HKCU "Software\Classes\.torrent"
+ torrent_end:
+
+ ReadRegStr $0 HKCU "Software\Classes\magnet\shell\open\command" ""
+ StrCmp $0 '"$INSTDIR\qbittorrent.exe" "%1"' 0 magnet_end
+ DetailPrint "$(uninst_mag_warn) $0"
+ DeleteRegKey HKCU "Software\Classes\magnet"
+ magnet_end:
+FunctionEnd
+
Section "un.$(remove_registry)" ;"un.Remove registry keys"
SectionIn RO
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent"
DeleteRegKey HKLM "Software\qBittorrent"
- ; Remove ProgIDs
- DeleteRegKey HKLM "Software\Classes\qBittorrent.File.Torrent"
- DeleteRegKey HKLM "Software\Classes\qBittorrent.Url.Magnet"
+ DeleteRegKey HKLM "Software\Classes\qBittorrent"
+
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p 0, p 0)'
SectionEnd
@@ -75,16 +109,15 @@ FunctionEnd
Function un.check_instance
- check:
- FindProcDLL::FindProc "qbittorrent.exe"
- StrCmp $R0 "1" 0 notfound
- MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(uninst_warning) /SD IDCANCEL IDRETRY check IDCANCEL canceled
+ check:
+ FindProcDLL::FindProc "qbittorrent.exe"
+ StrCmp $R0 "1" 0 notfound
+ MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(uninst_warning) IDRETRY check IDCANCEL done
- canceled:
- SetErrorLevel 15618 # WinError.h: `ERROR_PACKAGES_IN_USE`
- Abort
+ done:
+ Abort
- notfound:
+ notfound:
FunctionEnd
diff --git a/doc/README.md b/doc/README.md
index cefd2e398..c3835658d 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -13,14 +13,8 @@ pandoc -s -f markdown -t man qbittorrent-nox.1.md -o qbittorrent-nox.1
```
There is also an online converter you can use if you have trouble installing a
-local one: [link](https://pandoc.org/try/?params=%7B%22to%22%3A%22man%22%2C%22from%22%3A%22markdown%22%2C%22standalone%22%3Atrue%7D) \
+local one: [link](https://pandoc.org/try/?text=&from=markdown&to=man) \
You'll need to be careful when you copy the output to file as some headers will be missing.
Careful not to overwrite the existing leading headers or trim off the trailing headers.
Remember to commit Markdown files (\*.md) and the generated man pages (\*.1 files) after editing!
-
-### Translation
-
-To translate the man pages into a new language, create a new subdirectory here
-with the translated files and add it to the `manPageLanguages` list in
-[`dist/unix/CMakeLists.txt`](../dist/unix/CMakeLists.txt).
diff --git a/doc/en/qbittorrent-nox.1 b/doc/en/qbittorrent-nox.1
deleted file mode 100644
index 3b9830fc1..000000000
--- a/doc/en/qbittorrent-nox.1
+++ /dev/null
@@ -1,44 +0,0 @@
-.\" Automatically generated by Pandoc 3.7.0.2
-.\"
-.TH "QBITTORRENT\-NOX" "1" "January 16th 2010" "Command line Bittorrent client written in C++ / Qt"
-.SH NAME
-qBittorrent\-nox \- a command line Bittorrent client written in C++ / Qt
-.SH SYNOPSIS
-\f[B]qbittorrent\-nox\f[R]
-\f[CR][\-\-d|\-\-daemon] [\-\-webui\-port=x] [TORRENT_FILE | URL]...\f[R]
-.PP
-\f[B]qbittorrent\-nox\f[R] \f[CR]\-\-help\f[R]
-.PP
-\f[B]qbittorrent\-nox\f[R] \f[CR]\-\-version\f[R]
-.SH DESCRIPTION
-\f[B]qBittorrent\-nox\f[R] is an advanced command\-line Bittorrent
-client written in C++ / Qt using the \f[B]libtorrent\-rasterbar\f[R]
-library by Arvid Norberg.
-qBittorrent\-nox aims to be a good alternative to other command line
-bittorrent clients and provides features similar to popular graphical
-clients.
-.PP
-qBittorrent\-nox is fast, stable, light and it supports unicode.
-It also comes with UPnP port forwarding / NAT\-PMP, encryption (Vuze
-compatible), FAST extension (mainline) and PeX support (utorrent
-compatible).
-.PP
-qBittorrent\-nox is meant to be controlled via its feature\-rich Web UI
-which is accessible as a default on http://localhost:8080.
-The Web UI access is secured and the default account user name is
-\(lqadmin\(rq with \(lqadminadmin\(rq as a password.
-.SH OPTIONS
-\f[B]\f[CB]\-\-help\f[B]\f[R] Prints the command line options.
-.PP
-\f[B]\f[CB]\-\-version\f[B]\f[R] Prints qbittorrent program version
-number.
-.PP
-\f[B]\f[CB]\-\-webui\-port=x\f[B]\f[R] Changes Web UI port to x
-(default: 8080).
-.SH BUGS
-If you find a bug, please report it at https://bugs.qbittorrent.org
-.SH AUTHORS
-Christophe Dumez \c
-.MT chris@qbittorrent.org
-.ME \c
-\&.
diff --git a/doc/en/qbittorrent.1 b/doc/en/qbittorrent.1
deleted file mode 100644
index 7c304be93..000000000
--- a/doc/en/qbittorrent.1
+++ /dev/null
@@ -1,38 +0,0 @@
-.\" Automatically generated by Pandoc 3.7.0.2
-.\"
-.TH "QBITTORRENT" "1" "January 16th 2010" "Bittorrent client written in C++ / Qt"
-.SH NAME
-qBittorrent \- a Bittorrent client written in C++ / Qt
-.SH SYNOPSIS
-\f[B]qbittorrent\f[R]
-\f[CR][\-\-no\-splash] [\-\-webui\-port=x] [TORRENT_FILE | URL]...\f[R]
-.PP
-\f[B]qbittorrent\f[R] \f[CR]\-\-help\f[R]
-.PP
-\f[B]qbittorrent\f[R] \f[CR]\-\-version\f[R]
-.SH DESCRIPTION
-\f[B]qBittorrent\f[R] is an advanced Bittorrent client written in C++ /
-Qt, using the \f[B]libtorrent\-rasterbar\f[R] library by Arvid Norberg.
-qBittorrent is similar to uTorrent.
-qBittorrent is fast, stable, light, it supports unicode and it provides
-a good integrated search engine.
-It also comes with UPnP port forwarding / NAT\-PMP, encryption (Vuze
-compatible), FAST extension (mainline) and PeX support (utorrent
-compatible).
-.SH OPTIONS
-\f[B]\f[CB]\-\-help\f[B]\f[R] Prints the command line options.
-.PP
-\f[B]\f[CB]\-\-version\f[B]\f[R] Prints qbittorrent program version
-number.
-.PP
-\f[B]\f[CB]\-\-no\-splash\f[B]\f[R] Disables splash screen on startup.
-.PP
-\f[B]\f[CB]\-\-webui\-port=x\f[B]\f[R] Changes Web UI port to x
-(default: 8080).
-.SH BUGS
-If you find a bug, please report it at https://bugs.qbittorrent.org
-.SH AUTHORS
-Christophe Dumez \c
-.MT chris@qbittorrent.org
-.ME \c
-\&.
diff --git a/doc/qbittorrent-nox.1 b/doc/qbittorrent-nox.1
new file mode 100644
index 000000000..7398fad50
--- /dev/null
+++ b/doc/qbittorrent-nox.1
@@ -0,0 +1,47 @@
+.\" Automatically generated by Pandoc 2.9.2
+.\"
+.TH "QBITTORRENT-NOX" "1" "January 16th 2010" "Command line Bittorrent client written in C++ / Qt" ""
+.hy
+.SH NAME
+.PP
+qBittorrent-nox - a command line Bittorrent client written in C++ / Qt
+.SH SYNOPSIS
+.PP
+\f[B]qbittorrent-nox\f[R]
+\f[C][--d|--daemon] [--webui-port=x] [TORRENT_FILE | URL]...\f[R]
+.PP
+\f[B]qbittorrent-nox\f[R] \f[C]--help\f[R]
+.PP
+\f[B]qbittorrent-nox\f[R] \f[C]--version\f[R]
+.SH DESCRIPTION
+.PP
+\f[B]qBittorrent-nox\f[R] is an advanced command-line Bittorrent client
+written in C++ / Qt using the \f[B]libtorrent-rasterbar\f[R] library by
+Arvid Norberg.
+qBittorrent-nox aims to be a good alternative to other command line
+bittorrent clients and provides features similar to popular graphical
+clients.
+.PP
+qBittorrent-nox is fast, stable, light and it supports unicode.
+It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze
+compatible), FAST extension (mainline) and PeX support (utorrent
+compatible).
+.PP
+qBittorrent-nox is meant to be controlled via its feature-rich Web UI
+which is accessible as a default on http://localhost:8080.
+The Web UI access is secured and the default account user name is
+\[lq]admin\[rq] with \[lq]adminadmin\[rq] as a password.
+.SH OPTIONS
+.PP
+\f[B]\f[CB]--help\f[B]\f[R] Prints the command line options.
+.PP
+\f[B]\f[CB]--version\f[B]\f[R] Prints qbittorrent program version
+number.
+.PP
+\f[B]\f[CB]--webui-port=x\f[B]\f[R] Changes Web UI port to x (default:
+8080).
+.SH BUGS
+.PP
+If you find a bug, please report it at https://bugs.qbittorrent.org
+.SH AUTHORS
+Christophe Dumez .
diff --git a/doc/en/qbittorrent-nox.1.md b/doc/qbittorrent-nox.1.md
similarity index 95%
rename from doc/en/qbittorrent-nox.1.md
rename to doc/qbittorrent-nox.1.md
index 610648524..7fd697695 100644
--- a/doc/en/qbittorrent-nox.1.md
+++ b/doc/qbittorrent-nox.1.md
@@ -1,5 +1,5 @@
% QBITTORRENT-NOX(1) Command line Bittorrent client written in C++ / Qt
-%
+% Christophe Dumez
% January 16th 2010
# NAME
@@ -39,7 +39,3 @@ the default account user name is "admin" with "adminadmin" as a password.
# BUGS
If you find a bug, please report it at https://bugs.qbittorrent.org
-
-
-# AUTHORS
-Christophe Dumez .
diff --git a/doc/qbittorrent.1 b/doc/qbittorrent.1
new file mode 100644
index 000000000..1f683376c
--- /dev/null
+++ b/doc/qbittorrent.1
@@ -0,0 +1,41 @@
+.\" Automatically generated by Pandoc 2.9.2
+.\"
+.TH "QBITTORRENT" "1" "January 16th 2010" "Bittorrent client written in C++ / Qt" ""
+.hy
+.SH NAME
+.PP
+qBittorrent - a Bittorrent client written in C++ / Qt
+.SH SYNOPSIS
+.PP
+\f[B]qbittorrent\f[R]
+\f[C][--no-splash] [--webui-port=x] [TORRENT_FILE | URL]...\f[R]
+.PP
+\f[B]qbittorrent\f[R] \f[C]--help\f[R]
+.PP
+\f[B]qbittorrent\f[R] \f[C]--version\f[R]
+.SH DESCRIPTION
+.PP
+\f[B]qBittorrent\f[R] is an advanced Bittorrent client written in C++ /
+Qt, using the \f[B]libtorrent-rasterbar\f[R] library by Arvid Norberg.
+qBittorrent is similar to uTorrent.
+qBittorrent is fast, stable, light, it supports unicode and it provides
+a good integrated search engine.
+It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze
+compatible), FAST extension (mainline) and PeX support (utorrent
+compatible).
+.SH OPTIONS
+.PP
+\f[B]\f[CB]--help\f[B]\f[R] Prints the command line options.
+.PP
+\f[B]\f[CB]--version\f[B]\f[R] Prints qbittorrent program version
+number.
+.PP
+\f[B]\f[CB]--no-splash\f[B]\f[R] Disables splash screen on startup.
+.PP
+\f[B]\f[CB]--webui-port=x\f[B]\f[R] Changes Web UI port to x (default:
+8080).
+.SH BUGS
+.PP
+If you find a bug, please report it at https://bugs.qbittorrent.org
+.SH AUTHORS
+Christophe Dumez .
diff --git a/doc/en/qbittorrent.1.md b/doc/qbittorrent.1.md
similarity index 94%
rename from doc/en/qbittorrent.1.md
rename to doc/qbittorrent.1.md
index 92a8abbe3..44091fe4e 100644
--- a/doc/en/qbittorrent.1.md
+++ b/doc/qbittorrent.1.md
@@ -1,5 +1,5 @@
% QBITTORRENT(1) Bittorrent client written in C++ / Qt
-%
+% Christophe Dumez
% January 16th 2010
# NAME
@@ -34,7 +34,3 @@ FAST extension (mainline) and PeX support (utorrent compatible).
# BUGS
If you find a bug, please report it at https://bugs.qbittorrent.org
-
-
-# AUTHORS
-Christophe Dumez .
diff --git a/doc/ru/qbittorrent-nox.1 b/doc/ru/qbittorrent-nox.1
deleted file mode 100644
index 122716e44..000000000
--- a/doc/ru/qbittorrent-nox.1
+++ /dev/null
@@ -1,10 +0,0 @@
-.\" Automatically generated by Pandoc 3.7.0.2
-.\"
-.TH "QBITTORRENT\-NOX" "1" "16 января 2010" "Клиент сети БитТоррент для командной строки"
-.SH НАЗВАНИЕ
-qBittorrent\-nox \(em клиент сети БитТоррент для командной строки.
-.SH АВТОРЫ
-Christophe Dumez \c
-.MT chris@qbittorrent.org
-.ME \c
-\&.
diff --git a/doc/ru/qbittorrent-nox.1.md b/doc/ru/qbittorrent-nox.1.md
deleted file mode 100644
index 69b3c9109..000000000
--- a/doc/ru/qbittorrent-nox.1.md
+++ /dev/null
@@ -1,10 +0,0 @@
-% QBITTORRENT-NOX(1) Клиент сети БитТоррент для командной строки
-%
-% 16 января 2010
-
-# НАЗВАНИЕ
-qBittorrent-nox — клиент сети БитТоррент для командной строки.
-
-
-# АВТОРЫ
-Christophe Dumez .
diff --git a/doc/ru/qbittorrent.1 b/doc/ru/qbittorrent.1
deleted file mode 100644
index 1d4f54a2c..000000000
--- a/doc/ru/qbittorrent.1
+++ /dev/null
@@ -1,10 +0,0 @@
-.\" Automatically generated by Pandoc 3.7.0.2
-.\"
-.TH "QBITTORRENT" "1" "16 января 2010" "Клиент сети БитТоррент"
-.SH НАЗВАНИЕ
-qBittorrent \(em клиент сети БитТоррент.
-.SH АВТОРЫ
-Christophe Dumez \c
-.MT chris@qbittorrent.org
-.ME \c
-\&.
diff --git a/doc/ru/qbittorrent.1.md b/doc/ru/qbittorrent.1.md
deleted file mode 100644
index eada73b66..000000000
--- a/doc/ru/qbittorrent.1.md
+++ /dev/null
@@ -1,10 +0,0 @@
-% QBITTORRENT(1) Клиент сети БитТоррент
-%
-% 16 января 2010
-
-# НАЗВАНИЕ
-qBittorrent — клиент сети БитТоррент.
-
-
-# АВТОРЫ
-Christophe Dumez .
diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4
new file mode 100644
index 000000000..519f1c9d2
--- /dev/null
+++ b/m4/ax_boost_base.m4
@@ -0,0 +1,303 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# DESCRIPTION
+#
+# Test for the Boost C++ libraries of a particular version (or newer)
+#
+# If no path to the installed boost library is given the macro searchs
+# under /usr, /usr/local, /opt and /opt/local and evaluates the
+# $BOOST_ROOT environment variable. Further documentation is available at
+# .
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
+#
+# And sets:
+#
+# HAVE_BOOST
+#
+# LICENSE
+#
+# Copyright (c) 2008 Thomas Porschberg
+# Copyright (c) 2009 Peter Adolphs
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 49
+
+# example boost program (need to pass version)
+m4_define([_AX_BOOST_BASE_PROGRAM],
+ [AC_LANG_PROGRAM([[
+#include
+]],[[
+(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
+]])])
+
+AC_DEFUN([AX_BOOST_BASE],
+[
+AC_ARG_WITH([boost],
+ [AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
+ [use Boost library from a standard location (ARG=yes),
+ from the specified location (ARG=),
+ or disable it (ARG=no)
+ @<:@ARG=yes@:>@ ])],
+ [
+ AS_CASE([$withval],
+ [no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
+ [yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
+ [want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
+ ],
+ [want_boost="yes"])
+
+
+AC_ARG_WITH([boost-libdir],
+ [AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
+ [Force given directory for boost libraries.
+ Note that this will override library path detection,
+ so use this parameter only if default library detection fails
+ and you know exactly where your boost libraries are located.])],
+ [
+ AS_IF([test -d "$withval"],
+ [_AX_BOOST_BASE_boost_lib_path="$withval"],
+ [AC_MSG_ERROR([--with-boost-libdir expected directory name])])
+ ],
+ [_AX_BOOST_BASE_boost_lib_path=""])
+
+BOOST_LDFLAGS=""
+BOOST_CPPFLAGS=""
+AS_IF([test "x$want_boost" = "xyes"],
+ [_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
+AC_SUBST(BOOST_CPPFLAGS)
+AC_SUBST(BOOST_LDFLAGS)
+])
+
+
+# convert a version string in $2 to numeric and affect to polymorphic var $1
+AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
+ AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
+ _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
+ _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
+ AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
+ [AC_MSG_ERROR([You should at least specify libboost major version])])
+ _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
+ AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
+ [_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
+ _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+ AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
+ [_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
+ _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
+ AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
+])
+
+dnl Run the detection of boost should be run only if $want_boost
+AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
+ _AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
+ succeeded=no
+
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl On 64-bit systems check for system libraries in both lib64 and lib.
+ dnl The former is specified by FHS, but e.g. Debian does not adhere to
+ dnl this (as it rises problems for generic multi-arch support).
+ dnl The last entry in the list is chosen by default when no libraries
+ dnl are found, e.g. when only header-only libraries are installed!
+ AS_CASE([${host_cpu}],
+ [x86_64],[libsubdirs="lib64 libx32 lib lib64"],
+ [mips*64*],[libsubdirs="lib64 lib32 lib lib64"],
+ [ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64|e2k],[libsubdirs="lib64 lib lib64"],
+ [libsubdirs="lib"]
+ )
+
+ dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
+ dnl them priority over the other paths since, if libs are found there, they
+ dnl are almost assuredly the ones desired.
+ AS_CASE([${host_cpu}],
+ [i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
+ [armv7l],[multiarch_libsubdir="lib/arm-${host_os}"],
+ [multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
+ )
+
+ dnl first we check the system location for boost libraries
+ dnl this location ist chosen if boost libraries are installed with the --layout=system option
+ dnl or if you install boost with RPM
+ AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
+ AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
+ AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
+ AC_MSG_RESULT([yes])
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
+ for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
+ AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
+ AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
+ AC_MSG_RESULT([yes])
+ BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
+ break;
+ ],
+ [AC_MSG_RESULT([no])])
+ done],[
+ AC_MSG_RESULT([no])])
+ ],[
+ if test X"$cross_compiling" = Xyes; then
+ search_libsubdirs=$multiarch_libsubdir
+ else
+ search_libsubdirs="$multiarch_libsubdir $libsubdirs"
+ fi
+ for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
+ if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
+ for libsubdir in $search_libsubdirs ; do
+ if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
+ break;
+ fi
+ done
+ ])
+
+ dnl overwrite ld flags if we have required special directory with
+ dnl --with-boost-libdir parameter
+ AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
+ [BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
+
+ AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
+ CPPFLAGS_SAVED="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+
+ LDFLAGS_SAVED="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+ AC_REQUIRE([AC_PROG_CXX])
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+ found_system=yes
+ ],[
+ ])
+ AC_LANG_POP([C++])
+
+
+
+ dnl if we found no boost with system layout we search for boost libraries
+ dnl built and installed without the --layout=system option or for a staged(not installed) version
+ if test "x$succeeded" != "xyes" ; then
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ BOOST_CPPFLAGS=
+ if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
+ BOOST_LDFLAGS=
+ fi
+ _version=0
+ if test -n "$_AX_BOOST_BASE_boost_path" ; then
+ if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
+ for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "x$V_CHECK" = "x1" ; then
+ _version=$_version_tmp
+ fi
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
+ done
+ dnl if nothing found search for layout used in Windows distributions
+ if test -z "$BOOST_CPPFLAGS"; then
+ if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
+ BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
+ fi
+ fi
+ dnl if we found something and BOOST_LDFLAGS was unset before
+ dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
+ if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
+ fi
+ fi
+ else
+ if test "x$cross_compiling" != "xyes" ; then
+ for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
+ if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
+ for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "x$V_CHECK" = "x1" ; then
+ _version=$_version_tmp
+ best_path=$_AX_BOOST_BASE_boost_path
+ fi
+ done
+ fi
+ done
+
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
+ if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$best_path/$libsubdir"
+ fi
+ fi
+
+ if test -n "$BOOST_ROOT" ; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
+ version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
+ stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
+ stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
+ V_CHECK=`expr $stage_version_shorten \>\= $_version`
+ if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
+ AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
+ BOOST_CPPFLAGS="-I$BOOST_ROOT"
+ BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
+ fi
+ fi
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+ found_system=yes
+ ],[
+ ])
+ AC_LANG_POP([C++])
+ fi
+
+ if test "x$succeeded" != "xyes" ; then
+ if test "x$_version" = "x0" ; then
+ AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]])
+ else
+ AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
+ fi
+ # execute ACTION-IF-NOT-FOUND (if present):
+ ifelse([$3], , :, [$3])
+ else
+ AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
+ # execute ACTION-IF-FOUND (if present):
+ ifelse([$2], , :, [$2])
+ fi
+
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+
+])
diff --git a/m4/ax_define_dir.m4 b/m4/ax_define_dir.m4
new file mode 100644
index 000000000..b74d155fd
--- /dev/null
+++ b/m4/ax_define_dir.m4
@@ -0,0 +1,49 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+#
+# DESCRIPTION
+#
+# This macro sets VARNAME to the expansion of the DIR variable, taking
+# care of fixing up ${prefix} and such.
+#
+# VARNAME is then offered as both an output variable and a C preprocessor
+# symbol.
+#
+# Example:
+#
+# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+#
+# LICENSE
+#
+# Copyright (c) 2008 Stepan Kasal
+# Copyright (c) 2008 Andreas Schwab
+# Copyright (c) 2008 Guido U. Draheim
+# Copyright (c) 2008 Alexandre Oliva
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 6
+
+AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
+AC_DEFUN([AX_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ax_define_dir="\"[$]$2\""
+ eval ax_define_dir="\"$ax_define_dir\""
+ AC_SUBST($1, "$ax_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
diff --git a/m4/pkg.m4 b/m4/pkg.m4
new file mode 100644
index 000000000..13a889017
--- /dev/null
+++ b/m4/pkg.m4
@@ -0,0 +1,275 @@
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
+dnl Copyright © 2004 Scott James Remnant .
+dnl Copyright © 2012-2015 Dan Nicholson
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $2])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see .])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
diff --git a/m4/qbittorrent.m4 b/m4/qbittorrent.m4
new file mode 100644
index 000000000..e67f93544
--- /dev/null
+++ b/m4/qbittorrent.m4
@@ -0,0 +1,51 @@
+# Checking for pkg-config. If found, check for QtCore and query pkg-config
+# for its exec-prefix variable.
+
+# FIND_QT5()
+# Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
+# --------------------------------------
+AC_DEFUN([FIND_QT5],
+[PKG_CHECK_EXISTS([Qt5Core >= 5.15.2],
+ [PKG_CHECK_VAR(QT_QMAKE,
+ [Qt5Core >= 5.15.2],
+ [host_bins])
+ ])
+
+AS_IF([test -f "$QT_QMAKE/qmake"],
+ [QT_QMAKE="$QT_QMAKE/qmake"],
+ [AS_IF([test -f "$QT_QMAKE/qmake-qt5"],
+ [QT_QMAKE="$QT_QMAKE/qmake-qt5"],
+ [QT_QMAKE=""])
+ ])
+
+AC_MSG_CHECKING([for Qt5 qmake >= 5.15.2])
+AS_IF([test "x$QT_QMAKE" != "x"],
+ [AC_MSG_RESULT([$QT_QMAKE])],
+ [AC_MSG_RESULT([not found])]
+ )
+])
+
+# FIND_QTDBUS()
+# Sets the HAVE_QTDBUS variable to true or false.
+# --------------------------------------
+AC_DEFUN([FIND_QTDBUS],
+ [AC_MSG_CHECKING([for Qt5DBus >= 5.15.2])
+ PKG_CHECK_EXISTS([Qt5DBus >= 5.15.2],
+ [AC_MSG_RESULT([found])
+ HAVE_QTDBUS=[true]],
+ [AC_MSG_RESULT([not found])
+ HAVE_QTDBUS=[false]])
+])
+
+# DETECT_CPP17_PROGRAM()
+# Detects if at least C++17 mode is enabled.
+# --------------------------------------
+AC_DEFUN([DETECT_CPP17_PROGRAM],
+ [AC_LANG_PROGRAM([[
+ #ifndef __cplusplus
+ #error "This is not a C++ compiler"
+ #elif __cplusplus < 201703L
+ #error "This is not a C++17 compiler"
+ #endif]],
+ [[]])
+])
diff --git a/macxconf.pri b/macxconf.pri
new file mode 100644
index 000000000..43f02ba8b
--- /dev/null
+++ b/macxconf.pri
@@ -0,0 +1,50 @@
+# The first path is used when the source is being build by packagers (pbuilder/sbuild/etc)
+# The second path is used when you manually run the configure script in the root folder (eg when using qt creator)
+exists($$OUT_PWD/../conf.pri) {
+ include($$OUT_PWD/../conf.pri)
+}
+else {
+ include(conf.pri)
+}
+
+# Custom function
+# Return Qt translations files as list of paths
+# It will return .qm files of qt/qtbase that aren't stub files.
+defineReplace(qbt_get_qt_translations) {
+ # The $$[] syntax queries qmake properties
+ TMP_TRANSLATIONS = $$files($$[QT_INSTALL_TRANSLATIONS]/qt_??.qm)
+ TMP_TRANSLATIONS += $$files($$[QT_INSTALL_TRANSLATIONS]/qt_??_??.qm)
+ TMP_TRANSLATIONS += $$files($$[QT_INSTALL_TRANSLATIONS]/qtbase_??.qm)
+ TMP_TRANSLATIONS += $$files($$[QT_INSTALL_TRANSLATIONS]/qtbase_??_??.qm)
+
+ # Consider files less than 10KB as stub translations
+ for (TRANSLATION, TMP_TRANSLATIONS) {
+ TRANSLATION_SIZE = $$system("stat -f%z $${TRANSLATION}", true, EXIT_STATUS)
+ equals(EXIT_STATUS, 0):!lessThan(TRANSLATION_SIZE, 10240): FINAL_TRANSLATIONS += $${TRANSLATION}
+ }
+
+ return($$FINAL_TRANSLATIONS)
+}
+
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15
+
+DEFINES += _DARWIN_FEATURE_64_BIT_INODE
+
+LIBS += -framework Carbon -framework IOKit -framework AppKit
+
+DIST_PATH = ../dist/mac
+
+document_icon.path = Contents/Resources
+document_icon.files = $$DIST_PATH/qBitTorrentDocument.icns
+QMAKE_BUNDLE_DATA += document_icon
+
+qt_conf.path = Contents/Resources
+qt_conf.files = $$DIST_PATH/qt.conf
+QMAKE_BUNDLE_DATA += qt_conf
+
+qt_translations.path = Contents/translations
+qt_translations.files = $$qbt_get_qt_translations()
+QMAKE_BUNDLE_DATA += qt_translations
+
+ICON = $$DIST_PATH/qbittorrent_mac.icns
+QMAKE_INFO_PLIST = $$DIST_PATH/Info.plist
diff --git a/qbittorrent.pro b/qbittorrent.pro
new file mode 100644
index 000000000..0d5f80872
--- /dev/null
+++ b/qbittorrent.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+
+SUBDIRS += src
+
+include(version.pri)
+
+# For Qt Creator beautifier
+DISTFILES += \
+ uncrustify.cfg
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index 4c007ce1e..a531f7fd1 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -15,14 +15,14 @@ add_custom_target(qbt_update_translations
# -----------------------------------------------------------------------------
# Based on https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412
set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/lang")
-qt_add_translation(QBT_QM_FILES ${QBT_TS_FILES} OPTIONS -removeidentical -silent)
+qt_add_translation(QBT_QM_FILES ${QBT_TS_FILES} OPTIONS -silent)
configure_file("${qBittorrent_SOURCE_DIR}/src/lang/lang.qrc" "${qBittorrent_BINARY_DIR}/src/lang/lang.qrc" COPYONLY)
if (WEBUI)
file(GLOB QBT_WEBUI_TS_FILES "${qBittorrent_SOURCE_DIR}/src/webui/www/translations/*.ts")
set_source_files_properties(${QBT_WEBUI_TS_FILES}
PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/webui/www/translations")
- qt_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES} OPTIONS -removeidentical -silent)
+ qt_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES} OPTIONS -silent)
configure_file("${qBittorrent_SOURCE_DIR}/src/webui/www/translations/webui_translations.qrc"
"${qBittorrent_BINARY_DIR}/src/webui/www/translations/webui_translations.qrc" COPYONLY)
endif()
@@ -38,7 +38,6 @@ target_sources(qbt_app PRIVATE
applicationinstancemanager.h
cmdoptions.h
filelogger.h
- legalnotice.h
qtlocalpeer/qtlocalpeer.h
signalhandler.h
upgrade.h
@@ -48,7 +47,6 @@ target_sources(qbt_app PRIVATE
applicationinstancemanager.cpp
cmdoptions.cpp
filelogger.cpp
- legalnotice.cpp
main.cpp
qtlocalpeer/qtlocalpeer.cpp
signalhandler.cpp
@@ -86,19 +84,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
- # Generate lproj folders for the translations
- foreach(TS_FILE IN LISTS QBT_TS_FILES)
- string(FIND "${TS_FILE}" "_" POS)
- math(EXPR START "${POS} + 1")
- string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER)
- string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}")
- # @ is not valid as a language code for a lproj folder on MacOS
- string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}")
- add_custom_command(TARGET qbt_app POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E make_directory
- "$/../Resources/${LPROJ_FOLDER}"
- )
- endforeach()
# provide variables for substitution in dist/mac/Info.plist
get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME)
# This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813
@@ -155,6 +140,10 @@ if (STACKTRACE)
/DEBUG
/PDBALTPATH:$
)
+
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_compile_options(qbt_app PRIVATE /Oy-)
+ endif()
else()
target_link_options(qbt_app PUBLIC LINKER:--export-dynamic)
diff --git a/src/app/app.pri b/src/app/app.pri
new file mode 100644
index 000000000..bdec650d3
--- /dev/null
+++ b/src/app/app.pri
@@ -0,0 +1,25 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += \
+ $$PWD/application.h \
+ $$PWD/applicationinstancemanager.h \
+ $$PWD/cmdoptions.h \
+ $$PWD/filelogger.h \
+ $$PWD/qtlocalpeer/qtlocalpeer.h \
+ $$PWD/signalhandler.h \
+ $$PWD/upgrade.h
+
+SOURCES += \
+ $$PWD/application.cpp \
+ $$PWD/applicationinstancemanager.cpp \
+ $$PWD/cmdoptions.cpp \
+ $$PWD/filelogger.cpp \
+ $$PWD/main.cpp \
+ $$PWD/qtlocalpeer/qtlocalpeer.cpp \
+ $$PWD/signalhandler.cpp \
+ $$PWD/upgrade.cpp
+
+stacktrace {
+ HEADERS += $$PWD/stacktrace.h
+ SOURCES += $$PWD/stacktrace.cpp
+}
diff --git a/src/app/application.cpp b/src/app/application.cpp
index da09211bd..e22f2f670 100644
--- a/src/app/application.cpp
+++ b/src/app/application.cpp
@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2015-2025 Vladimir Golovnev
+ * Copyright (C) 2015 Vladimir Golovnev
* Copyright (C) 2006 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
@@ -37,8 +37,8 @@
#ifdef Q_OS_WIN
#include
-#include
-#include
+#include
+#include
#elif defined(Q_OS_UNIX)
#include
#endif
@@ -50,25 +50,25 @@
#include
#ifndef DISABLE_GUI
-#include
#include
#include
#include
#include
#ifdef Q_OS_WIN
#include
+#include
#endif // Q_OS_WIN
#ifdef Q_OS_MACOS
#include
#endif // Q_OS_MACOS
#endif
-#include "base/addtorrentmanager.h"
#include "base/bittorrent/infohash.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/torrent.h"
#include "base/exceptions.h"
#include "base/global.h"
+#include "base/iconprovider.h"
#include "base/logger.h"
#include "base/net/downloadmanager.h"
#include "base/net/geoipmanager.h"
@@ -81,9 +81,9 @@
#include "base/search/searchpluginmanager.h"
#include "base/settingsstorage.h"
#include "base/torrentfileswatcher.h"
+#include "base/utils/compare.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
-#include "base/utils/os.h"
#include "base/utils/string.h"
#include "base/version.h"
#include "applicationinstancemanager.h"
@@ -91,11 +91,16 @@
#include "upgrade.h"
#ifndef DISABLE_GUI
+#include "gui/addnewtorrentdialog.h"
#include "gui/desktopintegration.h"
#include "gui/mainwindow.h"
#include "gui/shutdownconfirmdialog.h"
#include "gui/uithememanager.h"
#include "gui/windowstate.h"
+
+#ifdef Q_OS_WIN
+#include "base/utils/os.h"
+#endif // Q_OS_WIN
#endif // DISABLE_GUI
#ifndef DISABLE_WEBUI
@@ -124,28 +129,6 @@ namespace
const int PIXMAP_CACHE_SIZE = 64 * 1024 * 1024; // 64MiB
#endif
- const QString PARAM_ADDSTOPPED = u"@addStopped"_s;
- const QString PARAM_CATEGORY = u"@category"_s;
- const QString PARAM_FIRSTLASTPIECEPRIORITY = u"@firstLastPiecePriority"_s;
- const QString PARAM_SAVEPATH = u"@savePath"_s;
- const QString PARAM_SEQUENTIAL = u"@sequential"_s;
- const QString PARAM_SKIPCHECKING = u"@skipChecking"_s;
- const QString PARAM_SKIPDIALOG = u"@skipDialog"_s;
-
- QString bindParamValue(const QStringView paramName, const QStringView paramValue)
- {
- return paramName + u'=' + paramValue;
- }
-
- std::pair parseParam(const QStringView param)
- {
- const qsizetype sepIndex = param.indexOf(u'=');
- if (sepIndex >= 0)
- return {param.first(sepIndex), param.sliced(sepIndex + 1)};
-
- return {param, {}};
- }
-
QString serializeParams(const QBtCommandLineParameters ¶ms)
{
QStringList result;
@@ -160,86 +143,85 @@ namespace
const BitTorrent::AddTorrentParams &addTorrentParams = params.addTorrentParams;
if (!addTorrentParams.savePath.isEmpty())
- result.append(bindParamValue(PARAM_SAVEPATH, addTorrentParams.savePath.data()));
+ result.append(u"@savePath=" + addTorrentParams.savePath.data());
- if (addTorrentParams.addStopped.has_value())
- result.append(bindParamValue(PARAM_ADDSTOPPED, (*addTorrentParams.addStopped ? u"1" : u"0")));
+ if (addTorrentParams.addPaused.has_value())
+ result.append(*addTorrentParams.addPaused ? u"@addPaused=1"_s : u"@addPaused=0"_s);
if (addTorrentParams.skipChecking)
- result.append(PARAM_SKIPCHECKING);
+ result.append(u"@skipChecking"_s);
if (!addTorrentParams.category.isEmpty())
- result.append(bindParamValue(PARAM_CATEGORY, addTorrentParams.category));
+ result.append(u"@category=" + addTorrentParams.category);
if (addTorrentParams.sequential)
- result.append(PARAM_SEQUENTIAL);
+ result.append(u"@sequential"_s);
if (addTorrentParams.firstLastPiecePriority)
- result.append(PARAM_FIRSTLASTPIECEPRIORITY);
+ result.append(u"@firstLastPiecePriority"_s);
if (params.skipDialog.has_value())
- result.append(bindParamValue(PARAM_SKIPDIALOG, (*params.skipDialog ? u"1" : u"0")));
+ result.append(*params.skipDialog ? u"@skipDialog=1"_s : u"@skipDialog=0"_s);
result += params.torrentSources;
return result.join(PARAMS_SEPARATOR);
}
- QBtCommandLineParameters parseParams(const QStringView str)
+ QBtCommandLineParameters parseParams(const QString &str)
{
QBtCommandLineParameters parsedParams;
BitTorrent::AddTorrentParams &addTorrentParams = parsedParams.addTorrentParams;
- for (QStringView param : asConst(str.split(PARAMS_SEPARATOR, Qt::SkipEmptyParts)))
+ for (QString param : asConst(str.split(PARAMS_SEPARATOR, Qt::SkipEmptyParts)))
{
param = param.trimmed();
- const auto [paramName, paramValue] = parseParam(param);
// Process strings indicating options specified by the user.
- if (paramName == PARAM_SAVEPATH)
+ if (param.startsWith(u"@savePath="))
{
- addTorrentParams.savePath = Path(paramValue.toString());
+ addTorrentParams.savePath = Path(param.mid(10));
continue;
}
- if (paramName == PARAM_ADDSTOPPED)
+ if (param.startsWith(u"@addPaused="))
{
- addTorrentParams.addStopped = (paramValue.toInt() != 0);
+ addTorrentParams.addPaused = (QStringView(param).mid(11).toInt() != 0);
continue;
}
- if (paramName == PARAM_SKIPCHECKING)
+ if (param == u"@skipChecking")
{
addTorrentParams.skipChecking = true;
continue;
}
- if (paramName == PARAM_CATEGORY)
+ if (param.startsWith(u"@category="))
{
- addTorrentParams.category = paramValue.toString();
+ addTorrentParams.category = param.mid(10);
continue;
}
- if (paramName == PARAM_SEQUENTIAL)
+ if (param == u"@sequential")
{
addTorrentParams.sequential = true;
continue;
}
- if (paramName == PARAM_FIRSTLASTPIECEPRIORITY)
+ if (param == u"@firstLastPiecePriority")
{
addTorrentParams.firstLastPiecePriority = true;
continue;
}
- if (paramName == PARAM_SKIPDIALOG)
+ if (param.startsWith(u"@skipDialog="))
{
- parsedParams.skipDialog = (paramValue.toInt() != 0);
+ parsedParams.skipDialog = (QStringView(param).mid(12).toInt() != 0);
continue;
}
- parsedParams.torrentSources.append(param.toString());
+ parsedParams.torrentSources.append(param);
}
return parsedParams;
@@ -249,7 +231,6 @@ namespace
Application::Application(int &argc, char **argv)
: BaseApplication(argc, argv)
, m_commandLineArgs(parseCommandLine(Application::arguments()))
- , m_storeInstanceName(SETTINGS_KEY(u"InstanceName"_s))
, m_storeFileLoggerEnabled(FILELOGGER_SETTINGS_KEY(u"Enabled"_s))
, m_storeFileLoggerBackup(FILELOGGER_SETTINGS_KEY(u"Backup"_s))
, m_storeFileLoggerDeleteOld(FILELOGGER_SETTINGS_KEY(u"DeleteOld"_s))
@@ -273,16 +254,21 @@ Application::Application(int &argc, char **argv)
setOrganizationDomain(u"qbittorrent.org"_s);
#if !defined(DISABLE_GUI)
setDesktopFileName(u"org.qbittorrent.qBittorrent"_s);
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
+ setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
+#endif
setQuitOnLastWindowClosed(false);
- setQuitLockEnabled(false);
QPixmapCache::setCacheLimit(PIXMAP_CACHE_SIZE);
#endif
Logger::initInstance();
const auto portableProfilePath = Path(QCoreApplication::applicationDirPath()) / DEFAULT_PORTABLE_MODE_PROFILE_DIR;
- const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && Utils::Fs::isDir(portableProfilePath);
- const Path profileDir = portableModeEnabled ? portableProfilePath : m_commandLineArgs.profileDir;
+ const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && portableProfilePath.exists();
+
+ const Path profileDir = portableModeEnabled
+ ? portableProfilePath
+ : m_commandLineArgs.profileDir;
Profile::initInstance(profileDir, m_commandLineArgs.configurationName,
(m_commandLineArgs.relativeFastresumePaths || portableModeEnabled));
@@ -291,18 +277,17 @@ Application::Application(int &argc, char **argv)
SettingsStorage::initInstance();
Preferences::initInstance();
- const bool firstTimeUser = SettingsStorage::instance()->isEmpty();
- if (firstTimeUser)
- {
- setCurrentMigrationVersion();
- handleChangedDefaults(DefaultPreferencesMode::Current);
- }
- else
+ const bool firstTimeUser = !Preferences::instance()->getAcceptedLegal();
+ if (!firstTimeUser)
{
if (!upgrade())
throw RuntimeError(u"Failed migration of old settings"_s); // Not translatable. Translation isn't configured yet.
handleChangedDefaults(DefaultPreferencesMode::Legacy);
}
+ else
+ {
+ handleChangedDefaults(DefaultPreferencesMode::Current);
+ }
initializeTranslation();
@@ -312,8 +297,7 @@ Application::Application(int &argc, char **argv)
connect(this, &QGuiApplication::commitDataRequest, this, &Application::shutdownCleanup, Qt::DirectConnection);
#endif
- LogMsg(tr("qBittorrent %1 started. Process ID: %2", "qBittorrent v3.2.0alpha started")
- .arg(QStringLiteral(QBT_VERSION), QString::number(QCoreApplication::applicationPid())));
+ LogMsg(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(QStringLiteral(QBT_VERSION)));
if (portableModeEnabled)
{
LogMsg(tr("Running in portable mode. Auto detected profile folder at: %1").arg(profileDir.toString()));
@@ -382,23 +366,6 @@ const QBtCommandLineParameters &Application::commandLineArgs() const
return m_commandLineArgs;
}
-QString Application::instanceName() const
-{
- return m_storeInstanceName;
-}
-
-void Application::setInstanceName(const QString &name)
-{
- if (name == instanceName())
- return;
-
- m_storeInstanceName = name;
-#ifndef DISABLE_GUI
- if (MainWindow *mw = mainWindow())
- mw->setTitleSuffix(name);
-#endif
-}
-
int Application::memoryWorkingSetLimit() const
{
return m_storeMemoryWorkingSetLimit.get(512);
@@ -410,7 +377,7 @@ void Application::setMemoryWorkingSetLimit(const int size)
return;
m_storeMemoryWorkingSetLimit = size;
-#if defined(QBT_USES_LIBTORRENT2) && !defined(Q_OS_LINUX) && !defined(Q_OS_MACOS)
+#if defined(QBT_USES_LIBTORRENT2) && !defined(Q_OS_MACOS)
applyMemoryWorkingSetLimit();
#endif
}
@@ -468,12 +435,12 @@ void Application::setFileLoggerDeleteOld(const bool value)
int Application::fileLoggerMaxSize() const
{
const int val = m_storeFileLoggerMaxSize.get(DEFAULT_FILELOG_SIZE);
- return std::clamp(val, MIN_FILELOG_SIZE, MAX_FILELOG_SIZE);
+ return std::min(std::max(val, MIN_FILELOG_SIZE), MAX_FILELOG_SIZE);
}
void Application::setFileLoggerMaxSize(const int bytes)
{
- const int clampedValue = std::clamp(bytes, MIN_FILELOG_SIZE, MAX_FILELOG_SIZE);
+ const int clampedValue = std::min(std::max(bytes, MIN_FILELOG_SIZE), MAX_FILELOG_SIZE);
if (m_fileLogger)
m_fileLogger->setMaxSize(clampedValue);
m_storeFileLoggerMaxSize = clampedValue;
@@ -482,12 +449,12 @@ void Application::setFileLoggerMaxSize(const int bytes)
int Application::fileLoggerAge() const
{
const int val = m_storeFileLoggerAge.get(1);
- return std::clamp(val, 1, 365);
+ return std::min(std::max(val, 1), 365);
}
void Application::setFileLoggerAge(const int value)
{
- m_storeFileLoggerAge = std::clamp(value, 1, 365);
+ m_storeFileLoggerAge = std::min(std::max(value, 1), 365);
}
int Application::fileLoggerAgeType() const
@@ -506,7 +473,8 @@ void Application::processMessage(const QString &message)
#ifndef DISABLE_GUI
if (message.isEmpty())
{
- if (BitTorrent::Session::instance()->isRestored()) [[likely]]
+ // TODO: use [[likely]] in C++20
+ if (Q_LIKELY(BitTorrent::Session::instance()->isRestored()))
{
m_window->activate(); // show UI
}
@@ -561,7 +529,7 @@ void Application::runExternalProgram(const QString &programTemplate, const BitTo
str.replace(i, 2, torrent->contentPath().toString());
break;
case u'G':
- str.replace(i, 2, Utils::String::joinIntoString(torrent->tags(), u","_s));
+ str.replace(i, 2, torrent->tags().join(u","_s));
break;
case u'I':
str.replace(i, 2, (torrent->infoHash().v1().isValid() ? torrent->infoHash().v1().toString() : u"-"_s));
@@ -575,9 +543,6 @@ void Application::runExternalProgram(const QString &programTemplate, const BitTo
case u'L':
str.replace(i, 2, torrent->category());
break;
- case u'M':
- str.replace(i, 2, torrent->comment());
- break;
case u'N':
str.replace(i, 2, torrent->name());
break;
@@ -605,7 +570,7 @@ void Application::runExternalProgram(const QString &programTemplate, const BitTo
const QString logMsg = tr("Running external program. Torrent: \"%1\". Command: `%2`");
const QString logMsgError = tr("Failed to run external program. Torrent: \"%1\". Command: `%2`");
- // The processing sequence is different for Windows and other OS, this is intentional
+ // The processing sequenece is different for Windows and other OS, this is intentional
#if defined(Q_OS_WIN)
const QString program = replaceVariables(programTemplate);
const std::wstring programWStr = program.toStdWString();
@@ -662,13 +627,7 @@ void Application::runExternalProgram(const QString &programTemplate, const BitTo
{
// strip redundant quotes
if (arg.startsWith(u'"') && arg.endsWith(u'"'))
- {
-#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
- arg.slice(1, (arg.size() - 2));
-#else
- arg.removeLast().removeFirst();
-#endif
- }
+ arg = arg.mid(1, (arg.size() - 2));
arg = replaceVariables(arg);
}
@@ -677,7 +636,6 @@ void Application::runExternalProgram(const QString &programTemplate, const BitTo
QProcess proc;
proc.setProgram(command);
proc.setArguments(args);
- proc.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors);
if (proc.startDetached())
{
@@ -711,24 +669,6 @@ void Application::sendNotificationEmail(const BitTorrent::Torrent *torrent)
content);
}
-void Application::sendTestEmail() const
-{
- const Preferences *pref = Preferences::instance();
- if (pref->isMailNotificationEnabled())
- {
- // Prepare mail content
- const QString content = tr("This is a test email.") + u'\n'
- + tr("Thank you for using qBittorrent.") + u'\n';
-
- // Send the notification email
- auto *smtp = new Net::Smtp();
- smtp->sendMail(pref->getMailNotificationSender(),
- pref->getMailNotificationEmail(),
- tr("Test email"),
- content);
- }
-}
-
void Application::torrentAdded(const BitTorrent::Torrent *torrent) const
{
const Preferences *pref = Preferences::instance();
@@ -752,21 +692,6 @@ void Application::torrentFinished(const BitTorrent::Torrent *torrent)
LogMsg(tr("Torrent: %1, sending mail notification").arg(torrent->name()));
sendNotificationEmail(torrent);
}
-
-#ifndef DISABLE_GUI
- if (Preferences::instance()->isRecursiveDownloadEnabled())
- {
- // Check whether it contains .torrent files
- for (const Path &torrentRelpath : asConst(torrent->filePaths()))
- {
- if (torrentRelpath.hasExtension(u".torrent"_s))
- {
- askRecursiveTorrentDownloadConfirmation(torrent);
- break;
- }
- }
- }
-#endif
}
void Application::allTorrentsFinished()
@@ -829,15 +754,18 @@ void Application::processParams(const QBtCommandLineParameters ¶ms)
// be shown and skipTorrentDialog is undefined. The other is when
// skipTorrentDialog is false, meaning that the application setting
// should be overridden.
- AddTorrentOption addTorrentOption = AddTorrentOption::Default;
- if (params.skipDialog.has_value())
- addTorrentOption = params.skipDialog.value() ? AddTorrentOption::SkipDialog : AddTorrentOption::ShowDialog;
- for (const QString &torrentSource : params.torrentSources)
- m_addTorrentManager->addTorrent(torrentSource, params.addTorrentParams, addTorrentOption);
-#else
- for (const QString &torrentSource : params.torrentSources)
- m_addTorrentManager->addTorrent(torrentSource, params.addTorrentParams);
+ const bool showDialog = !params.skipDialog.value_or(!AddNewTorrentDialog::isEnabled());
+ if (showDialog)
+ {
+ for (const QString &torrentSource : params.torrentSources)
+ AddNewTorrentDialog::show(torrentSource, params.addTorrentParams, m_window);
+ }
+ else
#endif
+ {
+ for (const QString &torrentSource : params.torrentSources)
+ BitTorrent::Session::instance()->addTorrent(torrentSource, params.addTorrentParams);
+ }
}
int Application::exec()
@@ -847,7 +775,7 @@ int Application::exec()
printf("%s\n", qUtf8Printable(loadingStr));
#endif
-#if defined(QBT_USES_LIBTORRENT2) && !defined(Q_OS_LINUX) && !defined(Q_OS_MACOS)
+#if defined(QBT_USES_LIBTORRENT2) && !defined(Q_OS_MACOS)
applyMemoryWorkingSetLimit();
#endif
@@ -858,6 +786,7 @@ int Application::exec()
Net::ProxyConfigurationManager::initInstance();
Net::DownloadManager::initInstance();
+ IconProvider::initInstance();
BitTorrent::Session::initInstance();
#ifndef DISABLE_GUI
@@ -866,7 +795,7 @@ int Application::exec()
m_desktopIntegration = new DesktopIntegration;
m_desktopIntegration->setToolTip(tr("Loading torrents..."));
#ifndef Q_OS_MACOS
- auto *desktopIntegrationMenu = m_desktopIntegration->menu();
+ auto *desktopIntegrationMenu = new QMenu;
auto *actionExit = new QAction(tr("E&xit"), desktopIntegrationMenu);
actionExit->setIcon(UIThemeManager::instance()->getIcon(u"application-exit"_s));
actionExit->setMenuRole(QAction::QuitRole);
@@ -877,6 +806,8 @@ int Application::exec()
});
desktopIntegrationMenu->addAction(actionExit);
+ m_desktopIntegration->setMenu(desktopIntegrationMenu);
+
const bool isHidden = m_desktopIntegration->isActive() && (startUpWindowState() == WindowState::Hidden);
#else
const bool isHidden = false;
@@ -901,13 +832,11 @@ int Application::exec()
connect(BitTorrent::Session::instance(), &BitTorrent::Session::torrentFinished, this, &Application::torrentFinished);
connect(BitTorrent::Session::instance(), &BitTorrent::Session::allTorrentsFinished, this, &Application::allTorrentsFinished, Qt::QueuedConnection);
- m_addTorrentManager = new AddTorrentManagerImpl(this, BitTorrent::Session::instance(), this);
-
Net::GeoIPManager::initInstance();
TorrentFilesWatcher::initInstance();
new RSS::Session; // create RSS::Session singleton
- new RSS::AutoDownloader(this); // create RSS::AutoDownloader singleton
+ new RSS::AutoDownloader; // create RSS::AutoDownloader singleton
#ifndef DISABLE_GUI
const auto *btSession = BitTorrent::Session::instance();
@@ -915,25 +844,30 @@ int Application::exec()
, [this](const BitTorrent::Torrent *torrent, const QString &msg)
{
m_desktopIntegration->showNotification(tr("I/O Error", "i.e: Input/Output Error")
- , tr("An I/O error occurred for torrent '%1'.\n Reason: %2"
- , "e.g: An error occurred for torrent 'xxx.avi'.\n Reason: disk is full.").arg(torrent->name(), msg));
+ , tr("An I/O error occurred for torrent '%1'.\n Reason: %2"
+ , "e.g: An error occurred for torrent 'xxx.avi'.\n Reason: disk is full.").arg(torrent->name(), msg));
+ });
+ connect(btSession, &BitTorrent::Session::loadTorrentFailed, this
+ , [this](const QString &error)
+ {
+ m_desktopIntegration->showNotification(tr("Error"), tr("Failed to add torrent: %1").arg(error));
+ });
+ connect(btSession, &BitTorrent::Session::torrentAdded, this
+ , [this](const BitTorrent::Torrent *torrent)
+ {
+ if (isTorrentAddedNotificationsEnabled())
+ m_desktopIntegration->showNotification(tr("Torrent added"), tr("'%1' was added.", "e.g: xxx.avi was added.").arg(torrent->name()));
});
connect(btSession, &BitTorrent::Session::torrentFinished, this
, [this](const BitTorrent::Torrent *torrent)
{
m_desktopIntegration->showNotification(tr("Download completed"), tr("'%1' has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(torrent->name()));
});
- connect(m_addTorrentManager, &AddTorrentManager::torrentAdded, this
- , [this]([[maybe_unused]] const QString &source, const BitTorrent::Torrent *torrent)
+ connect(btSession, &BitTorrent::Session::downloadFromUrlFailed, this
+ , [this](const QString &url, const QString &reason)
{
- if (isTorrentAddedNotificationsEnabled())
- m_desktopIntegration->showNotification(tr("Torrent added"), tr("'%1' was added.", "e.g: xxx.avi was added.").arg(torrent->name()));
- });
- connect(m_addTorrentManager, &AddTorrentManager::addTorrentFailed, this
- , [this](const QString &source, const BitTorrent::AddTorrentError &reason)
- {
- m_desktopIntegration->showNotification(tr("Add torrent failed")
- , tr("Couldn't add torrent '%1', reason: %2.").arg(source, reason.message));
+ m_desktopIntegration->showNotification(tr("URL download error")
+ , tr("Couldn't download file at URL '%1', reason: %2.").arg(url, reason));
});
disconnect(m_desktopIntegration, &DesktopIntegration::activationRequested, this, &Application::createStartupProgressDialog);
@@ -945,52 +879,51 @@ int Application::exec()
const WindowState windowState = (m_startupProgressDialog->windowState() & Qt::WindowMinimized)
? WindowState::Minimized : WindowState::Normal;
#endif
- m_window = new MainWindow(this, windowState, instanceName());
-
+ m_window = new MainWindow(this, windowState);
delete m_startupProgressDialog;
+#ifdef Q_OS_WIN
+ auto *pref = Preferences::instance();
+ if (!pref->neverCheckFileAssoc() && (!Utils::OS::isTorrentFileAssocSet() || !Utils::OS::isMagnetLinkAssocSet()))
+ {
+ if (QMessageBox::question(m_window, tr("Torrent file association")
+ , tr("qBittorrent is not the default application for opening torrent files or Magnet links.\nDo you want to make qBittorrent the default application for these?")
+ , QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
+ {
+ Utils::OS::setTorrentFileAssoc(true);
+ Utils::OS::setMagnetLinkAssoc(true);
+ }
+ else
+ {
+ pref->setNeverCheckFileAssoc();
+ }
+ }
+#endif // Q_OS_WIN
#endif // DISABLE_GUI
#ifndef DISABLE_WEBUI
#ifndef DISABLE_GUI
m_webui = new WebUI(this);
#else
- const auto *pref = Preferences::instance();
-
+ const Preferences *pref = Preferences::instance();
const QString tempPassword = pref->getWebUIPassword().isEmpty()
? Utils::Password::generate() : QString();
m_webui = new WebUI(this, (!tempPassword.isEmpty() ? Utils::Password::PBKDF2::generate(tempPassword) : QByteArray()));
- connect(m_webui, &WebUI::error, this, [](const QString &message)
- {
- fprintf(stderr, "WebUI configuration failed. Reason: %s\n", qUtf8Printable(message));
- });
-
- printf("%s", qUtf8Printable(u"\n******** %1 ********\n"_s.arg(tr("Information"))));
-
if (m_webui->isErrored())
- {
- const QString error = m_webui->errorMessage() + u'\n'
- + tr("To fix the error, you may need to edit the config file manually.");
- fprintf(stderr, "%s\n", qUtf8Printable(error));
- }
- else if (m_webui->isEnabled())
- {
- const QHostAddress address = m_webui->hostAddress();
- const QString url = u"%1://%2:%3"_s.arg((m_webui->isHttps() ? u"https"_s : u"http"_s)
- , (address.isEqual(QHostAddress::Any, QHostAddress::ConvertUnspecifiedAddress) ? u"localhost"_s : address.toString())
- , QString::number(m_webui->port()));
- printf("%s\n", qUtf8Printable(tr("To control qBittorrent, access the WebUI at: %1").arg(url)));
+ QCoreApplication::exit(EXIT_FAILURE);
+ connect(m_webui, &WebUI::fatalError, this, []() { QCoreApplication::exit(EXIT_FAILURE); });
- if (!tempPassword.isEmpty())
- {
- const QString warning = tr("The WebUI administrator username is: %1").arg(pref->getWebUIUsername()) + u'\n'
- + tr("The WebUI administrator password was not set. A temporary password is provided for this session: %1").arg(tempPassword) + u'\n'
- + tr("You should set your own password in program preferences.") + u'\n';
- printf("%s", qUtf8Printable(warning));
- }
- }
- else
+ const auto scheme = pref->isWebUIHttpsEnabled() ? u"https"_s : u"http"_s;
+ const auto url = u"%1://localhost:%2\n"_s.arg(scheme, QString::number(pref->getWebUIPort()));
+ const QString mesg = u"\n******** %1 ********\n"_s.arg(tr("Information"))
+ + tr("To control qBittorrent, access the WebUI at: %1").arg(url);
+ printf("%s\n", qUtf8Printable(mesg));
+
+ if (!tempPassword.isEmpty())
{
- printf("%s\n", qUtf8Printable(tr("The WebUI is disabled! To enable the WebUI, edit the config file manually.")));
+ const QString warning = tr("The WebUI administrator username is: %1").arg(pref->getWebUIUsername()) + u'\n'
+ + tr("The WebUI administrator password was not set. A temporary password is provided for this session: %1").arg(tempPassword) + u'\n'
+ + tr("You should set your own password in program preferences.") + u'\n';
+ printf("%s", qUtf8Printable(warning));
}
#endif // DISABLE_GUI
#endif // DISABLE_WEBUI
@@ -1008,7 +941,7 @@ int Application::exec()
return BaseApplication::exec();
}
-bool Application::hasAnotherInstance() const
+bool Application::isRunning()
{
return !m_instanceManager->isFirstInstance();
}
@@ -1063,57 +996,6 @@ void Application::createStartupProgressDialog()
});
}
-void Application::askRecursiveTorrentDownloadConfirmation(const BitTorrent::Torrent *torrent)
-{
- const auto torrentID = torrent->id();
-
- QMessageBox *confirmBox = new QMessageBox(QMessageBox::Question, tr("Recursive download confirmation")
- , tr("The torrent '%1' contains .torrent files, do you want to proceed with their downloads?").arg(torrent->name())
- , (QMessageBox::Yes | QMessageBox::No | QMessageBox::NoToAll), mainWindow());
- confirmBox->setAttribute(Qt::WA_DeleteOnClose);
-
- const QAbstractButton *yesButton = confirmBox->button(QMessageBox::Yes);
- QAbstractButton *neverButton = confirmBox->button(QMessageBox::NoToAll);
- neverButton->setText(tr("Never"));
-
- connect(confirmBox, &QMessageBox::buttonClicked, this
- , [this, torrentID, yesButton, neverButton](const QAbstractButton *button)
- {
- if (button == yesButton)
- {
- recursiveTorrentDownload(torrentID);
- }
- else if (button == neverButton)
- {
- Preferences::instance()->setRecursiveDownloadEnabled(false);
- }
- });
- confirmBox->open();
-}
-
-void Application::recursiveTorrentDownload(const BitTorrent::TorrentID &torrentID)
-{
- const BitTorrent::Torrent *torrent = BitTorrent::Session::instance()->getTorrent(torrentID);
- if (!torrent)
- return;
-
- for (const Path &torrentRelpath : asConst(torrent->filePaths()))
- {
- if (torrentRelpath.hasExtension(u".torrent"_s))
- {
- const Path torrentFullpath = torrent->savePath() / torrentRelpath;
-
- LogMsg(tr("Recursive download .torrent file within torrent. Source torrent: \"%1\". File: \"%2\"")
- .arg(torrent->name(), torrentFullpath.toString()));
-
- BitTorrent::AddTorrentParams params;
- // Passing the save path along to the sub torrent file
- params.savePath = torrent->savePath();
- addTorrentManager()->addTorrent(torrentFullpath.data(), params, AddTorrentOption::SkipDialog);
- }
- }
-}
-
#ifdef Q_OS_MACOS
bool Application::event(QEvent *ev)
{
@@ -1148,15 +1030,11 @@ void Application::initializeTranslation()
// Load translation
const QString localeStr = pref->getLocale();
- if (m_qtTranslator.load((u"qtbase_" + localeStr), QLibraryInfo::path(QLibraryInfo::TranslationsPath))
- || m_qtTranslator.load((u"qt_" + localeStr), QLibraryInfo::path(QLibraryInfo::TranslationsPath)))
- {
- qDebug("Qt %s locale recognized, using translation.", qUtf8Printable(localeStr));
- }
+ if (m_qtTranslator.load((u"qtbase_" + localeStr), QLibraryInfo::location(QLibraryInfo::TranslationsPath)) ||
+ m_qtTranslator.load((u"qt_" + localeStr), QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ qDebug("Qt %s locale recognized, using translation.", qUtf8Printable(localeStr));
else
- {
qDebug("Qt %s locale unrecognized, using default (en).", qUtf8Printable(localeStr));
- }
installTranslator(&m_qtTranslator);
@@ -1180,8 +1058,10 @@ void Application::initializeTranslation()
}
#if (!defined(DISABLE_GUI) && defined(Q_OS_WIN))
-void Application::shutdownCleanup([[maybe_unused]] QSessionManager &manager)
+void Application::shutdownCleanup(QSessionManager &manager)
{
+ Q_UNUSED(manager);
+
// This is only needed for a special case on Windows XP.
// (but is called for every Windows version)
// If a process takes too much time to exit during OS
@@ -1205,7 +1085,7 @@ void Application::shutdownCleanup([[maybe_unused]] QSessionManager &manager)
}
#endif
-#if defined(QBT_USES_LIBTORRENT2) && !defined(Q_OS_LINUX) && !defined(Q_OS_MACOS)
+#if defined(QBT_USES_LIBTORRENT2) && !defined(Q_OS_MACOS)
void Application::applyMemoryWorkingSetLimit() const
{
const size_t MiB = 1024 * 1024;
@@ -1278,12 +1158,12 @@ void Application::setProcessMemoryPriority(const MemoryPriority priority)
void Application::applyMemoryPriority() const
{
using SETPROCESSINFORMATION = BOOL (WINAPI *)(HANDLE, PROCESS_INFORMATION_CLASS, LPVOID, DWORD);
- const auto setProcessInformation = Utils::OS::loadWinAPI(u"Kernel32.dll"_s, "SetProcessInformation");
+ const auto setProcessInformation = Utils::Misc::loadWinAPI(u"Kernel32.dll"_s, "SetProcessInformation");
if (!setProcessInformation) // only available on Windows >= 8
return;
using SETTHREADINFORMATION = BOOL (WINAPI *)(HANDLE, THREAD_INFORMATION_CLASS, LPVOID, DWORD);
- const auto setThreadInformation = Utils::OS::loadWinAPI(u"Kernel32.dll"_s, "SetThreadInformation");
+ const auto setThreadInformation = Utils::Misc::loadWinAPI(u"Kernel32.dll"_s, "SetThreadInformation");
if (!setThreadInformation) // only available on Windows >= 8
return;
@@ -1344,7 +1224,7 @@ void Application::adjustThreadPriority() const
void Application::cleanup()
{
// cleanup() can be called multiple times during shutdown. We only need it once.
- if (m_isCleanupRun.exchange(true, std::memory_order_acquire))
+ if (!m_isCleanupRun.testAndSetAcquire(0, 1))
return;
LogMsg(tr("qBittorrent termination initiated"));
@@ -1391,13 +1271,13 @@ void Application::cleanup()
delete RSS::Session::instance();
TorrentFilesWatcher::freeInstance();
- delete m_addTorrentManager;
BitTorrent::Session::freeInstance();
Net::GeoIPManager::freeInstance();
Net::DownloadManager::freeInstance();
Net::ProxyConfigurationManager::freeInstance();
Preferences::freeInstance();
SettingsStorage::freeInstance();
+ IconProvider::freeInstance();
SearchPluginManager::freeInstance();
Utils::Fs::removeDirRecursively(Utils::Fs::tempPath());
@@ -1422,15 +1302,10 @@ void Application::cleanup()
if (m_shutdownAct != ShutdownDialogAction::Exit)
{
qDebug() << "Sending computer shutdown/suspend/hibernate signal...";
- Utils::OS::shutdownComputer(m_shutdownAct);
+ Utils::Misc::shutdownComputer(m_shutdownAct);
}
}
-AddTorrentManagerImpl *Application::addTorrentManager() const
-{
- return m_addTorrentManager;
-}
-
#ifndef DISABLE_WEBUI
WebUI *Application::webUI() const
{
diff --git a/src/app/application.h b/src/app/application.h
index ca683fbff..6d73c8c9a 100644
--- a/src/app/application.h
+++ b/src/app/application.h
@@ -30,9 +30,8 @@
#pragma once
-#include
-
-#include
+#include
+#include
#include
#include
#include
@@ -73,7 +72,6 @@ class QProgressDialog;
class DesktopIntegration;
class MainWindow;
-using AddTorrentManagerImpl = GUIAddTorrentManager;
using BaseApplication = QApplication;
using BaseIApplication = IGUIApplication;
@@ -81,7 +79,6 @@ using BaseIApplication = IGUIApplication;
class QSessionManager;
#endif
#else // DISABLE_GUI
-using AddTorrentManagerImpl = AddTorrentManager;
using BaseApplication = QCoreApplication;
using BaseIApplication = IApplication;
#endif // DISABLE_GUI
@@ -101,13 +98,10 @@ public:
int exec();
- bool hasAnotherInstance() const;
+ bool isRunning();
bool callMainInstance();
const QBtCommandLineParameters &commandLineArgs() const;
- QString instanceName() const override;
- void setInstanceName(const QString &name) override;
-
// FileLogger properties
bool isFileLoggerEnabled() const override;
void setFileLoggerEnabled(bool value) override;
@@ -127,8 +121,6 @@ public:
int memoryWorkingSetLimit() const override;
void setMemoryWorkingSetLimit(int size) override;
- void sendTestEmail() const override;
-
#ifdef Q_OS_WIN
MemoryPriority processMemoryPriority() const override;
void setProcessMemoryPriority(MemoryPriority priority) override;
@@ -157,7 +149,6 @@ private slots:
#endif
private:
- AddTorrentManagerImpl *addTorrentManager() const override;
#ifndef DISABLE_WEBUI
WebUI *webUI() const override;
#endif
@@ -181,12 +172,10 @@ private:
#ifdef Q_OS_MACOS
bool event(QEvent *) override;
#endif
- void askRecursiveTorrentDownloadConfirmation(const BitTorrent::Torrent *torrent);
- void recursiveTorrentDownload(const BitTorrent::TorrentID &torrentID);
#endif
ApplicationInstanceManager *m_instanceManager = nullptr;
- std::atomic_bool m_isCleanupRun;
+ QAtomicInt m_isCleanupRun;
bool m_isProcessingParamsAllowed = false;
ShutdownDialogAction m_shutdownAct = ShutdownDialogAction::Exit;
QBtCommandLineParameters m_commandLineArgs;
@@ -199,7 +188,6 @@ private:
QList m_paramsQueue;
- SettingValue m_storeInstanceName;
SettingValue m_storeFileLoggerEnabled;
SettingValue m_storeFileLoggerBackup;
SettingValue m_storeFileLoggerDeleteOld;
@@ -213,8 +201,6 @@ private:
SettingValue m_processMemoryPriority;
#endif
- AddTorrentManagerImpl *m_addTorrentManager = nullptr;
-
#ifndef DISABLE_GUI
SettingValue m_startUpWindowState;
SettingValue m_storeNotificationTorrentAdded;
diff --git a/src/app/applicationinstancemanager.cpp b/src/app/applicationinstancemanager.cpp
index 26001724a..a897733e2 100644
--- a/src/app/applicationinstancemanager.cpp
+++ b/src/app/applicationinstancemanager.cpp
@@ -28,7 +28,7 @@
#include "applicationinstancemanager.h"
-#include
+#include
#ifdef Q_OS_WIN
#include
diff --git a/src/app/cmdoptions.cpp b/src/app/cmdoptions.cpp
index 5ed6e4865..6601f1edc 100644
--- a/src/app/cmdoptions.cpp
+++ b/src/app/cmdoptions.cpp
@@ -36,14 +36,12 @@
#include
#include
#include
-#include
#if defined(Q_OS_WIN) && !defined(DISABLE_GUI)
#include
#endif
#include "base/global.h"
-#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
@@ -61,7 +59,7 @@ namespace
class Option
{
protected:
- explicit constexpr Option(const QStringView name, const QChar shortcut = QChar::Null)
+ explicit constexpr Option(const char *name, char shortcut = 0)
: m_name {name}
, m_shortcut {shortcut}
{
@@ -69,23 +67,23 @@ namespace
QString fullParameter() const
{
- return u"--" + m_name.toString();
+ return u"--" + QString::fromLatin1(m_name);
}
QString shortcutParameter() const
{
- return u"-" + m_shortcut;
+ return u"-" + QChar::fromLatin1(m_shortcut);
}
bool hasShortcut() const
{
- return !m_shortcut.isNull();
+ return m_shortcut != 0;
}
QString envVarName() const
{
return u"QBT_"
- + m_name.toString().toUpper().replace(u'-', u'_');
+ + QString::fromLatin1(m_name).toUpper().replace(u'-', u'_');
}
public:
@@ -100,15 +98,15 @@ namespace
}
private:
- const QStringView m_name;
- const QChar m_shortcut;
+ const char *m_name = nullptr;
+ const char m_shortcut;
};
// Boolean option.
class BoolOption : protected Option
{
public:
- explicit constexpr BoolOption(const QStringView name, const QChar shortcut = QChar::Null)
+ explicit constexpr BoolOption(const char *name, char shortcut = 0)
: Option {name, shortcut}
{
}
@@ -136,12 +134,17 @@ namespace
}
};
+ bool operator==(const QString &arg, const BoolOption &option)
+ {
+ return (option == arg);
+ }
+
// Option with string value. May not have a shortcut
struct StringOption : protected Option
{
public:
- explicit constexpr StringOption(const QStringView name)
- : Option {name, QChar::Null}
+ explicit constexpr StringOption(const char *name)
+ : Option {name, 0}
{
}
@@ -178,11 +181,16 @@ namespace
}
};
+ bool operator==(const QString &arg, const StringOption &option)
+ {
+ return (option == arg);
+ }
+
// Option with integer value. May not have a shortcut
class IntOption : protected StringOption
{
public:
- explicit constexpr IntOption(const QStringView name)
+ explicit constexpr IntOption(const char *name)
: StringOption {name}
{
}
@@ -225,13 +233,18 @@ namespace
}
};
+ bool operator==(const QString &arg, const IntOption &option)
+ {
+ return (option == arg);
+ }
+
// Option that is explicitly set to true or false, and whose value is undefined when unspecified.
// May not have a shortcut.
class TriStateBoolOption : protected Option
{
public:
- constexpr TriStateBoolOption(const QStringView name, const bool defaultValue)
- : Option {name, QChar::Null}
+ constexpr TriStateBoolOption(const char *name, bool defaultValue)
+ : Option {name, 0}
, m_defaultValue(defaultValue)
{
}
@@ -264,8 +277,8 @@ namespace
}
throw CommandLineParameterError(QCoreApplication::translate("CMD Options", "Parameter '%1' must follow syntax '%1=%2'",
- "e.g. Parameter '--add-stopped' must follow syntax "
- "'--add-stopped='")
+ "e.g. Parameter '--add-paused' must follow syntax "
+ "'--add-paused='")
.arg(fullParameter(), u""_s));
}
@@ -300,37 +313,37 @@ namespace
return arg.section(u'=', 0, 0) == option.fullParameter();
}
- private:
- bool m_defaultValue = false;
+ bool m_defaultValue;
};
- constexpr const BoolOption SHOW_HELP_OPTION {u"help", u'h'};
-#if !defined(Q_OS_WIN) || defined(DISABLE_GUI)
- constexpr const BoolOption SHOW_VERSION_OPTION {u"version", u'v'};
-#endif
- constexpr const BoolOption CONFIRM_LEGAL_NOTICE {u"confirm-legal-notice"};
+ bool operator==(const QString &arg, const TriStateBoolOption &option)
+ {
+ return (option == arg);
+ }
+
+ constexpr const BoolOption SHOW_HELP_OPTION {"help", 'h'};
+ constexpr const BoolOption SHOW_VERSION_OPTION {"version", 'v'};
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)
- constexpr const BoolOption DAEMON_OPTION {u"daemon", u'd'};
+ constexpr const BoolOption DAEMON_OPTION {"daemon", 'd'};
#else
- constexpr const BoolOption NO_SPLASH_OPTION {u"no-splash"};
+ constexpr const BoolOption NO_SPLASH_OPTION {"no-splash"};
#endif
- constexpr const IntOption WEBUI_PORT_OPTION {u"webui-port"};
- constexpr const IntOption TORRENTING_PORT_OPTION {u"torrenting-port"};
- constexpr const StringOption PROFILE_OPTION {u"profile"};
- constexpr const StringOption CONFIGURATION_OPTION {u"configuration"};
- constexpr const BoolOption RELATIVE_FASTRESUME {u"relative-fastresume"};
- constexpr const StringOption SAVE_PATH_OPTION {u"save-path"};
- constexpr const TriStateBoolOption STOPPED_OPTION {u"add-stopped", true};
- constexpr const BoolOption SKIP_HASH_CHECK_OPTION {u"skip-hash-check"};
- constexpr const StringOption CATEGORY_OPTION {u"category"};
- constexpr const BoolOption SEQUENTIAL_OPTION {u"sequential"};
- constexpr const BoolOption FIRST_AND_LAST_OPTION {u"first-and-last"};
- constexpr const TriStateBoolOption SKIP_DIALOG_OPTION {u"skip-dialog", true};
+ constexpr const IntOption WEBUI_PORT_OPTION {"webui-port"};
+ constexpr const IntOption TORRENTING_PORT_OPTION {"torrenting-port"};
+ constexpr const StringOption PROFILE_OPTION {"profile"};
+ constexpr const StringOption CONFIGURATION_OPTION {"configuration"};
+ constexpr const BoolOption RELATIVE_FASTRESUME {"relative-fastresume"};
+ constexpr const StringOption SAVE_PATH_OPTION {"save-path"};
+ constexpr const TriStateBoolOption PAUSED_OPTION {"add-paused", true};
+ constexpr const BoolOption SKIP_HASH_CHECK_OPTION {"skip-hash-check"};
+ constexpr const StringOption CATEGORY_OPTION {"category"};
+ constexpr const BoolOption SEQUENTIAL_OPTION {"sequential"};
+ constexpr const BoolOption FIRST_AND_LAST_OPTION {"first-and-last"};
+ constexpr const TriStateBoolOption SKIP_DIALOG_OPTION {"skip-dialog", true};
}
QBtCommandLineParameters::QBtCommandLineParameters(const QProcessEnvironment &env)
- : confirmLegalNotice(CONFIRM_LEGAL_NOTICE.value(env))
- , relativeFastresumePaths(RELATIVE_FASTRESUME.value(env))
+ : relativeFastresumePaths(RELATIVE_FASTRESUME.value(env))
#ifndef DISABLE_GUI
, noSplash(NO_SPLASH_OPTION.value(env))
#elif !defined(Q_OS_WIN)
@@ -339,7 +352,7 @@ QBtCommandLineParameters::QBtCommandLineParameters(const QProcessEnvironment &en
, webUIPort(WEBUI_PORT_OPTION.value(env, -1))
, torrentingPort(TORRENTING_PORT_OPTION.value(env, -1))
, skipDialog(SKIP_DIALOG_OPTION.value(env))
- , profileDir(Utils::Fs::toAbsolutePath(Path(PROFILE_OPTION.value(env))))
+ , profileDir(PROFILE_OPTION.value(env))
, configurationName(CONFIGURATION_OPTION.value(env))
{
addTorrentParams.savePath = Path(SAVE_PATH_OPTION.value(env));
@@ -347,7 +360,7 @@ QBtCommandLineParameters::QBtCommandLineParameters(const QProcessEnvironment &en
addTorrentParams.skipChecking = SKIP_HASH_CHECK_OPTION.value(env);
addTorrentParams.sequential = SEQUENTIAL_OPTION.value(env);
addTorrentParams.firstLastPiecePriority = FIRST_AND_LAST_OPTION.value(env);
- addTorrentParams.addStopped = STOPPED_OPTION.value(env);
+ addTorrentParams.addPaused = PAUSED_OPTION.value(env);
}
QBtCommandLineParameters parseCommandLine(const QStringList &args)
@@ -372,10 +385,6 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
result.showVersion = true;
}
#endif
- else if (arg == CONFIRM_LEGAL_NOTICE)
- {
- result.confirmLegalNotice = true;
- }
else if (arg == WEBUI_PORT_OPTION)
{
result.webUIPort = WEBUI_PORT_OPTION.value(arg);
@@ -405,7 +414,7 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
#endif
else if (arg == PROFILE_OPTION)
{
- result.profileDir = Utils::Fs::toAbsolutePath(Path(PROFILE_OPTION.value(arg)));
+ result.profileDir = Path(PROFILE_OPTION.value(arg));
}
else if (arg == RELATIVE_FASTRESUME)
{
@@ -419,9 +428,9 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
{
result.addTorrentParams.savePath = Path(SAVE_PATH_OPTION.value(arg));
}
- else if (arg == STOPPED_OPTION)
+ else if (arg == PAUSED_OPTION)
{
- result.addTorrentParams.addStopped = STOPPED_OPTION.value(arg);
+ result.addTorrentParams.addPaused = PAUSED_OPTION.value(arg);
}
else if (arg == SKIP_HASH_CHECK_OPTION)
{
@@ -465,13 +474,13 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
return result;
}
-QString wrapText(const QString &text, const int initialIndentation = USAGE_TEXT_COLUMN, const int wrapAtColumn = WRAP_AT_COLUMN)
+QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN, int wrapAtColumn = WRAP_AT_COLUMN)
{
- const QStringList words = text.split(u' ');
+ QStringList words = text.split(u' ');
QStringList lines = {words.first()};
int currentLineMaxLength = wrapAtColumn - initialIndentation;
- for (const QString &word : asConst(words.sliced(1)))
+ for (const QString &word : asConst(words.mid(1)))
{
if (lines.last().length() + word.length() + 1 < currentLineMaxLength)
{
@@ -491,21 +500,14 @@ QString makeUsage(const QString &prgName)
{
const QString indentation {USAGE_INDENTATION, u' '};
-#if defined(Q_OS_WIN)
- const QString noSplashCommand = u"set QBT_NO_SPLASH=1 && " + prgName;
-#else
- const QString noSplashCommand = u"QBT_NO_SPLASH=1 " + prgName;
-#endif
-
const QString text = QCoreApplication::translate("CMD Options", "Usage:") + u'\n'
+ indentation + prgName + u' ' + QCoreApplication::translate("CMD Options", "[options] [( | )...]") + u'\n'
+ QCoreApplication::translate("CMD Options", "Options:") + u'\n'
- + SHOW_HELP_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Display this help message and exit")) + u'\n'
#if !defined(Q_OS_WIN) || defined(DISABLE_GUI)
+ SHOW_VERSION_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Display program version and exit")) + u'\n'
#endif
- + CONFIRM_LEGAL_NOTICE.usage() + wrapText(QCoreApplication::translate("CMD Options", "Confirm the legal notice")) + u'\n'
+ + SHOW_HELP_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Display this help message and exit")) + u'\n'
+ WEBUI_PORT_OPTION.usage(QCoreApplication::translate("CMD Options", "port"))
+ wrapText(QCoreApplication::translate("CMD Options", "Change the WebUI port"))
+ u'\n'
@@ -531,7 +533,7 @@ QString makeUsage(const QString &prgName)
+ wrapText(QCoreApplication::translate("CMD Options", "Options when adding new torrents:"), 0) + u'\n'
+ SAVE_PATH_OPTION.usage(QCoreApplication::translate("CMD Options", "path")) + wrapText(QCoreApplication::translate("CMD Options", "Torrent save path")) + u'\n'
- + STOPPED_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Add torrents as running or stopped")) + u'\n'
+ + PAUSED_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Add torrents as started or paused")) + u'\n'
+ SKIP_HASH_CHECK_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Skip hash check")) + u'\n'
+ CATEGORY_OPTION.usage(QCoreApplication::translate("CMD Options", "name"))
+ wrapText(QCoreApplication::translate("CMD Options", "Assign torrents to category. If the category doesn't exist, it will be "
@@ -548,7 +550,7 @@ QString makeUsage(const QString &prgName)
"'parameter-name', environment variable name is 'QBT_PARAMETER_NAME' (in upper "
"case, '-' replaced with '_'). To pass flag values, set the variable to '1' or "
"'TRUE'. For example, to disable the splash screen: "), 0) + u'\n'
- + noSplashCommand + u'\n'
+ + u"QBT_NO_SPLASH=1 " + prgName + u'\n'
+ wrapText(QCoreApplication::translate("CMD Options", "Command line parameters take precedence over environment variables"), 0) + u'\n';
return text;
diff --git a/src/app/cmdoptions.h b/src/app/cmdoptions.h
index c4b42053f..1c133c413 100644
--- a/src/app/cmdoptions.h
+++ b/src/app/cmdoptions.h
@@ -44,11 +44,10 @@ class QProcessEnvironment;
struct QBtCommandLineParameters
{
bool showHelp = false;
+ bool relativeFastresumePaths = false;
#if !defined(Q_OS_WIN) || defined(DISABLE_GUI)
bool showVersion = false;
#endif
- bool confirmLegalNotice = false;
- bool relativeFastresumePaths = false;
#ifndef DISABLE_GUI
bool noSplash = false;
#elif !defined(Q_OS_WIN)
diff --git a/src/app/filelogger.cpp b/src/app/filelogger.cpp
index 4c83c16a1..e13beb7c9 100644
--- a/src/app/filelogger.cpp
+++ b/src/app/filelogger.cpp
@@ -32,8 +32,8 @@
#include
#include
-#include
#include
+#include
#include "base/global.h"
#include "base/logger.h"
@@ -127,6 +127,9 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
if (!m_logFile.isOpen()) return;
QTextStream stream(&m_logFile);
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
+ stream.setCodec("UTF-8");
+#endif
switch (msg.type)
{
@@ -175,15 +178,12 @@ void FileLogger::flushLog()
void FileLogger::openLogFile()
{
- if (!m_logFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text))
+ if (!m_logFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)
+ || !m_logFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner))
{
- LogMsg(tr("An error occurred while trying to open the log file. Logging to file is disabled. File: \"%1\". Error: \"%2\".")
- .arg(m_logFile.fileName(), m_logFile.errorString()), Log::CRITICAL);
- return;
+ m_logFile.close();
+ LogMsg(tr("An error occurred while trying to open the log file. Logging to file is disabled."), Log::CRITICAL);
}
-
- // best effort, don't report error
- m_logFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner);
}
void FileLogger::closeLogFile()
diff --git a/src/app/legalnotice.cpp b/src/app/legalnotice.cpp
deleted file mode 100644
index af46ee9e5..000000000
--- a/src/app/legalnotice.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2023 Mike Tzou (Chocobo1)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * In addition, as a special exception, the copyright holders give permission to
- * link this program with the OpenSSL project's "OpenSSL" library (or with
- * modified versions of it that use the same license as the "OpenSSL" library),
- * and distribute the linked executables. You must obey the GNU General Public
- * License in all respects for all of the code used other than "OpenSSL". If you
- * modify file(s), you may extend this exception to your version of the file(s),
- * but you are not obligated to do so. If you do not wish to do so, delete this
- * exception statement from your version.
- */
-
-#include "legalnotice.h"
-
-#ifdef DISABLE_GUI
-#include
-#endif // DISABLE_GUI
-
-#include
-#include
-
-#ifndef DISABLE_GUI
-#include
-#endif // DISABLE_GUI
-
-#include "base/global.h"
-
-#ifndef DISABLE_GUI
-#include "gui/utils.h"
-#endif // DISABLE_GUI
-
-void showLegalNotice(const bool isInteractive)
-{
- const QString noticeTitle = QCoreApplication::translate("LegalNotice", "Legal Notice");
- const QString noticeBody = QCoreApplication::translate("LegalNotice", "qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.");
- const QString noticeEnd = QCoreApplication::translate("LegalNotice", "No further notices will be issued.");
-
- if (!isInteractive)
- {
- const QString legalNotice = u"\n*** %1 ***\n"_s.arg(noticeTitle)
- + noticeBody + u"\n\n"
- + QCoreApplication::translate("LegalNotice", "If you have read the legal notice, you can use command line option `--confirm-legal-notice` to suppress this message.");
- printf("%s\n\n", qUtf8Printable(legalNotice));
- return;
- }
-
-#ifdef DISABLE_GUI
- const QString legalNotice = u"\n*** %1 ***\n"_s.arg(noticeTitle)
- + noticeBody + u"\n\n"
- + noticeEnd + u"\n\n"
- + QCoreApplication::translate("LegalNotice", "Press 'Enter' key to continue...");
- printf("%s", qUtf8Printable(legalNotice));
- getchar();
-#else // DISABLE_GUI
- const QString messageBody = noticeBody + u"\n\n" + noticeEnd;
- QMessageBox msgBox {QMessageBox::NoIcon, noticeTitle, messageBody, QMessageBox::Ok};
- msgBox.show(); // Need to be shown first or moveToCenter does not work
- msgBox.move(Utils::Gui::screenCenter(&msgBox));
- msgBox.exec();
-#endif // DISABLE_GUI
-}
diff --git a/src/app/legalnotice.h b/src/app/legalnotice.h
deleted file mode 100644
index 62d47cd4f..000000000
--- a/src/app/legalnotice.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2023 Mike Tzou (Chocobo1)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * In addition, as a special exception, the copyright holders give permission to
- * link this program with the OpenSSL project's "OpenSSL" library (or with
- * modified versions of it that use the same license as the "OpenSSL" library),
- * and distribute the linked executables. You must obey the GNU General Public
- * License in all respects for all of the code used other than "OpenSSL". If you
- * modify file(s), you may extend this exception to your version of the file(s),
- * but you are not obligated to do so. If you do not wish to do so, delete this
- * exception statement from your version.
- */
-
-#pragma once
-
-void showLegalNotice(bool isInteractive);
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 21730827f..31e744732 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2014-2024 Vladimir Golovnev
+ * Copyright (C) 2014 Vladimir Golovnev
* Copyright (C) 2006 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
* exception statement from your version.
*/
-#include
+#include
#include
#include
@@ -55,6 +55,7 @@
#include
#include
#include
+#include
#include
#include
@@ -68,15 +69,13 @@ Q_IMPORT_PLUGIN(QICOPlugin)
#endif // DISABLE_GUI
#include "base/global.h"
-#include "base/logger.h"
#include "base/preferences.h"
#include "base/profile.h"
-#include "base/settingvalue.h"
#include "base/version.h"
#include "application.h"
#include "cmdoptions.h"
-#include "legalnotice.h"
#include "signalhandler.h"
+#include "upgrade.h"
#ifndef DISABLE_GUI
#include "gui/utils.h"
@@ -84,91 +83,18 @@ Q_IMPORT_PLUGIN(QICOPlugin)
using namespace std::chrono_literals;
-namespace
-{
- void displayBadArgMessage(const QString &message)
- {
- const QString help = QCoreApplication::translate("Main", "Run application with -h option to read about command line parameters.");
-#if defined(Q_OS_WIN) && !defined(DISABLE_GUI)
- QMessageBox msgBox(QMessageBox::Critical, QCoreApplication::translate("Main", "Bad command line"),
- (message + u'\n' + help), QMessageBox::Ok);
- msgBox.show(); // Need to be shown or to moveToCenter does not work
- msgBox.move(Utils::Gui::screenCenter(&msgBox));
- msgBox.exec();
-#else
- const QString errMsg = QCoreApplication::translate("Main", "Bad command line: ") + u'\n'
- + message + u'\n'
- + help + u'\n';
- fprintf(stderr, "%s", qUtf8Printable(errMsg));
-#endif
- }
-
- void displayErrorMessage(const QString &message)
- {
-#ifndef DISABLE_GUI
- if (QApplication::instance())
- {
- QMessageBox msgBox;
- msgBox.setIcon(QMessageBox::Critical);
- msgBox.setText(QCoreApplication::translate("Main", "An unrecoverable error occurred."));
- msgBox.setInformativeText(message);
- msgBox.show(); // Need to be shown or to moveToCenter does not work
- msgBox.move(Utils::Gui::screenCenter(&msgBox));
- msgBox.exec();
- }
- else
- {
- const QString errMsg = QCoreApplication::translate("Main", "qBittorrent has encountered an unrecoverable error.") + u'\n' + message + u'\n';
- fprintf(stderr, "%s", qUtf8Printable(errMsg));
- }
-#else
- const QString errMsg = QCoreApplication::translate("Main", "qBittorrent has encountered an unrecoverable error.") + u'\n' + message + u'\n';
- fprintf(stderr, "%s", qUtf8Printable(errMsg));
-#endif
- }
-
- void displayVersion()
- {
- printf("%s %s\n", qUtf8Printable(qApp->applicationName()), QBT_VERSION);
- }
+void displayVersion();
+bool userAgreesWithLegalNotice();
+void displayBadArgMessage(const QString &message);
+void displayErrorMessage(const QString &message);
#ifndef DISABLE_GUI
- void showSplashScreen()
- {
- QPixmap splashImg(u":/icons/splash.png"_s);
- QPainter painter(&splashImg);
- const auto version = QStringLiteral(QBT_VERSION);
- painter.setPen(QPen(Qt::white));
- painter.setFont(QFont(u"Arial"_s, 22, QFont::Black));
- painter.drawText(224 - painter.fontMetrics().horizontalAdvance(version), 270, version);
- QSplashScreen *splash = new QSplashScreen(splashImg);
- splash->show();
- QTimer::singleShot(1500ms, Qt::CoarseTimer, splash, &QObject::deleteLater);
- qApp->processEvents();
- }
+void showSplashScreen();
#endif // DISABLE_GUI
#ifdef Q_OS_UNIX
- void adjustFileDescriptorLimit()
- {
- rlimit limit {};
-
- if (getrlimit(RLIMIT_NOFILE, &limit) != 0)
- return;
-
- limit.rlim_cur = limit.rlim_max;
- setrlimit(RLIMIT_NOFILE, &limit);
- }
-
- void adjustLocale()
- {
- // specify the default locale just in case if user has not set any other locale
- // only `C` locale is available universally without installing locale packages
- if (qEnvironmentVariableIsEmpty("LANG"))
- qputenv("LANG", "C.UTF-8");
- }
+void adjustFileDescriptorLimit();
#endif
-}
// Main
int main(int argc, char *argv[])
@@ -178,10 +104,21 @@ int main(int argc, char *argv[])
#endif
#ifdef Q_OS_UNIX
- adjustLocale();
adjustFileDescriptorLimit();
#endif
+ // We must save it here because QApplication constructor may change it
+ bool isOneArg = (argc == 2);
+
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && !defined(DISABLE_GUI)
+ // Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created
+ if (qgetenv("QT_ENABLE_HIGHDPI_SCALING").isEmpty() && qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty())
+ Application::setAttribute(Qt::AA_EnableHighDpiScaling, true);
+ // HighDPI scale factor policy must be set before QGuiApplication is created
+ if (qgetenv("QT_SCALE_FACTOR_ROUNDING_POLICY").isEmpty())
+ Application::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
+#endif
+
// `app` must be declared out of try block to allow display message box in case of exception
std::unique_ptr app;
try
@@ -192,7 +129,7 @@ int main(int argc, char *argv[])
#ifdef Q_OS_WIN
// QCoreApplication::applicationDirPath() needs an Application object instantiated first
// Let's hope that there won't be a crash before this line
- const char envName[] = "_NT_SYMBOL_PATH";
+ const char *envName = "_NT_SYMBOL_PATH";
const QString envValue = qEnvironmentVariable(envName);
if (envValue.isEmpty())
qputenv(envName, Application::applicationDirPath().toLocal8Bit());
@@ -201,43 +138,65 @@ int main(int argc, char *argv[])
#endif
const QBtCommandLineParameters params = app->commandLineArgs();
-
- // "show help/version" takes priority over other flags
- if (params.showHelp)
- {
- displayUsage(QString::fromLocal8Bit(argv[0]));
- return EXIT_SUCCESS;
- }
-#if !defined(Q_OS_WIN) || defined(DISABLE_GUI)
- if (params.showVersion)
- {
- displayVersion();
- return EXIT_SUCCESS;
- }
-#endif
-
if (!params.unknownParameter.isEmpty())
{
throw CommandLineParameterError(QCoreApplication::translate("Main", "%1 is an unknown command line parameter.",
"--random-parameter is an unknown command line parameter.")
.arg(params.unknownParameter));
}
+#if !defined(Q_OS_WIN) || defined(DISABLE_GUI)
+ if (params.showVersion)
+ {
+ if (isOneArg)
+ {
+ displayVersion();
+ return EXIT_SUCCESS;
+ }
+ throw CommandLineParameterError(QCoreApplication::translate("Main", "%1 must be the single command line parameter.")
+ .arg(u"-v (or --version)"_s));
+ }
+#endif
+ if (params.showHelp)
+ {
+ if (isOneArg)
+ {
+ displayUsage(QString::fromLocal8Bit(argv[0]));
+ return EXIT_SUCCESS;
+ }
+ throw CommandLineParameterError(QCoreApplication::translate("Main", "%1 must be the single command line parameter.")
+ .arg(u"-h (or --help)"_s));
+ }
- // Check if qBittorrent is already running
- if (app->hasAnotherInstance())
+ const bool firstTimeUser = !Preferences::instance()->getAcceptedLegal();
+ if (firstTimeUser)
+ {
+#ifndef DISABLE_GUI
+ if (!userAgreesWithLegalNotice())
+ return EXIT_SUCCESS;
+#elif defined(Q_OS_WIN)
+ if (_isatty(_fileno(stdin))
+ && _isatty(_fileno(stdout))
+ && !userAgreesWithLegalNotice())
+ return EXIT_SUCCESS;
+#else
+ if (!params.shouldDaemonize
+ && isatty(fileno(stdin))
+ && isatty(fileno(stdout))
+ && !userAgreesWithLegalNotice())
+ return EXIT_SUCCESS;
+#endif
+
+ setCurrentMigrationVersion();
+ }
+
+ // Check if qBittorrent is already running for this user
+ if (app->isRunning())
{
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)
if (params.shouldDaemonize)
{
- throw CommandLineParameterError(QCoreApplication::translate("Main", "You cannot use %1: qBittorrent is already running.")
- .arg(u"-d (or --daemon)"_s));
- }
-
- // print friendly message if there are no other command line args
- if (argc == 1)
- {
- const QString message = QCoreApplication::translate("Main", "Another qBittorrent instance is already running.");
- printf("%s\n", qUtf8Printable(message));
+ throw CommandLineParameterError(QCoreApplication::translate("Main", "You cannot use %1: qBittorrent is already running for this user.")
+ .arg(u"-d (or --daemon)"_s));
}
#endif
@@ -247,31 +206,31 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS;
}
- CachedSettingValue legalNoticeShown {u"LegalNotice/Accepted"_s, false};
- if (params.confirmLegalNotice)
- legalNoticeShown = true;
+#ifdef Q_OS_WIN
+ // This affects only Windows apparently and Qt5.
+ // When QNetworkAccessManager is instantiated it regularly starts polling
+ // the network interfaces to see what's available and their status.
+ // This polling creates jitter and high ping with wifi interfaces.
+ // So here we disable it for lack of better measure.
+ // It will also spew this message in the console: QObject::startTimer: Timers cannot have negative intervals
+ // For more info see:
+ // 1. https://github.com/qbittorrent/qBittorrent/issues/4209
+ // 2. https://bugreports.qt.io/browse/QTBUG-40332
+ // 3. https://bugreports.qt.io/browse/QTBUG-46015
- if (!legalNoticeShown)
- {
-#ifndef DISABLE_GUI
- const bool isInteractive = true;
-#elif defined(Q_OS_WIN)
- const bool isInteractive = (_isatty(_fileno(stdin)) != 0) && (_isatty(_fileno(stdout)) != 0);
-#else
- // when run in daemon mode user can only dismiss the notice with command line option
- const bool isInteractive = !params.shouldDaemonize
- && ((isatty(fileno(stdin)) != 0) && (isatty(fileno(stdout)) != 0));
+ qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && !defined(DISABLE_GUI)
+ // this is the default in Qt6
+ app->setAttribute(Qt::AA_DisableWindowContextHelpButton);
#endif
- showLegalNotice(isInteractive);
- if (isInteractive)
- legalNoticeShown = true;
- }
+#endif // Q_OS_WIN
#ifdef Q_OS_MACOS
// Since Apple made difficult for users to set PATH, we set here for convenience.
// Users are supposed to install Homebrew Python for search function.
// For more info see issue #5571.
- const QByteArray path = "/usr/local/bin:" + qgetenv("PATH");
+ QByteArray path = "/usr/local/bin:";
+ path += qgetenv("PATH");
qputenv("PATH", path.constData());
// On OS X the standard is to not show icons in the menus
@@ -284,27 +243,19 @@ int main(int argc, char *argv[])
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)
if (params.shouldDaemonize)
{
- app.reset(); // Destroy current application instance
- if (::daemon(1, 0) == 0)
+ app.reset(); // Destroy current application
+ if (daemon(1, 0) == 0)
{
app = std::make_unique(argc, argv);
- if (app->hasAnotherInstance())
+ if (app->isRunning())
{
- // It is undefined behavior to write to log file since there is another qbt instance
- // in play. But we still do it since there is chance that the log message will survive.
- const QString errorMessage = QCoreApplication::translate("Main", "Found unexpected qBittorrent instance. Exiting this instance. Current process ID: %1.")
- .arg(QString::number(QCoreApplication::applicationPid()));
- LogMsg(errorMessage, Log::CRITICAL);
- // stdout, stderr is closed so we can't use them
+ // Another instance had time to start.
return EXIT_FAILURE;
}
}
else
{
- const QString errorMessage = QCoreApplication::translate("Main", "Error when daemonizing. Reason: \"%1\". Error code: %2.")
- .arg(QString::fromLocal8Bit(strerror(errno)), QString::number(errno));
- LogMsg(errorMessage, Log::CRITICAL);
- qCritical("%s", qUtf8Printable(errorMessage));
+ qCritical("Something went wrong while daemonizing, exiting...");
return EXIT_FAILURE;
}
}
@@ -328,3 +279,117 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
}
+
+#if !defined(DISABLE_GUI)
+void showSplashScreen()
+{
+ QPixmap splashImg(u":/icons/splash.png"_s);
+ QPainter painter(&splashImg);
+ const auto version = QStringLiteral(QBT_VERSION);
+ painter.setPen(QPen(Qt::white));
+ painter.setFont(QFont(u"Arial"_s, 22, QFont::Black));
+ painter.drawText(224 - painter.fontMetrics().horizontalAdvance(version), 270, version);
+ QSplashScreen *splash = new QSplashScreen(splashImg);
+ splash->show();
+ QTimer::singleShot(1500ms, Qt::CoarseTimer, splash, &QObject::deleteLater);
+ qApp->processEvents();
+}
+#endif // DISABLE_GUI
+
+void displayVersion()
+{
+ printf("%s %s\n", qUtf8Printable(qApp->applicationName()), QBT_VERSION);
+}
+
+void displayBadArgMessage(const QString &message)
+{
+ const QString help = QCoreApplication::translate("Main", "Run application with -h option to read about command line parameters.");
+#if defined(Q_OS_WIN) && !defined(DISABLE_GUI)
+ QMessageBox msgBox(QMessageBox::Critical, QCoreApplication::translate("Main", "Bad command line"),
+ (message + u'\n' + help), QMessageBox::Ok);
+ msgBox.show(); // Need to be shown or to moveToCenter does not work
+ msgBox.move(Utils::Gui::screenCenter(&msgBox));
+ msgBox.exec();
+#else
+ const QString errMsg = QCoreApplication::translate("Main", "Bad command line: ") + u'\n'
+ + message + u'\n'
+ + help + u'\n';
+ fprintf(stderr, "%s", qUtf8Printable(errMsg));
+#endif
+}
+
+void displayErrorMessage(const QString &message)
+{
+#ifndef DISABLE_GUI
+ if (QApplication::instance())
+ {
+ QMessageBox msgBox;
+ msgBox.setIcon(QMessageBox::Critical);
+ msgBox.setText(QCoreApplication::translate("Main", "An unrecoverable error occurred."));
+ msgBox.setInformativeText(message);
+ msgBox.show(); // Need to be shown or to moveToCenter does not work
+ msgBox.move(Utils::Gui::screenCenter(&msgBox));
+ msgBox.exec();
+ }
+ else
+ {
+ const QString errMsg = QCoreApplication::translate("Main", "qBittorrent has encountered an unrecoverable error.") + u'\n' + message + u'\n';
+ fprintf(stderr, "%s", qUtf8Printable(errMsg));
+ }
+#else
+ const QString errMsg = QCoreApplication::translate("Main", "qBittorrent has encountered an unrecoverable error.") + u'\n' + message + u'\n';
+ fprintf(stderr, "%s", qUtf8Printable(errMsg));
+#endif
+}
+
+bool userAgreesWithLegalNotice()
+{
+ Preferences *const pref = Preferences::instance();
+ Q_ASSERT(!pref->getAcceptedLegal());
+
+#ifdef DISABLE_GUI
+ const QString eula = u"\n*** %1 ***\n"_s.arg(QCoreApplication::translate("Main", "Legal Notice"))
+ + QCoreApplication::translate("Main", "qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.") + u"\n\n"
+ + QCoreApplication::translate("Main", "No further notices will be issued.") + u"\n\n"
+ + QCoreApplication::translate("Main", "Press %1 key to accept and continue...").arg(u"'y'"_s) + u'\n';
+ printf("%s", qUtf8Printable(eula));
+
+ const char ret = getchar(); // Read pressed key
+ if ((ret == 'y') || (ret == 'Y'))
+ {
+ // Save the answer
+ pref->setAcceptedLegal(true);
+ return true;
+ }
+#else
+ QMessageBox msgBox;
+ msgBox.setText(QCoreApplication::translate("Main", "qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.\n\nNo further notices will be issued."));
+ msgBox.setWindowTitle(QCoreApplication::translate("Main", "Legal notice"));
+ msgBox.addButton(QCoreApplication::translate("Main", "Cancel"), QMessageBox::RejectRole);
+ const QAbstractButton *agreeButton = msgBox.addButton(QCoreApplication::translate("Main", "I Agree"), QMessageBox::AcceptRole);
+ msgBox.show(); // Need to be shown or to moveToCenter does not work
+ msgBox.move(Utils::Gui::screenCenter(&msgBox));
+ msgBox.exec();
+ if (msgBox.clickedButton() == agreeButton)
+ {
+ // Save the answer
+ pref->setAcceptedLegal(true);
+ return true;
+ }
+#endif // DISABLE_GUI
+
+ return false;
+}
+
+#ifdef Q_OS_UNIX
+void adjustFileDescriptorLimit()
+{
+ rlimit limit {};
+
+ if (getrlimit(RLIMIT_NOFILE, &limit) != 0)
+ return;
+
+ limit.rlim_cur = limit.rlim_max;
+ setrlimit(RLIMIT_NOFILE, &limit);
+}
+#endif
diff --git a/src/app/qtlocalpeer/qtlocalpeer.cpp b/src/app/qtlocalpeer/qtlocalpeer.cpp
index cc97eb464..5e9dbe797 100644
--- a/src/app/qtlocalpeer/qtlocalpeer.cpp
+++ b/src/app/qtlocalpeer/qtlocalpeer.cpp
@@ -68,13 +68,12 @@
#include "qtlocalpeer.h"
-#include
+#include
#if defined(Q_OS_WIN)
-#include
+#include
#endif
-#include
#include
#include
#include
@@ -91,7 +90,7 @@ namespace QtLP_Private
#endif
}
-const QByteArray ACK = QByteArrayLiteral("ack");
+const char ACK[] = "ack";
QtLocalPeer::QtLocalPeer(const QString &path, QObject *parent)
: QObject(parent)
@@ -170,7 +169,7 @@ bool QtLocalPeer::sendMessage(const QString &message, const int timeout)
{
res &= socket.waitForReadyRead(timeout); // wait for ack
if (res)
- res &= (socket.read(ACK.size()) == ACK);
+ res &= (socket.read(qstrlen(ACK)) == ACK);
}
return res;
}
@@ -221,7 +220,7 @@ void QtLocalPeer::receiveConnection()
return;
}
QString message(QString::fromUtf8(uMsg));
- socket->write(ACK);
+ socket->write(ACK, qstrlen(ACK));
socket->waitForBytesWritten(1000);
socket->waitForDisconnected(1000); // make sure client reads ack
delete socket;
diff --git a/src/app/qtlocalpeer/qtlockedfile.h b/src/app/qtlocalpeer/qtlockedfile.h
index 3ea32c61a..63d78aaec 100644
--- a/src/app/qtlocalpeer/qtlockedfile.h
+++ b/src/app/qtlocalpeer/qtlockedfile.h
@@ -71,8 +71,8 @@
#include
#ifdef Q_OS_WIN
-#include
#include
+#include
#endif
namespace QtLP_Private
@@ -105,7 +105,7 @@ namespace QtLP_Private
Qt::HANDLE m_writeMutex = nullptr;
Qt::HANDLE m_readMutex = nullptr;
- QList m_readMutexes;
+ QVector m_readMutexes;
QString m_mutexName;
#endif
diff --git a/src/app/signalhandler.cpp b/src/app/signalhandler.cpp
index 1116b5a34..be70f254d 100644
--- a/src/app/signalhandler.cpp
+++ b/src/app/signalhandler.cpp
@@ -30,10 +30,11 @@
#include "signalhandler.h"
-#include
+#include
#include
#include
+#include
#ifdef Q_OS_UNIX
#include
diff --git a/src/app/upgrade.cpp b/src/app/upgrade.cpp
index 5a9d9b896..59e715c7f 100644
--- a/src/app/upgrade.cpp
+++ b/src/app/upgrade.cpp
@@ -28,11 +28,10 @@
#include "upgrade.h"
-#include
+#include
#include
#include
-#include "base/bittorrent/sharelimitaction.h"
#include "base/bittorrent/torrentcontentlayout.h"
#include "base/global.h"
#include "base/logger.h"
@@ -46,7 +45,7 @@
namespace
{
- const int MIGRATION_VERSION = 8;
+ const int MIGRATION_VERSION = 6;
const QString MIGRATION_VERSION_KEY = u"Meta/MigrationVersion"_s;
void exportWebUIHttpsFiles()
@@ -438,46 +437,6 @@ namespace
settingsStorage->storeValue(key, u"zh_CN"_s);
}
}
-
- void migrateShareLimitActionSettings()
- {
- auto *settingsStorage = SettingsStorage::instance();
- const auto oldKey = u"BitTorrent/Session/MaxRatioAction"_s;
- const auto newKey = u"BitTorrent/Session/ShareLimitAction"_s;
- const auto value = settingsStorage->loadValue(oldKey);
-
- switch (value)
- {
- case 0:
- settingsStorage->storeValue(newKey, BitTorrent::ShareLimitAction::Stop);
- break;
- case 1:
- settingsStorage->storeValue(newKey, BitTorrent::ShareLimitAction::Remove);
- break;
- case 2:
- settingsStorage->storeValue(newKey, BitTorrent::ShareLimitAction::EnableSuperSeeding);
- break;
- case 3:
- settingsStorage->storeValue(newKey, BitTorrent::ShareLimitAction::RemoveWithContent);
- break;
- default:
- LogMsg(QCoreApplication::translate("Upgrade", "Invalid value found in configuration file, reverting it to default. Key: \"%1\". Invalid value: \"%2\".")
- .arg(oldKey, QString::number(value)), Log::WARNING);
- break;
- }
-
- settingsStorage->removeValue(oldKey);
- }
-
- void migrateAddPausedSetting()
- {
- auto *settingsStorage = SettingsStorage::instance();
- const auto oldKey = u"BitTorrent/Session/AddTorrentPaused"_s;
- const auto newKey = u"BitTorrent/Session/AddTorrentStopped"_s;
-
- settingsStorage->storeValue(newKey, settingsStorage->loadValue(oldKey));
- settingsStorage->removeValue(oldKey);
- }
}
bool upgrade()
@@ -516,12 +475,6 @@ bool upgrade()
if (version < 6)
migrateProxySettings();
- if (version < 7)
- migrateShareLimitActionSettings();
-
- if (version < 8)
- migrateAddPausedSetting();
-
version = MIGRATION_VERSION;
}
diff --git a/src/base/3rdparty/.clang-tidy b/src/base/3rdparty/.clang-tidy
deleted file mode 100644
index e28c5b7e9..000000000
--- a/src/base/3rdparty/.clang-tidy
+++ /dev/null
@@ -1,2 +0,0 @@
-# We don't care about fixing 3rd-party code, so we disable all checks here.
-Checks: -*
diff --git a/src/base/3rdparty/expected.hpp b/src/base/3rdparty/expected.hpp
index 305f3abad..a1ddc6f0e 100644
--- a/src/base/3rdparty/expected.hpp
+++ b/src/base/3rdparty/expected.hpp
@@ -13,8 +13,8 @@
#define NONSTD_EXPECTED_LITE_HPP
#define expected_lite_MAJOR 0
-#define expected_lite_MINOR 8
-#define expected_lite_PATCH 0
+#define expected_lite_MINOR 6
+#define expected_lite_PATCH 3
#define expected_lite_VERSION expected_STRINGIFY(expected_lite_MAJOR) "." expected_STRINGIFY(expected_lite_MINOR) "." expected_STRINGIFY(expected_lite_PATCH)
@@ -66,21 +66,6 @@
# define nsel_P0323R 7
#endif
-// Monadic operations proposal revisions:
-//
-// P2505R0: 0 (2021-12-12)
-// P2505R1: 1 (2022-02-10)
-// P2505R2: 2 (2022-04-15)
-// P2505R3: 3 (2022-06-05)
-// P2505R4: 4 (2022-06-15)
-// P2505R5: 5 (2022-09-20) *
-//
-// expected-lite uses 5
-
-#ifndef nsel_P2505R
-# define nsel_P2505R 5
-#endif
-
// Control presence of C++ exception handling (try and auto discover):
#ifndef nsel_CONFIG_NO_EXCEPTIONS
@@ -231,24 +216,8 @@ inline in_place_t in_place_index( detail::in_place_index_tag = detail::in_pla
namespace nonstd {
using std::expected;
- using std::unexpected;
- using std::bad_expected_access;
- using std::unexpect_t;
- using std::unexpect;
-
- //[[deprecated("replace unexpected_type with unexpected")]]
-
- template< typename E >
- using unexpected_type = unexpected;
-
- // Unconditionally provide make_unexpected():
-
- template< typename E>
- constexpr auto make_unexpected( E && value ) -> unexpected< typename std::decay::type >
- {
- return unexpected< typename std::decay::type >( std::forward(value) );
- }
-} // namespace nonstd
+// ...
+}
#else // nsel_USES_STD_EXPECTED
@@ -347,6 +316,16 @@ namespace nonstd {
#define nsel_REQUIRES_A(...) \
, typename std::enable_if< (__VA_ARGS__), void*>::type = nullptr
+// Presence of language and library features:
+
+#ifdef _HAS_CPP0X
+# define nsel_HAS_CPP0X _HAS_CPP0X
+#else
+# define nsel_HAS_CPP0X 0
+#endif
+
+//#define nsel_CPP11_140 (nsel_CPP11_OR_GREATER || nsel_COMPILER_MSVC_VER >= 1900)
+
// Clang, GNUC, MSVC warning suppression macros:
#ifdef __clang__
@@ -356,23 +335,20 @@ namespace nonstd {
#endif // __clang__
#if nsel_COMPILER_MSVC_VERSION >= 140
-# define nsel_DISABLE_MSVC_WARNINGS(codes) __pragma( warning(push) ) __pragma( warning(disable: codes) )
+# pragma warning( push )
+# define nsel_DISABLE_MSVC_WARNINGS(codes) __pragma( warning(disable: codes) )
#else
# define nsel_DISABLE_MSVC_WARNINGS(codes)
#endif
#ifdef __clang__
-# define nsel_RESTORE_WARNINGS() _Pragma("clang diagnostic pop")
-# define nsel_RESTORE_MSVC_WARNINGS()
+# define nsel_RESTORE_WARNINGS() _Pragma("clang diagnostic pop")
#elif defined __GNUC__
-# define nsel_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop")
-# define nsel_RESTORE_MSVC_WARNINGS()
+# define nsel_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop")
#elif nsel_COMPILER_MSVC_VERSION >= 140
-# define nsel_RESTORE_WARNINGS() __pragma( warning( pop ) )
-# define nsel_RESTORE_MSVC_WARNINGS() nsel_RESTORE_WARNINGS()
+# define nsel_RESTORE_WARNINGS() __pragma( warning( pop ) )
#else
# define nsel_RESTORE_WARNINGS()
-# define nsel_RESTORE_MSVC_WARNINGS()
#endif
// Suppress the following MSVC (GSL) warnings:
@@ -380,30 +356,6 @@ namespace nonstd {
nsel_DISABLE_MSVC_WARNINGS( 26409 )
-// Presence of language and library features:
-
-#ifdef _HAS_CPP0X
-# define nsel_HAS_CPP0X _HAS_CPP0X
-#else
-# define nsel_HAS_CPP0X 0
-#endif
-
-// Presence of language and library features:
-
-#define nsel_CPP17_000 (nsel_CPP17_OR_GREATER)
-
-// Presence of C++17 language features:
-
-#define nsel_HAVE_DEPRECATED nsel_CPP17_000
-
-// C++ feature usage:
-
-#if nsel_HAVE_DEPRECATED
-# define nsel_deprecated(msg) [[deprecated(msg)]]
-#else
-# define nsel_deprecated(msg) /*[[deprecated]]*/
-#endif
-
//
// expected:
//
@@ -500,162 +452,8 @@ class expected;
namespace detail {
-#if nsel_P2505R >= 3
-template< typename T >
-struct is_expected : std::false_type {};
-
-template< typename T, typename E >
-struct is_expected< expected< T, E > > : std::true_type {};
-#endif // nsel_P2505R >= 3
-
/// discriminated union to hold value or 'error'.
-template< typename T, typename E >
-class storage_t_noncopy_nonmove_impl
-{
- template< typename, typename > friend class nonstd::expected_lite::expected;
-
-public:
- using value_type = T;
- using error_type = E;
-
- // no-op construction
- storage_t_noncopy_nonmove_impl() {}
- ~storage_t_noncopy_nonmove_impl() {}
-
- explicit storage_t_noncopy_nonmove_impl( bool has_value )
- : m_has_value( has_value )
- {}
-
- void construct_value()
- {
- new( &m_value ) value_type();
- }
-
- // void construct_value( value_type const & e )
- // {
- // new( &m_value ) value_type( e );
- // }
-
- // void construct_value( value_type && e )
- // {
- // new( &m_value ) value_type( std::move( e ) );
- // }
-
- template< class... Args >
- void emplace_value( Args&&... args )
- {
- new( &m_value ) value_type( std::forward(args)...);
- }
-
- template< class U, class... Args >
- void emplace_value( std::initializer_list il, Args&&... args )
- {
- new( &m_value ) value_type( il, std::forward(args)... );
- }
-
- void destruct_value()
- {
- m_value.~value_type();
- }
-
- // void construct_error( error_type const & e )
- // {
- // // new( &m_error ) error_type( e );
- // }
-
- // void construct_error( error_type && e )
- // {
- // // new( &m_error ) error_type( std::move( e ) );
- // }
-
- template< class... Args >
- void emplace_error( Args&&... args )
- {
- new( &m_error ) error_type( std::forward(args)...);
- }
-
- template< class U, class... Args >
- void emplace_error( std::initializer_list il, Args&&... args )
- {
- new( &m_error ) error_type( il, std::forward(args)... );
- }
-
- void destruct_error()
- {
- m_error.~error_type();
- }
-
- constexpr value_type const & value() const &
- {
- return m_value;
- }
-
- value_type & value() &
- {
- return m_value;
- }
-
- constexpr value_type const && value() const &&
- {
- return std::move( m_value );
- }
-
- nsel_constexpr14 value_type && value() &&
- {
- return std::move( m_value );
- }
-
- value_type const * value_ptr() const
- {
- return &m_value;
- }
-
- value_type * value_ptr()
- {
- return &m_value;
- }
-
- error_type const & error() const &
- {
- return m_error;
- }
-
- error_type & error() &
- {
- return m_error;
- }
-
- constexpr error_type const && error() const &&
- {
- return std::move( m_error );
- }
-
- nsel_constexpr14 error_type && error() &&
- {
- return std::move( m_error );
- }
-
- bool has_value() const
- {
- return m_has_value;
- }
-
- void set_has_value( bool v )
- {
- m_has_value = v;
- }
-
-private:
- union
- {
- value_type m_value;
- error_type m_error;
- };
-
- bool m_has_value = false;
-};
-
template< typename T, typename E >
class storage_t_impl
{
@@ -673,11 +471,6 @@ public:
: m_has_value( has_value )
{}
- void construct_value()
- {
- new( &m_value ) value_type();
- }
-
void construct_value( value_type const & e )
{
new( &m_value ) value_type( e );
@@ -891,23 +684,16 @@ private:
template< typename T, typename E, bool isConstructable, bool isMoveable >
class storage_t
{
-public:
-};
-
-template< typename T, typename E >
-class storage_t : public storage_t_noncopy_nonmove_impl
-{
public:
storage_t() = default;
~storage_t() = default;
explicit storage_t( bool has_value )
- : storage_t_noncopy_nonmove_impl( has_value )
+ : storage_t_impl( has_value )
{}
storage_t( storage_t const & other ) = delete;
storage_t( storage_t && other ) = delete;
-
};
template< typename T, typename E >
@@ -1046,146 +832,6 @@ public:
}
};
-#if nsel_P2505R >= 3
-// C++11 invoke implementation
-template< typename >
-struct is_reference_wrapper : std::false_type {};
-template< typename T >
-struct is_reference_wrapper< std::reference_wrapper< T > > : std::true_type {};
-
-template< typename FnT, typename ClassT, typename ObjectT, typename... Args
- nsel_REQUIRES_T(
- std::is_function::value
- && ( std::is_same< ClassT, typename std20::remove_cvref< ObjectT >::type >::value
- || std::is_base_of< ClassT, typename std20::remove_cvref< ObjectT >::type >::value )
- )
->
-nsel_constexpr auto invoke_member_function_impl( FnT ClassT::* memfnptr, ObjectT && obj, Args && ... args )
- noexcept( noexcept( (std::forward< ObjectT >( obj ).*memfnptr)( std::forward< Args >( args )... ) ) )
- -> decltype( (std::forward< ObjectT >( obj ).*memfnptr)( std::forward< Args >( args )...) )
-{
- return (std::forward< ObjectT >( obj ).*memfnptr)( std::forward< Args >( args )... );
-}
-
-template< typename FnT, typename ClassT, typename ObjectT, typename... Args
- nsel_REQUIRES_T(
- std::is_function::value
- && is_reference_wrapper< typename std20::remove_cvref< ObjectT >::type >::value
- )
->
-nsel_constexpr auto invoke_member_function_impl( FnT ClassT::* memfnptr, ObjectT && obj, Args && ... args )
- noexcept( noexcept( (obj.get().*memfnptr)( std::forward< Args >( args ) ... ) ) )
- -> decltype( (obj.get().*memfnptr)( std::forward< Args >( args ) ... ) )
-{
- return (obj.get().*memfnptr)( std::forward< Args >( args ) ... );
-}
-
-template< typename FnT, typename ClassT, typename ObjectT, typename... Args
- nsel_REQUIRES_T(
- std::is_function::value
- && !std::is_same< ClassT, typename std20::remove_cvref< ObjectT >::type >::value
- && !std::is_base_of< ClassT, typename std20::remove_cvref< ObjectT >::type >::value
- && !is_reference_wrapper< typename std20::remove_cvref< ObjectT >::type >::value
- )
->
-nsel_constexpr auto invoke_member_function_impl( FnT ClassT::* memfnptr, ObjectT && obj, Args && ... args )
- noexcept( noexcept( ((*std::forward< ObjectT >( obj )).*memfnptr)( std::forward< Args >( args ) ... ) ) )
- -> decltype( ((*std::forward< ObjectT >( obj )).*memfnptr)( std::forward< Args >( args ) ... ) )
-{
- return ((*std::forward(obj)).*memfnptr)( std::forward< Args >( args ) ... );
-}
-
-template< typename MemberT, typename ClassT, typename ObjectT
- nsel_REQUIRES_T(
- std::is_same< ClassT, typename std20::remove_cvref< ObjectT >::type >::value
- || std::is_base_of< ClassT, typename std20::remove_cvref< ObjectT >::type >::value
- )
->
-nsel_constexpr auto invoke_member_object_impl( MemberT ClassT::* memobjptr, ObjectT && obj )
- noexcept( noexcept( std::forward< ObjectT >( obj ).*memobjptr ) )
- -> decltype( std::forward< ObjectT >( obj ).*memobjptr )
-{
- return std::forward< ObjectT >( obj ).*memobjptr;
-}
-
-template< typename MemberT, typename ClassT, typename ObjectT
- nsel_REQUIRES_T(
- is_reference_wrapper< typename std20::remove_cvref< ObjectT >::type >::value
- )
->
-nsel_constexpr auto invoke_member_object_impl( MemberT ClassT::* memobjptr, ObjectT && obj )
- noexcept( noexcept( obj.get().*memobjptr ) )
- -> decltype( obj.get().*memobjptr )
-{
- return obj.get().*memobjptr;
-}
-
-template< typename MemberT, typename ClassT, typename ObjectT
- nsel_REQUIRES_T(
- !std::is_same< ClassT, typename std20::remove_cvref< ObjectT >::type >::value
- && !std::is_base_of< ClassT, typename std20::remove_cvref< ObjectT >::type >::value
- && !is_reference_wrapper< typename std20::remove_cvref< ObjectT >::type >::value
- )
->
-nsel_constexpr auto invoke_member_object_impl( MemberT ClassT::* memobjptr, ObjectT && obj )
- noexcept( noexcept( (*std::forward< ObjectT >( obj )).*memobjptr ) )
- -> decltype( (*std::forward< ObjectT >( obj )).*memobjptr )
-{
- return (*std::forward< ObjectT >( obj )).*memobjptr;
-}
-
-template< typename F, typename... Args
- nsel_REQUIRES_T(
- std::is_member_function_pointer< typename std20::remove_cvref< F >::type >::value
- )
->
-nsel_constexpr auto invoke( F && f, Args && ... args )
- noexcept( noexcept( invoke_member_function_impl( std::forward< F >( f ), std::forward< Args >( args ) ... ) ) )
- -> decltype( invoke_member_function_impl( std::forward< F >( f ), std::forward< Args >( args ) ... ) )
-{
- return invoke_member_function_impl( std::forward< F >( f ), std::forward< Args >( args ) ... );
-}
-
-template< typename F, typename... Args
- nsel_REQUIRES_T(
- std::is_member_object_pointer< typename std20::remove_cvref< F >::type >::value
- )
->
-nsel_constexpr auto invoke( F && f, Args && ... args )
- noexcept( noexcept( invoke_member_object_impl( std::forward< F >( f ), std::forward< Args >( args ) ... ) ) )
- -> decltype( invoke_member_object_impl( std::forward< F >( f ), std::forward< Args >( args ) ... ) )
-{
- return invoke_member_object_impl( std::forward< F >( f ), std::forward< Args >( args ) ... );
-}
-
-template< typename F, typename... Args
- nsel_REQUIRES_T(
- !std::is_member_function_pointer< typename std20::remove_cvref< F >::type >::value
- && !std::is_member_object_pointer< typename std20::remove_cvref< F >::type >::value
- )
->
-nsel_constexpr auto invoke( F && f, Args && ... args )
- noexcept( noexcept( std::forward< F >( f )( std::forward< Args >( args ) ... ) ) )
- -> decltype( std::forward< F >( f )( std::forward< Args >( args ) ... ) )
-{
- return std::forward< F >( f )( std::forward< Args >( args ) ... );
-}
-
-template< typename F, typename ... Args >
-using invoke_result_nocvref_t = typename std20::remove_cvref< decltype( invoke( std::declval< F >(), std::declval< Args >()... ) ) >::type;
-
-#if nsel_P2505R >= 5
-template< typename F, typename ... Args >
-using transform_invoke_result_t = typename std::remove_cv< decltype( invoke( std::declval< F >(), std::declval< Args >()... ) ) >::type;
-#else
-template< typename F, typename ... Args >
-using transform_invoke_result_t = invoke_result_nocvref_t
-#endif // nsel_P2505R >= 5
-
-template< typename T >
-struct valid_expected_value_type : std::integral_constant< bool, std::is_destructible< T >::value && !std::is_reference< T >::value && !std::is_array< T >::value > {};
-
-#endif // nsel_P2505R >= 3
} // namespace detail
/// x.x.5 Unexpected object type; unexpected_type; C++17 and later can also use aliased type unexpected.
@@ -1252,7 +898,7 @@ public:
)
>
constexpr explicit unexpected_type( unexpected_type const & error )
- : m_error( E{ error.error() } )
+ : m_error( E{ error.value() } )
{}
template< typename E2
@@ -1270,7 +916,7 @@ public:
)
>
constexpr /*non-explicit*/ unexpected_type( unexpected_type const & error )
- : m_error( error.error() )
+ : m_error( error.value() )
{}
template< typename E2
@@ -1288,7 +934,7 @@ public:
)
>
constexpr explicit unexpected_type( unexpected_type && error )
- : m_error( E{ std::move( error.error() ) } )
+ : m_error( E{ std::move( error.value() ) } )
{}
template< typename E2
@@ -1306,7 +952,7 @@ public:
)
>
constexpr /*non-explicit*/ unexpected_type( unexpected_type && error )
- : m_error( std::move( error.error() ) )
+ : m_error( std::move( error.value() ) )
{}
// x.x.5.2.2 Assignment
@@ -1317,54 +963,24 @@ public:
template< typename E2 = E >
nsel_constexpr14 unexpected_type & operator=( unexpected_type const & other )
{
- unexpected_type{ other.error() }.swap( *this );
+ unexpected_type{ other.value() }.swap( *this );
return *this;
}
template< typename E2 = E >
nsel_constexpr14 unexpected_type & operator=( unexpected_type && other )
{
- unexpected_type{ std::move( other.error() ) }.swap( *this );
+ unexpected_type{ std::move( other.value() ) }.swap( *this );
return *this;
}
// x.x.5.2.3 Observers
- nsel_constexpr14 E & error() & noexcept
- {
- return m_error;
- }
-
- constexpr E const & error() const & noexcept
- {
- return m_error;
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
-
- nsel_constexpr14 E && error() && noexcept
- {
- return std::move( m_error );
- }
-
- constexpr E const && error() const && noexcept
- {
- return std::move( m_error );
- }
-
-#endif
-
- // x.x.5.2.3 Observers - deprecated
-
- nsel_deprecated("replace value() with error()")
-
nsel_constexpr14 E & value() & noexcept
{
return m_error;
}
- nsel_deprecated("replace value() with error()")
-
constexpr E const & value() const & noexcept
{
return m_error;
@@ -1372,15 +988,11 @@ public:
#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- nsel_deprecated("replace value() with error()")
-
nsel_constexpr14 E && value() && noexcept
{
return std::move( m_error );
}
- nsel_deprecated("replace value() with error()")
-
constexpr E const && value() const && noexcept
{
return std::move( m_error );
@@ -1469,7 +1081,7 @@ private:
template< typename E1, typename E2 >
constexpr bool operator==( unexpected_type const & x, unexpected_type const & y )
{
- return x.error() == y.error();
+ return x.value() == y.value();
}
template< typename E1, typename E2 >
@@ -1483,7 +1095,7 @@ constexpr bool operator!=( unexpected_type const & x, unexpected_type co
template< typename E >
constexpr bool operator<( unexpected_type const & x, unexpected_type const & y )
{
- return x.error() < y.error();
+ return x.value() < y.value();
}
template< typename E >
@@ -1728,24 +1340,6 @@ struct error_traits< std::error_code >
#endif // nsel_CONFIG_NO_EXCEPTIONS
-#if nsel_P2505R >= 3
-namespace detail {
-
-// from https://en.cppreference.com/w/cpp/utility/expected/unexpected:
-// "the type of the unexpected value. The type must not be an array type, a non-object type, a specialization of std::unexpected, or a cv-qualified type."
-template< typename T >
-struct valid_unexpected_type : std::integral_constant< bool,
- std::is_same< T, typename std20::remove_cvref< T >::type >::value
- && std::is_object< T >::value
- && !std::is_array< T >::value
-> {};
-
-template< typename T >
-struct valid_unexpected_type< unexpected_type< T > > : std::false_type {};
-
-} // namespace detail
-#endif // nsel_P2505R >= 3
-
} // namespace expected_lite
// provide nonstd::unexpected_type:
@@ -1786,7 +1380,7 @@ public:
nsel_constexpr14 expected()
: contained( true )
{
- contained.construct_value();
+ contained.construct_value( value_type() );
}
nsel_constexpr14 expected( expected const & ) = default;
@@ -1940,7 +1534,7 @@ public:
nsel_constexpr14 explicit expected( nonstd::unexpected_type const & error )
: contained( false )
{
- contained.construct_error( E{ error.error() } );
+ contained.construct_error( E{ error.value() } );
}
template< typename G = E
@@ -1952,7 +1546,7 @@ public:
nsel_constexpr14 /*non-explicit*/ expected( nonstd::unexpected_type const & error )
: contained( false )
{
- contained.construct_error( error.error() );
+ contained.construct_error( error.value() );
}
template< typename G = E
@@ -1964,7 +1558,7 @@ public:
nsel_constexpr14 explicit expected( nonstd::unexpected_type && error )
: contained( false )
{
- contained.construct_error( E{ std::move( error.error() ) } );
+ contained.construct_error( E{ std::move( error.value() ) } );
}
template< typename G = E
@@ -1976,7 +1570,7 @@ public:
nsel_constexpr14 /*non-explicit*/ expected( nonstd::unexpected_type && error )
: contained( false )
{
- contained.construct_error( std::move( error.error() ) );
+ contained.construct_error( std::move( error.value() ) );
}
// in-place construction, value
@@ -2081,7 +1675,7 @@ public:
>
expected & operator=( nonstd::unexpected_type const & error )
{
- expected( unexpect, error.error() ).swap( *this );
+ expected( unexpect, error.value() ).swap( *this );
return *this;
}
@@ -2094,7 +1688,7 @@ public:
>
expected & operator=( nonstd::unexpected_type && error )
{
- expected( unexpect, std::move( error.error() ) ).swap( *this );
+ expected( unexpect, std::move( error.value() ) ).swap( *this );
return *this;
}
@@ -2197,8 +1791,6 @@ public:
return contained.has_value();
}
- nsel_DISABLE_MSVC_WARNINGS( 4702 ) // warning C4702: unreachable code, see issue 65.
-
constexpr value_type const & value() const &
{
return has_value()
@@ -2212,7 +1804,6 @@ public:
? ( contained.value() )
: ( error_traits::rethrow( contained.error() ), contained.value() );
}
- nsel_RESTORE_MSVC_WARNINGS()
#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
@@ -2294,316 +1885,6 @@ public:
: static_cast( std::forward( v ) );
}
-#if nsel_P2505R >= 4
- template< typename G = E
- nsel_REQUIRES_T(
- std::is_copy_constructible< E >::value
- && std::is_convertible< G, E >::value
- )
- >
- nsel_constexpr error_type error_or( G && e ) const &
- {
- return has_value()
- ? static_cast< E >( std::forward< G >( e ) )
- : contained.error();
- }
-
- template< typename G = E
- nsel_REQUIRES_T(
- std::is_move_constructible< E >::value
- && std::is_convertible< G, E >::value
- )
- >
- nsel_constexpr14 error_type error_or( G && e ) &&
- {
- return has_value()
- ? static_cast< E >( std::forward< G >( e ) )
- : std::move( contained.error() );
- }
-#endif // nsel_P2505R >= 4
-
-#if nsel_P2505R >= 3
- // Monadic operations (P2505)
- template< typename F
- nsel_REQUIRES_T(
- detail::is_expected < detail::invoke_result_nocvref_t< F, value_type & > > ::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, value_type & >::error_type, error_type >::value
- && std::is_constructible< error_type, error_type & >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F, value_type & > and_then( F && f ) &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, value_type & >( detail::invoke( std::forward< F >( f ), value() ) )
- : detail::invoke_result_nocvref_t< F, value_type & >( unexpect, error() );
- }
-
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, const value_type & >::error_type, error_type >::value
- && std::is_constructible< error_type, const error_type & >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F, const value_type & > and_then( F && f ) const &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, const value_type & >( detail::invoke( std::forward< F >( f ), value() ) )
- : detail::invoke_result_nocvref_t< F, const value_type & >( unexpect, error() );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, value_type && >::error_type, error_type >::value
- && std::is_constructible< error_type, error_type && >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F, value_type && > and_then( F && f ) &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, value_type && >( detail::invoke( std::forward< F >( f ), std::move( value() ) ) )
- : detail::invoke_result_nocvref_t< F, value_type && >( unexpect, std::move( error() ) );
- }
-
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, const value_type & >::error_type, error_type >::value
- && std::is_constructible< error_type, const error_type && >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F, const value_type && > and_then( F && f ) const &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, const value_type && >( detail::invoke( std::forward< F >( f ), std::move( value() ) ) )
- : detail::invoke_result_nocvref_t< F, const value_type && >( unexpect, std::move( error() ) );
- }
-#endif
-
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, error_type & >::value_type, value_type >::value
- && std::is_constructible< value_type, value_type & >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F, error_type & > or_else( F && f ) &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, error_type & >( value() )
- : detail::invoke_result_nocvref_t< F, error_type & >( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, const error_type & >::value_type, value_type >::value
- && std::is_constructible< value_type, const value_type & >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F, const error_type & > or_else( F && f ) const &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, const error_type & >( value() )
- : detail::invoke_result_nocvref_t< F, const error_type & >( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, error_type && >::value_type, value_type >::value
- && std::is_constructible< value_type, value_type && >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F, error_type && > or_else( F && f ) &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, error_type && >( std::move( value() ) )
- : detail::invoke_result_nocvref_t< F, error_type && >( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F, const error_type && >::value_type, value_type >::value
- && std::is_constructible< value_type, const value_type && >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F, const error_type && > or_else( F && f ) const &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, const error_type && >( std::move( value() ) )
- : detail::invoke_result_nocvref_t< F, const error_type && >( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-#endif
-
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F, value_type & > >::value
- && detail::valid_expected_value_type< detail::transform_invoke_result_t< F, value_type & > >::value
- )
- >
- nsel_constexpr14 expected< detail::transform_invoke_result_t< F, value_type & >, error_type > transform( F && f ) &
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F, value_type & >, error_type >( detail::invoke( std::forward< F >( f ), **this ) )
- : make_unexpected( error() );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F, value_type & > >::value
- )
- >
- nsel_constexpr14 expected< void, error_type > transform( F && f ) &
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ), **this ), expected< void, error_type >() )
- : make_unexpected( error() );
- }
-
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F, const value_type & > >::value
- && detail::valid_expected_value_type< detail::transform_invoke_result_t< F, const value_type & > >::value
- )
- >
- nsel_constexpr expected< detail::transform_invoke_result_t< F, const value_type & >, error_type > transform( F && f ) const &
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F, const value_type & >, error_type >( detail::invoke( std::forward< F >( f ), **this ) )
- : make_unexpected( error() );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F, const value_type & > >::value
- )
- >
- nsel_constexpr expected< void, error_type > transform( F && f ) const &
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ), **this ), expected< void, error_type >() )
- : make_unexpected( error() );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F, value_type && > >::value
- && detail::valid_expected_value_type< detail::transform_invoke_result_t< F, value_type && > >::value
- )
- >
- nsel_constexpr14 expected< detail::transform_invoke_result_t< F, value_type && >, error_type > transform( F && f ) &&
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F, value_type && >, error_type >( detail::invoke( std::forward< F >( f ), std::move( **this ) ) )
- : make_unexpected( std::move( error() ) );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F, value_type && > >::value
- )
- >
- nsel_constexpr14 expected< void, error_type > transform( F && f ) &&
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ), **this ), expected< void, error_type >() )
- : make_unexpected( std::move( error() ) );
- }
-
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F, const value_type && > >::value
- && detail::valid_expected_value_type< detail::transform_invoke_result_t< F, const value_type && > >::value
- )
- >
- nsel_constexpr expected< detail::transform_invoke_result_t< F, const value_type && >, error_type > transform( F && f ) const &&
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F, const value_type && >, error_type >( detail::invoke( std::forward< F >( f ), std::move( **this ) ) )
- : make_unexpected( std::move( error() ) );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F, const value_type && > >::value
- )
- >
- nsel_constexpr expected< void, error_type > transform( F && f ) const &&
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ), **this ), expected< void, error_type >() )
- : make_unexpected( std::move( error() ) );
- }
-#endif
-
- template >::value
- && std::is_constructible< value_type, value_type & >::value
- )
- >
- nsel_constexpr14 expected< value_type, detail::transform_invoke_result_t< F, error_type & > > transform_error( F && f ) &
- {
- return has_value()
- ? expected< value_type, detail::transform_invoke_result_t< F, error_type & > >( in_place, **this )
- : make_unexpected( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
- template >::value
- && std::is_constructible< value_type, const value_type & >::value
- )
- >
- nsel_constexpr expected< value_type, detail::transform_invoke_result_t< F, const error_type & > > transform_error( F && f ) const &
- {
- return has_value()
- ? expected< value_type, detail::transform_invoke_result_t< F, const error_type & > >( in_place, **this )
- : make_unexpected( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template >::value
- && std::is_constructible< value_type, value_type && >::value
- )
- >
- nsel_constexpr14 expected< value_type, detail::transform_invoke_result_t< F, error_type && > > transform_error( F && f ) &&
- {
- return has_value()
- ? expected< value_type, detail::transform_invoke_result_t< F, error_type && > >( in_place, std::move( **this ) )
- : make_unexpected( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-
- template >::value
- && std::is_constructible< value_type, const value_type && >::value
- )
- >
- nsel_constexpr expected< value_type, detail::transform_invoke_result_t< F, const error_type && > > transform_error( F && f ) const &&
- {
- return has_value()
- ? expected< value_type, detail::transform_invoke_result_t< F, const error_type && > >( in_place, std::move( **this ) )
- : make_unexpected( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-#endif
-#endif // nsel_P2505R >= 3
// unwrap()
// template
@@ -2680,7 +1961,7 @@ public:
nsel_constexpr14 explicit expected( nonstd::unexpected_type const & error )
: contained( false )
{
- contained.construct_error( E{ error.error() } );
+ contained.construct_error( E{ error.value() } );
}
template< typename G = E
@@ -2691,7 +1972,7 @@ public:
nsel_constexpr14 /*non-explicit*/ expected( nonstd::unexpected_type const & error )
: contained( false )
{
- contained.construct_error( error.error() );
+ contained.construct_error( error.value() );
}
template< typename G = E
@@ -2702,7 +1983,7 @@ public:
nsel_constexpr14 explicit expected( nonstd::unexpected_type && error )
: contained( false )
{
- contained.construct_error( E{ std::move( error.error() ) } );
+ contained.construct_error( E{ std::move( error.value() ) } );
}
template< typename G = E
@@ -2713,7 +1994,7 @@ public:
nsel_constexpr14 /*non-explicit*/ expected( nonstd::unexpected_type && error )
: contained( false )
{
- contained.construct_error( std::move( error.error() ) );
+ contained.construct_error( std::move( error.value() ) );
}
template< typename... Args
@@ -2850,305 +2131,6 @@ public:
return ! has_value() && std::is_base_of< Ex, ContainedEx>::value;
}
-#if nsel_P2505R >= 4
- template< typename G = E
- nsel_REQUIRES_T(
- std::is_copy_constructible< E >::value
- && std::is_convertible< G, E >::value
- )
- >
- nsel_constexpr error_type error_or( G && e ) const &
- {
- return has_value()
- ? static_cast< E >( std::forward< G >( e ) )
- : contained.error();
- }
-
- template< typename G = E
- nsel_REQUIRES_T(
- std::is_move_constructible< E >::value
- && std::is_convertible< G, E >::value
- )
- >
- nsel_constexpr14 error_type error_or( G && e ) &&
- {
- return has_value()
- ? static_cast< E >( std::forward< G >( e ) )
- : std::move( contained.error() );
- }
-#endif // nsel_P2505R >= 4
-
-#if nsel_P2505R >= 3
- // Monadic operations (P2505)
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F >::error_type, error_type >::value
- && std::is_constructible< error_type, error_type & >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F > and_then( F && f ) &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F >( detail::invoke( std::forward< F >( f ) ) )
- : detail::invoke_result_nocvref_t< F >( unexpect, error() );
- }
-
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F >::error_type, error_type >::value
- && std::is_constructible< error_type, const error_type & >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F > and_then( F && f ) const &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F >( detail::invoke( std::forward< F >( f ) ) )
- : detail::invoke_result_nocvref_t< F >( unexpect, error() );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F >::error_type, error_type >::value
- && std::is_constructible< error_type, error_type && >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F > and_then( F && f ) &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F >( detail::invoke( std::forward< F >( f ) ) )
- : detail::invoke_result_nocvref_t< F >( unexpect, std::move( error() ) );
- }
-
- template >::value
- && std::is_same< typename detail::invoke_result_nocvref_t< F >::error_type, error_type >::value
- && std::is_constructible< error_type, const error_type && >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F > and_then( F && f ) const &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F >( detail::invoke( std::forward< F >( f ) ) )
- : detail::invoke_result_nocvref_t< F >( unexpect, std::move( error() ) );
- }
-#endif
-
- template >::value
- && std::is_void< typename detail::invoke_result_nocvref_t< F, error_type & >::value_type >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F, error_type & > or_else( F && f ) &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, error_type & >()
- : detail::invoke_result_nocvref_t< F, error_type & >( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
- template >::value
- && std::is_void< typename detail::invoke_result_nocvref_t< F, const error_type & >::value_type >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F, const error_type & > or_else( F && f ) const &
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, const error_type & >()
- : detail::invoke_result_nocvref_t< F, const error_type & >( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template >::value
- && std::is_void< typename detail::invoke_result_nocvref_t< F, error_type && >::value_type >::value
- )
- >
- nsel_constexpr14 detail::invoke_result_nocvref_t< F, error_type && > or_else( F && f ) &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, error_type && >()
- : detail::invoke_result_nocvref_t< F, error_type && >( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-
- template >::value
- && std::is_void< typename detail::invoke_result_nocvref_t< F, const error_type && >::value_type >::value
- )
- >
- nsel_constexpr detail::invoke_result_nocvref_t< F, const error_type && > or_else( F && f ) const &&
- {
- return has_value()
- ? detail::invoke_result_nocvref_t< F, const error_type && >()
- : detail::invoke_result_nocvref_t< F, const error_type && >( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-#endif
-
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr14 expected< detail::transform_invoke_result_t< F >, error_type > transform( F && f ) &
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F >, error_type >( detail::invoke( std::forward< F >( f ) ) )
- : make_unexpected( error() );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr14 expected< void, error_type > transform( F && f ) &
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ) ), expected< void, error_type >() )
- : make_unexpected( error() );
- }
-
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr expected< detail::transform_invoke_result_t< F >, error_type > transform( F && f ) const &
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F >, error_type >( detail::invoke( std::forward< F >( f ) ) )
- : make_unexpected( error() );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr expected< void, error_type > transform( F && f ) const &
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ) ), expected< void, error_type >() )
- : make_unexpected( error() );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr14 expected< detail::transform_invoke_result_t< F >, error_type > transform( F && f ) &&
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F >, error_type >( detail::invoke( std::forward< F >( f ) ) )
- : make_unexpected( error() );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr14 expected< void, error_type > transform( F && f ) &&
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ) ), expected< void, error_type >() )
- : make_unexpected( error() );
- }
-
- template::value
- && !std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr expected< detail::transform_invoke_result_t< F >, error_type > transform( F && f ) const &&
- {
- return has_value()
- ? expected< detail::transform_invoke_result_t< F >, error_type >( detail::invoke( std::forward< F >( f ) ) )
- : make_unexpected( error() );
- }
-
- template::value
- && std::is_void< detail::transform_invoke_result_t< F > >::value
- )
- >
- nsel_constexpr expected< void, error_type > transform( F && f ) const &&
- {
- return has_value()
- ? ( detail::invoke( std::forward< F >( f ) ), expected< void, error_type >() )
- : make_unexpected( error() );
- }
-#endif
-
- template >::value
- )
- >
- nsel_constexpr14 expected< void, detail::transform_invoke_result_t< F, error_type & > > transform_error( F && f ) &
- {
- return has_value()
- ? expected< void, detail::transform_invoke_result_t< F, error_type & > >()
- : make_unexpected( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
- template >::value
- )
- >
- nsel_constexpr expected< void, detail::transform_invoke_result_t< F, const error_type & > > transform_error( F && f ) const &
- {
- return has_value()
- ? expected< void, detail::transform_invoke_result_t< F, const error_type & > >()
- : make_unexpected( detail::invoke( std::forward< F >( f ), error() ) );
- }
-
-#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
- template >::value
- )
- >
- nsel_constexpr14 expected< void, detail::transform_invoke_result_t< F, error_type && > > transform_error( F && f ) &&
- {
- return has_value()
- ? expected< void, detail::transform_invoke_result_t< F, error_type && > >()
- : make_unexpected( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-
- template >::value
- )
- >
- nsel_constexpr expected< void, detail::transform_invoke_result_t< F, const error_type && > > transform_error( F && f ) const &&
- {
- return has_value()
- ? expected< void, detail::transform_invoke_result_t< F, const error_type && > >()
- : make_unexpected( detail::invoke( std::forward< F >( f ), std::move( error() ) ) );
- }
-#endif
-#endif // nsel_P2505R >= 3
-
// template constexpr 'see below' unwrap() const&;
//
// template 'see below' unwrap() &&;
diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt
index fa4123251..36825a283 100644
--- a/src/base/CMakeLists.txt
+++ b/src/base/CMakeLists.txt
@@ -1,14 +1,11 @@
add_library(qbt_base STATIC
# headers
3rdparty/expected.hpp
- addtorrentmanager.h
algorithm.h
applicationcomponent.h
asyncfilestorage.h
bittorrent/abstractfilestorage.h
- bittorrent/addtorrenterror.h
bittorrent/addtorrentparams.h
- bittorrent/announcetimepoint.h
bittorrent/bandwidthscheduler.h
bittorrent/bencoderesumedatastorage.h
bittorrent/cachestatus.h
@@ -16,7 +13,6 @@ add_library(qbt_base STATIC
bittorrent/common.h
bittorrent/customstorage.h
bittorrent/dbresumedatastorage.h
- bittorrent/downloadpathoption.h
bittorrent/downloadpriority.h
bittorrent/extensiondata.h
bittorrent/filesearcher.h
@@ -24,7 +20,9 @@ add_library(qbt_base STATIC
bittorrent/infohash.h
bittorrent/loadtorrentparams.h
bittorrent/ltqbitarray.h
+ bittorrent/ltqhash.h
bittorrent/lttypecast.h
+ bittorrent/magneturi.h
bittorrent/nativesessionextension.h
bittorrent/nativetorrentextension.h
bittorrent/peeraddress.h
@@ -34,28 +32,17 @@ add_library(qbt_base STATIC
bittorrent/session.h
bittorrent/sessionimpl.h
bittorrent/sessionstatus.h
- bittorrent/sharelimitaction.h
bittorrent/speedmonitor.h
- bittorrent/sslparameters.h
bittorrent/torrent.h
bittorrent/torrentcontenthandler.h
bittorrent/torrentcontentlayout.h
- bittorrent/torrentcontentremoveoption.h
- bittorrent/torrentcontentremover.h
- bittorrent/torrentcreationmanager.h
- bittorrent/torrentcreationtask.h
- bittorrent/torrentcreator.h
- bittorrent/torrentdescriptor.h
+ bittorrent/torrentcreatorthread.h
bittorrent/torrentimpl.h
bittorrent/torrentinfo.h
bittorrent/tracker.h
bittorrent/trackerentry.h
- bittorrent/trackerentrystatus.h
- concepts/explicitlyconvertibleto.h
- concepts/stringable.h
digest32.h
exceptions.h
- freediskspacechecker.h
global.h
http/connection.h
http/httperror.h
@@ -65,8 +52,10 @@ add_library(qbt_base STATIC
http/responsegenerator.h
http/server.h
http/types.h
+ iconprovider.h
indexrange.h
interfaces/iapplication.h
+ interfaces/istringable.h
logger.h
net/dnsupdater.h
net/downloadhandlerimpl.h
@@ -96,7 +85,6 @@ add_library(qbt_base STATIC
search/searchhandler.h
search/searchpluginmanager.h
settingsstorage.h
- tag.h
tagset.h
torrentfileguard.h
torrentfileswatcher.h
@@ -105,25 +93,21 @@ add_library(qbt_base STATIC
unicodestrings.h
utils/bytearray.h
utils/compare.h
- utils/datetime.h
utils/foreignapps.h
utils/fs.h
utils/gzip.h
utils/io.h
utils/misc.h
utils/net.h
- utils/number.h
utils/os.h
utils/password.h
utils/random.h
- utils/sslkey.h
utils/string.h
utils/thread.h
utils/version.h
version.h
# sources
- addtorrentmanager.cpp
applicationcomponent.cpp
asyncfilestorage.cpp
bittorrent/abstractfilestorage.cpp
@@ -133,12 +117,12 @@ add_library(qbt_base STATIC
bittorrent/categoryoptions.cpp
bittorrent/customstorage.cpp
bittorrent/dbresumedatastorage.cpp
- bittorrent/downloadpathoption.cpp
bittorrent/downloadpriority.cpp
bittorrent/filesearcher.cpp
bittorrent/filterparserthread.cpp
bittorrent/infohash.cpp
bittorrent/ltqbitarray.cpp
+ bittorrent/magneturi.cpp
bittorrent/nativesessionextension.cpp
bittorrent/nativetorrentextension.cpp
bittorrent/peeraddress.cpp
@@ -147,27 +131,21 @@ add_library(qbt_base STATIC
bittorrent/resumedatastorage.cpp
bittorrent/sessionimpl.cpp
bittorrent/speedmonitor.cpp
- bittorrent/sslparameters.cpp
bittorrent/torrent.cpp
bittorrent/torrentcontenthandler.cpp
- bittorrent/torrentcontentremover.cpp
- bittorrent/torrentcreationmanager.cpp
- bittorrent/torrentcreationtask.cpp
- bittorrent/torrentcreator.cpp
- bittorrent/torrentdescriptor.cpp
+ bittorrent/torrentcreatorthread.cpp
bittorrent/torrentimpl.cpp
bittorrent/torrentinfo.cpp
bittorrent/tracker.cpp
bittorrent/trackerentry.cpp
- bittorrent/trackerentrystatus.cpp
exceptions.cpp
- freediskspacechecker.cpp
http/connection.cpp
http/httperror.cpp
http/requestparser.cpp
http/responsebuilder.cpp
http/responsegenerator.cpp
http/server.cpp
+ iconprovider.cpp
logger.cpp
net/dnsupdater.cpp
net/downloadhandlerimpl.cpp
@@ -195,49 +173,39 @@ add_library(qbt_base STATIC
search/searchhandler.cpp
search/searchpluginmanager.cpp
settingsstorage.cpp
- tag.cpp
tagset.cpp
torrentfileguard.cpp
torrentfileswatcher.cpp
torrentfilter.cpp
utils/bytearray.cpp
utils/compare.cpp
- utils/datetime.cpp
utils/foreignapps.cpp
utils/fs.cpp
utils/gzip.cpp
utils/io.cpp
utils/misc.cpp
utils/net.cpp
- utils/number.cpp
utils/os.cpp
utils/password.cpp
utils/random.cpp
- utils/sslkey.cpp
utils/string.cpp
utils/thread.cpp
- utils/version.cpp
)
target_link_libraries(qbt_base
PRIVATE
- OpenSSL::Crypto
- OpenSSL::SSL
+ OpenSSL::Crypto OpenSSL::SSL
ZLIB::ZLIB
PUBLIC
LibtorrentRasterbar::torrent-rasterbar
- Qt::Core
- Qt::CorePrivate
- Qt::Network
- Qt::Sql
- Qt::Xml
+ Qt::Core Qt::Network Qt::Sql Qt::Xml
qbt_common_cfg
)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- find_library(AppKit_LIBRARY AppKit)
- find_library(Carbon_LIBRARY Carbon)
find_library(IOKit_LIBRARY IOKit)
+ find_library(Carbon_LIBRARY Carbon)
+ find_library(AppKit_LIBRARY AppKit)
target_link_libraries(qbt_base PRIVATE
${AppKit_LIBRARY}
@@ -245,7 +213,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
${IOKit_LIBRARY}
)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
- target_link_libraries(qbt_base PRIVATE Iphlpapi PowrProf)
+ target_link_libraries(qbt_base PRIVATE Iphlpapi)
endif()
if (NOT GUI)
diff --git a/src/base/addtorrentmanager.cpp b/src/base/addtorrentmanager.cpp
deleted file mode 100644
index bce47d6ab..000000000
--- a/src/base/addtorrentmanager.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2015-2023 Vladimir Golovnev
- * Copyright (C) 2006 Christophe Dumez
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * In addition, as a special exception, the copyright holders give permission to
- * link this program with the OpenSSL project's "OpenSSL" library (or with
- * modified versions of it that use the same license as the "OpenSSL" library),
- * and distribute the linked executables. You must obey the GNU General Public
- * License in all respects for all of the code used other than "OpenSSL". If you
- * modify file(s), you may extend this exception to your version of the file(s),
- * but you are not obligated to do so. If you do not wish to do so, delete this
- * exception statement from your version.
- */
-
-#include "addtorrentmanager.h"
-
-#include "base/bittorrent/addtorrenterror.h"
-#include "base/bittorrent/infohash.h"
-#include "base/bittorrent/session.h"
-#include "base/bittorrent/torrentdescriptor.h"
-#include "base/logger.h"
-#include "base/net/downloadmanager.h"
-#include "base/preferences.h"
-
-AddTorrentManager::AddTorrentManager(IApplication *app, BitTorrent::Session *btSession, QObject *parent)
- : ApplicationComponent(app, parent)
- , m_btSession {btSession}
-{
- Q_ASSERT(btSession);
- connect(btSession, &BitTorrent::Session::torrentAdded, this, &AddTorrentManager::onSessionTorrentAdded);
- connect(btSession, &BitTorrent::Session::addTorrentFailed, this, &AddTorrentManager::onSessionAddTorrentFailed);
-}
-
-BitTorrent::Session *AddTorrentManager::btSession() const
-{
- return m_btSession;
-}
-
-bool AddTorrentManager::addTorrent(const QString &source, const BitTorrent::AddTorrentParams ¶ms)
-{
- // `source`: .torrent file path, magnet URI or URL
-
- if (source.isEmpty())
- return false;
-
- if (Net::DownloadManager::hasSupportedScheme(source))
- {
- LogMsg(tr("Downloading torrent... Source: \"%1\"").arg(source));
- const auto *pref = Preferences::instance();
- // Launch downloader
- Net::DownloadManager::instance()->download(Net::DownloadRequest(source).limit(pref->getTorrentFileSizeLimit())
- , pref->useProxyForGeneralPurposes(), this, &AddTorrentManager::onDownloadFinished);
- m_downloadedTorrents[source] = params;
- return true;
- }
-
- if (const auto parseResult = BitTorrent::TorrentDescriptor::parse(source))
- {
- return processTorrent(source, parseResult.value(), params);
- }
- else if (source.startsWith(u"magnet:", Qt::CaseInsensitive))
- {
- handleAddTorrentFailed(source, parseResult.error());
- return false;
- }
-
- const Path decodedPath {source.startsWith(u"file://", Qt::CaseInsensitive)
- ? QUrl::fromEncoded(source.toLocal8Bit()).toLocalFile() : source};
- auto torrentFileGuard = std::make_shared(decodedPath);
- if (const auto loadResult = BitTorrent::TorrentDescriptor::loadFromFile(decodedPath))
- {
- setTorrentFileGuard(source, torrentFileGuard);
- return processTorrent(source, loadResult.value(), params);
- }
- else
- {
- handleAddTorrentFailed(source, loadResult.error());
- return false;
- }
-
- return false;
-}
-
-bool AddTorrentManager::addTorrentToSession(const QString &source, const BitTorrent::TorrentDescriptor &torrentDescr
- , const BitTorrent::AddTorrentParams &addTorrentParams)
-{
- const bool result = btSession()->addTorrent(torrentDescr, addTorrentParams);
- if (result)
- m_sourcesByInfoHash[torrentDescr.infoHash()] = source;
-
- return result;
-}
-
-void AddTorrentManager::onDownloadFinished(const Net::DownloadResult &result)
-{
- const QString &source = result.url;
- const BitTorrent::AddTorrentParams addTorrentParams = m_downloadedTorrents.take(source);
-
- switch (result.status)
- {
- case Net::DownloadStatus::Success:
- if (const auto loadResult = BitTorrent::TorrentDescriptor::load(result.data))
- processTorrent(source, loadResult.value(), addTorrentParams);
- else
- handleAddTorrentFailed(source, loadResult.error());
- break;
- case Net::DownloadStatus::RedirectedToMagnet:
- if (const auto parseResult = BitTorrent::TorrentDescriptor::parse(result.magnetURI))
- processTorrent(source, parseResult.value(), addTorrentParams);
- else
- handleAddTorrentFailed(source, parseResult.error());
- break;
- default:
- handleAddTorrentFailed(source, result.errorString);
- }
-}
-
-void AddTorrentManager::onSessionTorrentAdded(BitTorrent::Torrent *torrent)
-{
- if (const QString source = m_sourcesByInfoHash.take(torrent->infoHash()); !source.isEmpty())
- {
- auto torrentFileGuard = m_guardedTorrentFiles.take(source);
- if (torrentFileGuard)
- torrentFileGuard->markAsAddedToSession();
- emit torrentAdded(source, torrent);
- }
-}
-
-void AddTorrentManager::onSessionAddTorrentFailed(const BitTorrent::InfoHash &infoHash, const BitTorrent::AddTorrentError &reason)
-{
- if (const QString source = m_sourcesByInfoHash.take(infoHash); !source.isEmpty())
- {
- auto torrentFileGuard = m_guardedTorrentFiles.take(source);
- if (torrentFileGuard)
- torrentFileGuard->setAutoRemove(false);
- emit addTorrentFailed(source, reason);
- }
-}
-
-void AddTorrentManager::handleAddTorrentFailed(const QString &source, const QString &reason)
-{
- LogMsg(tr("Failed to add torrent. Source: \"%1\". Reason: \"%2\"").arg(source, reason), Log::WARNING);
- emit addTorrentFailed(source, {BitTorrent::AddTorrentError::Other, reason});
-}
-
-void AddTorrentManager::handleDuplicateTorrent(const QString &source
- , const BitTorrent::TorrentDescriptor &torrentDescr, BitTorrent::Torrent *existingTorrent)
-{
- const bool hasMetadata = torrentDescr.info().has_value();
- if (hasMetadata)
- {
- // Trying to set metadata to existing torrent in case if it has none
- existingTorrent->setMetadata(*torrentDescr.info());
- }
-
- const bool isPrivate = existingTorrent->isPrivate() || (hasMetadata && torrentDescr.info()->isPrivate());
- QString message;
- if (!btSession()->isMergeTrackersEnabled())
- {
- message = tr("Merging of trackers is disabled");
- }
- else if (isPrivate)
- {
- message = tr("Trackers cannot be merged because it is a private torrent");
- }
- else
- {
- // merge trackers and web seeds
- existingTorrent->addTrackers(torrentDescr.trackers());
- existingTorrent->addUrlSeeds(torrentDescr.urlSeeds());
- message = tr("Trackers are merged from new source");
- }
-
- LogMsg(tr("Detected an attempt to add a duplicate torrent. Source: %1. Existing torrent: \"%2\". Torrent infohash: %3. Result: %4")
- .arg(source, existingTorrent->name(), existingTorrent->infoHash().toString(), message));
- emit addTorrentFailed(source, {BitTorrent::AddTorrentError::DuplicateTorrent, message});
-}
-
-void AddTorrentManager::setTorrentFileGuard(const QString &source, std::shared_ptr torrentFileGuard)
-{
- m_guardedTorrentFiles.emplace(source, std::move(torrentFileGuard));
-}
-
-std::shared_ptr AddTorrentManager::releaseTorrentFileGuard(const QString &source)
-{
- return m_guardedTorrentFiles.take(source);
-}
-
-bool AddTorrentManager::processTorrent(const QString &source, const BitTorrent::TorrentDescriptor &torrentDescr
- , const BitTorrent::AddTorrentParams &addTorrentParams)
-{
- const BitTorrent::InfoHash infoHash = torrentDescr.infoHash();
-
- if (BitTorrent::Torrent *torrent = btSession()->findTorrent(infoHash))
- {
- // a duplicate torrent is being added
- handleDuplicateTorrent(source, torrentDescr, torrent);
- return false;
- }
-
- return addTorrentToSession(source, torrentDescr, addTorrentParams);
-}
diff --git a/src/base/addtorrentmanager.h b/src/base/addtorrentmanager.h
deleted file mode 100644
index c0044be65..000000000
--- a/src/base/addtorrentmanager.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2015-2023 Vladimir Golovnev
- * Copyright (C) 2006 Christophe Dumez
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * In addition, as a special exception, the copyright holders give permission to
- * link this program with the OpenSSL project's "OpenSSL" library (or with
- * modified versions of it that use the same license as the "OpenSSL" library),
- * and distribute the linked executables. You must obey the GNU General Public
- * License in all respects for all of the code used other than "OpenSSL". If you
- * modify file(s), you may extend this exception to your version of the file(s),
- * but you are not obligated to do so. If you do not wish to do so, delete this
- * exception statement from your version.
- */
-
-#pragma once
-
-#include
-
-#include
-#include
-
-#include "base/applicationcomponent.h"
-#include "base/bittorrent/addtorrentparams.h"
-#include "base/torrentfileguard.h"
-
-namespace BitTorrent
-{
- class InfoHash;
- class Session;
- class Torrent;
- class TorrentDescriptor;
- struct AddTorrentError;
-}
-
-namespace Net
-{
- struct DownloadResult;
-}
-
-class QString;
-
-class AddTorrentManager : public ApplicationComponent
-{
- Q_OBJECT
- Q_DISABLE_COPY_MOVE(AddTorrentManager)
-
-public:
- AddTorrentManager(IApplication *app, BitTorrent::Session *btSession, QObject *parent = nullptr);
-
- BitTorrent::Session *btSession() const;
- bool addTorrent(const QString &source, const BitTorrent::AddTorrentParams ¶ms = {});
-
-signals:
- void torrentAdded(const QString &source, BitTorrent::Torrent *torrent);
- void addTorrentFailed(const QString &source, const BitTorrent::AddTorrentError &reason);
-
-protected:
- bool addTorrentToSession(const QString &source, const BitTorrent::TorrentDescriptor &torrentDescr
- , const BitTorrent::AddTorrentParams &addTorrentParams);
- void handleAddTorrentFailed(const QString &source, const QString &reason);
- void handleDuplicateTorrent(const QString &source, const BitTorrent::TorrentDescriptor &torrentDescr, BitTorrent::Torrent *existingTorrent);
- void setTorrentFileGuard(const QString &source, std::shared_ptr torrentFileGuard);
- std::shared_ptr releaseTorrentFileGuard(const QString &source);
-
-private:
- void onDownloadFinished(const Net::DownloadResult &result);
- void onSessionTorrentAdded(BitTorrent::Torrent *torrent);
- void onSessionAddTorrentFailed(const BitTorrent::InfoHash &infoHash, const BitTorrent::AddTorrentError &reason);
- bool processTorrent(const QString &source, const BitTorrent::TorrentDescriptor &torrentDescr
- , const BitTorrent::AddTorrentParams &addTorrentParams);
-
- BitTorrent::Session *m_btSession = nullptr;
- QHash m_downloadedTorrents;
- QHash m_sourcesByInfoHash;
- QHash> m_guardedTorrentFiles;
-};
diff --git a/src/base/algorithm.h b/src/base/algorithm.h
index 0721b8ea3..85fb25ff8 100644
--- a/src/base/algorithm.h
+++ b/src/base/algorithm.h
@@ -1,6 +1,5 @@
/*
* Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2023 Mike Tzou (Chocobo1)
* Copyright (C) 2018 Vladimir Golovnev
*
* This program is free software; you can redistribute it and/or
@@ -29,16 +28,25 @@
#pragma once
+#include
+
namespace Algorithm
{
- template
- concept HasMappedType = requires
+ template
+ struct HasMappedType
+ : std::false_type
+ {
+ };
+
+ template
+ struct HasMappedType>
+ : std::true_type
{
- typename T::mapped_type;
};
// To be used with associative array types, such as QMap, QHash and its variants
- template
+ template ::value, int> = 0>
void removeIf(T &dict, BinaryPredicate &&p)
{
auto it = dict.begin();
@@ -46,6 +54,16 @@ namespace Algorithm
it = (p(it.key(), it.value()) ? dict.erase(it) : ++it);
}
+ // To be used with set types, such as QSet, std::set
+ template ::value, int> = 0>
+ void removeIf(T &set, UnaryPredicate &&p)
+ {
+ auto it = set.begin();
+ while (it != set.end())
+ it = (p(*it) ? set.erase(it) : ++it);
+ }
+
template
List sorted(List list)
{
diff --git a/src/base/applicationcomponent.cpp b/src/base/applicationcomponent.cpp
index 5c60dbd82..6495cb9dc 100644
--- a/src/base/applicationcomponent.cpp
+++ b/src/base/applicationcomponent.cpp
@@ -28,12 +28,12 @@
#include "applicationcomponent.h"
-ApplicationComponentBase::ApplicationComponentBase(IApplication *app)
+ApplicationComponent::ApplicationComponent(IApplication *app)
: m_app {app}
{
}
-IApplication *ApplicationComponentBase::app() const
+IApplication *ApplicationComponent::app() const
{
return m_app;
}
diff --git a/src/base/applicationcomponent.h b/src/base/applicationcomponent.h
index 2a762ab89..bbf530b46 100644
--- a/src/base/applicationcomponent.h
+++ b/src/base/applicationcomponent.h
@@ -28,41 +28,20 @@
#pragma once
-#include
-#include
+#include
-#include
+#include "interfaces/iapplication.h"
-class IApplication;
-
-class ApplicationComponentBase
+class ApplicationComponent
{
- Q_DISABLE_COPY_MOVE(ApplicationComponentBase)
+ Q_DISABLE_COPY_MOVE(ApplicationComponent)
public:
- virtual ~ApplicationComponentBase() = default;
+ explicit ApplicationComponent(IApplication *app);
+ virtual ~ApplicationComponent() = default;
- IApplication *app() const;
-
-protected:
- explicit ApplicationComponentBase(IApplication *app);
+ virtual IApplication *app() const;
private:
IApplication *m_app = nullptr;
};
-
-template
-concept IsApplicationComponent = std::derived_from;
-
-template
-requires (!IsApplicationComponent)
-class ApplicationComponent : public Base, public ApplicationComponentBase
-{
-public:
- template
- explicit ApplicationComponent(IApplication *app, Args&&... args)
- : Base(std::forward(args)...)
- , ApplicationComponentBase(app)
- {
- }
-};
diff --git a/src/base/asyncfilestorage.cpp b/src/base/asyncfilestorage.cpp
index ba96aa09f..6424b1862 100644
--- a/src/base/asyncfilestorage.cpp
+++ b/src/base/asyncfilestorage.cpp
@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2017-2024 Vladimir Golovnev
+ * Copyright (C) 2017 Vladimir Golovnev
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -34,56 +34,31 @@
#include "base/utils/fs.h"
#include "base/utils/io.h"
-QHash> AsyncFileStorage::m_reservedPaths;
-QReadWriteLock AsyncFileStorage::m_reservedPathsLock;
-
AsyncFileStorage::AsyncFileStorage(const Path &storageFolderPath, QObject *parent)
: QObject(parent)
, m_storageDir(storageFolderPath)
+ , m_lockFile((m_storageDir / Path(u"storage.lock"_s)).data())
{
Q_ASSERT(m_storageDir.isAbsolute());
- const Path lockFilePath = m_storageDir / Path(u"storage.lock"_s);
+ if (!Utils::Fs::mkpath(m_storageDir))
+ throw AsyncFileStorageError(tr("Could not create directory '%1'.").arg(m_storageDir.toString()));
- {
- const QReadLocker readLocker {&m_reservedPathsLock};
- m_lockFile = m_reservedPaths.value(lockFilePath).lock();
- }
-
- if (!m_lockFile)
- {
- const QWriteLocker writeLocker {&m_reservedPathsLock};
- if (std::weak_ptr &lockFile = m_reservedPaths[lockFilePath]; lockFile.expired()) [[likely]]
- {
- if (!Utils::Fs::mkpath(m_storageDir))
- throw AsyncFileStorageError(tr("Could not create directory '%1'.").arg(m_storageDir.toString()));
-
- auto lockFileDeleter = [](QFile *file)
- {
- file->close();
- file->remove();
- delete file;
- };
- m_lockFile = std::shared_ptr(new QFile(lockFilePath.data()), std::move(lockFileDeleter));
-
- // TODO: This folder locking approach does not work for UNIX systems. Implement it.
- if (!m_lockFile->open(QFile::WriteOnly))
- throw AsyncFileStorageError(m_lockFile->errorString());
-
- lockFile = m_lockFile;
- }
- else
- {
- m_lockFile = lockFile.lock();
- }
- }
+ // TODO: This folder locking approach does not work for UNIX systems. Implement it.
+ if (!m_lockFile.open(QFile::WriteOnly))
+ throw AsyncFileStorageError(m_lockFile.errorString());
}
-AsyncFileStorage::~AsyncFileStorage() = default;
+AsyncFileStorage::~AsyncFileStorage()
+{
+ m_lockFile.close();
+ m_lockFile.remove();
+}
void AsyncFileStorage::store(const Path &filePath, const QByteArray &data)
{
- QMetaObject::invokeMethod(this, [this, data, filePath] { store_impl(filePath, data); }, Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, [this, data, filePath]() { store_impl(filePath, data); }
+ , Qt::QueuedConnection);
}
Path AsyncFileStorage::storageDir() const
diff --git a/src/base/asyncfilestorage.h b/src/base/asyncfilestorage.h
index 47937de1e..2943ee212 100644
--- a/src/base/asyncfilestorage.h
+++ b/src/base/asyncfilestorage.h
@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
- * Copyright (C) 2017-2024 Vladimir Golovnev