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.
Get the source.
$ git clone https://github.com/frytvm/XS.git
$ cd XS
Running autoreconf -i (as it says to do in INSTALL) should fail, e.g.
$ autoreconf -i
Provide an AUTOCONF_VERSION environment variable, please
unless you set the variables AUTOCONF_VERSION and AUTOCONF_VERSION.
$ export AUTOCONF_VERSION=$(ls -1 $(whence autoconf)-* | tail -1 | awk -F- '{print $NF}')
$ export AUTOMAKE_VERSION=$(ls -1 $(whence automake)-* | tail -1 | awk -F- '{print $NF}')
To confirm this worked, you should get something like this output now:
$ echo AUTOCONF_VERSION=$AUTOCONF_VERSION AUTOMAKE_VERSION=$AUTOMAKE_VERSION
AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.15
Now, do it. It should work.
$ autoreconf -i
configure should be run by setting some variables in its invocation, because gcc and g++ built for the OpenBSD base system do not search the /usr/local/... directories (where the dependencies installed via the package manager live).
$ ./configure CFLAGS="-g -O2 -I/usr/local/include" CXXFLAGS="-g -O2 -I/usr/local/include" LDFLAGS="-L/usr/local/lib"
make is run as usual, but you should probably run GNU make. make is OpenBSD's make. If you installed the gmake package, you can do this.
$ gmake
gmake test will fail because AFAIK there is no /dev/shm on OpenBSD.