--- Makefile.prog.in.orig	Tue Jan 22 06:57:53 2002
+++ Makefile.prog.in	Tue Jun 11 15:54:36 2002
@@ -12,14 +12,14 @@
 
 ALL_LIBS = $(XLIBS) $(LIBS)
 Makefile.lt:
-	echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt
+	echo 'LT_LIBS='`echo $(XLIBS)|sed 's/\.a/.la/g'` >Makefile.lt
 
 PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')
 
 all: $(PROG)
 
 $(PROG): $(OBJS) $(COBJS) $(LT_LIBS)
-	$(LIBTOOL) --mode=link $(CXX) $(LINKFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LT_LIBS)
+	$(LIBTOOL) --mode=link $(CXX) $(LINKFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LT_LIBS) $(LIBS)
 
 install: $(PROG)
 	-test -d $(DESTDIR)$(bindir) || \
