Browse files

Makes readline library path configurable in the command line.

When the Readline extensions is being compiled, the build instruction
in build.rb will use the version of readline library specified by
environment variable READLINE_DIR. If READLINE_DIR is empty, it'll use
the default readline as before. For example,
`READLINE_DIR=/opt/local rake build' uses the version in macport.
  • Loading branch information...
1 parent 478e5b4 commit 48ab1d2e851c3a732bfa893fa6a5c34595f6689d @vincentlu vincentlu committed with febuiles May 25, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/ext/readline/build.rb
@@ -1,7 +1,8 @@
extension do |e| 'readline'
e.files '*.c'
- e.includes '.', '..', '/usr/include'
+ e.includes '.', '..', (ENV['READLINE_DIR'] ? "#{ENV['READLINE_DIR']}/include" : '/usr/include')
e.libs 'readline', 'ncurses'
+ e.flags "-L#{ENV['READLINE_DIR']}/lib" if ENV['READLINE_DIR']

0 comments on commit 48ab1d2

Please sign in to comment.