#!/bin/bash
# Possible values are nox, gtk, or x11
: ${EMACS_TOOLKIT:=gtk}
if test "$EMACS_TOOLKIT" = gtk; then
    LC_NUMERIC=POSIX
    export LC_NUMERIC
fi
if test -e ${0}-${EMACS_TOOLKIT} ; then
 exec -a ${0} ${0}-${EMACS_TOOLKIT} ${1+"$@"}
elif test -e ${0}-x11 ; then
 exec -a ${0} ${0}-x11 ${1+"$@"}
elif test -e ${0}-nox ; then
 exec -a ${0} ${0}-nox ${1+"$@"}
else
    echo "no emacs binary found"
    exit 1
fi
