Implement x86 SIMD framework

Add NASM support and stub routine for detecting SIMD extensions.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@15 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/Makefile.am b/Makefile.am
index 114dd7d..85dcd84 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,3 +13,20 @@
 	jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c \
 	jsimd.c
 
+if WITH_SIMD
+
+BUILT_SOURCES = simd/jsimdcfg.inc
+
+EXTRA_DIST = nasm_lt.sh
+
+libjpeg_la_SOURCES += simd/jsimd.h simd/jsimdcfg.inc.h \
+	simd/jsimdext.inc simd/jsimdcpu.asm
+
+endif
+
+.asm.lo:
+	$(LIBTOOL) --mode=compile --tag NASM ./nasm_lt.sh $(NASM) $(NAFLAGS) $< -o $@
+
+simd/jsimdcfg.inc: simd/jsimdcfg.inc.h jpeglib.h jconfig.h jmorecfg.h
+	$(CPP) $< | grep ^[\;%] | sed 's%_cpp_protection_%%' > $@
+