configure: error out if building GBM without dri
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 5 May 2014 21:09:22 +0000 (22:09 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 10 May 2014 01:08:36 +0000 (02:08 +0100)
Both backends require --enable-dri, and building an empty libgbm
makes little to no sense. Error out at configure to prevent the
user from shooting themselves in the foot.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78225
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
configure.ac

index c68db008ee11cfb8a0bf0173138ba8fb3992866e..99a761a42fe690b00bd5dc6100c0dd5ce351abbd 100644 (file)
@@ -1179,6 +1179,13 @@ if test "x$enable_gbm" = xyes; then
         if test "x$enable_shared_glapi" = xno; then
             AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
         fi
+    else
+        # Strictly speaking libgbm does not require --enable-dri, although
+        # both of its backends do. Thus one can build libgbm without any
+        # backends if --disable-dri is set.
+        # To avoid unnecessary complexity of checking if at least one backend
+        # is available when building, just mandate --enable-dri.
+        AC_MSG_ERROR([gbm requires --enable-dri])
     fi
 fi
 AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)