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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 --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(
-- 
2.21.0




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux