# Check whether --with-libevent was given.
if test "${with_libevent+set}" = set; then
withval=$with_libevent; case "$withval" in
yes|no)
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
;;
*)
{ echo "$as_me:$LINENO: result: $withval" >&5
echo "${ECHO_T}$withval" >&6; }
if test -f $withval/event.h -a -f $withval/libevent.a; then
owd=`pwd`
if cd $withval; then withval=`pwd`; cd $owd; fi
LEVENT_INCLUDES="-I$withval"
LEVENT_LIB="-L$withval -levent"
else
{ { echo "$as_me:$LINENO: error: event.h or libevent.a not found in selected directory $withval" >&5
echo "$as_me: error: event.h or libevent.a not found in selected directory $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
;;
esac
else
if test -f /usr/local/include/event.h; then
LEVENT_INCLUDES="-I/usr/include"
LEVENT_LIB="-L/usr/lib -levent"
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
{ { echo "$as_me:$LINENO: error: libevent is missing" >&5
echo "$as_me: error: libevent is missing" >&2;}