diff --git a/configure b/configure index e3a87f8cca..f1132b8694 100755 --- a/configure +++ b/configure @@ -35642,8 +35642,16 @@ fi done if test "$ac_cv_header_sys_epoll_h" = "yes"; then - $as_echo "#define wxUSE_EPOLL_DISPATCHER 1" >>confdefs.h + case "${host}" in + *-*-linux*) + $as_echo "#define wxUSE_EPOLL_DISPATCHER 1" >>confdefs.h + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: wxEpollDispatcher disabled, because OS is not Linux" >&5 +$as_echo "$as_me: WARNING: wxEpollDispatcher disabled, because OS is not Linux" >&2;} + ;; + esac else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sys/epoll.h not available, wxEpollDispatcher disabled" >&5 $as_echo "$as_me: WARNING: sys/epoll.h not available, wxEpollDispatcher disabled" >&2;} diff --git a/configure.in b/configure.in index 9fed41a9ae..16ff78cc72 100644 --- a/configure.in +++ b/configure.in @@ -6254,7 +6254,16 @@ if test "$wxUSE_CONSOLE_EVENTLOOP" = "yes"; then if test "$wxUSE_EPOLL_DISPATCHER" = "yes"; then AC_CHECK_HEADERS(sys/epoll.h,,, [AC_INCLUDES_DEFAULT()]) if test "$ac_cv_header_sys_epoll_h" = "yes"; then - AC_DEFINE(wxUSE_EPOLL_DISPATCHER) + dnl On FreeBSD or other *BSD sys/epoll.h may exist, but require + dnl linking with extra libraries, so we use epoll on Linux only. + case "${host}" in + *-*-linux*) + AC_DEFINE(wxUSE_EPOLL_DISPATCHER) + ;; + *) + AC_MSG_WARN([wxEpollDispatcher disabled, because OS is not Linux]) + ;; + esac else AC_MSG_WARN([sys/epoll.h not available, wxEpollDispatcher disabled]) fi