Skip to content

Commit

Permalink
Add -lpthread when linking against protobuf
Browse files Browse the repository at this point in the history
git-svn-id: http://protobuf-c.googlecode.com/svn/trunk@191 00440858-1255-0410-a3e6-75ea37f81c3a
  • Loading branch information
lahiker42 committed Jun 11, 2009
1 parent 19c3f8d commit 475dc54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ you must add '-Iincludedir' to CXXFLAGS
and '-Llibdir' to LDFLAGS. and '-Llibdir' to LDFLAGS.
])]) ])])
pbc_savelibs="$LIBS" pbc_savelibs="$LIBS"
LIBS="$LIBS -lprotoc -lprotobuf" LIBS="$LIBS -lprotoc -lprotobuf -lpthread"
AC_TRY_LINK([#include <google/protobuf/compiler/command_line_interface.h>], AC_TRY_LINK([#include <google/protobuf/compiler/command_line_interface.h>],
[google::protobuf::compiler::CommandLineInterface cli;], [google::protobuf::compiler::CommandLineInterface cli;],
[], [],
Expand All @@ -36,7 +36,7 @@ LIBS="$pbc_savelibs"
AC_LANG_POP() AC_LANG_POP()


dnl Determine the version of the protoc compiler. dnl Determine the version of the protoc compiler.

dnl (only needed for c++ packed-data comparison)
if test -n $PROTOC; then if test -n $PROTOC; then
AC_MSG_CHECKING([which version of protoc is installed]) AC_MSG_CHECKING([which version of protoc is installed])
raw_vers=`protoc --version 2>/dev/null | sed -e 's/libprotoc //'` raw_vers=`protoc --version 2>/dev/null | sed -e 's/libprotoc //'`
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ google/protobuf/compiler/c/main.cc \
google/protobuf/compiler/c/c_bytes_field.cc google/protobuf/compiler/c/c_bytes_field.cc


protoc_c_LDADD = \ protoc_c_LDADD = \
-lprotoc -lprotobuf -lprotoc -lprotobuf -lpthread


libprotobuf_c_la_SOURCES = \ libprotobuf_c_la_SOURCES = \
google/protobuf-c/protobuf-c-dispatch.c \ google/protobuf-c/protobuf-c-dispatch.c \
Expand Down

0 comments on commit 475dc54

Please sign in to comment.