Ruby Programming/Standard Library/mkmf

The general usage of mkmf.rb file is typically to be something like what autoconf/automake/configure are for Linux programs--it determines appropriate compile/link options, then compiles files against them.

Typically you'd have a

require 'mkmf'

at the top of an extconf.rb file, within a gem.

The general usage is to then edit some global variables ("magic" variables), which will be used for the compile line.