Autoconf-style options and build API support

Add support for autoconf-style options and build API.