)
AM_CONDITIONAL([MAKEINSTALL_DO_CHOWN], [test "x$enable_makeinstall_chown" = xyes])
+
AC_ARG_ENABLE([makeinstall-setuid],
AS_HELP_STRING([--disable-makeinstall-setuid], [do not do setuid chmod operations during "make install"]),
[], [enable_makeinstall_setuid=yes]
AM_CONDITIONAL([MAKEINSTALL_DO_SETUID], [test "x$enable_makeinstall_setuid" = xyes])
+AC_ARG_ENABLE([colors-default],
+ AS_HELP_STRING([--disable-colors-default], [do not colorize output from utils by default]),
+ [], [enable_colors_default=yes]
+)
+AS_IF([test "x$enable_colors_default" = xyes], [
+ AC_DEFINE([USE_COLORS_BY_DEFAULT], [1], [Enables colorized output from utils by default])
+])
+
+
AC_ARG_VAR([SUID_CFLAGS],
[CFLAGS used for binaries which are usually with the suid bit])
AC_ARG_VAR([SUID_LDFLAGS],
#include "debug.h"
+/*
+ * Default behavior, maybe be override by terminal-colors.d/{enable,disable}.
+ */
+#ifdef USE_COLORS_BY_DEFAULT
+# define UL_COLORMODE_DEFAULT UL_COLORMODE_AUTO /* check isatty() */
+#else
+# define UL_COLORMODE_DEFAULT UL_COLORMODE_NEVER /* no colors by default */
+#endif
+
/*
* terminal-colors.d debug stuff
*/
if (mode == UL_COLORMODE_UNDEF && (atty = isatty(STDOUT_FILENO))) {
int rc = colors_read_configuration(cc);
if (rc)
- cc->mode = UL_COLORMODE_AUTO;
+ cc->mode = UL_COLORMODE_DEFAULT;
else {
/* evaluate scores */
cc->scores[UL_COLORFILE_ENABLE])
cc->mode = UL_COLORMODE_NEVER;
else
- cc->mode = UL_COLORMODE_AUTO;
+ cc->mode = UL_COLORMODE_DEFAULT;
atexit(colors_deinit);
}