File datadir.patch of Package openmotif22-libs

--- demos/programs/ButtonBox/Makefile.am
+++ demos/programs/ButtonBox/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/ButtonBox
+pkgdatadir = $(datadir)/Xm/ButtonBox
 
 bin_PROGRAMS = bboxdemo
 EXTRA_DIST = Imakefile
 bboxdemo_SOURCES = bboxdemo.c
-data_DATA = $(EXTRA_DIST) $(bboxdemo_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(bboxdemo_SOURCES)
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 
--- demos/programs/ColorSel/Makefile.am
+++ demos/programs/ColorSel/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/Color
+pkgdatadir = $(datadir)/Xm/Color
 
 bin_PROGRAMS = colordemo
 colordemo_SOURCES = bxutil-c.c colordemo.c
 EXTRA_DIST = Imakefile
-data_DATA = $(colordemo_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(colordemo_SOURCES) $(EXTRA_DIST)
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 TOPDIR = ../../..
 INCLUDES = -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS} 
--- demos/programs/Column/Makefile.am
+++ demos/programs/Column/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/Column
+pkgdatadir = $(datadir)/Xm/Column
 
 bin_PROGRAMS = column
 column_SOURCES = column.c
 EXTRA_DIST = Imakefile Column.ad
-data_DATA = $(EXTRA_DIST) $(column_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(column_SOURCES)
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 INCLUDES = -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS} 
--- demos/programs/DropDown/Makefile.am
+++ demos/programs/DropDown/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/DropDown
+pkgdatadir = $(datadir)/Xm/DropDown
 
 bin_PROGRAMS = dropdown
 EXTRA_DIST = DropDown.ad Imakefile
 dropdown_SOURCES = dropdown.c
-data_DATA = $(EXTRA_DIST) $(dropdown_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(dropdown_SOURCES)
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 INCLUDES = -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS} 
--- demos/programs/Exm/app_in_c/Makefile.am
+++ demos/programs/Exm/app_in_c/Makefile.am
@@ -1,10 +1,9 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-bindir = ${prefix}/share/Xm/Exm/app_in_c
-datadir = ${prefix}/share/Xm/Exm/app_in_c
+pkgdatadir = $(datadir)/Xm/Exm/app_in_c
 
 man_MANS = exm_in_c.man
-bin_PROGRAMS = exm_in_c
+pkgdata_PROGRAMS = exm_in_c
 exm_in_c_SOURCES = exm_in_c.c
 
 EXTRA_DIST = exm_in_c.man Imakefile
--- demos/programs/Exm/simple_app/Makefile.am
+++ demos/programs/Exm/simple_app/Makefile.am
@@ -1,7 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-bindir = ${prefix}/share/Xm/Exm/simple_app
-datadir = ${prefix}/share/Xm/Exm/simple_app
+bindir = @datadir@/Xm/Exm/simple_app
+datadir = @datadir@/Xm/Exm/simple_app
 
 data_DATA = README
 man_MANS = simpleDemo.man
--- demos/programs/FontSel/Makefile.am
+++ demos/programs/FontSel/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/fontsel
+pkgdatadir = $(datadir)/Xm/fontsel
 
 bin_PROGRAMS = fontsel
 fontsel_SOURCES = callbacks-c.c creation-c.c fontsel.c fontsel.h
 EXTRA_DIST = Imakefile
-data_DATA = $(EXTRA_DIST) $(fontsel_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(fontsel_SOURCES)
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 TOPDIR = ../../..
 INCLUDES = -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS} 
--- demos/programs/IconB/Makefile.am
+++ demos/programs/IconB/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/Icon
+pkgdatadir= $(datadir)/Xm/Icon
 
 EXTRA_DIST = Imakefile small.bm
 bin_PROGRAMS = iconbuttondemo
 iconbuttondemo_SOURCES = misc.c  iconbuttondemo.c
-data_DATA = $(iconbuttondemo_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(iconbuttondemo_SOURCES) $(EXTRA_DIST)
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 
--- demos/programs/MultiList/Makefile.am
+++ demos/programs/MultiList/Makefile.am
@@ -1,13 +1,13 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/MultiList
+pkgdatadir = $(datadir)/Xm/MultiList
 
 bin_PROGRAMS = multilist
 SUBDIRS = pixmaps
 multilist_SOURCES = bxutil-c.c callbacks-c.c creation.c multilist.c \
          extlist.h
 EXTRA_DIST = Imakefile
-data_DATA = $(EXTRA_DIST) $(multilist_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(multilist_SOURCES)
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 
--- demos/programs/MultiList/pixmaps/Makefile.am
+++ demos/programs/MultiList/pixmaps/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/MultiList/pixmaps
+pkgdatadir = $(datadir)/Xm/MultiList/pixmaps
 
 EXTRA_DIST = clown.xbm crab.xpm eye.xpm porsche.xpm stopsign.xpm
-data_DATA = $(EXTRA_DIST)
+pkgdata_DATA = $(EXTRA_DIST)
--- demos/programs/Outline/Makefile.am
+++ demos/programs/Outline/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/Outline
+pkgdatadir = $(datadir)/Xm/Outline
 
 EXTRA_DIST = Imakefile
 bin_PROGRAMS = outline
 outline_SOURCES = outline.c
-data_DATA = $(outline_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(outline_SOURCES) $(EXTRA_DIST)
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 TOPDIR = ../../..
 INCLUDES = -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS} 
--- demos/programs/Paned/Makefile.am
+++ demos/programs/Paned/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/Paned2
+pkgdatadir = $(datadir)/Xm/Paned2
 
 EXTRA_DIST = Imakefile
 bin_PROGRAMS = paned
 paned_SOURCES = creation-c.c paned.c
-data_DATA = $(EXTRA_DIST) $(paned_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(paned_SOURCES)
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 
--- demos/programs/TabStack/Makefile.am
+++ demos/programs/TabStack/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/Tabstack
+pkgdatadir = $(datadir)/Xm/Tabstack
 
 bin_PROGRAMS = tabstack
 tabstack_SOURCES = bxutils.c callbacks.c creation.c main.c creation.h
 EXTRA_DIST = Imakefile
-data_DATA = $(tabstack_SOURCES) $(EXTRA_DIST)            
+pkgdata_DATA = $(tabstack_SOURCES) $(EXTRA_DIST)            
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 
--- demos/programs/Tree/Makefile.am
+++ demos/programs/Tree/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/Tree
+pkgdatadir = $(datadir)/Xm/Tree
 
 EXTRA_DIST = Imakefile
 bin_PROGRAMS = tree
 tree_SOURCES = bxutil-c.c  tree.c
-data_DATA = $(EXTRA_DIST) $(tree_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(tree_SOURCES)
 TOPDIR = ../../..
 LDADD = $(TOPDIR)/lib/Xm/libXm.la
 
--- demos/programs/airport/Makefile.am
+++ demos/programs/airport/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/airport
+pkgdatadir = $(datadir)/Xm/airport
 
 bin_PROGRAMS = airport
 airport_SOURCES = main.c dragsource.c dropsite.c airport.h \
                   dragsource.h dropsite.h main.h
 EXTRA_DIST = Imakefile XmdAirport.ad README
-data_DATA = $(airport_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(airport_SOURCES) $(EXTRA_DIST)
 LDADD = ../../../lib/Xm/libXm.la
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/animate/Makefile.am
+++ demos/programs/animate/Makefile.am
@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/animate
+pkgdatadir = $(datadir)/Xm/animate
+uiddir = $(datadir)/X11/uid
 
 EXTRA_DIST = dog.uil plane.uil superman.uil xmanimate.uil \
     superman1.xbm superman2.xbm superman3.xbm superman4.xbm \
@@ -11,8 +12,8 @@
 
 CLEANFILES =  dog.uid plane.uid superman.uid xmanimate.uid
 
-data_DATA = dog.uid plane.uid superman.uid xmanimate.uid $(xmanimate_SOURCES) \
-            $(EXTRA_DIST)
+pkgdata_DATA = $(xmanimate_SOURCES) $(EXTRA_DIST)
+uid_DATA = dog.uid plane.uid superman.uid xmanimate.uid
 
 bin_PROGRAMS = xmanimate
 
--- demos/programs/draw/Makefile.am
+++ demos/programs/draw/Makefile.am
@@ -1,10 +1,10 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/draw
+pkgdatadir = $(datadir)/Xm/draw
 
 bin_PROGRAMS = draw
 draw_SOURCES = draw.c
 EXTRA_DIST = Imakefile XmdDraw.ad README draw.help draw.man
-data_DATA = $(EXTRA_DIST) $(draw_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(draw_SOURCES)
 LDADD = ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la
 INCLUDES = -I$(srcdir)/../../lib -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/earth/Makefile.am
+++ demos/programs/earth/Makefile.am
@@ -1,10 +1,10 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/earth
+pkgdatadir = $(datadir)/Xm/earth
 
 bin_PROGRAMS = earth
 earth_SOURCES = earth.c
 EXTRA_DIST = terre.xbm earth.man Imakefile README
-data_DATA = $(EXTRA_DIST) $(earth_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(earth_SOURCES)
 LDADD = ../../../lib/Xm/libXm.la
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/filemanager/Makefile.am
+++ demos/programs/filemanager/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/filemanager
+pkgdatadir = $(datadir)/Xm/filemanager
 
 bin_PROGRAMS = filemanager
 filemanager_SOURCES = filemanager.c actions.c readdir.c convert.c \
@@ -9,7 +9,7 @@
            Imakefile code.xpm dir.xpm exec.xpm file.xpm none.xpm \
            obj.xpm pix.xpm s_dir.xpm s_exec.xpm s_file.xpm \
            s_none.xpm s_pix.xpm
-data_DATA = $(EXTRA_DIST) $(filemanager_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(filemanager_SOURCES)
 LDADD = ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la
 INCLUDES = -I$(srcdir)/../../lib -I$(srcdir)/../../../lib ${X_CFLAGS} 
 
--- demos/programs/fileview/Makefile.am
+++ demos/programs/fileview/Makefile.am
@@ -1,12 +1,14 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/fileview
+pkgdatadir = $(datadir)/Xm/fileview
+uiddir = $(datadir)/X11/uid
 
 bin_PROGRAMS = fileview
 fileview_SOURCES = main.c text.c file.c file.h fileE.h fileview.h main.h \
                    mainE.h text.h textE.h
 EXTRA_DIST = $(UILS) English.df French.df German.df README Fileview.ad
-data_DATA = French.uid German.uid English.uid $(fileview_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(fileview_SOURCES) $(EXTRA_DIST)
+uid_DATA = French.uid German.uid English.uid
 
 UILS= French.uil German.uil English.uil
 
--- demos/programs/getsubres/Makefile.am
+++ demos/programs/getsubres/Makefile.am
@@ -1,10 +1,10 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/getsubres
+pkgdatadir = $(datadir)/Xm/getsubres
 
 bin_PROGRAMS = getsubres
 EXTRA_DIST = getsubres.help getsubres.man README Imakefile
 getsubres_SOURCES = getsubres.c
-data_DATA = $(EXTRA_DIST) $(getsubres_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(getsubres_SOURCES)
 LDADD = ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la
 INCLUDES = -I$(srcdir)/../../lib -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/hellomotif/Makefile.am
+++ demos/programs/hellomotif/Makefile.am
@@ -1,11 +1,13 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/hellomotif
+pkgdatadir = $(datadir)/Xm/hellomotif
+uiddir = $(datadir)/X11/uid
 
 bin_PROGRAMS = hellomotif
 EXTRA_DIST = hellomotif.uil Imakefile README
 hellomotif_SOURCES = hellomotif.c
-data_DATA = $(EXTRA_DIST) $(hellomotif_SOURCES) hellomotif.uid
+pkgdata_DATA = $(EXTRA_DIST) $(hellomotif_SOURCES)
+uid_DATA = hellomotif.uid
 LDADD = ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
 
--- demos/programs/hellomotifi18n/Makefile.am
+++ demos/programs/hellomotifi18n/Makefile.am
@@ -1,13 +1,15 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/helloint
+pkgdatadir = $(datadir)/Xm/helloint
+uiddir = $(datadir)/X11/uid
 
 SUBDIRS = C english french hebrew japan japanese swedish
 EXTRA_DIST = README helloint.uil Imakefile helloint.man
 CLEANFILES = helloint.uid
 helloint_SOURCES = helloint.c
 bin_PROGRAMS = helloint
-data_DATA = $(EXTRA_DIST) $(helloint_SOURCES) helloint.uid
+pkgdata_DATA = $(EXTRA_DIST) $(helloint_SOURCES)
+uid_DATA = helloint.uid
 helloint_DEPENDENCIES = helloint.uid C/uid/l_strings.uid english/uid/l_strings.uid french/uid/l_strings.uid hebrew/uid/l_strings.uid japan/uid/l_strings.uid japanese/uid/l_strings.uid swedish/uid/l_strings.uid
 
 INCLUDES = -I$(top_srcdir)/lib ${X_CFLAGS} 
--- demos/programs/i18ninput/Makefile.am
+++ demos/programs/i18ninput/Makefile.am
@@ -1,12 +1,12 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/i18ninput
+pkgdatadir = $(datadir)/Xm/i18ninput
 
 bin_PROGRAMS = i18ninput
 i18ninput_SOURCES = i18ninput.c input.c 
 EXTRA_DIST = XmdI18nInput.ad README i18ninput.man i18ninput.help \
              Imakefile
-data_DATA = $(EXTRA_DIST) $(i18ninput_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(i18ninput_SOURCES)
 LDADD = ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la
 
 INCLUDES = -I$(srcdir)/../../lib -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/panner/Makefile.am
+++ demos/programs/panner/Makefile.am
@@ -1,10 +1,10 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/panner
+pkgdatadir = $(datadir)/Xm/panner
 
 bin_PROGRAMS = panner
 panner_SOURCES = panner.c
 EXTRA_DIST = README panner.man Imakefile
-data_DATA = $(EXTRA_DIST) $(panner_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(panner_SOURCES)
 LDADD = ../../../lib/Xm/libXm.la
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/periodic/Makefile.am
+++ demos/programs/periodic/Makefile.am
@@ -1,11 +1,13 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/periodic
+pkgdatadir = $(datadir)/Xm/periodic
+uiddir = $(datadir)/X11/uid
 
 bin_PROGRAMS = periodic
 EXTRA_DIST = periodic.uil periodic_l.uil XmdPeriodic.ad Imakefile README
 periodic_SOURCES = periodic.c
-data_DATA = $(EXTRA_DIST) $(periodic_SOURCES) periodic.uid
+pkgdata_DATA = $(EXTRA_DIST) $(periodic_SOURCES)
+uid_DATA = periodic.uid
 LDADD = ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la
 
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/piano/Makefile.am
+++ demos/programs/piano/Makefile.am
@@ -1,12 +1,12 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/piano
+pkgdatadir = $(datadir)/Xm/piano
 
 bin_PROGRAMS = piano
 piano_SOURCES = piano.c
 EXTRA_DIST = piano.images README Inv8_part1.piano Inv8_part2.piano \
              piano.man Imakefile
-data_DATA  = $(EXTRA_DIST) $(piano_SOURCES) 
+pkgdata_DATA  = $(EXTRA_DIST) $(piano_SOURCES) 
 LDADD = ../../../lib/Xm/libXm.la -lm
 
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/pixmaps/Makefile.am
+++ demos/programs/pixmaps/Makefile.am
@@ -1,7 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/pixmaps
+pkgdatadir = $(datadir)/Xm/pixmaps
 
 EXTRA_DIST  = crab.xpm eye.xpm porsche.xpm stopsign.xpm clown.xbm
 
-data_DATA = $(EXTRA_DIST)
+pkgdata_DATA = $(EXTRA_DIST)
--- demos/programs/popups/Makefile.am
+++ demos/programs/popups/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/autopopups
+pkgdatadir = $(datadir)/Xm/autopopups
 
 bin_PROGRAMS = autopopups
 autopopups_SOURCES = autopopups.c
 EXTRA_DIST = README autopopups.man Imakefile
-data_DATA = $(EXTRA_DIST) $(autopopups_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(autopopups_SOURCES)
 LDADD = ../../../lib/Xm/libXm.la
 
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/sampler2_0/Makefile.am
+++ demos/programs/sampler2_0/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/sampler2_0
+pkgdatadir = $(datadir)/Xm/sampler2_0
 
 EXTRA_DIST = bee.xpm bomb.xpm cherry.xpm da.xpm girlface.xpm k7.xpm \
              labir.xpm main.xpm pile.xpm prev.xpm spir.xpm stack.xpm \
@@ -8,7 +8,7 @@
              XmdSampler2_0.ad
 bin_PROGRAMS = sampler2_0
 sampler2_0_SOURCES = sampler2_0.c
-data_DATA = $(sampler2_0_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(sampler2_0_SOURCES) $(EXTRA_DIST)
 LDADD = ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la
 
 INCLUDES = -I$(srcdir)/../../lib -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/setdate/Makefile.am
+++ demos/programs/setdate/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/setDate
+pkgdatadir = $(datadir)/Xm/setDate
 
 bin_PROGRAMS = setDate
 EXTRA_DIST = XmdSetDate.ad README setDate.man Imakefile
 setDate_SOURCES = setDate.c
-data_DATA = $(EXTRA_DIST) $(setDate_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(setDate_SOURCES)
 LDADD = ../../../lib/Xm/libXm.la
 
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/todo/Makefile.am
+++ demos/programs/todo/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/todo
+pkgdatadir = $(datadir)/Xm/todo
 
 EXTRA_DIST = README XmdTodo.ad example.todo todo.man todo.help Imakefile
 bin_PROGRAMS = todo
 todo_SOURCES = todo.c io.c actions.c page.h
-data_DATA = $(EXTRA_DIST) $(todo_SOURCES)
+pkgdata_DATA = $(EXTRA_DIST) $(todo_SOURCES)
 
 INCLUDES = -I$(srcdir)/../../../lib -I$(srcdir)/../../lib ${X_CFLAGS} 
 LDADD = -L../../lib/Xmd -lXmd -L../../lib/Exm -lExm ../../../lib/Xm/libXm.la 
--- demos/programs/tooltips/Makefile.am
+++ demos/programs/tooltips/Makefile.am
@@ -1,11 +1,11 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/tooltips
+pkgdatadir = $(datadir)/Xm/tooltips
 
 EXTRA_DIST = Imakefile
 bin_PROGRAMS = tooltips
 tooltips_SOURCES = tooltips.c
-data_DATA = $(tooltips_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(tooltips_SOURCES) $(EXTRA_DIST)
 LDADD = ../../../lib/Xm/libXm.la
 
 INCLUDES = -I$(srcdir)/../../../lib ${X_CFLAGS} 
--- demos/programs/workspace/Makefile.am
+++ demos/programs/workspace/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-datadir = ${prefix}/share/Xm/wsm
+pkgdatadir = $(datadir)/Xm/wsm
 
 EXTRA_DIST = Imakefile README wsm.man
 bin_PROGRAMS = wsm
@@ -8,6 +8,6 @@
               wsmSend.c wsmStruct.c wsm_cb.c wsm_create.c xrmLib.c \
               command_ui.h wsm_cb.h wsm_create.h wsmData.h wsmDebug.h \
               wsm.h wsmSend.h wsmStruct.h wsm_ui.h xrmLib.h
-data_DATA = $(wsm_SOURCES) $(EXTRA_DIST)
+pkgdata_DATA = $(wsm_SOURCES) $(EXTRA_DIST)
 INCLUDES = -I$(srcdir)/../../../lib -I$(srcdir)/../../lib ${X_CFLAGS} 
 LDADD = ../../../lib/Xm/libXm.la -L../../lib/Wsm -lWsm