with_config

with_config(config, default=nil) Instance Public methods Tests for the presence of a --with-config or --without-config option. Returns true if the with option is given, false if the without option is given, and the default value otherwise. This can be useful for adding custom definitions, such as debug information. Example: if with_config("debug") $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" end

try_type

try_type(type, headers = nil, opt = "", &b) Instance Public methods Returns whether or not the static type type is defined. See also have_type

try_const

try_const(const, headers = nil, opt = "", &b) Instance Public methods Returns whether or not the constant const is defined. See also have_const

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 H

have_type

have_type(type, headers = nil, opt = "", &b) Instance Public methods Returns whether or not the static type type is defined. You may optionally pass additional headers to check against in addition to the common header files. You may also pass additional flags to opt which are then passed along to the compiler. If found, a macro is passed as a preprocessor constant to the compiler using the type name, in uppercase, prepended with HAVE_TYPE_. For example, if have_type('foo') ret

have_struct_member

have_struct_member(type, member, headers = nil, opt = "", &b) Instance Public methods Returns whether or not the struct of type type contains member. If it does not, or the struct type can't be found, then false is returned. You may optionally specify additional headers in which to look for the struct (in addition to the common header files). If found, a macro is passed as a preprocessor constant to the compiler using the type name and the member name, in uppercase, prepended

have_macro

have_macro(macro, headers = nil, opt = "", &b) Instance Public methods Returns whether or not macro is defined either in the common header files or within any headers you provide. Any options you pass to opt are passed along to the compiler.

have_library

have_library(lib, func = nil, headers = nil, opt = "", &b) Instance Public methods Returns whether or not the given entry point func can be found within lib. If func is nil, the main() entry point is used by default. If found, it adds the library to list of libraries to be used when linking your extension. If headers are provided, it will include those header files as the header files it looks in when searching for func. The real name of the library to be linked can be altere

have_header

have_header(header, preheaders = nil, opt = "", &b) Instance Public methods Returns whether or not the given header file can be found on your system. If found, a macro is passed as a preprocessor constant to the compiler using the header file name, in uppercase, prepended with HAVE_. For example, if have_header('foo.h') returned true, then the HAVE_FOO_H preprocessor macro would be passed to the compiler.

have_func

have_func(func, headers = nil, opt = "", &b) Instance Public methods Returns whether or not the function func 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 function name, in uppercase, prepended with HAVE_. To check functions in an additional library, you need to check that library first using have_library(). The func shall be either mere function name or functi