--- src/Makefile.in.orig	2012-02-12 09:26:48.000000000 -0600
+++ src/Makefile.in	2014-03-16 15:04:21.000000000 -0500
@@ -421,11 +421,14 @@
   specialmem.cpp string2.cpp systemclock.cpp traceval.cpp ui/ui.cpp 
 
 nodist_libsim_la_SOURCES = $(FAB_CPP)
-libsim_la_LDFLAGS = -version-info 0:0:0 -rpath ${prefix}/lib
+libsim_la_LDFLAGS = -version-info 0:0:0 -rpath ${prefix}/lib \
+  -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty \
+  -lz -lintl -ltcl
 nodist_libsimulavr_la_SOURCES = $(TCL_WRAP_SRC)
 libsimulavr_la_LDFLAGS = -version-info 0:0:0 -rpath ${prefix}/lib
 libsimulavr_la_LIBADD = $(libsim_la_OBJECTS) -lz \
-  -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty
+  -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty \
+  -lz -lintl -ltcl
 
 pkginclude_HEADERS = \
   adcpin.h application.h at4433.h at8515.h atmega128.h atmega16_32.h attiny2313.h \
@@ -443,7 +446,7 @@
 simulavr_SOURCES = cmd/main.cpp cmd/dumpargs.cpp
 simulavr_LDADD = $(libsim_la_OBJECTS) $(LIBZ_FLAGS) \
   -L$(AVR_LIBBFD_LIBPATH) -lbfd -L$(AVR_LIBIBERTY_LIBPATH) -liberty \
-  $(LIBWSOCK_FLAGS)
+  $(LIBWSOCK_FLAGS) -lz -lintl
 
 @USE_VERILOG_TRUE@VPI_LIB = avr.vpi
 @USE_VERILOG_TRUE@libavrvpi_la_SOURCES = vpi.cpp cmd/dumpargs.cpp

