-#serial 2
+#serial 5
dnl Misc lib-related macros for fileutils, sh-utils, textutils.
-AC_DEFUN(jm_LIB_CHECK,
+AC_DEFUN([jm_LIB_CHECK],
[
# Check for libypsec.a on Dolphin M88K machines.
AC_SEARCH_LIBS(yp_match, [sun ypsec])
# SysV needs -lsec, older versions of Linux need -lshadow for
- # shadow passwords.
- AC_SEARCH_LIBS(getspnam, [shadow sec])
+ # shadow passwords. UnixWare 7 needs -lgen.
+ AC_SEARCH_LIBS(getspnam, [shadow sec gen])
+
+ AC_CHECK_HEADERS(shadow.h)
# Requirements for su.c.
- AC_CHECK_MEMBERS(struct passwd.sp_pwdp)
+ shadow_includes="\
+$ac_includes_default
+#if HAVE_SHADOW_H
+# include <shadow.h>
+#endif
+"
+ AC_CHECK_MEMBERS([struct spwd.sp_pwdp],,,[$shadow_includes])
AC_CHECK_FUNCS(getspnam)
- AC_CHECK_HEADERS(shadow.h)
# SCO-ODT-3.0 is reported to need -lufc for crypt.
# NetBSD needs -lcrypt for crypt.