On 2022-11-17 9:30 AM, Zack Weinberg wrote:
Or even better, get rid of the AC_EGREP_CPP at the same time
AC_CACHE_CHECK([whether we need to define $1], ac_var,
[AC_PREPROC_IFELSE([[#ifndef $1
#error not defined
#endif]],
[AS_VAR_SET(ac_var,yes)],[AS_VAR_SET(ac_var,no)])])
Correction, this should have been
AC_CACHE_CHECK([whether we need to define $1], ac_var,
[AC_PREPROC_IFELSE([[#ifndef $1
#error not defined
#endif]],
[AS_VAR_SET(ac_var,no)],
[AS_VAR_SET(ac_var,yes)])])
Converting it to AC_PREPROC_IFELSE inverts the sense of the "then" and
"else" clauses.
zw