[PATCH 1/7] Make XTrans FD passing support optional. Define only on Linux
Keith Packard
keithp at keithp.com
Thu Nov 7 12:15:54 PST 2013
Until other operating systems have a libXtrans port for FD passing,
disable this on non-Linux systems.
Note that this define affects how libXtrans gets built into the X
server, which is why it need only define the symbol
Signed-off-by: Keith Packard <keithp at keithp.com>
---
configure.ac | 35 +++++++++++++++++++++++++++++++++++
include/dix-config.h.in | 3 +++
include/xorg-config.h.in | 3 +++
include/xorg-server.h.in | 3 +++
4 files changed, 44 insertions(+)
diff --git a/configure.ac b/configure.ac
index 6925df8..12610e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1118,6 +1118,41 @@ case "$DRI2,$HAVE_DRI2PROTO" in
esac
AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
+AC_ARG_ENABLE(xtrans-send-fds, AS_HELP_STRING([--disable-xtrans-send-fds], [Use Xtrans support for fd passing (default: auto)]), [XTRANS_SEND_FDS=$enableval], [XTRANS_SEND_FDS=auto])
+
+case "x$XTRANS_SEND_FDS" in
+xauto)
+ case "$host_os" in
+ linux*)
+ XTRANS_SEND_FDS=yes
+ ;;
+ *)
+ XTRANS_SEND_FDS=no
+ ;;
+ esac
+esac
+
+case "x$XTRANS_SEND_FDS" in
+xyes)
+ AC_DEFINE(XTRANS_SEND_FDS, 1, [Enable xtrans fd passing support])
+ ;;
+esac
+
+case "$DRI3,$XTRANS_SEND_FDS" in
+ yes,yes | auto,yes)
+ ;;
+ yes,no)
+ AC_MSG_ERROR([DRI3 requested, but xtrans fd passing support not found.])
+ DRI3=no
+ ;;
+ no,*)
+ ;;
+ *)
+ AC_MSG_NOTICE([DRI3 disabled because dri3proto not found.])
+ DRI3=no
+ ;;
+esac
+
PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO,
[HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 156383b..e4eea8d 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -452,4 +452,7 @@
/* Have support for X shared memory fence library (xshmfence) */
#undef HAVE_XSHMFENCE
+/* Use XTrans FD passing support */
+#undef XTRANS_SEND_FDS
+
#endif /* _DIX_CONFIG_H_ */
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index e3444da..48bab49 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -148,4 +148,7 @@
/* Have support for X shared memory fence library (xshmfence) */
#undef HAVE_XSHMFENCE
+/* Use XTrans FD passing support */
+#undef XTRANS_SEND_FDS
+
#endif /* _XORG_CONFIG_H_ */
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 960817e..0c651bf 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -221,4 +221,7 @@
/* Have support for X shared memory fence library (xshmfence) */
#undef HAVE_XSHMFENCE
+/* Use XTrans FD passing support */
+#undef XTRANS_SEND_FDS
+
#endif /* _XORG_SERVER_H_ */
--
1.8.4.2
More information about the xorg-devel
mailing list