
CheckNASM()
{
	if findexe nasm >/dev/null; then
	    echo \
"
* Detected iX86 processor and NASM compiler, adding MMX support for SDL"
#
	    status=0
	else
	    echo \
"
* Couldn't find NASM compiler -- not compiling MMX support for $1
  (NASM is available from: http://www.cryogen.com/Nasm/ ) "
#
		status=1
	fi
	return $status
}

# The following global variables must be set:
#
#	$1		The interface subsystem
#
# The following global variables are set by this function:
#
#	$includes	Header directories for building shared library
#	$options	Compiler flags for building shared library
#	$asmobjs	Assembler objects to add to the build list
#	$libraries	The set of SDL libraries to build
#	$extralibs	Extra libraries necessary for building SDL
#
GenSubsystemFlags()
{
	case $1 in
	  bwindow)
		libraries="$libraries lib/libSDL$1.so.\$(version)"
		;;
	  bscreen)
		libraries="$libraries lib/libSDL$1.so.\$(version)"
		;;
	  *)
		echo "Unknown subsystem '$1'"
		exit 3
		;;
	esac
}

# The following global variables must be set:
#
#	$1		The interface subsystem directory
#
# The following global variables are set by this function:
#
#	$includes	Header directories for building shared library
#	$options	Compiler flags for building shared library
#	$asmobjs	Assembler objects to add to the build list
#	$libraries	The set of SDL libraries to build
#	$extralibs	Extra libraries necessary for building SDL
#
GenMakeFlags()
{
	# Check for NASM and X86 for assembly blitter support
	case `uname -m` in
	  BePC)	if CheckNASM $subsystem; then
		    options="$options -DUSE_ASMBLIT"
		    asmobjs="$asmobjs obj/mmx_main.o"
		    asmobjs="$asmobjs obj/mmxp_32.o"
		    asmobjs="$asmobjs obj/x86_main.o"
		    asmobjs="$asmobjs obj/x86p_16.o"
		    asmobjs="$asmobjs obj/x86p_32.o"
		fi
		;;
	  BeMac)
		;;
	  *)    ;;
	esac
}

# Determine which subsystems to build
possible="BWindow"
