KDE_CHECK_HEADER( X11/extensions/XShm.h,
    [AC_DEFINE(HAVE_X_MITSHM, 1, [Define if you have the X MIT-SHM extension])],
    [],
    [#include <X11/Xlib.h>]
    )

AC_HEADER_TIME

xinerama_save_ldflags="$LDFLAGS"
LDFLAGS="$X_LDFLAGS"

LIB_XINERAMA=

KDE_CHECK_HEADER(X11/extensions/Xinerama.h,
    [
    AC_CHECK_LIB(Xinerama,XineramaQueryExtension,
	[
        AC_DEFINE(HAVE_XINERAMA, 1, [Define if you have the Xinerama extension])
	LIB_XINERAMA="-lXinerama -lXext"
        ],
        [],
        [ $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
     ], [],
     [
     #include <X11/Xlib.h>
     ] )

AC_SUBST(LIB_XINERAMA)
LDFLAGS="$xinerama_save_ldflags"

AM_PROG_AS

ksplashx_asm_defs=
case $host_cpu in
  i*86 )
  AC_MSG_CHECKING(for assembler support for IA32 extensions)
 
  dnl MMX check
  AC_TRY_COMPILE(, [ __asm__("pxor %mm0, %mm0") ],
  [
    echo $ECHO_N "MMX yes$ECHO_C"
    AC_DEFINE_UNQUOTED(HAVE_X86_MMX, 1, [Define to 1 if the assembler supports MMX instructions.])
    ksplashx_asm_defs="$ksplashx_asm_defs -DHAVE_X86_MMX"
  ], [ echo $ECHO_N "MMX no$ECHO_C" ])
  echo
  ;;
esac

KSPLASHX_ASM_DEFS="$ksplashx_asm_defs"
AC_SUBST(KSPLASHX_ASM_DEFS)
