OS checks with configuration time DLOPEN_NEEDS_LIBDL

Richard PALO richard at netbsd.org
Mon Oct 19 23:11:45 PDT 2015


Le 19/10/15 15:40, Norbert Thiebaud a écrit :
> On Mon, Oct 19, 2015 at 3:13 AM, Richard PALO <richard at netbsd.org> wrote:
>> Le 19/10/15 06:37, Norbert Thiebaud a écrit :
>>>
>>> On Sun, Oct 18, 2015 at 10:54 PM, Richard PALO <richard at netbsd.org> wrote:
>>>>
>>>>
>>>> I'd like to advance, one way or another on this topic.
>>>

With the latest revision working on gerrit, I'm curious whether it would be preferable
to pass directly the library, if needed.

That is, instead of 'DLOPEN_NEEDS_LIBDL' being '' or 'TRUE', something like 
'DLOPEN_LIBS' being either '' or '-ldl'.

Then the usages would look like:
>  $(eval $(call gb_Library_add_libs,sofficeapp,\
> -    $(if $(filter $(OS),LINUX), \
> -        -ldl \
> +    $(if $(filter LINUX %BSD SOLARIS, $(OS)), \
> +        $(DLOPEN_LIBS) \
>          -lpthread \
>      ) \

instead of
>  $(eval $(call gb_Library_add_libs,sofficeapp,\
> -    $(if $(filter $(OS),LINUX), \
> -        -ldl \
> +    $(if $(filter LINUX %BSD SOLARIS, $(OS)), \
> +        $(if $(DLOPEN_NEEDS_LIBDL), -ldl) \
>          -lpthread \
>      ) \

much simpler and a bit more like some other prerequisite library needs.

-- 
Richard PALO



More information about the LibreOffice mailing list