--- h5/glide3/src/makefile.autoconf.am.orig	2000-11-18 10:00:26.000000000 -0600
+++ h5/glide3/src/makefile.autoconf.am	2011-03-06 14:49:35.000000000 -0600
@@ -154,7 +154,6 @@
 #
-PREPROCESSOR=/lib/cpp -$$ -I.
+PREPROCESSOR=$(CPP) -$$ -I.
 xdraw2_def.o xdraw2_def.lo: xdraw2.s xdraw2.inc.s fxgasm.h
 	$(PREPROCESSOR) $< > $*.tmp.s
-	$(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
-	$(CP) $*.o $*.lo
+	libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
 	$(RM) -f $*.tmp.s
@@ -163,4 +162,3 @@
 	$(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
-	$(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
-	$(CP) $*.o $*.lo
+	libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
 	$(RM) -f $*.tmp.s
@@ -169,4 +167,3 @@
 	$(PREPROCESSOR) $< > $*.tmp.s
-	$(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
-	$(CP) $*.o $*.lo
+	libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
 	$(RM) -f $*.tmp.s
@@ -175,4 +172,3 @@
 	$(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
-	$(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
-	$(CP) $*.o $*.lo
+	libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
 	$(RM) -f $*.tmp.s
@@ -181,4 +177,3 @@
 	$(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
-	$(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
-	$(CP) $*.o $*.lo
+	libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
 	$(RM) -f $*.tmp.s
@@ -188,8 +183,7 @@
 else
-CPUSOURCES = cpudtect.s 
+CPUSOURCES = cpudtect_asm.s 
 
-cpudtect.o cpudtect.lo: cpudtect.s
+cpudtect_asm.o cpudtect_asm.lo: cpudtect.s
 	$(PREPROCESSOR) -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
-	$(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
-	$(CP) $*.o $*.lo
+	libtool --mode=compile $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
 	$(RM) -f $*.tmp.s
@@ -204,3 +198,3 @@
 if GL_AMD3D
-FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s
+FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s xtexdl_3dnow.s xdraw2_def.s xdraw3_def.s
 else
@@ -216,3 +210,3 @@
              $(top_builddir)/@FX_GLIDE_HW@/minihwc/libminihwc.la
-LINK_LIBS  = -L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -lm
+LINK_LIBS  = -L$(LOCALBASE)/lib -lX11 -lXext -lXxf86dga -lXxf86vm -lm
 
@@ -231,2 +225,3 @@
 fxgasm_DEPENDENCIES    = gthread.lo
+fxgasm_CFLAGS          = $(AM_CFLAGS)
 
