summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 08:30:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 08:30:09 +0000
commitc7c1384e60a9f3dcc65b3516cdde6dcb7be17f60 (patch)
treeacec075393700c201efd71cc2e3356e43c13212f /ext/extmk.rb.in
parenta7ed0fe4f939de5e0a35de57706c14dd1334d4d9 (diff)
* eval.c (rb_thread_cleanup): should not modify the global
variable curr_thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index a2f1a2c..cebb115 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -295,6 +295,25 @@ SRC
return true
end
+def find_executable(bin, path = nil)
+ if path.nil?
+ path = ENV['PATH'].split(Config::CONFIG['PATH_SEPARATOR'])
+ else
+ path = path.split(Config::CONFIG['PATH_SEPARATOR'])
+ end
+
+ bin += "@EXEEXT@"
+ for dir in path
+ file = File.join(dir, bin)
+ if FileTest.executable?(file)
+ return file
+ else
+ next
+ end
+ end
+ return nil
+end
+
def arg_config(config, default=nil)
unless defined? $configure_args
$configure_args = {}