1 require 'mkmf' 2 3 dir_config('yourlib') 4 5 if have_header('yourlib.h') and have_library('yourlib', 'yourlib_init') 6 # If you use swig -c option, you may have to link libswigrb. 7 # have_library('swigrb') 8 create_makefile('yourlib') 9 end 10