summaryrefslogtreecommitdiff
path: root/ruby-config.rb
diff options
context:
space:
mode:
authorTobias Grimm <tobias@e-tobi.loc>2009-02-14 23:25:05 +0100
committerTobias Grimm <tobias@e-tobi.loc>2009-02-14 23:25:05 +0100
commit2bae6457006474655f971891a92341b1ae34840e (patch)
tree30a813fdbb1c096a08d7c35dd59fafc3f65154f4 /ruby-config.rb
downloadvdr-plugin-scripting-2bae6457006474655f971891a92341b1ae34840e.tar.gz
vdr-plugin-scripting-2bae6457006474655f971891a92341b1ae34840e.tar.bz2
Initial commitv0.0.1branches/v0.0.1
Diffstat (limited to 'ruby-config.rb')
-rw-r--r--ruby-config.rb15
1 files changed, 15 insertions, 0 deletions
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