1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-23 00:45:39 +00:00

libev or libevent in About dialog.

This commit is contained in:
Witold Filipczyk 2017-11-17 17:33:51 +01:00
parent 21d36fcbd1
commit d5261654f4
2 changed files with 18 additions and 2 deletions

View File

@ -516,7 +516,7 @@ if test "$enable_gssapi" = "yes"; then
GSSAPI_LIBS=`krb5-config --libs gssapi`
CFLAGS="$GSSAPI_CFLAGS $CFLAGS"
LIBS="$GSSAPI_LIBS $LIBS"
EL_CONFIG(CONFIG_GSSAPI, [GssApi])
EL_CONFIG(CONFIG_GSSAPI, [GssApi])
else
AC_MSG_RESULT(no)
fi
@ -1217,6 +1217,7 @@ fi
# ========
# libevent
# ========
CONFIG_LIBEV=no
AC_ARG_WITH(libev, [ --with-libev compile with libev (libevent compatibility mode)],
[if test "$withval" = yes; then enable_libev=yes; else enable_libev=no; fi])
cf_have_libev=no
@ -1226,13 +1227,16 @@ if test "$enable_libev" = yes; then
AC_CHECK_LIB(ev, event_loop)
if test "$ac_cv_lib_ev_event_loop" = yes; then
cf_have_libev=yes
EL_CONFIG(CONFIG_LIBEV, [libev])
fi
fi
fi
AC_SUBST(CONFIG_LIBEV)
AC_ARG_WITH(libevent, [ --with-libevent compile with libevent. Note that --with-libev has precedence],
[if test "$withval" = yes; then enable_libevent=yes; else enable_libevent=no; fi])
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)
@ -1240,16 +1244,19 @@ if test "$enable_libevent" = yes -a "$cf_have_libev" = no; then
AC_CHECK_LIB(event, event_loop)
if test "$ac_cv_lib_event_event_loop" = yes; then
cf_have_libevent=yes
EL_CONFIG(CONFIG_LIBEVENT, [libevent])
fi
fi
fi
AC_SUBST(CONFIG_LIBEVENT)
if test "$cf_have_libev" = yes -o "$cf_have_libevent" = yes; then
AC_HAVE_FUNCS(event_base_set event_get_version event_get_method event_base_free event_base_new event_reinit event_base_get_method event_config_set_flag event_get_struct_event_size)
fi
EL_LOG_CONFIG([CONFIG_LIBEV], [[libev]], [[$cf_have_libev]])
EL_LOG_CONFIG([CONFIG_LIBEVENT], [[libevent]], [[$cf_have_libevent]])
# Final SSL setup
EL_CONFIG_DEPENDS(CONFIG_SSL, [CONFIG_OPENSSL CONFIG_GNUTLS CONFIG_NSS_COMPAT_OSSL], [SSL])

View File

@ -22,6 +22,9 @@
#include "util/string.h"
#include "vernum.h"
#if defined(CONFIG_LIBEV) || defined(CONFIG_LIBEVENT)
extern int event_enabled;
#endif
static void
add_module_to_string(struct string *string, struct module *module,
@ -148,6 +151,12 @@ get_dyn_full_version(struct terminal *term, int more)
#endif
#ifdef CONFIG_COMBINE
comma, _("Combining characters", term),
#endif
#ifdef CONFIG_LIBEV
comma, (event_enabled ? _("libev", term) : _("libev (disabled)", term)),
#endif
#ifdef CONFIG_LIBEVENT
comma, (event_enabled ? _("libevent", term) : _("libevent (disabled)", term)),
#endif
comma,
(unsigned char *) NULL