Author: brane
Date: Wed May 27 05:33:28 2026
New Revision: 1934668
Log:
Improve ncurses detection in the autotools build.
* configure.ac: Print cross-compiling status to the configure output.
* build/ac-macros/svnbrowse.m4 (SVN_SVNBROWSE): Make the "svnbrowse is
disabled by default" stat explicit. Print the ncurses version, if found.
Add the correct include path to the .clangd file.
Modified:
subversion/trunk/build/ac-macros/svnbrowse.m4
subversion/trunk/configure.ac
Modified: subversion/trunk/build/ac-macros/svnbrowse.m4
==============================================================================
--- subversion/trunk/build/ac-macros/svnbrowse.m4 Wed May 27 04:20:06
2026 (r1934667)
+++ subversion/trunk/build/ac-macros/svnbrowse.m4 Wed May 27 05:33:28
2026 (r1934668)
@@ -21,6 +21,8 @@ dnl Configure svnbrowse
AC_DEFUN(SVN_SVNBROWSE,
[
+ dnl disabled by default
+ do_svnbrowse_build=no
AC_ARG_ENABLE(svnbrowse,
AS_HELP_STRING([--enable-svnbrowse],
[Enable building svnbrowse]),
@@ -29,7 +31,7 @@ AC_DEFUN(SVN_SVNBROWSE,
AC_MSG_NOTICE([Enabling svnbrowse])
do_svnbrowse_build=yes
else
- AC_MSG_NOTICE([Disabling svnbrowse])
+ dnl this is the default AC_MSG_NOTICE([Disabling svnbrowse])
do_svnbrowse_build=no
fi
])
@@ -69,6 +71,23 @@ AC_DEFUN(SVN_SVNBROWSE,
])
])
fi
+
+ if test "$ncurses_found" != "no" && test "$cross_compiling" != "yes";
then
+ AC_MSG_CHECKING([ncurses version])
+ save_cppflags="$CPPFLAGS"
+ save_ldflags="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $SVN_NCURSES_INCLUDES"
+ LDFLAGS="$LDFLAGS $SVN_NCURSES_LIBS"
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <curses.h>
+ int main(void) {
+ printf("%s\n", NCURSES_VERSION);
+ return 0;
+ }],[],[echo "not available"])
+ CPPFLAGS="$save_cppflags"
+ LDFLAGS="$save_ldflags"
+ fi
fi
if test "$do_svnbrowse_build" = "yes"; then
@@ -82,7 +101,7 @@ AC_DEFUN(SVN_SVNBROWSE,
SVN_BUILD_SVNBROWSE=false
fi
- SVN_DOT_CLANGD([$SVN_ZLIB_INCLUDES])
+ SVN_DOT_CLANGD([$SVN_NCURSES_INCLUDES])
AC_SUBST(SVN_BUILD_SVNBROWSE)
AC_SUBST(SVN_NCURSES_INCLUDES)
AC_SUBST(SVN_NCURSES_LIBS)
Modified: subversion/trunk/configure.ac
==============================================================================
--- subversion/trunk/configure.ac Wed May 27 04:20:06 2026
(r1934667)
+++ subversion/trunk/configure.ac Wed May 27 05:33:28 2026
(r1934668)
@@ -131,6 +131,8 @@ SVN_DOT_CLANGD_CXX([-I$abs_srcdir/subver
# Look for a C compiler (before anything can set CFLAGS)
CUSERFLAGS="$CFLAGS"
AC_PROG_CC
+AC_MSG_CHECKING([if cross-compiling])
+AC_MSG_RESULT([$cross_compiling])
SVN_CC_MODE_SETUP
# Look for a C++ compiler (before anything can set CXXFLAGS)