just like how you build nginx.
the configure is from openresty tarball
./configure --help | grep add
--with-http_addition_module enable ngx_http_addition_module
--add-module=PATH enable external module
--add-dynamic-module=PATH enable dynamic external module