ext/curses/extconf.rb


DEFINITIONS

This source file includes following functions.


   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  if have_header("ncurses.h") and have_library("ncurses", "initscr")
  10    make=true
  11  elsif have_header("ncurses/curses.h") and have_library("ncurses", "initscr")
  12    make=true
  13  elsif have_header("curses_colr/curses.h") and have_library("cur_colr", "initscr")
  14    make=true
  15  else
  16    have_library("termcap", "tgetent") 
  17    if have_header("curses.h") and have_library("curses", "initscr")
  18      make=true
  19    end
  20  end
  21  
  22  if make
  23    for f in %w(isendwin ungetch beep getnstr wgetnstr doupdate flash deleteln wdeleteln keypad keyname init_color wresize resizeterm)
  24      have_func(f)
  25    end
  26    create_makefile("curses")
  27  end