Skip to content

Commit

Permalink
Check presence of libthrift when rpcserver=yes is defined (sonic-net#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-shirshov authored and lguohan committed Jul 23, 2016
1 parent 73483ea commit 104ce17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ AC_ARG_ENABLE(rpcserver,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-rpcserver) ;;
esac],[rpcserver=false])
AM_CONDITIONAL(SAITHRIFT, test x$rpcserver = xtrue)
AM_COND_IF([SAITHRIFT], [
AC_CHECK_LIB([thrift], [main], [], [AC_MSG_ERROR(libthrift is required for rpcserver)])
])

CFLAGS_COMMON="-std=c++11 -Wall -fPIC -Wno-write-strings"
AC_SUBST(CFLAGS_COMMON)
Expand Down
2 changes: 1 addition & 1 deletion syncd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if SAITHRIFT
SAI_RPC_INCLUDE_DIR = ../libsaiserver/include
SAI_RPC_LIB_DIR = ../libsaiserver/lib
syncd_CPPFLAGS += -I$(SAI_RPC_INCLUDE_DIR) -DSAITHRIFT=yes
syncd_LDADD += -L$(SAI_RPC_LIB_DIR) -lrpcserver
syncd_LDADD += -L$(SAI_RPC_LIB_DIR) -lrpcserver -lthrift
endif

syncd_request_shutdown_SOURCES = syncd_request_shutdown.cpp
Expand Down

0 comments on commit 104ce17

Please sign in to comment.