From: Todd C. Miller Date: Sun, 21 Oct 2007 13:29:18 +0000 (+0000) Subject: Fix block to add -lutil for FreeBSD and NetBSD when logincap is in use. X-Git-Tag: SUDO_1_7_0~342 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c50e7d4c06c9c5ef6f3ef0eec6617d73e71d4b5b;p=sudo Fix block to add -lutil for FreeBSD and NetBSD when logincap is in use. --- diff --git a/configure b/configure index 527f20585..dac68dbd2 100755 --- a/configure +++ b/configure @@ -13534,6 +13534,11 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF LOGINCAP_USAGE='[-c class|-] ' + case "$OS" in + freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil" + ;; + esac + fi done @@ -19756,13 +19761,6 @@ done LIBS="$_LIBS" fi -if test ${with_logincap-'no'} = "yes"; then - case "$OS" in - freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil" - ;; - esac -fi - if test ${with_AFS-'no'} = "yes"; then # looks like the "standard" place for AFS libs is /usr/afsws/lib diff --git a/configure.in b/configure.in index 789ed5976..701ee4bf0 100644 --- a/configure.in +++ b/configure.in @@ -1636,7 +1636,12 @@ if test "$OS" != "ultrix"; then fi fi if test ${with_logincap-'no'} != "no"; then - AC_CHECK_HEADERS(login_cap.h, [LOGINCAP_USAGE='[[-c class|-]] ']) + AC_CHECK_HEADERS(login_cap.h, [LOGINCAP_USAGE='[[-c class|-]] ' + case "$OS" in + freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil" + ;; + esac + ]) fi if test ${with_project-'no'} != "no"; then AC_CHECK_HEADER(project.h, AC_DEFINE(HAVE_PROJECT_H) @@ -2053,16 +2058,6 @@ if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then LIBS="$_LIBS" fi -dnl -dnl Some systems put login_cap(3) in libutil -dnl -if test ${with_logincap-'no'} = "yes"; then - case "$OS" in - freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil" - ;; - esac -fi - dnl dnl extra AFS libs and includes dnl