dect
/
dectmon
Archived
13
0
Fork 0

build: verify that event.h and event library are compatible

libev contains an libevent compat header file that at least on Debian
is only installed optionally. Make sure event.h and the event library
match since their respective struct event definitions don't match.

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-11-12 07:03:52 +01:00
parent d87fd20cf3
commit b27165e9ca
1 changed files with 25 additions and 0 deletions

View File

@ -66,6 +66,31 @@ AC_CHECK_HEADER([event.h],
EVENT_CFLAGS=$EVENTINC
AC_SUBST(EVENT_CFLAGS)
CFLAGS=$EVENT_CFLAGS
if [[ "$EVENT_LDFLAGS" == "-levent" ]]; then
AC_MSG_CHECKING([checking whether event.h is compatible with libevent])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
#ifdef EV_H_
#error
#endif
]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([incompatible event.h header for libevent])]
)
else
AC_MSG_CHECKING([checking whether event.h is compatible with libev])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
#ifndef EV_H_
#error
#endif
]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([incompatible event.h header for libev])]
)
fi
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST