summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2012-03-12 15:16:09 +0100
committerKarel Zak2012-03-12 15:16:09 +0100
commitde2174895aa2870610b2495f985dc858a3a15b92 (patch)
treea63a5b2f14c42de5b95295e931751592351e6a5c
parentbuild-sys: note sulogin in configure help (diff)
downloadkernel-qcow2-util-linux-de2174895aa2870610b2495f985dc858a3a15b92.tar.gz
kernel-qcow2-util-linux-de2174895aa2870610b2495f985dc858a3a15b92.tar.xz
kernel-qcow2-util-linux-de2174895aa2870610b2495f985dc858a3a15b92.zip
build-sys: add --diable-sulogin (enabled by default)
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--configure.ac10
-rw-r--r--login-utils/Makefile.am25
2 files changed, 24 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 034850644..4d3da7d7b 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 9b55b1b1d..11f2b07d1 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