usrbin_exec_PROGRAMS += utmpdump
dist_man_MANS += login-utils/utmpdump.1
utmpdump_SOURCES = login-utils/utmpdump.c
+utmpdump_LDADD = $(LDADD) libcommon.la
endif
login-utils/ch-common.c
chfn_chsh_cflags = $(SUID_CFLAGS) $(AM_CFLAGS)
chfn_chsh_ldflags = $(SUID_LDFLAGS) $(AM_LDFLAGS)
-chfn_chsh_ldadd = libcommon.la
+chfn_chsh_ldadd = libcommon.la $(READLINE_LIBS)
if CHFN_CHSH_PASSWORD
chfn_chsh_ldadd += -lpam
if HAVE_LINUXPAM
su_LDADD += -lpam_misc
endif
+if HAVE_PTY
+su_SOURCES += lib/pty-session.c \
+ include/pty-session.h \
+ lib/monotonic.c
+su_LDADD += -lutil $(REALTIME_LIBS)
+endif
endif # BUILD_SU
if HAVE_LINUXPAM
runuser_LDADD += -lpam_misc
endif
+if HAVE_PTY
+runuser_SOURCES += lib/pty-session.c \
+ include/pty-session.h \
+ lib/monotonic.c
+runuser_LDADD += -lutil $(REALTIME_LIBS)
+endif
endif # BUILD_RUNUSER
install-exec-hook:
if BUILD_SU
+if MAKEINSTALL_DO_CHOWN
+ chown root:root $(DESTDIR)$(bindir)/su
+endif
if MAKEINSTALL_DO_SETUID
chmod 4755 $(DESTDIR)$(bindir)/su
endif