AC_ARG_WITH(group-name-max-length,
[AC_HELP_STRING([--with-group-name-max-length], [set max group name length @<:@default=16@:>@])],
[with_group_name_max_length=$withval], [with_group_name_max_length=yes])
+AC_ARG_WITH(su,
+ [AC_HELP_STRING([--with-su], [build and install su program and man page @<:@default=yes@:>@])],
+ [with_su=$withval], [with_su=yes])
if test "$with_group_name_max_length" = "no" ; then
with_group_name_max_length=0
[AC_MSG_ERROR([posix_spawn is needed for sssd support])])
fi
+AS_IF([test "$with_su" != "no"], AC_DEFINE(WITH_SU, 1, [Build with su])])
+AM_CONDITIONAL([WITH_SU], [test "x$with_su" != "xno"])
+
dnl Check for some functions in libc first, only if not found check for
dnl other libraries. This should prevent linking libnsl if not really
dnl needed (Linux glibc, Irix), but still link it if needed (Solaris).
echo " sssd support: $with_sssd"
echo " subordinate IDs support: $enable_subids"
echo " use file caps: $with_fcaps"
+echo " install su: $with_su"
echo
# and installation would be much simpler (just two directories,
# $prefix/bin and $prefix/sbin, no install-data hacks...)
-bin_PROGRAMS = groups login su
+bin_PROGRAMS = groups login
sbin_PROGRAMS = nologin
ubin_PROGRAMS = faillog lastlog chage chfn chsh expiry gpasswd newgrp passwd
if ENABLE_SUBIDS
ubin_PROGRAMS += newgidmap newuidmap
endif
+if WITH_SU
+bin_PROGRAMS += su
+endif
usbin_PROGRAMS = \
chgpasswd \
chpasswd \
noinst_PROGRAMS = id sulogin
suidusbins =
-suidbins = su
+suidbins =
suidubins = chage chfn chsh expiry gpasswd newgrp
+if WITH_SU
+suidbins += su
+endif
if !WITH_TCB
suidubins += passwd
endif