Add -lpthread when linking against protobuf

git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@191 00440858-1255-0410-a3e6-75ea37f81c3a
This commit is contained in:
lahiker42 2009-06-11 13:00:50 +00:00
parent 44f46742de
commit 9b2f4d9ef1
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ you must add '-Iincludedir' to CXXFLAGS
and '-Llibdir' to LDFLAGS.
])])
pbc_savelibs="$LIBS"
LIBS="$LIBS -lprotoc -lprotobuf"
LIBS="$LIBS -lprotoc -lprotobuf -lpthread"
AC_TRY_LINK([#include <google/protobuf/compiler/command_line_interface.h>],
[google::protobuf::compiler::CommandLineInterface cli;],
[],
@ -36,7 +36,7 @@ LIBS="$pbc_savelibs"
AC_LANG_POP()
dnl Determine the version of the protoc compiler.
dnl (only needed for c++ packed-data comparison)
if test -n $PROTOC; then
AC_MSG_CHECKING([which version of protoc is installed])
raw_vers=`protoc --version 2>/dev/null | sed -e 's/libprotoc //'`

View File

@ -19,7 +19,7 @@ google/protobuf/compiler/c/main.cc \
google/protobuf/compiler/c/c_bytes_field.cc
protoc_c_LDADD = \
-lprotoc -lprotobuf
-lprotoc -lprotobuf -lpthread
libprotobuf_c_la_SOURCES = \
google/protobuf-c/protobuf-c-dispatch.c \