Re: autoreconf breaks shell functions in configure.ac

2018-01-15 Thread Eric Blake
On 01/14/2018 02:23 AM, Mike Frysinger wrote: > On 13 Jan 2018 21:42, Yuri wrote: >> I added this function to configure.ac: >> >> log2() { >>   x=0 >>   y=$(($1>>1)) >>   while [ $y -gt 0 ]; do You need to use additional [] around any literal [] that you want in your output, and you have also d

Re: autoreconf breaks shell functions in configure.ac

2018-01-14 Thread Mike Frysinger
On 13 Jan 2018 21:42, Yuri wrote: > I added this function to configure.ac: > > log2() { >   x=0 >   y=$(($1>>1)) >   while [ $y -gt 0 ]; do >     x=$((x+1)) >     y=$((y>>1)) >   done >   echo $x > } > > > After autoreconf, this function looks like this: > > log2() { >   x=0 >   y=$(($