#!/bin/sh

thread="no"

case $1 in
-help)
    echo "Usage: lablgtk [-thread] <options> [script-file]"
    echo "  -thread  use the threaded version of the toplevel"
    ;;
-thread)
    thread=yes
    shift
    ;;
esac

if test $thread = yes; then
    toplevel="/usr/local/lib/ocaml/lablgtk/lablgtktop_t -I +threads"
else
    toplevel=/usr/local/lib/ocaml/lablgtk/lablgtktop
fi

exec $toplevel -w s -I /usr/local/lib/ocaml/lablGL \
     -I /usr/local/lib/ocaml/lablgtk $*
