Sha256: ec8c3412ee13e1e3ef988862b6d21afa67b7abe86cbeef6d46dbf21ee0dc88bb
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
require "mkmf" def tweak_include dir = File.dirname __FILE__ multipart_dir = File.join dir, "multipart-parser-c" http_parser_dir = File.join dir, "http-parser" flags = " -I#{multipart_dir.shellescape} -I#{http_parser_dir.shellescape}" $CFLAGS << flags $CPPFLAGS << flags end def tweak_cflags mf_conf = RbConfig::MAKEFILE_CONFIG if mf_conf['CC'] =~ /gcc/ $CFLAGS << ' -std=c99 -Wno-declaration-after-statement $(xflags)' end $CPPFLAGS << ' $(xflags)' puts "To enable debug: make xflags='-DDEBUG -O0'" end # for debugging low versions of gcc def use_gcc42 RbConfig::MAKEFILE_CONFIG['CC'] = `which gcc-4.2`.strip RbConfig::MAKEFILE_CONFIG['CXX'] = `which g++-4.2`.strip end # use_gcc42 have_kqueue = (have_header("sys/event.h") and have_header("sys/queue.h")) have_epoll = have_func('epoll_create', 'sys/epoll.h') abort('no kqueue nor epoll') if !have_kqueue and !have_epoll $defs << "-DNDEBUG -D#{have_epoll ? 'HAVE_EPOLL' : 'HAVE_KQUEUE'}" have_func('rb_ary_new_capa', 'ruby.h') tweak_include tweak_cflags create_makefile 'nyara'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nyara-0.1.pre.0 | ext/extconf.rb |
nyara-0.0.1.pre.9 | ext/extconf.rb |