svn commit: r1925658 - in /subversion/branches/patch-from-stream: ./ build/ac-macros/

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: brane
Date: Sun May 18 05:45:23 2025
New Revision: 1925658

URL: http://svn.apache.org/viewvc?rev=1925658&view=rev
Log:
On the patch-from-stram branch: Synced from trunk r1925657.

Modified:
    subversion/branches/patch-from-stream/   (props changed)
    subversion/branches/patch-from-stream/build/ac-macros/apache.m4
    subversion/branches/patch-from-stream/build/ac-macros/apr.m4
    subversion/branches/patch-from-stream/build/ac-macros/apr_memcache.m4
    subversion/branches/patch-from-stream/build/ac-macros/aprutil.m4
    subversion/branches/patch-from-stream/build/ac-macros/ax_boost_base.m4
    subversion/branches/patch-from-stream/build/ac-macros/berkeley-db.m4
    subversion/branches/patch-from-stream/build/ac-macros/compiler.m4
    subversion/branches/patch-from-stream/build/ac-macros/java.m4
    subversion/branches/patch-from-stream/build/ac-macros/kwallet.m4
    subversion/branches/patch-from-stream/build/ac-macros/libsecret.m4
    subversion/branches/patch-from-stream/build/ac-macros/lz4.m4
    subversion/branches/patch-from-stream/build/ac-macros/py3c.m4
    subversion/branches/patch-from-stream/build/ac-macros/sasl.m4
    subversion/branches/patch-from-stream/build/ac-macros/serf.m4
    subversion/branches/patch-from-stream/build/ac-macros/sqlite.m4
    subversion/branches/patch-from-stream/build/ac-macros/utf8proc.m4
    subversion/branches/patch-from-stream/build/ac-macros/zlib.m4
    subversion/branches/patch-from-stream/configure.ac

Propchange: subversion/branches/patch-from-stream/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun May 18 05:45:23 2025
@@ -58,6 +58,7 @@ googlemock
 .git
 .gitignore
 .idea
+.clangd
 compile_commands.json
 .kdev4
 *.kdev4

Propchange: subversion/branches/patch-from-stream/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1925596-1925657

Modified: subversion/branches/patch-from-stream/build/ac-macros/apache.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/apache.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/apache.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/apache.m4 Sun May 18 05:45:23 2025
@@ -219,6 +219,7 @@ elif test x"$APXS" != x"no"; then
     echo "=================================================================="
 fi
 
+SVN_DOT_CLANGD([$APACHE_INCLUDES])
 AC_SUBST(APXS)
 AC_SUBST(APACHE_LDFLAGS)
 AC_SUBST(APACHE_INCLUDES)

Modified: subversion/branches/patch-from-stream/build/ac-macros/apr.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/apr.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/apr.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/apr.m4 Sun May 18 05:45:23 2025
@@ -106,6 +106,7 @@ AC_DEFUN(SVN_LIB_APR,
     AC_MSG_ERROR([apr-config --shlib-path-var failed])
   fi
 
+  SVN_DOT_CLANGD([$SVN_APR_INCLUDES])
   AC_SUBST(SVN_APR_CONFIG, ["$apr_config"])
   AC_SUBST(SVN_APR_INCLUDES)
   AC_SUBST(SVN_APR_LIBS)

Modified: subversion/branches/patch-from-stream/build/ac-macros/apr_memcache.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/apr_memcache.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/apr_memcache.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/apr_memcache.m4 Sun May 18 05:45:23 2025
@@ -77,6 +77,7 @@ dnl We are already linking apr-util ever
     svn_lib_apr_memcache=no
   fi
 
+  SVN_DOT_CLANGD([$SVN_APR_MEMCACHE_INCLUDES])
   AC_SUBST(SVN_APR_MEMCACHE_INCLUDES)
   AC_SUBST(SVN_APR_MEMCACHE_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/aprutil.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/aprutil.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/aprutil.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/aprutil.m4 Sun May 18 05:45:23 2025
@@ -105,6 +105,7 @@ AC_DEFUN(SVN_LIB_APRUTIL,
   fi
   SVN_APRUTIL_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($SVN_APRUTIL_LIBS)`"
 
+  SVN_DOT_CLANGD([$SVN_APRUTIL_INCLUDES])
   AC_SUBST(SVN_APRUTIL_INCLUDES)
   AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
   AC_SUBST(SVN_APRUTIL_LIBS)

Modified: subversion/branches/patch-from-stream/build/ac-macros/ax_boost_base.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/ax_boost_base.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/ax_boost_base.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/ax_boost_base.m4 Sun May 18 05:45:23 2025
@@ -291,6 +291,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
         ifelse([$3], , :, [$3])
     else
         AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
+        SVN_DOT_CLANGD_CXX([$BOOST_CPPFLAGS])
         # execute ACTION-IF-FOUND (if present):
         ifelse([$2], , :, [$2])
     fi

Modified: subversion/branches/patch-from-stream/build/ac-macros/berkeley-db.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/berkeley-db.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/berkeley-db.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/berkeley-db.m4 Sun May 18 05:45:23 2025
@@ -151,6 +151,8 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB,
       fi
     fi
   fi
+
+  SVN_DOT_CLANGD([$SVN_DB_INCLUDES])
 ])
 
 

Modified: subversion/branches/patch-from-stream/build/ac-macros/compiler.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/compiler.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/compiler.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/compiler.m4 Sun May 18 05:45:23 2025
@@ -73,10 +73,11 @@ AC_DEFUN([SVN_CC_MODE_SETUP],
 
   CMODEFLAGS="$CFLAGS"
   CFLAGS=""
+  SVN_DOT_CLANGD_CC([$CMODEFLAGS])
 
   if test "$GCC" = "yes"; then
     dnl Find flags to silence all warnings
-    SVN_CFLAGS_ADD_IFELSE([-w])
+    SVN_CFLAGS_ADD_IFELSE([-w],[SVN_DOT_CLANGD_CC([-w])])
   fi
 
   CNOWARNFLAGS="$CFLAGS"
@@ -89,7 +90,9 @@ AC_DEFUN([SVN_CC_MODE_SETUP],
 
   if test "$GCC" = "yes"; then
     dnl Tell clang to not accept unknown warning flags
-    SVN_CFLAGS_ADD_IFELSE([-Werror=unknown-warning-option])
+    SVN_CFLAGS_ADD_IFELSE([-Werror=unknown-warning-option],[
+      SVN_DOT_CLANGD_CC([-Werror=unknown-warning-option])
+    ])
   fi
 ])
 
@@ -103,9 +106,11 @@ AC_DEFUN([SVN_CXX_MODE_SETUP],
     dnl Find flags to force C++ mode
                   dnl g++ and clang++
     if test "$cxx_language_level" = "any"; then
-      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++23],[],[
+        SVN_CXXFLAGS_ADD_IFELSE([-std=c++20],[],[
+          SVN_CXXFLAGS_ADD_IFELSE([-std=c++17],[],[
+            SVN_CXXFLAGS_ADD_IFELSE([-std=c++11])
+          ])
         ])
       ])
     else
@@ -131,10 +136,11 @@ AC_DEFUN([SVN_CXX_MODE_SETUP],
 
   CXXMODEFLAGS="$CXXFLAGS"
   CXXFLAGS=""
+  SVN_DOT_CLANGD_CXX([$CXXMODEFLAGS])
 
   if test "$GXX" = "yes"; then
     dnl Find flags to silence all warnings
-    SVN_CXXFLAGS_ADD_IFELSE([-w])
+    SVN_CXXFLAGS_ADD_IFELSE([-w],[SVN_DOT_CLANGD_CXX([-w])])
   fi
 
   CXXNOWARNFLAGS="$CXXFLAGS"
@@ -147,6 +153,8 @@ AC_DEFUN([SVN_CXX_MODE_SETUP],
 
   if test "$GXX" = "yes"; then
     dnl Tell clang++ to not accept unknown warning flags
-    SVN_CXXFLAGS_ADD_IFELSE([-Werror=unknown-warning-option])
+    SVN_CXXFLAGS_ADD_IFELSE([-Werror=unknown-warning-option],[
+      SVN_DOT_CLANGD_CXX([-Werror=unknown-warning-option])
+    ])
   fi
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/java.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/java.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/java.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/java.m4 Sun May 18 05:45:23 2025
@@ -180,6 +180,7 @@ AC_DEFUN(SVN_FIND_JDK,
     for dir in $list; do
       JNI_INCLUDES="$JNI_INCLUDES -I$dir"
     done
+    SVN_DOT_CLANGD([$JNI_INCLUDES])
   fi
 
   dnl We use JDK in the Makefile

Modified: subversion/branches/patch-from-stream/build/ac-macros/kwallet.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/kwallet.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/kwallet.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/kwallet.m4 Sun May 18 05:45:23 2025
@@ -146,6 +146,7 @@ int main()
   else
     AC_MSG_RESULT([no])
   fi
+  SVN_DOT_CLANGD([$SVN_KWALLET_INCLUDES])
   AC_SUBST(SVN_KWALLET_INCLUDES)
   AC_SUBST(SVN_KWALLET_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/libsecret.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/libsecret.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/libsecret.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/libsecret.m4 Sun May 18 05:45:23 2025
@@ -89,6 +89,7 @@ AC_DEFUN(SVN_LIB_SECRET,
   else
     AC_MSG_RESULT([no])
   fi
+  SVN_DOT_CLANGD([$SVN_GNOME_KEYRING_INCLUDES])
   AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
   AC_SUBST(SVN_GNOME_KEYRING_LIBS)
   AC_SUBST(SVN_GNOME_KEYRING_PCLIBS)

Modified: subversion/branches/patch-from-stream/build/ac-macros/lz4.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/lz4.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/lz4.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/lz4.m4 Sun May 18 05:45:23 2025
@@ -57,6 +57,7 @@ AC_DEFUN(SVN_LZ4,
       AC_MSG_ERROR([Subversion requires LZ4 >= r129, or use --with-lz4=internal])
     fi
   fi
+  SVN_DOT_CLANGD([$SVN_LZ4_INCLUDES])
   AC_SUBST(SVN_LZ4_INCLUDES)
   AC_SUBST(SVN_LZ4_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/py3c.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/py3c.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/py3c.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/py3c.m4 Sun May 18 05:45:23 2025
@@ -84,6 +84,7 @@ AC_DEFUN(SVN_PY3C,
     fi
   fi
 
+  SVN_DOT_CLANGD([$SVN_PY3C_INCLUDES])
   AC_SUBST(SVN_PY3C_INCLUDES)
 ])
 

Modified: subversion/branches/patch-from-stream/build/ac-macros/sasl.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/sasl.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/sasl.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/sasl.m4 Sun May 18 05:45:23 2025
@@ -96,7 +96,8 @@ AC_DEFUN(SVN_LIB_SASL,
 
     CPPFLAGS="$saved_CPPFLAGS"
   fi
-    
+
+  SVN_DOT_CLANGD([$SVN_SASL_INCLUDES])
   AC_SUBST(SVN_SASL_INCLUDES)
   AC_SUBST(SVN_SASL_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/serf.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/serf.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/serf.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/serf.m4 Sun May 18 05:45:23 2025
@@ -89,6 +89,7 @@ AC_DEFUN(SVN_LIB_SERF,
 
   svn_lib_serf=$serf_found
 
+  SVN_DOT_CLANGD([$SVN_SERF_INCLUDES])
   AC_SUBST(SVN_SERF_INCLUDES)
   AC_SUBST(SVN_SERF_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/sqlite.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/sqlite.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/sqlite.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/sqlite.m4 Sun May 18 05:45:23 2025
@@ -96,6 +96,7 @@ AC_DEFUN(SVN_LIB_SQLITE,
     fi
   ])
 
+  SVN_DOT_CLANGD([$SVN_SQLITE_INCLUDES])
   AC_SUBST(SVN_SQLITE_INCLUDES)
   AC_SUBST(SVN_SQLITE_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/utf8proc.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/utf8proc.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/utf8proc.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/utf8proc.m4 Sun May 18 05:45:23 2025
@@ -57,6 +57,7 @@ AC_DEFUN(SVN_UTF8PROC,
       AC_MSG_ERROR([Subversion requires UTF8PROC; install it or re-run configure with "--with-utf8proc=internal"])
     fi
   fi
+  SVN_DOT_CLANGD([$SVN_UTF8PROC_INCLUDES])
   AC_SUBST(SVN_UTF8PROC_INCLUDES)
   AC_SUBST(SVN_UTF8PROC_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/build/ac-macros/zlib.m4
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/build/ac-macros/zlib.m4?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/build/ac-macros/zlib.m4 (original)
+++ subversion/branches/patch-from-stream/build/ac-macros/zlib.m4 Sun May 18 05:45:23 2025
@@ -78,6 +78,7 @@ AC_DEFUN(SVN_LIB_Z,
     AC_MSG_ERROR([subversion requires zlib])
   fi
 
+  SVN_DOT_CLANGD([$SVN_ZLIB_INCLUDES])
   AC_SUBST(SVN_ZLIB_INCLUDES)
   AC_SUBST(SVN_ZLIB_LIBS)
 ])

Modified: subversion/branches/patch-from-stream/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/patch-from-stream/configure.ac?rev=1925658&r1=1925657&r2=1925658&view=diff
==============================================================================
--- subversion/branches/patch-from-stream/configure.ac (original)
+++ subversion/branches/patch-from-stream/configure.ac Sun May 18 05:45:23 2025
@@ -46,6 +46,84 @@ AC_SUBST([SWIG_LDFLAGS])
 # Generate config.nice early (before the arguments are munged)
 SVN_CONFIG_NICE(config.nice)
 
+# ==== Construcet .clangd ====================================================
+
+svn_dot_clangd_file="$abs_srcdir/.clangd"
+AC_ARG_ENABLE([dot-clangd],
+AC_HELP_STRING([--enable-dot-clangd],
+               [Generate a .clangd file at the root of the source tree]),
+[
+  AC_MSG_NOTICE([Creating $svn_dot_clangd_file])
+  svn_dot_clangdcc_contents='---
+# C
+If:
+  PathMatch: [.*\.[ch]]
+  PathExclude: [subversion/bindings/javahl/native/.*]
+
+CompileFlags:
+  Add:'
+
+  svn_dot_clangdxx_contents='---
+# C++
+If:
+  PathMatch: [.*\.[ch]pp|.*/bindings/javahl/native/.*\.h]
+
+CompileFlags:
+  Add:'
+],
+[])
+
+AC_DEFUN([SVN_DOT_CLANGD_CC],
+[
+  if test "x$svn_dot_clangdcc_contents" != "x"; then
+    indent="    -"
+    dnl Split multiple flags to one per line.
+    set fake [$1]
+    while test "${#}" -gt 1; do
+      line="${2}"; shift
+      svn_dot_clangdcc_contents=`cat <<EOF
+$svn_dot_clangdcc_contents
+$indent $line
+EOF
+      `
+    done
+  fi
+])
+
+AC_DEFUN([SVN_DOT_CLANGD_CXX],
+[
+  if test "x$svn_dot_clangdxx_contents" != "x"; then
+    indent="    -"
+    dnl Split multiple flags to one per line.
+    set fake [$1]
+    while test "${#}" -gt 1; do
+      line="${2}"; shift
+svn_dot_clangdxx_contents=`cat <<EOF
+$svn_dot_clangdxx_contents
+$indent $line
+EOF
+      `
+    done
+  fi
+])
+
+AC_DEFUN([SVN_DOT_CLANGD],[
+  SVN_DOT_CLANGD_CC([$1])
+  SVN_DOT_CLANGD_CXX([$1])
+])
+
+
+dnl Add well-known source and build paths to .clangd
+SVN_DOT_CLANGD([-I$abs_builddir/subversion])
+SVN_DOT_CLANGD([-I$abs_srcdir/subversion/include])
+SVN_DOT_CLANGD([-I$abs_srcdir/subversion/tests])
+SVN_DOT_CLANGD([-I$abs_srcdir/subversion/bindings/swig/perl/libsvn_swig_perl])
+SVN_DOT_CLANGD([-I$abs_srcdir/subversion/bindings/swig/python/libsvn_swig_py])
+SVN_DOT_CLANGD([-I$abs_srcdir/subversion/bindings/swig/ruby/libsvn_swig_ruby])
+SVN_DOT_CLANGD_CXX([-I$abs_srcdir/subversion/bindings/cxx/include])
+SVN_DOT_CLANGD_CXX([-I$abs_srcdir/subversion/bindings/cxx/tests])
+SVN_DOT_CLANGD_CXX([-I$abs_srcdir/subversion/bindings/javahl/native])
+
 # ==== Check for programs ====================================================
 
 # Look for a C compiler (before anything can set CFLAGS)
@@ -1078,6 +1156,7 @@ AS_HELP_STRING([--enable-maintainer-mode
 
         dnl Add flags that all versions of GCC (should) support
         CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wbad-function-cast $CMAINTAINERFLAGS"
+        SVN_DOT_CLANGD_CC([$CMAINTAINERFLAGS])
       fi
       if test "$GXX" = "yes"; then
         AC_MSG_NOTICE([maintainer-mode: adding G++ warning flags])
@@ -1096,6 +1175,7 @@ AS_HELP_STRING([--enable-maintainer-mode
 
         dnl Add flags that all versions of G++ (should) support
         CXXMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wunused -Wunreachable-code $CXXMAINTAINERFLAGS"
+        SVN_DOT_CLANGD_CXX([$CXXMAINTAINERFLAGS])
       fi
     fi
 ])
@@ -1131,6 +1211,7 @@ if test "$enable_debugging" = "yes" ; th
   dnl AP_DEBUG enables specific (Apache) features for developer builds
   CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG"
   CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG"
+  SVN_DOT_CLANGD([-DSVN_DEBUG -DAP_DEBUG])
 elif test "$enable_debugging" = "no" ; then
   AC_MSG_NOTICE([Disabling debugging])
   CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
@@ -1138,6 +1219,7 @@ elif test "$enable_debugging" = "no" ; t
   dnl Compile with NDEBUG to get rid of assertions
   CFLAGS="$CFLAGS -DNDEBUG"
   CXXFLAGS="$CXXFLAGS -DNDEBUG"
+  SVN_DOT_CLANGD([-DNDEBUG])
 # elif test "$enable_debugging" = "maybe" ; then
 #   # do nothing
 fi
@@ -1783,6 +1865,18 @@ AC_DEFINE_UNQUOTED([SVN_BUILD_TARGET], "
 
 AC_OUTPUT
 
+# ==== Generate the .clangd file =============================================
+if test "x$svn_dot_clangdcc_contents$svn_dot_clangdxx_contents" = "x" ; then
+   if test -f "$svn_dot_clangd_file"; then
+      AC_MSG_NOTICE([Removing $svn_dot_clangd_file])
+      rm -f "$svn_dot_clangd_file"
+   fi
+else
+  AC_MSG_NOTICE([Writing $svn_dot_clangd_file])
+  echo "$svn_dot_clangdcc_contents" > "$svn_dot_clangd_file"
+  echo "$svn_dot_clangdxx_contents" >> "$svn_dot_clangd_file"
+fi
+
 # ==== Print final messages to user ==========================================
 
 dnl Configure is long - users tend to miss warnings printed during it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.