Sha256: 50380eb3c0eaa40806dc34ab7e5c44477d3158215eb078c62b2871dafb492e35
Contents?: true
Size: 775 Bytes
Versions: 12
Compression:
Stored size: 775 Bytes
Contents
# this code is borrowed from Mysql/Ruby, credit to TOMITA Masahiro # it works for me under OS X and Fedora, hope it works for you also require 'mkmf' if /mswin32/ =~ RUBY_PLATFORM inc, lib = dir_config('mysql') exit 1 unless have_library("libmysql") elsif mc = with_config('mysql-config') then mc = 'mysql_config' if mc == true cflags = `#{mc} --cflags`.chomp exit 1 if $? != 0 libs = `#{mc} --libs`.chomp exit 1 if $? != 0 $CPPFLAGS += ' ' + cflags $libs = libs + " " + $libs else inc, lib = dir_config('mysql', '/usr/local') libs = ['m', 'z', 'socket', 'nsl', 'mygcc'] while not find_library('mysqlclient', 'mysql_query', lib, "#{lib}/mysql") do exit 1 if libs.empty? have_library(libs.shift) end end create_makefile("slim_attrib_ext")
Version data entries
12 entries across 12 versions & 3 rubygems