diff mbox series

[rpld,1/6] build: test various names for our lua dependency

Message ID 20190918195819.7492-2-stefan@datenfreihafen.org (mailing list archive)
State Not Applicable
Headers show
Series Mixed bag of rpld patches | expand

Commit Message

Stefan Schmidt Sept. 18, 2019, 7:58 p.m. UTC
Distros name this differently in their pkgconfig files.
This is a first attempt to cope with all of them.

If we depend on a recent meson version at some later
point we could handle this in a cleaner way by using
the break keyword coming in 0.49
---
 meson.build | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 8f2ccfe..70a2bc3 100644
--- a/meson.build
+++ b/meson.build
@@ -10,7 +10,16 @@  else
 	error('Couldn\'t find libev header / library')
 endif
 
-luadep = dependency('lua5.3')
+foreach name : ['lua', 'lua5.3', 'lua-5.3', 'lua53']
+	dep = dependency(name, version: '>=5.3', required: false)
+	if dep.found()
+		luadep = dep
+	endif
+endforeach
+if not luadep.found()
+	error('Couldn\'t find Lua.')
+endif
+
 mnldep = dependency('libmnl')
 
 srcs = files(