Misc (re #1882): Updated ioqueue epoll related vars in build config, e.g: update 'ac_linux_poll' value, introduce PJ_HAS_LINUX_EPOLL flag (thanks George Joseph for the patch).

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5247 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Nanang Izzuddin 2016-02-25 04:54:17 +00:00
parent b66f6b011b
commit a2eac68457
4 changed files with 16 additions and 6 deletions

View File

@ -463,6 +463,7 @@ Using Default Settings
$ ./configure --help
...
Optional Features:
--enable-epoll Use epoll on Linux instead of select
--disable-floating-point Disable floating point where possible
--disable-sound Exclude sound (i.e. use null sound)
--disable-small-filter Exclude small filter in resampling

View File

@ -622,7 +622,6 @@ ac_subst_vars='LTLIBOBJS
LIBOBJS
ac_main_obj
ac_host
ac_linux_poll
opus_present
opus_h_present
ac_no_opus
@ -688,6 +687,7 @@ ac_external_srtp
ac_external_gsm
ac_external_speex
ac_shared_libraries
ac_linux_poll
ac_os_objs
EGREP
GREP
@ -5681,6 +5681,7 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ioqueue backend" >&5
$as_echo_n "checking ioqueue backend... " >&6; }
# Check whether --enable-epoll was given.
@ -5689,12 +5690,16 @@ if test "${enable_epoll+set}" = set; then :
ac_os_objs=ioqueue_epoll.o
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/epoll" >&5
$as_echo "/dev/epoll" >&6; }
$as_echo "#define PJ_HAS_LINUX_EPOLL 1" >>confdefs.h
ac_linux_poll=epoll
else
ac_os_objs=ioqueue_select.o
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: select()" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: select()" >&5
$as_echo "select()" >&6; }
ac_linux_poll=select
fi
@ -8412,8 +8417,6 @@ esac
ac_linux_poll=select
ac_host=unix

View File

@ -410,6 +410,7 @@ dnl ######################
dnl # ioqueue selection
dnl #
AC_SUBST(ac_os_objs)
AC_SUBST(ac_linux_poll)
AC_MSG_CHECKING([ioqueue backend])
AC_ARG_ENABLE(epoll,
AC_HELP_STRING([--enable-epoll],
@ -417,10 +418,13 @@ AC_ARG_ENABLE(epoll,
[
ac_os_objs=ioqueue_epoll.o
AC_MSG_RESULT([/dev/epoll])
AC_DEFINE(PJ_HAS_LINUX_EPOLL,1)
ac_linux_poll=epoll
],
[
ac_os_objs=ioqueue_select.o
AC_MSG_RESULT([select()])
AC_MSG_RESULT([select()])
ac_linux_poll=select
])
AC_SUBST(ac_shared_libraries)
@ -1879,7 +1883,6 @@ esac
AC_SUBST(target)
AC_SUBST(ac_linux_poll,select)
AC_SUBST(ac_host,unix)
AC_SUBST(ac_main_obj)
case $target in

View File

@ -128,6 +128,9 @@
*/
#undef PJ_SELECT_NEEDS_NFDS
/* Was Linux epoll support enabled */
#undef PJ_HAS_LINUX_EPOLL
/* Is errno a good way to retrieve OS errors?
*/
#undef PJ_HAS_ERRNO_VAR