[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: texindex awk syntax error
From: |
Gavin Smith |
Subject: |
Re: texindex awk syntax error |
Date: |
Tue, 25 Oct 2022 10:52:41 +0100 |
On Mon, Oct 24, 2022 at 08:19:50PM +0200, Bruno Haible wrote:
> does not help here, because nawk and mawk don't implement it. But what
> works, is a test whether $prog supports the function syntax: On this
> platform,
>
> gawk 'function foo () {}' 2>/dev/null
> nawk 'function foo () {}' 2>/dev/null
>
> both have exit code 0, whereas
>
> awk 'function foo () {}' 2>/dev/null
>
> has exit code 2.
>
> To implement this, use a variant of AC_CHECK_PROGS that accepts a test
> argument. (AM_PATH_PROG_WITH_TEST from gnulib/m4/progtest.m4 is not the
> right there here, because it searches only for a single program name,
> not multiple ones.)
>
> Bruno
AC_PATH_PROGS_FEATURE_CHECK does the job although it is slightly complicated
to use:
AC_CACHE_CHECK([for awk], [ac_cv_path_TI_AWK],
[AC_PATH_PROGS_FEATURE_CHECK([TI_AWK], [awk gawk mawk nawk],
[[$ac_path_TI_AWK 'function foo () {}' 2>/dev/null \
&& ac_cv_path_TI_AWK=$ac_path_TI_AWK ac_path_TI_AWK_found=:]],
[AC_MSG_ERROR([awk not found])])])
AC_SUBST([TI_AWK], [$ac_cv_path_TI_AWK])
If this is not going to work we can go back to using AC_CHECK_PROGS with
awk at the front of the list as we shouldn't make the program worse for
the sake of Solaris and/or MS-Windows.
- Re: texinfo-6.8.90 pretest on Solaris 11.4, (continued)
- Re: texinfo-6.8.90 pretest on Solaris 11.4, Bruno Haible, 2022/10/23
- texindex awk syntax error, Gavin Smith, 2022/10/23
- Re: texindex awk syntax error, Bruno Haible, 2022/10/23
- Re: texindex awk syntax error, Gavin Smith, 2022/10/23
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Gavin Smith, 2022/10/24
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Gavin Smith, 2022/10/24
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Bruno Haible, 2022/10/24
- Re: texindex awk syntax error,
Gavin Smith <=
- Re: texindex awk syntax error, Bruno Haible, 2022/10/29
Re: texinfo-6.8.90 pretest on mingw, Bruno Haible, 2022/10/22
Re: texinfo-6.8.90 pretest on mingw, Eli Zaretskii, 2022/10/23