summaryrefslogtreecommitdiff
path: root/configure.ac
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-07-22 16:33:10 +0100
commit16f6d432de07dcb537dafd0c9f3ef7614891ed6b (patch)
treeae7f1b911f4b3bc9232de63e28c8bcd35bfc4e52 /configure.ac
parentfe4290200942b1103cdc1a238876143b61b731f0 (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>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 9 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index bb6d4f618ff..530fc64dafe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -913,6 +913,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*)
@@ -925,8 +932,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],
@@ -1112,13 +1119,6 @@ if test "x$with_sha1" = "x"; then
fi
AM_CONDITIONAL([ENABLE_SHADER_CACHE], [test x$enable_shader_cache = 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
-
case "$host_os" in
linux*)
need_pci_id=yes ;;