These are some notes on building XS on OpenBSD 6.0. YMMV with other versions (maybe). They follow the build routine outlined in the INSTALL document.
NOTE: Prefixes for install target directories (established by the --prefix option in configure) are not discussed -- this seems to be more of a personal preference for people, even though I must mention that the OpenBSD package manager installs its bits into /usr/local/bin; so, you may not want to use that for your prefix. However, I gather, from reading the openbsd-misc mailing list, that some experienced users still install non-package-manager software there also. Your choice.
As a prerequisite, you might have to pkg_add the following (I'm not sure, because I didn't start from a clean OpenBSD install; so this is a "best guess"): autoconf, automake, boehm-gc, boost, gmake.