Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 146 lines (121 sloc) 3.169 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146

if BUILD_LAST
usrbin_exec_PROGRAMS += last
dist_man_MANS += login-utils/last.1
last_SOURCES = login-utils/last.c
endif

if BUILD_SULOGIN
sbin_PROGRAMS += sulogin
dist_man_MANS += login-utils/sulogin.8
sulogin_SOURCES = \
login-utils/sulogin.c
sulogin_LDADD = $(LDADD) libcommon.la
if HAVE_LIBCRYPT
sulogin_LDADD += -lcrypt
endif
if HAVE_SELINUX
sulogin_LDADD += -lselinux
endif
endif # BUILD_SULOGIN


if BUILD_LOGIN
bin_PROGRAMS += login
dist_man_MANS += login-utils/login.1
login_SOURCES = \
login-utils/login.c \
login-utils/logindefs.c \
login-utils/logindefs.h
login_LDADD = $(LDADD) libcommon.la -lpam -lpam_misc
if HAVE_AUDIT
login_LDADD += -laudit
endif
if HAVE_SELINUX
login_LDADD += -lselinux
endif
endif # BUILD_LOGIN


if BUILD_UTMPDUMP
usrbin_exec_PROGRAMS += utmpdump
dist_man_MANS += login-utils/utmpdump.1
utmpdump_SOURCES = login-utils/utmpdump.c
endif


if BUILD_CHFN_CHSH
usrbin_exec_PROGRAMS += chfn chsh
dist_man_MANS += \
login-utils/chfn.1 \
login-utils/chsh.1

chfn_chsh_sources = \
login-utils/islocal.c \
login-utils/islocal.h \
login-utils/setpwnam.c \
login-utils/setpwnam.h
chfn_chsh_cflags = $(SUID_CFLAGS) $(AM_CFLAGS)
chfn_chsh_ldflags = $(SUID_LDFLAGS) $(AM_LDFLAGS)
chfn_chsh_ldadd = libcommon.la -lpam -lpam_misc

if HAVE_SELINUX
chfn_chsh_sources += \
login-utils/selinux_utils.c \
login-utils/selinux_utils.h
chfn_chsh_ldadd += -lselinux
endif

chfn_SOURCES = login-utils/chfn.c $(chfn_chsh_sources)
chfn_CFLAGS = $(chfn_chsh_cflags)
chfn_LDFLAGS = $(chfn_chsh_ldflags)
chfn_LDADD = $(LDADD) $(chfn_chsh_ldadd)

chsh_SOURCES = login-utils/chsh.c $(chfn_chsh_sources)
chsh_CFLAGS = $(chfn_chsh_cflags)
chsh_LDFLAGS = $(chfn_chsh_ldflags)
chsh_LDADD = $(LDADD) $(chfn_chsh_ldadd)
endif # BUILD_CHFN_CHSH


if BUILD_SU
bin_PROGRAMS += su
su_SOURCES = \
login-utils/su.c \
login-utils/logindefs.c \
login-utils/logindefs.h
su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
su_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
su_LDADD = $(LDADD) -lpam -lpam_misc
endif


if BUILD_NEWGRP
usrbin_exec_PROGRAMS += newgrp
dist_man_MANS += login-utils/newgrp.1
newgrp_SOURCES = login-utils/newgrp.c
newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
newgrp_LDADD = $(LDADD)
if HAVE_LIBCRYPT
newgrp_LDADD += -lcrypt
endif
endif # BUILD_NEWGRP


if BUILD_VIPW
usrsbin_exec_PROGRAMS += vipw
dist_man_MANS += \
login-utils/vigr.8 \
login-utils/vipw.8
vipw_SOURCES = \
login-utils/vipw.c \
login-utils/setpwnam.h
vipw_LDADD = $(LDADD) libcommon.la
if HAVE_SELINUX
vipw_LDADD += -lselinux
endif
install-exec-hook-vipw::
cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr

INSTALL_EXEC_HOOKS += install-exec-hook-vipw
endif # BUILD_VIPW


noinst_PROGRAMS += \
test_islocal \
test_logindefs

test_islocal_SOURCES = login-utils/islocal.c
test_islocal_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)

test_logindefs_SOURCES = \
login-utils/logindefs.c \
login-utils/logindefs.h
test_logindefs_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)


install-exec-hook:
if BUILD_SU
if MAKEINSTALL_DO_SETUID
chmod 4755 $(DESTDIR)$(bindir)/su
endif
endif
if BUILD_VIPW
cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr
endif
Something went wrong with that request. Please try again.