changeset 3194:638dc905e030

Updated #285: Added arch check and LIBS to ldflags
author unexist
date Thu, 22 Mar 2012 16:02:19 +0100
parents 356a66f3ae00
children 2583e821e800
files Rakefile
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Rakefile	Tue Mar 20 00:14:30 2012 +0100
+++ b/Rakefile	Thu Mar 22 16:02:19 2012 +0100
@@ -65,8 +65,8 @@
   "revision"   => "3008", #< Latest stable
   "cflags"     => "-Wall -Werror -Wpointer-arith -Wstrict-prototypes -Wunused -Wshadow -std=gnu99",
   "cpppath"    => "-I. -I$(builddir) -Isrc -Isrc/shared -Isrc/subtle -idirafter$(hdrdir) -idirafter$(archdir)",
-  "ldflags"    => "-L$(libdir) $(rpath) -l$(RUBY_SO_NAME)",
-  "extflags"   => "$(LDFLAGS) $(rpath) -l$(RUBY_SO_NAME)",
+  "ldflags"    => "-L$(libdir) $(rpath) $(LIBS) -l$(RUBY_SO_NAME)",
+  "extflags"   => "$(LDFLAGS) $(rpath) $(LIBS) -l$(RUBY_SO_NAME)",
   "rpath"      => "-L$(libdir) -Wl,-rpath=$(libdir)",
   "checksums"  => []
 }
@@ -320,6 +320,11 @@
       end
     end
 
+    # Check arch
+    if RbConfig::CONFIG["arch"].match(/openbsd/)
+      $defs.push("-DIS_OPENBSD")
+    end
+
     # Check header
     HEADER.each do |h|
       fail("Header #{h} was not found") unless have_header(h)