]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: add --diable-sulogin (enabled by default)
authorKarel Zak <kzak@redhat.com>
Mon, 12 Mar 2012 14:16:09 +0000 (15:16 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Mar 2012 14:16:09 +0000 (15:16 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
login-utils/Makefile.am

index 0348506442c64bc693897c3b25242d23e737d226..4d3da7d7b45cfb6383cd861c042426d5dc5b3f15 100644 (file)
@@ -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])
index 9b55b1b1ded3f0d7e609e18e0beffc42b678b8e8..11f2b07d10bb9844f1f3b26a6e3bf201366d283c 100644 (file)
@@ -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