# LIBEVENT_CHECK_CONFIG ([DEFAULT-ACTION])
# ----------------------------------------------------------
# Checks for libevent. DEFAULT-ACTION is the string yes or no to
# specify whether to default to --with-libevent or --without-libevent.
# If not supplied, DEFAULT-ACTION is no.
# This macro #defines HAVE_LIBEVENT if a required header files is
# found, and sets @LIBEVENT_LDFLAGS@ and @LIBEVENT_CFLAGS@ to the necessary
# This macro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_DEFUN([LIBEVENT_TRY_LINK],
AC_DEFUN([LIBEVENT_CHECK_CONFIG],
If you want to specify libevent installation directories:
AC_HELP_STRING([--with-libevent@<:@=DIR@:>@], [use libevent from given base install directory (DIR), default is to search through a number of common places for the libevent files.])],
if test "x$withval" = "xyes"; then
if test -f /usr/local/include/event.h; then withval=/usr/local; else withval=/usr; fi
LIBEVENT_CFLAGS="-I$withval/include"
LIBEVENT_LDFLAGS="-L$withval/lib"
AC_ARG_WITH([libevent-include],
AC_HELP_STRING([--with-libevent-include@<:@=DIR@:>@],
[use libevent include headers from given path.]
LIBEVENT_CFLAGS="-I$withval"
AC_ARG_WITH([libevent-lib],
AC_HELP_STRING([--with-libevent-lib@<:@=DIR@:>@],
[use libevent libraries from given path.]
LIBEVENT_LDFLAGS="-L$withval"