Sha256: 9564d921c24f687897c174495a3ae22bf20e9ddd74d3dced0de403f193db0722

Contents?: true

Size: 885 Bytes

Versions: 7

Compression:

Stored size: 885 Bytes

Contents

require 'mkmf'
require 'rbconfig'

dir_config('curl')
curl_config_path = with_config('curl-config') || find_executable('curl-config')
if curl_config_path
  $CFLAGS << " " << `#{curl_config_path} --cflags`.strip
  $LIBS << " " << `#{curl_config_path} --libs`.strip
elsif !have_library('curl') or !have_header('curl/curl.h')
  fail <<-EOM
  Can't find libcurl or curl/curl.h

  Try passing --with-curl-config, --with-curl-dir, or --with-curl-lib and --with-curl-include
  options to extconf.
  EOM
end

if CONFIG['CC'] =~ /gcc/
  $CFLAGS << ' -pedantic -Wall'
end

$defs.push("-DUSE_TBR")
$defs.push("-DHAVE_THREAD_H") if have_header('ruby/thread.h')
$defs.push("-DHAVE_TBR") if have_func('rb_thread_blocking_region', 'ruby.h')
$defs.push("-DHAVE_TCWOGVL") if have_header('ruby/thread.h') && have_func('rb_thread_call_without_gvl', 'ruby/thread.h')

create_makefile 'patron/session_ext'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
patron-0.13.3 ext/patron/extconf.rb
patron-0.13.1 ext/patron/extconf.rb
patron-0.12.1 ext/patron/extconf.rb
patron-0.12.0 ext/patron/extconf.rb
patron-0.11.1 ext/patron/extconf.rb
patron-0.11.0 ext/patron/extconf.rb
patron-0.10.0 ext/patron/extconf.rb