~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2008-11-29 02:09:01 UTC
  • mfrom: (629.2.6 devel)
  • Revision ID: brian@tangent.org-20081129020901-khmbgwelmn6ysx7r
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
376
376
AC_PROG_RANLIB
377
377
 
378
378
dnl Not critical since the generated file is distributed
379
 
AC_PROG_YACC
 
379
AC_CHECK_PROGS(YACC, ['bison -y'])
380
380
if test -z "$YACC" && test -d ".bzr"
381
381
then
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
#--------------------------------------------------------------------
503
503
 
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 ])
510
 
 
511
 
save_CPPFLAGS="$CPPFLAGS"
512
 
save_LIBS="$LIBS"
513
 
 
514
 
if test "$with_protobuf" = "yes"
515
 
then
516
 
  CPPFLAGS=""
517
 
  LIBS="-lprotobuf"
518
 
  PROTO_PATH="$PATH"
519
 
else
520
 
  CPPFLAGS="-I$withval/include"
521
 
  LIBS="-L$withval/lib -lprotobuf"
522
 
  PROTO_PATH="${withval}/bin:$PATH"
523
 
fi 
524
 
 
525
 
AC_PATH_PROG([PROTOC],[protoc],[no],[$PROTO_PATH])
 
504
AC_LANG_PUSH([C++])
 
505
SEARCH_FOR_LIB(protobuf, printf, google/protobuf/message.h,
 
506
               AC_MSG_ERROR([protobuf is required for Drizzle]))
 
507
 
 
508
AC_PATH_PROG([PROTOC],[protoc],[no],[$PROTOBUF_PATH])
526
509
if test "x$PROTOC" = "xno"
527
510
then
528
511
  AC_MSG_ERROR([Couldn't find protoc. Try installing Google Protocol Buffer.])
529
512
fi
530
513
 
531
 
AC_LANG_PUSH([C++])
532
 
AC_CHECK_HEADERS([google/protobuf/message.h])
533
 
if test "x$ac_cv_header_google_protobuf_message_h" != "xyes"
534
 
then
535
 
  AC_MSG_ERROR([Couldn't find message.h. Try installing Google Protocol Buffer development packages])
536
 
fi
537
 
AC_MSG_RESULT("$wthval")
538
 
 
539
 
AC_CACHE_CHECK([for Message in libprotobuf], ac_cv_libprotobuf_works, [
540
 
  AC_TRY_LINK([
541
 
#include <google/protobuf/descriptor.pb.h>
542
 
  ],[
543
 
    google::protobuf::FileDescriptorProto testFdp;
544
 
  ], ac_cv_libprotobuf_works=yes, [
545
 
        AC_MSG_ERROR([could not find Google's libprotobuf])
546
 
  ])
547
 
 
548
 
])
549
 
 
550
 
PROTOBUF_LIBS="${LIBS}"
551
 
PROTOBUF_CPPFLAGS="${CPPFLAGS}"
552
 
AC_SUBST(PROTOBUF_LIBS)
553
 
AC_SUBST(PROTOBUF_CPPFLAGS)
554
 
CPPFLAGS="$save_CPPFLAGS"
555
 
LIBS="$save_LIBS"
556
514
AC_LANG_POP()
557
515
 
558
516
#--------------------------------------------------------------------
578
536
AC_CACHE_CHECK([for bufferevent in libevent], ac_cv_libevent_works, [
579
537
  save_CPPFLAGS="$CPPFLAGS"
580
538
  save_LIBS="$LIBS"
581
 
  CPPFLAGS="$EVENT_CPPFLAGS"
 
539
  CPPFLAGS="$EVENT_CFLAGS"
582
540
  LIBS="$EVENT_LIBS"
583
541
  AC_TRY_LINK([
584
542
#include <sys/types.h>