Signed-off-by: Hans-Kristian Arntzen post@arntzen-software.no --- Makefile.am | 4 ++-- configure.ac | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 00a5f58..1e2959f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -83,9 +83,9 @@ libvkd3d_shader_la_SOURCES = \ libs/vkd3d-shader/vkd3d_shader.map \ libs/vkd3d-shader/vkd3d_shader_main.c \ libs/vkd3d-shader/vkd3d_shader_private.h -libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) @SPIRV_TOOLS_CFLAGS@ +libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) @SPIRV_TOOLS_CFLAGS@ @dxil_spirv_c_shared_CFLAGS@ libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ +libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ @dxil_spirv_c_shared_LIBS@ if HAVE_LD_VERSION_SCRIPT libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map EXTRA_libvkd3d_shader_la_DEPENDENCIES = $(srcdir)/libs/vkd3d-shader/vkd3d_shader.map diff --git a/configure.ac b/configure.ac index 355aaab..a7e973e 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,8 @@ AC_ARG_VAR([CROSSCC64], [64-bit Windows cross compiler]) AC_ARG_WITH([xcb], AS_HELP_STRING([--with-xcb], [Build with XCB library (default: test)])) AC_ARG_WITH([spirv-tools], AS_HELP_STRING([--with-spirv-tools], [Build with SPIRV-Tools library (default: disabled)])) +AC_ARG_WITH([dxil-spirv], AS_HELP_STRING([--with-dxil-spirv], + [Build with dxil-spirv library for DXIL support (default: enabled)])) AC_ARG_ENABLE([demos], AS_HELP_STRING([--enable-demos], [Build demo programs (default: disabled)]),, [enable_demos=no]) @@ -113,6 +115,13 @@ AS_IF([test "x$with_xcb" != "xno"], HAVE_XCB=yes], [HAVE_XCB=no])])
+HAVE_DXIL_SPV=no +AS_IF([test "x$with_dxil_spirv" != "xno"], + [PKG_CHECK_MODULES([dxil_spirv_c_shared], [dxil-spirv-c-shared], + [AC_DEFINE([HAVE_DXIL_SPV], [1], [Define to 1 if you have dxil-spirv.]) + HAVE_DXIL_SPV=yes], [HAVE_DXIL_SPV=no])], + [HAVE_DXIL_SPV=no]) + dnl Check for functions VKD3D_CHECK_FUNC([HAVE_BUILTIN_CLZ], [__builtin_clz], [__builtin_clz(0)]) VKD3D_CHECK_FUNC([HAVE_BUILTIN_POPCOUNT], [__builtin_popcount], [__builtin_popcount(0)]) @@ -129,6 +138,7 @@ AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_tests" != "xno"]) AM_CONDITIONAL([HAVE_WIDL], [test "x$WIDL" != "xno"]) AM_CONDITIONAL([HAVE_CROSSTARGET32], [test "x$CROSSTARGET32" != "xno"]) AM_CONDITIONAL([HAVE_CROSSTARGET64], [test "x$CROSSTARGET64" != "xno"]) +AM_CONDITIONAL([HAVE_DXIL_SPV], [test "x$HAVE_DXIL_SPV" = "xyes"])
AC_CONFIG_FILES([Makefile]) AC_OUTPUT @@ -144,6 +154,7 @@ AS_ECHO(["
Have XCB: ${HAVE_XCB} Have SPIRV-Tools: ${with_spirv_tools} + Have dxil-spirv: ${HAVE_DXIL_SPV}
Building demos: ${enable_demos} Building tests: ${enable_tests}