]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: add --disable-login
authorKarel Zak <kzak@redhat.com>
Tue, 29 May 2012 12:14:38 +0000 (14:14 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 29 May 2012 12:17:05 +0000 (14:17 +0200)
... to implement fine-grained control on what is built from
login-utils.

Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
login-utils/Makefile.am

index cd8fa4efd669b543846bff1c78095a48404818e9..83d4c6d4b8acbd1d9c741617eaee223b233e6dbf 100644 (file)
@@ -777,14 +777,6 @@ 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
@@ -1027,7 +1019,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, newgrp, vipw]),
+  AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, newgrp, vipw]),
   [], enable_login_utils=no
 )
 UL_BUILD_INIT([login_utils])
@@ -1035,6 +1027,22 @@ 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([login],
+  AS_HELP_STRING([--disable-login], [do not build login]),
+  [], enable_login=yes
+)
+UL_BUILD_INIT([login])
+UL_REQUIRES_HAVE([login], [security_pam_misc_h], [PAM header file])
+AM_CONDITIONAL(BUILD_LOGIN, test "x$build_login" = 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([schedutils],
   AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
index 773680ad823600f55225ab9af858c03d7188e8b1..4d1bf53bd4887717922e0bf60a55b89c5f71c74d 100644 (file)
@@ -25,10 +25,27 @@ endif
 endif # BUILD_SULOGIN
 
 
+if BUILD_LOGIN
+bin_PROGRAMS += login
+dist_man_MANS += login.1
+login_SOURCES = \
+       login.c \
+       logindefs.c \
+       logindefs.h \
+       $(top_srcdir)/lib/fileutils.c \
+       $(top_srcdir)/lib/setproctitle.c
+login_LDADD = -lpam -lpam_misc
+if HAVE_AUDIT
+login_LDADD += -laudit
+endif
+if HAVE_SELINUX
+login_LDADD += -lselinux
+endif
+endif # BUILD_LOGIN
+
+
 if BUILD_LOGIN_UTILS
-bin_PROGRAMS += \
-       login \
-       su
+bin_PROGRAMS += su
 usrbin_exec_PROGRAMS += \
        chfn \
        chsh \
@@ -38,7 +55,6 @@ usrsbin_exec_PROGRAMS += \
 dist_man_MANS += \
        chfn.1 \
        chsh.1 \
-       login.1 \
        newgrp.1 \
        vigr.8 \
        vipw.8
@@ -59,12 +75,6 @@ chfn_chsh_common = \
        setpwnam.h \
        $(top_srcdir)/lib/env.c \
        $(top_srcdir)/lib/fileutils.c
-login_SOURCES = \
-       login.c \
-       logindefs.c \
-       logindefs.h \
-       $(top_srcdir)/lib/fileutils.c \
-       $(top_srcdir)/lib/setproctitle.c
 vipw_SOURCES = \
        vipw.c \
        setpwnam.h \
@@ -76,7 +86,6 @@ su_SOURCES = \
 
 chfn_LDADD = $(login_ldadd_common)
 chsh_LDADD = $(login_ldadd_common)
-login_LDADD = $(login_ldadd_common)
 su_LDADD = $(login_ldadd_common)
 newgrp_LDADD =
 vipw_LDADD =
@@ -97,9 +106,6 @@ if HAVE_LIBCRYPT
 newgrp_LDADD += -lcrypt
 endif
 
-if HAVE_AUDIT
-login_LDADD += -laudit
-endif
 
 if HAVE_SELINUX
 chfn_SOURCES += selinux_utils.c selinux_utils.h