]>
Commit | Line | Data |
---|---|---|
48d7b13a | 1 | |
48d7b13a | 2 | if BUILD_LAST |
30688dde | 3 | usrbin_exec_PROGRAMS += last |
ec01e9d0 | 4 | dist_man_MANS += \ |
ce602720 OO |
5 | login-utils/last.1 \ |
6 | login-utils/lastb.1 | |
08ca3e26 | 7 | last_SOURCES = login-utils/last.c lib/boottime.c |
8fc4a886 | 8 | last_LDADD = $(LDADD) libcommon.la $(CLOCKGETTIME_LIBS) |
ce602720 OO |
9 | |
10 | install-exec-hook-last: | |
bccc956d | 11 | cd $(DESTDIR)$(usrbin_execdir) && ln -sf last lastb |
ce602720 OO |
12 | |
13 | INSTALL_EXEC_HOOKS += install-exec-hook-last | |
48d7b13a KZ |
14 | endif |
15 | ||
ce602720 | 16 | if BUILD_DEPRECATED_LAST |
ce602720 OO |
17 | usrbin_exec_PROGRAMS += last |
18 | dist_man_MANS += login-utils/last-deprecated.1 | |
19 | last_SOURCES = login-utils/last-deprecated.c | |
ce602720 | 20 | endif # BUILD_DEPRECATED_LAST |
a73f59fa | 21 | |
ec01e9d0 | 22 | |
de217489 KZ |
23 | if BUILD_SULOGIN |
24 | sbin_PROGRAMS += sulogin | |
ffeb2805 KZ |
25 | dist_man_MANS += login-utils/sulogin.8 |
26 | sulogin_SOURCES = \ | |
a73f59fa KZ |
27 | login-utils/sulogin.c \ |
28 | login-utils/sulogin-consoles.c \ | |
29 | login-utils/sulogin-consoles.h | |
dcdb349b | 30 | sulogin_LDADD = $(LDADD) libcommon.la |
a73f59fa | 31 | |
de217489 KZ |
32 | if HAVE_LIBCRYPT |
33 | sulogin_LDADD += -lcrypt | |
34 | endif | |
35 | if HAVE_SELINUX | |
36 | sulogin_LDADD += -lselinux | |
37 | endif | |
a73f59fa KZ |
38 | |
39 | check_PROGRAMS += test_consoles | |
40 | test_consoles_SOURCES = login-utils/sulogin-consoles.c | |
41 | test_consoles_CFLAGS = -DTEST_PROGRAM | |
42 | test_consoles_LDADD = libcommon.la | |
de217489 KZ |
43 | endif # BUILD_SULOGIN |
44 | ||
48d7b13a | 45 | |
e7614a07 KZ |
46 | if BUILD_LOGIN |
47 | bin_PROGRAMS += login | |
ffeb2805 | 48 | dist_man_MANS += login-utils/login.1 |
e7614a07 | 49 | login_SOURCES = \ |
ffeb2805 KZ |
50 | login-utils/login.c \ |
51 | login-utils/logindefs.c \ | |
d77ab74a | 52 | login-utils/logindefs.h |
dcdb349b | 53 | login_LDADD = $(LDADD) libcommon.la -lpam -lpam_misc |
e7614a07 KZ |
54 | if HAVE_AUDIT |
55 | login_LDADD += -laudit | |
56 | endif | |
57 | if HAVE_SELINUX | |
58 | login_LDADD += -lselinux | |
59 | endif | |
60 | endif # BUILD_LOGIN | |
61 | ||
62 | ||
88407b93 KZ |
63 | if BUILD_NOLOGIN |
64 | sbin_PROGRAMS += nologin | |
65 | dist_man_MANS += login-utils/nologin.8 | |
66 | nologin_SOURCES = login-utils/nologin.c | |
67 | endif | |
68 | ||
69 | ||
78d5ceac KZ |
70 | if BUILD_UTMPDUMP |
71 | usrbin_exec_PROGRAMS += utmpdump | |
72 | dist_man_MANS += login-utils/utmpdump.1 | |
73 | utmpdump_SOURCES = login-utils/utmpdump.c | |
74 | endif | |
75 | ||
76 | ||
2c8a3e16 KZ |
77 | if BUILD_CHFN_CHSH |
78 | usrbin_exec_PROGRAMS += chfn chsh | |
ffeb2805 KZ |
79 | dist_man_MANS += \ |
80 | login-utils/chfn.1 \ | |
81 | login-utils/chsh.1 | |
2c8a3e16 | 82 | |
d86918b6 | 83 | chfn_chsh_sources = |
2c8a3e16 KZ |
84 | chfn_chsh_cflags = $(SUID_CFLAGS) $(AM_CFLAGS) |
85 | chfn_chsh_ldflags = $(SUID_LDFLAGS) $(AM_LDFLAGS) | |
d86918b6 KZ |
86 | chfn_chsh_ldadd = libcommon.la |
87 | ||
88 | if CHFN_CHSH_PASSWORD | |
89 | chfn_chsh_ldadd += -lpam -lpam_misc | |
90 | chfn_chsh_sources += \ | |
91 | login-utils/auth.c \ | |
92 | login-utils/auth.h | |
93 | endif | |
2c8a3e16 | 94 | |
7e4714f2 CM |
95 | if HAVE_USER |
96 | chfn_chsh_ldflags += $(LIBUSER_LIBS) | |
97 | chfn_chsh_cflags += $(LIBUSER_CFLAGS) | |
6adb1ef2 CM |
98 | chfn_chsh_sources+= \ |
99 | login-utils/libuser.c \ | |
100 | login-utils/libuser.h | |
d86918b6 KZ |
101 | else |
102 | chfn_chsh_sources += \ | |
103 | login-utils/islocal.c \ | |
104 | login-utils/islocal.h \ | |
105 | login-utils/setpwnam.c \ | |
106 | login-utils/setpwnam.h | |
7e4714f2 CM |
107 | endif |
108 | ||
2c8a3e16 | 109 | if HAVE_SELINUX |
ffeb2805 KZ |
110 | chfn_chsh_sources += \ |
111 | login-utils/selinux_utils.c \ | |
112 | login-utils/selinux_utils.h | |
2c8a3e16 KZ |
113 | chfn_chsh_ldadd += -lselinux |
114 | endif | |
115 | ||
ffeb2805 | 116 | chfn_SOURCES = login-utils/chfn.c $(chfn_chsh_sources) |
2c8a3e16 KZ |
117 | chfn_CFLAGS = $(chfn_chsh_cflags) |
118 | chfn_LDFLAGS = $(chfn_chsh_ldflags) | |
dcdb349b | 119 | chfn_LDADD = $(LDADD) $(chfn_chsh_ldadd) |
2c8a3e16 | 120 | |
ffeb2805 | 121 | chsh_SOURCES = login-utils/chsh.c $(chfn_chsh_sources) |
2c8a3e16 KZ |
122 | chsh_CFLAGS = $(chfn_chsh_cflags) |
123 | chsh_LDFLAGS = $(chfn_chsh_ldflags) | |
dcdb349b | 124 | chsh_LDADD = $(LDADD) $(chfn_chsh_ldadd) |
2c8a3e16 KZ |
125 | endif # BUILD_CHFN_CHSH |
126 | ||
127 | ||
ff4c5555 | 128 | if BUILD_SU |
e7614a07 | 129 | bin_PROGRAMS += su |
6edbca18 | 130 | dist_man_MANS += login-utils/su.1 |
ff4c5555 | 131 | su_SOURCES = \ |
ffeb2805 | 132 | login-utils/su.c \ |
cf1a99da KZ |
133 | login-utils/su-common.c \ |
134 | login-utils/su-common.h \ | |
ffeb2805 KZ |
135 | login-utils/logindefs.c \ |
136 | login-utils/logindefs.h | |
ff4c5555 KZ |
137 | su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) |
138 | su_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) | |
bbc5a5ea | 139 | su_LDADD = $(LDADD) libcommon.la -lpam -lpam_misc |
ff4c5555 KZ |
140 | endif |
141 | ||
ffeb2805 | 142 | |
7ec6adb1 | 143 | if BUILD_RUNUSER |
5b68dea9 | 144 | sbin_PROGRAMS += runuser |
7ec6adb1 KZ |
145 | dist_man_MANS += login-utils/runuser.1 |
146 | runuser_SOURCES = \ | |
147 | login-utils/runuser.c \ | |
148 | login-utils/su-common.c \ | |
149 | login-utils/su-common.h \ | |
150 | login-utils/logindefs.c \ | |
151 | login-utils/logindefs.h | |
bbc5a5ea | 152 | runuser_LDADD = $(LDADD) libcommon.la -lpam -lpam_misc |
7ec6adb1 KZ |
153 | endif |
154 | ||
155 | ||
aec9ecbd KZ |
156 | if BUILD_NEWGRP |
157 | usrbin_exec_PROGRAMS += newgrp | |
ffeb2805 KZ |
158 | dist_man_MANS += login-utils/newgrp.1 |
159 | newgrp_SOURCES = login-utils/newgrp.c | |
aec9ecbd KZ |
160 | newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) |
161 | newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) | |
dcdb349b | 162 | newgrp_LDADD = $(LDADD) |
aec9ecbd KZ |
163 | if HAVE_LIBCRYPT |
164 | newgrp_LDADD += -lcrypt | |
165 | endif | |
166 | endif # BUILD_NEWGRP | |
167 | ||
29cc2a55 OO |
168 | if BUILD_LSLOGINS |
169 | usrbin_exec_PROGRAMS += lslogins | |
170 | dist_man_MANS += login-utils/lslogins.1 | |
171 | lslogins_SOURCES = \ | |
172 | login-utils/lslogins.c \ | |
173 | login-utils/logindefs.c \ | |
174 | login-utils/logindefs.h | |
175 | lslogins_LDADD = $(LDADD) libcommon.la libsmartcols.la | |
176 | lslogins_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) | |
177 | if HAVE_SELINUX | |
178 | lslogins_LDADD += -lselinux | |
179 | endif | |
f37b357b KZ |
180 | if HAVE_SYSTEMD |
181 | lslogins_LDADD += $(SYSTEMD_LIBS) $(SYSTEMD_JOURNAL_LIBS) | |
182 | lslogins_CFLAGS += $(SYSTEMD_CFLAGS) $(SYSTEMD_JOURNAL_CFLAGS) | |
183 | endif | |
29cc2a55 | 184 | endif # BUILD_LSLOGINS |
ff4c5555 | 185 | |
cc76731e KZ |
186 | if BUILD_VIPW |
187 | usrsbin_exec_PROGRAMS += vipw | |
ffeb2805 KZ |
188 | dist_man_MANS += \ |
189 | login-utils/vigr.8 \ | |
190 | login-utils/vipw.8 | |
f06b4328 | 191 | vipw_SOURCES = \ |
ffeb2805 | 192 | login-utils/vipw.c \ |
d77ab74a | 193 | login-utils/setpwnam.h |
dcdb349b | 194 | vipw_LDADD = $(LDADD) libcommon.la |
48d7b13a | 195 | if HAVE_SELINUX |
48d7b13a KZ |
196 | vipw_LDADD += -lselinux |
197 | endif | |
ffeb2805 KZ |
198 | install-exec-hook-vipw:: |
199 | cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr | |
200 | ||
201 | INSTALL_EXEC_HOOKS += install-exec-hook-vipw | |
cc76731e | 202 | endif # BUILD_VIPW |
48d7b13a | 203 | |
48d7b13a | 204 | |
922e6775 | 205 | check_PROGRAMS += \ |
ffeb2805 KZ |
206 | test_islocal \ |
207 | test_logindefs | |
208 | ||
209 | test_islocal_SOURCES = login-utils/islocal.c | |
c293a7e8 | 210 | test_islocal_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS) |
c82d9c97 | 211 | |
ffeb2805 KZ |
212 | test_logindefs_SOURCES = \ |
213 | login-utils/logindefs.c \ | |
214 | login-utils/logindefs.h | |
c82d9c97 | 215 | test_logindefs_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS) |
d07dc5e4 KZ |
216 | |
217 | ||
218 | install-exec-hook: | |
219 | if BUILD_SU | |
220 | if MAKEINSTALL_DO_SETUID | |
221 | chmod 4755 $(DESTDIR)$(bindir)/su | |
222 | endif | |
223 | endif | |
224 | if BUILD_VIPW | |
225 | cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr | |
226 | endif |