Commit 9a9e553e authored by Sam Lantinga's avatar Sam Lantinga

Actually hook the cpuinfo module into the library. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40741
parent 9842d74f
......@@ -226,6 +226,15 @@ if test x$enable_file = xyes; then
else
CFLAGS="$CFLAGS -DDISABLE_FILE"
fi
AC_ARG_ENABLE(cpuinfo,
[ --enable-cpuinfo Enable the cpuinfo subsystem [default=yes]],
, enable_cpuinfo=yes)
if test x$enable_cpuinfo = xyes; then
SDL_EXTRADIRS="$SDL_EXTRADIRS cpuinfo"
SDL_EXTRALIBS="$SDL_EXTRALIBS cpuinfo/libcpuinfo.la"
else
CFLAGS="$CFLAGS -DDISABLE_CPUINFO"
fi
dnl See if the OSS audio interface is supported
CheckOSS()
......
......@@ -7,7 +7,7 @@ CORE_SUBDIRS = \
# These are the subdirectories which may be built
EXTRA_SUBDIRS = \
audio video events joystick cdrom thread timer endian file hermes
audio video events joystick cdrom thread timer endian file cpuinfo hermes
# These are the subdirectories which will be built now
SUBDIRS = $(CORE_SUBDIRS) @SDL_EXTRADIRS@
......
......@@ -16,7 +16,6 @@ noinst_LTLIBRARIES = libcpuinfo.la
if HAVE_NASM
ARCH_SRCS = \
gcpuinfo.c \
_cpuinfo.asm \
_pcihelp.asm
else
......@@ -24,6 +23,8 @@ ARCH_SRCS =
endif
COMMON_SRCS = \
cpuinfo.h \
gcpuinfo.c \
SDL_cpuinfo.c
libcpuinfo_la_SOURCES = $(ARCH_SRCS) $(COMMON_SRCS)
......
AUTOMAKE_OPTIONS = no-dependencies
noinst_PROGRAMS = \
testver testtypes testhread testlock testerror testsem testtimer \
testver testtypes testcpuinfo testhread testlock testerror testsem testtimer \
loopwave testcdrom testkeys testvidinfo checkkeys testwin graywin \
testsprite testbitmap testalpha testgamma testpalette testwm \
threadwin testoverlay testoverlay2 testgl testjoystick
......
/* Test program to check SDL's CPU feature detection */
#include <stdio.h>
#include "SDL.h"
#include "SDL_cpuinfo.h"
int main(int argc, char *argv[])
{
printf("MMX %s\n", SDL_HasMMX() ? "detected" : "not detected");
printf("3DNow %s\n", SDL_Has3DNow() ? "detected" : "not detected");
printf("SSE %s\n", SDL_HasSSE() ? "detected" : "not detected");
return(0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment