Skip to content

Commit 561d85b

Browse files
committed
Merge pull request #393 from monban/mkmf-workaround
workaround for bug in mkmf
2 parents bcdcc86 + 5cb8f7d commit 561d85b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/mysql2/extconf.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ def asplode lib
2929

3030
if RUBY_PLATFORM =~ /mswin|mingw/
3131
inc, lib = dir_config('mysql')
32+
33+
# Ruby versions not incorporating the mkmf fix at
34+
# https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39717
35+
# do not properly search for lib directories, and must be corrected
36+
unless lib[-3, 3] == 'lib'
37+
@libdir_basename = 'lib'
38+
inc, lib = dir_config('mysql')
39+
end
3240
exit 1 unless have_library("libmysql")
3341
elsif mc = (with_config('mysql-config') || Dir[GLOB].first) then
3442
mc = Dir[GLOB].first if mc == true

0 commit comments

Comments
 (0)