From 6066acaf979c91213cded80d3964583818271308 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 23 Mar 2012 02:17:42 -0700 Subject: configure.ac: Add an --enable-xtoq option with auto detection Signed-off-by: Jeremy Huddleston --- configure.ac | 12 ++++++++++++ src/Makefile.am | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ffc542d..090e3b2 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,18 @@ AC_PROG_INSTALL # Checks for libraries. PKG_CHECK_MODULES(XCB, xcb-damage xcb-composite xcb-event xcb-xtest xcb-image xcb-keysyms xcb-icccm xcb-atom) +AC_ARG_ENABLE(xtoq, AS_HELP_STRING([--enable-xtoq], [Build XtoQ.app for OS X (default: auto)]), [XTOQ=$enableval], [XTOQ=auto]) +AC_MSG_CHECKING([if we should build XtoQ.app]) +if test "x$XTOQ" = "xauto" ; then + case $host_os in + # darwin10 (Snow Leopard) and later is required for XtoQ + darwin1*) XTOQ=yes ;; + *) XTOQ=no ;; + esac +fi +AC_MSG_RESULT($XTOQ) +AM_CONDITIONAL(XTOQ, [test "x$XTOQ" = "xyes"]) + AC_CONFIG_FILES([Makefile include/Makefile man/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 5947c02..ed20bc9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1 +1,6 @@ -SUBDIRS = libxcwm xtoq +DIST_SUBDIRS = libxcwm xtoq +SUBDIRS = libxcwm + +if XTOQ +SUBDIRS += xtoq +endif -- cgit v1.2.3