diff options
author | Benjamin Otte <otte@redhat.com> | 2016-11-21 01:25:17 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-12-09 18:35:51 +0100 |
commit | 843fe3eec1eac94e278af2be165f26fe95ae6126 (patch) | |
tree | 21e125cef59868551d4f8c9f219c175d7af31621 /configure.ac | |
parent | 87ae5885dd7b79f7f4ec40b16ca2478ef52984e5 (diff) | |
download | gtk+-843fe3eec1eac94e278af2be165f26fe95ae6126.tar.gz |
build: Add Vulkan detection code
Also define GDK_WINDOWING_VULKAN if Vulkan is enabled.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8ea6556194..df3a187a07 100644 --- a/configure.ac +++ b/configure.ac @@ -297,6 +297,11 @@ AC_ARG_ENABLE(installed_tests, [enable_installed_tests=no]) AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes) +AC_ARG_ENABLE(vulkan, + [AS_HELP_STRING([--enable-vulkan], + [support Vulkan graphics API [default=maybe]])],, + [enable_vulkan="maybe"]) + AC_ARG_ENABLE(xkb, [AS_HELP_STRING([--enable-xkb], [support XKB extension [default=maybe]])],, @@ -1314,6 +1319,30 @@ else GDK_GIO_PACKAGE="gio-2.0 >= glib_required_version" fi +# Check for Vulkan support. + +have_vulkan="no" +if test "x$enable_vulkan" != "xno"; then + vulkan_error="" + AC_CHECK_HEADER([vulkan/vulkan.h], [], [vulkan_error="Vulkan header not found"]) + AC_CHECK_LIB([vulkan], [vkCreateInstance], [], [vulkan_error="Vulkan library not found"]) + if "x$vulkan_error" != "x"; then + if "x$enable_vulkan" = "xyes"; then + AC_MSG_ERROR($vulkan_error) + else + AC_MSG_WARN($vulkan_error) + fi + else + GDK_EXTRA_LIBS="-lvulkan" + have_vulkan="yes" + GDK_WINDOWING="$GDK_WINDOWING +#define GDK_WINDOWING_VULKAN" + fi +else + AC_MSG_WARN(Vulkan support explicitly disabled) +fi +AM_CONDITIONAL(HAVE_VULKAN, test "$have_vulkan" = "yes") + # Check for Pango flags AC_MSG_CHECKING(Pango flags) |