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>
This commit is contained in:
parent
a0476ee6d0
commit
b8aed26619
11
configure.ac
11
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],
|
||||
|
|
|
|||
Loading…
Reference in New Issue