diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-07 03:10:44 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-07 03:10:44 +0000 |
commit | dd76b8b8b139eb72f2a645c9c5331b1ca630f2b2 (patch) | |
tree | 6be6a02a1fa8f538c5adc121ed794723b07bf329 /test/dl | |
parent | 42d25de9583aab686cab04b572a56597d4f3f8bd (diff) | |
download | ruby-dd76b8b8b139eb72f2a645c9c5331b1ca630f2b2.tar.gz |
don't exit even if libc/libm is not found.
check lib[cm].so.6.1 as well on linux.
add solaris lib.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-rw-r--r-- | test/dl/test_base.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/dl/test_base.rb b/test/dl/test_base.rb index 439739bcf5..6a1f69398b 100644 --- a/test/dl/test_base.rb +++ b/test/dl/test_base.rb @@ -18,8 +18,14 @@ when /linux/ # 64-bit ruby libdir = '/lib64' if File.directory? '/lib64' end - LIBC_SO = File.join(libdir, "libc.so.6") - LIBM_SO = File.join(libdir, "libm.so.6") + LIBC_SO = [ + File.join(libdir, "libc.so.6"), + File.join(libdir, "libc.so.6.1") + ].find {|f| File.file? f } + LIBM_SO = [ + File.join(libdir, "libm.so.6"), + File.join(libdir, "libm.so.6.1") + ].find {|f| File.file? f } when /mingw/, /mswin32/ LIBC_SO = "msvcrt.dll" LIBM_SO = "msvcrt.dll" @@ -29,12 +35,14 @@ when /darwin/ when /bsd|dragonfly/ LIBC_SO = "/usr/lib/libc.so" LIBM_SO = "/usr/lib/libm.so" +when /solaris2/ + LIBC_SO = "/usr/lib/libc.so" + LIBM_SO = "/usr/lib/libm.so" else LIBC_SO = ARGV[0] LIBM_SO = ARGV[1] if( !(LIBC_SO && LIBM_SO) ) - $stderr.puts("#{$0} <libc> <libm>") - exit + $stderr.puts("libc and libm not found: #{$0} <libc> <libm>") end end |