From: Karel Zak Date: Mon, 12 Mar 2012 14:16:09 +0000 (+0100) Subject: build-sys: add --diable-sulogin (enabled by default) X-Git-Tag: v2.22-rc1~675 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de2174895aa2870610b2495f985dc858a3a15b92;p=thirdparty%2Futil-linux.git build-sys: add --diable-sulogin (enabled by default) Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index 0348506442..4d3da7d7b4 100644 --- a/configure.ac +++ b/configure.ac @@ -760,6 +760,14 @@ UL_REQUIRES_BUILD([mountpoint], [libmount]) AM_CONDITIONAL(BUILD_MOUNTPOINT, test "x$build_mountpoint" = xyes) +AC_ARG_ENABLE([sulogin], + AS_HELP_STRING([--disable-sulogin], [do not build sulogin]), + [], enable_sulogin=yes +) +UL_BUILD_INIT([sulogin]) +AM_CONDITIONAL(BUILD_SULOGIN, test "x$build_sulogin" = xyes) + + AC_ARG_ENABLE([fallocate], AS_HELP_STRING([--disable-fallocate], [do not build fallocate]), [], enable_fallocate=check @@ -986,7 +994,7 @@ AM_CONDITIONAL(BUILD_RESET, test "x$build_reset" = xyes) AC_ARG_ENABLE([login-utils], - AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, sulogin, newgrp, vipw]), + AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, newgrp, vipw]), [], enable_login_utils=no ) UL_BUILD_INIT([login_utils]) diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am index 9b55b1b1de..11f2b07d10 100644 --- a/login-utils/Makefile.am +++ b/login-utils/Makefile.am @@ -11,10 +11,22 @@ usrbin_exec_PROGRAMS += last dist_man_MANS += last.1 endif -if BUILD_LOGIN_UTILS +if BUILD_SULOGIN +sbin_PROGRAMS += sulogin +dist_man_MANS += sulogin.8 +sulogin_SOURCES = sulogin.c $(top_srcdir)/lib/strutils.c +sulogin_LDADD = +if HAVE_LIBCRYPT +sulogin_LDADD += -lcrypt +endif +if HAVE_SELINUX +sulogin_LDADD += -lselinux +endif +endif # BUILD_SULOGIN + +if BUILD_LOGIN_UTILS bin_PROGRAMS += login -sbin_PROGRAMS += sulogin usrbin_exec_PROGRAMS += \ chfn \ chsh \ @@ -27,8 +39,7 @@ dist_man_MANS += \ login.1 \ newgrp.1 \ vigr.8 \ - vipw.8 \ - sulogin.8 + vipw.8 # login, chfn and chsh libs login_ldadd_common = @@ -50,9 +61,6 @@ login_SOURCES = \ logindefs.c \ logindefs.h \ $(top_srcdir)/lib/setproctitle.c -sulogin_SOURCES = \ - sulogin.c \ - $(top_srcdir)/lib/strutils.c vipw_SOURCES = \ vipw.c \ setpwnam.h @@ -62,7 +70,6 @@ chsh_LDADD = $(login_ldadd_common) login_LDADD = $(login_ldadd_common) newgrp_LDADD = vipw_LDADD = -sulogin_LDADD = chfn_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) chsh_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) @@ -76,7 +83,6 @@ login_ldadd_common += -lpam -lpam_misc if HAVE_LIBCRYPT newgrp_LDADD += -lcrypt -sulogin_LDADD += -lcrypt endif if HAVE_AUDIT @@ -88,7 +94,6 @@ chfn_SOURCES += selinux_utils.c selinux_utils.h chsh_SOURCES += selinux_utils.c selinux_utils.h vipw_LDADD += -lselinux login_ldadd_common += -lselinux -sulogin_LDADD += -lselinux endif