When checking for struct spwd.sp_pwdp, also include
<shadow.h>. Reported by Dragos Harabor.
# 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.