[Ffmpeg-devel] [PATCH] Build Darwin dynamic/shared libraries

Dan Villiom Podlaski Christiansen danchr
Sat Jul 16 12:27:16 CEST 2005


Michael Niedermayer wrote:
> Hi
>
> On Friday 15 July 2005 14:30, Dan Villiom Podlaski Christiansen wrote:
>   
>> Dan Villiom Podlaski Christiansen wrote:
>>     
>>> Michael Niedermayer wrote:
>>>       
>>>> then why not add another variable for that hardcoded dir?
>>>> hardcoded_libdir or
>>>> so?
>>>> putting DESTDIR before every occurance of libdir, bindir and mandir
>>>> is not acceptable
>>>>         
>>> Why, may I ask? I used DESTDIR to follow the convention used by GNU
>>> autotools, so that FFmpeg nicely integrates with them. Very useful and
>>> neat for packagers and porters, IMHO.
>>>       
>> Never mind, I figured out how to do a clean solution to this. Here's the
>> updated patch, which introduces a --install-prefix argument. I believe
>> the only outstanding issues are checking whether the -dylib_file parts
>> are necessary, and benchmarking to see if there is any performance
>> degradation. If there isn't it might make sense to default to
>> --enable-shared on Darwin. I'll post patches to attend to this, as well
>> as support for Mach-O binaries, later.
>>     
>
> this patch breaks libpostproc here (nothing gets build & no error)
>
> looking at libpostproc/Makefile shows that LIB was moved under an ifeq 
> ($(SHARED_PP),yes)
> furthermore
>   

Yes, I had regression tested all the other patches, but forgot to test 
this one properly. I have it fixed in my local copy.

>> +ifeq ($(CONFIG_DARWIN),)
>> +SLIB = $(SLIBBASE)$(SLIBSUF)
>> +else
>> +SLIB = $(SLIBBASE).$(SPPMAJOR)$(SLIBSUF)
>> +endif
>>     
> [...]
>   
>> +ifeq ($(CONFIG_DARWIN),)
>> +SHFLAGS+=-Wl,-soname,$(SLIB).$(SPPMAJOR)
>> +endif
>>     
>
> CONFIG_DARWIN checks which shouldnt be in a Makefile
>   

Very well, I'll put these into configure. Is it OK to extend the 
libpostproc naming convention with the version in filename and soname to 
libav* as well? This would simplify things. I'd like to point out that 
unfortunately, I don't have a Linux box to test on, so I can't verify 
that the Linux side works.

>> -all:    $(SWSLIB) $(PPLIB) $(SPPLIB)
>> +all:    $(SWSLIB) $(LIB) $(SLIB)
>>     
>
> variable renaming
>   

Yes. This was to have the line 'SHFLAGS="$SHFLAGS -install_name 
${libdir#$install_prefix}/\$(SLIB) -compatibility_version 
\$(SLIB_VERSION) -current_version \$(SLIB_VERSION)"' in configure affect 
libpostproc as well. The more I move to configure, the more I need to 
ensure that the same variable names are used everywhere.

Anyway, do you want --install-prefix, $DESTROOT, or perhaps both?

>> BTW, I think I noticed a slight inconsistency in the generation of the
>> pkg-config files: libdir is set to \${exec_prefix}/lib rather than the
>> $libdir which might have been passed to configure.
>>     
>
> well fix it and send a separate patch
>
> [...]
>   





More information about the ffmpeg-devel mailing list