summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-09 04:53:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-09 04:53:16 +0000
commit0fb30e32b8e785b3804f7e78da3806ea1614dfcb (patch)
tree8ca11a61af0311dda461853cc8961a9bca899124 /ext
parente8bf824c5cf7cacf8b088f07d173346b5ec6bc0c (diff)
2000-05-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb.in7
-rw-r--r--ext/socket/extconf.rb18
2 files changed, 22 insertions, 3 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 253d9d38b7..91d3304fd1 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -329,6 +329,11 @@ def create_makefile(target)
$DLDFLAGS = '@DLDFLAGS@'
+ if $configure_args['--enable-shared']
+ $libs = "@LIBRUBYARG@ " + $libs
+ $DLDFLAGS = $DLDFLAGS + " -L" + $topdir
+ end
+
if RUBY_PLATFORM =~ /beos/ and not $static
$libs = $libs + " @LIBRUBYARG@"
$DLDFLAGS = $DLDFLAGS + " -L" + $topdir
@@ -339,8 +344,6 @@ def create_makefile(target)
if File.exist? target + ".def"
defflag = "--def=" + target + ".def"
end
- $libs = $libs + " @LIBRUBYARG@"
- $DLDFLAGS = $DLDFLAGS + " -L" + $topdir
end
$srcdir = $top_srcdir + "/ext/" + $mdir
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 1adb7cc1b5..91ac8f6123 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -173,7 +173,7 @@ have_header("netinet/tcp.h")
have_header("netinet/udp.h")
$getaddr_info_ok = false
-if try_run(<<EOF)
+if not enable_config("wide-getaddrinfo", false) and try_run(<<EOF)
#include <sys/types.h>
#include <netdb.h>
#include <string.h>
@@ -292,6 +292,22 @@ else
have_header("resolv.h")
end
+if !try_link(<<EOF)
+#include <sys/types.h>
+#include <netdb.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main()
+{
+ socklen_t len;
+ return 0;
+}
+EOF
+ $CFLAGS="-Dsocklen_t=int "+$CFLAGS
+end
+
have_header("sys/un.h")
if have_func(test_func)