summaryrefslogtreecommitdiff
path: root/ext/readline/extconf.rb
blob: 0bd11bb946ed28f82c618d65a4ef4d84985689fc (plain)
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
require "mkmf"

readline_dir = with_config("readline-dir")
if readline_dir
  $CFLAGS = "-I#{readline_dir}/include"
  $LDFLAGS = "-L#{readline_dir}/lib"
end

readline_dir = with_config("readline-include-dir")
if readline_dir
  $CFLAGS = "-I#{readline_dir}"
end

readline_dir = with_config("readline-lib-dir")
if readline_dir
  $LDFLAGS = "-L#{readline_dir}"
end

have_library("termcap", "tgetnum")
have_library("curses", "tgetnum")
if have_header("readline/readline.h") and
    have_header("readline/history.h") and
    have_library("readline", "readline")
  create_makefile("readline")
end