summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-05-24 12:51:21 -0500
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-05-24 18:57:30 -0500
commit1e4d06f1dc9fd53dbc790bc7fc71f12021b051ec (patch)
tree1b06771fb261f8c436ed8306af2c9b5676f0e08f /m4
parent5f1b2717eb52ca84993b2df61742c9e09d6bceec (diff)
downloadgroff-git-1e4d06f1dc9fd53dbc790bc7fc71f12021b051ec.tar.gz
m4/groff.m4: Improve shell code portability.
* m4/groff.m4 (GROFF_PROG_YACC, GROFF_URW_FONTS_CHECK, GROFF_WITH_COMPATIBILITY_WRAPPERS, GROFF_UCHARDET_NOTICE): Improve shell code portability. Per the GNU Autoconf manual, "The -a, -o, '(', and ')' operands are not present in all implementations, and have been marked obsolete by Posix 2008. ...portable uses of test should never have more than four arguments, and scripts should use shell constructs like '&&' and '||' instead."
Diffstat (limited to 'm4')
-rw-r--r--m4/groff.m414
1 files changed, 7 insertions, 7 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4
index 5ad628038..36b2078ac 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -72,7 +72,7 @@ AC_DEFUN([GROFF_PRINT], [
AC_DEFUN([GROFF_PROG_YACC], [
AC_CHECK_PROGS([YACC], [byacc 'bison -y' yacc], [missing])
- if test "$YACC" = missing -a -d "$srcdir"/.git
+ if test "$YACC" = missing && test -d "$srcdir"/.git
then
AC_MSG_ERROR([could not find 'byacc', 'bison', or 'yacc'], 1)
fi
@@ -289,7 +289,7 @@ AC_DEFUN([GROFF_URW_FONTS_CHECK], [
AC_REQUIRE([GROFF_AWK_PATH])
AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
groff_have_urw_fonts=no
- if test "$AWK" != missing -a "$GHOSTSCRIPT" != missing
+ if test "$AWK" != missing && test "$GHOSTSCRIPT" != missing
then
AC_MSG_CHECKING([for URW fonts in Type 1/PFB format])
_list_paths=`$GHOSTSCRIPT -h | $AWK 'BEGIN { found = 0 } /Search path:/ { found = 1 } /^[ ]*\// { print $'0' }'| tr : ' '`
@@ -1177,10 +1177,10 @@ AC_DEFUN([GROFF_WITH_COMPATIBILITY_WRAPPERS],
[compatibility_wrappers="$withval"],
[compatibility_wrappers="check"])
- if test "$compatibility_wrappers" != check -a \
- "$compatibility_wrappers" != yes -a \
- "$compatibility_wrappers" != no -a \
- "$compatibility_wrappers" != manual
+ if test "$compatibility_wrappers" != check \
+ && test "$compatibility_wrappers" != yes \
+ && test "$compatibility_wrappers" != no \
+ && test "$compatibility_wrappers" != manual
then
AC_MSG_WARN([Invalid '--with-compatibility-wrappers' argument: '$compatibility_wrappers' - assuming 'check' requested.])
compatibility_wrappers="check"
@@ -1707,7 +1707,7 @@ less functional])
])
AC_DEFUN([GROFF_UCHARDET_NOTICE], [
- if test "$groff_have_uchardet" = no -a "$with_uchardet" != no
+ if test "$groff_have_uchardet" = no && test "$with_uchardet" != no
then
AC_MSG_NOTICE([The uchardet library was not found.