Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > mkmfライブラリ > Kernelモジュール > have_var (private)

instance method Kernel#have_var

have_var(var, headers = nil, &b) [added by mkmf]

Returns whether or not the variable +var+ can be found in the common header files, or within any +headers+ that you provide. If found, a macro is passed as a preprocessor constant to the compiler using the variable name, in uppercase, prepended with 'HAVE_'.

For example, if have_var('foo') returned true, then the HAVE_FOO preprocessor macro would be passed to the compiler.