Commit 585b21d9 authored by legoc's avatar legoc
Browse files

migrated to protobuf lite

parent 21b8a7cf
......@@ -38,7 +38,7 @@ AX_PTHREAD(,[AC_MSG_ERROR([Posix threads required])])
AX_BOOST_BASE([1.41],, [AC_MSG_ERROR([Boost 1.41 required])])
AX_BOOST_THREAD
AC_ZMQ
AC_PROTOBUF
AC_PROTOBUFLITE
CAMEO_CXXFLAGS="$BOOST_CPPFLAGS \
$ZMQ_CFLAGS \
......
......@@ -2,7 +2,7 @@
# Version 01/07/2015
# defines LIBPROTOBUF_LDFLAGS, LIBPROTOBUF_LIB
#
AC_DEFUN([AC_LIBPROTOBUF],
AC_DEFUN([AC_LIBPROTOBUFLITE],
[
AC_ARG_WITH([protobuf],
AS_HELP_STRING([--with-protobuf=PREFIX],[Specify protobuf library location]),
......@@ -17,10 +17,10 @@ AC_DEFUN([AC_LIBPROTOBUF],
else
protobuf_possible_path="/usr/local /usr /opt /var"
fi
AC_MSG_CHECKING([for protobuf -lprotobuf])
AC_MSG_CHECKING([for protobuf -lprotobuf-lite])
protobuf_found=no
for protobuf_path_tmp in $protobuf_possible_path ; do
LIBS="$LIBS $PROTOBUF_LIBS -lprotobuf"
LIBS="$LIBS $PROTOBUF_LIBS -lprotobuf-lite"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[PROTOBUF_LIBS="-L$protobuf_path_tmp/lib"
protobuf_found=yes]
......@@ -33,7 +33,7 @@ AC_DEFUN([AC_LIBPROTOBUF],
if test $protobuf_found = yes; then
LIBPROTOBUF_LDFLAGS="$PROTOBUF_LIBS"
LIBPROTOBUF_LIB="-lprotobuf"
LIBPROTOBUF_LIB="-lprotobuf-lite"
AC_MSG_RESULT(yes)
AC_SUBST(LIBPROTOBUF_LDFLAGS)
......
###############################################################################
# Version 01/07/2015
# defines PROTOBUF_CFLAGS, PROTOBUF_LDFLAGS, BPROTOBUF_LIB
# defines PROTOBUF_CFLAGS, PROTOBUF_LDFLAGS, PROTOBUF_LIB
#
AC_DEFUN([AC_PROTOBUF],
AC_DEFUN([AC_PROTOBUFLITE],
[ AC_ARG_WITH([protobuf],
AS_HELP_STRING([--with-protobuf=PREFIX],[Specify protobuf library location]),
[],
......@@ -35,12 +35,12 @@ AC_DEFUN([AC_PROTOBUF],
AC_MSG_RESULT($protobuf_found)
if test $protobuf_found = yes; then
AC_MSG_CHECKING([for protobuf -lprotobuf])
AC_MSG_CHECKING([for protobuf -lprotobuf-lite])
protobuf_save_LIBS="$LIBS"
CXXFLAGS="$CXXFLAGS $PROTOBUF_CFLAGS"
# search for library
LIBS="$LIBS $PROTOBUF_LIBS -lprotobuf"
LIBS="$LIBS $PROTOBUF_LIBS -lprotobuf-lite"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <google/protobuf/descriptor.h>]],
[[]])],
[ protobuf_found=yes],
......@@ -52,7 +52,7 @@ AC_DEFUN([AC_PROTOBUF],
HAVE_PROTOBUF=1
LIBS="$protobuf_save_LIBS"
PROTOBUF_LDFLAGS="$PROTOBUF_LIBS"
PROTOBUF_LIB="-lprotobuf"
PROTOBUF_LIB="-lprotobuf-lite"
break;
fi
......
......@@ -2,7 +2,7 @@ package proto;
option java_package = "fr.ill.ics.cameo.proto";
option java_outer_classname = "Messages";
option optimize_for = SPEED;
option optimize_for = LITE_RUNTIME;
message MessageType {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment