From 9b2f4d9ef1b9f9d31a1e260af8f8ee64f81fe521 Mon Sep 17 00:00:00 2001 From: lahiker42 Date: Thu, 11 Jun 2009 13:00:50 +0000 Subject: [PATCH] Add -lpthread when linking against protobuf git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@191 00440858-1255-0410-a3e6-75ea37f81c3a --- configure.ac | 4 ++-- src/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b8f4d5a..1801027 100644 --- a/configure.ac +++ b/configure.ac @@ -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::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 //'` diff --git a/src/Makefile.am b/src/Makefile.am index 2fde3a7..b728f0e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \