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

Måns Rullgård mru
Tue Aug 15 17:34:33 CEST 2006

John Dalgliesh said:
> On Mon, 14 Aug 2006, Alan Curry wrote:
>> 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"
> ...
>> You can't portably echo a backslash.
> OK. Does the attached patch fix the problem?
>> printf would be better. If there's some printf-phobia, post-process the echo
>> through tr or sed or use a heredoc.
> As printf isn't yet used in the configure script, this patch uses tr. In
> bash you cannot escape a single quote within single quotes, even with a
> backslash. If your shell differs then another backslash could be safely
> added to the last arg to tr.

Please use printf instead.  It's much cleaner.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list