From 434e8fb393a7bf5f54a6d2e961be4343b9b9602b Mon Sep 17 00:00:00 2001 From: Tomo <68489118+Tomodachi94@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:15:31 -0700 Subject: [PATCH] Bump C++ requirement to C++17 The 1.13.0 release of Poco requires a newer version of C++, specifically C++17. The configuration phase will fail to find the Poco headers with an older C++ version. Changelog: https://raw.githubusercontent.com/pocoproject/poco/poco-1.13.0-release/CHANGELOG Nixpkgs patch: https://github.com/NixOS/nixpkgs/blob/6dd5612cdd562163dc7a7341e3be9c3f6f4d9078/pkgs/tools/graphics/sanjuuni/default.nix#L22-L26 Relevant discussion: https://github.com/NixOS/nixpkgs/pull/283809#issuecomment-2018996543 --- README.md | 2 +- configure | 12 ++++++------ configure.ac | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e8ffc90..9a9535a 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Nix support is maintained by [Tomodachi94](https://github.com/tomodachi94). For ## Building Requirements: -* C++11 or later compiler +* C++17 or later compiler * FFmpeg libraries * Poco (Foundation and Util required; Net/NetSSL optional) * zlib (usually required by Poco) diff --git a/configure b/configure index 9445282..f3802a0 100755 --- a/configure +++ b/configure @@ -2522,7 +2522,7 @@ 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 -CXXFLAGS="$CXXFLAGS -std=c++11" +CXXFLAGS="$CXXFLAGS -std=c++17" @@ -3808,7 +3808,7 @@ 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 +for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++17 -std=c++0x -qlanglvl=extended0x -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" @@ -3894,15 +3894,15 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++11" >&5 -printf %s "checking whether C++ compiler accepts -std=c++11... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++17" >&5 +printf %s "checking whether C++ compiler accepts -std=c++17... " >&6; } if test ${ax_cv_check_cxxflags___std_cpp11+y} then : printf %s "(cached) " >&6 else $as_nop ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -std=c++11" + CXXFLAGS="$CXXFLAGS -std=c++17" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3929,7 +3929,7 @@ if test "x$ax_cv_check_cxxflags___std_cpp11" = xyes then : : else $as_nop - as_fn_error $? "C++ compiler does not support -std=c++11." "$LINENO" 5 + as_fn_error $? "C++ compiler does not support -std=c++17." "$LINENO" 5 fi diff --git a/configure.ac b/configure.ac index ef0f161..15a13b8 100644 --- a/configure.ac +++ b/configure.ac @@ -4,10 +4,10 @@ m4_include([m4/find_cxx.m4]) m4_include([m4/find_cxx11.m4]) AC_LANG([C++]) -CXXFLAGS="$CXXFLAGS -std=c++11" +CXXFLAGS="$CXXFLAGS -std=c++17" AC_PROG_CC AC_PROG_CXX -AX_CHECK_COMPILE_FLAG([-std=c++11], [], [AC_MSG_ERROR([C++ compiler does not support -std=c++11.])]) +AX_CHECK_COMPILE_FLAG([-std=c++17], [], [AC_MSG_ERROR([C++ compiler does not support -std=c++17.])]) AC_CHECK_HEADERS([libavformat/avformat.h], [], [AC_MSG_ERROR([Could not find libavformat headers.])]) AC_CHECK_HEADERS([libavcodec/avcodec.h], [], [AC_MSG_ERROR([Could not find libavcodec headers.])])