-bin_PROGRAMS = at-spi-registryd
+server_dot_in = Accessibility_Registry.server.in
+
+$(server_dot_in): $(server_dot_in).in
+ sed -e "s|\@REGISTRYD_PATH\@|$(libexecdir)|" $< > $@
+
+libexec_PROGRAMS = at-spi-registryd
INCLUDES = -I$(top_srcdir) \
-I$(top_builddir) \
registry.c \
registry.h
-LDADD = ../libspi/libspi.la $(XTST_LIBS) $(REGISTRYD_LIBS)
+LDADD = $(top_builddir)/libspi/libspi.la $(X_LIBS) $(XTST_LIBS) $(REGISTRYD_LIBS)
serverinfodir = $(libdir)/bonobo/servers
serverinfo_DATA = Accessibility_Registry.server
@INTLTOOL_SERVER_RULE@
-EXTRA_DIST = Accessibility_Registry.server.in $(serverinfo_DATA)
+EXTRA_DIST = Accessibility_Registry.server.in.in $(serverinfo_DATA)
+CLEANFILES = $(serverinfo_DATA) $(server_dot_in)