# HG changeset patch # User Sam Lantinga # Date 1069121817 0 # Node ID e70f80e98f60702df2a06e402b875ee6bfdb289c # Parent 22dbf364c01789711eb0a1f484180fed45370fb3 Actually hook the cpuinfo module into the library. :) diff -r 22dbf364c017 -r e70f80e98f60 configure.in --- a/configure.in Tue Nov 18 01:27:06 2003 +0000 +++ b/configure.in Tue Nov 18 02:16:57 2003 +0000 @@ -226,6 +226,15 @@ 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() diff -r 22dbf364c017 -r e70f80e98f60 src/Makefile.am --- a/src/Makefile.am Tue Nov 18 01:27:06 2003 +0000 +++ b/src/Makefile.am Tue Nov 18 02:16:57 2003 +0000 @@ -7,7 +7,7 @@ # 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@ diff -r 22dbf364c017 -r e70f80e98f60 src/cpuinfo/Makefile.am --- a/src/cpuinfo/Makefile.am Tue Nov 18 01:27:06 2003 +0000 +++ b/src/cpuinfo/Makefile.am Tue Nov 18 02:16:57 2003 +0000 @@ -16,7 +16,6 @@ if HAVE_NASM ARCH_SRCS = \ - gcpuinfo.c \ _cpuinfo.asm \ _pcihelp.asm else @@ -24,6 +23,8 @@ endif COMMON_SRCS = \ + cpuinfo.h \ + gcpuinfo.c \ SDL_cpuinfo.c libcpuinfo_la_SOURCES = $(ARCH_SRCS) $(COMMON_SRCS) diff -r 22dbf364c017 -r e70f80e98f60 test/Makefile.am --- a/test/Makefile.am Tue Nov 18 01:27:06 2003 +0000 +++ b/test/Makefile.am Tue Nov 18 02:16:57 2003 +0000 @@ -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 diff -r 22dbf364c017 -r e70f80e98f60 test/testcpuinfo.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/testcpuinfo.c Tue Nov 18 02:16:57 2003 +0000 @@ -0,0 +1,15 @@ + +/* Test program to check SDL's CPU feature detection */ + +#include + +#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); +}