summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-11-07 17:36:01 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-07 20:26:27 -0800
commita2322e3cdccab552e143c33c75369216edfcb418 (patch)
tree606be11f1a3d8622b1bd9dbd7503db04ce409fd8
parente7aa524bcb5ffe1e09051afd324941b8980ba77b (diff)
Add configure option to enable or disable fd passing with sendmsg
--disable-sendfds or --enable-sendfds By default, configure auto-detects based on whether your system supports sendmsg at all. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit af8067cbf48561f1e2d43e153292e68e0376a8f9)
-rw-r--r--configure.ac18
1 files changed, 10 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 09bb496..a3468e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,14 +82,16 @@ AC_HEADER_STDC
AC_SEARCH_LIBS(getaddrinfo, socket)
AC_SEARCH_LIBS(connect, socket)
-have_sendmsg="no"
-case $host_os in
-linux*)
- AC_SEARCH_LIBS(sendmsg, socket, [have_sendmsg="yes"], [have_sendmsg="no"])
- ;;
+AC_ARG_ENABLE(sendfds, AS_HELP_STRING([--disable-sendfds], [Support FD passing (default: auto)]),
+ [sendfds=$enableval], [sendfds=auto])
+
+case x$sendfds in
+xauto)
+ AC_SEARCH_LIBS(sendmsg, socket, [sendfds="yes"], [sendfds="no"])
+ ;;
esac
-case x$have_sendmsg in
+case x$sendfds in
xyes)
AC_DEFINE([HAVE_SENDMSG],1,[Define if your platform supports sendmsg])
;;
@@ -192,7 +194,7 @@ XCB_EXTENSION(Composite, "yes")
XCB_EXTENSION(Damage, "yes")
XCB_EXTENSION(DPMS, "yes")
XCB_EXTENSION(DRI2, "yes")
-XCB_EXTENSION(DRI3, "$have_sendmsg")
+XCB_EXTENSION(DRI3, "$sendfds")
XCB_EXTENSION(GLX, "yes")
XCB_EXTENSION(Present, "yes")
XCB_EXTENSION(RandR, "yes")
@@ -275,7 +277,7 @@ echo " Package: ${PACKAGE_NAME} ${PACKAGE_VERSION}"
echo ""
echo " Configuration"
echo " XDM support.........: ${have_xdmcp}"
-echo " sendmsg fd passing..: ${have_sendmsg}"
+echo " sendmsg fd passing..: ${sendfds}"
echo " Build unit tests....: ${HAVE_CHECK}"
echo " XCB buffer size.....: ${xcb_queue_buffer_size}"
echo ""