[vlc-devel] [PATCH 2/2] contrib:libarchive: force static build
Steve Lhomme
robux4 at gmail.com
Wed Jul 19 08:26:20 CEST 2017
On Wed, Jul 19, 2017 at 7:43 AM, Steve Lhomme <robux4 at gmail.com> wrote:
> On Tue, Jul 18, 2017 at 4:47 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
>> On mardi 18 juillet 2017 15:30:54 EEST Derek Buitenhuis wrote:
>>> On 7/18/2017 3:26 PM, Steve Lhomme wrote:
>>> > ++Cflags: -I${includedir} -DLIBARCHIVE_STATIC
>>>
>>> Shouldn't this be in the VLC CFLAGS or defined where the header is included
>>> rather than the libarchive pkg-config file?
>
> IMO if the library supports static linking and pkg-config then it
> should tell how to use it.
>
>> It should be defined in VLC if it were a property of the code base linking the
>> library. But if it is a property of the library build, then it should either
>> be in the library header file(s) or the pkg-config file, I think.
>>
>> (And IIUC, this is the later case.)
>>
>> In principles, assuming that Cflags.static exists, then it should probably be
>
> Unfortunately Cflags.static or Cflags.private do not exist. At least
> not in pkg-config 0.29.2.
>
>> added there inconditionally (in upstream), and the VLC contrib rules should
>> run pkg-static.sh. But this is just a more circumvoluted path to the same
>> result.
>
> I think it's better to do patches that can be upstreamed when
> possible. And it turns out the the CMake build files of libarchive
> seem to set this flag in the .pc file when compiled as static. So
> maybe the autotools way of compiling is deprecated and the way to go
> is to build it with CMake.
Unfortunately the static builds with CMake are only meant for Windows
when built with MSVC...
And it turns out they do not modify the .pc file in that case (since
they assume it's not used).
So I think we're better off defining it in our makefile.
>> --
>> Rémi Denis-Courmont
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list