Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ext/charlock_holmes/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ def sys(cmd)
end
end

pkg_config 'icu-i18n'

unless have_library 'icui18n' and have_header 'unicode/ucnv.h'
pcs = `which -a pkg-config`
pcs.lines.each do |pc|
$PKGCONFIG = pc.chomp
pkg_config 'icu-i18n'
break if have_library 'icui18n' and have_header 'unicode/ucnv.h'
end
end

unless have_library 'icui18n' and have_header 'unicode/ucnv.h'
STDERR.puts "\n\n"
STDERR.puts "***************************************************************************************"
Expand Down Expand Up @@ -81,6 +92,8 @@ def sys(cmd)
exit(1)
end

pkg_config 'zlib'

$CFLAGS << ' -Wall -funroll-loops'
$CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG']

Expand Down