abinfo "Configuring camlp4 ..."
"$SRCDIR"/configure

abinfo "Building camlp4 ..."
if [[ "${CROSS:-$ARCH}" = "amd64" || "${CROSS:-$ARCH}" = "arm64" || \
      "${CROSS:-$ARCH}" = "ppc64el" ]]; then
    make all camlp4/META
else
    make byte camlp4/META
fi

make \
    BINDIR="$PKGDIR/usr/bin" \
    LIBDIR="$PKGDIR/usr/lib/ocaml" \
    PKGDIR="$PKGDIR/usr/lib/ocaml" \
    install install-META
