--- a/configure.ac
+++ b/configure.ac
@@ -433,7 +433,7 @@
   ]
 )
 AM_CONDITIONAL([USE_UNITY_TRAY], [test "x$appindicator_is_installed" = "xyes" -a "x$enable_appindicator" == "xyes"])
-LDFLAGS+=" $GTKLDFLAGS"
+AC_SUBST([LDFLAGS], ["$LDFLAGS $GTKLDFLAGS"])
 AS_IF(
   [test "x$FREEBSD" = "x0"],
   [AC_SUBST([LDFLAGS], ["$LDFLAGS -ldl"])]
--- a/src/im-client/Makefile.am
+++ b/src/im-client/Makefile.am
@@ -34,9 +34,9 @@
 	@echo "linking $@ ..."
 
 if FREEBSD
-	$(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS+) -o $@ -L/usr/X11R6/lib
+	$(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS) -o $@ -L/usr/X11R6/lib
 else
-	$(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS+) -o $@ -L/usr/local/lib
+	$(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS) -o $@ -L/usr/local/lib
 endif
 	ln -sf $(SOFILEVER) $(SOFILE)
 	ln -sf $(SOFILEVER) $(SOFILE).1
