--- config/cf/Imakefile.orig	Sat Jun 30 10:07:23 2007
+++ config/cf/Imakefile	Sat Jun 30 10:09:58 2007
@@ -121,16 +121,16 @@ x386.cf \
 QNX.cf \
 xfree86.cf
 
-INSTFILES = $(RULEFILES) $(TMPLFILES) $(DEFFILES) $(CFFILES) $(LOCALFILES)
+/* we only need to install Motif.tmpl and Motif.rules */
+INSTFILES = Motif.tmpl Motif.rules
 
 all::
 
 InstallMultipleDestFlags(install,$(INSTFILES),$(CONFIGDIR),$(INSTDATFLAGS))
+#if defined(XFree86Version) && Xfree86Version < 4000
 InstallLinkKitMultipleDestFlags($(INSTFILES),$(LINKKITDIR)/config/cf,$(INSTDATFLAGS))
+#endif
 
-InstallNamedNonExec(Motif.rules,Motif.rules.openmotif,$(CONFIGDIR))
-InstallNamedNonExec(Motif.tmpl,Motif.tmpl.openmotif,$(CONFIGDIR))
-
 #ifdef InstallEmptyHostDef
 install::
 	@(TMP=/tmp/tmp.$$$$; \
@@ -140,7 +140,7 @@ install::
 		$(DESTDIR)$(CONFIGDIR)/host.def; \
 	RemoveFile($${TMP}))
 
-#ifdef XFree86Version
+#if definded(XFree86Version) && XFreeVersion < 4000
 install.linkkit::
 	@(TMP=/tmp/tmp.$$$$; \
 	RemoveFile($${TMP}); \
