summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2016-02-25 04:54:17 +0000
committerNanang Izzuddin <nanang@teluu.com>2016-02-25 04:54:17 +0000
commit51a744be31cb2fd995d6c38804b7fa9a39f71bca (patch)
treef28b4e8ccd02564e4385d8f5c84a8e63bc9737de
parentdc8713e43f4470112d27d32d045231cf581ae20d (diff)
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: http://svn.pjsip.org/repos/pjproject/trunk@5247 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--README.txt1
-rwxr-xr-xaconfigure11
-rw-r--r--aconfigure.ac7
-rw-r--r--pjlib/include/pj/compat/os_auto.h.in3
4 files changed, 16 insertions, 6 deletions
diff --git a/README.txt b/README.txt
index bc45da88..48415fdf 100644
--- a/README.txt
+++ b/README.txt
@@ -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
diff --git a/aconfigure b/aconfigure
index e174bbf0..33a08f51 100755
--- a/aconfigure
+++ b/aconfigure
@@ -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
diff --git a/aconfigure.ac b/aconfigure.ac
index 2f71abbe..3e88124b 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -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
diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in
index 77980d36..c8e73b20 100644
--- a/pjlib/include/pj/compat/os_auto.h.in
+++ b/pjlib/include/pj/compat/os_auto.h.in
@@ -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