From 2bae6457006474655f971891a92341b1ae34840e Mon Sep 17 00:00:00 2001 From: Tobias Grimm Date: Sat, 14 Feb 2009 23:25:05 +0100 Subject: Initial commit --- ruby-config.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ruby-config.rb (limited to 'ruby-config.rb') diff --git a/ruby-config.rb b/ruby-config.rb new file mode 100644 index 0000000..ab23d51 --- /dev/null +++ b/ruby-config.rb @@ -0,0 +1,15 @@ +require 'rbconfig' + +if ARGV.include?('--cflags') + if Config::CONFIG["rubyhdrdir"] + rubyhdrdir = Config::CONFIG["rubyhdrdir"] + arch = Config::CONFIG["arch"] + puts "-I#{rubyhdrdir} -I#{rubyhdrdir}/#{arch}" + else + puts '-I' + Config::CONFIG["archdir"] + end +end + +if ARGV.include?('--libs') + puts Config::CONFIG["LIBRUBYARG"] || "-l" + Config::CONFIG["ruby_install_name"] +end -- cgit v1.2.3