diff --git a/ChangeLog b/ChangeLog
index f712a548ab96ae82d5d6f49cb7d13e66fd5b9651..e17f8f70b2fa18a374f6fd5254f8bdc8448408e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-16  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * Build the static library part with libtool to get correctly linked
+   (fixes #4235).
+
+
 2008-05-16  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * Fix crash due to accessing invalid memory when reading the
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 3bea8c66d8a566b092de33755adad73793efb821..a7c42a612cdeb770e2a9c1bb458af5712d0eb86a 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,9 +1,9 @@
 
 
-noinst_LIBRARIES = 								\
-	libdict.a
+noinst_LTLIBRARIES = 							\
+	libdict.la
 
-libdict_a_SOURCES =								\
+libdict_la_SOURCES =							\
 	libdict.h									\
 	aspell.c									\
 	aspell.h									\
@@ -16,13 +16,19 @@ libdict_a_SOURCES =								\
 	prefs.c										\
 	prefs.h
 
-libdict_a_CFLAGS =								\
+libdict_la_CFLAGS =								\
 	-I$(top_srcdir)								\
 	$(LIBXFCEGUI4_CFLAGS)						\
 	$(LIBXFCE4PANEL_CFLAGS)						\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"		\
 	@GTHREAD_CFLAGS@
 
+libdict_la_LIBADD =								\
+	$(LIBXFCE4PANEL_LIBS)						\
+	$(LIBXFCEGUI4_LIBS)							\
+	@GTHREAD_LIBS@
+
+
 noinst_DATA = 									\
 	inline-icon.h
 
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index c786e4bd436a222eb3f6372e28ad26b734cb9036..b32f89e42dca7e105d9e7b093d6305e4c2906326 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -17,7 +17,7 @@ xfce4_dict_plugin_LDADD =						\
 	$(LIBXFCE4PANEL_LIBS)						\
 	$(LIBXFCEGUI4_LIBS)							\
 	@GTHREAD_LIBS@								\
-	../lib/libdict.a
+	$(top_builddir)/lib/libdict.la
 
 
 # .desktop file
diff --git a/src/Makefile.am b/src/Makefile.am
index 02e144bf700f508f53c6efbf61d20473ebe2f601..b9af15f28de5272649c1e4fd1464128fb850bdf0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,7 +19,7 @@ xfce4_dict_LDADD =								\
 	$(LIBXFCE4UTIL_LIBS)						\
 	$(LIBXFCEGUI4_LIBS)							\
 	@GTHREAD_LIBS@								\
-	../lib/libdict.a
+	$(top_builddir)/lib/libdict.la
 
 
 desktopdir = $(datadir)/applications