[FFmpeg-devel] [PATCH] create all pkg-config files in their own subdirectory

Måns Rullgård mans
Mon Jul 7 14:18:17 CEST 2008


Diego Biurrun wrote:
> On Sun, Jul 06, 2008 at 10:53:00PM +0200, Aurelien Jacobs wrote:
>> M?ns Rullg?rd wrote:
>>
>> > Jack Jansen <Jack.Jansen at cwi.nl> writes:
>> >
>> > > On  28-Jun-2008, at 03:09 , M?ns Rullg?rd wrote:
>> > >
>> > >>> -libdir=\${pcfiledir}/$name
>> > >>> +libdir=\${pcfiledir}
>> > >>
>> > >> If that is right, ...
>> > >>
>> > >>> includedir=\${pcfiledir}
>> > >>
>> > >> then that is wrong.
>> > >
>> > > No: the pattern seems to be to do
>> > >
>> > > 	#include "libavcodec/avcodec.h"
>> > >
>> > > currently. That was different in the past, IIRC, but nowadays this is
>> > > what most ffmpeg code uses.
>> >
>> > Yes, that is how #include directives should look.  Assuming
>> > ${pcfiledir} is the directory containing the .pc file, supplying
>> > -I${pcfiledir} is wrong when the .pc file is in the same directory as
>> > headers/libs.
>>
>> True.
>> Attached patch should fix this issue properly.
>> I will apply it in a few days if no one cares.
>>
>> --- configure	(revision 14095)
>> +++ configure	(working copy)
>> @@ -2212,8 +2212,8 @@
>>  cat <<EOF > $name/$name-uninstalled.pc
>>  prefix=
>>  exec_prefix=
>> -libdir=\${pcfiledir}/$name
>> -includedir=\${pcfiledir}
>> +libdir=\${pcfiledir}
>> +includedir=\${pcfiledir}/..
>
> This looks wrong to me.  I don't see the problem in our current
> pkg-config files...

The problem is with the -uninstalled.pc files.  They cause pkg-config
to emit flags like -I/some/path/ffmpeg/libavcodec, when it should be
-I/some/path/ffmpeg.  The patch changes this to -I/some/path/libavcodec/..
which is correct, if somewhat ugly.

Personally, I'm struggling to understand why anyone would want these files
in the first place.  If they can tell pkg-config where to find them,
writing the proper -I and -L flags should surely be within the capabilities
of the user.  Then again, I'm probably over-estimating the intelligence
of the average coder.  Programming has become far too easy.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list