> It's still not perfect.  This file is failing:
> 
> AS_INIT
> foo=bar
> AS_VAR_PUSHDEF([tmp], [foo])
> AS_VAR_IF(tmp, [bar], [echo yes], [echo no])
> AS_VAR_POPDEF([tmp])
> 
> because it is expanding _AS_TR_SH_PREPARE in the middle of AS_VAR_IF
> rather than hoisting it into M4SH-INIT right after _AS_CR_PREPARE:

That's related to tmp being underquoted, see the following even more
reduced testcase

AS_INIT
m4_defun([AS_DOIT], [: $1])
m4_define([tmp], [AS_TR_SH(foo)])
AS_DOIT(tmp)

=> : # Sed expression to map a string onto a valid variable name.
   as_tr_sh="eval sed 'y%*+%pp%;s%^_$as_cr_alnum%_%g'"

   foo


AS_INIT
m4_defun([AS_DOIT], [: $1])
m4_define([tmp], [AS_TR_SH(foo)])
AS_DOIT([tmp])

=> # Sed expression to map a string onto a valid variable name.
   as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"

   : foo

Paolo


Reply via email to