summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-07-09 21:19:15 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-08-01 16:23:27 +0100
commitc33ca1696a0a967091937805fa198ffc3317a03f (patch)
tree9c478a104c8f9cfa1e65ddcd42a341492897116b
parentccef8901de421eae5dcc8affa14218d46cc06593 (diff)
configure.ac: do not set HAVE_DRI(23) when libdrm is missing
These conditionals are used to guard both dri modules and loader(s). Currently if we try to build the gallium swrast dri module (without glx) on a system that's missing libdrm the build will fail. v2: Make sure we assign prior to checking the have_libdrm variable. Cc: 10.6 <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 16f6d432de07dcb537dafd0c9f3ef7614891ed6b) Conflicts: configure.ac
-rw-r--r--configure.ac18
1 files changed, 9 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index bb01c99b0c2..1d7061d3304 100644
--- a/configure.ac
+++ b/configure.ac
@@ -909,6 +909,13 @@ fi
AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \
"x$enable_dri" = xyes)
+# Check for libdrm
+PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],
+ [have_libdrm=yes], [have_libdrm=no])
+if test "x$have_libdrm" = xyes; then
+ DEFINES="$DEFINES -DHAVE_LIBDRM"
+fi
+
# Select which platform-dependent DRI code gets built
case "$host_os" in
darwin*)
@@ -921,8 +928,8 @@ esac
AM_CONDITIONAL(HAVE_DRICOMMON, test "x$enable_dri" = xyes )
AM_CONDITIONAL(HAVE_DRISW, test "x$enable_dri" = xyes )
-AM_CONDITIONAL(HAVE_DRI2, test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm )
-AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes -a "x$dri_platform" = xdrm )
+AM_CONDITIONAL(HAVE_DRI2, test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes )
+AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes )
AM_CONDITIONAL(HAVE_APPLEDRI, test "x$enable_dri" = xyes -a "x$dri_platform" = xapple )
AC_ARG_ENABLE([shared-glapi],
@@ -978,13 +985,6 @@ fi
AC_SUBST([MESA_LLVM])
-# Check for libdrm
-PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],
- [have_libdrm=yes], [have_libdrm=no])
-if test "x$have_libdrm" = xyes; then
- DEFINES="$DEFINES -DHAVE_LIBDRM"
-fi
-
case "$host_os" in
linux*)
need_pci_id=yes ;;