[PATCH] xserver: Fix configure.ac check for libsystemd/-daemon
Emil Velikov
emil.l.velikov at gmail.com
Thu Dec 3 04:23:10 PST 2015
Hi guys,
We had a similar patch from an intel dev not too long ago, although it
never got polished afaics.
On 3 December 2015 at 11:39, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Fri, 27 Nov 2015 15:57:21 +0000
> Bob Ham <bob.ham at collabora.com> wrote:
>
>> The configure script looks for the libsystemd-daemon pkg-config
>> module. If the configure script finds it, the script will add
>> libsystemd-daemon to a list of modules which are used to consolidate
>> CFLAGS and LIBS.
>>
>> The check for libsystemd-daemon was altered to fallback to libsystemd
>> if libsystemd-daemon was not found (libsystemd-daemon was brought into
>> libsystemd). Unfortunately, the configure script still adds
>> "libsystemd-daemon" to the list of modules to consolidate, instead of
>> "libsystemd". With this patch, we set a variable depending on which
>> pkg-config module is found and add that to the module list instead.
>>
>> Signed-off-by: Bob Ham <bob.ham at collabora.com>
>> ---
>> configure.ac | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 14a5bb8..01eabc4 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -837,9 +837,10 @@ AC_ARG_WITH([systemd-daemon],
>> [support systemd socket activation (default: auto)]),
>> [WITH_SYSTEMD_DAEMON=$withval], [WITH_SYSTEMD_DAEMON=auto])
>> PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
>> - [HAVE_SYSTEMD_DAEMON=yes],
>> + [HAVE_SYSTEMD_DAEMON=yes; systemd_daemon_lib="libsystemd-daemon"],
>> [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
>
> This is not this patch's thing, but should there be a version check to
> ensure the libsystemd actually does contain what used to be
> libsystemd-daemon?
>
This will do for a start. A more elaborate fix would be
if pkg_exists("new_pkg > magic_version_number")
foo="new_pkg > magic_version_number"
else
foo=old_pkg
pkg_check(foo)
Regardless if one goes this route or not, a humble request - please
use the existing naming pattern
s/systemd_daemon_lib/LIBSYSTEMD_DAEMON/
Thanks
Emil
More information about the xorg-devel
mailing list