[FFmpeg-devel] [PATCH] Define FFMPEG_PREFIX in config.h
Stefano Sabatini
stefano.sabatini-lala
Sun Oct 5 18:04:48 CEST 2008
On date Thursday 2008-10-02 23:17:57 +0200, Stefano Sabatini encoded:
> 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
> Index: configure
> ===================================================================
> --- configure (revision 15522)
> +++ configure (working copy)
> @@ -636,6 +636,10 @@
> "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
> }
>
> +c_stringify(){
> + echo \"$(echo "$1" | sed -e 's/\(["\]\)/\\\1/g')\"
> +}
> +
> # CONFIG_LIST contains configurable options, while HAVE_LIST is for
> # system-dependent things.
>
> @@ -2059,6 +2063,7 @@
> echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
>
> echo "FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION" >> config.mak
> +echo "#define FFMPEG_PREFIX" `c_stringify "$prefix"` >> $TMPH
> echo "prefix=$prefix" >> config.mak
> echo "LIBDIR=\$(DESTDIR)$libdir" >> config.mak
> echo "SHLIBDIR=\$(DESTDIR)$shlibdir" >> config.mak
Ping?
--
FFmpeg = Frightening and Fast Magical Prodigious Elected Game
More information about the ffmpeg-devel
mailing list