diff options
author | Sam James <sam@gentoo.org> | 2023-01-13 15:09:59 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-02-02 09:44:05 +0100 |
commit | 319a66a6e97f875d4f0a4b9c07579cf4c0d4c912 (patch) | |
tree | 1cab47520a3db4b1e0ae0057777d0967e7d9090d /configure.ac | |
parent | 1a060a926aa1bfa6ce402e81b7d301e2a5c11bd7 (diff) |
configure.ac: Fix build with --with-system-zxing and < Clang 16
Clang 15 and older default to -std=c++14, not -std=c++17 (unlike Clang 16 onwards).
This doesn't show up with GCC because GCC 11 onwards defaults to -std=c++17.
The new version of libzxing requires C++ 17, per its release notes. Adapt
the configure check accordingly to pass -std=c++17 when checking for its
headers and save accordingly if successful.
(Do this via ${CXXFLAGS_CXX11} which has the appropriate switch
for our compiler, despite its name.)
Bug: https://bugs.gentoo.org/890324
Change-Id: Iaaa8fdc05eea0e26416b605bfda8f2d831f8729c
Signed-off-by: Sam James <sam@gentoo.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145479
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146372
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index f3d5bc37f2af..97f69bbdc9ad 100644 --- a/configure.ac +++ b/configure.ac @@ -11177,7 +11177,7 @@ else continue fi dnl TODO: White space in $i would cause problems: - CXXFLAGS="$save_CXXFLAGS -I$i/ZXing" + CXXFLAGS="$save_CXXFLAGS ${CXXFLAGS_CXX11} -I$i/ZXing" AC_CHECK_HEADER(MultiFormatWriter.h, [ZXING_CFLAGS=-I$i/ZXing; break], [unset ac_cv_header_MultiFormatWriter_h], [#include <stdexcept>]) done |