Bug #3307
closedext/tk がheader fileの有無を誤判定する
Description
=begin
樽家です。
tcl.hが無いのにコンパイルをしようとして失敗します。
mkmf.logを見ると次のようになっていました。
"cl -nologo -E -I../../.ext/include/i386-mswin32_90 -I../../../include -I../../../ext/tk -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DHAVE_NO_LPFN_DECLS=1 -DHAVE_NO_FINDEX_ENUMS=1 -DTCL_CFGVAL_ENCODING="cp1252" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DHAVE_UXTHEME_H=1 -MD -Zi -W2 -wd4996 -O2sy- -Zm600 -I/mingw/include conftest.c -P"
conftest.c
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #define WIN32_LEAN_AND_MEAN
4: #define WIN32
5: #include <winsock2.h>
6: #include <ws2tcpip.h>
7: #include <windows.h>
8: tcl.h
/ end */
"cl -nologo -E -I../../.ext/include/i386-mswin32_90 -I../../../include -I../../../ext/tk -I/mingw/include -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DHAVE_NO_LPFN_DECLS=1 -DHAVE_NO_FINDEX_ENUMS=1 -DTCL_CFGVAL_ENCODING="cp1252" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DHAVE_UXTHEME_H=1 -MD -Zi -W2 -wd4996 -O2sy- -Zm600 conftest.c -P"
conftest.c
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #define WIN32_LEAN_AND_MEAN
4: #define WIN32
5: #include <winsock2.h>
6: #include <ws2tcpip.h>
7: #include <windows.h>
8: tk.h
/ end */
パッチです。
Index: ext/tk/extconf.rb¶
--- ext/tk/extconf.rb (リビジョン 27864)
+++ ext/tk/extconf.rb (作業コピー)
@@ -989,7 +989,7 @@
end
if TclConfig_Info['TCL_INCLUDE_SPEC'] &&
-
have_tcl_h = try_cpp('tcl.h', TclConfig_Info['TCL_INCLUDE_SPEC'])
-
have_tcl_h = try_cpp('#include<tcl.h>', TclConfig_Info['TCL_INCLUDE_SPEC'
])
$INCFLAGS << " " << TclConfig_Info['TCL_INCLUDE_SPEC']
elsif have_tcl_h = have_header('tcl.h')
# find
@@ -1009,7 +1009,7 @@
end
if TkConfig_Info['TK_INCLUDE_SPEC'] &&
-
have_tk_h = try_cpp('tk.h', TkConfig_Info['TK_INCLUDE_SPEC'])
-
$INCFLAGS << " " << TkConfig_Info['TK_INCLUDE_SPEC']have_tk_h = try_cpp('#include<tk.h>', TkConfig_Info['TK_INCLUDE_SPEC'])
elsif have_tk_h = have_header('tk.h')find¶
=end