ext/rqr/extconf.rb in z-rqr-0.2.4 vs ext/rqr/extconf.rb in z-rqr-0.2.5
- old
+ new
@@ -9,18 +9,24 @@
--with-tiff-include=dir
--with-tiff-lib=dir
=end
require 'mkmf'
require 'rbconfig'
-$libs = append_library($libs, "supc++")
+if have_library("supc++")
+ $libs = append_library($libs, "supc++")
+end
+
FINK_DIR = '/sw'
MACPORT_DIR = '/opt/local'
+HOMEBREW_DIR = '/usr/local'
if File.exists?(FINK_DIR)
DARWIN_PORT_DIR = FINK_DIR
-else
+elsif File.exists?(MACPORT_DIR)
DARWIN_PORT_DIR = MACPORT_DIR
+else
+ DARWIN_PORT_DIR = HOMEBREW_DIR
end
if RUBY_PLATFORM =~ /darwin/
dir_config('jpeg', DARWIN_PORT_DIR)
dir_config('png', DARWIN_PORT_DIR)