On 30. 9. 25 11:47, Đoàn Trần Công Danh wrote:
[[[
Support KDE 6, it's released in Feb 2024, which is 19 months ago.

* build/ac-macros/compiler.m4
   Switch to C++17, since Qt6 requires C++17
* build/ac-macros/kwallet.m4
   Check for KDE 6's libraries
* subversion/libsvn_auth_kwallet/kwallet.cpp
   Update preprocessor for KDE 6

]]]

Index: build/ac-macros/compiler.m4
===================================================================
diff --git a/subversion/trunk/build/ac-macros/compiler.m4 
b/subversion/trunk/build/ac-macros/compiler.m4
--- a/subversion/trunk/build/ac-macros/compiler.m4      (revision 1928804)
+++ b/subversion/trunk/build/ac-macros/compiler.m4      (working copy)
@@ -108,9 +108,7 @@
      if test "$cxx_language_level" = "any"; then
        SVN_CXXFLAGS_ADD_IFELSE([-std=c++23],[],[
          SVN_CXXFLAGS_ADD_IFELSE([-std=c++20],[],[
-          SVN_CXXFLAGS_ADD_IFELSE([-std=c++17],[],[
-            SVN_CXXFLAGS_ADD_IFELSE([-std=c++11])
-          ])
+          SVN_CXXFLAGS_ADD_IFELSE([-std=c++17])
          ])
        ])
      else
@@ -117,18 +115,18 @@
        SVN_CXXFLAGS_ADD_IFELSE([-std=$cxx_language_level],[],[
          AC_MSG_ERROR([$CXX does not accept -std=$cxx_language_level (see 
option --enable-c++)])
        ])
-      dnl We require at least C++11
-      AC_MSG_CHECKING([if '$CXX $CXXFLAGS' supports at least a C++11])
+      dnl We require at least C++17
+      AC_MSG_CHECKING([if '$CXX $CXXFLAGS' supports at least a C++17])


The problem I have with this particular change is that it's not true. JavaHL works with just fine with C++11. I think a better approach would be to check the determined C++ version in build/ac-macros/kwallet.m4 and only fail if KWallet support was explicitly requested AND we have KWallet 6 available AND the compiler version is not C++17-compatible (this would be done with a check for the value of the __cplusplus macro).

As it is now, configure will fail even on platforms that don't have or want KWallet, if the C++ compiler isn't new enough (or with --disable-c++). I don't think that's very friendly.

(Indeed, we should do something similar for JavaHL and svnxx — check the compiler version if the given modules are enabled, and just fail in general when C++ <11, since that's the oldest version we can reasonably support)

-- Brane

Reply via email to