2010-03-26 08:03:08 +00:00
|
|
|
# encoding: UTF-8
|
|
|
|
|
|
|
|
require 'mkmf'
|
|
|
|
dir_config('mysql')
|
|
|
|
|
|
|
|
have_header('mysql/mysql.h')
|
|
|
|
|
|
|
|
$CFLAGS << ' -Wall -Wextra -funroll-loops'
|
2010-03-30 16:19:05 +00:00
|
|
|
$CFLAGS << ' -O0 -ggdb3'
|
2010-03-26 08:03:08 +00:00
|
|
|
|
|
|
|
if have_library('mysqlclient')
|
|
|
|
if RUBY_VERSION =~ /1.9/
|
|
|
|
$CFLAGS << ' -DRUBY_19_COMPATIBILITY'
|
|
|
|
end
|
|
|
|
|
2010-03-30 16:56:24 +00:00
|
|
|
create_makefile('mysql2_ext')
|
2010-03-26 08:03:08 +00:00
|
|
|
else
|
2010-03-30 15:46:59 +00:00
|
|
|
puts 'libmysql not found, maybe try manually specifying --with-mysql-lib to find it?'
|
2010-03-26 08:03:08 +00:00
|
|
|
end
|