summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/lib-check.m411
1 files changed, 9 insertions, 2 deletions
diff --git a/m4/lib-check.m4 b/m4/lib-check.m4
index fe5895a38..4439b779a 100644
--- a/m4/lib-check.m4
+++ b/m4/lib-check.m4
@@ -42,10 +42,17 @@ AC_DEFUN(jm_LIB_CHECK,
# 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 spwd.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.