Add check for whether the platform is MMX capable and add the relevant
flags if so.
This commit is contained in:
parent
130fffc0cd
commit
3e471ddf1d
28
configure.ac
28
configure.ac
|
@ -283,6 +283,34 @@ if test "$XNEST" = yes; then
|
|||
fi
|
||||
AM_CONDITIONAL(XNEST, [test x$XNEST = xyes])
|
||||
|
||||
|
||||
# Checks to see if we should compile in MMX support (there will be
|
||||
# a runtime test when the code is actually run to see if it should
|
||||
# be used - this just checks if we can compile it.)
|
||||
#
|
||||
# This code is partially taken from Mesa via gtk+
|
||||
#
|
||||
AC_MSG_CHECKING(for MMX capable platform)
|
||||
case $host_cpu in
|
||||
i386|i486|i586|i686|i786|k6|k7|amd64|x86-64)
|
||||
use_x86_asm=yes
|
||||
;;
|
||||
*)
|
||||
use_x86_asm=no
|
||||
esac
|
||||
|
||||
if [[[ x$use_x86_asm = xyes && "x$GCC" = "xyes" ]]] ; then
|
||||
AC_PREPROC_IFELSE([
|
||||
#if (!defined (__GNUC__) || __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
|
||||
#error Not supported
|
||||
#endif
|
||||
], mmx_capable=yes, mmx_capable=no)
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$mmx_capable])
|
||||
|
||||
AM_CONDITIONAL(MMX_CAPABLE, [test x$mmx_capable = xyes])
|
||||
|
||||
dnl
|
||||
dnl Definitions for XWin DDX
|
||||
dnl
|
||||
|
|
|
@ -4,6 +4,11 @@ AM_CFLAGS = $(DIX_CFLAGS)
|
|||
|
||||
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h
|
||||
|
||||
if MMX_CAPABLE
|
||||
AM_CFLAGS += -mmmx -msse -Winline --param inline-unit-growth=10000 \
|
||||
--param large-function-growth=10000 -DUSE_MMX
|
||||
endif
|
||||
|
||||
libfb_la_SOURCES = \
|
||||
fb.h \
|
||||
fb24_32.c \
|
||||
|
|
Loading…
Reference in New Issue
Block a user