ConfigurationOptions

Optional includes

To add -I/opt/include and -L/opt/lib, use --with-opt-dir=/opt.

About CFLAGS

Do not override CFLAGS. If CFLAGS is provided, it is used as a replacement for default flags (i.e., '-ggdb3 -O3' will not be used unless you specify them)

MAINLIBS

Use MAINLIBS to add libraries to the ruby binary only (i.e. no c-extensions). This is ideal for allocators:

make ruby MAINLIBS=-ltcmalloc
make ruby-jemalloc RUBY_INSTALL_NAME=ruby-jemalloc MAINLIBS=-ljemalloc