diff options
author | Karel Zak <kzak@redhat.com> | 2012-05-29 14:41:01 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2012-05-29 14:41:01 +0200 |
commit | 2c8a3e168a5c24088c0efbe73f6452ad85923335 (patch) | |
tree | 6a61e9ed5a50c0a05e44c133fea617f795be255b | |
parent | e7614a0780cd0591eca30116563461a18cb7ba49 (diff) | |
download | util-linux-2c8a3e168a5c24088c0efbe73f6452ad85923335.tar.gz |
build-sys: add --enable-chfn-chsh
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | login-utils/Makefile.am | 60 |
2 files changed, 45 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac index 83d4c6d4..03832a25 100644 --- a/configure.ac +++ b/configure.ac @@ -636,6 +636,7 @@ if test "x$enable_most_builds" = xyes; then enable_mesg=yes enable_reset=yes enable_login_utils=yes + enable_chfn_chsh=yes enable_write=yes fi @@ -1019,7 +1020,7 @@ AM_CONDITIONAL(BUILD_RESET, test "x$build_reset" = xyes) AC_ARG_ENABLE([login-utils], - AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, newgrp, vipw]), + AS_HELP_STRING([--enable-login-utils], [build newgrp, vipw]), [], enable_login_utils=no ) UL_BUILD_INIT([login_utils]) @@ -1027,6 +1028,15 @@ UL_REQUIRES_HAVE([login_utils], [security_pam_misc_h], [PAM header file]) AM_CONDITIONAL(BUILD_LOGIN_UTILS, test "x$build_login_utils" = xyes) +AC_ARG_ENABLE([chfn-chsh], + AS_HELP_STRING([--enable-chfn-chsh], [build chfn and chsh]), + [], enable_chfn_chsh=no +) +UL_BUILD_INIT([chfn_chsh]) +UL_REQUIRES_HAVE([chfn_chsh], [security_pam_misc_h], [PAM header file]) +AM_CONDITIONAL(BUILD_CHFN_CHSH, test "x$build_chfn_chsh" = xyes) + + AC_ARG_ENABLE([login], AS_HELP_STRING([--disable-login], [do not build login]), [], enable_login=yes diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am index 4d1bf53b..0e441b4d 100644 --- a/login-utils/Makefile.am +++ b/login-utils/Makefile.am @@ -44,37 +44,53 @@ endif endif # BUILD_LOGIN +if BUILD_CHFN_CHSH +usrbin_exec_PROGRAMS += chfn chsh +dist_man_MANS += chfn.1 chsh.1 + +chfn_chsh_sources = \ + islocal.c \ + islocal.h \ + setpwnam.c \ + setpwnam.h \ + $(top_srcdir)/lib/env.c \ + $(top_srcdir)/lib/fileutils.c + +chfn_chsh_cflags = $(SUID_CFLAGS) $(AM_CFLAGS) +chfn_chsh_ldflags = $(SUID_LDFLAGS) $(AM_LDFLAGS) +chfn_chsh_ldadd = -lpam -lpam_misc + +if HAVE_SELINUX +chfn_chsh_sources += selinux_utils.c selinux_utils.h +chfn_chsh_ldadd += -lselinux +endif + +chfn_SOURCES = chfn.c $(chfn_chsh_sources) +chfn_CFLAGS = $(chfn_chsh_cflags) +chfn_LDFLAGS = $(chfn_chsh_ldflags) +chfn_LDADD = $(chfn_chsh_ldadd) + +chsh_SOURCES = chfn.c $(chfn_chsh_sources) +chsh_CFLAGS = $(chfn_chsh_cflags) +chsh_LDFLAGS = $(chfn_chsh_ldflags) +chsh_LDADD = $(chfn_chsh_ldadd) +endif # BUILD_CHFN_CHSH + + if BUILD_LOGIN_UTILS bin_PROGRAMS += su usrbin_exec_PROGRAMS += \ - chfn \ - chsh \ newgrp usrsbin_exec_PROGRAMS += \ vipw dist_man_MANS += \ - chfn.1 \ - chsh.1 \ newgrp.1 \ vigr.8 \ vipw.8 -# login, su, chfn and chsh libs +# su login_ldadd_common = -chfn_SOURCES = \ - chfn.c \ - $(chfn_chsh_common) -chsh_SOURCES = \ - chsh.c \ - $(chfn_chsh_common) -chfn_chsh_common = \ - islocal.c \ - islocal.h \ - setpwnam.c \ - setpwnam.h \ - $(top_srcdir)/lib/env.c \ - $(top_srcdir)/lib/fileutils.c vipw_SOURCES = \ vipw.c \ setpwnam.h \ @@ -84,19 +100,13 @@ su_SOURCES = \ logindefs.c \ logindefs.h -chfn_LDADD = $(login_ldadd_common) -chsh_LDADD = $(login_ldadd_common) su_LDADD = $(login_ldadd_common) newgrp_LDADD = vipw_LDADD = -chfn_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -chsh_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -chfn_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) -chsh_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) su_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) @@ -108,8 +118,6 @@ endif if HAVE_SELINUX -chfn_SOURCES += selinux_utils.c selinux_utils.h -chsh_SOURCES += selinux_utils.c selinux_utils.h vipw_LDADD += -lselinux login_ldadd_common += -lselinux endif |