From b8aed266194ebff1ee2da1b9f3f69b4c6bdc8bed Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 4 Oct 2013 08:37:48 +0100 Subject: 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 --- configure.ac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'configure.ac') 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 #include @@ -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 #include ]) 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], -- cgit v1.2.3