summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-04 08:37:48 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-04 08:37:48 +0100
commitb8aed266194ebff1ee2da1b9f3f69b4c6bdc8bed (patch)
treed00b04b1ad144616f9bc049f478c79a03521fa1e /configure.ac
parenta0476ee6d0770156098aa633018addfc607c8a99 (diff)
configure: Disable building tools if prerequisite headers not found
After the pkg-config checks, we then probe the headers. If those probes fail, we obviously wish to prevent building the tools as the build will fail. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 523a39e0..64453737 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,14 +167,13 @@ PKG_CHECK_MODULES(X11, [x11 xrender xrandr xext pixman-1], [x11="yes"], [x11="no
AM_CONDITIONAL(HAVE_X11, test "x$x11" = "xyes")
PKG_CHECK_MODULES(TOOL, [xinerama xrandr xdamage xfixes xcursor xtst xrender xext x11 pixman-1], [tools="yes"], [tools="no"])
-AM_CONDITIONAL(BUILD_TOOLS, test "x$tools" = "xyes")
if test "x$tools" = "xyes"; then
- AC_CHECK_HEADER(sys/ipc.h)
- AC_CHECK_HEADER(sys/shm.h)
+ AC_CHECK_HEADER([sys/ipc.h], [], [tools=no])
+ AC_CHECK_HEADER([sys/shm.h], [], [tools=no])
if test "$ac_cv_header_sys_ipc_h" = "yes" -a "$ac_cv_header_sys_shm_h" = "yes"; then
- AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
+ AC_MSG_CHECKING(whether shmctl IPC_RMID allows subsequent attaches)
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/ipc.h>
@@ -202,11 +201,13 @@ if test "x$tools" = "xyes"; then
AC_MSG_RESULT(assuming no))
fi
- AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [],
+ AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [tools=no],
[#include <X11/Xlibint.h>
#include <X11/Xproto.h>])
fi
+AM_CONDITIONAL(BUILD_TOOLS, test "x$tools" = "xyes")
+
# Define a configure option for an alternate module directory
AC_ARG_WITH(xorg-module-dir,
AS_HELP_STRING([--with-xorg-module-dir=DIR],