# -*- shell-script -*- :mode=shellscript:
POLYML_HOME="$COMPONENT"
# platform preference
if grep "ML_system_64.*=.*true" "$ISABELLE_HOME_USER/etc/preferences" >/dev/null 2>/dev/null
then
ML_SYSTEM_64="true"
else
ML_SYSTEM_64="false"
fi
case "${ISABELLE_PLATFORM}:${ML_SYSTEM_64}" in
x86-cygwin:true)
PLATFORMS="x86_64-windows x86-windows"
;;
x86-cygwin:*)
PLATFORMS="x86-windows x86_64-windows"
;;
*:true)
PLATFORMS="$ISABELLE_PLATFORM64 $ISABELLE_PLATFORM32"
;;
*)
PLATFORMS="$ISABELLE_PLATFORM32 $ISABELLE_PLATFORM64"
;;
esac
# check executable
unset ML_HOME
for PLATFORM in $PLATFORMS
do
if [ -z "$ML_HOME" ]
then
if "$POLYML_HOME/$PLATFORM/polyi" -v </dev/null >/dev/null 2>/dev/null
then
# ML settings
ML_SYSTEM=polyml-5.7
ML_PLATFORM="$PLATFORM"
ML_HOME="$POLYML_HOME/$ML_PLATFORM"
ML_SOURCES="$POLYML_HOME/src"
case "$ML_PLATFORM" in
x86_64-windows)
ML_OPTIONS="-H 1000 --codepage utf8"
;;
x86-windows)
ML_OPTIONS="-H 500 --codepage utf8"
;;
x86_64-*)
ML_OPTIONS="-H 1000"
;;
*)
ML_OPTIONS="-H 500"
;;
esac
fi
fi
done
unset PLATFORM
unset PLATFORMS