require 'mkmf'

if /darwin9/ =~ RUBY_PLATFORM
  # OSX 10.5 doesn't like the default "-Os"
  $CFLAGS << " -O1 "
end

dir_config("superredcloth_scan")
have_library("c", "main")

create_makefile("superredcloth_scan")

require 'mkmf'

dir_config("superredcloth_scan")
have_library("c", "main")

create_makefile("superredcloth_scan")

--- 
+++ 
@@ -1,4 +1,9 @@
 require 'mkmf'
+
+if /darwin9/ =~ RUBY_PLATFORM
+  # OSX 10.5 doesn't like the default "-Os"
+  $CFLAGS << " -O1 "
+end
 
 dir_config("superredcloth_scan")
 have_library("c", "main")
Fix for OS X Leopard [Johan Sorensen]

