#!/bin/sh -x

if [ "$1" = "" ] || [ "$2" = "" ]; then
    echo "Usage: $0 <version> <build>"
    exit 1
fi

version=$1
build=$2

fwdir="/Library/Frameworks/UIM.framework"
prefix="/Library/Frameworks/UIM.framework/Versions/${version}"
top=`pwd`
dest="${top}/../../Package/dest"

aclocal-1.9 -I m4 -I ${prefix}/share/aclocal || exit 1
libtoolize --force --copy || exit 1
autoheader || exit 1
automake-1.9 --add-missing --foreign --copy || exit 1
autoconf || exit 1

../fwbuild $@ || exit 1
