A chown-like operations are unexpected when you execute "make install"
as non-root user. For example RPM defines owner+permissions in .spec
file -- you needn't to use root account to create useful RPM package.
Signed-off-by: Karel Zak <kzak@redhat.com>
AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
fi
+AC_ARG_ENABLE([makeinstall-chown],
+ AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
+ [], enable_makeinstall_chown=yes
+)
+AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test x$enable_makeinstall_chown = xyes)
+
AC_ARG_VAR([SUID_CFLAGS],
[CFLAGS used for binaries which are usually with the suid bit])
simpleinit_LDADD = -lcrypt
endif
-endif
+endif
if BUILD_LAST
usrbinexec_PROGRAMS += last
endif
if BUILD_WALL
-
usrbinexec_PROGRAMS += wall
wall_SOURCES = wall.c ttymsg.c ttymsg.h
man_MANS += wall.1
if USE_TTY_GROUP
+if MAKEINSTALL_DO_CHOWN
install-exec-hook::
chgrp tty $(DESTDIR)$(usrbinexecdir)/wall
chmod g+s $(DESTDIR)$(usrbinexecdir)/wall
endif
-
+endif
endif
if BUILD_INIT
write_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
if USE_TTY_GROUP
+if MAKEINSTALL_DO_CHOWN
install-exec-hook::
chgrp tty $(DESTDIR)$(usrbinexecdir)/write
chmod g+s $(DESTDIR)$(usrbinexecdir)/write
endif
-
+endif
endif
noinst_PROGRAMS = cal_test