File: wscript_configure

package info (click to toggle)
geany-plugins 0.21.1.dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,460 kB
  • sloc: ansic: 47,147; sh: 11,024; makefile: 1,099; python: 229
file content (44 lines) | stat: -rw-r--r-- 1,621 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
# -*- coding: utf-8 -*-
#
# WAF build script for geany-plugins - GeanyLUA
#
# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# $Id$

from waflib.Errors import ConfigurationError
from build.wafutils import check_cfg_cached

package_names = ['lua', 'lua5.1', 'lua51', 'lua-5.1']

def try_to_find_lua_package():
    # try various package names as distributions like to use different ones
    for package_name in package_names:
        check_cfg_cached(conf,
                     package=package_name,
                     atleast_version='5.1',
                     mandatory=False,
                     uselib_store='LUA',
                     args='--cflags --libs')
        if conf.env['HAVE_LUA'] == 1:
            return True
    return False


found_lua_package = try_to_find_lua_package()
if not found_lua_package:
    raise ConfigurationError('You need Lua 5.1 for the GeanyLua plugin')