]> granicus.if.org Git - sudo/commitdiff
Fix block to add -lutil for FreeBSD and NetBSD when logincap is in use.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 21 Oct 2007 13:29:18 +0000 (13:29 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 21 Oct 2007 13:29:18 +0000 (13:29 +0000)
configure
configure.in

index 527f20585f2e515e27b9b6ae1c2b94e7adcf00d6..dac68dbd2795f2495bbedb601644a96f9bed4036 100755 (executable)
--- 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
index 789ed5976adab1a981a01effb2949e18c276ec07..701ee4bf011c3ff864fbd1eab519f41daee7d86f 100644 (file)
@@ -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