summaryrefslogtreecommitdiff
path: root/ext/tcltklib/extconf.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-11 04:51:21 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-11 04:51:21 +0000
commit3514110b89bee5c37e308b4ca887e66dfe841456 (patch)
treed280d8542cc44d1cd1a75e8ec87b1f9d231561b7 /ext/tcltklib/extconf.rb
parent05f5928c9d0f094d1e7e21a9bd9d8a8fc2f1a805 (diff)
* ext/tk/lib/tk/*: untabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib/extconf.rb')
-rw-r--r--ext/tcltklib/extconf.rb84
1 files changed, 42 insertions, 42 deletions
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb
index f17354fcaf..8ec34f0214 100644
--- a/ext/tcltklib/extconf.rb
+++ b/ext/tcltklib/extconf.rb
@@ -42,7 +42,7 @@ def find_tcl(tcllib, stubs)
else
%w[8.5 8.4 8.3 8.2 8.1 8.0 7.6].find { |ver|
find_library("tcl#{ver}", func, *paths) or
- find_library("tcl#{ver.delete('.')}", func, *paths)
+ find_library("tcl#{ver.delete('.')}", func, *paths)
}
end
end
@@ -63,7 +63,7 @@ def find_tk(tklib, stubs)
else
%w[8.5 8.4 8.3 8.2 8.1 8.0 4.2].find { |ver|
find_library("tk#{ver}", func, *paths) or
- find_library("tk#{ver.delete('.')}", func, *paths)
+ find_library("tk#{ver.delete('.')}", func, *paths)
}
end
end
@@ -90,47 +90,47 @@ def pthread_check()
else
# tcl-thread is unknown and tclConfig.sh is given
begin
- open(tclConfig, "r") do |cfg|
- while line = cfg.gets()
- if line =~ /^\s*TCL_THREADS=(0|1)/
- tcl_enable_thread = ($1 == "1")
- break
- end
-
- if line =~ /^\s*TCL_MAJOR_VERSION=("|')(\d+)\1/
- tcl_major_ver = $2
- if tcl_major_ver =~ /^[1-7]$/
- tcl_enable_thread = false
- break
- end
- if tcl_major_ver == "8" && tcl_minor_ver == "0"
- tcl_enable_thread = false
- break
- end
- end
-
- if line =~ /^\s*TCL_MINOR_VERSION=("|')(\d+)\1/
- tcl_minor_ver = $2
- if tcl_major_ver == "8" && tcl_minor_ver == "0"
- tcl_enable_thread = false
- break
- end
- end
- end
- end
-
- if tcl_enable_thread == nil
- # not find definition
- if tcl_major_ver
- puts("Warning: '#{tclConfig}' doesn't include TCL_THREADS definition.")
- else
- puts("Warning: '#{tclConfig}' may not be a tclConfig file.")
- end
- tclConfig = false
- end
+ open(tclConfig, "r") do |cfg|
+ while line = cfg.gets()
+ if line =~ /^\s*TCL_THREADS=(0|1)/
+ tcl_enable_thread = ($1 == "1")
+ break
+ end
+
+ if line =~ /^\s*TCL_MAJOR_VERSION=("|')(\d+)\1/
+ tcl_major_ver = $2
+ if tcl_major_ver =~ /^[1-7]$/
+ tcl_enable_thread = false
+ break
+ end
+ if tcl_major_ver == "8" && tcl_minor_ver == "0"
+ tcl_enable_thread = false
+ break
+ end
+ end
+
+ if line =~ /^\s*TCL_MINOR_VERSION=("|')(\d+)\1/
+ tcl_minor_ver = $2
+ if tcl_major_ver == "8" && tcl_minor_ver == "0"
+ tcl_enable_thread = false
+ break
+ end
+ end
+ end
+ end
+
+ if tcl_enable_thread == nil
+ # not find definition
+ if tcl_major_ver
+ puts("Warning: '#{tclConfig}' doesn't include TCL_THREADS definition.")
+ else
+ puts("Warning: '#{tclConfig}' may not be a tclConfig file.")
+ end
+ tclConfig = false
+ end
rescue Exception
- puts("Warning: fail to read '#{tclConfig}'!! --> ignore the file")
- tclConfig = false
+ puts("Warning: fail to read '#{tclConfig}'!! --> ignore the file")
+ tclConfig = false
end
end
end