From 1227dc29a3693b5b78ed0dd97f573f41793b8ca4 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 1 Jan 2011 17:59:50 +0100 Subject: [PATCH] libevent migration: discarded, make this libev - detect c-ares - detect libev --- citadel/configure.ac | 57 +++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/citadel/configure.ac b/citadel/configure.ac index baa179e45..8c45d5340 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -578,40 +578,59 @@ AC_CHECK_HEADER(libcitadel.h, CFLAGS="$saved_CFLAGS" -dnl experimental libevent smtp client remove this to... -AC_ARG_WITH(experimental_eventsmtp, - [ --with-experimental_eventsmtp enable experimental event smtp clients], - [ if test "x$withval" != "xno" ; then - CFLAGS="$CFLAGS -rdynamic " - LDFLAGS="$LDFLAGS -rdynamic " - SERVER_LDFLAGS="$SERVER_LDFLAGS -rdynamic " - +dnl experimental libev smtp client remove this to... AC_DEFINE(EXPERIMENTAL_SMTP_EVENT_CLIENT, [], [should we use the experimental libevent smtp client?]) dnl here... + + + + + AC_CHECK_LIB(cares, ares_init, + [ + C_ARES_LIBS=-lcares + AC_DEFINE(HAVE_C_ARES, 1, [Define to use c-ares library]) + have_good_c_ares=yes + ],, $SOCKET_LIBS $NSL_LIBS + ) + + + saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $SERVER_LIBS" dnl Check for libevent -AC_CHECK_HEADER(event.h, - [AC_CHECK_LIB(event, libcitadel_version_string, +AC_CHECK_HEADER(ares.h, + [AC_CHECK_LIB(cares, ares_init, [ - LIBS="-levent $LIBS $SERVER_LIBS" + LIBS="-lcares $LIBS $SERVER_LIBS" ], [ - AC_MSG_ERROR(libevent was not found or is not usable. Please install libevent.) + AC_MSG_ERROR(libc-ares was not found or is not usable. Please install libc-ares.) ] - , )], [ - AC_MSG_ERROR(event.h was not found or is not usable. Please install libevent.) + AC_MSG_ERROR(ares.h was not found or is not usable. Please install libc-ares.) ] ) - CFLAGS="$saved_CFLAGS" -dnl and from here to... - fi - ] + +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $SERVER_LIBS" +dnl Check for libevent +AC_CHECK_HEADER(ev.h, + [AC_CHECK_LIB(ev, libcitadel_version_string, + [ + LIBS="-lev $LIBS $SERVER_LIBS" + ], + [ + AC_MSG_ERROR(libev was not found or is not usable. Please install libev.) + ] + , + )], + [ + AC_MSG_ERROR(ev.h was not found or is not usable. Please install libev.) + ] ) -dnl here to make it final. +CFLAGS="$saved_CFLAGS" # The big search for OpenSSL if test "$with_ssl" != "no"; then -- 2.30.2