#!/bin/sh

# this is the mmm wrapper shell script - that selects the appropriate
# host and launches it, depending on environment variables
#

if [ -z "$DISPLAY" ]; then
  mmm.linux $*
else

# sdl2 is preferred over sdl1.2 as a long standing resize race is solved
# with that host, and it is maintained for more platforms.
  if command -v mmm.sdl2  > /dev/null 2> /dev/null; then 
    mmm.sdl2 $*
  else
    if command -v mmm.sdl > /dev/null 2> /dev/null ; then
	mmm.sdl $*
    fi
  fi
fi
