From: Wouter Wijngaards Date: Wed, 24 Jan 2007 13:46:31 +0000 (+0000) Subject: Configure update. Use ldns_buffer. X-Git-Tag: release-0.0~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b61786a83fd2fd6f36ccdb9b1ae132837bb62908;p=thirdparty%2Funbound.git Configure update. Use ldns_buffer. git-svn-id: file:///svn/unbound/trunk@30 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure.ac b/configure.ac index 36450c054..792e56c5f 100644 --- a/configure.ac +++ b/configure.ac @@ -168,7 +168,7 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], fi for dir in $withval; do ssldir="$dir" - if test -f "$dir/include/event.h"; then + if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes"; AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) CPPFLAGS="$CPPFLAGS -I$ssldir/include"; @@ -180,7 +180,7 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], else AC_MSG_RESULT(found in $ssldir) HAVE_SSL=yes - LDFLAGS="$LDFLAGS -L$ssldir/lib -lcrypto"; + LDFLAGS="$LDFLAGS -L$ssldir/lib"; RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib" AC_CHECK_LIB(crypto, HMAC_CTX_init,, [ AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) @@ -213,7 +213,7 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-libevent=pathname], AC_MSG_ERROR(Cannot find the libevent library in $withval) else AC_MSG_RESULT(found in $thedir) - LDFLAGS="$LDFLAGS -L$thedir/lib -levent"; + LDFLAGS="$LDFLAGS -L$thedir/lib"; RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib" AC_CHECK_LIB(event, event_set) fi @@ -294,6 +294,8 @@ AH_BOTTOM([ # define ATTR_UNUSED(x) x #endif /* !HAVE_ATTR_UNUSED */ +#include "ldns/ldns.h" + ]) AC_CONFIG_FILES([Makefile]) diff --git a/doc/Changelog b/doc/Changelog index 93c6aef61..48aef42c2 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +24 January 2007: Wouter + - cleaned up configure.ac. + 23 January 2007: Wouter - added libevent to configure to link with. - util/netevent setup work. diff --git a/util/netevent.c b/util/netevent.c index 76553bed2..3d7867838 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -141,7 +141,7 @@ comm_point_tcp_handle_callback(int ATTR_UNUSED(fd), short ATTR_UNUSED(event), } struct comm_point* -comm_point_create_udp(struct comm_base *base, int fd, struct buffer* buffer, +comm_point_create_udp(struct comm_base *base, int fd, ldns_buffer* buffer, comm_point_callback_t* callback, void* callback_arg) { struct comm_point* c = (struct comm_point*)calloc(1, @@ -199,7 +199,7 @@ comm_point_create_tcp_handler(struct comm_base *base, return NULL; } c->fd = -1; - c->buffer = NULL /* routine to create new buffer! bufsize */; + c->buffer = ldns_buffer_new(bufsize); c->timeout = NULL; c->tcp_is_reading = 0; c->tcp_byte_count = 0; diff --git a/util/netevent.h b/util/netevent.h index e0cddb3d2..42906f809 100644 --- a/util/netevent.h +++ b/util/netevent.h @@ -28,12 +28,11 @@ #define NET_EVENT_H #include "config.h" -struct buffer; +struct comm_point; /* internal event notification data storage structure. */ struct internal_event; struct internal_base; -struct comm_point; /** callback from communication point function type */ typedef int comm_point_callback_t(struct comm_point*, void*, int); @@ -66,7 +65,7 @@ struct comm_point { struct timeval *timeout; /** buffer pointer. Either to perthread, or own buffer or NULL */ - struct buffer *buffer; + ldns_buffer *buffer; /* -------- TCP Handler -------- */ /** Read/Write state for TCP */ @@ -163,7 +162,7 @@ void comm_base_dispatch(struct comm_base* b); * Sets timeout to NULL. Turns off TCP options. */ struct comm_point* comm_point_create_udp(struct comm_base *base, - int fd, struct buffer* buffer, + int fd, ldns_buffer* buffer, comm_point_callback_t* callback, void* callback_arg); /**