summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2010-04-05 17:19:46 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2010-04-05 17:19:46 -0700
commit344db0911e1e2447abe210b5684269a2a0daf04c (patch)
treebccf70cccf972f014c214b505ab49c661b38c2f8 /configure.ac
parent73cffd5048e10e512cbc2edc7b136162e7dd1408 (diff)
downloadxscope-344db0911e1e2447abe210b5684269a2a0daf04c.tar.gz
Allow a configure option to build without xtrans (--disable-xtrans)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 24 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index f9a8a1d..61a7d27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,21 +38,32 @@ AC_PROG_CC
XORG_DEFAULT_OPTIONS
AC_PROG_INSTALL
-dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
-dnl was not expanded, since xscope with no transport types is rather useless.
-dnl
-dnl If you're seeing an error here, be sure you installed the lib/xtrans module
-dnl first and if it's not in the default location, that you set the ACLOCAL
-dnl environment variable to find it, such as:
-dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
-m4_pattern_forbid([XTRANS_CONNECTION_FLAGS])
+AC_ARG_ENABLE(xtrans, AS_HELP_STRING([--enable-xtrans],
+ [Use xtrans for socket connections (default: auto)]),
+ [XTRANS=$enableval], [XTRANS=auto])
+
+if test "x$XTRANS" = xauto ; then
+ PKG_CHECK_EXISTS(xtrans, [XTRANS=yes], [XTRANS=no])
+fi
+
+if test "x$XTRANS" = xyes ; then
+ dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
+ dnl was not expanded, since xscope with no transport types is rather useless.
+ dnl
+ dnl If you're seeing an error here, be sure you installed the lib/xtrans module
+ dnl first and if it's not in the default location, that you set the ACLOCAL
+ dnl environment variable to find it, such as:
+ dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
+ m4_pattern_forbid([XTRANS_CONNECTION_FLAGS])
+
+ # Transport selection macro from xtrans.m4
+ XTRANS_CONNECTION_FLAGS
-# Transport selection macro from xtrans.m4
-XTRANS_CONNECTION_FLAGS
+ # Checks for pkg-config packages
+ PKG_CHECK_MODULES(XSCOPE, xtrans)
+ XSCOPE_CFLAGS="$XSCOPE_CFLAGS -DUSE_XTRANS"
+fi
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(XSCOPE, xtrans)
-XSCOPE_CFLAGS="$XSCOPE_CFLAGS -DUSE_XTRANS"
AC_SUBST(XSCOPE_CFLAGS)
AC_SUBST(XSCOPE_LIBS)