mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
timesync, meson: allow statically linked build
Build option "link-timesyncd-shared" to build a statically linked systemd-timesyncd by using -Dlink-udev-shared=false -Dlink-timesyncd-shared=false on systems with full systemd stack except systemd-timesyncd, such as RHEL/CentOS 8.
This commit is contained in:
parent
dd0395b565
commit
fd74a13e85
14
meson.build
14
meson.build
@ -2292,10 +2292,19 @@ if conf.get('ENABLE_TIMEDATECTL') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if conf.get('ENABLE_TIMESYNCD') == 1
|
if conf.get('ENABLE_TIMESYNCD') == 1
|
||||||
|
if get_option('link-timesyncd-shared')
|
||||||
|
timesyncd_link_with = [libshared]
|
||||||
|
else
|
||||||
|
timesyncd_link_with = [libsystemd_static,
|
||||||
|
libshared_static,
|
||||||
|
libjournal_client,
|
||||||
|
libbasic_gcrypt]
|
||||||
|
endif
|
||||||
|
|
||||||
executable('systemd-timesyncd',
|
executable('systemd-timesyncd',
|
||||||
systemd_timesyncd_sources,
|
systemd_timesyncd_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [timesyncd_link_with],
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
libm],
|
libm],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
@ -2305,7 +2314,7 @@ if conf.get('ENABLE_TIMESYNCD') == 1
|
|||||||
executable('systemd-time-wait-sync',
|
executable('systemd-time-wait-sync',
|
||||||
'src/time-wait-sync/time-wait-sync.c',
|
'src/time-wait-sync/time-wait-sync.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [timesyncd_link_with],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
@ -3469,6 +3478,7 @@ foreach tuple : [
|
|||||||
['link-udev-shared', get_option('link-udev-shared')],
|
['link-udev-shared', get_option('link-udev-shared')],
|
||||||
['link-systemctl-shared', get_option('link-systemctl-shared')],
|
['link-systemctl-shared', get_option('link-systemctl-shared')],
|
||||||
['link-networkd-shared', get_option('link-networkd-shared')],
|
['link-networkd-shared', get_option('link-networkd-shared')],
|
||||||
|
['link-timesyncd-shared', get_option('link-timesyncd-shared')],
|
||||||
]
|
]
|
||||||
|
|
||||||
if tuple.length() >= 2
|
if tuple.length() >= 2
|
||||||
|
@ -18,6 +18,8 @@ option('link-systemctl-shared', type: 'boolean',
|
|||||||
description : 'link systemctl against libsystemd-shared.so')
|
description : 'link systemctl against libsystemd-shared.so')
|
||||||
option('link-networkd-shared', type: 'boolean',
|
option('link-networkd-shared', type: 'boolean',
|
||||||
description : 'link systemd-networkd and its helpers to libsystemd-shared.so')
|
description : 'link systemd-networkd and its helpers to libsystemd-shared.so')
|
||||||
|
option('link-timesyncd-shared', type: 'boolean',
|
||||||
|
description : 'link systemd-timesyncd and its helpers to libsystemd-shared.so')
|
||||||
option('static-libsystemd', type : 'combo',
|
option('static-libsystemd', type : 'combo',
|
||||||
choices : ['false', 'true', 'pic', 'no-pic'],
|
choices : ['false', 'true', 'pic', 'no-pic'],
|
||||||
description : '''install a static library for libsystemd''')
|
description : '''install a static library for libsystemd''')
|
||||||
|
Loading…
Reference in New Issue
Block a user