fix: move --without-ncurses logic to scripts/checks.m4 per review

- Add TORRENT_WITHOUT_NCURSES macro in scripts/checks.m4
- Clear CURSES_LIBS/CFLAGS in the macro instead of if/else in configure.ac
- Restore simple LIBS/CFLAGS lines in configure.ac
- Add missing set_escdelay stub
This commit is contained in:
trim21
2026-05-29 17:39:18 +08:00
committed by Jari Sundell
parent ca706c21c0
commit 5725eb3773
3 changed files with 22 additions and 20 deletions
+17
View File
@@ -506,3 +506,20 @@ AC_DEFUN([TORRENT_WITH_SYSTEMD], [
fi
])
])
AC_DEFUN([TORRENT_WITHOUT_NCURSES], [
AC_ARG_WITH([ncurses],
[AS_HELP_STRING([--without-ncurses], [build without ncurses (daemon-only mode)])],
[with_ncurses=$withval],
[with_ncurses=yes])
if test "x$with_ncurses" = xno; then
AC_DEFINE([HAVE_NO_NCURSES], [1], [Define to 1 if building without ncurses])
CURSES_LIBS=""
CURSES_CFLAGS=""
CURSES_LIB=""
fi
AM_CONDITIONAL([NO_NCURSES], [test "x$with_ncurses" = xno])
])