#!/bin/sh

cp $BUILD_PREFIX/share/libtool/build-aux/config.* build-aux/

./configure --prefix=${PREFIX} --build=${HOST} --host=${HOST}
make -j${CPU_COUNT} ${VERBOSE_AT}
# TODO :: Skipped on macOS because of a single test failure:
#
# Checking ./189.eval
# @ ../doc/m4.texi:6405: Origin of test
# ./189.eval: stdout mismatch
# --- m4-tmp.37124/m4-xout	2017-08-28 17:12:33.000000000 -0700
# +++ m4-tmp.37124/m4-out	2017-08-28 17:12:33.000000000 -0700
# @@ -2,8 +2,8 @@
#
#  1
#  1
# -overflow occurred
# --2147483648
# +
# +2147483648
#  0
#  -2
#  -2
echo "Host: ${HOST}"
if [[ ! ${HOST} =~ .*darwin.* ]]; then
  make check
fi
make install
