have_var

have_var(var, headers = nil, opt = "", &b)
Instance Public methods

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_.

To check variables in an additional library, you need to check that library first using have_library().

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

doc_ruby_on_rails
2015-04-17 22:29:52
Comments
Leave a Comment

Please login to continue.