#!/bin/sh --
v() { echo "$@"; "$@"; }
v docs/naturaldocs/run_docs.sh --nonfatal
if echo "${OSTYPE:-$(uname)}" | grep -q '^darwin' ; then
echo "Having trouble on OS X? Try: brew install autoconf libtool automake gettext pkg-config cmake"
fi
if ! v autoreconf -f -i ; then
exit 1
fi
(
echo "/* Generated from config.hin via autoheader for cmake; see bootstrap.sh. */"
sed -E \
-e '1d' \
-e '/ENABLE_/{s:#undef:#define:;s:([^ ]*)$:\1 @\1@:;}' \
-e 's:#undef:#cmakedefine:' \
src/config.hin
) > src/config.h.cmake