[FFmpeg-devel] [FFmpeg-cvslog] configure: Support preprocessor macros as header names

Alexander Strasser eclipse7 at gmx.net
Sun Jan 5 21:41:24 CET 2014


On 2014-01-05 19:07 +0100, Reimar Döffinger wrote:
> Hm, this seems kind of not ideal to me, at least this specific solution.
> It assumes anything not ending in .h is a macro.
> However for C++ headers it is not unusual to have a different extension or none at all.
> Admittedly we rarely try to used C++ libraries so we might get lucky and get away with it...

  We do not use it at all. I fixed the freetype problem in an explicit
and obvious way a month ago. So actually we do not need to merge this
generic and undocumented hack at all.

  I do not expect more freetype style include libs to appear soon if
at all. OTOH I consider a C++ lib dep much more likely.

  I may be missing things but I explicitly asked and got no reports
about problems with my solution to this currently unique problem. This
is why I backported it already to 2.1 and 1.2 branches.

  Alexander
 
> On 05.01.2014, at 13:44, git at videolan.org (Diego Biurrun) wrote:
> 
> > ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Dec 23 01:03:48 2013 +0100| [52ccc4a0ece88030e67254418317d72089a0ecc8] | committer: Luca Barbato
> > 
> > configure: Support preprocessor macros as header names
> > 
> > New versions of FreeType have moved the location of their API
> > header(s) and hide the location behind a macro.
> > 
> > Since the location changes between versions and no other way
> > to know the location exists, this workaround becomes necessary.
> > 
> > Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> > 
> >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52ccc4a0ece88030e67254418317d72089a0ecc8
> > ---
> > 
> > configure |   11 +++++++++--
> > 1 file changed, 9 insertions(+), 2 deletions(-)
> > 
> > diff --git a/configure b/configure
> > index 8cf25ab..d44dab2 100755
> > --- a/configure
> > +++ b/configure
> > @@ -763,6 +763,13 @@ check_ld(){
> >     check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
> > }
> > 
> > +print_include(){
> > +    hdr=$1
> > +    test "${hdr%.h}" = "${hdr}" &&
> > +        echo "#include $hdr"    ||
> > +        echo "#include <$hdr>"
> > +}
> > +
> > check_code(){
> >     log check_code "$@"
> >     check=$1
> > @@ -771,7 +778,7 @@ check_code(){
> >     shift 3
> >     {
> >         for hdr in $headers; do
> > -            echo "#include <$hdr>"
> > +            print_include $hdr
> >         done
> >         echo "int main(void) { $code; return 0; }"
> >     } | check_$check "$@"
> > @@ -866,7 +873,7 @@ check_func_headers(){
> >     shift 2
> >     {
> >         for hdr in $headers; do
> > -            echo "#include <$hdr>"
> > +            print_include $hdr
> >         done
> >         for func in $funcs; do
> >             echo "long check_$func(void) { return (long) $func; }"
> > 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140105/9abb56a5/attachment.asc>


More information about the ffmpeg-devel mailing list