Configure update. Use ldns_buffer.

git-svn-id: file:///svn/unbound/trunk@30 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-01-24 13:46:31 +00:00
parent a9e14cba23
commit b61786a83f
4 changed files with 13 additions and 9 deletions

View File

@ -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])

View File

@ -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.

View File

@ -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;

View File

@ -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);
/**