Sha256: 015daf3e45de9e551bad6cd75ac5c4382d11c4c05c86d5ab3072c8e65c146d63
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
require 'mkmf' libdispatch=File.expand_path("./libdispatch-0.1") libev="libev-3.31" if !File.exist?("#{libdispatch}/src/.libs") or !File.exist?("#{libdispatch}/#{libev}/.libs") system("chmod a+x #{libdispatch}/configure") system("chmod a+x #{libdispatch}/#{libev}/configure") # configure and build #{libev} and #{libdispatch} we'll link against the static libraries if !system("cd #{libdispatch} && ./configure --disable-shared && make") STDERR.puts "Failed to compile #{libdispatch}er" exit(1) end if( !`uname -m `.grep(/ppc/i).empty? ) system("ranlib #{libdispatch}/src/.libs/libdispatch.a") system("ranlib #{libdispatch}/#{libev}/.libs/libev.a") end end # put the header files first $CPPFLAGS = " -Wall -I#{libdispatch}/ -I#{libdispatch}/src -I#{libdispatch}/#{libev}/ #{$CPPFLAGS}" # link to the static library versions of libdispatch and #{libev} if( !`uname`.grep(/linux/i).empty? ) $LDFLAGS << " #{libdispatch}/src/.libs/libdispatch.a #{libdispatch}/#{libev}/.libs/libev.a " end $LIBS << " -L#{libdispatch}/#{libev}/.libs/ -lev" $LIBS << " -L#{libdispatch}/src/.libs/ -ldispatch" dir_config("revdispatch") have_library("c", "main") have_library("stdc++", "main") have_library("rt", "clock_gettime") have_library("pthread", "pthread_create") have_library("curl", "curl_easy_init") create_makefile("revdispatch") puts "LDFLAGS: #{$LDFLAGS}\nLIBS: #{$LIBS}\nCXXFLAGS: #{$CXXFLAGS}"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
evdispatch-0.3.0 | ext/revdispatch/extconf.rb |
evdispatch-0.3.1 | ext/revdispatch/extconf.rb |