(trunk) #2167 improve the autoconf libevent test: don't use the OS copy unless it's got evutil_vsnprintf()
This commit is contained in:
parent
eaa9d37ee1
commit
a6235689a4
25
configure.ac
25
configure.ac
|
@ -170,16 +170,29 @@ dnl build our copy of libevent whether we use it or not,
|
||||||
dnl because "make dist" needs its Makefiles to exist, and
|
dnl because "make dist" needs its Makefiles to exist, and
|
||||||
dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
|
dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
|
||||||
AC_CONFIG_SUBDIRS([third-party/libevent])
|
AC_CONFIG_SUBDIRS([third-party/libevent])
|
||||||
|
libevent_source=bundled
|
||||||
|
AC_CHECK_LIB([event],[evutil_vsnprintf],
|
||||||
|
[libevent_found=yes],
|
||||||
|
[libevent_found=no],
|
||||||
|
[-levent])
|
||||||
AC_CHECK_HEADER([event-config.h],
|
AC_CHECK_HEADER([event-config.h],
|
||||||
[libevent_source=system
|
[libevent_headers_found=yes],
|
||||||
LIBEVENT_CPPFLAGS=""
|
[libevent_headers_found=no])
|
||||||
LIBEVENT_LIBS="-levent -lrt"],
|
libevent_source=bundled
|
||||||
[libevent_source=bundled
|
if test "x$libevent_found" = "xyes" ; then
|
||||||
|
if test "x$libevent_headers_found" = "xyes"; then
|
||||||
|
libevent_source=system
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$libevent_source" = "xbundled"; then
|
||||||
AC_MSG_NOTICE([couldn't find event-config.h, so using our own copy of libevent from third-party/libevent/.])
|
AC_MSG_NOTICE([couldn't find event-config.h, so using our own copy of libevent from third-party/libevent/.])
|
||||||
AC_MSG_NOTICE([if you are cross-compiling this is probably NOT what you want.])
|
AC_MSG_NOTICE([if you are cross-compiling this is probably NOT what you want.])
|
||||||
LIBEVENT_CPPFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
|
LIBEVENT_CPPFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
|
||||||
LIBEVENT_LIBS="\$(top_builddir)/third-party/libevent/libevent.la"])
|
LIBEVENT_LIBS="\$(top_builddir)/third-party/libevent/libevent.la"
|
||||||
|
else
|
||||||
|
LIBEVENT_CPPFLAGS=""
|
||||||
|
LIBEVENT_LIBS="-levent -lrt"
|
||||||
|
fi
|
||||||
AC_SUBST(LIBEVENT_CPPFLAGS)
|
AC_SUBST(LIBEVENT_CPPFLAGS)
|
||||||
AC_SUBST(LIBEVENT_LIBS)
|
AC_SUBST(LIBEVENT_LIBS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue