]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: add --enable-newgrp
authorKarel Zak <kzak@redhat.com>
Tue, 29 May 2012 13:15:38 +0000 (15:15 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 29 May 2012 13:15:38 +0000 (15:15 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
login-utils/Makefile.am

index ad10cfd19147d7940355fdefa9f2937d38962f7d..c586481fba1fd628171685e3f5bec44dad6d6807 100644 (file)
@@ -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
index d02a282c42a3dbe8ae046857e80d7f89edd30ce8..624ddc39330e2e0a23caa089900605f5361e3769 100644 (file)
@@ -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