1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[libevent] include event2/event.h instead of event.h

This commit is contained in:
Witold Filipczyk 2023-12-26 15:53:22 +01:00
parent 5211b2d8a1
commit 1f4ca1445d
6 changed files with 19 additions and 17 deletions

View File

@ -373,8 +373,8 @@
/* Define to 1 if you have the `event_get_version' function. */
#mesondefine HAVE_EVENT_GET_VERSION
/* Define to 1 if you have the <event.h> header file. */
#mesondefine HAVE_EVENT_H
/* Define to 1 if you have the <event2/event.h> header file. */
#mesondefine HAVE_EVENT2_EVENT_H
/* Define to 1 if you have the `event_reinit' function. */
#mesondefine HAVE_EVENT_REINIT

View File

@ -1499,8 +1499,8 @@ AC_ARG_WITH(libevent, [ --with-libevent compile with libevent. Note tha
CONFIG_LIBEVENT=no
cf_have_libevent=no
if test "$enable_libevent" = yes -a "$cf_have_libev" = no; then
AC_CHECK_HEADERS(event.h ev-event.h)
if test "$ac_cv_header_event_h" = yes; then
AC_CHECK_HEADERS(event2/event.h ev-event.h)
if test "$ac_cv_header_event2_event_h" = yes; then
AC_CHECK_LIB(event, event_loop)
if test "$ac_cv_lib_event_event_loop" = yes; then
cf_have_libevent=yes

View File

@ -327,8 +327,8 @@ if compiler.has_header('idn2.h')
conf_data.set('HAVE_IDN2_H', 1)
endif
if compiler.has_header('event.h')
conf_data.set('HAVE_EVENT_H', 1)
if compiler.has_header('event2/event.h')
conf_data.set('HAVE_EVENT2_EVENT_H', 1)
endif
if compiler.has_header('alloca.h')
@ -382,8 +382,8 @@ if conf_data.get('CONFIG_LIBEV')
deps += eventdeps
conf_data.set('CONFIG_LIBEVENT', false)
elif conf_data.get('CONFIG_LIBEVENT')
eh = '#include <event.h>'
eventdeps = dependency('libevent', static: st)
eh = '#include <event2/event.h>'
eventdeps = dependency('libevent', static: st, version: '>=2.0.0')
deps += eventdeps
conf_data.set('HAVE_LIBEVENT', true)
else

View File

@ -37,9 +37,9 @@
#define USE_LIBEVENT
#endif
#if (defined(HAVE_EVENT_H) || defined(HAVE_EV_EVENT_H) || defined(HAVE_LIBEV_EVENT_H)) && defined(HAVE_LIBEVENT) && !defined(OPENVMS) && !defined(DOS)
#if defined(HAVE_EVENT_H)
#include <event.h>
#if (defined(HAVE_EVENT2_EVENT_H) || defined(HAVE_EV_EVENT_H) || defined(HAVE_LIBEV_EVENT_H)) && defined(HAVE_LIBEVENT) && !defined(OPENVMS) && !defined(DOS)
#if defined(HAVE_EVENT2_EVENT_H)
#include <event2/event.h>
#elif defined(HAVE_EV_EVENT_H)
#include <ev-event.h>
#endif

View File

@ -10,9 +10,11 @@
#define USE_LIBEVENT
#endif
#if (defined(HAVE_EVENT_H) || defined(HAVE_EV_EVENT_H) || defined(HAVE_LIBEV_EVENT_H)) && defined(HAVE_LIBEVENT) && !defined(OPENVMS) && !defined(DOS)
#if defined(HAVE_EVENT_H)
#include <event.h>
#if (defined(HAVE_EVENT2_EVENT_H) || defined(HAVE_EV_EVENT_H) || defined(HAVE_LIBEV_EVENT_H)) && defined(HAVE_LIBEVENT) && !defined(OPENVMS) && !defined(DOS)
#if defined(HAVE_EVENT2_EVENT_H)
#include <event2/event.h>
#include <event2/event_compat.h>
#include <event2/event_struct.h>
#elif defined(HAVE_EV_EVENT_H)
#include <ev-event.h>
#endif

View File

@ -15,9 +15,9 @@
#define USE_LIBEVENT
#endif
#if (defined(HAVE_EVENT_H) || defined(HAVE_EV_EVENT_H) || defined(HAVE_LIBEV_EVENT_H)) && defined(HAVE_LIBEVENT) && !defined(OPENVMS) && !defined(DOS)
#if defined(HAVE_EVENT_H)
#include <event.h>
#if (defined(HAVE_EVENT2_EVENT_H) || defined(HAVE_EV_EVENT_H) || defined(HAVE_LIBEV_EVENT_H)) && defined(HAVE_LIBEVENT) && !defined(OPENVMS) && !defined(DOS)
#if defined(HAVE_DEVENT2_EVENT_H)
#include <event2/event.h>
#elif defined(HAVE_EV_EVENT_H)
#include <ev-event.h>
#endif