File: extconf.rb

package info (click to toggle)
rubyluabridge 0.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 204 kB
  • sloc: ruby: 928; cpp: 915; makefile: 18; sh: 2
file content (48 lines) | stat: -rwxr-xr-x 833 bytes parent folder | download | duplicates (4)
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

require 'mkmf'


def fail( str )
  STDERR << " extconf failed: #{str}\n"
  exit 1
end


if enable_config('debug')
    $CFLAGS = '-O0 -g -Wall '
else    
    $CFLAGS = '-O3 -Wall'
end


if enable_config('rlb-debug')
    $CFLAGS += '-DRLB_DEBUG '
end

# link in C++ libraries
$LIBS << " -lstdc++ -lc"

nolua_msg = <<END_OF_MESSAGE
need liblua.

        Install the library or try one of the following options to extconf.rb:

        --with-lua-lib=/path/to/liblua/lib
        --with-lua-include=/path/to/liblua/include
        --with-lualib=name_of_lua_library
        
        --enable-debug will build it optimized and with debugging symbols 
END_OF_MESSAGE


dir_config 'lua'

unless have_header('lua.h')
    fail nolua_msg
end
unless have_library( 'lua', 'lua_pushvalue' )
    fail nolua_msg
end

create_makefile 'rubyluabridge'