summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-31 18:48:16 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-31 18:48:16 +0000
commitb64083376ef9fdd04ea48d7b4002934ab4f921b9 (patch)
tree1015c94ced9090c1271b34984a8ea98337b0574a /ext/readline
parent508e987ac64ca8447c7384183d298b44f1647d36 (diff)
* ext/readline/extconf.rb: reject GPLv3 readline. [ruby-dev:39172]
[ruby-core:25272] [ruby-dev:39167] [ruby-core:28736] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/extconf.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
index 14c2099..4ddc763 100644
--- a/ext/readline/extconf.rb
+++ b/ext/readline/extconf.rb
@@ -3,7 +3,7 @@ require "mkmf"
$readline_headers = ["stdio.h"]
def have_readline_header(header)
- if have_header(header)
+ if have_header(header, &$readline_extra_check)
$readline_headers.push(header)
return true
else
@@ -24,6 +24,12 @@ dir_config('ncurses')
dir_config('termcap')
dir_config("readline")
enable_libedit = enable_config("libedit")
+$readline_extra_check = (proc {|src| src << <<EOS} unless enable_config("readline-v6"))
+#if RL_VERSION_MAJOR >= 6
+#error GPLv2 incompatible
+#endif
+EOS
+
have_library("user32", nil) if /cygwin/ === RUBY_PLATFORM
have_library("ncurses", "tgetnum") ||
have_library("termcap", "tgetnum") ||