From: Hiroshi IGARASHI Date: 2000-07-07T00:35:14+09:00 Subject: [ruby-dev:10254] Re: [ruby-ext:00646] have_func in extconf.rb いがらしです。 have_funcメソッドに関してドキュメントを修正してみました。 追加したheader引数ですが、あえて省略可能だとは書いていません。 (今となっては)ライブラリ関数はヘッダファイルをincludeしてから 使うのが普通だと思うので。 -- 五十嵐 宏 (Hiroshi IGARASHI) Index: README.EXT =================================================================== RCS file: /home/cvs/ruby/README.EXT,v retrieving revision 1.7 diff -u -r1.7 README.EXT --- README.EXT 2000/05/01 09:41:10 1.7 +++ README.EXT 2000/07/06 15:25:30 @@ -585,7 +585,7 @@ condition. have_library(lib, func): check whether library containing function exists. - have_func(func): check whether function exists + have_func(func, header): check whether function exists have_header(header): check whether header file exists create_makefile(target): generate Makefile @@ -975,11 +975,11 @@ Checks whether library which contains specified function exists. Returns true if the library exists. - have_func(func) + have_func(func, header) -Checks whether func exists. Returns true if the function exists. To -check functions in the additional library, you need to check that -library first using have_library(). +Checks whether func exists with header. Returns true if the function +exists. To check functions in the additional library, you need to +check that library first using have_library(). have_header(header) Index: README.EXT.jp =================================================================== RCS file: /home/cvs/ruby/README.EXT.jp,v retrieving revision 1.5 diff -u -r1.5 README.EXT.jp --- README.EXT.jp 2000/03/06 04:15:29 1.5 +++ README.EXT.jp 2000/07/06 15:25:34 @@ -694,7 +694,7 @@ 数を使うことが出来ます. have_library(lib, func): ライブラリの存在チェック - have_func(func): 関数の存在チェック + have_func(func, header): 関数の存在チェック have_header(header): ヘッダファイルの存在チェック create_makefile(target): Makefileの生成 @@ -1134,11 +1134,12 @@ 関数funcを定義しているライブラリlibの存在を -Lpath を追加 しながらチェックする.ライブラリが見付かった時,trueを返す. -have_func(func) +have_func(func, header) - 関数funcの存在をチェックする.funcが標準ではリンクされない - ライブラリ内のものである時には先にhave_libraryでそのライブ - ラリをチェックしておく事.関数が存在する時trueを返す. + ヘッダファイルheaderをインクルードして関数funcの存在をチェッ + クする.funcが標準ではリンクされないライブラリ内のものであ + る時には先にhave_libraryでそのライブラリをチェックしておく + 事.関数が存在する時trueを返す. have_header(header)