summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-18 04:32:13 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-18 04:32:13 +0000
commita62935cf06b9ee2ec72c749c732c226a18f4d389 (patch)
treeb859df6a5f636b58fe78cbc86d5b9921586d8b2a /ext/socket/extconf.rb
parent3e51a5b1b5a953e4705adc924355ffdc83b25472 (diff)
2000-05-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 46d5120e2e..9ac24cd763 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -99,6 +99,10 @@ EOF
$ipv6lib="inet6"
$ipv6libdir="/usr/local/v6/lib"
$CFLAGS="-DINET6 "+$CFLAGS
+ else
+ $ipv6lib=with_config("ipv6-lib", nil)
+ $ipv6libdir=with_config("ipv6-libdir", nil)
+ $CFLAGS="-DINET6 "+$CFLAGS
end
if $ipv6lib
@@ -273,6 +277,20 @@ EOS
exit
end
+case with_config("ipv6-lookup-order", "INET")
+when "INET"
+ $CFLAGS="-DDEFAULT_LOOKUP_ORDER_INET "+$CFLAGS
+when "INET6"
+ $CFLAGS="-DDEFAULT_LOOKUP_ORDER_INET6 "+$CFLAGS
+when "UNSPEC"
+ $CFLAGS="-DDEFAULT_LOOKUP_ORDER_UNSPEC "+$CFLAGS
+else
+ print <<EOS
+
+Fatal: invalid --ipv6-lookup-order (expected INET, INET6 or UNSPEC)
+EOS
+ exit
+end
$objs = ["socket.#{$OBJEXT}"]