diff options
Diffstat (limited to 'ext/psych/extconf.rb')
-rw-r--r-- | ext/psych/extconf.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb index 5e50432..a859c98 100644 --- a/ext/psych/extconf.rb +++ b/ext/psych/extconf.rb @@ -2,8 +2,24 @@ require 'mkmf' $CFLAGS << " -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline" +LIBDIR = Config::CONFIG['libdir'] +INCLUDEDIR = Config::CONFIG['includedir'] + +LIB_DIRS = [ + '/opt/local/lib', + '/usr/local/lib', + LIBDIR, + '/usr/lib', +] + libyaml = dir_config('libyaml', '/opt/local/include', '/opt/local/lib') -find_header('yaml.h') +unless find_header('yaml.h') + abort "yaml.y is missing. try 'port install libyaml +universal' or 'yum install libyaml-devel'" +end + +unless find_library('yaml', 'yaml_get_version') + abort "libyaml is missing. try 'port install libyaml +universal' or 'yum install libyaml-devel'" +end create_makefile('psych/psych') |