~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to ext/curses/extconf.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require 'mkmf'
 
2
 
 
3
dir_config('curses')
 
4
dir_config('ncurses')
 
5
dir_config('termcap')
 
6
 
 
7
make=false
 
8
have_library("mytinfo", "tgetent") if /bow/ =~ RUBY_PLATFORM
 
9
have_library("tinfo", "tgetent") or have_library("termcap", "tgetent")
 
10
if have_header(*curses=%w"ncurses.h") and have_library("ncurses", "initscr")
 
11
  make=true
 
12
elsif have_header(*curses=%w"ncurses/curses.h") and have_library("ncurses", "initscr")
 
13
  make=true
 
14
elsif have_header(*curses=%w"curses_colr/curses.h") and have_library("cur_colr", "initscr")
 
15
  curses.unshift("varargs.h")
 
16
  make=true
 
17
elsif have_header(*curses=%w"curses.h") and have_library("curses", "initscr")
 
18
  make=true
 
19
end
 
20
 
 
21
if make
 
22
  for f in %w(beep bkgd bkgdset curs_set deleteln doupdate flash getbkgd getnstr init isendwin keyname keypad resizeterm scrl set setscrreg ungetch wattroff wattron wattrset wbkgd wbkgdset wdeleteln wgetnstr wresize wscrl wsetscrreg def_prog_mode reset_prog_mode timeout wtimeout nodelay init_color wcolor_set)
 
23
    have_func(f)
 
24
  end
 
25
  flag = "-D_XOPEN_SOURCE_EXTENDED"
 
26
  src = "int test_var[(sizeof(char*)>sizeof(int))*2-1];"
 
27
  if try_compile(cpp_include(%w[stdio.h stdlib.h]+curses)+src , flag)
 
28
    $defs << flag
 
29
  end
 
30
  create_makefile("curses")
 
31
end