~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2008-11-22 00:22:08 UTC
  • mfrom: (590.2.4 devel)
  • Revision ID: brian@tangent.org-20081122002208-zoq1c8ev13d992xx
Incomming work from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
365
365
AC_CHECK_PROGS(GROUPADD, groupadd addgroup)
366
366
AC_CHECK_PROGS(USERADD, useradd adduser)
367
367
 
368
 
# Not critical since the generated file is distributed
369
 
AC_CHECK_PROGS(YACC, ['bison -y -p DRIZZLE'])
 
368
dnl Needed for ltmain
 
369
AC_PROG_RANLIB
 
370
 
 
371
dnl Not critical since the generated file is distributed
 
372
AC_PROG_YACC
370
373
if test -z "$YACC" && test -d ".bzr"
371
374
then
372
375
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
479
482
AC_CXX_CINTTYPES
480
483
AC_CXX_CMATH
481
484
 
 
485
AC_TYPE_INT8_T
 
486
AC_TYPE_INT16_T
 
487
AC_TYPE_INT32_T
 
488
AC_TYPE_INT64_T
 
489
AC_TYPE_PID_T
 
490
AC_TYPE_SSIZE_T
 
491
AC_TYPE_UID_T
 
492
AC_TYPE_UINT8_T
 
493
AC_TYPE_UINT16_T
 
494
AC_TYPE_UINT32_T
 
495
AC_TYPE_UINT64_T
 
496
 
 
497
 
482
498
DRIZZLE_PROG_AR
483
499
 
484
500
# libdrizzle versioning when linked with GNU ld.
532
548
  ],[
533
549
    google::protobuf::FileDescriptorProto testFdp;
534
550
  ], ac_libprotobuf_works=yes, [
535
 
        AC_ERROR([could not find Google's libprotobuf])
 
551
        AC_MSG_ERROR([could not find Google's libprotobuf])
536
552
  ])
537
553
 
538
554
])
549
565
# Check for libuuid
550
566
#--------------------------------------------------------------------
551
567
 
552
 
AC_CHECK_HEADERS(uuid/uuid.h)
553
 
if test "x$ac_cv_header_uuid_uuid_h" = "xno"
554
 
then
555
 
  AC_MSG_ERROR([Couldn't find uuid/uuid.h. Try installing libuuid development packages])
556
 
fi
557
 
AC_CHECK_LIB(uuid, uuid_generate)
 
568
SEARCH_FOR_LIB(uuid, uuid_generate, uuid/uuid.h, 
 
569
               AC_MSG_ERROR([libuuid is required for Drizzle]))
 
570
 
558
571
 
559
572
#--------------------------------------------------------------------
560
573
# Check for libevent
561
574
#--------------------------------------------------------------------
562
575
 
563
 
AC_ARG_WITH(libevent,
564
 
  [AS_HELP_STRING([--with-libevent@<:@=DIR@:>@],
565
 
       [Use libevent in DIR])],
566
 
  [ with_libevent=$withval ],
567
 
  [ with_libevent=yes ])
568
 
 
569
 
if test "$with_libevent" = "yes"
570
 
then
571
 
    AC_CHECK_HEADERS(event.h)
572
 
    if test "x$ac_cv_header_event_h" != "xyes"
573
 
    then
574
 
      AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
575
 
    fi
576
 
    my_save_LIBS="$LIBS"
577
 
    LIBS=""
578
 
    AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
579
 
    LIBEVENT_LIBS="${LIBS}"
580
 
    LIBS="${my_save_LIBS}"
581
 
    LIBEVENT_CPPFLAGS=""
582
 
else
583
 
    AC_MSG_CHECKING(for libevent in $withval)
584
 
    if test -f $withval/event.h -a -f $withval/libevent.a; then
585
 
       owd=`pwd`
586
 
       if cd $withval; then withval=`pwd`; cd $owd; fi
587
 
       LIBEVENT_CPPFLAGS="-I$withval"
588
 
       LIBEVENT_LIBS="-L$withval -levent"
589
 
    elif test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
590
 
       owd=`pwd`
591
 
       if cd $withval; then withval=`pwd`; cd $owd; fi
592
 
       LIBEVENT_CPPFLAGS="-I$withval/include"
593
 
       LIBEVENT_LIBS="-L$withval/lib -levent"
594
 
    else
595
 
       AC_MSG_ERROR([event.h or libevent.a not found in $withval])
596
 
    fi
597
 
fi
598
 
 
599
 
AC_SUBST(LIBEVENT_CPPFLAGS)
600
 
AC_SUBST(LIBEVENT_LIBS)
601
 
 
602
 
AC_CACHE_CHECK([for bufferevent in libevent], ac_libevent_works, [
 
576
SEARCH_FOR_LIB(event, event_loop, event.h, 
 
577
               AC_MSG_ERROR([libevent is required for Drizzle]))
 
578
 
 
579
 
 
580
AC_CACHE_CHECK([for bufferevent in libevent], ac_cv_libevent_works, [
603
581
  save_CPPFLAGS="$CPPFLAGS"
604
582
  save_LIBS="$LIBS"
605
 
  CPPFLAGS="$LIBEVENT_CPPFLAGS"
606
 
  LIBS="$LIBEVENT_LIBS"
 
583
  CPPFLAGS="$EVENT_CPPFLAGS"
 
584
  LIBS="$EVENT_LIBS"
607
585
  AC_TRY_LINK([
608
586
#include <sys/types.h>
609
587
#include <sys/time.h>
611
589
#include <event.h>],[
612
590
        struct bufferevent bev;
613
591
        bufferevent_settimeout(&bev, 1, 1);
614
 
  ], ac_libevent_works=yes, [
615
 
        AC_ERROR([you need to install a more recent version of libevent,
 
592
  ], ac_cv_libevent_works=yes, [
 
593
        AC_MSG_ERROR([you need to install a more recent version of libevent,
616
594
        check http://www.monkey.org/~provos/libevent/])
617
595
  ])
618
596
 
651
629
# Check for libz
652
630
#--------------------------------------------------------------------
653
631
 
654
 
my_save_LIBS="$LIBS"
655
 
LIBS=""
656
 
AC_CHECK_HEADERS(zlib.h)
657
 
if test "x$ac_cv_header_zlib_h" != "xyes"
658
 
then
659
 
  AC_MSG_ERROR([Couldn't find zlib.h. Try installing zlib development packages])
660
 
fi
661
 
AC_CHECK_LIB(z, crc32, [], [AC_MSG_ERROR(could not find libz)])
662
 
ZLIB_LIBS="$LIBS"
663
 
LIBS="$my_save_LIBS"
664
 
AC_SUBST(ZLIB_LIBS)
 
632
SEARCH_FOR_LIB(z, crc32, zlib.h, 
 
633
               AC_MSG_ERROR([libz is required for Drizzle]))
665
634
 
666
635
 
667
636
#--------------------------------------------------------------------
1057
1026
dnl Checks for typedefs, structures, and compiler characteristics.
1058
1027
AC_C_CONST
1059
1028
AC_C_INLINE
 
1029
AC_C_VOLATILE
1060
1030
AC_TYPE_OFF_T
1061
1031
AC_HEADER_TIME
1062
1032
AC_STRUCT_TM