diff options
-rw-r--r-- | configure.ac | 37 |
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) |