summaryrefslogtreecommitdiff
path: root/xtrans.m4
diff options
context:
space:
mode:
Diffstat (limited to 'xtrans.m4')
-rw-r--r--xtrans.m456
1 files changed, 37 insertions, 19 deletions
diff --git a/xtrans.m4 b/xtrans.m4
index 6319c33..3627f91 100644
--- a/xtrans.m4
+++ b/xtrans.m4
@@ -25,49 +25,67 @@ dnl other dealings in this Software without prior written authorization
dnl from the copyright holders.
dnl
+# XTRANS_TCP_FLAGS()
+# ------------------
+# Find needed libraries for TCP sockets, and check for IPv6 support
+AC_DEFUN([XTRANS_TCP_FLAGS],[
+ # SVR4 hides these in libraries other than libc
+ AC_SEARCH_LIBS(socket, [socket])
+ AC_SEARCH_LIBS(gethostbyname, [nsl])
+
+ # Needs to come after above checks for libsocket & libnsl for SVR4 systems
+ AC_ARG_ENABLE(ipv6,
+ AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]),
+ [IPV6CONN=$enableval],
+ [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
+ AC_MSG_CHECKING([if IPv6 support should be built])
+ if test "$IPV6CONN" = "yes"; then
+ AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
+ fi
+ AC_MSG_RESULT($IPV6CONN)
+]) # XTRANS_TCP_FLAGS
+
# XTRANS_CONNECTION_FLAGS()
# -------------------------
-# Standard checks for Xtrans transport flags used by the Xorg packages
+# Standard checks for which Xtrans transports to use by the Xorg packages
# that use Xtrans functions
AC_DEFUN([XTRANS_CONNECTION_FLAGS],
-[AC_ARG_ENABLE(unix-transport,[ --disable-unix-transport ],
+[AC_ARG_ENABLE(unix-transport,
+ AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
[UNIXCONN=$enableval], [UNIXCONN=yes])
- AC_ARG_ENABLE(tcp-transport, [ --disable-tcp-transport ],
+ AC_ARG_ENABLE(tcp-transport,
+ AC_HELP_STRING([--enable-unix-transport],[Enable TCP socket transport]),
[TCPCONN=$enableval], [TCPCONN=yes])
+ AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
if test "$UNIXCONN" = "yes"; then
AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
fi
+ AC_MSG_RESULT($UNIXCONN)
+ AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
if test "$TCPCONN" = "yes"; then
AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
- # SVR4 hides these in libraries other than libc
- AC_SEARCH_LIBS(socket, [socket])
- AC_SEARCH_LIBS(gethostbyname, [nsl])
- fi
- # Needs to come after above checks for libsocket & libnsl for SVR4 systems
- AC_ARG_ENABLE(ipv6, [ --disable-ipv6 ], [IPV6CONN=$enableval],
- [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
- if test "$IPV6CONN" = "yes"; then
- AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
+ XTRANS_TCP_FLAGS
fi
+ AC_MSG_RESULT($TCPCONN)
]) # XTRANS_CONNECTION_FLAGS
# XTRANS_SECURE_RPC_FLAGS()
# -------------------------
-# Check for Secure RPC functions - must come after XTRANS_CONNECTION_FLAGS
+# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
# so that any necessary networking libraries are already found
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
-[AC_REQUIRE([XTRANS_CONNECTION_FLAGS])
+[AC_REQUIRE([XTRANS_TCP_FLAGS])
AC_ARG_ENABLE(secure-rpc,
AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
[SECURE_RPC=$enableval], [SECURE_RPC="try"])
- if test "x$SECURE_RPC" == "xyes" -o "x$SECURE_RPC" == "xtry" ; then
+ if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
FOUND_SECURE_RPC="no"
AC_CHECK_FUNCS([authdes_seccreate authdes_create],
[FOUND_SECURE_RPC="yes"])
- if test "x$FOUND_SECURE_RPC" == "xno" ; then
- if test "x$SECURE_RPC" == "xyes" ; then
+ if test "x$FOUND_SECURE_RPC" = "xno" ; then
+ if test "x$SECURE_RPC" = "xyes" ; then
AC_MSG_ERROR([Secure RPC requested, but required functions not found])
fi
SECURE_RPC="no"
@@ -75,8 +93,8 @@ AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
SECURE_RPC="yes"
fi
fi
- AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported for X11 clients])
- if test "x$SECURE_RPC" == "xyes" ; then
+ AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
+ if test "x$SECURE_RPC" = "xyes" ; then
AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
fi
AC_MSG_RESULT($SECURE_RPC)