AS_IF optimization (was: AC_TRY_COMPILE() annoyances with 2.63b)

2009-04-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Andreas Schwab on 4/7/2009 3:47 AM: >>From the autoconf manual: > > There are shells that do not reset the exit status from an `if': > > $ if (exit 42); then true; fi; echo $? > 42 > > whereas a proper shel

Re: AC_TRY_COMPILE() annoyances with 2.63b

2009-04-07 Thread Andreas Schwab
Eric Blake writes: > I'm also leaning towards omitting the else if $1 is provably blank, > otherwise providing the : in case non-blank $1 ultimately expands to a > blank (unless someone finds a shell where 'if false ; then :; fi; echo $?' > fails to output 0). >From the autoconf manual: Th

Re: Feature request for autoconf / configure

2009-04-07 Thread Eric Blake
According to Alastair McKinstry on 3/28/2009 10:06 AM: > We use 'modules' to change our software environment on our system: > offering multiple versions of compilers, etc. > It is useful to track the software environment in the config.log when > software is built in this environment. To do this, >

Re: AS_IF optimization (was: AC_TRY_COMPILE() annoyances with 2.63b)

2009-04-07 Thread Andreas Schwab
Eric Blake writes: > According to Andreas Schwab on 4/7/2009 3:47 AM: >>>From the autoconf manual: >> >> There are shells that do not reset the exit status from an `if': >> >> $ if (exit 42); then true; fi; echo $? >> 42 >> >> whereas a proper shell should have print

Re: AS_IF optimization

2009-04-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Andreas Schwab on 4/7/2009 7:01 AM: >> Which shells? Solaris /bin/sh passed this test (to my surprise, since if >> fails the similar test for 'case `false` in *);; esac'). Even cygwin's >> super-old ash passed this, although it falls fla

autoconf ^M vs echo+tr

2009-04-07 Thread Török Edwin
Hi, Regenerating configure with version 2.63 gives me: -ac_cr=`echo X | tr X '\015'` +ac_cr='^M' I thought the echo + tr was more portable, and it also works better with various tools that adjust newlines (like SVN with certain props set). With the configure that has ^M I can't even svn diff, be

Re: autoconf ^M vs echo+tr

2009-04-07 Thread Ralf Wildenhues
Hello Török, * Török Edwin wrote on Tue, Apr 07, 2009 at 10:02:00PM CEST: > Regenerating configure with version 2.63 gives me: > -ac_cr=`echo X | tr X '\015'` > +ac_cr='^M' > > I thought the echo + tr was more portable, and it also works better with > various tools that adjust newlines (like SVN