mysql2/ext/extconf.rb

21 lines
545 B
Ruby
Raw Normal View History

2010-03-26 08:03:08 +00:00
# encoding: UTF-8
require 'mkmf'
2010-03-26 08:03:08 +00:00
dir_config('mysql')
if !have_header('mysql.h') && !have_header('mysql/mysql.h')
2010-04-06 22:32:36 +00:00
raise 'MySQL headers not found, maybe try manually specifying --with-mysql-dir=/path/to/mysql/installation'
end
2010-03-26 08:03:08 +00:00
$CFLAGS << ' -Wall -Wextra -funroll-loops'
# $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
create_makefile('mysql2_ext')
2010-03-26 08:03:08 +00:00
else
raise 'libmysql not found, maybe try manually specifying --with-mysql-lib=/path/to/mysql/libs'
2010-03-26 08:03:08 +00:00
end