378
378
dnl Not critical since the generated file is distributed
379
AC_CHECK_PROGS(YACC, ['bison -y'])
380
380
if test -z "$YACC" && test -d ".bzr"
382
382
AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
501
501
# Check for Google Proto Buffers
502
502
#--------------------------------------------------------------------
504
AC_MSG_CHECKING(for Google Protocol Buffers)
505
AC_ARG_WITH(protobuf,
506
[AS_HELP_STRING([--with-protobuf@<:@=DIR@:>@],
507
[search for protobuf in DIR/include and DIR/lib])],
508
[ with_protobuf=$withval ],
509
[ with_protobuf=yes ])
511
save_CPPFLAGS="$CPPFLAGS"
514
if test "$with_protobuf" = "yes"
520
CPPFLAGS="-I$withval/include"
521
LIBS="-L$withval/lib -lprotobuf"
522
PROTO_PATH="${withval}/bin:$PATH"
525
AC_PATH_PROG([PROTOC],[protoc],[no],[$PROTO_PATH])
505
SEARCH_FOR_LIB(protobuf, printf, google/protobuf/message.h,
506
AC_MSG_ERROR([protobuf is required for Drizzle]))
508
AC_PATH_PROG([PROTOC],[protoc],[no],[$PROTOBUF_PATH])
526
509
if test "x$PROTOC" = "xno"
528
511
AC_MSG_ERROR([Couldn't find protoc. Try installing Google Protocol Buffer.])
532
AC_CHECK_HEADERS([google/protobuf/message.h])
533
if test "x$ac_cv_header_google_protobuf_message_h" != "xyes"
535
AC_MSG_ERROR([Couldn't find message.h. Try installing Google Protocol Buffer development packages])
537
AC_MSG_RESULT("$wthval")
539
AC_CACHE_CHECK([for Message in libprotobuf], ac_cv_libprotobuf_works, [
541
#include <google/protobuf/descriptor.pb.h>
543
google::protobuf::FileDescriptorProto testFdp;
544
], ac_cv_libprotobuf_works=yes, [
545
AC_MSG_ERROR([could not find Google's libprotobuf])
550
PROTOBUF_LIBS="${LIBS}"
551
PROTOBUF_CPPFLAGS="${CPPFLAGS}"
552
AC_SUBST(PROTOBUF_LIBS)
553
AC_SUBST(PROTOBUF_CPPFLAGS)
554
CPPFLAGS="$save_CPPFLAGS"
558
516
#--------------------------------------------------------------------