[Ffmpeg-devel] configure script broken with dash as sh

Alan Curry pacman+mplayer
Tue Aug 15 01:22:22 CEST 2006


Diego Biurrun writes:
> On Mon, Aug 14, 2006 at 11:56:26PM +0200, matthieu castet wrote:
> > if dash is used as sh instead of bash, the configure script put in config.h
> > 
> > #define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "
> > 	"
> > instead of :
> > #define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"
> > 
> > A solution could be to use printf. IRRC, it was done in glibc for a 
> > similar problem.
> 
> Sounds like dash is broken to me.  Tried sending a bug report?

No, it's not broken. It's following the XSI standard with regard to backslash
escape sequences (always expand them, there is no -e option). It's not a
fully XSI-compliant echo, though, since it interprets -n option as in BSD,
which is not allowed in XSI echo.

In the baseline POSIX echo, any combination of BSD and SysV features are
allowed.

You can't portably echo a backslash.

References:
http://www.opengroup.org/onlinepubs/007908799/xcu/echo.html
http://home.comcast.net/~j.p.h/cus-faq-2.html#13

printf would be better. If there's some printf-phobia, post-process the echo
through tr or sed or use a heredoc.





More information about the ffmpeg-devel mailing list