From: Ron Nazarov Date: Mon, 25 Nov 2024 16:31:04 +0000 (+0000) Subject: Check for libcrypt instead of unconditionally adding -lcrypt X-Git-Tag: v1.6.1-roc-dev~14 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=cebac140a38e630e11c71c5e46ae614271fb39c9;p=dgamelaunch 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. --- 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