#!/bin/sh
set -e

OPTIONS="--enable-static --disable-shared --without-glib --disable-docs"

if [ "$config_build_pic" = yes ]; then
    OPTIONS="$OPTIONS --with-pic"
fi
if [ "$config_build_host" ]; then
    OPTIONS="$OPTIONS --host=$config_build_host"
fi

set -x
cd "$config_fribidi_source"
if [ -e ./bootstrap ]; then
    ./bootstrap
else
    NOCONFIGURE=1 ./autogen.sh
fi
./configure --prefix="$config_local_prefix" --libdir="$config_local_prefix/lib" $OPTIONS "$@"
