File: meson.build

package info (click to toggle)
pdns-recursor 5.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,128 kB
  • sloc: cpp: 109,859; javascript: 20,651; python: 5,695; sh: 5,114; makefile: 782; ansic: 582; xml: 37
file content (47 lines) | stat: -rw-r--r-- 1,164 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
opt_lua = get_option('lua')
dep_lua = dependency('', required: false)

if opt_lua == 'auto' or opt_lua == 'luajit'
  dep_lua = dependency(
    'luajit',
    version: '>= 2.0.2',
    required: opt_lua == 'luajit',
    not_found_message: 'LuaJIT not found',
  )
endif

if not dep_lua.found() and (opt_lua == 'auto' or opt_lua == 'lua')
  variants = [
    'lua5.3',
    'lua-5.3',
    'lua53',
    'lua5.2',
    'lua-5.2',
    'lua52',
    'lua5.1',
    'lua-5.1',
    'lua51',
    'lua',
  ]

  foreach variant: variants
    dep_lua = dependency(variant, version: '>= 5.1', required: false)
    if dep_lua.found()
      break
    endif
  endforeach
endif

if not dep_lua.found()
  error('No Lua implementation was found')
endif

have_luahpp = cxx.has_header('lua.hpp', dependencies: dep_lua)

conf.set('HAVE_LUA', dep_lua.found(), description: 'Lua')
conf.set('HAVE_LUA_HPP', have_luahpp, description: 'Have <lua.hpp>')

summary('Lua', dep_lua.found(), bool_yn: true, section: 'Lua')
summary('Implementation', dep_lua.name(), section: 'Lua')
summary('Version', dep_lua.version(), section: 'Lua')
summary('Have <lua.hpp>', have_luahpp, bool_yn: true, section: 'Lua')