From: Wouter Wijngaards Date: Tue, 23 Jan 2007 14:16:52 +0000 (+0000) Subject: Fixed. X-Git-Tag: release-0.0~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fda91de1906edda66489a4c081baba71871e5ea5;p=thirdparty%2Funbound.git Fixed. git-svn-id: file:///svn/unbound/trunk@28 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure.ac b/configure.ac index 7e592f749..bbe353908 100644 --- a/configure.ac +++ b/configure.ac @@ -104,7 +104,7 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], fi for dir in $withval; do ssldir="$dir" - if test -f "$dir/include/openssl/ssl.h"; then + if test -f "$dir/include/event.h"; then found_ssl="yes"; AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) CPPFLAGS="$CPPFLAGS -I$ssldir/include"; @@ -126,6 +126,36 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], AC_SUBST(RUNTIME_PATH) fi +# check for libevent +AC_ARG_WITH(ssl, AC_HELP_STRING([--with-libevent=pathname], + [set path to libevent (will check /usr/local /usr/lib /usr/pkg /usr/sfw /usr)]),[ + ],[ + withval="yes" + ]) + if test x_$withval != x_no; then + AC_MSG_CHECKING(for libevent) + if test x_$withval = x_ -o x_$withval = x_yes; then + withval="/usr/local /usr/lib /usr/pkg /usr/sfw /usr" + fi + for dir in $withval; do + thedir="$dir" + if test -f "$dir/include/event.h"; then + found_libevent="yes"; + CPPFLAGS="$CPPFLAGS -I$thedir/include"; + break; + fi + done + if test x_$found_libevent != x_yes; then + AC_MSG_ERROR(Cannot find the libevent library in $withval) + else + AC_MSG_RESULT(found in $thedir) + LDFLAGS="$LDFLAGS -L$thedir/lib -levent"; + RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib" + AC_CHECK_LIB(event, event_set) + fi + AC_SUBST(RUNTIME_PATH) + fi + if test "$srcdir" != "."; then CPPFLAGS="$CPPFLAGS -I$srcdir"; fi @@ -188,7 +218,6 @@ AC_CHECK_TYPE(in_port_t, [], [AC_DEFINE([in_port_t], [uint16_t], [in_port_t])], # check to see if libraries are needed for these functions. AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, inet_pton) -AC_CHECK_LIB(event, event_set) AC_FUNC_MALLOC diff --git a/doc/Changelog b/doc/Changelog index f517f0b80..e49b2e798 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 23 January 2007: Wouter - added libevent to configure to link with. - util/netevent setup work. + - configure searches for libevent. 22 January 2007: Wouter - Designed header file for network communication.