Actually hook the cpuinfo module into the library. :)
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40741
This commit is contained in:
parent
9842d74f34
commit
9a9e553e1d
5 changed files with 28 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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
|
||||
|
|
15
test/testcpuinfo.c
Normal file
15
test/testcpuinfo.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
/* 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue