How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-03 Thread Tao Wang
Hi, I'm new to autotools, I want to generate 'foobar.h' from 'configure'. I created 'src/foobar.h.in' with following content: = #define PATH_PREFIX"@prefix@" #define PATH_DATADIR"@datadir@" = And put 'src/foobar.h' in AC_CONFIG_FILES() in 'configure.ac'. After I run 'au

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Tim Rice
On Tue, 3 Aug 2010, Eric Blake wrote: > On 08/03/2010 04:37 PM, Tim Rice wrote: > >>> What version of ksh did you test on? > >> My testing was with ksh93: > >> Version M 1993-12-28 o+ > >> > >> So David Korn introduced a regression sometime since ksh88. > > > > Actually it would be post Version M

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Eric Blake
On 08/03/2010 04:37 PM, Tim Rice wrote: >>> What version of ksh did you test on? >> >> My testing was with ksh93: >> >> Version M 1993-12-28 o+ >> >> So David Korn introduced a regression sometime since ksh88. > > Actually it would be post Version M-12/28/93e > You sniped out the part that said th

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Tim Rice
On Tue, 3 Aug 2010, Eric Blake wrote: > On 08/03/2010 03:42 PM, Tim Rice wrote: > >> ksh is the only shell that requires a space between the ) and {, even > >> though the ) is a metacharacter and should not need trailing space (even > >> Solaris /bin/sh got that right). > > > > Hmm, on my UnixWar

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Eric Blake
On 08/03/2010 03:42 PM, Tim Rice wrote: >> ksh is the only shell that requires a space between the ) and {, even >> though the ) is a metacharacter and should not need trailing space (even >> Solaris /bin/sh got that right). > > Hmm, on my UnixWare machine > > $ ksh -c 'a(){ echo hi; }; a' > hi >

Re: Arrays in configure.ac

2010-08-03 Thread Sam Silla
On Sun, Aug 1, 2010 at 9:38 AM, Matěj Týč wrote: > On Thu, 2010-07-08 at 21:48 -0700, Sam Silla wrote: > > Hello, > > > > I would like to create an array of values to use in configure.ac and am > > unsure what the best way to accomplish this is. I was wondering if > Autoconf > > comes with native

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Tim Rice
[trimming CC] On Tue, 3 Aug 2010, Eric Blake wrote: > [adding autoconf to document some shell bugs] [snip] > And meanwhile, I found a ksh93 parsing bug (don't know where to report > that): > > $ ksh -c 'a(){ echo hi; }; a' > ksh: syntax error at line 1: `}' unexpected > $ ksh -c 'a() { echo hi;

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Eric Blake
[trimming the cc a bit] On 08/03/2010 03:21 PM, Mikael Magnusson wrote: >> But it is _also_ a bug in zsh; adding zsh-workers accordingly. >> >> $ zsh -cvx 'f=" val" e=; echo "$e"$f' >> +zsh:1> f=' val' e='' >> +zsh:1> echo ' val' >> val >> >> Oops - zsh only passed one argument to echo, with a le

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Eric Blake
[adding autoconf to document some shell bugs] On 08/03/2010 02:32 PM, Ralf Wildenhues wrote: > Interesting shell unportability: > > $ bash -c 'f=" val" e=; echo "$e"$f' > val > $ ksh -c 'f=" val" e=; echo "$e"$f' > val > > ksh93, dash, zsh all do it like ksh. Is that a bug in bash? Yes; addin