--- ./avahi-ui/Makefile.am.orig
+++ ./avahi-ui/Makefile.am
@@ -54,12 +54,12 @@
 libavahi_ui_la_SOURCES = \
 	avahi-ui.h avahi-ui.c
 libavahi_ui_la_CFLAGS = $(AM_CFLAGS) $(GTK20_CFLAGS)
-libavahi_ui_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la ../avahi-glib/libavahi-glib.la $(GTK20_LIBS)
+libavahi_ui_la_LIBADD = $(AM_LDADD) -lavahi-common -lavahi-client -lavahi-glib $(GTK20_LIBS)
 libavahi_ui_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_UI_VERSION_INFO)
 
 libavahi_ui_gtk3_la_SOURCES = $(libavahi_ui_la_SOURCES)
 libavahi_ui_gtk3_la_CFLAGS = $(AM_CFLAGS) $(GTK30_CFLAGS)
-libavahi_ui_gtk3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la ../avahi-glib/libavahi-glib.la $(GTK30_LIBS)
+libavahi_ui_gtk3_la_LIBADD = $(AM_LDADD) -lavahi-common -lavahi-client -lavahi-glib $(GTK30_LIBS)
 libavahi_ui_gtk3_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_UI_VERSION_INFO)
 
 if HAVE_GDBM
@@ -86,10 +86,10 @@
 
 if HAVE_GTK3
 bssh_CFLAGS = $(AM_CFLAGS) $(GTK30_CFLAGS)
-bssh_LDADD = $(AM_LDADD) $(GTK30_LIBS) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la libavahi-ui-gtk3.la
+bssh_LDADD = $(AM_LDADD) $(GTK30_LIBS) -lavahi-client -lavahi-common libavahi-ui-gtk3.la
 else
 bssh_CFLAGS = $(AM_CFLAGS) $(GTK20_CFLAGS)
-bssh_LDADD = $(AM_LDADD) $(GTK20_LIBS) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la libavahi-ui.la
+bssh_LDADD = $(AM_LDADD) $(GTK20_LIBS) -lavahi-client -lavahi-common libavahi-ui.la
 endif
 
 install-exec-local:
