2012-11-28 07:22:47 -05:00
|
|
|
# -*- coding: us-ascii -*-
|
2017-07-14 02:15:58 -04:00
|
|
|
# frozen_string_literal: true
|
2010-03-28 17:49:37 -04:00
|
|
|
require 'mkmf'
|
2012-11-27 23:34:41 -05:00
|
|
|
require 'fileutils'
|
2010-03-28 17:49:37 -04:00
|
|
|
|
|
|
|
# :stopdoc:
|
|
|
|
|
2010-03-29 19:57:43 -04:00
|
|
|
dir_config 'libyaml'
|
2010-03-28 17:49:37 -04:00
|
|
|
|
2012-11-29 01:54:53 -05:00
|
|
|
if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_library('yaml', 'yaml_get_version'))
|
2012-11-27 23:34:41 -05:00
|
|
|
# Embed libyaml since we could not find it.
|
|
|
|
|
2012-11-28 07:21:19 -05:00
|
|
|
$VPATH << "$(srcdir)/yaml"
|
|
|
|
$INCFLAGS << " -I$(srcdir)/yaml"
|
2012-11-28 00:52:11 -05:00
|
|
|
|
2019-06-02 00:00:27 -04:00
|
|
|
$srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map {|n| File.basename(n)}.sort
|
2010-03-28 17:49:37 -04:00
|
|
|
|
2012-11-28 07:22:47 -05:00
|
|
|
if have_macro("_WIN32")
|
|
|
|
$CPPFLAGS << " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
|
2012-11-27 23:34:41 -05:00
|
|
|
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-28 17:49:37 -04:00
|
|
|
|
2010-03-30 08:21:55 -04:00
|
|
|
create_makefile 'psych'
|
2010-03-28 17:49:37 -04:00
|
|
|
|
|
|
|
# :startdoc:
|