Skip to content

Instantly share code, notes, and snippets.

@mag
Created January 27, 2010 06:49
Show Gist options
  • Save mag/287606 to your computer and use it in GitHub Desktop.
Save mag/287606 to your computer and use it in GitHub Desktop.
def add_define(name)
$defs.push("-D#{name}")
end
add_define 'BUILD_FOR_RUBY'
add_define 'HAVE_RBTRAP' if have_var('rb_trap_immediate', ['ruby.h', 'rubysig.h'])
add_define "HAVE_TBR" if have_func('rb_thread_blocking_region')# and have_macro('RUBY_UBF_IO', 'ruby.h')
GNU_CHAIN = true
OS_UNIX = true
add_define 'OS_UNIX'
add_define "HAVE_KQUEUE" if have_header("sys/event.h") and have_header("sys/queue.h")
CONFIG['LDSHARED'] = "$(CXX) " + CONFIG['LDSHARED'].split[1..-1].join(' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment