summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-10-15 16:04:17 +0300
committerLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-12-01 00:13:41 +0000
commit105fc117b70635dbeb921a5a74be75e44ac98fe2 (patch)
tree9f73791758528154a9a7dbb327dc0acefe1ae4b5 /configure
parentf9ba58a13baad7982600a84563b488f65581bfd9 (diff)
Add qt_safe_poll
This function is introduced to safely provide poll(2)-like semantics for socket multiplexing on Unix-like platforms. For platforms where no poll system call is available, an implementation based on select(2) is provided. Change-Id: I320e97dae5924316675a74d1897c48cae292ac6d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure b/configure
index b65519cce9..0412a42e12 100755
--- a/configure
+++ b/configure
@@ -745,6 +745,7 @@ CFG_GETIFADDRS=auto
CFG_INOTIFY=auto
CFG_EVENTFD=auto
CFG_CLOEXEC=no
+CFG_POLL=auto
CFG_RPATH=yes
CFG_FRAMEWORK=auto
CFG_USE_GOLD_LINKER=auto
@@ -6135,6 +6136,16 @@ if compileTest unix/cloexec "cloexec"; then
CFG_CLOEXEC=yes
fi
+if compileTest unix/ppoll "ppoll"; then
+ CFG_POLL="ppoll"
+elif compileTest unix/pollts "pollts"; then
+ CFG_POLL="pollts"
+elif compileTest unix/poll "poll"; then
+ CFG_POLL="poll"
+else
+ CFG_POLL="select"
+fi
+
if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_SECURETRANSPORT" != "no" ] && ([ "$CFG_OPENSSL" = "no" ] || [ "$CFG_OPENSSL" = "auto" ]); then
CFG_SECURETRANSPORT=yes
CFG_OPENSSL=no
@@ -6444,6 +6455,10 @@ fi
if [ "$CFG_CLOEXEC" = "yes" ]; then
QT_CONFIG="$QT_CONFIG threadsafe-cloexec"
fi
+if [ "$CFG_POLL" = "select" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NATIVE_POLL"
+fi
+QT_CONFIG="$QT_CONFIG poll_$CFG_POLL"
if [ "$CFG_LIBJPEG" = "no" ]; then
CFG_JPEG="no"
elif [ "$CFG_LIBJPEG" = "system" ]; then