ext/revdispatch/extconf.rb in evdispatch-0.1.1 vs ext/revdispatch/extconf.rb in evdispatch-0.1.2
- old
+ new
@@ -9,19 +9,26 @@
# configure and build #{libev} and #{libdispatch} we'll link against the static libraries
if !system("cd #{libdispatch} && ./configure && make")
STDERR.puts "Failed to compile #{libdispatch}er"
exit(1)
end
+ system("mkdir libdeps")
+ # copy the .a files into this folder
+ system("cp #{libdispatch}/src/.libs/libdispatch.a libdeps")
+ system("cp #{libdispatch}/#{libev}/.libs/libev.a libdeps")
end
$srcs = ['revdispatch.cc']
$objs = ['revdispatch.o']
# put the header files first
$CPPFLAGS = " -I./#{libdispatch}/ -I./#{libdispatch}/src -I./#{libdispatch}/#{libev}/ #{$CPPFLAGS}"
# link to the static library versions of libdispatch and #{libev}
-$LDFLAGS << " ./#{libdispatch}/src/.libs/libdispatch.a ./#{libdispatch}/#{libev}/.libs/libev.a "
+#$LDFLAGS << " ./#{libdispatch}/src/.libs/libdispatch.a ./#{libdispatch}/#{libev}/.libs/libev.a "
+#$LIBS << " -L./#{libdispatch}/#{libev}/.libs/ -lev"
+#$LIBS << " -L./#{libdispatch}/src/.libs/ -ldispatch"
+$LIBS << " -Llibdeps -lev -ldispatch"
dir_config("revdispatch")
have_library("c", "main")
have_library("stdc++", "main")
have_library("rt", "clock_gettime")