diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/ext/psych/extconf.rb |
Fresh start
Diffstat (limited to 'jni/ruby/ext/psych/extconf.rb')
-rw-r--r-- | jni/ruby/ext/psych/extconf.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/jni/ruby/ext/psych/extconf.rb b/jni/ruby/ext/psych/extconf.rb new file mode 100644 index 0000000..65e83a3 --- /dev/null +++ b/jni/ruby/ext/psych/extconf.rb @@ -0,0 +1,38 @@ +# -*- coding: us-ascii -*- +require 'mkmf' +require 'fileutils' + +# :stopdoc: + +dir_config 'libyaml' + +if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_library('yaml', 'yaml_get_version')) + # Embed libyaml since we could not find it. + + $VPATH << "$(srcdir)/yaml" + $INCFLAGS << " -I$(srcdir)/yaml" + + $srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map {|n| File.basename(n)} + + if have_macro("_WIN32") + $CPPFLAGS << " -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 + +create_makefile 'psych' + +# :startdoc: |