commit 30016a7e1985cfcc826e65a8c80f5441c5e6d0d0
parent e8abbc70456648b02fe22f08d676d8218e7e852a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 17 Sep 2020 09:49:35 +0200
tweaks: harmonize the style of error messages and warnings in ./configure
Diffstat:
M | configure.ac | | | 53 | +++++++++++++++++++++++++++++++++-------------------- |
1 file changed, 33 insertions(+), 20 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -73,14 +73,14 @@ dnl Checks for pkg-config and gettext when building from git.
if test x$from_git = xyes; then
if test ! -f $(aclocal --print-ac-dir)/pkg.m4; then
AC_MSG_ERROR([
- *** The pkg.m4 macros are missing. ***
- *** The pkg-config package needs to be installed when building from git. ***
- *** After fixing this problem, rerun ./autogen.sh. ***])
+ *** The pkg.m4 macros are missing.
+ *** The pkg-config package needs to be installed when building from git.
+ *** After fixing this problem, rerun ./autogen.sh.])
fi
if test "$ac_cv_path_MSGFMT" = ":"; then
AC_MSG_ERROR([
- *** The msgfmt program is missing. ***
- *** The gettext package needs to be installed when building from git. ***])
+ *** The msgfmt program is missing.
+ *** The gettext package needs to be installed when building from git.])
fi
fi
@@ -92,7 +92,8 @@ dnl Checks for options.
if test "x$with_slang" = xyes; then
if test "x$enable_tiny" != xyes; then
- AC_MSG_ERROR([--with-slang is supported only together with --enable-tiny])
+ AC_MSG_ERROR([
+ *** --with-slang is supported only together with --enable-tiny])
fi
fi
@@ -112,7 +113,8 @@ AS_HELP_STRING([--disable-color], [Disable color and syntax highlighting]))
if test "x$enable_tiny" = xyes; then
if test "x$enable_color" = xyes; then
if test "x$enable_nanorc" != xyes; then
- AC_MSG_ERROR([--enable-color needs --enable-nanorc to work])
+ AC_MSG_ERROR([
+ *** --enable-color needs --enable-nanorc to work])
fi
else
enable_color=no
@@ -120,7 +122,8 @@ if test "x$enable_tiny" = xyes; then
fi
if test "x$enable_nanorc" = xno; then
if test "x$enable_color" = xyes; then
- AC_MSG_ERROR([--enable-color cannot work with --disable-nanorc])
+ AC_MSG_ERROR([
+ *** --enable-color cannot work with --disable-nanorc])
else
# Disabling nanorc silently disables color support.
enable_color=no
@@ -135,7 +138,8 @@ AC_ARG_ENABLE(comment,
AS_HELP_STRING([--disable-comment], [Disable the comment/uncomment function]))
if test "x$enable_tiny" = xyes; then
if test "x$enable_comment" = xyes; then
- AC_MSG_ERROR([--enable-comment cannot work with --enable-tiny])
+ AC_MSG_ERROR([
+ *** --enable-comment cannot work with --enable-tiny])
else
enable_comment=no
fi
@@ -160,7 +164,8 @@ AS_HELP_STRING([--disable-help], [Disable the built-in help texts]))
if test "x$enable_tiny" = xyes; then
if test "x$enable_help" = xyes; then
if test "x$enable_multibuffer" != xyes; then
- AC_MSG_ERROR([--enable-help needs --enable-multibuffer to work])
+ AC_MSG_ERROR([
+ *** --enable-help needs --enable-multibuffer to work])
fi
else
enable_help=no
@@ -168,7 +173,8 @@ if test "x$enable_tiny" = xyes; then
fi
if test "x$enable_multibuffer" = xno; then
if test "x$enable_help" = xyes; then
- AC_MSG_ERROR([--enable-help cannot work with --disable-multibuffer])
+ AC_MSG_ERROR([
+ *** --enable-help cannot work with --disable-multibuffer])
else
# Disabling multibuffer silently disables the help texts.
enable_help=no
@@ -205,11 +211,13 @@ AS_HELP_STRING([--disable-libmagic], [Disable detection of file types via libmag
if test "x$enable_libmagic" = xyes; then
if test "x$enable_tiny" = xyes; then
if test "x$enable_color" != xyes; then
- AC_MSG_ERROR([--enable-libmagic needs --enable-color and --enable-nanorc to work])
+ AC_MSG_ERROR([
+ *** --enable-libmagic needs --enable-color and --enable-nanorc to work])
fi
fi
if test "x$enable_color" = xno; then
- AC_MSG_ERROR([--enable-libmagic cannot work with --disable-color nor --disable-nanorc])
+ AC_MSG_ERROR([
+ *** --enable-libmagic cannot work with --disable-color nor --disable-nanorc])
fi
fi
@@ -295,7 +303,8 @@ AC_ARG_ENABLE(wordcomp,
AS_HELP_STRING([--disable-wordcomp], [Disable the word-completion function]))
if test "x$enable_tiny" = xyes; then
if test "x$enable_wordcomp" = xyes; then
- AC_MSG_ERROR([--enable-wordcomp cannot work with --enable-tiny])
+ AC_MSG_ERROR([
+ *** --enable-wordcomp cannot work with --enable-tiny])
else
enable_wordcomp=no
fi
@@ -688,9 +697,12 @@ int main(void)
AC_DEFINE(NEED_XOPEN_SOURCE_EXTENDED, 1, [Define this if you need the _XOPEN_SOURCE_EXTENDED macro for color support.])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(not sure)
- AC_MSG_WARN([*** Couldn't successfully compile basic color test with or without _XOPEN_SOURCE_EXTENDED])
- AC_MSG_WARN([*** This build may not compile. Consider configuring with --disable-color or installing ncurses])),
- AC_MSG_WARN([*** Can't check need for _XOPEN_SOURCE_EXTENDED when cross-compiling]))
+ AC_MSG_WARN([
+ *** Couldn't successfully compile basic color test with or without
+ *** _XOPEN_SOURCE_EXTENDED. This build may not compile. Consider
+ *** configuring with --disable-color or installing ncurses.])),
+ AC_MSG_WARN([
+ *** Can't check need for _XOPEN_SOURCE_EXTENDED when cross-compiling.]))
fi
AC_MSG_CHECKING([whether LINES and COLS can be redefined])
@@ -705,7 +717,8 @@ int main(void)
AC_DEFINE(REDEFINING_MACROS_OK, 1, [Define this if you know your curses library allows LINES and COLS to be redefined to deal with a resizing bug.])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no),
-AC_MSG_WARN([*** Can't check for macro redefinability when cross-compiling]))
+AC_MSG_WARN([
+ *** Can't check for macro redefinability when cross-compiling.]))
AS_IF([test "x$enable_libmagic" != "xno"], [
AC_CHECK_HEADERS([magic.h])
@@ -720,8 +733,8 @@ groff -t -mandoc -Thtml </dev/null >/dev/null
if test $? -ne 0 ; then
AC_MSG_RESULT([no])
AC_MSG_WARN([
- *** Will not generate HTML version of man pages. ***
- *** Consider installing a newer version of groff with HTML support. ***])
+ *** Will not generate HTML version of man pages. Consider
+ *** installing a newer version of groff with HTML support.])
groff_html_support=no
else
AC_MSG_RESULT([yes])