[Gridflow-cvs] [svn] commit: r6715 - /trunk/configure

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sat Mar 5 18:51:46 EST 2011


Author: matju
Date: Sat Mar  5 18:51:46 2011
New Revision: 6715

Log:
detect pentium on osx ? maybe

Modified:
    trunk/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Sat Mar  5 18:51:46 2011
@@ -229,12 +229,14 @@
 	options ["HAVE_PENTIUM"]
 	test proc {
 		(CONFIG["arch"] =~ /(i\d86|x86_64|universal)/) or raise "#{CONFIG["arch"]} instead"
+		cflags = []
+		cflags << "-arch" << "i386" if OSX
 		c_test '#define cpuid(func,ax,bx,cx,dx) \
 			__asm__ __volatile__("cpuid":"=a"(ax),"=b"(bx),"=c"(cx),"=d"(dx):"a"(func))
 		#include <stdio.h>
 		main() {int a[4]; cpuid(0,a[0],a[1],a[2],a[3]);
 		  fprintf(stderr,"cpuid: name=\"%.4s%.4s%.4s\", flags=0x%08x\n",
-		  (char *)&a[1],(char *)&a[3],(char *)&a[2],a[0]); return 0;}'}}
+		  (char *)&a[1],(char *)&a[3],(char *)&a[2],a[0]); return 0;}',nil,cflags}}
 Feature.add(:mmx,"MMX-compatible CPU in 32-bit mode with NASM") {
 	uses_feature [:pentium]
 	produces_o ["src/mmx.o","src/mmx_loader.o"]



More information about the Gridflow-cvs mailing list