Skip to content

Commit e0e6d32

Browse files
authored
Autotools: Sync CS in PHP_PROG_AWK (php#15772)
- AS_* macros used
1 parent 4183292 commit e0e6d32

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

build/php.m4

+17-21
Original file line numberDiff line numberDiff line change
@@ -1622,27 +1622,23 @@ dnl
16221622
dnl Some vendors force mawk before gawk; mawk is broken so we don't like that.
16231623
dnl
16241624
AC_DEFUN([PHP_PROG_AWK], [
1625-
AC_CHECK_PROGS([AWK], [gawk nawk awk mawk], [bork], [/usr/xpg4/bin/:$PATH])
1626-
case "$AWK" in
1627-
*mawk)
1628-
AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
1629-
;;
1630-
*gawk)
1631-
;;
1632-
bork)
1633-
AC_MSG_ERROR([Could not find awk; Install GNU awk])
1634-
;;
1635-
*)
1636-
AC_MSG_CHECKING([if $AWK is broken])
1637-
if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
1638-
AC_MSG_RESULT([yes])
1639-
AC_MSG_ERROR([You should install GNU awk])
1640-
else
1641-
AC_MSG_RESULT([no])
1642-
fi
1643-
;;
1644-
esac
1645-
PHP_SUBST([AWK])
1625+
AC_CHECK_PROGS([AWK], [gawk nawk awk mawk], [bork], [/usr/xpg4/bin/:$PATH])
1626+
AS_CASE([$AWK],
1627+
[*mawk],
1628+
[AC_MSG_WARN(m4_text_wrap([
1629+
mawk is known to have problems on some systems. You should install GNU awk
1630+
]))],
1631+
[*gawk], [],
1632+
[bork], [AC_MSG_ERROR([Could not find awk; Install GNU awk])],
1633+
[
1634+
AC_MSG_CHECKING([if $AWK is broken])
1635+
AS_IF([! $AWK 'function foo() {}' >/dev/null 2>&1], [
1636+
AC_MSG_RESULT([yes])
1637+
AC_MSG_ERROR([You should install GNU awk])
1638+
],
1639+
[AC_MSG_RESULT([no])])
1640+
])
1641+
PHP_SUBST([AWK])
16461642
])
16471643

16481644
dnl

0 commit comments

Comments
 (0)