Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

only do have_header checks if we are embedding libyaml

  • Loading branch information...
commit a38ea94c443e41d404d28926effe056ebc2c5750 1 parent a9d1ae7
@tenderlove authored
Showing with 16 additions and 14 deletions.
  1. +16 −14 ext/psych/extconf.rb
View
30 ext/psych/extconf.rb
@@ -5,21 +5,8 @@
dir_config 'libyaml'
-have_header 'dlfcn.h'
-have_header 'inttypes.h'
-have_header 'memory.h'
-have_header 'stdint.h'
-have_header 'stdlib.h'
-have_header 'strings.h'
-have_header 'string.h'
-have_header 'sys/stat.h'
-have_header 'sys/types.h'
-have_header 'unistd.h'
-
unless find_header('yaml.h') && find_library('yaml', 'yaml_get_version')
- if $mswin
- $CFLAGS += " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
- end
+ # Embed libyaml since we could not find it.
srcdir = File.expand_path File.dirname __FILE__
files = Dir.chdir File.join(srcdir, 'yaml') do
@@ -30,6 +17,21 @@
FileUtils.cp_r files, srcdir
+ if $mswin
+ $CFLAGS += " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
+ end
+
+ have_header 'dlfcn.h'
+ have_header 'inttypes.h'
+ have_header 'memory.h'
+ have_header 'stdint.h'
+ have_header 'stdlib.h'
+ have_header 'strings.h'
+ have_header 'string.h'
+ have_header 'sys/stat.h'
+ have_header 'sys/types.h'
+ have_header 'unistd.h'
+
find_header 'yaml.h'
have_header 'config.h'
end
Please sign in to comment.
Something went wrong with that request. Please try again.