[FFmpeg-devel] [PATCH] Define FFMPEG_PREFIX in config.h

Stefano Sabatini stefano.sabatini-lala
Thu Oct 2 23:17:57 CEST 2008


On date Tuesday 2008-09-30 22:25:12 +0200, Stefano Sabatini encoded:
> On date Monday 2008-09-29 23:48:44 +0100, M?ns Rullg?rd encoded:
> > Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> > 
> > > Hi, as in subject,
> > >
> > > conceived for supporting $prefix/share/ffmpeg preset paths but useful
> > > by its own.
> > >
> > > Regards.
> > > -- 
> > > FFmpeg = Frightening Foolish Multipurpose Proud Erudite God
> > >
> > > Index: configure
> > > ===================================================================
> > > --- configure	(revision 15451)
> > > +++ configure	(working copy)
> > > @@ -2055,6 +2055,7 @@
> > >  echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
> > >  
> > >  echo "FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION" >> config.mak
> > > +echo "#define FFMPEG_PREFIX \"$prefix\"" >> $TMPH
> > 
> > What if $prefix contains '"' or '\' characters?
> 
> A quoting hell.
> 
> Check the patch below.
> 
> BTW configure seems broken if we use a prefix containing spaces like:
> configure --prefix="hello world"
> 
> Regards.
[...]
> Index: configure
> ===================================================================
> --- configure	(revision 15488)
> +++ configure	(working copy)
> @@ -632,6 +632,10 @@
>      "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
>  }
>  
> +c_stringify(){
> +    echo "$1" | sed -e 's/\(["\]\)/\\\1/g' -e 's/^/"/' -e 's/$/"/'
> +}

Mmh.., maybe slightly simpler:

c_stringify(){
    echo \"$(echo "$1" | sed -e 's/\(["\]\)/\\\1/g')\"
}

Regards.
-- 
FFmpeg = Furious Freak MultiPurpose Evangelical Guru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prefix-in-config-h-01.patch
Type: text/x-diff
Size: 786 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081002/fd2dd0ca/attachment.patch>



More information about the ffmpeg-devel mailing list