2010-03-29 01:49:37 +04:00
|
|
|
require 'mkmf'
|
2012-11-28 08:34:41 +04:00
|
|
|
require 'fileutils'
|
2010-03-29 01:49:37 +04:00
|
|
|
|
|
|
|
# :stopdoc:
|
|
|
|
|
2010-03-30 03:57:43 +04:00
|
|
|
dir_config 'libyaml'
|
2010-03-29 01:49:37 +04:00
|
|
|
|
2012-11-28 08:34:41 +04:00
|
|
|
unless find_header('yaml.h') && find_library('yaml', 'yaml_get_version')
|
|
|
|
# Embed libyaml since we could not find it.
|
|
|
|
|
2012-11-28 16:21:19 +04:00
|
|
|
$VPATH << "$(srcdir)/yaml"
|
|
|
|
$INCFLAGS << " -I$(srcdir)/yaml"
|
2012-11-28 09:52:11 +04:00
|
|
|
|
2012-11-28 16:21:19 +04:00
|
|
|
$srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map {|n| File.basename(n)}
|
2010-03-29 01:49:37 +04:00
|
|
|
|
2012-11-28 08:34:41 +04:00
|
|
|
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
|
2010-03-29 01:49:37 +04:00
|
|
|
|
2010-03-30 16:21:55 +04:00
|
|
|
create_makefile 'psych'
|
2010-03-29 01:49:37 +04:00
|
|
|
|
|
|
|
# :startdoc:
|