[metacity] build: add --enable-vulkan
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] build: add --enable-vulkan
- Date: Fri, 10 Mar 2017 20:21:10 +0000 (UTC)
commit 12fb506ba41de73113466e0f19e800f449b5bb4e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Mar 9 20:09:39 2017 +0200
build: add --enable-vulkan
The long term goal is to create a Vulkan compositor as an alternative
to existing XRender compositor. Start by adding Vulkan detection code.
configure.ac | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b3ef7b6..ee62a6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -369,6 +369,29 @@ if test x"$ZENITY" = xno; then
fi
dnl **************************************************************************
+dnl Check for Vulkan support
+dnl **************************************************************************
+
+AC_ARG_ENABLE([vulkan],
+ [AS_HELP_STRING([--enable-vulkan], [enable Vulkan support])],
+ [enable_vulkan="$enableval"], [enable_vulkan="auto"])
+
+AS_IF([test "x$enable_vulkan" != "xno"], [
+ AC_CHECK_LIB([vulkan], [vkCreateInstance], [
+ AC_CHECK_HEADER([vulkan/vulkan.h], [found_vulkan=yes], [found_vulkan=no])
+ ], [found_vulkan=no])
+
+ AS_IF([test "x$found_vulkan" = "xyes"], [
+ AC_DEFINE([HAVE_VULKAN], 1, [Build with Vulkan support])
+ METACITY_LIBS="$METACITY_LIBS -lvulkan"
+ ], [
+ AS_IF([test "x$enable_vulkan" = "xyes"], [
+ AC_MSG_ERROR([Vulkan enabled but not found])
+ ])
+ ])
+], [found_vulkan=no])
+
+dnl **************************************************************************
dnl Process .in files
dnl **************************************************************************
@@ -424,4 +447,5 @@ echo " Startup notification ........: ${have_startup_notification}"
echo " Session management ..........: ${found_sm}"
echo " Resize-and-rotate ...........: ${found_randr}"
echo " Xcursor .....................: ${have_xcursor}"
+echo " Vulkan ......................: ${found_vulkan}"
echo ""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]