tag: Improve tag property::index support (FS#1229)
[awesome.git] / build-utils / lgi-check.sh
blob96bab29011584b59aafd7aa1aabcdc24b03fc387
1 #!/bin/sh
3 die()
5 exec >&2
6 echo
7 echo
8 echo " WARNING"
9 echo " ======="
10 echo
11 echo " The lgi check failed."
12 echo " The Lua GObject introspection package is just a runtime dependency, so it is not"
13 echo " necessary for building awesome. However, awesome needs it to run."
14 echo " Add AWESOME_IGNORE_LGI=1 to your environment to continue."
15 echo
16 echo
17 if [ "x$AWESOME_IGNORE_LGI" = "x1" ]
18 then
19 exit 0
21 exit 1
24 # Check if we have lgi
25 lua -e 'require("lgi")' || die
27 # Check the version number
28 # Keep this in sync with lib/gears/surface.lua.in!
29 lua -e 'if tonumber(string.match(require("lgi.version"), "(%d%.%d)")) < 0.7 then error("lgi too old, need at least version 0.7.0") end' || die
31 # Check for the needed gi files
32 lua -e 'l = require("lgi") assert(l.cairo, l.Pango, l.PangoCairo)' || die