From: Karel Zak Date: Tue, 29 May 2012 13:15:38 +0000 (+0200) Subject: build-sys: add --enable-newgrp X-Git-Tag: v2.22-rc1~337 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aec9ecbd6c0e34739d61d23bb4c47f3f080d8de1;p=thirdparty%2Futil-linux.git build-sys: add --enable-newgrp Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index ad10cfd191..c586481fba 100644 --- a/configure.ac +++ b/configure.ac @@ -637,6 +637,7 @@ if test "x$enable_most_builds" = xyes; then enable_reset=yes enable_login_utils=yes enable_chfn_chsh=yes + enable_newgrp=yes enable_write=yes fi @@ -1020,7 +1021,7 @@ AM_CONDITIONAL(BUILD_RESET, test "x$build_reset" = xyes) AC_ARG_ENABLE([login-utils], - AS_HELP_STRING([--enable-login-utils], [build newgrp, vipw]), + AS_HELP_STRING([--enable-login-utils], [build vipw]), [], enable_login_utils=no ) UL_BUILD_INIT([login_utils]) @@ -1028,6 +1029,14 @@ 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([newgrp], + AS_HELP_STRING([--enable-newgrp], [build newgrp]), + [], enable_newgrp=no +) +UL_BUILD_INIT([newgrp]) +AM_CONDITIONAL(BUILD_NEWGRP, test "x$build_newgrp" = xyes) + + AC_ARG_ENABLE([chfn-chsh], AS_HELP_STRING([--enable-chfn-chsh], [build chfn and chsh]), [], enable_chfn_chsh=no diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am index d02a282c42..624ddc3933 100644 --- a/login-utils/Makefile.am +++ b/login-utils/Makefile.am @@ -88,14 +88,22 @@ su_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) su_LDADD = -lpam -lpam_misc endif +if BUILD_NEWGRP +usrbin_exec_PROGRAMS += newgrp +dist_man_MANS += newgrp.1 +newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) +newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) +newgrp_LDADD = +if HAVE_LIBCRYPT +newgrp_LDADD += -lcrypt +endif +endif # BUILD_NEWGRP + if BUILD_LOGIN_UTILS -usrbin_exec_PROGRAMS += \ - newgrp usrsbin_exec_PROGRAMS += \ vipw dist_man_MANS += \ - newgrp.1 \ vigr.8 \ vipw.8 @@ -104,21 +112,12 @@ vipw_SOURCES = \ setpwnam.h \ $(top_srcdir)/lib/fileutils.c -newgrp_LDADD = vipw_LDADD = -newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) - -if HAVE_LIBCRYPT -newgrp_LDADD += -lcrypt -endif - if HAVE_SELINUX vipw_LDADD += -lselinux endif - install-exec-hook:: cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr