#! /bin/sh

# clone-flexdll
#
# Brings in flexdll, if necessary

if [ -d "flexdll" ] && [ -f "flexdll/flexdll.c" ]; then
    echo "[Flexdll] Already present, no need to clone."
else
    echo "[Flexdll] Cloning..."
    git clone https://github.com/ocaml/flexdll.git
    cd flexdll
    git checkout 0.43
    cd ..
    echo "[Flexdll] Clone successful!"
fi
./configure --build=x86_64-unknown-cygwin --host=x86_64-w64-mingw32 --prefix="$cur__install"
make flexdll
