Build Issue Encountered in ModemManager-1.20.6 and udev not enabled
While attempting to build ModemManager 1.20.6 on a system without udev, I encountered a build issue with the udevdir build variable. When not set, the meson.build file accesses the dependency to get a pkgconfig variable. But that will fail if udev is not enabled. Below I have added a comment to where I believe the logic is wrong.
# udev support (enabled by default)
enable_udev = get_option('udev')
if enable_udev
gudev_dep = dependency('gudev-1.0', version: '>= 232')
endif
config_h.set('WITH_UDEV', enable_udev)
# udev base directory
udev_udevdir = get_option('udevdir')
# I believe this is wrong as it should also validate the enable_udev is enabled too.
if udev_udevdir == ''
udev_udevdir = dependency('udev').get_pkgconfig_variable('udevdir')
endif
udev_rulesdir = udev_udevdir / 'rules.d'
Edited by KevinGuthrie