File: meson.build

package info (click to toggle)
pdns 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,824 kB
  • sloc: cpp: 101,240; sh: 5,616; makefile: 2,318; sql: 860; ansic: 675; python: 635; yacc: 245; perl: 161; lex: 131
file content (54 lines) | stat: -rw-r--r-- 1,355 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
48
49
50
51
52
53
54
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.4',
    'lua-5.4',
    'lua54',
    '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() and opt_lua != 'lua' and opt_lua.startswith('lua')
  dep_lua = dependency(opt_lua, version: '>= 5.1', required: false)
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')