meson: allow fallback to find_library for readline detection

Fixes: 050a51aa (" meson_options: Add readline option")

Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
This commit is contained in:
Dylan Aïssi 2024-07-31 15:30:40 +02:00 committed by Wim Taymans
parent b61765eaf4
commit 0c5b2f1154

View file

@ -285,11 +285,15 @@ cdata.set('HAVE_DBUS', dbus_dep.found())
sdl_dep = dependency('sdl2', required : get_option('sdl2'))
summary({'SDL2 (video examples)': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies')
drm_dep = dependency('libdrm', required : false)
readline_dep = dependency('readline', required : get_option('readline'))
if get_option('readline').disabled()
readline_dep = dependency('', required: false)
else
readline_dep = dependency('readline', required : false)
if not readline_dep.found()
readline_dep = cc.find_library('readline', required : get_option('readline'))
endif
endif
# Both the FFmpeg SPA plugin and the pw-cat FFmpeg integration use libavcodec.
# But only the latter also needs libavformat and libavutil.