--- a/Makefile.am
+++ b/Makefile.am
@@ -196,7 +196,7 @@ fs_cli_LDFLAGS = $(AM_LDFLAGS) -lpthread
 fs_ivrd_CFLAGS = $(AM_CFLAGS) -Ilibs/esl/src/include 
 fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS)
 freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS)
-freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir)
+freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
 freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
 if ADD_LIBEDIT
 fs_cli_CFLAGS += -DHAVE_EDITLINE -Ilibs/libedit/src
--- a/Makefile.in
+++ b/Makefile.in
@@ -578,7 +578,7 @@ fs_cli_LDFLAGS = $(AM_LDFLAGS) -lpthread
 fs_ivrd_CFLAGS = $(AM_CFLAGS) -Ilibs/esl/src/include 
 fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS)
 freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS) $(am__append_2)
-freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir)
+freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
 freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la \
 	$(am__append_3)
 @ADD_LIBEDIT_TRUE@fs_cli_LDADD = libs/libedit/src/.libs/libedit.a
