Index: os/Makefile.am
===================================================================
--- os/Makefile.am	(revision 4525)
+++ os/Makefile.am	(working copy)
@@ -3,7 +3,7 @@
 noinst_LTLIBRARIES = libos.la
 
 libos_la_SOURCES = \
-	$(OS)
+	$$(OS)
 
 EXTRA_libos_la_SOURCES = \
 	posix.c			\
Index: widget/Makefile.am
===================================================================
--- widget/Makefile.am	(revision 4525)
+++ widget/Makefile.am	(working copy)
@@ -5,7 +5,7 @@
 libwidget_la_SOURCES = \
     widget.c \
     widget_table.c \
-    $(WIDGET)
+    $$(WIDGET)
 
 EXTRA_libwidget_la_SOURCES = \
     terminal_frontend.c \
Index: video/Makefile.am
===================================================================
--- video/Makefile.am	(revision 4525)
+++ video/Makefile.am	(working copy)
@@ -6,7 +6,7 @@
 
 libvideo_la_SOURCES = \
 	video_drivers.c \
-	$(DRIVER)
+	$$(DRIVER)
 
 EXTRA_libvideo_la_SOURCES = \
 	ez328.c    \
Index: vidbase/Makefile.am
===================================================================
--- vidbase/Makefile.am	(revision 4525)
+++ vidbase/Makefile.am	(working copy)
@@ -11,7 +11,7 @@
 	dvbl_sprite.c	\
 	dvbl_font.c	\
 	font_base.c	\
-	$(VIDBASE)
+	$$(VIDBASE)
 
 EXTRA_libvidbase_la_SOURCES = \
 	linear1.c	\
Index: configure.in
===================================================================
--- configure.in	(revision 4525)
+++ configure.in	(working copy)
@@ -30,7 +30,7 @@
 dnl 
 AC_ARG_WITH(pm-cflags,
 [  --with-pm-cflags=<pm cflags>   To specify Process Manager cflags],[
-  AC_DEFINE(PM_ENABLED)
+  AC_DEFINE(PM_ENABLED, 1, [Process Manager])
   DRIVER_CFLAGS="$DRIVER_CFLAGS ${withval}"
 ])
 
@@ -125,6 +125,8 @@
 
 AC_SUBST(LXDIALOG)
 
+AM_CONDITIONAL(BUILD_CONFIG, false)
+
 dnl explicitely set CFLAGS to the value passed by the user
 
 CFLAGS=${user_CFLAGS}
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 4525)
+++ Makefile.am	(working copy)
@@ -6,7 +6,9 @@
 	profiles \
 	.
 
-DIST_SUBDIRS = configscript $(SUBDIRS)
+DIST_SUBDIRS = \
+	configscript \
+	$(SUBDIRS)
 
 INCLUDES = -Iinclude -I$(srcdir)/include $(DRIVER_CFLAGS)
 
@@ -14,10 +16,10 @@
 
 pgserver_SOURCES = pgmain.c
 
-pgserver_LDADD = \
-	libpgserver.la	\
-	$(DRIVER_LIBS)	
+pgserver_LDADD = libpgserver.la
 
+pgserver_LDFLAGS = $(DRIVER_LIBS)
+
 lib_LTLIBRARIES = libpgserver.la
 
 libpgserver_la_SOURCES =
@@ -35,9 +37,10 @@
 	vidbase/libvidbase.la	\
 	formats/libformats.la	\
 	font/libfont.la		\
-	os/libos.la		\
-	$(DRIVER_LIBS)		
+	os/libos.la
 
+libpgserver_la_LDFLAGS = $(DRIVER_LIBS)
+
 EXTRA_DIST = \
 	script/fontdef.pl 		\
 	script/pnm_embed.pl		\
@@ -50,6 +53,23 @@
 
 CONFIG_STATUS_DEPENDENCIES = $(CONFIG_FILE) $(srcdir)/select.in
 
+MAINTAINERCLEANFILES = \
+	Makefile.in \
+	aclocal.m4 \
+	config.guess \
+	config.h.in \
+	config.sub \
+	configure \
+	depcomp \
+	install-sh \
+	ltmain.sh \
+	missing \
+	mkinstalldirs
+
+DISTCLEANFILES = \
+	config.log \
+	stamp-h.in
+
 .PHONY: config menuconfig
 
 # Note that this did read $(SHELL) instead of bash, but since Configure really does
