From cebac140a38e630e11c71c5e46ae614271fb39c9 Mon Sep 17 00:00:00 2001 From: Ron Nazarov Date: Mon, 25 Nov 2024 16:31:04 +0000 Subject: [PATCH] Check for libcrypt instead of unconditionally adding -lcrypt This was causing the configure script to fail on checking for ncurses when it was actually failing due to libcrypt being missing. A check for -lutil should be added to, but I didn't do this since -lutil is not required since glibc 2.34 and I'm using a newer version and don't know what function it should check for. --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index afeb6f8..d4b5578 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,10 @@ fi case "$(uname -s)" in Linux | *BSD) - LIBS="$LIBS -lutil -lcrypt" + LIBS+=" -lutil" + AC_CHECK_LIB(crypt, crypt, [LIBS+=" -lcrypt"], [ + AC_MSG_ERROR([Cannot find libcrypt.]) + ]) AC_DEFINE(NOSTREAMS, 1, [Don't use SVR4 streams support in ttyrec.]) ;; esac -- 2.47.3