Index: demos/Makefile.am
===================================================================
RCS file: /cvsroot/xforms/xforms/demos/Makefile.am,v
retrieving revision 1.1
diff -u -p -r1.1 Makefile.am
--- demos/Makefile.am	24 Apr 2003 12:48:19 -0000	1.1
+++ demos/Makefile.am	24 Apr 2003 15:43:52 -0000
@@ -1,12 +1,15 @@
 include $(top_srcdir)/config/common.am
 
-EXTRA_DIST = 01Readme iconvert.1 demo.menu test.ps \
+SUBDIRS = fd
+
+BUILT_SOURCES = symlink
+
+linkfiles = demo.menu test.ps \
 	bm1.xbm bm2.xbm newmail.xbm nomail.xbm picture.xbm srs.xbm \
 	crab45.xpm crab_tran.xpm crab.xpm porsche.xpm \
-	test.xpm xconq.xpm xterm.xpm \
-	demotest_fd.fd  pmbrowse.fd
+	test.xpm xconq.xpm xterm.xpm
 
-SUBDIRS = fd
+EXTRA_DIST = 01Readme iconvert.1 demotest_fd.fd  pmbrowse.fd $(linkfiles)
 
 # forms.h is a generated file
 INCLUDES = -I../lib -I$(top_srcdir)/lib -I$(top_srcdir)/image
@@ -205,3 +208,16 @@ xyplotover_LDADD  = ../image/libflimage.
 yesno_SOURCES = yesno.c
 yesno_cb_SOURCES = yesno_cb.c
 wwwl_SOURCES = wwwl.c
+
+# This is a bit klunky, but ensures that the data files can be found when
+# needed
+
+symlink:
+	for i in $(linkfiles); do \
+		echo $$i; \
+		if [ ! -s $$i ]; then \
+			ln -s "$(srcdir)/$$i" . ; \
+		fi; \
+	done; \
+	touch symlink
+


