bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: selinux: insufficient M4 detection with building static binaries


From: Bruno Haible
Subject: Re: selinux: insufficient M4 detection with building static binaries
Date: Tue, 09 Apr 2019 02:19:31 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Hi Assaf,

> > It would be better to instead set LIB_SELINUX to
> > "-lselinux -lpcre -lsepol -lpthread" (in the static case).
> 
> This is a better solution, sadly I do not know how to
> implement this in M4 (e.g. detecting a static build,
> then deducing the required static libraries...).

I would not try do implement this by detecting a static build.
I would try to do it by first trying to link only with '-lselinux',
and if that fails, try with '-lselinux -lpcre -lsepol -lpthread'.
Basically, replace

    AC_SEARCH_LIBS([setfilecon], [selinux],
                   [test "$ac_cv_search_setfilecon" = "none required" ||
                    LIB_SELINUX=$ac_cv_search_setfilecon])

with two AC_LINK_IFELSE invocations. And with the function
'matchpathcon_init_prefix' instead of 'setfilecon', of course.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]